Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.h

    rd860a8d rc6ca3ee  
    22  * BitlBee -- An IRC to other IM-networks gateway                     *
    33  *                                                                    *
    4   * Copyright 2002-2010 Wilmer van der Gaast and others                *
     4  * Copyright 2002-2004 Wilmer van der Gaast and others                *
    55  \********************************************************************/
    66
     
    3939#define _NOGAIM_H
    4040
    41 #include <stdint.h>
    42 
    4341#include "bitlbee.h"
    4442#include "account.h"
    4543#include "proxy.h"
    4644#include "query.h"
    47 #include "md5.h"
    48 #include "ft.h"
    4945
    5046#define BUDDY_ALIAS_MAXLEN 388   /* because MSN names can be 387 characters */
    5147
    5248#define WEBSITE "http://www.bitlbee.org/"
     49#define GAIM_AWAY_CUSTOM "Custom"
    5350
    5451/* Sharing flags between all kinds of things. I just hope I won't hit any
     
    8784       
    8885        /* BitlBee */
    89         bee_t *bee;
     86        irc_t *irc;
    9087       
    9188        struct groupchat *groupchats;
     
    211208         * not implement this. */
    212209        struct groupchat *
    213              (* chat_join)      (struct im_connection *, const char *room, const char *nick, const char *password);
     210             (* chat_join)      (struct im_connection *, char *room, char *nick, char *password);
    214211        /* Change the topic, if supported. Note that BitlBee expects the IM
    215212           server to confirm the topic change with a regular topic change
     
    219216       
    220217        /* You can tell what away states your protocol supports, so that
    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". */
     218         * BitlBee will try to map the IRC away reasons to them, or use
     219         * GAIM_AWAY_CUSTOM when calling skype_set_away(). */
    223220        GList *(* away_states)(struct im_connection *ic);
    224221       
     
    226223         * - Most protocols will just want to set this to g_strcasecmp().*/
    227224        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 );
    235225};
    236226
     
    248238 * the account_t parameter. */
    249239G_MODULE_EXPORT struct im_connection *imcb_new( account_t *acc );
    250 G_MODULE_EXPORT void imc_free( struct im_connection *ic );
     240G_MODULE_EXPORT void imcb_free( struct im_connection *ic );
    251241/* Once you're connected, you should call this function, so that the user will
    252242 * see the success. */
     
    261251/* To tell the user an error, ie. before logging out when an error occurs. */
    262252G_MODULE_EXPORT void imcb_error( struct im_connection *ic, char *format, ... ) G_GNUC_PRINTF( 2, 3 );
    263 
    264253/* To ask a your about something.
    265254 * - 'msg' is the question.
     
    268257 */
    269258G_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 );
     259G_MODULE_EXPORT void imcb_ask_add( struct im_connection *ic, char *handle, const char *realname );
    277260
    278261/* Buddy management */
     
    284267G_MODULE_EXPORT struct buddy *imcb_find_buddy( struct im_connection *ic, char *handle );
    285268G_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 
     269G_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 */
     276G_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. */
     279G_MODULE_EXPORT void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, uint32_t flags, time_t sent_at );
    288280G_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 );
    290281G_MODULE_EXPORT void imcb_clean_handle( struct im_connection *ic, char *handle );
    291282
     
    311302
    312303/* Actions, or whatever. */
    313 int imc_away_send_update( struct im_connection *ic );
     304int imc_set_away( struct im_connection *ic, char *away );
     305int imc_buddy_msg( struct im_connection *ic, char *handle, char *msg, int flags );
    314306int imc_chat_msg( struct groupchat *c, char *msg, int flags );
    315307
Note: See TracChangeset for help on using the changeset viewer.