Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.h

    r9cb9868 r7b23afd  
    7272        /* we need to do either oscar or TOC */
    7373        /* we make this as an int in case if we want to add more protocols later */
    74         int protocol;
    7574        struct prpl *prpl;
    7675        guint32 flags;
     
    152151        char user_info[2048];
    153152        int options;
    154         int protocol;
     153        struct prpl *prpl;
    155154        /* prpls can use this to save information about the user,
    156155         * like which server to connect to, etc */
     
    161160};
    162161
     162struct 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
     173struct ft_request
     174{
     175        const char *filename;
     176        struct gaim_connection *gc;
     177};
     178
     179typedef void (*ft_recv_handler) (struct ft *, void *data, size_t len);
     180
    163181struct prpl {
    164         int protocol;
    165182        int options;
    166         char *(* name)();
     183        const char *name;
    167184
    168185        /* for ICQ and Yahoo, who have off/on per-conversation options */
     
    217234        void (* group_buddy)    (struct gaim_connection *, char *who, char *old_group, char *new_group);
    218235
     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
    219241        void (* buddy_free)     (struct buddy *);
    220242
    221243        char *(* get_status_string) (struct gaim_connection *gc, int stat);
    222 
    223         int (* cmp_buddynames) (const char *who1, const char *who2);
    224 };
    225 
    226 #define PROTO_TOC       0
    227 #define PROTO_OSCAR     1
    228 #define PROTO_YAHOO     2
    229 #define PROTO_ICQ       3
    230 #define PROTO_MSN       4
    231 #define PROTO_IRC       5
    232 #define PROTO_FTP       6
    233 #define PROTO_VGATE     7
    234 #define PROTO_JABBER    8
    235 #define PROTO_NAPSTER   9
    236 #define PROTO_ZEPHYR    10
    237 #define PROTO_GADUGADU  11
    238 #define PROTO_MAX       16
    239 
    240 extern char proto_name[PROTO_MAX][8];
     244};
    241245
    242246#define UC_UNAVAILABLE  1
     
    249253
    250254G_MODULE_EXPORT GSList *get_connections();
    251 extern struct prpl *proto_prpl[16];
     255G_MODULE_EXPORT struct prpl *find_protocol(const char *name);
     256G_MODULE_EXPORT void register_protocol(struct prpl *);
    252257
    253258/* nogaim.c */
     
    261266int proto_away( struct gaim_connection *gc, char *away );
    262267char *set_eval_away_devoice( irc_t *irc, set_t *set, char *value );
     268int handle_cmp( char *a, char *b, struct prpl *protocol );
    263269
    264270gboolean auto_reconnect( gpointer data );
     
    319325G_MODULE_EXPORT void info_string_append(GString *str, char *newline, char *name, char *value);
    320326
    321 #ifdef WITH_MSN
    322 /* msn.c */
    323 G_MODULE_EXPORT void msn_init( struct prpl *ret );
    324 #endif
    325 
    326 #ifdef WITH_OSCAR
    327 /* oscar.c */
    328 G_MODULE_EXPORT void oscar_init( struct prpl *ret );
    329 #endif
    330 
    331 #ifdef WITH_JABBER
    332 /* jabber.c */
    333 G_MODULE_EXPORT void jabber_init( struct prpl *ret );
    334 #endif
    335 
    336 #ifdef WITH_YAHOO
    337 /* yahoo.c */
    338 G_MODULE_EXPORT void byahoo_init( struct prpl *ret );
    339 #endif
     327/* file transfers */
     328G_MODULE_EXPORT void ft_progress( struct ft *, int);
     329G_MODULE_EXPORT void ft_incoming( struct ft_request * );
     330G_MODULE_EXPORT void ft_accepted( struct ft_request *, struct ft *);
     331G_MODULE_EXPORT void ft_denied( struct ft_request *, const char *reason);
    340332
    341333/* prefs.c */
Note: See TracChangeset for help on using the changeset viewer.