예제 #1
0
void QConnmanEngine::initialize()
{
    QMutexLocker locker(&mutex);
    connect(ofonoManager,SIGNAL(modemChanged()),this,SLOT(changedModem()));

    ofonoNetwork = new QOfonoNetworkRegistrationInterface(ofonoManager->currentModem(),this);
    ofonoContextManager = new QOfonoDataConnectionManagerInterface(ofonoManager->currentModem(),this);
    connect(ofonoContextManager,SIGNAL(roamingAllowedChanged(bool)),this,SLOT(reEvaluateCellular()));

    connect(connmanManager,SIGNAL(servicesChanged(ConnmanMapList, QList<QDBusObjectPath>)),
            this, SLOT(updateServices(ConnmanMapList, QList<QDBusObjectPath>)));

    connect(connmanManager,SIGNAL(servicesReady(QStringList)),this,SLOT(servicesReady(QStringList)));
    connect(connmanManager,SIGNAL(scanFinished()),this,SLOT(finishedScan()));

    foreach (const QString &servPath, connmanManager->getServices()) {
        addServiceConfiguration(servPath);
    }
    Q_EMIT updateCompleted();
    QSettings confFile(QStringLiteral("nemomobile"),QStringLiteral("connectionagent"));

    inotifyFileDescriptor = ::inotify_init();
    inotifyWatcher = ::inotify_add_watch(inotifyFileDescriptor, QFile::encodeName(confFile.fileName()), IN_MODIFY);
    if (inotifyWatcher > 0) {
        QSocketNotifier *notifier = new QSocketNotifier(inotifyFileDescriptor, QSocketNotifier::Read, this);
        connect(notifier, SIGNAL(activated(int)), this, SLOT(inotifyActivated()));
    }
예제 #2
0
 foreach (const ConnmanMap &connmanMap, changed) {
     const QString id = QString::number(qHash(connmanMap.objectPath.path()));
     if (accessPointConfigurations.contains(id)) {
         configurationChange(id);
     } else {
         addServiceConfiguration(connmanMap.objectPath.path());
     }
 }
예제 #3
0
void QConnmanEngine::initialize()
{
    QMutexLocker locker(&mutex);
    connect(ofonoManager,SIGNAL(modemChanged()),this,SLOT(changedModem()));

    ofonoNetwork = new QOfonoNetworkRegistrationInterface(ofonoManager->currentModem(),this);
    ofonoContextManager = new QOfonoDataConnectionManagerInterface(ofonoManager->currentModem(),this);
    connect(ofonoContextManager,SIGNAL(roamingAllowedChanged(bool)),this,SLOT(reEvaluateCellular()));

    connect(connmanManager,SIGNAL(servicesChanged(ConnmanMapList,QList<QDBusObjectPath>)),
            this, SLOT(updateServices(ConnmanMapList,QList<QDBusObjectPath>)));

    connect(connmanManager,SIGNAL(servicesReady(QStringList)),this,SLOT(servicesReady(QStringList)));
    connect(connmanManager,SIGNAL(scanFinished()),this,SLOT(finishedScan()));

    foreach (const QString &servPath, connmanManager->getServices()) {
        addServiceConfiguration(servPath);
    }
    Q_EMIT updateCompleted();
}
예제 #4
0
void QConnmanEngine::initialize()
{
    connect(connmanManager,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
            this,SLOT(propertyChangedContext(QString,QString,QDBusVariant)));

    foreach(const QString techPath, connmanManager->getTechnologies()) {
        QConnmanTechnologyInterface *tech;
        tech = new QConnmanTechnologyInterface(techPath, this);

        connect(tech,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
                this,SLOT(technologyPropertyChangedContext(QString,QString,QDBusVariant)));
    }

    foreach(const QString servPath, connmanManager->getServices()) {
        addServiceConfiguration(servPath);
    }

    // Get current list of access points.
    getConfigurations();
}
예제 #5
0
void QConnmanEngine::servicesReady(const QStringList &list)
{
    QMutexLocker locker(&mutex);
    foreach (const QString &servPath, list) {
        addServiceConfiguration(servPath);
    }