Author: sayer
Date: 2009-03-30 15:08:24 +0200 (Mon, 30 Mar 2009)
New Revision: 1340
Modified:
trunk/apps/dsm/DSMCoreModule.cpp
trunk/apps/dsm/DSMCoreModule.h
trunk/apps/dsm/DSMModule.cpp
trunk/apps/dsm/DSMModule.h
trunk/apps/dsm/mods/mod_conference/ModConference.cpp
trunk/apps/dsm/mods/mod_dlg/ModDlg.cpp
trunk/apps/dsm/mods/mod_monitoring/ModMonitoring.cpp
trunk/apps/dsm/mods/mod_mysql/ModMysql.cpp
trunk/apps/dsm/mods/mod_sys/ModSys.cpp
trunk/apps/dsm/mods/mod_uri/ModUri.cpp
Log:
simplified dependencies: everything needed for a module is in DSMModule.h
Modified: trunk/apps/dsm/DSMCoreModule.cpp
===================================================================
--- trunk/apps/dsm/DSMCoreModule.cpp 2009-03-26 17:19:27 UTC (rev 1339)
+++ trunk/apps/dsm/DSMCoreModule.cpp 2009-03-30 13:08:24 UTC (rev 1340)
@@ -34,17 +34,6 @@
DSMCoreModule::DSMCoreModule() {
}
-
-void splitCmd(const string& from_str,
- string& cmd, string& params) {
- size_t b_pos = from_str.find('(');
- if (b_pos != string::npos) {
- cmd = from_str.substr(0, b_pos);
- params = from_str.substr(b_pos + 1, from_str.rfind(')') - b_pos -1);
- } else
- cmd = from_str;
-}
-
DSMAction* DSMCoreModule::getAction(const string& from_str) {
string cmd;
string params;
Modified: trunk/apps/dsm/DSMCoreModule.h
===================================================================
--- trunk/apps/dsm/DSMCoreModule.h 2009-03-26 17:19:27 UTC (rev 1339)
+++ trunk/apps/dsm/DSMCoreModule.h 2009-03-30 13:08:24 UTC (rev 1340)
@@ -37,9 +37,6 @@
class AmSession;
class DSMSession;
-void splitCmd(const string& from_str,
- string& cmd, string& params);
-
class DSMCoreModule
: public DSMModule {
@@ -120,24 +117,4 @@
map<string,string>* event_params);
};
-
-#define GET_SCSESSION() \
- DSMSession* sc_sess = dynamic_cast<DSMSession*>(sess); \
- if (!sc_sess) { \
- ERROR("wrong session type\n"); \
- return false; \
- }
-
-
-#define EXEC_ACTION_START(act_name) \
- bool act_name::execute(AmSession* sess, \
- DSMCondition::EventType event, \
- map<string,string>* event_params) { \
- GET_SCSESSION();
-
-#define EXEC_ACTION_END \
- return false; \
- }
-
-
#endif
Modified: trunk/apps/dsm/DSMModule.cpp
===================================================================
--- trunk/apps/dsm/DSMModule.cpp 2009-03-26 17:19:27 UTC (rev 1339)
+++ trunk/apps/dsm/DSMModule.cpp 2009-03-30 13:08:24 UTC (rev 1340)
@@ -85,3 +85,13 @@
}
return s;
}
+
+void splitCmd(const string& from_str,
+ string& cmd, string& params) {
+ size_t b_pos = from_str.find('(');
+ if (b_pos != string::npos) {
+ cmd = from_str.substr(0, b_pos);
+ params = from_str.substr(b_pos + 1, from_str.rfind(')') - b_pos -1);
+ } else
+ cmd = from_str;
+}
Modified: trunk/apps/dsm/DSMModule.h
===================================================================
--- trunk/apps/dsm/DSMModule.h 2009-03-26 17:19:27 UTC (rev 1339)
+++ trunk/apps/dsm/DSMModule.h 2009-03-30 13:08:24 UTC (rev 1340)
@@ -213,6 +213,10 @@
string resolveVars(const string s, AmSession* sess,
DSMSession* sc_sess, map<string,string>* event_params);
+void splitCmd(const string& from_str,
+ string& cmd, string& params);
+
+
#define DEF_CMD(cmd_name, class_name) \
\
if (cmd == cmd_name) { \
@@ -245,4 +249,22 @@
#define MATCH_CONDITION_END }
+#define GET_SCSESSION() \
+ DSMSession* sc_sess = dynamic_cast<DSMSession*>(sess); \
+ if (!sc_sess) { \
+ ERROR("wrong session type\n"); \
+ return false; \
+ }
+
+
+#define EXEC_ACTION_START(act_name) \
+ bool act_name::execute(AmSession* sess, \
+ DSMCondition::EventType event, \
+ map<string,string>* event_params) { \
+ GET_SCSESSION();
+
+#define EXEC_ACTION_END \
+ return false; \
+ }
+
#endif
Modified: trunk/apps/dsm/mods/mod_conference/ModConference.cpp
===================================================================
--- trunk/apps/dsm/mods/mod_conference/ModConference.cpp 2009-03-26
17:19:27 UTC (rev 1339)
+++ trunk/apps/dsm/mods/mod_conference/ModConference.cpp 2009-03-30
13:08:24 UTC (rev 1340)
@@ -32,8 +32,6 @@
#include "AmRtpAudio.h"
#include "DSMSession.h"
-#include "DSMCoreModule.h"
-
#include "ModConference.h"
SC_EXPORT(ConfModule);
Modified: trunk/apps/dsm/mods/mod_dlg/ModDlg.cpp
===================================================================
--- trunk/apps/dsm/mods/mod_dlg/ModDlg.cpp 2009-03-26 17:19:27 UTC (rev
1339)
+++ trunk/apps/dsm/mods/mod_dlg/ModDlg.cpp 2009-03-30 13:08:24 UTC (rev
1340)
@@ -32,8 +32,6 @@
#include "AmSession.h"
#include <string.h>
-#include "DSMCoreModule.h"
-
SC_EXPORT(DLGModule);
DLGModule::DLGModule() {
Modified: trunk/apps/dsm/mods/mod_monitoring/ModMonitoring.cpp
===================================================================
--- trunk/apps/dsm/mods/mod_monitoring/ModMonitoring.cpp 2009-03-26
17:19:27 UTC (rev 1339)
+++ trunk/apps/dsm/mods/mod_monitoring/ModMonitoring.cpp 2009-03-30
13:08:24 UTC (rev 1340)
@@ -31,7 +31,6 @@
#include "ampi/MonitoringAPI.h"
#include "DSMSession.h"
-#include "DSMCoreModule.h"
#include "AmSession.h"
#include "ModMonitoring.h"
Modified: trunk/apps/dsm/mods/mod_mysql/ModMysql.cpp
===================================================================
--- trunk/apps/dsm/mods/mod_mysql/ModMysql.cpp 2009-03-26 17:19:27 UTC (rev
1339)
+++ trunk/apps/dsm/mods/mod_mysql/ModMysql.cpp 2009-03-30 13:08:24 UTC (rev
1340)
@@ -32,8 +32,6 @@
#include "DSMSession.h"
#include "AmSession.h"
-#include "DSMCoreModule.h"
-
SC_EXPORT(SCMysqlModule);
SCMysqlModule::SCMysqlModule() {
Modified: trunk/apps/dsm/mods/mod_sys/ModSys.cpp
===================================================================
--- trunk/apps/dsm/mods/mod_sys/ModSys.cpp 2009-03-26 17:19:27 UTC (rev
1339)
+++ trunk/apps/dsm/mods/mod_sys/ModSys.cpp 2009-03-30 13:08:24 UTC (rev
1340)
@@ -34,8 +34,6 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include "DSMCoreModule.h"
-
SC_EXPORT(SCSysModule);
SCSysModule::SCSysModule() {
Modified: trunk/apps/dsm/mods/mod_uri/ModUri.cpp
===================================================================
--- trunk/apps/dsm/mods/mod_uri/ModUri.cpp 2009-03-26 17:19:27 UTC (rev
1339)
+++ trunk/apps/dsm/mods/mod_uri/ModUri.cpp 2009-03-30 13:08:24 UTC (rev
1340)
@@ -34,7 +34,6 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include "DSMCoreModule.h"
#include "AmUriParser.h"
SC_EXPORT(URIModule);
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev