Changeset 601e813 for protocols/nogaim.h
- Timestamp:
- 2006-05-24T23:04:18Z (18 years ago)
- Branches:
- master
- Children:
- 80c1e4d
- Parents:
- 46ad029 (diff), fc630f9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.h
r46ad029 r601e813 15 15 * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net> 16 16 * (and possibly other members of the Gaim team) 17 * Copyright 2002-2004 Wilmer van der Gaast < lintux@lintux.cx>17 * Copyright 2002-2004 Wilmer van der Gaast <wilmer@gaast.net> 18 18 */ 19 19 … … 52 52 #define BUDDY_ALIAS_MAXLEN 388 /* because MSN names can be 387 characters */ 53 53 54 #define PERMIT_ALL 155 #define PERMIT_NONE 256 #define PERMIT_SOME 357 #define DENY_SOME 458 59 54 #define WEBSITE "http://www.bitlee.org/" 60 55 #define IM_FLAG_AWAY 0x0020 … … 63 58 #define GAIM_AWAY_CUSTOM "Custom" 64 59 65 #define GAIM_LOGO 066 #define GAIM_ERROR 167 #define GAIM_WARNING 268 #define GAIM_INFO 369 70 60 /* ok. now the fun begins. first we create a connection structure */ 71 struct gaim_connection { 72 /* we need to do either oscar or TOC */ 73 /* we make this as an int in case if we want to add more protocols later */ 61 struct gaim_connection 62 { 74 63 struct prpl *prpl; 75 64 guint32 flags; 76 65 66 /* each connection then can have its own protocol-specific data */ 67 void *proto_data; 68 77 69 /* all connections need an input watcher */ 78 70 int inpa; 71 guint keepalive; 79 72 80 73 /* buddy list stuff. there is still a global groups for the buddy list, but … … 84 77 int permdeny; 85 78 86 /* all connections need a list of chats, even if they don't have chat */87 GSList *buddy_chats;88 89 /* each connection then can have its own protocol-specific data */90 void *proto_data;91 92 79 struct aim_user *user; 93 80 … … 95 82 char displayname[128]; 96 83 char password[32]; 97 guint keepalive;98 /* stuff needed for per-connection idle times */99 guint idle_timer;100 time_t login_time;101 time_t lastsent;102 int is_idle;103 84 104 85 char *away; 105 int is_auto_away;106 86 107 87 int evil; … … 110 90 /* BitlBee */ 111 91 irc_t *irc; 112 int lstitems; /* added for msnP8 */113 92 114 93 struct conversation *conversations; … … 183 162 const char *name; 184 163 185 /* for ICQ and Yahoo, who have off/on per-conversation options */186 /* char *checkbox; this should be per-connection */187 188 GList *(* away_states)(struct gaim_connection *gc);189 GList *(* actions)();190 void (* do_action)(struct gaim_connection *, char *);191 /* user_opts returns a GList* of g_malloc'd struct proto_user_opts */192 GList *(* user_opts)();193 GList *(* chat_info)(struct gaim_connection *);194 195 /* all the server-related functions */196 197 /* a lot of these (like get_dir) are protocol-dependent and should be removed. ones like198 * set_dir (which is also protocol-dependent) can stay though because there's a dialog199 * (i.e. the prpl says you can set your dir info, the ui shows a dialog and needs to call200 * set_dir in order to set it) */201 202 164 void (* login) (struct aim_user *); 165 void (* keepalive) (struct gaim_connection *); 203 166 void (* close) (struct gaim_connection *); 167 204 168 int (* send_im) (struct gaim_connection *, char *who, char *message, int len, int away); 205 int (* send_typing) (struct gaim_connection *, char *who, int typing);206 void (* set_info) (struct gaim_connection *, char *info);207 void (* get_info) (struct gaim_connection *, char *who);208 169 void (* set_away) (struct gaim_connection *, char *state, char *message); 209 170 void (* get_away) (struct gaim_connection *, char *who); 210 void (* set_idle) (struct gaim_connection *, int idletime); 171 int (* send_typing) (struct gaim_connection *, char *who, int typing); 172 211 173 void (* add_buddy) (struct gaim_connection *, char *name); 174 void (* group_buddy) (struct gaim_connection *, char *who, char *old_group, char *new_group); 212 175 void (* remove_buddy) (struct gaim_connection *, char *name, char *group); 213 176 void (* add_permit) (struct gaim_connection *, char *name); … … 216 179 void (* rem_deny) (struct gaim_connection *, char *name); 217 180 void (* set_permit_deny)(struct gaim_connection *); 181 182 void (* set_info) (struct gaim_connection *, char *info); 183 void (* get_info) (struct gaim_connection *, char *who); 184 void (* alias_buddy) (struct gaim_connection *, char *who); /* save/store buddy's alias on server list/roster */ 185 186 /* Group chat stuff. */ 218 187 void (* join_chat) (struct gaim_connection *, GList *data); 219 188 void (* chat_invite) (struct gaim_connection *, int id, char *who, char *message); 220 189 void (* chat_leave) (struct gaim_connection *, int id); 221 void (* chat_whisper) (struct gaim_connection *, int id, char *who, char *message);222 190 int (* chat_send) (struct gaim_connection *, int id, char *message); 223 191 int (* chat_open) (struct gaim_connection *, char *who); 224 void (* keepalive) (struct gaim_connection *); 225 226 /* get "chat buddy" info and away message */ 227 void (* get_cb_info) (struct gaim_connection *, int, char *who); 228 void (* get_cb_away) (struct gaim_connection *, int, char *who); 229 230 /* save/store buddy's alias on server list/roster */ 231 void (* alias_buddy) (struct gaim_connection *, char *who); 232 233 /* change a buddy's group on a server list/roster */ 234 void (* group_buddy) (struct gaim_connection *, char *who, char *old_group, char *new_group); 235 236 /* file transfers */ 237 struct ft_send_req *(* req_send_file) (struct gaim_connection *, const char *file); 238 void (* send_file_part) (struct gaim_connection *, struct ft*, void *data, size_t length); 239 void (* accept_recv_file) (struct gaim_connection *, struct ft*, ft_recv_handler); 240 241 void (* buddy_free) (struct buddy *); 242 192 193 /* DIE! */ 243 194 char *(* get_status_string) (struct gaim_connection *gc, int stat); 244 195 196 GList *(* away_states)(struct gaim_connection *gc); 197 198 /* Mainly for AOL, since they think "Bung hole" == "Bu ngho le". *sigh* */ 245 199 int (* cmp_buddynames) (const char *who1, const char *who2); 246 200 }; … … 259 213 260 214 /* nogaim.c */ 261 int serv_send_im(irc_t *irc, user_t *u, char *msg, int flags); 262 int serv_send_chat(irc_t *irc, struct gaim_connection *gc, int id, char *msg ); 263 264 G_MODULE_EXPORT signed int do_iconv( char *from_cs, char *to_cs, char *src, char *dst, size_t size, size_t maxbuf ); 265 char *set_eval_charset( irc_t *irc, set_t *set, char *value ); 215 int bim_set_away( struct gaim_connection *gc, char *away ); 216 int bim_buddy_msg( struct gaim_connection *gc, char *handle, char *msg, int flags ); 217 int bim_chat_msg( struct gaim_connection *gc, int id, char *msg ); 218 219 void bim_add_allow( struct gaim_connection *gc, char *handle ); 220 void bim_rem_allow( struct gaim_connection *gc, char *handle ); 221 void bim_add_block( struct gaim_connection *gc, char *handle ); 222 void bim_rem_block( struct gaim_connection *gc, char *handle ); 266 223 267 224 void nogaim_init(); 268 int proto_away( struct gaim_connection *gc, char *away );269 225 char *set_eval_away_devoice( irc_t *irc, set_t *set, char *value ); 270 226 … … 278 234 G_MODULE_EXPORT void hide_login_progress( struct gaim_connection *gc, char *msg ); 279 235 G_MODULE_EXPORT void hide_login_progress_error( struct gaim_connection *gc, char *msg ); 280 G_MODULE_EXPORT void serv_got_crap( struct gaim_connection *gc, char *format, ... ) ;236 G_MODULE_EXPORT void serv_got_crap( struct gaim_connection *gc, char *format, ... ) G_GNUC_PRINTF( 2, 3 ); 281 237 G_MODULE_EXPORT void account_online( struct gaim_connection *gc ); 282 G_MODULE_EXPORT void account_offline( struct gaim_connection *gc );283 238 G_MODULE_EXPORT void signoff( struct gaim_connection *gc ); 284 239 … … 288 243 289 244 /* list.c */ 290 G_MODULE_EXPORT int bud_list_cache_exists( struct gaim_connection *gc );291 G_MODULE_EXPORT void do_import( struct gaim_connection *gc, void *null );292 245 G_MODULE_EXPORT void add_buddy( struct gaim_connection *gc, char *group, char *handle, char *realname ); 293 246 G_MODULE_EXPORT struct buddy *find_buddy( struct gaim_connection *gc, char *handle ); 294 G_MODULE_EXPORT void do_export( struct gaim_connection *gc );295 247 G_MODULE_EXPORT void signoff_blocked( struct gaim_connection *gc ); 296 248 … … 302 254 303 255 /* prpl.c */ 304 G_MODULE_EXPORT void show_got_added( struct gaim_connection *gc, char * id, char *handle, const char *realname, const char *msg);256 G_MODULE_EXPORT void show_got_added( struct gaim_connection *gc, char *handle, const char *realname ); 305 257 306 258 /* server.c */ … … 313 265 G_MODULE_EXPORT void serv_got_chat_left( struct gaim_connection *gc, int id ); 314 266 315 /* util.c */316 G_MODULE_EXPORT void strip_linefeed( gchar *text );317 G_MODULE_EXPORT char *add_cr( char *text );318 G_MODULE_EXPORT char *tobase64( const char *text );319 G_MODULE_EXPORT char *normalize( const char *s );320 G_MODULE_EXPORT time_t get_time( int year, int month, int day, int hour, int min, int sec );321 G_MODULE_EXPORT void strip_html( char *msg );322 G_MODULE_EXPORT char *escape_html( const char *html );323 G_MODULE_EXPORT void info_string_append(GString *str, char *newline, char *name, char *value);324 G_MODULE_EXPORT char *ipv6_wrap( char *src );325 G_MODULE_EXPORT char *ipv6_unwrap( char *src );326 327 /* prefs.c */328 G_MODULE_EXPORT void build_block_list();329 G_MODULE_EXPORT void build_allow_list();330 331 267 struct conversation *conv_findchannel( char *channel ); 332 268 333 334 269 #endif
Note: See TracChangeset
for help on using the changeset viewer.