author | Nicolas Cornu <nicolas.cornu@ensi-bourges.fr> |
Sun, 15 Aug 2010 17:35:41 +0200 | |
changeset 127 | 02dde03e219b |
parent 123 | 58bd57666ef9 |
child 131 | 943c3f938cb4 |
permissions | -rw-r--r-- |
21
147f131382dd
Some sessions management code.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
1 |
#ifndef __JINGLEFT_H__ |
147f131382dd
Some sessions management code.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
2 |
#define __JINGLEFT_H__ 1 |
147f131382dd
Some sessions management code.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
3 |
|
147f131382dd
Some sessions management code.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
4 |
#define NS_JINGLE_APP_FT "urn:xmpp:jingle:apps:file-transfer:1" |
147f131382dd
Some sessions management code.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
5 |
#define NS_JINGLE_APP_FT_INFO "urn:xmpp:jingle:apps:file-transfer:info:1" |
147f131382dd
Some sessions management code.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
6 |
#define NS_SI_FT "http://jabber.org/protocol/si/profile/file-transfer" |
123
58bd57666ef9
Add a end function to transport
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
102
diff
changeset
|
7 |
#define JINGLE_FT_SIZE_READ 2048 |
21
147f131382dd
Some sessions management code.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
8 |
|
71 | 9 |
typedef enum { |
10 |
JINGLE_FT_OFFER, |
|
11 |
JINGLE_FT_REQUEST, |
|
12 |
} JingleFTType; |
|
13 |
||
21
147f131382dd
Some sessions management code.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
14 |
typedef struct { |
147f131382dd
Some sessions management code.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
15 |
/* the last modification of the file, optional */ |
147f131382dd
Some sessions management code.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
16 |
time_t date; |
147f131382dd
Some sessions management code.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
17 |
|
147f131382dd
Some sessions management code.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
18 |
/* MD5 hash of the file, optional */ |
53
64a47491c068
Add a function to handle incoming data in the filetransfert module.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
49
diff
changeset
|
19 |
gchar *hash; |
21
147f131382dd
Some sessions management code.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
20 |
|
147f131382dd
Some sessions management code.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
21 |
/* the name of the file that the sender wishes to send */ |
53
64a47491c068
Add a function to handle incoming data in the filetransfert module.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
49
diff
changeset
|
22 |
gchar *name; |
21
147f131382dd
Some sessions management code.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
23 |
|
147f131382dd
Some sessions management code.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
24 |
/* the size, in bytes, of the data to be sent */ |
88
8b12ebd75c1a
Change the size to an guint64 and use the G_GUINT64_FORMAT.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
71
diff
changeset
|
25 |
guint64 size; |
53
64a47491c068
Add a function to handle incoming data in the filetransfert module.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
49
diff
changeset
|
26 |
|
127
02dde03e219b
remove xmlns() in transports
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
123
diff
changeset
|
27 |
/* Data already send/receive*/ |
02dde03e219b
remove xmlns() in transports
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
123
diff
changeset
|
28 |
guint64 transmit; |
02dde03e219b
remove xmlns() in transports
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
123
diff
changeset
|
29 |
|
53
64a47491c068
Add a function to handle incoming data in the filetransfert module.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
49
diff
changeset
|
30 |
/* descriptor to the output file */ |
64a47491c068
Add a function to handle incoming data in the filetransfert module.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
49
diff
changeset
|
31 |
GIOChannel *outfile; |
71 | 32 |
|
127
02dde03e219b
remove xmlns() in transports
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
123
diff
changeset
|
33 |
/* Is it an offer or a request ? */ |
71 | 34 |
JingleFTType type; |
35 |
||
127
02dde03e219b
remove xmlns() in transports
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
123
diff
changeset
|
36 |
/* A little description of the transfer */ |
71 | 37 |
gchar *desc; |
38 |
||
127
02dde03e219b
remove xmlns() in transports
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
123
diff
changeset
|
39 |
/* Where we compute the hash */ |
102 | 40 |
GChecksum *md5; |
41 |
||
21
147f131382dd
Some sessions management code.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
42 |
} JingleFT; |
147f131382dd
Some sessions management code.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
43 |
|
147f131382dd
Some sessions management code.
Nicolas Cornu <nicolas.cornu@ensi-bourges.fr>
parents:
diff
changeset
|
44 |
#endif |