Changeset 0da65d5 for protocols/nogaim.h
- Timestamp:
- 2007-03-31T05:40:45Z (16 years ago)
- Branches:
- master
- Children:
- aef4828
- Parents:
- fa29d093
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.h
rfa29d093 r0da65d5 62 62 63 63 /* ok. now the fun begins. first we create a connection structure */ 64 struct gaim_connection64 struct im_connection 65 65 { 66 66 account_t *acc; … … 92 92 irc_t *irc; 93 93 94 struct conversation*conversations;94 struct groupchat *conversations; 95 95 }; 96 96 97 97 /* struct buddy_chat went away and got merged with this. */ 98 struct conversation{99 struct gaim_connection *gc;98 struct groupchat { 99 struct im_connection *ic; 100 100 101 101 /* stuff used just for chat */ … … 104 104 105 105 /* BitlBee */ 106 struct conversation*next;106 struct groupchat *next; 107 107 char *channel; 108 108 char *title; … … 121 121 guint caps; /* woohoo! */ 122 122 void *proto_data; /* what a hack */ 123 struct gaim_connection *gc; /* the connection it belongs to */123 struct im_connection *ic; /* the connection it belongs to */ 124 124 }; 125 125 … … 128 128 const char *name; 129 129 130 void (* acc_init) (account_t *); 130 /* Added this one to be able to add per-account settings, don't think 131 it should be used for anything else. */ 132 void (* init) (account_t *); 133 /* These should all be pretty obvious. */ 131 134 void (* login) (account_t *); 132 void (* keepalive) (struct gaim_connection *); 133 void (* close) (struct gaim_connection *); 134 135 int (* send_im) (struct gaim_connection *, char *who, char *message, int len, int away); 136 void (* set_away) (struct gaim_connection *, char *state, char *message); 137 void (* get_away) (struct gaim_connection *, char *who); 138 int (* send_typing) (struct gaim_connection *, char *who, int typing); 139 140 void (* add_buddy) (struct gaim_connection *, char *name); 141 void (* group_buddy) (struct gaim_connection *, char *who, char *old_group, char *new_group); 142 void (* remove_buddy) (struct gaim_connection *, char *name, char *group); 143 void (* add_permit) (struct gaim_connection *, char *name); 144 void (* add_deny) (struct gaim_connection *, char *name); 145 void (* rem_permit) (struct gaim_connection *, char *name); 146 void (* rem_deny) (struct gaim_connection *, char *name); 147 void (* set_permit_deny)(struct gaim_connection *); 148 149 void (* set_info) (struct gaim_connection *, char *info); 150 void (* get_info) (struct gaim_connection *, char *who); 151 void (* alias_buddy) (struct gaim_connection *, char *who); /* save/store buddy's alias on server list/roster */ 135 void (* keepalive) (struct im_connection *); 136 void (* logout) (struct im_connection *); 137 138 int (* send_im) (struct im_connection *, char *to, char *message, int flags); 139 void (* set_away) (struct im_connection *, char *state, char *message); 140 void (* get_away) (struct im_connection *, char *who); 141 int (* send_typing) (struct im_connection *, char *who, int typing); 142 143 /* For now BitlBee doesn't really handle groups, just set it to NULL. */ 144 void (* add_buddy) (struct im_connection *, char *name, char *group); 145 void (* remove_buddy) (struct im_connection *, char *name, char *group); 146 147 /* Block list stuff. */ 148 void (* add_permit) (struct im_connection *, char *who); 149 void (* add_deny) (struct im_connection *, char *who); 150 void (* rem_permit) (struct im_connection *, char *who); 151 void (* rem_deny) (struct im_connection *, char *who); 152 /* Doesn't actually have UI hooks. */ 153 void (* set_permit_deny)(struct im_connection *); 154 155 /* Request profile info. Free-formatted stuff, the IM module gives back 156 this info via imc_log(). */ 157 void (* get_info) (struct im_connection *, char *who); 158 void (* set_my_name) (struct im_connection *, char *name); 159 void (* set_name) (struct im_connection *, char *who, char *name); 152 160 153 161 /* Group chat stuff. */ 154 void (* chat_invite) (struct conversation*, char *who, char *message);155 void (* chat_leave) (struct conversation*);156 int (* chat_send) (struct conversation *, char *message);157 struct conversation*158 (* chat_ open) (struct gaim_connection *, char *who);159 struct conversation*160 (* chat_join) (struct gaim_connection *, char *chat, char *nick, char *password);162 void (* chat_invite) (struct groupchat *, char *who, char *message); 163 void (* chat_leave) (struct groupchat *); 164 void (* chat_send) (struct groupchat *, char *message, int flags); 165 struct groupchat * 166 (* chat_with) (struct im_connection *, char *who); 167 struct groupchat * 168 (* chat_join) (struct im_connection *, char *chat, char *nick, char *password); 161 169 162 170 /* DIE! */ 163 char *(* get_status_string) (struct gaim_connection *gc, int stat);164 165 GList *(* away_states)(struct gaim_connection *gc);171 char *(* get_status_string) (struct im_connection *ic, int stat); 172 173 GList *(* away_states)(struct im_connection *ic); 166 174 167 175 /* Mainly for AOL, since they think "Bung hole" == "Bu ngho le". *sigh* */ … … 182 190 183 191 /* nogaim.c */ 184 int bim_set_away( struct gaim_connection *gc, char *away );185 int bim_buddy_msg( struct gaim_connection *gc, char *handle, char *msg, int flags );186 int bim_chat_msg( struct conversation *c, char *msg);187 188 void bim_add_allow( struct gaim_connection *gc, char *handle );189 void bim_rem_allow( struct gaim_connection *gc, char *handle );190 void bim_add_block( struct gaim_connection *gc, char *handle );191 void bim_rem_block( struct gaim_connection *gc, char *handle );192 int bim_set_away( struct im_connection *ic, char *away ); 193 int bim_buddy_msg( struct im_connection *ic, char *handle, char *msg, int flags ); 194 int bim_chat_msg( struct groupchat *c, char *msg, int flags ); 195 196 void bim_add_allow( struct im_connection *ic, char *handle ); 197 void bim_rem_allow( struct im_connection *ic, char *handle ); 198 void bim_add_block( struct im_connection *ic, char *handle ); 199 void bim_rem_block( struct im_connection *ic, char *handle ); 192 200 193 201 void nogaim_init(); … … 198 206 199 207 /* multi.c */ 200 G_MODULE_EXPORT struct gaim_connection *new_gaim_conn( account_t *acc );201 G_MODULE_EXPORT void destroy_gaim_conn( struct gaim_connection *gc );202 G_MODULE_EXPORT void set_login_progress( struct gaim_connection *gc, int step, char *msg );203 G_MODULE_EXPORT void hide_login_progress( struct gaim_connection *gc, char *msg );204 G_MODULE_EXPORT void hide_login_progress_error( struct gaim_connection *gc, char *msg );205 G_MODULE_EXPORT void serv_got_crap( struct gaim_connection *gc, char *format, ... ) G_GNUC_PRINTF( 2, 3 );206 G_MODULE_EXPORT void account_online( struct gaim_connection *gc );207 G_MODULE_EXPORT void signoff( struct gaim_connection *gc );208 G_MODULE_EXPORT struct im_connection *new_gaim_conn( account_t *acc ); 209 G_MODULE_EXPORT void destroy_gaim_conn( struct im_connection *ic ); 210 G_MODULE_EXPORT void set_login_progress( struct im_connection *ic, int step, char *msg ); 211 G_MODULE_EXPORT void hide_login_progress( struct im_connection *ic, char *msg ); 212 G_MODULE_EXPORT void hide_login_progress_error( struct im_connection *ic, char *msg ); 213 G_MODULE_EXPORT void serv_got_crap( struct im_connection *ic, char *format, ... ) G_GNUC_PRINTF( 2, 3 ); 214 G_MODULE_EXPORT void account_online( struct im_connection *ic ); 215 G_MODULE_EXPORT void signoff( struct im_connection *ic ); 208 216 209 217 /* dialogs.c */ 210 G_MODULE_EXPORT void do_error_dialog( struct gaim_connection *gc, char *msg, char *title );211 G_MODULE_EXPORT void do_ask_dialog( struct gaim_connection *gc, char *msg, void *data, void *doit, void *dont );218 G_MODULE_EXPORT void do_error_dialog( struct im_connection *ic, char *msg, char *title ); 219 G_MODULE_EXPORT void do_ask_dialog( struct im_connection *ic, char *msg, void *data, void *doit, void *dont ); 212 220 213 221 /* list.c */ 214 G_MODULE_EXPORT void add_buddy( struct gaim_connection *gc, char *group, char *handle, char *realname );215 G_MODULE_EXPORT struct buddy *find_buddy( struct gaim_connection *gc, char *handle );216 G_MODULE_EXPORT void signoff_blocked( struct gaim_connection *gc );217 218 G_MODULE_EXPORT void serv_buddy_rename( struct gaim_connection *gc, char *handle, char *realname );222 G_MODULE_EXPORT void add_buddy( struct im_connection *ic, char *group, char *handle, char *realname ); 223 G_MODULE_EXPORT struct buddy *find_buddy( struct im_connection *ic, char *handle ); 224 G_MODULE_EXPORT void signoff_blocked( struct im_connection *ic ); 225 226 G_MODULE_EXPORT void serv_buddy_rename( struct im_connection *ic, char *handle, char *realname ); 219 227 220 228 /* buddy_chat.c */ 221 G_MODULE_EXPORT void add_chat_buddy( struct conversation*b, char *handle );222 G_MODULE_EXPORT void remove_chat_buddy( struct conversation*b, char *handle, char *reason );229 G_MODULE_EXPORT void add_chat_buddy( struct groupchat *b, char *handle ); 230 G_MODULE_EXPORT void remove_chat_buddy( struct groupchat *b, char *handle, char *reason ); 223 231 224 232 /* prpl.c */ 225 G_MODULE_EXPORT void show_got_added( struct gaim_connection *gc, char *handle, const char *realname );233 G_MODULE_EXPORT void show_got_added( struct im_connection *ic, char *handle, const char *realname ); 226 234 227 235 /* server.c */ 228 G_MODULE_EXPORT void serv_got_update( struct gaim_connection *gc, char *handle, int loggedin, int evil, time_t signon, time_t idle, int type, guint caps );229 G_MODULE_EXPORT void serv_got_im( struct gaim_connection *gc, char *handle, char *msg, guint32 flags, time_t mtime, gint len );230 G_MODULE_EXPORT void serv_got_typing( struct gaim_connection *gc, char *handle, int timeout, int type );231 G_MODULE_EXPORT void serv_got_chat_invite( struct gaim_connection *gc, char *handle, char *who, char *msg, GList *data );232 G_MODULE_EXPORT struct conversation *serv_got_joined_chat( struct gaim_connection *gc, char *handle );233 G_MODULE_EXPORT void serv_got_chat_in( struct conversation*c, char *who, int whisper, char *msg, time_t mtime );234 G_MODULE_EXPORT void serv_got_chat_left( struct conversation*c );235 236 struct conversation*chat_by_channel( char *channel );237 struct conversation*chat_by_id( int id );236 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 ); 237 G_MODULE_EXPORT void serv_got_im( struct im_connection *ic, char *handle, char *msg, guint32 flags, time_t mtime, gint len ); 238 G_MODULE_EXPORT void serv_got_typing( struct im_connection *ic, char *handle, int timeout, int type ); 239 G_MODULE_EXPORT void serv_got_chat_invite( struct im_connection *ic, char *handle, char *who, char *msg, GList *data ); 240 G_MODULE_EXPORT struct groupchat *serv_got_joined_chat( struct im_connection *ic, char *handle ); 241 G_MODULE_EXPORT void serv_got_chat_in( struct groupchat *c, char *who, int whisper, char *msg, time_t mtime ); 242 G_MODULE_EXPORT void serv_got_chat_left( struct groupchat *c ); 243 244 struct groupchat *chat_by_channel( char *channel ); 245 struct groupchat *chat_by_id( int id ); 238 246 239 247 #endif
Note: See TracChangeset
for help on using the changeset viewer.