Added passing through name to number lookup for resolving numbers in exported events.
[qwerkisync] / EventTypes / PhoneCall.h
index 88f8b2a..e805927 100644 (file)
@@ -19,6 +19,8 @@
 #ifndef EVENTTYPES_PHONECALL_H
 #define EVENTTYPES_PHONECALL_H
 
+#include "Settings.h"
+
 #include <QDateTime>
 #include <QDebug>
 #include <QList>
@@ -35,37 +37,31 @@ namespace EventTypes
        class PhoneCall : public RtcomEvent
        {
        public:
-               enum eDestination
-               {
-                       INCOMING,
-                       OUTGOING
-               };
-
-       public:
                virtual const DBBackends::iDBBackend &DB() const;
 
                PhoneCall(const Settings &settings);
+               PhoneCall(const Settings &settings, const Settings::eDirection destination, const QDateTime &timestamp, const QString &tel, int durationInSeconds, const AttachmentCollection &attachments = AttachmentCollection());
                ~PhoneCall();
 
                virtual const uint HashCode() const;
 
-               const eDestination Destination() const { return m_Destination; }
-               void setDestination(const eDestination destination) { m_Destination = destination; }
+               const Settings::eDirection Destination() const { return m_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; }
 
        public:
-               virtual void Export(const QString &baseDirectory) const;
+               virtual void Export(const QString &baseDirectory, const NumberToNameLookup &numberToNameLookup) const;
                PhoneCall(const Settings &settings, const RTComElEvent& event, const QList<RTComElAttachment*> attachments = QList<RTComElAttachment*>());
                virtual RTComElEvent * toRTComEvent(const NumberToNameLookup &numberToNameLookup) const;
 
@@ -74,7 +70,7 @@ namespace EventTypes
 
        private:
                const Settings &m_Settings;
-               eDestination m_Destination;
+               Settings::eDirection m_Destination;
                QDateTime m_Timestamp;
                QString m_Tel;
                int m_DurationInSeconds;