if(hasEnded)
{
- event.setContents(text);
+ event.Contents(text);
//event.fld_storage_time
}
tel = tel.replace(QRegExp("^0"), "+44");
gchar* g_tel = g_strdup(tel.toUtf8());
- event.setTel(g_tel);
+ event.Tel(g_tel);
// if(tel.length() < 7 || tel.indexOf(QRegExp("[:alpha:]+")) > -1)
// event.fld_group_uid = g_tel;
else if(lineData.startsWith("X-IRMC-STATUS:"))
{
bool isRead(lineData.mid(lineData.indexOf(":") + 1) == "READ");
- event.setIsRead(isRead);
+ event.IsRead(isRead);
}
else if(lineData.startsWith("X-IRMC-BOX:"))
{
qDebug() << "Unexpected box: " << box;
return false;
}
- event.setDestination(isOutgoing ? EventTypes::SMS::SENT : EventTypes::SMS::INBOX);
+ event.Destination(isOutgoing ? EventTypes::SMS::SENT : EventTypes::SMS::INBOX);
}
else if(lineData.startsWith("X-NOK-DT:"))
{
lineData.mid(lineData.indexOf(":") + 1),
"yyyyMMddThhmmssZ"));
timestamp.setTimeSpec(Qt::UTC);
- event.setTimestamp(timestamp);
+ event.Timestamp(timestamp);
}
else if(lineData.startsWith("BEGIN:"))
{
PhoneCall::PhoneCall(const Settings &settings, const RTComElEvent &event, const QList<RTComElAttachment*> attachments) :
m_Settings(settings)
{
- setDestination(event.fld_outgoing ? Settings::OUTGOING : Settings::INCOMING);
- setTimestamp(QDateTime::fromTime_t(event.fld_start_time).toUTC());
- setDurationInSeconds(QDateTime::fromTime_t(event.fld_start_time).toUTC().secsTo(QDateTime::fromTime_t(event.fld_end_time).toUTC()));
- setTel(event.fld_remote_uid);
+ Destination(event.fld_outgoing ? Settings::OUTGOING : Settings::INCOMING);
+ Timestamp(QDateTime::fromTime_t(event.fld_start_time).toUTC());
+ DurationInSeconds(QDateTime::fromTime_t(event.fld_start_time).toUTC().secsTo(QDateTime::fromTime_t(event.fld_end_time).toUTC()));
+ Tel(event.fld_remote_uid);
if(Tel().indexOf("0") == 0)
- setTel(QString(Tel()).replace(QRegExp("^0"), "+44"));
+ Tel(QString(Tel()).replace(QRegExp("^0"), "+44"));
if(attachments.count() > 0)
foreach(RTComElAttachment *attachment, attachments)
m_DurationInSeconds(durationInSeconds), m_Attachments(attachments)
{
if(Tel().indexOf("0") == 0)
- setTel(QString(Tel()).replace(QRegExp("^0"), "+44"));
+ Tel(QString(Tel()).replace(QRegExp("^0"), "+44"));
// TODO: Copy attachments.
// if(attachments.count() > 0)
virtual const uint HashCode() const;
const Settings::eDirection Destination() const { return m_Destination; }
- void setDestination(const Settings::eDirection destination) { m_Destination = destination; }
+ void Destination(const Settings::eDirection destination) { m_Destination = destination; }
virtual const QDateTime Timestamp() const { return m_Timestamp; }
- void setTimestamp(const QDateTime timestamp) { m_Timestamp = timestamp; }
+ void Timestamp(const QDateTime timestamp) { m_Timestamp = timestamp; }
const QString Tel() const { return m_Tel; }
- void setTel(const QString tel) { m_Tel = tel; }
+ void Tel(const QString tel) { m_Tel = tel; }
virtual const int DurationInSeconds() const { return m_DurationInSeconds; }
- void setDurationInSeconds(const int durationInSeconds) { m_DurationInSeconds = durationInSeconds; }
+ void DurationInSeconds(const int durationInSeconds) { m_DurationInSeconds = durationInSeconds; }
virtual const AttachmentCollection & Attachments() const { return m_Attachments; }
virtual AttachmentCollection & Attachments() { return m_Attachments; }
SMS::SMS(const Settings &settings, const RTComElEvent &event, const QList<RTComElAttachment*> attachments) :
m_Settings(settings)
{
- setVersion(2.1);
- setIsRead(event.fld_is_read);
- setDestination(event.fld_outgoing ? SENT : INBOX);
- setTimestamp(QDateTime::fromTime_t(event.fld_start_time).toUTC());
- setTel(QString::fromUtf8(event.fld_remote_uid));
+ Version(2.1);
+ IsRead(event.fld_is_read);
+ Destination(event.fld_outgoing ? SENT : INBOX);
+ Timestamp(QDateTime::fromTime_t(event.fld_start_time).toUTC());
+ Tel(QString::fromUtf8(event.fld_remote_uid));
if(Tel().indexOf("0") == 0)
- setTel(QString(Tel()).replace(QRegExp("^0"), "+44"));
- //setContents(QString(event.fld_free_text).replace("\n", QChar(0x2029)));
- setContents(QString::fromUtf8(event.fld_free_text));
+ Tel(QString(Tel()).replace(QRegExp("^0"), "+44"));
+ //Contents(QString(event.fld_free_text).replace("\n", QChar(0x2029)));
+ Contents(QString::fromUtf8(event.fld_free_text));
+ if(event.fld_flags != 0)
+ {
+ qDebug() << "fld_flags: = " << event.fld_flags;
+ }
+ Pending(event.fld_flags & GetFlagValue("RTCOM_EL_FLAG_SMS_PENDING"));
// We directly access the m_Attachments member variable here rather than the
// accessor as the accessor is const
virtual const uint HashCode() const;
const float Version() const { return m_Version; }
- void setVersion(const float version) { m_Version = version; }
+ void Version(const float version) { m_Version = version; }
const bool IsRead() const { return m_Read; }
- void setIsRead(const bool isRead) { m_Read = isRead; }
+ void IsRead(const bool isRead) { m_Read = isRead; }
const eDestination Destination() const { return m_Destination; }
- void setDestination(const eDestination destination) { m_Destination = destination; }
+ void Destination(const eDestination destination) { m_Destination = destination; }
virtual const QDateTime Timestamp() const { return m_Timestamp; }
- void setTimestamp(const QDateTime timestamp) { m_Timestamp = timestamp; }
+ void Timestamp(const QDateTime timestamp) { m_Timestamp = timestamp; }
const QString Tel() const { return m_Tel; }
- void setTel(const QString tel) { m_Tel = tel; }
+ void Tel(const QString tel) { m_Tel = tel; }
QString Contents() const { return m_Contents; }
- void setContents(const QString contents) { m_Contents = contents; }
+ void Contents(const QString contents) { m_Contents = contents; }
+ bool Pending() const { return m_Pending; }
+ void Pending(const bool pending) { m_Pending = pending; }
virtual const AttachmentCollection & Attachments() const { return m_Attachments; }
virtual AttachmentCollection & Attachments() { return m_Attachments; }
QString m_Tel;
QString m_Contents;
AttachmentCollection m_Attachments;
+ bool m_Pending;
};
}