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
;
54 * Create a new chat session
58 struct sipe_chat_session
*
59 sipe_chat_create_session(enum sipe_chat_type type
,
60 const gchar
*id
, const gchar
*title
);
63 * Remove a chat session
68 sipe_chat_remove_session(struct sipe_chat_session
*session
);
71 * Release resources on unload
74 sipe_chat_destroy(void);
77 * Generate a name for a new private chat.
79 * @return chat name. Must be g_free()'d after use
82 sipe_chat_get_name(void);
87 * @param sipe_private SIPE core private data
88 * @param session SIPE session for chat
91 sipe_process_pending_invite_queue(struct sipe_core_private
*sipe_private
,
92 struct sip_session
*session
);
95 * Set roster manager URI for a multiparty chat
97 * @param session SIPE session for chat
98 * @param roster_manager New roster manager URI or NULL
100 void sipe_chat_set_roster_manager(struct sip_session
*session
,
101 const gchar
*roster_manager
);