6 * Copyright (C) 2009-10 SIPE Project <http://sipe.sourceforge.net/>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 /* Forward declarations */
24 struct sipe_core_private
;
26 struct sipe_backend_chat_session
;
29 SIPE_CHAT_TYPE_UNKNOWN
= 0,
30 SIPE_CHAT_TYPE_MULTIPARTY
,
31 SIPE_CHAT_TYPE_CONFERENCE
,
32 SIPE_CHAT_TYPE_GROUPCHAT
35 struct sipe_chat_session
{
36 struct sipe_backend_chat_session
*backend
;
39 * Chat identifier (must be unique per account)
41 * 2007 Group chat: channel URI
42 * 2007 Conference: focus URI
43 * 2005 multiparty chat: roster manager SIP URI
47 /* Human readable chat identifier (can have duplicates) */
50 enum sipe_chat_type type
;
53 gchar
*dial_in_conf_id
;
58 * Create a new chat session
62 struct sipe_chat_session
*
63 sipe_chat_create_session(enum sipe_chat_type type
,
64 const gchar
*id
, const gchar
*title
);
67 * Remove a chat session
72 sipe_chat_remove_session(struct sipe_chat_session
*session
);
75 * Release resources on unload
78 sipe_chat_destroy(void);
81 * Generate a name for a new private chat.
83 * @return chat name. Must be g_free()'d after use
86 sipe_chat_get_name(void);
91 * @param sipe_private SIPE core private data
92 * @param session SIPE session for chat
95 sipe_process_pending_invite_queue(struct sipe_core_private
*sipe_private
,
96 struct sip_session
*session
);
99 * Set roster manager URI for a multiparty chat
101 * @param session SIPE session for chat
102 * @param roster_manager New roster manager URI or NULL
104 void sipe_chat_set_roster_manager(struct sip_session
*session
,
105 const gchar
*roster_manager
);