From 6582ea4d0ffe0dd22bcd63174e3651d816cf9e5d Mon Sep 17 00:00:00 2001
From: Emmanuel Lepage <emmanuel.lepage@savoirfairelinux.com>
Date: Tue, 20 Sep 2011 17:39:09 -0400
Subject: [PATCH] Add basic history drag and drop support

---
 src/Contact.cpp      | 10 ++++++++++
 src/Contact.h        |  4 ++++
 src/sflphone_const.h |  8 ++++++--
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/src/Contact.cpp b/src/Contact.cpp
index 54731e87..21d18d14 100644
--- a/src/Contact.cpp
+++ b/src/Contact.cpp
@@ -99,6 +99,11 @@ QString Contact::getPreferredEmail()  const
    return m_pPreferredEmail;
 }
 
+QString Contact::getUid() const
+{
+   return m_pUid;
+}
+
 QString Contact::getType() const
 {
    return m_pType;
@@ -143,4 +148,9 @@ void Contact::setOrganization(QString name)
 void Contact::setPreferredEmail(QString name)
 {
    m_pPreferredEmail = name;
+}
+
+void Contact::setUid(QString id)
+{
+   m_pUid = id;
 }
\ No newline at end of file
diff --git a/src/Contact.h b/src/Contact.h
index 33a5955e..73d706f0 100644
--- a/src/Contact.h
+++ b/src/Contact.h
@@ -34,6 +34,7 @@
 
 /**
    @author Jérémy Quentin <jeremy.quentin@savoirfairelinux.com>
+   @author Jérémy Quentin <emmanuel.lepage@savoirfairelinux.com>
 */
 class LIB_EXPORT Contact : public QObject{
    Q_OBJECT
@@ -63,6 +64,7 @@ private:
    QString      m_pFormattedName  ;
    QString      m_pPreferredEmail ;
    QString      m_pOrganization   ;
+   QString      m_pUid            ;
    bool         displayPhoto      ;
    PhoneNumbers m_pNumbers        ;
 public:
@@ -77,6 +79,7 @@ public:
    virtual QString        getSecondName()      const;
    virtual QString        getFormattedName()   const;
    virtual QString        getOrganization()    const;
+   virtual QString        getUid()             const;
    virtual QString        getPreferredEmail()  const;
    virtual const QPixmap* getPhoto()           const;
    virtual QString        getType()            const;
@@ -89,6 +92,7 @@ public:
    virtual void setFamilyName     (QString name   );
    virtual void setOrganization   (QString name   );
    virtual void setPreferredEmail (QString name   );
+   virtual void setUid            (QString id     );
    virtual void setPhoto          (QPixmap* photo );
    
 protected:
diff --git a/src/sflphone_const.h b/src/sflphone_const.h
index 38ebe199..5668b1ea 100644
--- a/src/sflphone_const.h
+++ b/src/sflphone_const.h
@@ -307,7 +307,11 @@ typedef enum
 } call_state;
 
 /** MIME API */
-#define MIME_CALLID "text/sflphone.call.id"
-#define MIME_PLAIN_TEXT "text/plain"
+#define MIME_CALLID           "text/sflphone.call.id"
+#define MIME_CONTACT          "text/sflphone.contact"
+#define MIME_HISTORYID        "text/sflphone.history.id"
+#define MIME_PHONENUMBER      "text/sflphone.phone.number"
+#define MIME_CONTACT_PHONE    "text/sflphone.contact.phone"
+#define MIME_PLAIN_TEXT       "text/plain"
 #endif
 
-- 
GitLab