user_event.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00027 #ifndef ASTXX_MANAGER_ACTION_USER_EVENT_H
00028 #define ASTXX_MANAGER_ACTION_USER_EVENT_H
00029
00030 #include <astxx/manager/basic_action.h>
00031 #include <astxx/manager/message.h>
00032 #include <string>
00033
00034 namespace astxx {
00035 namespace manager {
00036 namespace action {
00037
00041 class user_event : public basic_action {
00042 public:
00046 user_event(const std::string& event)
00047 : event(event) {
00048 }
00049
00050 message::action action() const {
00051 message::action action("UserEvent");
00052 action["UserEvent"] = event;
00053
00054 for (std::multimap<std::string, std::string>::const_iterator i; i != headers.end(); ++i) {
00055 action.insert(*i);
00056 }
00057
00058 return action;
00059 }
00060
00061 private:
00062 std::string event;
00063
00064 public:
00065 std::multimap<std::string, std::string> headers;
00066 };
00067 }
00068 }
00069 }
00070
00071 #endif