forked from signalwire/freeswitch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaccountmanager.cpp
More file actions
32 lines (28 loc) · 822 Bytes
/
Copy pathaccountmanager.cpp
File metadata and controls
32 lines (28 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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;
}
}
}