Made custom relay installer protected so it can be used for private messages.
git-svn-id: http://yate.null.ro/svn/yate/trunk@1697 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
9fa45e406b
commit
a889183a6f
|
@ -781,7 +781,7 @@ void* Module::getObject(const String& name) const
|
|||
return Plugin::getObject(name);
|
||||
}
|
||||
|
||||
bool Module::installRelay(const char* name, int id, unsigned priority)
|
||||
bool Module::installRelay(int id, const char* name, unsigned priority)
|
||||
{
|
||||
if (!(id && name))
|
||||
return false;
|
||||
|
@ -799,12 +799,12 @@ bool Module::installRelay(const char* name, int id, unsigned priority)
|
|||
|
||||
bool Module::installRelay(int id, unsigned priority)
|
||||
{
|
||||
return installRelay(messageName(id),id,priority);
|
||||
return installRelay(id,messageName(id),priority);
|
||||
}
|
||||
|
||||
bool Module::installRelay(const char* name, unsigned priority)
|
||||
{
|
||||
return installRelay(name,lookup(name,s_messages),priority);
|
||||
return installRelay(lookup(name,s_messages),name,priority);
|
||||
}
|
||||
|
||||
bool Module::installRelay(MessageRelay* relay)
|
||||
|
|
10
yatephone.h
10
yatephone.h
|
@ -1350,6 +1350,15 @@ protected:
|
|||
*/
|
||||
bool installRelay(const char* name, unsigned priority = 100);
|
||||
|
||||
/**
|
||||
* Install a custom message relay
|
||||
* @param id RelayID of the new relay to create
|
||||
* @param name Name of the custom relay to create
|
||||
* @param priority Priority of the handler, 0 = top
|
||||
* @return True if installed or already was one installed
|
||||
*/
|
||||
bool installRelay(int id, const char* name, unsigned priority = 100);
|
||||
|
||||
/**
|
||||
* Install a custom message relay
|
||||
* @param relay Custom message relay
|
||||
|
@ -1466,7 +1475,6 @@ private:
|
|||
Module(); // no default constructor please
|
||||
static TokenDict s_messages[];
|
||||
ObjList m_relayList;
|
||||
bool installRelay(const char* name, int id, unsigned priority);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue