l10n: sync translations with transifex.net
[siplcs.git] / src / core / sipe-chat.h
blob4b2bd4641c1aa977261515f4d88d2e68a42e0c46
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;
53 /**
54 * Create a new chat session
56 * @param session
58 struct sipe_chat_session *
59 sipe_chat_create_session(enum sipe_chat_type type,
60 const gchar *id, const gchar *title);
62 /**
63 * Remove a chat session
65 * @param session
67 void
68 sipe_chat_remove_session(struct sipe_chat_session *session);
70 /**
71 * Release resources on unload
73 void
74 sipe_chat_destroy(void);
76 /**
77 * Generate a name for a new private chat.
79 * @return chat name. Must be g_free()'d after use
81 gchar *
82 sipe_chat_get_name(void);
84 /**
87 * @param sipe_private SIPE core private data
88 * @param session SIPE session for chat
90 void
91 sipe_process_pending_invite_queue(struct sipe_core_private *sipe_private,
92 struct sip_session *session);
94 /**
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);