Made the GVoice module unloadable.

Removed an unused method declaration.


git-svn-id: http://voip.null.ro/svn/yate@5018 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2012-04-21 11:30:55 +00:00
parent e7c6d16ea8
commit ef3bf16b1b
1 changed files with 17 additions and 4 deletions

View File

@ -62,11 +62,8 @@ public:
~GVModule();
virtual void initialize();
virtual bool received(Message& msg, int id);
// Clear data
void stop();
// Retrieve an object from send dtmf list
// Return a referrenced object
GVChanData* findChanDtmfData(const String& id);
bool unload();
private:
void onTimer(unsigned int time);
@ -84,6 +81,13 @@ private:
// Module data
INIT_PLUGIN(GVModule);
UNLOAD_PLUGIN(unloadNow)
{
if (unloadNow)
return __plugin.unload();
return true;
}
static unsigned int s_dtmfDelay = 2; // Default delay
static bool s_dtmfOutbound = false; // Send to outbound call leg
static unsigned int s_time = 0;
@ -160,6 +164,15 @@ GVModule::~GVModule()
Output("Unloading module GVoice");
}
bool GVModule::unload()
{
Lock mylock(this);
if (m_sendDtmf.count())
return false;
uninstallRelays();
return true;
}
bool GVModule::received(Message& msg, int id)
{
switch (id) {