Changeset 7b23afd for protocols/nogaim.h
- Timestamp:
- 2005-11-07T16:16:18Z (18 years ago)
- Branches:
- master
- Children:
- f7f3ada
- Parents:
- fe51bcf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.h
rfe51bcf r7b23afd 72 72 /* we need to do either oscar or TOC */ 73 73 /* we make this as an int in case if we want to add more protocols later */ 74 int protocol;75 74 struct prpl *prpl; 76 75 guint32 flags; … … 152 151 char user_info[2048]; 153 152 int options; 154 int protocol;153 struct prpl *prpl; 155 154 /* prpls can use this to save information about the user, 156 155 * like which server to connect to, etc */ … … 161 160 }; 162 161 162 struct ft 163 { 164 const char *filename; 165 166 /* Total number of bytes in file */ 167 size_t total_bytes; 168 169 /* Current number of bytes received */ 170 size_t cur_bytes; 171 }; 172 173 struct ft_request 174 { 175 const char *filename; 176 struct gaim_connection *gc; 177 }; 178 179 typedef void (*ft_recv_handler) (struct ft *, void *data, size_t len); 180 163 181 struct prpl { 164 int protocol;165 182 int options; 166 c har *(* name)();183 const char *name; 167 184 168 185 /* for ICQ and Yahoo, who have off/on per-conversation options */ … … 217 234 void (* group_buddy) (struct gaim_connection *, char *who, char *old_group, char *new_group); 218 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 219 241 void (* buddy_free) (struct buddy *); 220 242 221 243 char *(* get_status_string) (struct gaim_connection *gc, int stat); 222 244 }; 223 224 #define PROTO_TOC 0225 #define PROTO_OSCAR 1226 #define PROTO_YAHOO 2227 #define PROTO_ICQ 3228 #define PROTO_MSN 4229 #define PROTO_IRC 5230 #define PROTO_FTP 6231 #define PROTO_VGATE 7232 #define PROTO_JABBER 8233 #define PROTO_NAPSTER 9234 #define PROTO_ZEPHYR 10235 #define PROTO_GADUGADU 11236 #define PROTO_MAX 16237 238 extern char proto_name[PROTO_MAX][8];239 245 240 246 #define UC_UNAVAILABLE 1 … … 247 253 248 254 G_MODULE_EXPORT GSList *get_connections(); 249 extern struct prpl *proto_prpl[16]; 255 G_MODULE_EXPORT struct prpl *find_protocol(const char *name); 256 G_MODULE_EXPORT void register_protocol(struct prpl *); 250 257 251 258 /* nogaim.c */ … … 259 266 int proto_away( struct gaim_connection *gc, char *away ); 260 267 char *set_eval_away_devoice( irc_t *irc, set_t *set, char *value ); 261 int handle_cmp( char *a, char *b, intprotocol );268 int handle_cmp( char *a, char *b, struct prpl *protocol ); 262 269 263 270 gboolean auto_reconnect( gpointer data ); … … 318 325 G_MODULE_EXPORT void info_string_append(GString *str, char *newline, char *name, char *value); 319 326 320 #ifdef WITH_MSN 321 /* msn.c */ 322 G_MODULE_EXPORT void msn_init( struct prpl *ret ); 323 #endif 324 325 #ifdef WITH_OSCAR 326 /* oscar.c */ 327 G_MODULE_EXPORT void oscar_init( struct prpl *ret ); 328 #endif 329 330 #ifdef WITH_JABBER 331 /* jabber.c */ 332 G_MODULE_EXPORT void jabber_init( struct prpl *ret ); 333 #endif 334 335 #ifdef WITH_YAHOO 336 /* yahoo.c */ 337 G_MODULE_EXPORT void byahoo_init( struct prpl *ret ); 338 #endif 327 /* file transfers */ 328 G_MODULE_EXPORT void ft_progress( struct ft *, int); 329 G_MODULE_EXPORT void ft_incoming( struct ft_request * ); 330 G_MODULE_EXPORT void ft_accepted( struct ft_request *, struct ft *); 331 G_MODULE_EXPORT void ft_denied( struct ft_request *, const char *reason); 339 332 340 333 /* prefs.c */
Note: See TracChangeset
for help on using the changeset viewer.