Changeset 4893 for branches/erijo-dev
- Timestamp:
- 04/14/07 07:09:11 (20 months ago)
- Files:
-
- 1 modified
-
branches/erijo-dev/licq/src/daemon.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/erijo-dev/licq/src/daemon.cpp
r4889 r4893 19 19 20 20 #include "daemon.h" 21 #include "plugin/plugininstance.h" 21 22 22 23 #include <sys/time.h> … … 123 124 Log.debug("Done rebuilding plugin cache."); 124 125 126 IPlugin* p = PluginRepository->createPlugin("TestPlugin"); 127 assert(p != NULL); 128 129 TPluginInstance instance(p); 130 const bool init = instance.init(TStringList()); 131 assert(init == true); 132 if (!init) return -1; 133 instance.getThread()->start(); 134 125 135 EventLoop.addTimer(1000, this); 126 136 EventLoop.addTimer(500, this); … … 129 139 TEventLoop::ACTION_READ_FD, this); 130 140 141 IEventPtr event = IEvent::create(0, "hello"); 142 event->setProperty("text", "Hello World!"); 143 instance.getEventQueue()->push(event); 144 131 145 const int ret = EventLoop.run(); 146 147 instance.getThread()->cancel(); 148 instance.getThread()->join(); 149 132 150 if (ret != 0) 133 151 Log.error("Daemon exited with non-zero exit code (%d)", ret);
