ModemManager::ModemMessaging

Search for usage in LXR

ModemManager::ModemMessaging Class Reference

#include <modemmessaging.h>

Inherits ModemManager::Interface.

Public Types

typedef QList< PtrList
 
typedef QSharedPointer< ModemMessagingPtr
 

Signals

void messageAdded (const QString &uni, bool received)
 
void messageDeleted (const QString &uni)
 

Public Member Functions

 ModemMessaging (const QString &path, QObject *parent=nullptr)
 
QDBusPendingReply< QDBusObjectPathcreateMessage (const Message &message)
 
QDBusPendingReply< QDBusObjectPathcreateMessage (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

Constructor & Destructor Documentation

◆ ModemMessaging()

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

Definition at line 43 of file modemmessaging.cpp.

◆ ~ModemMessaging()

ModemMessaging::~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
messageMessage 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
messageQVariantMap 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
unipath to the Sms object

Definition at line 182 of file modemmessaging.cpp.

◆ findMessage()

ModemManager::Sms::Ptr ModemMessaging::findMessage ( const QString & uni)
Parameters
unipath 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

void ModemManager::ModemMessaging::messageAdded ( const QString & uni,
bool received )
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
unipath to the Sms object
receivedtrue if the message was received from the network, as opposed to being added locally.

◆ messageDeleted

void ModemManager::ModemMessaging::messageDeleted ( const QString & uni)
signal

Emitted when a message has been deleted.

Parameters
unipath 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:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:17:51 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.