-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyAccount.cpp
41 lines (30 loc) · 857 Bytes
/
MyAccount.cpp
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
33
34
35
36
37
38
39
40
#include "MyAccount.h"
#include "MyCall.h"
#include <QString>
#include <QDebug>
#include "MetaVoIP.h"
MyAccount::MyAccount(MetaVoIP *parent)
{
this->parent = parent;
}
MyAccount::~MyAccount()
{
}
void MyAccount::onRegState(OnRegStateParam &prm) {
AccountInfo ai = getInfo();
qDebug() << (ai.regIsActive? "*** Register:" : "*** Unregister:")
<< " code=" << prm.code;
parent->emitRegStateStarted(ai.regIsActive);
}
void MyAccount::onRegStarted(OnRegStartedParam &prm)
{
AccountInfo ai = getInfo();
qDebug() << (ai.regIsActive? "*** Register:" : "*** Unregister:")
<< " code=" << prm.renew;
parent->emitRegStateChanged(ai.regIsActive);
}
void MyAccount::onIncomingCall(OnIncomingCallParam &iprm)
{
qDebug() << "Incoming call with callId" << iprm.callId;
parent->ring(iprm.callId);
}