Mercurial > pidgin
annotate libpurple/whiteboard.c @ 32776:804239d704ff
stun: Initialize 'in', silence compiler.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 23 May 2012 03:25:01 +0000 |
parents | 46177ee4af40 |
children |
rev | line source |
---|---|
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1 /* |
15822 | 2 * purple |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
3 * |
15822 | 4 * Purple is the legal property of its developers, whose names are too numerous |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
5 * to list here. Please refer to the COPYRIGHT file distributed with this |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
6 * source distribution. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
7 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
8 * This program is free software; you can redistribute it and/or modify |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
9 * it under the terms of the GNU General Public License as published by |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
10 * the Free Software Foundation; either version 2 of the License, or |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
11 * (at your option) any later version. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
12 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
16 * GNU General Public License for more details. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
17 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
18 * You should have received a copy of the GNU General Public License |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
19 * along with this program; if not, write to the Free Software |
19681
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18202
diff
changeset
|
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
21 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
22 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
23 |
18202
7df46d8bf114
Move the define in internal.h instead.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15822
diff
changeset
|
24 #include "internal.h" |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
25 #include "whiteboard.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
26 #include "prpl.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
27 |
32338 | 28 /** |
29 * A PurpleWhiteboard | |
30 */ | |
31 struct _PurpleWhiteboard | |
32 { | |
33 int state; /**< State of whiteboard session */ | |
34 | |
35 PurpleAccount *account; /**< Account associated with this session */ | |
36 char *who; /**< Name of the remote user */ | |
37 | |
38 void *ui_data; /**< Graphical user-interface data */ | |
39 void *proto_data; /**< Protocol specific data */ | |
40 PurpleWhiteboardPrplOps *prpl_ops; /**< Protocol-plugin operations */ | |
41 | |
42 GList *draw_list; /**< List of drawing elements/deltas to send */ | |
43 }; | |
44 | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
45 /****************************************************************************** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
46 * Globals |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
47 *****************************************************************************/ |
15822 | 48 static PurpleWhiteboardUiOps *whiteboard_ui_ops = NULL; |
49 /* static PurpleWhiteboardPrplOps *whiteboard_prpl_ops = NULL; */ | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
50 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
51 static GList *wbList = NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
52 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
53 /*static gboolean auto_accept = TRUE; */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
54 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
55 /****************************************************************************** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
56 * API |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
57 *****************************************************************************/ |
15822 | 58 void purple_whiteboard_set_ui_ops(PurpleWhiteboardUiOps *ops) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
59 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
60 whiteboard_ui_ops = ops; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
61 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
62 |
15822 | 63 void purple_whiteboard_set_prpl_ops(PurpleWhiteboard *wb, PurpleWhiteboardPrplOps *ops) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
64 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
65 wb->prpl_ops = ops; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
66 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
67 |
15822 | 68 PurpleWhiteboard *purple_whiteboard_create(PurpleAccount *account, const char *who, int state) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
69 { |
15822 | 70 PurplePluginProtocolInfo *prpl_info; |
71 PurpleWhiteboard *wb = g_new0(PurpleWhiteboard, 1); | |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
72 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
73 wb->account = account; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
74 wb->state = state; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
75 wb->who = g_strdup(who); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
76 |
22262
edca47ee06c5
Kill off gc->prpl in the core everywhere but connection.c (when the struct
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19681
diff
changeset
|
77 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(purple_connection_get_prpl( |
edca47ee06c5
Kill off gc->prpl in the core everywhere but connection.c (when the struct
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19681
diff
changeset
|
78 purple_account_get_connection(account))); |
15822 | 79 purple_whiteboard_set_prpl_ops(wb, prpl_info->whiteboard_prpl_ops); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
80 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
81 /* Start up protocol specifics */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
82 if(wb->prpl_ops && wb->prpl_ops->start) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
83 wb->prpl_ops->start(wb); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
84 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
85 wbList = g_list_append(wbList, wb); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
86 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
87 return wb; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
88 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
89 |
15822 | 90 void purple_whiteboard_destroy(PurpleWhiteboard *wb) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
91 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
92 g_return_if_fail(wb != NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
93 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
94 if(wb->ui_data) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
95 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
96 /* Destroy frontend */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
97 if(whiteboard_ui_ops && whiteboard_ui_ops->destroy) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
98 whiteboard_ui_ops->destroy(wb); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
99 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
100 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
101 /* Do protocol specific session ending procedures */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
102 if(wb->prpl_ops && wb->prpl_ops->end) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
103 wb->prpl_ops->end(wb); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
104 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
105 g_free(wb->who); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
106 wbList = g_list_remove(wbList, wb); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
107 g_free(wb); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
108 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
109 |
32003
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
110 PurpleAccount *purple_whiteboard_get_account(const PurpleWhiteboard *wb) |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
111 { |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
112 g_return_val_if_fail(wb != NULL, NULL); |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
113 |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
114 return wb->account; |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
115 } |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
116 |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
117 const char *purple_whiteboard_get_who(const PurpleWhiteboard *wb) |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
118 { |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
119 g_return_val_if_fail(wb != NULL, NULL); |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
120 |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
121 return wb->who; |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
122 } |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
123 |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
124 void purple_whiteboard_set_state(PurpleWhiteboard *wb, int state) |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
125 { |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
126 g_return_if_fail(wb != NULL); |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
127 |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
128 wb->state = state; |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
129 } |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
130 |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
131 int purple_whiteboard_get_state(const PurpleWhiteboard *wb) |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
132 { |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
133 g_return_val_if_fail(wb != NULL, -1); |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
134 |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
135 return wb->state; |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
136 } |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
137 |
15822 | 138 void purple_whiteboard_start(PurpleWhiteboard *wb) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
139 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
140 /* Create frontend for whiteboard */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
141 if(whiteboard_ui_ops && whiteboard_ui_ops->create) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
142 whiteboard_ui_ops->create(wb); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
143 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
144 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
145 /* Looks through the list of whiteboard sessions for one that is between |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
146 * usernames 'me' and 'who'. Returns a pointer to a matching whiteboard |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
147 * session; if none match, it returns NULL. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
148 */ |
15822 | 149 PurpleWhiteboard *purple_whiteboard_get_session(const PurpleAccount *account, const char *who) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
150 { |
15822 | 151 PurpleWhiteboard *wb; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
152 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
153 GList *l = wbList; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
154 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
155 /* Look for a whiteboard session between the local user and the remote user |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
156 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
157 while(l != NULL) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
158 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
159 wb = l->data; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
160 |
25894
a6e3cb32cdd2
Patch from Paul Aurich to add purple_strequal to help readability and simplicity of code. Ie, don't need to negate the value of strcmp, since this does a strcmp and does the negation for us
Paul Aurich <paul@darkrain42.org>
parents:
22262
diff
changeset
|
161 if(wb->account == account && purple_strequal(wb->who, who)) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
162 return wb; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
163 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
164 l = l->next; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
165 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
166 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
167 return NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
168 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
169 |
15822 | 170 void purple_whiteboard_draw_list_destroy(GList *draw_list) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
171 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
172 g_list_free(draw_list); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
173 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
174 |
15822 | 175 gboolean purple_whiteboard_get_dimensions(const PurpleWhiteboard *wb, int *width, int *height) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
176 { |
15822 | 177 PurpleWhiteboardPrplOps *prpl_ops = wb->prpl_ops; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
178 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
179 if (prpl_ops && prpl_ops->get_dimensions) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
180 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
181 prpl_ops->get_dimensions(wb, width, height); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
182 return TRUE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
183 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
184 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
185 return FALSE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
186 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
187 |
15822 | 188 void purple_whiteboard_set_dimensions(PurpleWhiteboard *wb, int width, int height) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
189 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
190 if(whiteboard_ui_ops && whiteboard_ui_ops->set_dimensions) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
191 whiteboard_ui_ops->set_dimensions(wb, width, height); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
192 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
193 |
15822 | 194 void purple_whiteboard_send_draw_list(PurpleWhiteboard *wb, GList *list) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
195 { |
15822 | 196 PurpleWhiteboardPrplOps *prpl_ops = wb->prpl_ops; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
197 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
198 if (prpl_ops && prpl_ops->send_draw_list) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
199 prpl_ops->send_draw_list(wb, list); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
200 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
201 |
15822 | 202 void purple_whiteboard_draw_point(PurpleWhiteboard *wb, int x, int y, int color, int size) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
203 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
204 if(whiteboard_ui_ops && whiteboard_ui_ops->draw_point) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
205 whiteboard_ui_ops->draw_point(wb, x, y, color, size); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
206 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
207 |
15822 | 208 void purple_whiteboard_draw_line(PurpleWhiteboard *wb, int x1, int y1, int x2, int y2, int color, int size) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
209 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
210 if(whiteboard_ui_ops && whiteboard_ui_ops->draw_line) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
211 whiteboard_ui_ops->draw_line(wb, x1, y1, x2, y2, color, size); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
212 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
213 |
15822 | 214 void purple_whiteboard_clear(PurpleWhiteboard *wb) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
215 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
216 if(whiteboard_ui_ops && whiteboard_ui_ops->clear) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
217 whiteboard_ui_ops->clear(wb); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
218 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
219 |
15822 | 220 void purple_whiteboard_send_clear(PurpleWhiteboard *wb) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
221 { |
15822 | 222 PurpleWhiteboardPrplOps *prpl_ops = wb->prpl_ops; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
223 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
224 if (prpl_ops && prpl_ops->clear) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
225 prpl_ops->clear(wb); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
226 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
227 |
15822 | 228 void purple_whiteboard_send_brush(PurpleWhiteboard *wb, int size, int color) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
229 { |
15822 | 230 PurpleWhiteboardPrplOps *prpl_ops = wb->prpl_ops; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
231 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
232 if (prpl_ops && prpl_ops->set_brush) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
233 prpl_ops->set_brush(wb, size, color); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
234 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
235 |
15822 | 236 gboolean purple_whiteboard_get_brush(const PurpleWhiteboard *wb, int *size, int *color) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
237 { |
15822 | 238 PurpleWhiteboardPrplOps *prpl_ops = wb->prpl_ops; |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
239 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
240 if (prpl_ops && prpl_ops->get_brush) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
241 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
242 prpl_ops->get_brush(wb, size, color); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
243 return TRUE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
244 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
245 return FALSE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
246 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
247 |
15822 | 248 void purple_whiteboard_set_brush(PurpleWhiteboard *wb, int size, int color) |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
249 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
250 if (whiteboard_ui_ops && whiteboard_ui_ops->set_brush) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
251 whiteboard_ui_ops->set_brush(wb, size, color); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
252 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
253 |
32003
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
254 GList *purple_whiteboard_get_draw_list(const PurpleWhiteboard *wb) |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
255 { |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
256 g_return_val_if_fail(wb != NULL, NULL); |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
257 |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
258 return wb->draw_list; |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
259 } |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
260 |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
261 void purple_whiteboard_set_draw_list(PurpleWhiteboard *wb, GList* draw_list) |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
262 { |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
263 g_return_if_fail(wb != NULL); |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
264 |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
265 wb->draw_list = draw_list; |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
266 } |
2bf260b86086
Add additional accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
32000
diff
changeset
|
267 |
32000
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
268 void purple_whiteboard_set_protocol_data(PurpleWhiteboard *wb, gpointer proto_data) |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
269 { |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
270 g_return_if_fail(wb != NULL); |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
271 |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
272 wb->proto_data = proto_data; |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
273 } |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
274 |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
275 gpointer purple_whiteboard_get_protocol_data(const PurpleWhiteboard *wb) |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
276 { |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
277 g_return_val_if_fail(wb != NULL, NULL); |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
278 |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
279 return wb->proto_data; |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
280 } |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
281 |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
282 void purple_whiteboard_set_ui_data(PurpleWhiteboard *wb, gpointer ui_data) |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
283 { |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
284 g_return_if_fail(wb != NULL); |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
285 |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
286 wb->ui_data = ui_data; |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
287 } |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
288 |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
289 gpointer purple_whiteboard_get_ui_data(const PurpleWhiteboard *wb) |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
290 { |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
291 g_return_val_if_fail(wb != NULL, NULL); |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
292 |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
293 return wb->ui_data; |
cea77667da7d
Added protocol_data and ui_data accessor functions for Whiteboard.
andrew.victor@mxit.com
parents:
28647
diff
changeset
|
294 } |