Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QDBusConnection bus = QDBusConnection::systemBus();
- bus.connect("org.ofono",
- myModem,
- "org.ofono.NetworkRegistration",
- "PropertyChanged",
- this,
- SLOT(slotNetworkPropertyChanged(QString,QDBusVariant)));
- QDBusInterface iface("org.ofono",
- myModem,
- "org.ofono.NetworkRegistration",
- bus);
- // attempt to register to the default network
- qDebug() << "registering to default network";
- QDBusReply<void> result = iface.call("Register");
- if (! result.isValid())
- {
- qDebug() << "error registering to network:" << result.error();
- }
- else
- {
- qDebug() << "registered to network";
- }
- QDBusPendingReply<QVariantMap> properties =
- iface.asyncCall("GetProperties");
- QDBusPendingCallWatcher* call = new QDBusPendingCallWatcher(properties);
- connect(call, SIGNAL(finished(QDBusPendingCallWatcher*)),
- this, SLOT(slotGotNetworkProperties(QDBusPendingCallWatcher*)));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement