Changes in protocols/nogaim.h [58adb7e:c6ca3ee]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.h
r58adb7e rc6ca3ee 39 39 #define _NOGAIM_H 40 40 41 #include <stdint.h>42 43 41 #include "bitlbee.h" 44 42 #include "account.h" … … 49 47 50 48 #define WEBSITE "http://www.bitlbee.org/" 49 #define GAIM_AWAY_CUSTOM "Custom" 51 50 52 51 /* Sharing flags between all kinds of things. I just hope I won't hit any … … 209 208 * not implement this. */ 210 209 struct groupchat * 211 (* chat_join) (struct im_connection *, c onst char *room, const char *nick, constchar *password);210 (* chat_join) (struct im_connection *, char *room, char *nick, char *password); 212 211 /* Change the topic, if supported. Note that BitlBee expects the IM 213 212 server to confirm the topic change with a regular topic change … … 217 216 218 217 /* You can tell what away states your protocol supports, so that 219 * BitlBee will try to map the IRC away reasons to them . If your220 * protocol doesn't have any, just return one generic "Away". */218 * BitlBee will try to map the IRC away reasons to them, or use 219 * GAIM_AWAY_CUSTOM when calling skype_set_away(). */ 221 220 GList *(* away_states)(struct im_connection *ic); 222 221 … … 224 223 * - Most protocols will just want to set this to g_strcasecmp().*/ 225 224 int (* handle_cmp) (const char *who1, const char *who2); 226 227 /* Implement these callbacks if you want to use imcb_ask_auth() */228 void (* auth_allow) (struct im_connection *, const char *who);229 void (* auth_deny) (struct im_connection *, const char *who);230 225 }; 231 226 … … 243 238 * the account_t parameter. */ 244 239 G_MODULE_EXPORT struct im_connection *imcb_new( account_t *acc ); 245 G_MODULE_EXPORT void imc _free( struct im_connection *ic );240 G_MODULE_EXPORT void imcb_free( struct im_connection *ic ); 246 241 /* Once you're connected, you should call this function, so that the user will 247 242 * see the success. */ … … 256 251 /* To tell the user an error, ie. before logging out when an error occurs. */ 257 252 G_MODULE_EXPORT void imcb_error( struct im_connection *ic, char *format, ... ) G_GNUC_PRINTF( 2, 3 ); 258 259 253 /* To ask a your about something. 260 254 * - 'msg' is the question. … … 263 257 */ 264 258 G_MODULE_EXPORT void imcb_ask( struct im_connection *ic, char *msg, void *data, query_callback doit, query_callback dont ); 265 266 /* Two common questions you may want to ask: 267 * - X added you to his contact list, allow? 268 * - X is not in your contact list, want to add? 269 */ 270 G_MODULE_EXPORT void imcb_ask_auth( struct im_connection *ic, const char *handle, const char *realname ); 271 G_MODULE_EXPORT void imcb_ask_add( struct im_connection *ic, const char *handle, const char *realname ); 259 G_MODULE_EXPORT void imcb_ask_add( struct im_connection *ic, char *handle, const char *realname ); 272 260 273 261 /* Buddy management */ … … 275 263 * user, usually after a login, or if the user added a buddy and the IM 276 264 * server confirms that the add was successful. Don't forget to do this! */ 277 G_MODULE_EXPORT void imcb_add_buddy( struct im_connection *ic, c har *handle,char *group );278 G_MODULE_EXPORT void imcb_remove_buddy( struct im_connection *ic, c har *handle, char *group );265 G_MODULE_EXPORT void imcb_add_buddy( struct im_connection *ic, const char *handle, const char *group ); 266 G_MODULE_EXPORT void imcb_remove_buddy( struct im_connection *ic, const char *handle, char *group ); 279 267 G_MODULE_EXPORT struct buddy *imcb_find_buddy( struct im_connection *ic, char *handle ); 280 G_MODULE_EXPORT void imcb_rename_buddy( struct im_connection *ic, c har *handle,char *realname );268 G_MODULE_EXPORT void imcb_rename_buddy( struct im_connection *ic, const char *handle, const char *realname ); 281 269 G_MODULE_EXPORT void imcb_buddy_nick_hint( struct im_connection *ic, char *handle, char *nick ); 282 270 … … 289 277 /* Not implemented yet! */ G_MODULE_EXPORT void imcb_buddy_times( struct im_connection *ic, const char *handle, time_t login, time_t idle ); 290 278 /* Call when a handle says something. 'flags' and 'sent_at may be just 0. */ 291 G_MODULE_EXPORT void imcb_buddy_msg( struct im_connection *ic, c har *handle, char *msg, uint32_t flags, time_t sent_at );279 G_MODULE_EXPORT void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, uint32_t flags, time_t sent_at ); 292 280 G_MODULE_EXPORT void imcb_buddy_typing( struct im_connection *ic, char *handle, uint32_t flags ); 293 281 G_MODULE_EXPORT void imcb_clean_handle( struct im_connection *ic, char *handle ); … … 302 290 * user, too. */ 303 291 G_MODULE_EXPORT struct groupchat *imcb_chat_new( struct im_connection *ic, const char *handle ); 304 G_MODULE_EXPORT void imcb_chat_add_buddy( struct groupchat *b, c har *handle );292 G_MODULE_EXPORT void imcb_chat_add_buddy( struct groupchat *b, const char *handle ); 305 293 /* To remove a handle from a group chat. Reason can be NULL. */ 306 G_MODULE_EXPORT void imcb_chat_remove_buddy( struct groupchat *b, c har *handle,char *reason );294 G_MODULE_EXPORT void imcb_chat_remove_buddy( struct groupchat *b, const char *handle, const char *reason ); 307 295 /* To tell BitlBee 'who' said 'msg' in 'c'. 'flags' and 'sent_at' can be 0. */ 308 G_MODULE_EXPORT void imcb_chat_msg( struct groupchat *c, c har *who, char *msg, uint32_t flags, time_t sent_at );296 G_MODULE_EXPORT void imcb_chat_msg( struct groupchat *c, const char *who, char *msg, uint32_t flags, time_t sent_at ); 309 297 /* System messages specific to a groupchat, so they can be displayed in the right context. */ 310 298 G_MODULE_EXPORT void imcb_chat_log( struct groupchat *c, char *format, ... ) G_GNUC_PRINTF( 2, 3 ); … … 314 302 315 303 /* Actions, or whatever. */ 316 int imc_ away_send_update( struct im_connection *ic);304 int imc_set_away( struct im_connection *ic, char *away ); 317 305 int imc_buddy_msg( struct im_connection *ic, char *handle, char *msg, int flags ); 318 306 int imc_chat_msg( struct groupchat *c, char *msg, int flags );
Note: See TracChangeset
for help on using the changeset viewer.