forked from Mirrors/freeswitch
e3ea7c61bb
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16504 d0543943-73ff-0310-b7d9-9358b9ac24b2
32 lines
739 B
C++
32 lines
739 B
C++
#include <QtGui>
|
|
#include "account.h"
|
|
|
|
Account::Account(QString name) :
|
|
_name(name)
|
|
{
|
|
_statusCode = QString();
|
|
_statusPhrase = QString();
|
|
|
|
QSettings settings;
|
|
settings.beginGroup("FreeSWITCH/conf/sofia.conf/profiles/profile/gateways");
|
|
foreach(QString g, settings.childGroups())
|
|
{
|
|
settings.beginGroup(g);
|
|
if(settings.value("gateway/attrs/name").toString() == name)
|
|
{
|
|
_uuid = g;
|
|
settings.endGroup();
|
|
break;
|
|
}
|
|
settings.endGroup();
|
|
}
|
|
}
|
|
|
|
QString Account::getStateName()
|
|
{
|
|
if (_statusPhrase.isEmpty())
|
|
return fscomm_gw_state_names[_state];
|
|
|
|
return QString("%1 - %2").arg(fscomm_gw_state_names[_state], _statusPhrase);
|
|
}
|