ModemManager::ModemMessaging
#include <modemmessaging.h>
Public Types | |
typedef QList< Ptr > | List |
typedef QSharedPointer< ModemMessaging > | Ptr |
Signals | |
void | messageAdded (const QString &uni, bool received) |
void | messageDeleted (const QString &uni) |
Public Member Functions | |
ModemMessaging (const QString &path, QObject *parent=nullptr) | |
QDBusPendingReply< QDBusObjectPath > | createMessage (const Message &message) |
QDBusPendingReply< QDBusObjectPath > | createMessage (const QVariantMap &message) |
MMSmsStorage | defaultStorage () const |
QDBusPendingReply< void > | deleteMessage (const QString &uni) |
ModemManager::Sms::Ptr | findMessage (const QString &uni) |
ModemManager::Sms::List | messages () const |
void | setTimeout (int timeout) |
QList< MMSmsStorage > | supportedStorages () const |
int | timeout () const |
Detailed Description
The ModemMessaging class.
The Messaging interface handles sending SMS messages and notification of new incoming messages.
Definition at line 30 of file modemmessaging.h.
Member Typedef Documentation
◆ List
Definition at line 43 of file modemmessaging.h.
◆ Ptr
Definition at line 42 of file modemmessaging.h.
Constructor & Destructor Documentation
◆ ModemMessaging()
Definition at line 43 of file modemmessaging.cpp.
◆ ~ModemMessaging()
|
override |
Definition at line 70 of file modemmessaging.cpp.
Member Function Documentation
◆ createMessage() [1/2]
QDBusPendingReply< QDBusObjectPath > ModemMessaging::createMessage | ( | const Message & | message | ) |
Creates a new message object.
- Parameters
-
message Message structure with the 'number' and either 'text' or 'data' properties
Definition at line 160 of file modemmessaging.cpp.
◆ createMessage() [2/2]
QDBusPendingReply< QDBusObjectPath > ModemMessaging::createMessage | ( | const QVariantMap & | message | ) |
Creates a new message object.
- Parameters
-
message QVariantMap containing message properties The 'number' and either 'text' or 'data' properties are mandatory, others are optional.
Definition at line 170 of file modemmessaging.cpp.
◆ defaultStorage()
MMSmsStorage ModemMessaging::defaultStorage | ( | ) | const |
- Returns
- A MMSmsStorage value, specifying the storage to be used when receiving or storing SMS.
Definition at line 148 of file modemmessaging.cpp.
◆ deleteMessage()
QDBusPendingReply< void > ModemMessaging::deleteMessage | ( | const QString & | uni | ) |
Delete an SMS message.
- Parameters
-
uni path to the Sms object
Definition at line 182 of file modemmessaging.cpp.
◆ findMessage()
ModemManager::Sms::Ptr ModemMessaging::findMessage | ( | const QString & | uni | ) |
- Parameters
-
uni path to the Sms object
- Returns
- pointer to the found Sms (may be null if not found)
Definition at line 188 of file modemmessaging.cpp.
◆ messageAdded
|
signal |
Emitted when any part of a new SMS has been received or added (but not for subsequent parts, if any).
For messages received from the network, not all parts may have been received and the message may not be complete.
Check the 'State' property to determine if the message is complete.
- Parameters
-
uni path to the Sms object received true
if the message was received from the network, as opposed to being added locally.
◆ messageDeleted
|
signal |
Emitted when a message has been deleted.
- Parameters
-
uni path to the Sms object
◆ messages()
ModemManager::Sms::List ModemMessaging::messages | ( | ) | const |
Retrieve all SMS messages.
This method should only be used once and subsequent information retrieved either by listening for the messageAdded() signal, or by querying the specific SMS object of interest using findMessage()
Definition at line 154 of file modemmessaging.cpp.
◆ setTimeout()
void ModemMessaging::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 194 of file modemmessaging.cpp.
◆ supportedStorages()
QList< MMSmsStorage > ModemMessaging::supportedStorages | ( | ) | const |
- Returns
- A list of MMSmsStorage values, specifying the storages supported by this modem for storing and receiving SMS.
Definition at line 142 of file modemmessaging.cpp.
◆ timeout()
int ModemMessaging::timeout | ( | ) | const |
Returns the current value of the DBus timeout in milliseconds.
-1 means the default DBus timeout (usually 25 seconds).
Definition at line 200 of file modemmessaging.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:10 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.