Changes in protocols/nogaim.h [c6ca3ee:d860a8d]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.h
rc6ca3ee rd860a8d 2 2 * BitlBee -- An IRC to other IM-networks gateway * 3 3 * * 4 * Copyright 2002-20 04Wilmer van der Gaast and others *4 * Copyright 2002-2010 Wilmer van der Gaast and others * 5 5 \********************************************************************/ 6 6 … … 39 39 #define _NOGAIM_H 40 40 41 #include <stdint.h> 42 41 43 #include "bitlbee.h" 42 44 #include "account.h" 43 45 #include "proxy.h" 44 46 #include "query.h" 47 #include "md5.h" 48 #include "ft.h" 45 49 46 50 #define BUDDY_ALIAS_MAXLEN 388 /* because MSN names can be 387 characters */ 47 51 48 52 #define WEBSITE "http://www.bitlbee.org/" 49 #define GAIM_AWAY_CUSTOM "Custom"50 53 51 54 /* Sharing flags between all kinds of things. I just hope I won't hit any … … 84 87 85 88 /* BitlBee */ 86 irc_t *irc;89 bee_t *bee; 87 90 88 91 struct groupchat *groupchats; … … 208 211 * not implement this. */ 209 212 struct groupchat * 210 (* chat_join) (struct im_connection *, c har *room, char *nick,char *password);213 (* chat_join) (struct im_connection *, const char *room, const char *nick, const char *password); 211 214 /* Change the topic, if supported. Note that BitlBee expects the IM 212 215 server to confirm the topic change with a regular topic change … … 216 219 217 220 /* You can tell what away states your protocol supports, so that 218 * BitlBee will try to map the IRC away reasons to them , or use219 * GAIM_AWAY_CUSTOM when calling skype_set_away(). */221 * BitlBee will try to map the IRC away reasons to them. If your 222 * protocol doesn't have any, just return one generic "Away". */ 220 223 GList *(* away_states)(struct im_connection *ic); 221 224 … … 223 226 * - Most protocols will just want to set this to g_strcasecmp().*/ 224 227 int (* handle_cmp) (const char *who1, const char *who2); 228 229 /* Implement these callbacks if you want to use imcb_ask_auth() */ 230 void (* auth_allow) (struct im_connection *, const char *who); 231 void (* auth_deny) (struct im_connection *, const char *who); 232 233 /* Incoming transfer request */ 234 void (* transfer_request) (struct im_connection *, file_transfer_t *ft, char *handle ); 225 235 }; 226 236 … … 238 248 * the account_t parameter. */ 239 249 G_MODULE_EXPORT struct im_connection *imcb_new( account_t *acc ); 240 G_MODULE_EXPORT void imc b_free( struct im_connection *ic );250 G_MODULE_EXPORT void imc_free( struct im_connection *ic ); 241 251 /* Once you're connected, you should call this function, so that the user will 242 252 * see the success. */ … … 251 261 /* To tell the user an error, ie. before logging out when an error occurs. */ 252 262 G_MODULE_EXPORT void imcb_error( struct im_connection *ic, char *format, ... ) G_GNUC_PRINTF( 2, 3 ); 263 253 264 /* To ask a your about something. 254 265 * - 'msg' is the question. … … 257 268 */ 258 269 G_MODULE_EXPORT void imcb_ask( struct im_connection *ic, char *msg, void *data, query_callback doit, query_callback dont ); 259 G_MODULE_EXPORT void imcb_ask_add( struct im_connection *ic, char *handle, const char *realname ); 270 271 /* Two common questions you may want to ask: 272 * - X added you to his contact list, allow? 273 * - X is not in your contact list, want to add? 274 */ 275 G_MODULE_EXPORT void imcb_ask_auth( struct im_connection *ic, const char *handle, const char *realname ); 276 G_MODULE_EXPORT void imcb_ask_add( struct im_connection *ic, const char *handle, const char *realname ); 260 277 261 278 /* Buddy management */ … … 267 284 G_MODULE_EXPORT struct buddy *imcb_find_buddy( struct im_connection *ic, char *handle ); 268 285 G_MODULE_EXPORT void imcb_rename_buddy( struct im_connection *ic, const char *handle, const char *realname ); 269 G_MODULE_EXPORT void imcb_buddy_nick_hint( struct im_connection *ic, char *handle, char *nick ); 270 271 /* Buddy activity */ 272 /* To manipulate the status of a handle. 273 * - flags can be |='d with OPT_* constants. You will need at least: 274 * OPT_LOGGED_IN and OPT_AWAY. 275 * - 'state' and 'message' can be NULL */ 276 G_MODULE_EXPORT void imcb_buddy_status( struct im_connection *ic, const char *handle, int flags, const char *state, const char *message ); 277 /* Not implemented yet! */ G_MODULE_EXPORT void imcb_buddy_times( struct im_connection *ic, const char *handle, time_t login, time_t idle ); 278 /* Call when a handle says something. 'flags' and 'sent_at may be just 0. */ 279 G_MODULE_EXPORT void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, uint32_t flags, time_t sent_at ); 286 G_MODULE_EXPORT void imcb_buddy_nick_hint( struct im_connection *ic, const char *handle, const char *nick ); 287 280 288 G_MODULE_EXPORT void imcb_buddy_typing( struct im_connection *ic, char *handle, uint32_t flags ); 289 G_MODULE_EXPORT struct bee_user *imcb_buddy_by_handle( struct im_connection *ic, const char *handle ); 281 290 G_MODULE_EXPORT void imcb_clean_handle( struct im_connection *ic, char *handle ); 282 291 … … 302 311 303 312 /* Actions, or whatever. */ 304 int imc_set_away( struct im_connection *ic, char *away ); 305 int imc_buddy_msg( struct im_connection *ic, char *handle, char *msg, int flags ); 313 int imc_away_send_update( struct im_connection *ic ); 306 314 int imc_chat_msg( struct groupchat *c, char *msg, int flags ); 307 315
Note: See TracChangeset
for help on using the changeset viewer.