#include <yatengine.h>
Public Types | |
enum | RunMode { Console = 0, Client = 1, Server = 2 } |
Public Member Functions | |
int | run () |
void | setHook (MessagePostHook *hook, bool remove=false) |
int | usedPlugins () |
unsigned int | messageCount () |
unsigned int | handlerCount () |
bool | loadPluginDir (const String &relPath) |
Static Public Member Functions | |
static int | main (int argc, const char **argv, const char **env, RunMode mode=Console, bool fail=false) |
static void | help (bool client, bool errout=false) |
static Engine * | self () |
static bool | Register (const Plugin *plugin, bool reg=true) |
static String | configFile (const char *name, bool user=false) |
static String & | configPath () |
static String & | configSuffix () |
static String & | modulePath () |
static String & | extraPath () |
static String & | moduleSuffix () |
static const char * | pathSeparator () |
static const Configuration & | config () |
static unsigned int | runId () |
static void | init () |
static void | halt (unsigned int code) |
static bool | restart (unsigned int code, bool gracefull=false) |
static bool | exiting () |
static bool | install (MessageHandler *handler) |
static bool | uninstall (MessageHandler *handler) |
static bool | enqueue (Message *msg) |
static bool | enqueue (const char *name) |
static bool | dispatch (Message *msg) |
static bool | dispatch (Message &msg) |
static bool | dispatch (const char *name) |
Protected Member Functions | |
~Engine () | |
bool | loadPlugin (const char *file, bool local=false) |
void | loadPlugins () |
void | initPlugins () |
Friends | |
class | EnginePrivate |
This class holds global information about the engine. Note: this is a singleton class.
|
Running modes - run the engine as Console, Client or Server. |
|
Destroys the engine and everything. You must not call it directly, run() will do it for you. |
|
The global configuration of the engine. You must use this resource with caution. Note that sections [general], [modules], [preload] and [postload] are reserved by the engine. Also [telephony] is reserved by the drivers.
|
|
Get the filename for a specific configuration
|
|
Get the system configuration directory path
|
|
Get the configuration file suffix
|
|
Convenience function. Dispatch a parameterless message to the registered handlers
|
|
Synchronously dispatch a message to the registered handlers
|
|
Synchronously dispatch a message to the registered handlers
|
|
Convenience function. Enqueue a new parameterless message in the message queue
|
|
Enqueue a message in the message queue for asynchronous dispatching
|
|
Check if the engine is currently exiting
|
|
The relative extra module loading path. This is empty by default but can be set by a main program to a value before calling main() |
|
Stop the engine and the entire program
|
|
Get the number of handlers in the dispatcher
|
|
Display the help information on console
|
|
Reinitialize the plugins |
|
Initialize all registered plugins |
|
Installs a handler in the dispatcher.
|
|
Loads one plugin from a shared object file
|
|
Loads the plugins from an extra plugins directory
|
|
Loads the plugins from the plugins directory |
|
Main entry point to be called directly from a wrapper program
|
|
Get the number of messages waiting in the queue
|
|
The module loading path |
|
Get the module filename suffix
|
|
Get the canonical path element separator for the operating system
|
|
Register or unregister a plugin to the engine.
|
|
Stop and restart the engine and the entire program
|
|
Run the engine.
|
|
Get a - supposedly unique - instance ID
|
|
Get a pointer to the unique instance.
|
|
Install or remove a hook to catch messages after being dispatched
|
|
Uninstalls a handler drom the dispatcher.
|
|
Get a count of plugins that are actively in use
|