--- a/parse.h Tue May 25 15:58:50 2010 +0200
+++ b/parse.h Tue May 25 16:44:52 2010 +0200
@@ -1,3 +1,7 @@
+#ifndef __PARSE_H__
+#define __PARSE_H__ 1
+
+#include <glib.h>
#include <loudmouth/loudmouth.h>
#define PARSE_OK 0
@@ -7,28 +11,28 @@
#define PARSE_ERROR_TOO_MANY_CHILDS 4
struct info_iq {
- char* from;
- char* id;
- char* to;
- char* set;
+ gchar* from;
+ gchar* id;
+ gchar* to;
+ gchar* set;
};
struct info_jingle {
- char* action; // required (content-accept, content-add,
+ gchar* action; // required (content-accept, content-add,
// content-modify, content-reject, content-remove, description-info
// security-info, session-accept, session-info, session-initiate,
// session-terminate, transport-accept, transport-info, transport-reject,
// transport-replace)
- char* initiator; // optional
- char* responder; // optional
- char* sid; // required
+ gchar* initiator; // optional
+ gchar* responder; // optional
+ gchar* sid; // required
};
struct info_content {
- char* creator; // required (initiator, responder)
- char* disposition; // optional, default=session
- char* name; // required
- char* senders; // optional (both, initiator, none, responder)
+ gchar* creator; // required (initiator, responder)
+ gchar* disposition; // optional, default=session
+ gchar* name; // required
+ gchar* senders; // optional (both, initiator, none, responder)
};
int parse_jingle(LmMessageNode* node, struct info_jingle* ij);
@@ -36,6 +40,6 @@
int parse_content(LmMessageNode* node, struct info_content* ic);
void free_content(struct info_content* ic);
-int check_restriction(const char* name, const char** values)
+int check_restriction(const char* name, const char** values);
-char* attrcpy(const char* attr);
+#endif