/*!

*/
HsTitleResolver::HsTitleResolver(QObject *parent)
    : QObject(parent),
      mCurrentStatus(HsDeviceInfoListener::NoService)
{
    mDeviceInfoListener = new HsDeviceInfoListener(this);
    mOperatorName = mDeviceInfoListener->operatorName();
    mOfflineText = hbTrId(hsLocTextId_Title_Offline);
    mNoServiceText = hbTrId(hsLocTextId_Title_NoService);
    
    connect(mDeviceInfoListener, SIGNAL(networkNameChanged(QString)), SLOT(onNetworkNameChanged(QString)));
    connect(mDeviceInfoListener, SIGNAL(statusChanged(HsDeviceInfoListener::HsDeviceInfoStatus)), SLOT(onStatusChanged(HsDeviceInfoListener::HsDeviceInfoStatus)));
    mCurrentStatus = mDeviceInfoListener->status();
}
int StatusBarInfo::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: profileChanged((*reinterpret_cast< QSystemDeviceInfo::Profile(*)>(_a[1]))); break;
        case 1: signalStrengthChanged((*reinterpret_cast< QSystemNetworkInfo::NetworkMode(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2]))); break;
        case 2: batteryBarsChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 3: chargingChanged((*reinterpret_cast< QSystemDeviceInfo::PowerState(*)>(_a[1]))); break;
        case 4: networkModeChanged((*reinterpret_cast< QSystemNetworkInfo::NetworkMode(*)>(_a[1]))); break;
        case 5: networkNameChanged((*reinterpret_cast< QSystemNetworkInfo::NetworkMode(*)>(_a[1])),(*reinterpret_cast< const QString(*)>(_a[2]))); break;
        case 6: bluetoothChanged((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 7: stateChanged((*reinterpret_cast< QSystemNetworkInfo::NetworkMode(*)>(_a[1])),(*reinterpret_cast< QSystemNetworkInfo::NetworkStatus(*)>(_a[2]))); break;
        default: ;
        }
        _id -= 8;
    }
    return _id;
}
/*!
    \qmlmethod NetworkInfo::startStatusChanged()
   This function is needed to start statusChanged notification.

   \sa connectNotify()
*/
void QDeclarativeNetworkInfo::startNameChanged()
{
    connect(netInfo(),SIGNAL(networkNameChanged(QSystemNetworkInfo::NetworkMode,QString)),
            this,SLOT(networkNameChanged(QSystemNetworkInfo::NetworkMode,QString)),Qt::UniqueConnection);
}