chat: add sipe_core_chat_type()
[siplcs.git] / src / core / sipe-chat.h
blob3a644d1e00d76ef623f77f381e34494be5e58a42
1 /**
2 * @file sipe-chat.h
4 * pidgin-sipe
6 * Copyright (C) 2009-2016 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 struct sipe_chat_session {
29 struct sipe_backend_chat_session *backend;
32 * Chat identifier (must be unique per account)
34 * 2007 Group chat: channel URI
35 * 2007 Conference: focus URI
36 * 2005 multiparty chat: roster manager SIP URI
38 gchar *id;
40 /* Human readable chat identifier (can have duplicates) */
41 gchar *title;
43 sipe_chat_type type;
45 gchar *join_url;
46 gchar *dial_in_conf_id;
47 gchar *organizer;
49 struct sipe_user_ask_ctx *appshare_ask_ctx;
52 /**
53 * Create a new chat session
55 * @param session
57 struct sipe_chat_session *
58 sipe_chat_create_session(sipe_chat_type type,
59 const gchar *id, const gchar *title);
61 /**
62 * Remove a chat session
64 * @param session
66 void
67 sipe_chat_remove_session(struct sipe_chat_session *session);
69 /**
70 * Release resources on unload
72 void
73 sipe_chat_destroy(void);
75 /**
76 * Generate a name for a new private chat.
78 * @return chat name. Must be g_free()'d after use
80 gchar *
81 sipe_chat_get_name(void);
83 /**
86 * @param sipe_private SIPE core private data
87 * @param session SIPE session for chat
89 void
90 sipe_process_pending_invite_queue(struct sipe_core_private *sipe_private,
91 struct sip_session *session);
93 /**
94 * Set roster manager URI for a multiparty chat
96 * @param session SIPE session for chat
97 * @param roster_manager New roster manager URI or NULL
99 void sipe_chat_set_roster_manager(struct sip_session *session,
100 const gchar *roster_manager);