-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPHPEmbedModule.cpp
More file actions
65 lines (50 loc) · 1.4 KB
/
Copy pathPHPEmbedModule.cpp
File metadata and controls
65 lines (50 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#include "PHPEmbedModule.h"
#include "PHPEventHandler.h"
#include <vector>
using namespace dispatch::config;
using namespace dispatch::config::filter;
namespace dispatch {
namespace module {
namespace phpembed {
vector<PHPEventHandler*> handlers;
PHPEmbedModule::PHPEmbedModule() {
}
PHPEmbedModule::~PHPEmbedModule() {
}
bool PHPEmbedModule::preInitialize() {
vector<PHPEventHandler*>::iterator handler;
for(handler = handlers.begin(); handler < handlers.end(); handler++) {
getEventQueue()->registerHandler(*handler);
}
return true;
}
bool PHPEmbedModule::startup() {
return true;
}
bool PHPEmbedModule::shutdown() {
vector<PHPEventHandler*>::iterator handle_i;
for(handle_i = handlers.begin(); handle_i != handlers.end(); handle_i++) {
delete *handle_i;
}
return true;
}
bool PHPEmbedModule::scanConfigNode(GConfigNode* node) {
// out << "PHPEmbedModule:: Fikk en configNode: " << node << endl;
PHPEventHandler* handler = new PHPEventHandler(this, node);
if (handler->isValid()) {
handlers.push_back(handler);
// getEventQueue()->registerHandler(handler);
return true;
}
delete handler;
return false;
}
}}}
extern "C" {
extern dispatch::module::DispatchModule* initialize_dispatch_module() {
return new dispatch::module::phpembed::PHPEmbedModule();
}
extern void destroy_dispatch_module(dispatch::module::DispatchModule* ptr) {
delete ptr;
}
}