src/prpl.h

changeset 3572
d07e14aa6f26
parent 3466
db8d35ad8480
child 3609
6ca2fef0003e
equal deleted inserted replaced
3571:406912b64d12 3572:d07e14aa6f26
39 #define PROTO_VGATE 7 39 #define PROTO_VGATE 7
40 #define PROTO_JABBER 8 40 #define PROTO_JABBER 8
41 #define PROTO_NAPSTER 9 41 #define PROTO_NAPSTER 9
42 #define PROTO_ZEPHYR 10 42 #define PROTO_ZEPHYR 10
43 #define PROTO_GADUGADU 11 43 #define PROTO_GADUGADU 11
44 #define PROTO_UNTAKEN 17
45
44 /* DON'T TAKE AN UNASSIGNED NUMBER! Talk to Rob or Sean if you'd like 46 /* DON'T TAKE AN UNASSIGNED NUMBER! Talk to Rob or Sean if you'd like
45 * to create a new PRPL. */ 47 * to create a new PRPL. */
46 48
47 #define PRPL_DESC(x) "Allows gaim to use the " x " protocol.\n\n" \ 49 #define PRPL_DESC(x) "Allows gaim to use the " x " protocol.\n\n" \
48 "Now that you have loaded this protocol, use the " \ 50 "Now that you have loaded this protocol, use the " \
84 }; 86 };
85 87
86 struct prpl { 88 struct prpl {
87 int protocol; 89 int protocol;
88 int options; 90 int options;
89 char *(* name)(); 91 struct gaim_plugin *plug;
92 char *name;
90 93
91 /* for ICQ and Yahoo, who have off/on per-conversation options */ 94 /* for ICQ and Yahoo, who have off/on per-conversation options */
92 /* char *checkbox; this should be per-connection */ 95 /* char *checkbox; this should be per-connection */
93 96
94 /* returns the XPM associated with the given user class */ 97 /* returns the XPM associated with the given user class */
95 char **(* list_icon)(int); 98 char **(* list_icon)(int);
96 GList *(* away_states)(struct gaim_connection *gc); 99 GList *(* away_states)(struct gaim_connection *gc);
97 GList *(* actions)(); 100 GList *(* actions)();
98 void (* do_action)(struct gaim_connection *, char *); 101 void (* do_action)(struct gaim_connection *, char *);
99 /* user_opts returns a GList* of g_malloc'd struct proto_user_opts */ 102 /* user_opts is a GList* of g_malloc'd struct proto_user_opts */
100 GList *(* user_opts)(); 103 GList *user_opts;
101 GList *(* buddy_menu)(struct gaim_connection *, char *); 104 GList *(* buddy_menu)(struct gaim_connection *, char *);
102 GList *(* edit_buddy_menu)(struct gaim_connection *, char *); 105 GList *(* edit_buddy_menu)(struct gaim_connection *, char *);
103 GList *(* chat_info)(struct gaim_connection *); 106 GList *(* chat_info)(struct gaim_connection *);
104 107
105 GSList *(* smiley_list)(); 108 GSList *(* smiley_list)();
178 181
179 char *(* normalize)(const char *); 182 char *(* normalize)(const char *);
180 }; 183 };
181 184
182 extern GSList *protocols; 185 extern GSList *protocols;
186 extern prpl_accounts[];
183 187
184 /* this is mostly just for aim.c, when it initializes the protocols */ 188 /* this is mostly just for aim.c, when it initializes the protocols */
185 extern void static_proto_init(); 189 extern void static_proto_init();
186 190
187 /* this is what should actually load the protocol. pass it the protocol's initializer */ 191 /* this is what should actually load the protocol. pass it the protocol's initializer */
188 extern void load_protocol(proto_init, int); 192 extern gboolean load_prpl(struct prpl *);
193 extern void load_protocol(proto_init);
189 extern void unload_protocol(struct prpl *); 194 extern void unload_protocol(struct prpl *);
195 extern gint proto_compare(struct prpl *, struct prpl *);
190 196
191 extern struct prpl *find_prpl(int); 197 extern struct prpl *find_prpl(int);
192 extern void do_proto_menu(); 198 extern void do_proto_menu();
193 199
194 extern void show_got_added(struct gaim_connection *, const char *, 200 extern void show_got_added(struct gaim_connection *, const char *,

mercurial