Changeset 84b045d for protocols/nogaim.h


Ignore:
Timestamp:
2007-04-16T01:03:08Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
6bbb939
Parents:
c2fb3809
Message:

s/imc/imcb/ for callback functions. Moved things aroundin nogaim.h a
little bit, grouping things by category instead of original Gaim 0.58
filename.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.h

    rc2fb3809 r84b045d  
    150150       
    151151        /* Request profile info. Free-formatted stuff, the IM module gives back
    152            this info via imc_log(). */
     152           this info via imcb_log(). */
    153153        void (* get_info)       (struct im_connection *, char *who);
    154154        void (* set_my_name)    (struct im_connection *, char *name);
     
    175175#define UC_UNAVAILABLE  1
    176176
    177 /* JABBER */
    178 #define UC_AWAY (0x02 | UC_UNAVAILABLE)
    179 #define UC_CHAT  0x04
    180 #define UC_XA   (0x08 | UC_UNAVAILABLE)
    181 #define UC_DND  (0x10 | UC_UNAVAILABLE)
    182 
     177/* im_api core stuff. */
     178void nogaim_init();
    183179G_MODULE_EXPORT GSList *get_connections();
    184180G_MODULE_EXPORT struct prpl *find_protocol(const char *name);
    185181G_MODULE_EXPORT void register_protocol(struct prpl *);
    186182
    187 /* nogaim.c */
    188 int bim_set_away( struct im_connection *ic, char *away );
    189 int bim_buddy_msg( struct im_connection *ic, char *handle, char *msg, int flags );
    190 int bim_chat_msg( struct groupchat *c, char *msg, int flags );
    191 
    192 void bim_add_allow( struct im_connection *ic, char *handle );
    193 void bim_rem_allow( struct im_connection *ic, char *handle );
    194 void bim_add_block( struct im_connection *ic, char *handle );
    195 void bim_rem_block( struct im_connection *ic, char *handle );
    196 
    197 void nogaim_init();
    198 char *set_eval_away_devoice( set_t *set, char *value );
    199 
    200 gboolean auto_reconnect( gpointer data, gint fd, b_input_condition cond );
    201 void cancel_auto_reconnect( struct account *a );
    202 
    203 /* multi.c */
    204 G_MODULE_EXPORT struct im_connection *imc_new( account_t *acc );
    205 G_MODULE_EXPORT void imc_free( struct im_connection *ic );
    206 G_MODULE_EXPORT void imc_log( struct im_connection *ic, char *format, ... );
    207 G_MODULE_EXPORT void imc_error( struct im_connection *ic, char *format, ... );
    208 G_MODULE_EXPORT void imc_connected( struct im_connection *ic );
     183/* Connection management. */
     184G_MODULE_EXPORT struct im_connection *imcb_new( account_t *acc );
     185G_MODULE_EXPORT void imcb_free( struct im_connection *ic );
     186G_MODULE_EXPORT void imcb_connected( struct im_connection *ic );
    209187G_MODULE_EXPORT void imc_logout( struct im_connection *ic, int allow_reconnect );
    210188
    211 /* dialogs.c */
    212 G_MODULE_EXPORT void do_ask_dialog( struct im_connection *ic, char *msg, void *data, void *doit, void *dont );
    213 
    214 /* list.c */
    215 G_MODULE_EXPORT void add_buddy( struct im_connection *ic, char *group, char *handle, char *realname );
    216 G_MODULE_EXPORT struct buddy *find_buddy( struct im_connection *ic, char *handle );
    217 G_MODULE_EXPORT void signoff_blocked( struct im_connection *ic );
    218 
    219 G_MODULE_EXPORT void serv_buddy_rename( struct im_connection *ic, char *handle, char *realname );
    220 
    221 /* buddy_chat.c */
     189/* Communicating with the user. */
     190G_MODULE_EXPORT void imcb_log( struct im_connection *ic, char *format, ... );
     191G_MODULE_EXPORT void imcb_error( struct im_connection *ic, char *format, ... );
     192G_MODULE_EXPORT void imcb_ask( struct im_connection *ic, char *msg, void *data, void *doit, void *dont );
     193G_MODULE_EXPORT void imcb_ask_add( struct im_connection *ic, char *handle, const char *realname );
     194
     195/* Groupchats */
    222196G_MODULE_EXPORT void add_chat_buddy( struct groupchat *b, char *handle );
    223197G_MODULE_EXPORT void remove_chat_buddy( struct groupchat *b, char *handle, char *reason );
    224 
    225 /* prpl.c */
    226 G_MODULE_EXPORT void show_got_added( struct im_connection *ic, char *handle, const char *realname );
    227 
    228 /* server.c */
    229 G_MODULE_EXPORT void serv_got_update( struct im_connection *ic, char *handle, int loggedin, int evil, time_t signon, time_t idle, int type, guint caps );
    230 G_MODULE_EXPORT void serv_got_im( struct im_connection *ic, char *handle, char *msg, guint32 flags, time_t mtime, gint len );
    231 G_MODULE_EXPORT void serv_got_typing( struct im_connection *ic, char *handle, int timeout, int type );
    232198G_MODULE_EXPORT void serv_got_chat_invite( struct im_connection *ic, char *handle, char *who, char *msg, GList *data );
    233199G_MODULE_EXPORT struct groupchat *serv_got_joined_chat( struct im_connection *ic, char *handle );
    234200G_MODULE_EXPORT void serv_got_chat_in( struct groupchat *c, char *who, int whisper, char *msg, time_t mtime );
    235201G_MODULE_EXPORT void serv_got_chat_left( struct groupchat *c );
    236 
    237202struct groupchat *chat_by_channel( char *channel );
    238203struct groupchat *chat_by_id( int id );
    239204
     205/* Buddy management */
     206G_MODULE_EXPORT void add_buddy( struct im_connection *ic, char *group, char *handle, char *realname );
     207G_MODULE_EXPORT struct buddy *find_buddy( struct im_connection *ic, char *handle );
     208G_MODULE_EXPORT void serv_buddy_rename( struct im_connection *ic, char *handle, char *realname );
     209
     210/* Buddy activity */
     211G_MODULE_EXPORT void serv_got_update( struct im_connection *ic, char *handle, int loggedin, int evil, time_t signon, time_t idle, int type, guint caps );
     212G_MODULE_EXPORT void serv_got_im( struct im_connection *ic, char *handle, char *msg, guint32 flags, time_t mtime, gint len );
     213G_MODULE_EXPORT void serv_got_typing( struct im_connection *ic, char *handle, int timeout, int type );
     214
     215/* Actions, or whatever. */
     216int imc_set_away( struct im_connection *ic, char *away );
     217int imc_buddy_msg( struct im_connection *ic, char *handle, char *msg, int flags );
     218int imc_chat_msg( struct groupchat *c, char *msg, int flags );
     219
     220void imc_add_allow( struct im_connection *ic, char *handle );
     221void imc_rem_allow( struct im_connection *ic, char *handle );
     222void imc_add_block( struct im_connection *ic, char *handle );
     223void imc_rem_block( struct im_connection *ic, char *handle );
     224
     225/* Misc. stuff */
     226char *set_eval_away_devoice( set_t *set, char *value );
     227gboolean auto_reconnect( gpointer data, gint fd, b_input_condition cond );
     228void cancel_auto_reconnect( struct account *a );
     229
    240230#endif
Note: See TracChangeset for help on using the changeset viewer.