Changeset 9779c18 for protocols/nogaim.h
- Timestamp:
- 2006-06-03T20:20:43Z (18 years ago)
- Branches:
- master
- Children:
- 5973412
- Parents:
- a15c097 (diff), fb62f81f (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
ra15c097 r9779c18 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 1 55 #define PERMIT_NONE 2 56 #define PERMIT_SOME 3 57 #define DENY_SOME 4 58 59 #define WEBSITE "http://www.bitlee.org/" 54 #define WEBSITE "http://www.bitlbee.org/" 60 55 #define IM_FLAG_AWAY 0x0020 61 #define OPT_CONN_HTML 0x0000000162 #define OPT_LOGGED_IN 0x0001000063 56 #define GAIM_AWAY_CUSTOM "Custom" 64 57 65 #define GAIM_LOGO 0 66 #define GAIM_ERROR 1 67 #define GAIM_WARNING 2 68 #define GAIM_INFO 3 58 #define OPT_CONN_HTML 0x00000001 59 #define OPT_LOGGED_IN 0x00010000 60 #define OPT_LOGGING_OUT 0x00020000 69 61 70 62 /* 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 */ 63 struct gaim_connection 64 { 74 65 struct prpl *prpl; 75 66 guint32 flags; 76 67 68 /* each connection then can have its own protocol-specific data */ 69 void *proto_data; 70 77 71 /* all connections need an input watcher */ 78 72 int inpa; 73 guint keepalive; 79 74 80 75 /* buddy list stuff. there is still a global groups for the buddy list, but … … 84 79 int permdeny; 85 80 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 81 struct aim_user *user; 93 82 … … 95 84 char displayname[128]; 96 85 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 86 104 87 char *away; 105 int is_auto_away;106 88 107 89 int evil; … … 110 92 /* BitlBee */ 111 93 irc_t *irc; 112 int lstitems; /* added for msnP8 */113 94 114 95 struct conversation *conversations; … … 164 145 const char *name; 165 146 166 /* for ICQ and Yahoo, who have off/on per-conversation options */167 /* char *checkbox; this should be per-connection */168 169 GList *(* away_states)(struct gaim_connection *gc);170 GList *(* actions)();171 void (* do_action)(struct gaim_connection *, char *);172 /* user_opts returns a GList* of g_malloc'd struct proto_user_opts */173 GList *(* user_opts)();174 GList *(* chat_info)(struct gaim_connection *);175 176 /* all the server-related functions */177 178 /* a lot of these (like get_dir) are protocol-dependent and should be removed. ones like179 * set_dir (which is also protocol-dependent) can stay though because there's a dialog180 * (i.e. the prpl says you can set your dir info, the ui shows a dialog and needs to call181 * set_dir in order to set it) */182 183 147 void (* login) (struct aim_user *); 148 void (* keepalive) (struct gaim_connection *); 184 149 void (* close) (struct gaim_connection *); 150 185 151 int (* send_im) (struct gaim_connection *, char *who, char *message, int len, int away); 186 int (* send_typing) (struct gaim_connection *, char *who, int typing);187 void (* set_info) (struct gaim_connection *, char *info);188 void (* get_info) (struct gaim_connection *, char *who);189 152 void (* set_away) (struct gaim_connection *, char *state, char *message); 190 153 void (* get_away) (struct gaim_connection *, char *who); 191 void (* set_idle) (struct gaim_connection *, int idletime); 154 int (* send_typing) (struct gaim_connection *, char *who, int typing); 155 192 156 void (* add_buddy) (struct gaim_connection *, char *name); 157 void (* group_buddy) (struct gaim_connection *, char *who, char *old_group, char *new_group); 193 158 void (* remove_buddy) (struct gaim_connection *, char *name, char *group); 194 159 void (* add_permit) (struct gaim_connection *, char *name); … … 197 162 void (* rem_deny) (struct gaim_connection *, char *name); 198 163 void (* set_permit_deny)(struct gaim_connection *); 164 165 void (* set_info) (struct gaim_connection *, char *info); 166 void (* get_info) (struct gaim_connection *, char *who); 167 void (* alias_buddy) (struct gaim_connection *, char *who); /* save/store buddy's alias on server list/roster */ 168 169 /* Group chat stuff. */ 199 170 void (* join_chat) (struct gaim_connection *, GList *data); 200 171 void (* chat_invite) (struct gaim_connection *, int id, char *who, char *message); 201 172 void (* chat_leave) (struct gaim_connection *, int id); 202 void (* chat_whisper) (struct gaim_connection *, int id, char *who, char *message);203 173 int (* chat_send) (struct gaim_connection *, int id, char *message); 204 174 int (* chat_open) (struct gaim_connection *, char *who); 205 void (* keepalive) (struct gaim_connection *); 206 207 /* get "chat buddy" info and away message */ 208 void (* get_cb_info) (struct gaim_connection *, int, char *who); 209 void (* get_cb_away) (struct gaim_connection *, int, char *who); 210 211 /* save/store buddy's alias on server list/roster */ 212 void (* alias_buddy) (struct gaim_connection *, char *who); 213 214 /* change a buddy's group on a server list/roster */ 215 void (* group_buddy) (struct gaim_connection *, char *who, char *old_group, char *new_group); 216 217 void (* buddy_free) (struct buddy *); 218 175 176 /* DIE! */ 219 177 char *(* get_status_string) (struct gaim_connection *gc, int stat); 220 178 179 GList *(* away_states)(struct gaim_connection *gc); 180 181 /* Mainly for AOL, since they think "Bung hole" == "Bu ngho le". *sigh* */ 221 182 int (* cmp_buddynames) (const char *who1, const char *who2); 222 183 }; … … 235 196 236 197 /* nogaim.c */ 237 int serv_send_im(irc_t *irc, user_t *u, char *msg, int flags); 238 int serv_send_chat(irc_t *irc, struct gaim_connection *gc, int id, char *msg ); 239 240 G_MODULE_EXPORT signed int do_iconv( char *from_cs, char *to_cs, char *src, char *dst, size_t size, size_t maxbuf ); 241 char *set_eval_charset( irc_t *irc, set_t *set, char *value ); 198 int bim_set_away( struct gaim_connection *gc, char *away ); 199 int bim_buddy_msg( struct gaim_connection *gc, char *handle, char *msg, int flags ); 200 int bim_chat_msg( struct gaim_connection *gc, int id, char *msg ); 201 202 void bim_add_allow( struct gaim_connection *gc, char *handle ); 203 void bim_rem_allow( struct gaim_connection *gc, char *handle ); 204 void bim_add_block( struct gaim_connection *gc, char *handle ); 205 void bim_rem_block( struct gaim_connection *gc, char *handle ); 242 206 243 207 void nogaim_init(); 244 int proto_away( struct gaim_connection *gc, char *away );245 208 char *set_eval_away_devoice( irc_t *irc, set_t *set, char *value ); 246 209 … … 254 217 G_MODULE_EXPORT void hide_login_progress( struct gaim_connection *gc, char *msg ); 255 218 G_MODULE_EXPORT void hide_login_progress_error( struct gaim_connection *gc, char *msg ); 256 G_MODULE_EXPORT void serv_got_crap( struct gaim_connection *gc, char *format, ... ) ;219 G_MODULE_EXPORT void serv_got_crap( struct gaim_connection *gc, char *format, ... ) G_GNUC_PRINTF( 2, 3 ); 257 220 G_MODULE_EXPORT void account_online( struct gaim_connection *gc ); 258 G_MODULE_EXPORT void account_offline( struct gaim_connection *gc );259 221 G_MODULE_EXPORT void signoff( struct gaim_connection *gc ); 260 222 … … 264 226 265 227 /* list.c */ 266 G_MODULE_EXPORT int bud_list_cache_exists( struct gaim_connection *gc );267 G_MODULE_EXPORT void do_import( struct gaim_connection *gc, void *null );268 228 G_MODULE_EXPORT void add_buddy( struct gaim_connection *gc, char *group, char *handle, char *realname ); 269 229 G_MODULE_EXPORT struct buddy *find_buddy( struct gaim_connection *gc, char *handle ); 270 G_MODULE_EXPORT void do_export( struct gaim_connection *gc );271 230 G_MODULE_EXPORT void signoff_blocked( struct gaim_connection *gc ); 272 231 … … 278 237 279 238 /* prpl.c */ 280 G_MODULE_EXPORT void show_got_added( struct gaim_connection *gc, char * id, char *handle, const char *realname, const char *msg);239 G_MODULE_EXPORT void show_got_added( struct gaim_connection *gc, char *handle, const char *realname ); 281 240 282 241 /* server.c */ … … 289 248 G_MODULE_EXPORT void serv_got_chat_left( struct gaim_connection *gc, int id ); 290 249 291 /* util.c */292 G_MODULE_EXPORT void strip_linefeed( gchar *text );293 G_MODULE_EXPORT char *add_cr( char *text );294 G_MODULE_EXPORT char *tobase64( const char *text );295 G_MODULE_EXPORT char *normalize( const char *s );296 G_MODULE_EXPORT time_t get_time( int year, int month, int day, int hour, int min, int sec );297 G_MODULE_EXPORT void strip_html( char *msg );298 G_MODULE_EXPORT char *escape_html( const char *html );299 G_MODULE_EXPORT void info_string_append(GString *str, char *newline, char *name, char *value);300 G_MODULE_EXPORT char *ipv6_wrap( char *src );301 G_MODULE_EXPORT char *ipv6_unwrap( char *src );302 303 /* prefs.c */304 G_MODULE_EXPORT void build_block_list();305 G_MODULE_EXPORT void build_allow_list();306 307 250 struct conversation *conv_findchannel( char *channel ); 308 251 309 310 252 #endif
Note: See TracChangeset
for help on using the changeset viewer.