purple: work around broken dbus-server.h
[siplcs.git] / src / core / sipe-chat.h
blob44d0e3228d72bfd5d2f795cd123bf02ac98e4785
1 /**
2 * @file sipe-chat.h
4 * pidgin-sipe
6 * Copyright (C) 2009-2017 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 /* SIPE_CHAT_TYPE_xxx */
51 guint type;
53 gchar *join_url;
54 gchar *dial_in_conf_id;
55 gchar *organizer;
57 struct sipe_user_ask_ctx *appshare_ask_ctx;
60 /**
61 * Create a new chat session
63 * @param session
65 struct sipe_chat_session *
66 sipe_chat_create_session(guint type,
67 const gchar *id,
68 const gchar *title);
70 /**
71 * Remove a chat session
73 * @param session
75 void
76 sipe_chat_remove_session(struct sipe_chat_session *session);
78 /**
79 * Release resources on unload
81 void
82 sipe_chat_destroy(void);
84 /**
85 * Generate a name for a new private chat.
87 * @return chat name. Must be g_free()'d after use
89 gchar *
90 sipe_chat_get_name(void);
92 /**
95 * @param sipe_private SIPE core private data
96 * @param session SIPE session for chat
98 void
99 sipe_process_pending_invite_queue(struct sipe_core_private *sipe_private,
100 struct sip_session *session);
103 * Set roster manager URI for a multiparty chat
105 * @param session SIPE session for chat
106 * @param roster_manager New roster manager URI or NULL
108 void sipe_chat_set_roster_manager(struct sip_session *session,
109 const gchar *roster_manager);