summaryrefslogtreecommitdiff
path: root/project2/cgi
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2013-06-21 00:07:15 +0000
committerrandomdan <randomdan@localhost>2013-06-21 00:07:15 +0000
commit4d0e24e114e41db8899c8c8e0292a33a4a7a8490 (patch)
tree00e18f91a05f2f4b8c62ebd7450d54f879742024 /project2/cgi
parentMove options into the global scope (diff)
downloadproject2-4d0e24e114e41db8899c8c8e0292a33a4a7a8490.tar.bz2
project2-4d0e24e114e41db8899c8c8e0292a33a4a7a8490.tar.xz
project2-4d0e24e114e41db8899c8c8e0292a33a4a7a8490.zip
Split the plugable stuff into its own files/classes
Diffstat (limited to 'project2/cgi')
-rw-r--r--project2/cgi/cgiCommon.cpp2
-rw-r--r--project2/cgi/p2webCgi.cpp8
-rw-r--r--project2/cgi/p2webFCgi.cpp8
-rw-r--r--project2/cgi/testCgi.cpp2
4 files changed, 10 insertions, 10 deletions
diff --git a/project2/cgi/cgiCommon.cpp b/project2/cgi/cgiCommon.cpp
index 92725c1..58b7e71 100644
--- a/project2/cgi/cgiCommon.cpp
+++ b/project2/cgi/cgiCommon.cpp
@@ -45,7 +45,7 @@ cgiServe(cgicc::CgiInput * i, CgiEnvironment * env, std::ostream & IO, const Cgi
env->init();
CgiApplicationEngine app(env, IO);
- LoaderBase::onAllComponents(boost::bind(&ComponentLoader::onBefore, _1));
+ Plugable::onAllComponents(boost::bind(&ComponentLoader::onBefore, _1));
Logger()->messagef(LOG_DEBUG, "%s: Processing request", __FUNCTION__);
app.process();
Logger()->messagef(LOG_DEBUG, "%s: Completed request", __FUNCTION__);
diff --git a/project2/cgi/p2webCgi.cpp b/project2/cgi/p2webCgi.cpp
index 80b5a98..1b2aa99 100644
--- a/project2/cgi/p2webCgi.cpp
+++ b/project2/cgi/p2webCgi.cpp
@@ -15,12 +15,12 @@ class GetEnv : public CgiEnvInput {
int
main(void)
{
- LoaderBase::onAllComponents(boost::bind(&ComponentLoader::onBegin, _1));
+ Plugable::onAllComponents(boost::bind(&ComponentLoader::onBegin, _1));
CgiEnvironment env;
GetEnv ge;
cgiServe(NULL, &env, std::cout, &ge);
- LoaderBase::onAllComponents(boost::bind(&ComponentLoader::onIteration, _1));
- LoaderBase::onAllComponents(boost::bind(&ComponentLoader::onPeriodic, _1));
- LoaderBase::onAllComponents(boost::bind(&ComponentLoader::onIdle, _1));
+ Plugable::onAllComponents(boost::bind(&ComponentLoader::onIteration, _1));
+ Plugable::onAllComponents(boost::bind(&ComponentLoader::onPeriodic, _1));
+ Plugable::onAllComponents(boost::bind(&ComponentLoader::onIdle, _1));
}
diff --git a/project2/cgi/p2webFCgi.cpp b/project2/cgi/p2webFCgi.cpp
index e0782e0..7eb631f 100644
--- a/project2/cgi/p2webFCgi.cpp
+++ b/project2/cgi/p2webFCgi.cpp
@@ -11,7 +11,7 @@ void
p2webPeriodic()
{
time(&lastPeriodic);
- LoaderBase::onAllComponents(boost::bind(&ComponentLoader::onPeriodic, _1));
+ Plugable::onAllComponents(boost::bind(&ComponentLoader::onPeriodic, _1));
}
static
@@ -21,7 +21,7 @@ p2webGoingIdle(int)
if (time(NULL) > lastPeriodic + periodicDelay) {
p2webPeriodic();
}
- LoaderBase::onAllComponents(boost::bind(&ComponentLoader::onIdle, _1));
+ Plugable::onAllComponents(boost::bind(&ComponentLoader::onIdle, _1));
}
int
@@ -41,13 +41,13 @@ main(void)
}
alarm(60);
CgiEnvironment env;
- LoaderBase::onAllComponents(boost::bind(&ComponentLoader::onBegin, _1));
+ Plugable::onAllComponents(boost::bind(&ComponentLoader::onBegin, _1));
while (FCGX_Accept_r(&request) == 0) {
alarm(0);
cgicc::FCgiIO IO(request);
cgiServe(&IO, &env, IO, &IO);
FCGX_Finish_r(&request);
- LoaderBase::onAllComponents(boost::bind(&ComponentLoader::onIteration, _1));
+ Plugable::onAllComponents(boost::bind(&ComponentLoader::onIteration, _1));
if (time(NULL) > lastPeriodic + periodicDelay) {
p2webPeriodic();
}
diff --git a/project2/cgi/testCgi.cpp b/project2/cgi/testCgi.cpp
index cff947d..cd42873 100644
--- a/project2/cgi/testCgi.cpp
+++ b/project2/cgi/testCgi.cpp
@@ -13,7 +13,7 @@ class TestInput : public cgicc::CgiInput, public CgiEnvInput {
class TestConfigConsumer : public ConfigConsumer {
public:
void operator()(const Glib::ustring & n, const Glib::ustring & p, const Glib::ustring & v) const {
- LoaderBase::onAll<Options>(boost::bind(&Options::consume, _1, n, p, v));
+ Plugable::onAll<Options>(boost::bind(&Options::consume, _1, n, p, v));
}
const Options::Option * get(const Glib::ustring &) const {
return NULL;