ModemManager::ModemSimple

Search for usage in LXR

ModemManager::ModemSimple Class Reference

#include <modemsimple.h>

Inherits ModemManager::Interface.

Public Types

typedef QList< PtrList
 
typedef QSharedPointer< ModemSimplePtr
 

Public Member Functions

 ModemSimple (const QString &path, QObject *parent=nullptr)
 
QDBusPendingReply< QDBusObjectPathconnectModem (const QVariantMap &properties)
 
QDBusPendingReply< void > disconnectAllModems ()
 
QDBusPendingReply< void > disconnectModem (const QString &bearer)
 
QDBusPendingReply< QVariantMap > getStatus ()
 
void setTimeout (int timeout)
 
int timeout () const
 
QString uni () const
 

Detailed Description

The ModemSimple class.

The Simple interface allows controlling and querying the status of Modems.

Definition at line 28 of file modemsimple.h.

Member Typedef Documentation

◆ List

Definition at line 35 of file modemsimple.h.

◆ Ptr

Constructor & Destructor Documentation

◆ ModemSimple()

ModemSimple::ModemSimple ( const QString & path,
QObject * parent = nullptr )
explicit

Definition at line 27 of file modemsimple.cpp.

◆ ~ModemSimple()

ModemSimple::~ModemSimple ( )
override

Definition at line 32 of file modemsimple.cpp.

Member Function Documentation

◆ connectModem()

QDBusPendingReply< QDBusObjectPath > ModemSimple::connectModem ( const QVariantMap & properties)

Do everything needed to connect the modem using the given properties.

This method will attempt to find a matching packet data bearer and activate it if necessary, returning the bearer's IP details. If no matching bearer is found, a new bearer will be created and activated, but this operation may fail if no resources are available to complete this connection attempt (ie, if a conflicting bearer is already active).

This call may make a large number of changes to modem configuration based on properties passed in. For example, given a PIN-locked, disabled GSM/UMTS modem, this call may unlock the SIM PIN, alter the access technology preference, wait for network registration (or force registration to a specific provider), create a new packet data bearer using the given "apn", and connect that bearer.

Dictionary of properties needed to get the modem connected. Each implementation is free to add its own specific key-value pairs. The predefined common ones are:

Parameters
pinSIM-PIN unlock code, given as a string value (signature "s").
operator-idETSI MCC-MNC of a network to force registration with, given as a string value (signature "s").
apnFor GSM/UMTS and LTE devices the APN to use, given as a string value (signature "s").
ip-typeFor GSM/UMTS and LTE devices the IP addressing type to use, given as a MMBearerIpFamily value (signature "u").
allowed-authThe authentication method to use, given as a MMBearerAllowedAuth value (signature "u"). Optional in 3GPP.
userUser name (if any) required by the network, given as a string value (signature "s"). Optional in 3GPP.
passwordPassword (if any) required by the network, given as a string value (signature "s"). Optional in 3GPP.
numberFor POTS devices the number to dial,, given as a string value (signature "s").
allow-roamingFALSE to allow only connections to home networks, given as a boolean value (signature "b").
rm-protocolFor CDMA devices, the protocol of the Rm interface, given as a MMModemCdmaRmProtocol value (signature "u").
Returns
On successful connect, returns the object path of the connected packet data bearer used for the connection attempt.

Definition at line 42 of file modemsimple.cpp.

◆ disconnectAllModems()

QDBusPendingReply< void > ModemSimple::disconnectAllModems ( )

Convenient method calling disconnectModem with "/" to make ModemManager disconnect all modems.

Definition at line 61 of file modemsimple.cpp.

◆ disconnectModem()

QDBusPendingReply< void > ModemSimple::disconnectModem ( const QString & bearer)

Disconnect an active packet data connection.

Definition at line 55 of file modemsimple.cpp.

◆ getStatus()

QDBusPendingReply< QVariantMap > ModemSimple::getStatus ( )

Dictionary of properties.

Each implementation is free to add it's own specific key-value pairs. The predefined common ones are:

Parameters
stateA MMModemState value specifying the overall state of the modem, given as an unsigned integer value (signature "u").
signal-qualitySignal quality value, given only when registered, as an unsigned integer value (signature "u").
current-bandsList of MMModemBand values, given only when registered, as a list of unsigned integer values (signature "au").
access-technologyA MMModemAccessTechnology value, given only when registered, as an unsigned integer value (signature "u").
m3gpp-registration-stateA MMModem3gppRegistrationState value specifying the state of the registration, given only when registered in a 3GPP network, as an unsigned integer value (signature "u").
m3gpp-operator-codeOperator MCC-MNC, given only when registered in a 3GPP network, as a string value (signature "s").
m3gpp-operator-nameOperator name, given only when registered in a 3GPP network, as a string value (signature "s").
cdma-cdma1x-registration-stateA MMModemCdmaRegistrationState value specifying the state of the registration, given only when registered in a CDMA1x network, as an unsigned integer value (signature "u").
cdma-evdo-registration-stateA MMModemCdmaRegistrationState value specifying the state of the registration, given only when registered in a EV-DO network, as an unsigned integer value (signature "u").
cdma-sidThe System Identifier of the serving network, if registered in a CDMA1x network and if known. Given as an unsigned integer value (signature "u").
cdma-nidThe Network Identifier of the serving network, if registered in a CDMA1x network and if known. Given as an unsigned integer value (signature "u").

Definition at line 49 of file modemsimple.cpp.

◆ setTimeout()

void ModemSimple::setTimeout ( int timeout)

Sets the timeout in milliseconds for all async method DBus calls.

-1 means the default DBus timeout (usually 25 seconds).

Definition at line 66 of file modemsimple.cpp.

◆ timeout()

int ModemSimple::timeout ( ) const

Returns the current value of the DBus timeout in milliseconds.

-1 means the default DBus timeout (usually 25 seconds).

Definition at line 72 of file modemsimple.cpp.

◆ uni()

QString ModemSimple::uni ( ) const

Definition at line 36 of file modemsimple.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:50:28 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.