libpurple/protocols/mxit/chunk.h

branch
mxit
changeset 31722
9e4e8315893d
parent 30788
da428f8d1f97
child 35680
965839bfe169
child 37822
06278419c703
--- a/libpurple/protocols/mxit/chunk.h	Tue Apr 12 19:59:54 2011 +0000
+++ b/libpurple/protocols/mxit/chunk.h	Tue Apr 12 21:25:51 2011 +0000
@@ -99,14 +99,20 @@
 	return &chunkheader[MXIT_CHUNK_HEADER_SIZE];
 }
 
-
+/*
+ * Offer File chunk (6).
+ */
 struct offerfile_chunk {
 	char	fileid[MXIT_CHUNK_FILEID_LEN];
 	char	username[MXIT_CP_MAX_JID_LEN + 1];
 	int		filesize;
 	char	filename[FILENAME_MAX];
+	char	mimetype[64];
 };
 
+/*
+ * Get File chunk (8) response.
+ */
 struct getfile_chunk {
 	char	fileid[MXIT_CHUNK_FILEID_LEN];
 	int		offset;
@@ -115,6 +121,9 @@
 	char*	data;
 };
 
+/*
+ * Custom Resource chunk (1).
+ */
 struct cr_chunk {
 	char	id[64];
 	char	handle[64];
@@ -122,6 +131,9 @@
 	GList*	resources;
 };
 
+/*
+ * Splash Image chunk (2)
+ */
 struct splash_chunk {
 	char	anchor;
 	char	showtime;
@@ -130,10 +142,16 @@
 	int		datalen;
 };
 
+/*
+ * Splash Click Through chunk (3)
+ */
 struct splash_click_chunk {
 	char	reserved[1];
 };
 
+/*
+ * Get Avatar chunk (14) response.
+ */
 struct getavatar_chunk {
 	char	mxitid[50];
 	char	avatarid[64];
@@ -146,6 +164,15 @@
 	char*	data;
 };
 
+/*
+ * Send File Direct chunk (10) response.
+ */
+struct sendfile_chunk {
+	char	username[MXIT_CP_MAX_JID_LEN + 1];
+	int		status;
+	char	statusmsg[1024];
+};
+
 /* Encode chunk */
 int mxit_chunk_create_senddirect( char* chunkdata, const char* username, const char* filename, const unsigned char* data, int datalen );
 int mxit_chunk_create_reject( char* chunkdata, const char* fileid );
@@ -158,6 +185,7 @@
 void mxit_chunk_parse_offer( char* chunkdata, int datalen, struct offerfile_chunk* offer );
 void mxit_chunk_parse_get( char* chunkdata, int datalen, struct getfile_chunk* getfile );
 void mxit_chunk_parse_cr( char* chunkdata, int datalen, struct cr_chunk* cr );
+void mxit_chunk_parse_sendfile( char* chunkdata, int datalen, struct sendfile_chunk* sendfile );
 void mxit_chunk_parse_get_avatar( char* chunkdata, int datalen, struct getavatar_chunk* avatar );
 
 #endif		/* _MXIT_CHUNK_H_ */

mercurial