2 * MXit Protocol libPurple Plugin
4 * -- file transfers (sending and receiving) --
6 * Pieter Loubser <libpurple@mxit.com>
8 * (C) Copyright 2009 MXit Lifestyle (Pty) Ltd.
9 * <http://www.mxitlifestyle.com>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
26 #ifndef _MXIT_FILEXFER_H_
27 #define _MXIT_FILEXFER_H_
31 * a MXit file transfer
34 struct MXitSession
* session
;
35 char fileid
[MXIT_CHUNK_FILEID_LEN
];
38 const char* file_mime_type( const char* filename
, const char* buf
, int buflen
);
40 /* libPurple callbacks */
41 gboolean
mxit_xfer_enabled( PurpleConnection
* gc
, const char* who
);
42 void mxit_xfer_tx( PurpleConnection
* gc
, const char* who
, const char* filename
);
43 PurpleXfer
* mxit_xfer_new( PurpleConnection
* gc
, const char* who
);
45 /* MXit Protocol callbacks */
46 void mxit_xfer_rx_offer( struct MXitSession
* session
, const char* username
, const char* filename
, unsigned int filesize
, const char* fileid
);
47 void mxit_xfer_rx_file( struct MXitSession
* session
, const char* fileid
, const char* data
, unsigned int datalen
);
50 #endif /* _MXIT_FILEXFER_H_ */