Changes in protocols/nogaim.h [d860a8d:c6ca3ee]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.h
rd860a8d rc6ca3ee 2 2 * BitlBee -- An IRC to other IM-networks gateway * 3 3 * * 4 * Copyright 2002-20 10Wilmer van der Gaast and others *4 * Copyright 2002-2004 Wilmer van der Gaast and others * 5 5 \********************************************************************/ 6 6 … … 39 39 #define _NOGAIM_H 40 40 41 #include <stdint.h>42 43 41 #include "bitlbee.h" 44 42 #include "account.h" 45 43 #include "proxy.h" 46 44 #include "query.h" 47 #include "md5.h"48 #include "ft.h"49 45 50 46 #define BUDDY_ALIAS_MAXLEN 388 /* because MSN names can be 387 characters */ 51 47 52 48 #define WEBSITE "http://www.bitlbee.org/" 49 #define GAIM_AWAY_CUSTOM "Custom" 53 50 54 51 /* Sharing flags between all kinds of things. I just hope I won't hit any … … 87 84 88 85 /* BitlBee */ 89 bee_t *bee;86 irc_t *irc; 90 87 91 88 struct groupchat *groupchats; … … 211 208 * not implement this. */ 212 209 struct groupchat * 213 (* 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); 214 211 /* Change the topic, if supported. Note that BitlBee expects the IM 215 212 server to confirm the topic change with a regular topic change … … 219 216 220 217 /* You can tell what away states your protocol supports, so that 221 * BitlBee will try to map the IRC away reasons to them . If your222 * 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(). */ 223 220 GList *(* away_states)(struct im_connection *ic); 224 221 … … 226 223 * - Most protocols will just want to set this to g_strcasecmp().*/ 227 224 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 );235 225 }; 236 226 … … 248 238 * the account_t parameter. */ 249 239 G_MODULE_EXPORT struct im_connection *imcb_new( account_t *acc ); 250 G_MODULE_EXPORT void imc _free( struct im_connection *ic );240 G_MODULE_EXPORT void imcb_free( struct im_connection *ic ); 251 241 /* Once you're connected, you should call this function, so that the user will 252 242 * see the success. */ … … 261 251 /* To tell the user an error, ie. before logging out when an error occurs. */ 262 252 G_MODULE_EXPORT void imcb_error( struct im_connection *ic, char *format, ... ) G_GNUC_PRINTF( 2, 3 ); 263 264 253 /* To ask a your about something. 265 254 * - 'msg' is the question. … … 268 257 */ 269 258 G_MODULE_EXPORT void imcb_ask( struct im_connection *ic, char *msg, void *data, query_callback doit, query_callback dont ); 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 ); 259 G_MODULE_EXPORT void imcb_ask_add( struct im_connection *ic, char *handle, const char *realname ); 277 260 278 261 /* Buddy management */ … … 284 267 G_MODULE_EXPORT struct buddy *imcb_find_buddy( struct im_connection *ic, char *handle ); 285 268 G_MODULE_EXPORT void imcb_rename_buddy( struct im_connection *ic, const char *handle, const char *realname ); 286 G_MODULE_EXPORT void imcb_buddy_nick_hint( struct im_connection *ic, const char *handle, const char *nick ); 287 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 ); 288 280 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 );290 281 G_MODULE_EXPORT void imcb_clean_handle( struct im_connection *ic, char *handle ); 291 282 … … 311 302 312 303 /* Actions, or whatever. */ 313 int imc_away_send_update( struct im_connection *ic ); 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 ); 314 306 int imc_chat_msg( struct groupchat *c, char *msg, int flags ); 315 307
Note: See TracChangeset
for help on using the changeset viewer.