simplified dependencies: everything needed for a module is in DSMModule.h

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1340 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 18 years ago
parent e1a05e966f
commit c0a6522f6e

@ -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;

@ -37,9 +37,6 @@ using std::map;
class AmSession;
class DSMSession;
void splitCmd(const string& from_str,
string& cmd, string& params);
class DSMCoreModule
: public DSMModule {
@ -120,24 +117,4 @@ class TestDSMCondition
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

@ -85,3 +85,13 @@ string resolveVars(const string s, AmSession* sess,
}
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;
}

@ -213,6 +213,10 @@ class SCStrArgAction
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 @@ string resolveVars(const string s, AmSession* sess,
#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

@ -32,8 +32,6 @@
#include "AmRtpAudio.h"
#include "DSMSession.h"
#include "DSMCoreModule.h"
#include "ModConference.h"
SC_EXPORT(ConfModule);

@ -32,8 +32,6 @@
#include "AmSession.h"
#include <string.h>
#include "DSMCoreModule.h"
SC_EXPORT(DLGModule);
DLGModule::DLGModule() {

@ -31,7 +31,6 @@
#include "ampi/MonitoringAPI.h"
#include "DSMSession.h"
#include "DSMCoreModule.h"
#include "AmSession.h"
#include "ModMonitoring.h"

@ -32,8 +32,6 @@
#include "DSMSession.h"
#include "AmSession.h"
#include "DSMCoreModule.h"
SC_EXPORT(SCMysqlModule);
SCMysqlModule::SCMysqlModule() {

@ -34,8 +34,6 @@
#include <sys/stat.h>
#include <sys/types.h>
#include "DSMCoreModule.h"
SC_EXPORT(SCSysModule);
SCSysModule::SCSysModule() {

@ -34,7 +34,6 @@
#include <sys/stat.h>
#include <sys/types.h>
#include "DSMCoreModule.h"
#include "AmUriParser.h"
SC_EXPORT(URIModule);

Loading…
Cancel
Save