Return a flag if a new conference room has been created in the call.conference or call.execute messages.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4320 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
e45b2e9f7c
commit
22374cbd8e
|
@ -102,6 +102,8 @@ public:
|
|||
{ return m_maxLock; }
|
||||
inline bool timeout(const Time& time) const
|
||||
{ return m_expire && m_expire < time; }
|
||||
inline bool created()
|
||||
{ return m_created && !(m_created = false); }
|
||||
void mix(ConfConsumer* cons = 0);
|
||||
void addChannel(ConfChan* chan, bool player = false);
|
||||
void delChannel(ConfChan* chan);
|
||||
|
@ -121,6 +123,7 @@ private:
|
|||
String m_notify;
|
||||
String m_playerId;
|
||||
bool m_lonely;
|
||||
bool m_created;
|
||||
ConfChan* m_record;
|
||||
int m_rate;
|
||||
int m_users;
|
||||
|
@ -281,7 +284,7 @@ ConfRoom* ConfRoom::get(const String& name, const NamedList* params)
|
|||
|
||||
// Private constructor, always called from ConfRoom::get() with mutex hold
|
||||
ConfRoom::ConfRoom(const String& name, const NamedList& params)
|
||||
: m_name(name), m_lonely(false), m_record(0),
|
||||
: m_name(name), m_lonely(false), m_created(true), m_record(0),
|
||||
m_rate(8000), m_users(0), m_maxusers(10), m_maxLock(200),
|
||||
m_expire(0), m_lonelyInterval(0)
|
||||
{
|
||||
|
@ -963,8 +966,10 @@ bool ConfHandler::received(Message& msg)
|
|||
peer->connect(p,reason,false);
|
||||
p->deref();
|
||||
}
|
||||
if (c->room())
|
||||
if (c->room()) {
|
||||
msg.setParam("newroom",String::boolText(c->room()->created()));
|
||||
msg.setParam("users",String(c->room()->users()));
|
||||
}
|
||||
c->deref();
|
||||
return true;
|
||||
}
|
||||
|
@ -1079,8 +1084,10 @@ bool ConferenceDriver::msgExecute(Message& msg, String& dest)
|
|||
c->callConnect(msg);
|
||||
msg.setParam("peerid",c->id());
|
||||
msg.setParam("room",prefix()+dest);
|
||||
if (c->room())
|
||||
if (c->room()) {
|
||||
msg.setParam("newroom",String::boolText(c->room()->created()));
|
||||
msg.setParam("users",String(c->room()->users()));
|
||||
}
|
||||
c->deref();
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue