comparison libpurple/protocols/myspace/message.h @ 17284:37499e926a42

Add new MsimMessage element type, MSIM_TYPE_RAW, for fields in incoming protocol messages that don't have any type information associated with them. These elements will be unescaped if used as strings, in msim_msg_get_string(), and won't be escaped if serialized into a protocol message in msim_msg_element_pack(). On the other hand, MSIM_TYPE_STRING will be escaped when packed. Previously, everything was MSIM_TYPE_STRING, leading to more complicated escaping. Now, an instant message "foo/bar\baz" will be represented as follows: bm(raw): 1 f(raw): 180301984 cv(raw): 673 msg(raw): foo/1bar/2baz And it will be interpreted by the receiving client correctly-- msim_msg_get_string(..., "msg") will be "foo/bar\baz".
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Sat, 02 Jun 2007 02:43:43 +0000
parents d8afaaf24f34
children d8903e1320a9
comparison
equal deleted inserted replaced
17283:9ecd2bb0ecc1 17284:37499e926a42
34 } MsimMessageElement; 34 } MsimMessageElement;
35 35
36 typedef gchar MsimMessageType; 36 typedef gchar MsimMessageType;
37 37
38 /* Protocol field types */ 38 /* Protocol field types */
39 #define MSIM_TYPE_RAW '-'
39 #define MSIM_TYPE_INTEGER 'i' 40 #define MSIM_TYPE_INTEGER 'i'
40 #define MSIM_TYPE_STRING 's' 41 #define MSIM_TYPE_STRING 's'
41 #define MSIM_TYPE_BINARY 'b' 42 #define MSIM_TYPE_BINARY 'b'
42 #define MSIM_TYPE_BOOLEAN 'f' 43 #define MSIM_TYPE_BOOLEAN 'f'
43 #define MSIM_TYPE_DICTIONARY 'd' 44 #define MSIM_TYPE_DICTIONARY 'd'