void MRIMBuddy::handleSendSMS () { SMSDialog dia (Info_.Phone_); if (dia.exec () != QDialog::Accepted) return; auto conn = A_->GetConnection (); const QString& phone = dia.GetPhone (); SentSMS_ [conn->SendSMS2Number (phone, dia.GetText ())] = phone; connect (conn, SIGNAL (smsDelivered (quint32)), this, SLOT (handleSMSDelivered (quint32)), Qt::UniqueConnection); connect (conn, SIGNAL (smsBadParms (quint32)), this, SLOT (handleSMSBadParms (quint32)), Qt::UniqueConnection); connect (conn, SIGNAL (smsServiceUnavailable (quint32)), this, SLOT (handleSMSServUnavail (quint32)), Qt::UniqueConnection); }
void ChatSession::slotSmsStatus(quint32 status, bool timeout) { if (!timeout && status == SMS_STATUS_OK) { Tasks::SendSms* task = qobject_cast<Tasks::SendSms*>(sender()); Q_EMIT smsDelivered(task->phoneNumber(), task->text()); } else Q_EMIT smsFailed(); }
void Connection::SMSAck (HalfPacket hp) { quint32 seq = hp.Header_.Seq_; quint32 status = 0; FromMRIM (hp.Data_, status); switch (status) { case SMSStatus::OK: emit smsDelivered (seq); break; case SMSStatus::ServUnavail: emit smsServiceUnavailable (seq); break; case SMSStatus::InvalidParams: emit smsBadParms (seq); break; } }
void triggerSmsDelivered() { std::string message("Test Message"); smsDelivered(this, message); }