ModemManager::Sms Class
class ModemManager::SmsProvides an interface to manipulate and control an SMS. More...
| Header: | #include <ModemManagerQt/Sms> |
| CMake: | find_package(KF6 REQUIRED COMPONENTS ModemManagerQt)target_link_libraries(mytarget PRIVATE KF6::ModemManagerQt) |
| Inherits: | QObject |
Public Types
Public Functions
| Sms(const QString &path, QObject *parent = nullptr) | |
| QString | SMSC() const |
| QByteArray | data() const |
| bool | deliveryReportRequest() const |
| MMSmsDeliveryState | deliveryState() const |
| QDateTime | dischargeTimestamp() const |
| uint | messageReference() const |
| QString | number() const |
| MMSmsPduType | pduType() const |
| QDBusPendingReply<> | send() |
| MMSmsCdmaServiceCategory | serviceCategory() const |
| void | setTimeout(int timeout) |
| int | smsClass() const |
| MMSmsState | state() const |
| MMSmsStorage | storage() const |
| QDBusPendingReply<> | store(MMSmsStorage storage = MM_SMS_STORAGE_UNKNOWN) |
| MMSmsCdmaTeleserviceId | teleserviceId() const |
| QString | text() const |
| int | timeout() const |
| QDateTime | timestamp() const |
| QString | uni() const |
| ModemManager::ValidityPair | validity() const |
Signals
| void | SMSCChanged(const QString &smsc) |
| void | dataChanged(const QByteArray &data) |
| void | deliveryReportRequestChanged(bool deliveryReportRequest) |
| void | deliveryStateChanged(MMSmsDeliveryState newDeliveryState) |
| void | dischargeTimestampChanged(const QDateTime &dischargeTimestamp) |
| void | messageReferenceChanged(uint messageReference) |
| void | numberChanged(const QString &number) |
| void | pduTypeChanged(MMSmsPduType pduType) |
| void | serviceCategoryChanged(MMSmsCdmaServiceCategory serviceCategory) |
| void | smsClassChanged(int smsClass) |
| void | stateChanged(MMSmsState newState) |
| void | storageChanged(MMSmsStorage storage) |
| void | teleserviceIdChanged(MMSmsCdmaTeleserviceId teleserviceId) |
| void | textChanged(const QString &text) |
| void | timestampChanged(const QDateTime ×tamp) |
| void | validityChanged(const ModemManager::ValidityPair &validity) |
Detailed Description
Note: MMSmsStorage, MMSmsState, MMSmsPduType and MMSmsDeliveryState enums are defined in <ModemManager/ModemManager-enums.h> See http://www.freedesktop.org/software/ModemManager/api/1.0.0/ModemManager-Flags-and-Enumerations.html .
Member Type Documentation
Sms::List
Sms::Ptr
Member Function Documentation
[explicit] Sms::Sms(const QString &path, QObject *parent = nullptr)
QString Sms::SMSC() const
This method returns the SMS service center number
[signal] void Sms::SMSCChanged(const QString &smsc)
QByteArray Sms::data() const
This method returns the SMS message data. text() and data() are not valid at the same time
[signal] void Sms::dataChanged(const QByteArray &data)
bool Sms::deliveryReportRequest() const
Returns true if a delivery report is requested, false otherwise
[signal] void Sms::deliveryReportRequestChanged(bool deliveryReportRequest)
MMSmsDeliveryState Sms::deliveryState() const
This method returns the delivery state of the SMS
[signal] void Sms::deliveryStateChanged(MMSmsDeliveryState newDeliveryState)
This signal is emitted when the delivery state of the SMS has changed
newDeliveryState the new delivery state of the SMS
QDateTime Sms::dischargeTimestamp() const
Time when the SMS left the SMSC
[signal] void Sms::dischargeTimestampChanged(const QDateTime &dischargeTimestamp)
uint Sms::messageReference() const
This method returns the message reference of the last PDU sent/received in the SMS. The message reference is the number used to identify the SMS in the SMSC. If the PDU type is MM_SMS_PDU_TYPE_STATUS_REPORT, this field identifies the Message Reference of the PDU associated to the status report
[signal] void Sms::messageReferenceChanged(uint messageReference)
QString Sms::number() const
This method returns the phone number to which the SMS is addressed to
[signal] void Sms::numberChanged(const QString &number)
MMSmsPduType Sms::pduType() const
This method returns the Protocol Data Unit (PDU) type of the SMS
[signal] void Sms::pduTypeChanged(MMSmsPduType pduType)
QDBusPendingReply<> Sms::send()
Send the SMS
MMSmsCdmaServiceCategory Sms::serviceCategory() const
Returns service category for CDMA SMS, as defined in 3GPP2 C.R1001-D (section 9.3).
[signal] void Sms::serviceCategoryChanged(MMSmsCdmaServiceCategory serviceCategory)
void Sms::setTimeout(int timeout)
Sets the timeout in milliseconds for all async method DBus calls. -1 means the default DBus timeout (usually 25 seconds).
See also timeout().
int Sms::smsClass() const
This method returns the 3GPP class of the SMS
[signal] void Sms::smsClassChanged(int smsClass)
MMSmsState Sms::state() const
This method returns the state of the SMS
[signal] void Sms::stateChanged(MMSmsState newState)
This signal is emitted when the state of the SMS has changed
newState the new state of the SMS
MMSmsStorage Sms::storage() const
This method returns the storage area/location of the SMS
[signal] void Sms::storageChanged(MMSmsStorage storage)
QDBusPendingReply<> Sms::store(MMSmsStorage storage = MM_SMS_STORAGE_UNKNOWN)
Store the SMS
storage the storage location of the SMS (empty for default storage)
MMSmsCdmaTeleserviceId Sms::teleserviceId() const
Returns teleservice IDs supported for CDMA SMS, as defined in 3GPP2 X.S0004-550-E (section 2.256) and 3GPP2 C.S0015-B (section 3.4.3.1)
[signal] void Sms::teleserviceIdChanged(MMSmsCdmaTeleserviceId teleserviceId)
QString Sms::text() const
This method returns the text of the SMS. text() and data() are not valid at the same time
[signal] void Sms::textChanged(const QString &text)
int Sms::timeout() const
Returns the current value of the DBus timeout in milliseconds. -1 means the default DBus timeout (usually 25 seconds).
See also setTimeout().
QDateTime Sms::timestamp() const
Time when the SMS arrived at the SMSC
[signal] void Sms::timestampChanged(const QDateTime ×tamp)
QString Sms::uni() const
ModemManager::ValidityPair Sms::validity() const
This method returns the validity of the SMS
Returns A ValidityPair struct composed of a MMSmsValidityType type and a value indicating the validity of the SMS