Module: sems Branch: master Commit: 8efcc486460f46baf919f2880954d652c9fa7b39 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=8efcc486460f46baf919f2880954d652c9fa7b39
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Sun Oct 30 19:37:59 2011 +0100 fix: AmPluginEvent methods in core --- core/AmEvent.cpp | 18 ++++++++++++++++-- core/AmEvent.h | 24 ++++++++---------------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/core/AmEvent.cpp b/core/AmEvent.cpp index 2b9840f..d46a6ed 100644 --- a/core/AmEvent.cpp +++ b/core/AmEvent.cpp @@ -18,11 +18,25 @@ AmEvent* AmEvent::clone() { return new AmEvent(*this); } - - AmPluginEvent::AmPluginEvent(const string& n, const AmArg& d) : AmEvent(E_PLUGIN), name(n), data(d) {} AmPluginEvent::AmPluginEvent(const string& n) : AmEvent(E_PLUGIN), name(n), data() {} +AmSystemEvent::AmSystemEvent(EvType e) + : AmEvent(E_SYSTEM), sys_event(e) { } + +AmSystemEvent::AmSystemEvent(const AmSystemEvent& rhs) + : AmEvent(rhs), sys_event(rhs.sys_event) { } + +AmEvent* AmSystemEvent::clone() { return new AmSystemEvent(*this); }; + +static const char* AmSystemEvent::getDescription(EvType t) { + switch (t) { + case ServerShutdown: return "ServerShutdown"; + case User1: return "User1"; + case User2: return "User2"; + default: return "Unknown"; + } +} diff --git a/core/AmEvent.h b/core/AmEvent.h index 054dcc5..72272cc 100644 --- a/core/AmEvent.h +++ b/core/AmEvent.h @@ -78,22 +78,14 @@ struct AmSystemEvent : public AmEvent EvType sys_event; - AmSystemEvent(EvType e) - : AmEvent(E_SYSTEM), sys_event(e) { } - - AmSystemEvent(const AmSystemEvent& rhs) - : AmEvent(rhs), sys_event(rhs.sys_event) { } - - AmEvent* clone() { return new AmSystemEvent(*this); }; - - static const char* getDescription(EvType t) { - switch (t) { - case ServerShutdown: return "ServerShutdown"; - case User1: return "User1"; - case User2: return "User2"; - default: return "Unknown"; - } - } + AmSystemEvent(EvType e); + + AmSystemEvent(const AmSystemEvent& rhs); + + AmEvent* clone(); + + static const char* getDescription(EvType t); + }; /** \brief event handler interface */ _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
