libpurple/conversations.h

Sat, 22 Jun 2013 22:47:05 +0530

author
Ankit Vani <a@nevitus.org>
date
Sat, 22 Jun 2013 22:47:05 +0530
branch
soc.2013.gobjectification
changeset 34612
ec739e43a71c
parent 34605
89e6c5346d63
child 34617
89233fea4432
permissions
-rw-r--r--

Added purple_conversation_* functions to API to redirect to virtual methods

34595
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
1 /**
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
2 * @file conversations.h Conversations API
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
3 * @ingroup core
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
4 * @see @ref conversation-signals
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
5 */
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
6
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
7 /* purple
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
8 *
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
9 * Purple is the legal property of its developers, whose names are too numerous
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
10 * to list here. Please refer to the COPYRIGHT file distributed with this
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
11 * source distribution.
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
12 *
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
13 * This program is free software; you can redistribute it and/or modify
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
14 * it under the terms of the GNU General Public License as published by
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
15 * the Free Software Foundation; either version 2 of the License, or
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
16 * (at your option) any later version.
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
17 *
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
18 * This program is distributed in the hope that it will be useful,
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
21 * GNU General Public License for more details.
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
22 *
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
23 * You should have received a copy of the GNU General Public License
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
24 * along with this program; if not, write to the Free Software
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
26 */
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
27 #ifndef _PURPLE_CONVERSATIONS_H_
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
28 #define _PURPLE_CONVERSATIONS_H_
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
29
34599
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
30 #include "conversation.h"
34605
89e6c5346d63 Begun refactoring for PurpleConversation
Ankit Vani <a@nevitus.org>
parents: 34600
diff changeset
31 #include "conversationtypes.h"
89e6c5346d63 Begun refactoring for PurpleConversation
Ankit Vani <a@nevitus.org>
parents: 34600
diff changeset
32 #include "server.h"
34595
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
33
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
34 G_BEGIN_DECLS
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
35
34599
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
36 /**************************************************************************/
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
37 /** @name Conversations Subsystem */
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
38 /**************************************************************************/
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
39 /*@{*/
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
40
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
41 /**
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
42 * Returns a list of all conversations.
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
43 *
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
44 * This list includes both IMs and chats.
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
45 *
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
46 * @constreturn A GList of all conversations.
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
47 */
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
48 GList *purple_conversations_get(void);
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
49
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
50 /**
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
51 * Returns a list of all IMs.
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
52 *
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
53 * @constreturn A GList of all IMs.
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
54 */
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
55 GList *purple_conversations_get_ims(void);
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
56
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
57 /**
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
58 * Returns a list of all chats.
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
59 *
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
60 * @constreturn A GList of all chats.
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
61 */
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
62 GList *purple_conversations_get_chats(void);
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
63
34605
89e6c5346d63 Begun refactoring for PurpleConversation
Ankit Vani <a@nevitus.org>
parents: 34600
diff changeset
64 /** TODO type
34600
3180ebbd06be Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents: 34599
diff changeset
65 * Finds a conversation with the specified type, name, and Purple account.
3180ebbd06be Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents: 34599
diff changeset
66 *
3180ebbd06be Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents: 34599
diff changeset
67 * @param type The type of the conversation.
3180ebbd06be Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents: 34599
diff changeset
68 * @param name The name of the conversation.
3180ebbd06be Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents: 34599
diff changeset
69 * @param account The purple_account associated with the conversation.
3180ebbd06be Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents: 34599
diff changeset
70 *
3180ebbd06be Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents: 34599
diff changeset
71 * @return The conversation if found, or @c NULL otherwise.
3180ebbd06be Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents: 34599
diff changeset
72 */
3180ebbd06be Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents: 34599
diff changeset
73 PurpleConversation *purple_conversations_find_with_account(
34605
89e6c5346d63 Begun refactoring for PurpleConversation
Ankit Vani <a@nevitus.org>
parents: 34600
diff changeset
74 GType type, const char *name,
34600
3180ebbd06be Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents: 34599
diff changeset
75 const PurpleAccount *account);
3180ebbd06be Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents: 34599
diff changeset
76
3180ebbd06be Added GObject structures, moved things around, renamed functions as GObject methods.
Ankit Vani <a@nevitus.org>
parents: 34599
diff changeset
77 /**
34599
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
78 * Finds a chat with the specified chat ID.
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
79 *
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
80 * @param gc The purple_connection.
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
81 * @param id The chat ID.
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
82 *
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
83 * @return The chat conversation.
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
84 */
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
85 PurpleChatConversation *purple_conversations_find_chat(const PurpleConnection *gc, int id);
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
86
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
87 /**
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
88 * Sets the default conversation UI operations structure.
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
89 *
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
90 * @param ops The UI conversation operations structure.
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
91 */
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
92 void purple_conversations_set_ui_ops(PurpleConversationUiOps *ops);
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
93
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
94 /**
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
95 * Returns the conversation subsystem handle.
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
96 *
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
97 * @return The conversation subsystem handle.
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
98 */
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
99 void *purple_conversations_get_handle(void);
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
100
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
101 /**
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
102 * Initializes the conversation subsystem.
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
103 */
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
104 void purple_conversations_init(void);
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
105
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
106 /**
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
107 * Uninitializes the conversation subsystem.
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
108 */
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
109 void purple_conversations_uninit(void);
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
110
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
111 /*@}*/
0b1b22f5e2ec Begun GObjectification of PurpleConversation.
Ankit Vani <a@nevitus.org>
parents: 34595
diff changeset
112
34595
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
113 G_END_DECLS
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
114
9734ddc618a7 Prepared files for GObjectification of PurpleConversation
Ankit Vani <a@nevitus.org>
parents:
diff changeset
115 #endif /* _PURPLE_CONVERSATIONS_H_ */

mercurial