Mercurial > pidgin
comparison libpurple/protocols/myspace/message.h @ 17964:6d1d86ab6a59
In MsimMessage, add support for MSIM_TYPE_LIST - pipe-separated lists.
author | Jeffrey Connelly <jaconnel@calpoly.edu> |
---|---|
date | Sun, 22 Jul 2007 04:12:12 +0000 |
parents | d87916bd1d73 |
children | a2298513db8b |
comparison
equal
deleted
inserted
replaced
17963:8305709dd0b9 | 17964:6d1d86ab6a59 |
---|---|
52 MsimMessage *msim_msg_append(MsimMessage *msg, const gchar *name, MsimMessageType type, gpointer data); | 52 MsimMessage *msim_msg_append(MsimMessage *msg, const gchar *name, MsimMessageType type, gpointer data); |
53 MsimMessage *msim_msg_insert_before(MsimMessage *msg, const gchar *name_before, const gchar *name, MsimMessageType type, gpointer data); | 53 MsimMessage *msim_msg_insert_before(MsimMessage *msg, const gchar *name_before, const gchar *name, MsimMessageType type, gpointer data); |
54 void msim_msg_dump(const char *fmt_string, MsimMessage *msg); | 54 void msim_msg_dump(const char *fmt_string, MsimMessage *msg); |
55 gchar *msim_msg_pack(MsimMessage *msg); | 55 gchar *msim_msg_pack(MsimMessage *msg); |
56 | 56 |
57 GList *msim_msg_list_copy(GList *old); | |
58 void msim_msg_list_free(GList *l); | |
59 GList *msim_msg_list_parse(const gchar *raw); | |
60 | |
57 /* Defined in myspace.h */ | 61 /* Defined in myspace.h */ |
58 struct _MsimSession; | 62 struct _MsimSession; |
59 | 63 |
60 gboolean msim_send(struct _MsimSession *session, ...) | 64 /* Based on http://permalink.gmane.org/gmane.comp.parsers.sparse/695 |
65 * Define macros for useful gcc attributes. */ | |
61 #ifdef __GNUC__ | 66 #ifdef __GNUC__ |
62 /* Cause gcc to emit "a missing sentinel in function call" if forgot | 67 #define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) |
63 * to write NULL as last, terminating parameter. */ | 68 #define FORMAT_ATTR(pos) __attribute__ ((__format__ (__printf__, pos, pos+1))) |
64 __attribute__((__sentinel__(0))) | 69 #define NORETURN_ATTR __attribute__ ((__noreturn__)) |
65 #endif | 70 /* __sentinel__ attribute was introduced in gcc 3.5 */ |
66 ; | 71 #if (GCC_VERSION >= 3005) |
72 #define SENTINEL_ATTR __attribute__ ((__sentinel__(0))) | |
73 #else | |
74 #define SENTINEL_ATTR | |
75 #endif /* gcc >= 3.5 */ | |
76 #else | |
77 #define FORMAT_ATTR(pos) | |
78 #define NORETURN_ATTR | |
79 #define SENTINEL_ATTR | |
80 #endif | |
81 | |
82 /* Cause gcc to emit "a missing sentinel in function call" if forgot | |
83 * to write NULL as last, terminating parameter. */ | |
84 gboolean msim_send(struct _MsimSession *session, ...) SENTINEL_ATTR; | |
67 | 85 |
68 gboolean msim_msg_send(struct _MsimSession *session, MsimMessage *msg); | 86 gboolean msim_msg_send(struct _MsimSession *session, MsimMessage *msg); |
69 | 87 |
70 MsimMessage *msim_parse(gchar *raw); | 88 MsimMessage *msim_parse(gchar *raw); |
71 GHashTable *msim_parse_body(const gchar *body_str); | 89 GHashTable *msim_parse_body(const gchar *body_str); |
72 | 90 |
73 MsimMessageElement *msim_msg_get(MsimMessage *msg, const gchar *name); | 91 MsimMessageElement *msim_msg_get(MsimMessage *msg, const gchar *name); |
74 gchar *msim_msg_get_string(MsimMessage *msg, const gchar *name); | 92 gchar *msim_msg_get_string(MsimMessage *msg, const gchar *name); |
93 GList *msim_msg_get_list(MsimMessage *msg, const gchar *name); | |
75 guint msim_msg_get_integer(MsimMessage *msg, const gchar *name); | 94 guint msim_msg_get_integer(MsimMessage *msg, const gchar *name); |
76 gboolean msim_msg_get_binary(MsimMessage *msg, const gchar *name, gchar **binary_data, gsize *binary_length); | 95 gboolean msim_msg_get_binary(MsimMessage *msg, const gchar *name, gchar **binary_data, gsize *binary_length); |
77 | 96 |
78 #endif /* _MYSPACE_MESSAGE_H */ | 97 #endif /* _MYSPACE_MESSAGE_H */ |