Added a ClientProxy engine run mode for clients with no local UI.

git-svn-id: http://yate.null.ro/svn/yate/trunk@2759 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2009-07-14 15:49:20 +00:00
parent b4d67b1951
commit fe9c1c1c98
4 changed files with 8 additions and 7 deletions

View File

@ -854,7 +854,7 @@ void Client::loadUI(const char* file, bool init)
ObjList* o = m_windows.skipNull();
for (; o && !getVisible(o->get()->toString()); o = o->skipNext())
;
if (!o)
if ((Engine::mode() == Engine::Client) && !o)
Debug(ClientDriver::self(),DebugWarn,"There is no window visible !!!");
}

View File

@ -271,7 +271,7 @@ static void initUsrPath(String& path, const char* newPath = 0)
path = ::getenv("HOME");
#endif
if (path.null()) {
if (Engine::clientMode())
if (Engine::mode() == Engine::Client)
Debug(DebugWarn,"Could not get per-user application data path!");
path = s_cfgpath;
}
@ -1492,7 +1492,7 @@ int Engine::main(int argc, const char** argv, const char** env, RunMode mode, bo
bool daemonic = false;
bool supervised = false;
#endif
bool client = (mode == Client);
bool client = (mode == Client) || (mode == ClientProxy);
Debugger::Formatting tstamp = Debugger::None;
bool colorize = false;
const char* pidfile = 0;

View File

@ -4248,7 +4248,7 @@ void YJGDriver::initialize()
s_knownCodecs.add("98", "iLBC", "8000", "1", "ilbc30");
// Jabber protocol to use
JBEngine::Protocol proto = (Engine::mode() == Engine::Client) ?
JBEngine::Protocol proto = Engine::clientMode() ?
JBEngine::Client : JBEngine::Component;
NamedString* p = sect->getParam("protocol");
if (p)

View File

@ -781,8 +781,9 @@ public:
enum RunMode {
Stopped = 0,
Console = 1,
Client = 2,
Server = 3,
Server = 2,
Client = 3,
ClientProxy = 4,
};
/**
@ -840,7 +841,7 @@ public:
* @return True if the engine is running in client mode
*/
inline static bool clientMode()
{ return s_mode == Client; }
{ return (s_mode == Client) || (s_mode == ClientProxy); }
/**
* Register or unregister a plugin to the engine.