--- /dev/null
+/*
+ * Copyright (C) 2011, Jamie Thompson
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef EVENTTYPES_PHONECALL_H
+#define EVENTTYPES_PHONECALL_H
+
+#include <QDateTime>
+#include <QDebug>
+#include <QList>
+#include <QString>
+
+#include "RtcomEvent.h"
+
+#include "AttachmentCollection.h"
+
+class Settings;
+
+namespace EventTypes
+{
+ class PhoneCall : public RtcomEvent
+ {
+ public:
+ enum eDestination
+ {
+ INCOMING,
+ OUTGOING
+ };
+
+ public:
+ virtual const DBBackends::iDBBackend &DB() const;
+
+ PhoneCall(const Settings &settings);
+ ~PhoneCall();
+
+ virtual const uint HashCode() const;
+
+ const eDestination Destination() const { return m_Destination; }
+ void setDestination(const eDestination destination) { m_Destination = destination; }
+
+ virtual const QDateTime Timestamp() const { return m_Timestamp; }
+ void setTimestamp(const QDateTime timestamp) { m_Timestamp = timestamp; }
+
+ const QString Tel() const { return m_Tel; }
+ void setTel(const QString tel) { m_Tel = tel; }
+
+ virtual const int DurationInSeconds() const { return m_DurationInSeconds; }
+ void setDurationInSeconds(const int durationInSeconds) { m_DurationInSeconds = durationInSeconds; }
+
+ virtual const AttachmentCollection & Attachments() const { return m_Attachments; }
+ virtual AttachmentCollection & Attachments() { return m_Attachments; }
+
+ public:
+ virtual void Export(const QString &baseDirectory) const;
+ PhoneCall(const Settings &settings, const RTComElEvent& event, const QList<RTComElAttachment*> attachments = QList<RTComElAttachment*>());
+ virtual RTComElEvent * toRTComEvent(const NumberToNameLookup &numberToNameLookup) const;
+
+ protected:
+ const Settings &CurrentSettings() const { return m_Settings; }
+
+ private:
+ const Settings &m_Settings;
+ eDestination m_Destination;
+ QDateTime m_Timestamp;
+ QString m_Tel;
+ int m_DurationInSeconds;
+ AttachmentCollection m_Attachments;
+ };
+}
+
+QDebug operator<<(QDebug dbg, EventTypes::PhoneCall & event);
+
+#endif // EVENTTYPES_PHONECALL_H