Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.h

    rc6ca3ee rfa295e36  
    4343#include "proxy.h"
    4444#include "query.h"
     45#include "md5.h"
    4546
    4647#define BUDDY_ALIAS_MAXLEN 388   /* because MSN names can be 387 characters */
     
    208209         * not implement this. */
    209210        struct groupchat *
    210              (* chat_join)      (struct im_connection *, char *room, char *nick, char *password);
     211             (* chat_join)      (struct im_connection *, const char *room, const char *nick, const char *password);
    211212        /* Change the topic, if supported. Note that BitlBee expects the IM
    212213           server to confirm the topic change with a regular topic change
     
    223224         * - Most protocols will just want to set this to g_strcasecmp().*/
    224225        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);
    225230};
    226231
     
    238243 * the account_t parameter. */
    239244G_MODULE_EXPORT struct im_connection *imcb_new( account_t *acc );
    240 G_MODULE_EXPORT void imcb_free( struct im_connection *ic );
     245G_MODULE_EXPORT void imc_free( struct im_connection *ic );
    241246/* Once you're connected, you should call this function, so that the user will
    242247 * see the success. */
     
    251256/* To tell the user an error, ie. before logging out when an error occurs. */
    252257G_MODULE_EXPORT void imcb_error( struct im_connection *ic, char *format, ... ) G_GNUC_PRINTF( 2, 3 );
     258
    253259/* To ask a your about something.
    254260 * - 'msg' is the question.
     
    257263 */
    258264G_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 );
     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 */
     270G_MODULE_EXPORT void imcb_ask_auth( struct im_connection *ic, const char *handle, const char *realname );
     271G_MODULE_EXPORT void imcb_ask_add( struct im_connection *ic, const char *handle, const char *realname );
    260272
    261273/* Buddy management */
     
    263275 * user, usually after a login, or if the user added a buddy and the IM
    264276 * server confirms that the add was successful. Don't forget to do this! */
    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 );
     277G_MODULE_EXPORT void imcb_add_buddy( struct im_connection *ic, char *handle, char *group );
     278G_MODULE_EXPORT void imcb_remove_buddy( struct im_connection *ic, char *handle, char *group );
    267279G_MODULE_EXPORT struct buddy *imcb_find_buddy( struct im_connection *ic, char *handle );
    268 G_MODULE_EXPORT void imcb_rename_buddy( struct im_connection *ic, const char *handle, const char *realname );
     280G_MODULE_EXPORT void imcb_rename_buddy( struct im_connection *ic, char *handle, char *realname );
    269281G_MODULE_EXPORT void imcb_buddy_nick_hint( struct im_connection *ic, char *handle, char *nick );
    270282
     
    277289/* Not implemented yet! */ G_MODULE_EXPORT void imcb_buddy_times( struct im_connection *ic, const char *handle, time_t login, time_t idle );
    278290/* 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 );
     291G_MODULE_EXPORT void imcb_buddy_msg( struct im_connection *ic, char *handle, char *msg, uint32_t flags, time_t sent_at );
    280292G_MODULE_EXPORT void imcb_buddy_typing( struct im_connection *ic, char *handle, uint32_t flags );
    281293G_MODULE_EXPORT void imcb_clean_handle( struct im_connection *ic, char *handle );
     
    290302 *   user, too. */
    291303G_MODULE_EXPORT struct groupchat *imcb_chat_new( struct im_connection *ic, const char *handle );
    292 G_MODULE_EXPORT void imcb_chat_add_buddy( struct groupchat *b, const char *handle );
     304G_MODULE_EXPORT void imcb_chat_add_buddy( struct groupchat *b, char *handle );
    293305/* To remove a handle from a group chat. Reason can be NULL. */
    294 G_MODULE_EXPORT void imcb_chat_remove_buddy( struct groupchat *b, const char *handle, const char *reason );
     306G_MODULE_EXPORT void imcb_chat_remove_buddy( struct groupchat *b, char *handle, char *reason );
    295307/* To tell BitlBee 'who' said 'msg' in 'c'. 'flags' and 'sent_at' can be 0. */
    296 G_MODULE_EXPORT void imcb_chat_msg( struct groupchat *c, const char *who, char *msg, uint32_t flags, time_t sent_at );
     308G_MODULE_EXPORT void imcb_chat_msg( struct groupchat *c, char *who, char *msg, uint32_t flags, time_t sent_at );
    297309/* System messages specific to a groupchat, so they can be displayed in the right context. */
    298310G_MODULE_EXPORT void imcb_chat_log( struct groupchat *c, char *format, ... ) G_GNUC_PRINTF( 2, 3 );
Note: See TracChangeset for help on using the changeset viewer.