filetransfer: use 'deallocate' callback in sipe_file_transfer
[siplcs.git] / src / core / sipe-chat.h
blob29cdbb05688ad3af66dd5c23910829880c129405
1 /**
2 * @file sipe-chat.h
4 * pidgin-sipe
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;
25 struct sip_session;
26 struct sipe_backend_chat_session;
28 enum sipe_chat_type {
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
45 gchar *id;
47 /* Human readable chat identifier (can have duplicates) */
48 gchar *title;
50 enum sipe_chat_type type;
52 gchar *join_url;
53 gchar *dial_in_conf_id;
54 gchar *organizer;
57 /**
58 * Create a new chat session
60 * @param session
62 struct sipe_chat_session *
63 sipe_chat_create_session(enum sipe_chat_type type,
64 const gchar *id, const gchar *title);
66 /**
67 * Remove a chat session
69 * @param session
71 void
72 sipe_chat_remove_session(struct sipe_chat_session *session);
74 /**
75 * Release resources on unload
77 void
78 sipe_chat_destroy(void);
80 /**
81 * Generate a name for a new private chat.
83 * @return chat name. Must be g_free()'d after use
85 gchar *
86 sipe_chat_get_name(void);
88 /**
91 * @param sipe_private SIPE core private data
92 * @param session SIPE session for chat
94 void
95 sipe_process_pending_invite_queue(struct sipe_core_private *sipe_private,
96 struct sip_session *session);
98 /**
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);