mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
We dont depend on QSettings any longer and we are now pure XML configs.
This commit is contained in:
32
fscomm/accountmanager.cpp
Normal file
32
fscomm/accountmanager.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#include "accountmanager.h"
|
||||
|
||||
|
||||
QList<QSharedPointer<Account> > AccountManager::_accounts;
|
||||
|
||||
AccountManager::AccountManager(QObject *parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
connect(g_FSHost, SIGNAL(newEvent(QSharedPointer<switch_event_t>)), this, SLOT(newEventSlot(QSharedPointer<switch_event_t>)));
|
||||
}
|
||||
|
||||
void AccountManager::newEventSlot(QSharedPointer<switch_event_t> e) {
|
||||
QString eName = switch_event_get_header_nil(e.data(), "Event-Name");
|
||||
QString eSub = e.data()->subclass_name;
|
||||
qDebug() << eName;
|
||||
switch(e.data()->event_id) {
|
||||
case SWITCH_EVENT_CUSTOM:
|
||||
{
|
||||
qDebug() << eName << eSub;
|
||||
break;
|
||||
}
|
||||
case SWITCH_EVENT_API:
|
||||
{
|
||||
/* Might not be necessary anymore */
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user