equal
deleted
inserted
replaced
1 #ifndef __PARSE_H__ |
|
2 #define __PARSE_H__ 1 |
|
3 |
|
4 #include <glib.h> |
|
5 #include <loudmouth/loudmouth.h> |
|
6 |
|
7 #define PARSE_OK 0 |
|
8 #define PARSE_ERROR_NAME 1 |
|
9 #define PARSE_ERROR_REQUIRED 2 |
|
10 #define PARSE_ERROR_RESTRICTION 3 |
|
11 #define PARSE_ERROR_TOO_MANY_CHILDS 4 |
|
12 |
|
13 |
|
14 struct jingle_data { |
|
15 JingleAction action; |
|
16 const gchar* initiator; // optional |
|
17 const gchar* responder; // optional |
|
18 const gchar* sid; // required |
|
19 }; |
|
20 |
|
21 struct content_data { |
|
22 const gchar* creator; // required (initiator, responder) |
|
23 const gchar* disposition; // optional, default=session |
|
24 const gchar* name; // required |
|
25 const gchar* senders; // optional (both, initiator, none, responder) |
|
26 }; |
|
27 |
|
28 |
|
29 int parse_jingle(LmMessageNode* node, struct jingle_data* ij); |
|
30 int parse_content(LmMessageNode* node, struct content_data* ic); |
|
31 |
|
32 gint str_in_array(const gchar* needle, const gchar** haystack); |
|
33 |
|
34 #endif |
|