2 * Copyright (C) 2011, Jamie Thompson
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License as published by the Free Software Foundation; either
7 * version 3 of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public
15 * License along with this program; If not, see
16 * <http://www.gnu.org/licenses/>.
19 #ifndef EVENTTYPES_SMS_H
20 #define EVENTTYPES_SMS_H
27 #include "RtcomEvent.h"
29 #include "AttachmentCollection.h"
35 class SMS : public RtcomEvent
45 virtual const DBBackends::iDBBackend &DB() const;
47 SMS(const Settings &settings);
50 virtual const uint HashCode() const;
52 const float Version() const { return m_Version; }
53 void setVersion(const float version) { m_Version = version; }
55 const bool IsRead() const { return m_Read; }
56 void setIsRead(const bool isRead) { m_Read = isRead; }
58 const eDestination Destination() const { return m_Destination; }
59 void setDestination(const eDestination destination) { m_Destination = destination; }
61 virtual const QDateTime Timestamp() const { return m_Timestamp; }
62 void setTimestamp(const QDateTime timestamp) { m_Timestamp = timestamp; }
64 const QString Tel() const { return m_Tel; }
65 void setTel(const QString tel) { m_Tel = tel; }
67 QString Contents() const { return m_Contents; }
68 void setContents(const QString contents) { m_Contents = contents; }
70 virtual const AttachmentCollection & Attachments() const { return m_Attachments; }
71 virtual AttachmentCollection & Attachments() { return m_Attachments; }
74 virtual void Export(const QString &baseDirectory) const;
75 SMS(const Settings &settings, const RTComElEvent& event, const QList<RTComElAttachment*> attachments = QList<RTComElAttachment*>());
76 virtual RTComElEvent * toRTComEvent(const NumberToNameLookup &numberToNameLookup) const;
79 const Settings &CurrentSettings() const { return m_Settings; }
82 const Settings &m_Settings;
85 eDestination m_Destination;
86 QDateTime m_Timestamp;
89 AttachmentCollection m_Attachments;
93 QDebug operator<<(QDebug dbg, EventTypes::SMS & event);
95 #endif // EVENTTYPES_SMS_H