Yate

- Main Page
- Namespaces
- Classes
- Files

- File List

yatengine.h
1
22 #ifndef __YATENGINE_H
23 #define __YATENGINE_H
24
25 #ifndef __cplusplus
26 #error C++ is required
27 #endif
28
29 #include <yateclass.h>
30
34 namespace TelEngine {
35
40 class YATE_API Configuration : public String
41 {
42 YNOCOPY(Configuration); // no automatic copies please
43 public:
47 Configuration();
48
54 explicit Configuration(const char* filename, bool warn = true);
55
59 inline Configuration& operator=(const String& value)
60 { String::operator=(value); return *this; }
61
66 inline unsigned int sections() const
67 { return m_sections.length(); }
68
73 inline unsigned int count() const
74 { return m_sections.count(); }
75
81 NamedList* getSection(unsigned int index) const;
82
88 NamedList* getSection(const String& sect) const;
89
96 NamedString* getKey(const String& sect, const String& key) const;
97
105 const char* getValue(const String& sect, const String& key, const char* defvalue = 0) const;
106
118 int getIntValue(const String& sect, const String& key, int defvalue = 0,
119 int minvalue = INT_MIN, int maxvalue = INT_MAX, bool clamp = true) const;
120
129 int getIntValue(const String& sect, const String& key, const TokenDict* tokens, int defvalue = 0) const;
130
142 int64_t getInt64Value(const String& sect, const String& key, int64_t defvalue = 0,
143 int64_t minvalue = LLONG_MIN, int64_t maxvalue = LLONG_MAX, bool clamp = true) const;
144
152 double getDoubleValue(const String& sect, const String& key, double defvalue = 0.0) const;
153
161 bool getBoolValue(const String& sect, const String& key, bool defvalue = false) const;
162
167 void clearSection(const char* sect = 0);
168
174 NamedList* createSection(const String& sect);
175
181 void clearKey(const String& sect, const String& key);
182
189 void addValue(const String& sect, const char* key, const char* value = 0);
190
197 void setValue(const String& sect, const char* key, const char* value = 0);
198
205 void setValue(const String& sect, const char* key, int value);
206
213 void setValue(const String& sect, const char* key, bool value);
214
220 bool load(bool warn = true);
221
226 bool save() const;
227
228 private:
229 ObjList *getSectHolder(const String& sect) const;
230 ObjList *makeSectHolder(const String& sect);
231 bool loadFile(const char* file, String sect, unsigned int depth, bool warn);
232 ObjList m_sections;
233 };
234
239 class YATE_API SharedVars : public Mutex
240 {
241 public:
245 inline SharedVars()
246 : Mutex(false,"SharedVars"), m_vars("")
247 { }
248
254 void get(const String& name, String& rval);
255
261 void set(const String& name, const char* val);
262
269 bool create(const String& name, const char* val = 0);
270
275 void clear(const String& name);
276
282 bool exists(const String& name);
283
290 unsigned int inc(const String& name, unsigned int wrap = 0);
291
298 unsigned int dec(const String& name, unsigned int wrap = 0);
299
300 private:
301 NamedList m_vars;
302 };
303
304 class MessageDispatcher;
305 class MessageRelay;
306 class Engine;
307
312 class YATE_API Message : public NamedList
313 {
314 friend class MessageDispatcher;
315 public:
323 explicit Message(const char* name, const char* retval = 0, bool broadcast = false);
324
330 Message(const Message& original);
331
338 Message(const Message& original, bool broadcast);
339
343 ~Message();
344
350 virtual void* getObject(const String& name) const;
351
356 inline String& retValue()
357 { return m_return; }
358
363 inline const String& retValue() const
364 { return m_return; }
365
370 inline RefObject* userData() const
371 { return m_data; }
372
379 void userData(RefObject* data);
380
386 inline void* userObject(const String& name) const
387 { return m_data ? m_data->getObject(name) : 0; }
388
389
395 inline void setNotify(bool notify = true)
396 { m_notify = notify; }
397
402 inline bool broadcast() const
403 { return m_broadcast; }
404
409 inline Time& msgTime()
410 { return m_time; }
411
416 inline const Time& msgTime() const
417 { return m_time; }
418
422 inline Message& operator=(const char* value)
423 { String::operator=(value); return *this; }
424
430 String encode(const char* id) const;
431
438 String encode(bool received, const char* id) const;
439
448 int decode(const char* str, String& id);
449
459 int decode(const char* str, bool& received, const char* id);
460
461 protected:
468 virtual void dispatched(bool accepted);
469
470 private:
471 Message(); // no default constructor please
472 Message& operator=(const Message& value); // no assignment please
473 String m_return;
474 Time m_time;
475 RefObject* m_data;
476 bool m_notify;
477 bool m_broadcast;
478 void commonEncode(String& str) const;
479 int commonDecode(const char* str, int offs);
480 };
481
488 class YATE_API MessageHandler : public String
489 {
490 friend class MessageDispatcher;
491 YNOCOPY(MessageHandler); // no automatic copies please
492 public:
500 explicit MessageHandler(const char* name, unsigned priority = 100,
501 const char* trackName = 0, bool addPriority = true);
502
506 virtual ~MessageHandler();
507
511 virtual void destruct();
512
518 virtual bool received(Message& msg) = 0;
519
524 inline unsigned priority() const
525 { return m_priority; }
526
531 inline const String& trackName() const
532 { return m_trackName; }
533
539 inline void trackName(const char* name)
540 { if (!m_dispatcher) m_trackName = name; }
541
546 inline NamedCounter* objectsCounter() const
547 { return m_counter; }
548
552 inline const NamedString* filter() const
553 { return m_filter; }
554
558 inline const Regexp* filterRegexp() const
559 { return m_filterRegexp; }
560
566 void setFilter(NamedString* filter);
567
573 inline void setFilter(const char* name, const char* value)
574 { setFilter(new NamedString(name,value)); }
575
579 void clearFilter();
580
581 protected:
586 void cleanup();
587
593 virtual bool receivedInternal(Message& msg);
594
598 void safeNowInternal();
599
600 private:
601 String m_trackName;
602 unsigned m_priority;
603 int m_unsafe;
604 MessageDispatcher* m_dispatcher;
605 NamedString* m_filter;
606 Regexp* m_filterRegexp;
607 NamedCounter* m_counter;
608 };
609
614 class YATE_API MessageReceiver : public GenObject
615 {
616 public:
623 virtual bool received(Message& msg, int id) = 0;
624 };
625
630 class YATE_API MessageRelay : public MessageHandler
631 {
632 YNOCOPY(MessageRelay); // no automatic copies please
633 public:
643 inline MessageRelay(const char* name, MessageReceiver* receiver, int id,
644 int priority = 100, const char* trackName = 0, bool addPriority = true)
645 : MessageHandler(name,priority,trackName,addPriority),
646 m_receiver(receiver), m_id(id)
647 { }
648
655 virtual bool received(Message& msg)
656 { return m_receiver && m_receiver->received(msg,m_id); }
657
662 inline int id() const
663 { return m_id; }
664
670 virtual bool receivedInternal(Message& msg);
671
672 private:
673 MessageReceiver* m_receiver;
674 int m_id;
675 };
676
683 class YATE_API MessageNotifier
684 {
685 public:
689 virtual ~MessageNotifier();
690
696 virtual void dispatched(const Message& msg, bool handled) = 0;
697 };
698
705 class YATE_API MessagePostHook : public RefObject, public MessageNotifier
706 {
707 };
708
715 class YATE_API MessageDispatcher : public GenObject, public Mutex
716 {
717 friend class Engine;
718 YNOCOPY(MessageDispatcher); // no automatic copies please
719 public:
724 MessageDispatcher(const char* trackParam = 0);
725
729 ~MessageDispatcher();
730
735 inline const String& trackParam() const
736 { return m_trackParam; }
737
746 bool install(MessageHandler* handler);
747
753 bool uninstall(MessageHandler* handler);
754
766 bool dispatch(Message& msg);
767
773 bool enqueue(Message* msg);
774
778 void dequeue();
779
784 bool dequeueOne();
785
790 inline void warnTime(u_int64_t usec)
791 { m_warnTime = usec; }
792
796 inline void clear()
797 { m_handlers.clear(); m_hookAppend = &m_hooks; m_hooks.clear(); }
798
803 inline bool hasMessages() const
804 { return m_messages.get() || m_messages.next(); }
805
810 inline bool hasHandlers() const
811 { return m_handlers.get() || m_handlers.next(); }
812
817 inline bool hasHooks() const
818 { return m_hooks.get() || m_hooks.next(); }
819
824 unsigned int messageCount();
825
830 unsigned int handlerCount();
831
836 unsigned int postHookCount();
837
842 u_int64_t enqueueCount() const
843 { return m_enqueueCount; }
844
849 u_int64_t dequeueCount() const
850 { return m_dequeueCount; }
851
856 u_int64_t dispatchCount() const
857 { return m_dispatchCount; }
858
863 u_int64_t queuedMax() const
864 { return m_queuedMax; }
865
871 u_int64_t messageAge(bool usec = false) const
872 { return usec ? m_msgAvgAge : ((m_msgAvgAge + 500) / 1000); }
873
881 void getStats(u_int64_t& enqueued, u_int64_t& dequeued, u_int64_t& dispatched, u_int64_t& queueMax);
882
888 void setHook(MessagePostHook* hook, bool remove = false);
889
890 protected:
895 inline void trackParam(const char* paramName)
896 { m_trackParam = paramName; }
897
898 private:
899 ObjList m_handlers;
900 ObjList m_messages;
901 ObjList m_hooks;
902 Mutex m_hookMutex;
903 ObjList* m_msgAppend;
904 ObjList* m_hookAppend;
905 String m_trackParam;
906 unsigned int m_changes;
907 u_int64_t m_warnTime;
908 u_int64_t m_enqueueCount;
909 u_int64_t m_dequeueCount;
910 u_int64_t m_dispatchCount;
911 u_int64_t m_queuedMax;
912 u_int64_t m_msgAvgAge;
913 int m_hookCount;
914 bool m_hookHole;
915 };
916
921 class YATE_API MessageHook : public RefObject
922 {
923 public:
929 virtual bool enqueue(Message* msg) = 0;
930
934 virtual void clear() = 0;
935
941 virtual bool matchesFilter(const Message& msg) = 0;
942 };
943
944
950 class YATE_API MessageQueue : public MessageHook, public Mutex
951 {
952 friend class Engine;
953 public:
959 MessageQueue(const char* hookName, int numWorkers = 0);
960
964 ~MessageQueue();
965
971 virtual bool enqueue(Message* msg);
972
977 bool dequeue();
978
984 void addFilter(const char* name, const char* value);
985
990 void removeFilter(const String& name);
991
995 virtual void clear();
996
1001 void removeThread(Thread* thread);
1002
1007 inline unsigned int count() const
1008 { return m_count; }
1009
1014 inline const NamedList& getFilters() const
1015 { return m_filters; }
1016
1022 virtual bool matchesFilter(const Message& msg);
1023 protected:
1024
1030 virtual void received(Message& msg);
1031
1032 private:
1033 NamedList m_filters;
1034 ObjList m_messages;
1035 ObjList m_workers;
1036 ObjList* m_append;
1037 unsigned int m_count;
1038 };
1039
1040
1051 class YATE_API Plugin : public GenObject, public DebugEnabler
1052 {
1053 public:
1059 explicit Plugin(const char* name, bool earlyInit = false);
1060
1066 virtual ~Plugin();
1067
1072 virtual const String& toString() const
1073 { return m_name; }
1074
1080 virtual void* getObject(const String& name) const;
1081
1085 virtual void initialize() = 0;
1086
1091 virtual bool isBusy() const
1092 { return false; }
1093
1098 inline const String& name() const
1099 { return m_name; }
1100
1105 inline NamedCounter* objectsCounter() const
1106 { return m_counter; }
1107
1112 bool earlyInit() const
1113 { return m_early; }
1114
1115 private:
1116 Plugin(); // no default constructor please
1117 String m_name;
1118 NamedCounter* m_counter;
1119 bool m_early;
1120 };
1121
1122 #if 0 /* for documentation generator */
1123
1127 void INIT_PLUGIN(class pclass);
1128
1134 bool UNLOAD_PLUGIN(bool unloadNow);
1135 #endif
1136
1137 #define INIT_PLUGIN(pclass) static pclass __plugin
1138 #ifdef DISABLE_UNLOAD
1139 #define UNLOAD_PLUGIN(arg) static bool _unused_unload(bool arg)
1140 #else
1141 #ifdef _WINDOWS
1142 #define UNLOAD_PLUGIN(arg) extern "C" __declspec(dllexport) bool _unload(bool arg)
1143 #else
1144 #define UNLOAD_PLUGIN(arg) extern "C" bool _unload(bool arg)
1145 #endif
1146 #endif
1147
1154 class YATE_API EngineCheck
1155 {
1156 public:
1160 virtual ~EngineCheck()
1161 { }
1162
1169 virtual bool check(const ObjList* cmds) = 0;
1170
1175 static void setChecker(EngineCheck* ptr = 0);
1176 };
1177
1181 typedef int (*EngineLoop)();
1182
1189 class YATE_API Engine
1190 {
1191 friend class EnginePrivate;
1192 friend class EngineCommand;
1193 YNOCOPY(Engine); // no automatic copies please
1194 public:
1198 enum RunMode {
1199 Stopped = 0,
1200 Console = 1,
1201 Server = 2,
1202 Client = 3,
1203 ClientProxy = 4,
1204 };
1205
1206 enum CallAccept {
1207 Accept = 0,
1208 Partial = 1,
1209 Congestion = 2,
1210 Reject = 3,
1211 };
1212
1219 enum PluginMode {
1220 LoadFail = 0,
1221 LoadLate,
1222 LoadEarly
1223 };
1224
1235 static int main(int argc, const char** argv, const char** env,
1236 RunMode mode = Console, EngineLoop loop = 0, bool fail = false);
1237
1243 static void help(bool client, bool errout = false);
1244
1249 int engineInit();
1250
1255 int engineCleanup();
1256
1261 int run();
1262
1267 static Engine* self();
1268
1273 static RunMode mode()
1274 { return s_mode; }
1275
1280 inline static CallAccept accept() {
1281 return (s_congestion && (s_accept < Congestion)) ? Congestion : s_accept;
1282 }
1283
1288 inline static void setAccept(CallAccept ca) {
1289 s_accept = ca;
1290 }
1291
1296 inline static const TokenDict* getCallAcceptStates() {
1297 return s_callAccept;
1298 }
1299
1304 static void setCongestion(const char* reason = 0);
1305
1310 static unsigned int getCongestion()
1311 { return s_congestion; }
1312
1317 inline static bool clientMode()
1318 { return (s_mode == Client) || (s_mode == ClientProxy); }
1319
1326 static bool Register(const Plugin* plugin, bool reg = true);
1327
1332 inline static const String& nodeName()
1333 { return s_node; }
1334
1339 inline static const String& sharedPath()
1340 { return s_shrpath; }
1341
1348 static String configFile(const char* name, bool user = false);
1349
1355 static const String& configPath(bool user = false);
1356
1361 inline static const String& configSuffix()
1362 { return s_cfgsuffix; }
1363
1367 inline static const String& modulePath()
1368 { return s_modpath; }
1369
1375 static void extraPath(const String& path);
1376
1383 static void userPath(const String& path);
1384
1389 inline static const String& moduleSuffix()
1390 { return s_modsuffix; }
1391
1396 static const char* pathSeparator();
1397
1405 static const Configuration& config();
1406
1411 static unsigned int runId();
1412
1417 inline static const NamedList& runParams()
1418 { return s_params; }
1419
1423 static void init();
1424
1430 static bool init(const String& name);
1431
1436 static void halt(unsigned int code);
1437
1444 static bool restart(unsigned int code, bool gracefull = false);
1445
1450 static bool started()
1451 { return s_started; }
1452
1457 static bool exiting()
1458 { return (s_haltcode != -1); }
1459
1465 static bool install(MessageHandler* handler);
1466
1472 static bool uninstall(MessageHandler* handler);
1473
1480 static bool enqueue(Message* msg, bool skipHooks = false);
1481
1489 inline static bool enqueue(const char* name, bool broadcast = false)
1490 { return name && *name && enqueue(new Message(name,0,broadcast)); }
1491
1497 static bool dispatch(Message* msg);
1498
1504 static bool dispatch(Message& msg);
1505
1513 static bool dispatch(const char* name, bool broadcast = false);
1514
1520 inline void setHook(MessagePostHook* hook, bool remove = false)
1521 { m_dispatcher.setHook(hook,remove); }
1522
1527 inline static const String& trackParam()
1528 { return s_self ? s_self->m_dispatcher.trackParam() : String::empty(); }
1529
1535 static bool installHook(MessageHook* hook);
1536
1541 static void uninstallHook(MessageHook* hook);
1542
1547 int usedPlugins();
1548
1553 inline unsigned int messageCount()
1554 { return m_dispatcher.messageCount(); }
1555
1560 inline unsigned int handlerCount()
1561 { return m_dispatcher.handlerCount(); }
1562
1567 inline unsigned int postHookCount()
1568 { return m_dispatcher.postHookCount(); }
1569
1574 inline unsigned int messageRate() const
1575 { return m_messageRate; }
1576
1581 inline unsigned int messageMaxRate() const
1582 { return m_maxMsgRate; }
1583
1589 unsigned int messageAge(bool usec = false) const
1590 { return (unsigned int)m_dispatcher.messageAge(usec); }
1591
1599 inline void getStats(u_int64_t& enqueued, u_int64_t& dequeued, u_int64_t& dispatched, u_int64_t& queueMax)
1600 { m_dispatcher.getStats(enqueued,dequeued,dispatched,queueMax); }
1601
1605 inline void resetMax()
1606 { m_maxMsgRate = m_messageRate; m_dispatcher.m_queuedMax = m_dispatcher.messageCount(); }
1607
1613 inline bool pluginLoaded(const String& name) const
1614 { return !!m_libs[name]; }
1615
1621 bool loadPluginDir(const String& relPath);
1622
1627 static void pluginMode(PluginMode mode);
1628
1634 static const ObjList* events(const String& type);
1635
1640 static void clearEvents(const String& type);
1641
1646 static SharedVars& sharedVars();
1647
1654 static void buildCmdLine(String& line);
1655
1664 static void initLibrary(const String& line, String* output = 0);
1665
1671 static int cleanupLibrary();
1672
1673 protected:
1678 ~Engine();
1679
1687 bool loadPlugin(const char* file, bool local = false, bool nounload = false);
1688
1692 void loadPlugins();
1693
1697 void initPlugins();
1698
1699 private:
1700 Engine();
1701 void internalStatisticsStart();
1702 void tryPluginFile(const String& name, const String& path, bool defload);
1703 ObjList m_libs;
1704 MessageDispatcher m_dispatcher;
1705 uint64_t m_dispatchedLast;
1706 unsigned int m_messageRate;
1707 unsigned int m_maxMsgRate;
1708 bool m_rateCongested;
1709 bool m_queueCongested;
1710 bool m_ageCongested;
1711 static Engine* s_self;
1712 static String s_node;
1713 static String s_shrpath;
1714 static String s_cfgsuffix;
1715 static String s_modpath;
1716 static String s_modsuffix;
1717 static ObjList s_extramod;
1718 static NamedList s_params;
1719 static int s_haltcode;
1720 static RunMode s_mode;
1721 static bool s_started;
1722 static unsigned int s_congestion;
1723 static CallAccept s_accept;
1724 static const TokenDict s_callAccept[];
1725 };
1726
1727 }; // namespace TelEngine
1728
1729 #endif /* __YATENGINE_H */
1730
1731 /* vi: set ts=8 sw=4 sts=4 noet: */
TelEngine::MessageDispatcher::hasHooks
bool hasHooks() const
Definition: yatengine.h:817
TelEngine::Engine::messageAge
unsigned int messageAge(bool usec=false) const
Definition: yatengine.h:1589
TelEngine::MessageRelay::received
virtual bool received(Message &msg)
Definition: yatengine.h:655
TelEngine::Engine::enqueue
static bool enqueue(const char *name, bool broadcast=false)
Definition: yatengine.h:1489
TelEngine::Engine::messageMaxRate
unsigned int messageMaxRate() const
Definition: yatengine.h:1581
TelEngine::Engine::mode
static RunMode mode()
Definition: yatengine.h:1273
TelEngine::EngineCheck
Engine checker interface.
Definition: yatengine.h:1154
TelEngine::MessageDispatcher::hasHandlers
bool hasHandlers() const
Definition: yatengine.h:810
TelEngine::MessagePostHook
Post-dispatching message hook that can be added to a list.
Definition: yatengine.h:705
TelEngine::RefObject
Definition: yateclass.h:1173
TelEngine::Regexp
A regexp matching class.
Definition: yateclass.h:3270
TelEngine::MessageDispatcher::enqueueCount
u_int64_t enqueueCount() const
Definition: yatengine.h:842
TelEngine::MessageNotifier
Post-dispatching message hook.
Definition: yatengine.h:683
TelEngine::Engine::messageRate
unsigned int messageRate() const
Definition: yatengine.h:1574
TelEngine::MessageQueue::count
unsigned int count() const
Definition: yatengine.h:1007
TelEngine::Thread
Thread support class.
Definition: yateclass.h:6004
TelEngine::MessageDispatcher::trackParam
const String & trackParam() const
Definition: yatengine.h:735
TelEngine::MessageHandler::priority
unsigned priority() const
Definition: yatengine.h:524
TelEngine::Message::retValue
String & retValue()
Definition: yatengine.h:356
TelEngine::Engine::resetMax
void resetMax()
Definition: yatengine.h:1605
TelEngine::Engine::nodeName
static const String & nodeName()
Definition: yatengine.h:1332
TelEngine::Engine::accept
static CallAccept accept()
Definition: yatengine.h:1280
TelEngine::Message::msgTime
const Time & msgTime() const
Definition: yatengine.h:416
TelEngine::Message::userObject
void * userObject(const String &name) const
Definition: yatengine.h:386
TelEngine::Engine::postHookCount
unsigned int postHookCount()
Definition: yatengine.h:1567
TelEngine::Engine::getCallAcceptStates
static const TokenDict * getCallAcceptStates()
Definition: yatengine.h:1296
TelEngine::Configuration
Configuration file handling.
Definition: yatengine.h:40
TelEngine::MessageHandler::objectsCounter
NamedCounter * objectsCounter() const
Definition: yatengine.h:546
TelEngine::Configuration::sections
unsigned int sections() const
Definition: yatengine.h:66
TelEngine::MessageReceiver
A multiple message receiver.
Definition: yatengine.h:614
TelEngine::MessageRelay::MessageRelay
MessageRelay(const char *name, MessageReceiver *receiver, int id, int priority=100, const char *trackName=0, bool addPriority=true)
Definition: yatengine.h:643
TelEngine::EngineLoop
int(* EngineLoop)()
Definition: yatengine.h:1181
TelEngine::Engine::setAccept
static void setAccept(CallAccept ca)
Definition: yatengine.h:1288
TelEngine::MessageDispatcher
A message dispatching hub.
Definition: yatengine.h:715
TelEngine::MessageRelay
A message handler relay.
Definition: yatengine.h:630
TelEngine::Engine::sharedPath
static const String & sharedPath()
Definition: yatengine.h:1339
TelEngine::Configuration::operator=
Configuration & operator=(const String &value)
Definition: yatengine.h:59
TelEngine::Message::msgTime
Time & msgTime()
Definition: yatengine.h:409
TelEngine::MessageDispatcher::warnTime
void warnTime(u_int64_t usec)
Definition: yatengine.h:790
TelEngine::MessageRelay::id
int id() const
Definition: yatengine.h:662
TelEngine::Engine::pluginLoaded
bool pluginLoaded(const String &name) const
Definition: yatengine.h:1613
TelEngine::String::operator=
String & operator=(const String &value)
Definition: yateclass.h:2567
TelEngine::Engine::PluginMode
PluginMode
Definition: yatengine.h:1219
TelEngine::MessageQueue
A message queue.
Definition: yatengine.h:950
TelEngine::destruct
void destruct(GenObject *obj)
Definition: yateclass.h:1157
TelEngine::Engine::exiting
static bool exiting()
Definition: yatengine.h:1457
TelEngine::Engine::configSuffix
static const String & configSuffix()
Definition: yatengine.h:1361
TelEngine::Engine::runParams
static const NamedList & runParams()
Definition: yatengine.h:1417
TelEngine::Engine::trackParam
static const String & trackParam()
Definition: yatengine.h:1527
TelEngine::Time
A time holding class.
Definition: yateclass.h:3926
TelEngine::MessageDispatcher::hasMessages
bool hasMessages() const
Definition: yatengine.h:803
TelEngine::Message::retValue
const String & retValue() const
Definition: yatengine.h:363
TelEngine::DebugEnabler
A holder for a debug level.
Definition: yateclass.h:311
TelEngine::Message
A message container class.
Definition: yatengine.h:312
TelEngine::Engine::modulePath
static const String & modulePath()
Definition: yatengine.h:1367
TelEngine::Engine::getStats
void getStats(u_int64_t &enqueued, u_int64_t &dequeued, u_int64_t &dispatched, u_int64_t &queueMax)
Definition: yatengine.h:1599
TelEngine::SharedVars
Atomic access and operations to shared variables.
Definition: yatengine.h:239
TelEngine::Engine::setHook
void setHook(MessagePostHook *hook, bool remove=false)
Definition: yatengine.h:1520
TelEngine::MessageDispatcher::messageAge
u_int64_t messageAge(bool usec=false) const
Definition: yatengine.h:871
TelEngine::Message::userData
RefObject * userData() const
Definition: yatengine.h:370
TelEngine::Engine::clientMode
static bool clientMode()
Definition: yatengine.h:1317
TelEngine::Plugin::toString
virtual const String & toString() const
Definition: yatengine.h:1072
TelEngine::MessageHandler::filterRegexp
const Regexp * filterRegexp() const
Definition: yatengine.h:558
TelEngine::MessageHandler::setFilter
void setFilter(const char *name, const char *value)
Definition: yatengine.h:573
TelEngine::NamedString
A named string class.
Definition: yateclass.h:3480
TelEngine::Engine::handlerCount
unsigned int handlerCount()
Definition: yatengine.h:1560
TelEngine::MessageHandler::filter
const NamedString * filter() const
Definition: yatengine.h:552
TelEngine::MessageDispatcher::trackParam
void trackParam(const char *paramName)
Definition: yatengine.h:895
TelEngine::MessageDispatcher::queuedMax
u_int64_t queuedMax() const
Definition: yatengine.h:863
TelEngine::SharedVars::SharedVars
SharedVars()
Definition: yatengine.h:245
TelEngine::NamedList
A named string container class.
Definition: yateclass.h:5015
TelEngine::INIT_PLUGIN
void INIT_PLUGIN(class pclass)
TelEngine::MessageHandler
A message handler.
Definition: yatengine.h:488
TelEngine::MessageDispatcher::dequeueCount
u_int64_t dequeueCount() const
Definition: yatengine.h:849
TelEngine::MessageDispatcher::clear
void clear()
Definition: yatengine.h:796
TelEngine::Configuration::count
unsigned int count() const
Definition: yatengine.h:73
TelEngine::MessageDispatcher::dispatchCount
u_int64_t dispatchCount() const
Definition: yatengine.h:856
TelEngine
Definition: yateclass.h:219
TelEngine::Message::broadcast
bool broadcast() const
Definition: yatengine.h:402
TelEngine::String
A C-style string handling class.
Definition: yateclass.h:2130
TelEngine::TokenDict
Definition: yateclass.h:848
TelEngine::Message::setNotify
void setNotify(bool notify=true)
Definition: yatengine.h:395
TelEngine::Plugin::name
const String & name() const
Definition: yatengine.h:1098
TelEngine::Engine::moduleSuffix
static const String & moduleSuffix()
Definition: yatengine.h:1389
TelEngine::ObjList
An object list class.
Definition: yateclass.h:1453
TelEngine::UNLOAD_PLUGIN
bool UNLOAD_PLUGIN(bool unloadNow)
TelEngine::YNOCOPY
void YNOCOPY(class type)
TelEngine::Engine::getCongestion
static unsigned int getCongestion()
Definition: yatengine.h:1310
TelEngine::MessageQueue::getFilters
const NamedList & getFilters() const
Definition: yatengine.h:1014
TelEngine::String::empty
static const String & empty()
TelEngine::Plugin::isBusy
virtual bool isBusy() const
Definition: yatengine.h:1091
TelEngine::MessageHandler::trackName
const String & trackName() const
Definition: yatengine.h:531
TelEngine::Message::operator=
Message & operator=(const char *value)
Definition: yatengine.h:422
TelEngine::Plugin
Plugin support.
Definition: yatengine.h:1051
TelEngine::Engine::RunMode
RunMode
Definition: yatengine.h:1198
TelEngine::Mutex
Mutex support.
Definition: yateclass.h:5606
TelEngine::Engine
Engine globals.
Definition: yatengine.h:1189
TelEngine::GenObject
Definition: yateclass.h:1048
TelEngine::MessageHandler::trackName
void trackName(const char *name)
Definition: yatengine.h:539
TelEngine::Engine::started
static bool started()
Definition: yatengine.h:1450
TelEngine::Engine::messageCount
unsigned int messageCount()
Definition: yatengine.h:1553
TelEngine::EngineCheck::~EngineCheck
virtual ~EngineCheck()
Definition: yatengine.h:1160
TelEngine::Plugin::earlyInit
bool earlyInit() const
Definition: yatengine.h:1112
TelEngine::MessageHook
Abstract message hook.
Definition: yatengine.h:921
TelEngine::Plugin::objectsCounter
NamedCounter * objectsCounter() const
Definition: yatengine.h:1105
TelEngine::Client
Class that runs the User Interface.
Definition: yatecbase.h:993
TelEngine::NamedCounter
Atomic counter with name.
Definition: yateclass.h:3601