summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2012-03-30 11:44:53 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2012-03-30 11:44:53 +0200
commit7e6da707ca2a3eea60de5cf056f88598c0735a00 (patch)
treeee5902ca39544961c8030e1d131086d1fed39f60
parent0b176a12a78851897aa40ef28a33a89da84be62a (diff)
Fix message parser compilation.
-rw-r--r--src/messageparser.cc11
-rw-r--r--src/messageparser.h4
2 files changed, 8 insertions, 7 deletions
diff --git a/src/messageparser.cc b/src/messageparser.cc
index ff8df21..cb46669 100644
--- a/src/messageparser.cc
+++ b/src/messageparser.cc
@@ -97,7 +97,8 @@ inline static void parse_into_msg_tokens(std::string& data,
}
}
-inline static void create_msg_list(MsgTokensList& msgTokensList, MsgList& msgList) {
+inline static void create_msg_list(MsgTokensList& msgTokensList,
+ MessageList& msgList) {
MsgTokensList::iterator it_msg;
for(it_msg = msgTokensList.begin(); it_msg != msgTokensList.end(); it_msg++) {
TokenVector t = *it_msg;
@@ -105,7 +106,7 @@ inline static void create_msg_list(MsgTokensList& msgTokensList, MsgList& msgLis
//malformed msg
if(t.size() < 1) continue;
- msg_t m;
+ message_t m;
if(t[0] == "add") m.cmd = cmd::add;
else if(t[0] == "del") m.cmd = cmd::del;
@@ -161,19 +162,19 @@ inline static void create_msg_list(MsgTokensList& msgTokensList, MsgList& msgLis
}
}
-MsgList parse_msg(std::string data) {
+MessageList parse_msg(std::string data) {
printf("Parsing: %s\n", data.c_str());
MsgTokensList msgTokensList;
parse_into_msg_tokens(data, msgTokensList);
- MsgList msgList;
+ MessageList msgList;
create_msg_list(msgTokensList, msgList);
return msgList;
}
-std::string msg_tostring(msg_t m) {
+std::string msg_tostring(message_t m) {
char* buf = NULL;
switch(m.cmd) {
case cmd::add: {
diff --git a/src/messageparser.h b/src/messageparser.h
index b071dd8..9e4a235 100644
--- a/src/messageparser.h
+++ b/src/messageparser.h
@@ -55,7 +55,7 @@ typedef struct {
typedef struct {
taskid_t id;
- taskid_t parent_id;
+ taskid_t parentid;
char title[256];
char desc[256];
} add_t;
@@ -66,7 +66,7 @@ typedef struct {
typedef struct {
taskid_t id;
- taskid_t parent_id;
+ taskid_t parentid;
} move_t;
typedef struct {