Mercurial > pidgin
diff src/prpl.h @ 3609:4faf84dfdda2
[gaim-migrate @ 3722]
First draft of the file transfer prpl interface.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Wed, 09 Oct 2002 04:55:29 +0000 |
parents | bdd0bebd2d04 |
children | 9682c0e022c6 |
line wrap: on
line diff
--- a/src/prpl.h Tue Oct 08 23:45:20 2002 +0000 +++ b/src/prpl.h Wed Oct 09 04:55:29 2002 +0000 @@ -79,6 +79,8 @@ typedef void (*proto_init)(struct prpl *); +struct file_transfer; + struct _prpl_smiley { char *key; char **xpm; @@ -180,6 +182,14 @@ void (* convo_closed) (struct gaim_connection *, char *who); char *(* normalize)(const char *); + + /* transfer files */ + void (* file_transfer_cancel) (struct gaim_connection *, struct file_transfer *); + void (* file_transfer_in) (struct gaim_connection *, struct file_transfer *, int); + void (* file_transfer_out) (struct gaim_connection *, struct file_transfer *, const char *, int, int); + void (* file_transfer_nextfile) (struct gaim_connection *, struct file_transfer *); + void (* file_transfer_data_chunk)(struct gaim_connection *, struct file_transfer *, const char *, int); + void (* file_transfer_done) (struct gaim_connection *, struct file_transfer *); }; extern GSList *protocols; @@ -210,4 +220,18 @@ extern GSList *add_smiley(GSList *, char *, char **, int) ; +/* file transfer stuff */ +extern struct file_transfer *transfer_in_add(struct gaim_connection *gc, + const char *who, const char *filename, int totsize, + int totfiles, const char *msg); +extern struct file_transfer *transfer_out_add(struct gaim_connection *gc, + const char *who); +extern int transfer_abort(struct file_transfer *xfer, const char *why); +extern int transfer_out_do(struct file_transfer *xfer, int fd, + int offset); +extern int transfer_in_do(struct file_transfer *xfer, int fd, + const char *filename, int size); +int transfer_get_file_info(struct file_transfer *xfer, int *size, + char **name); + #endif /* _PRPL_H_ */