merge wrt-plugins-tizen_0.2.0-2
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Contact / IContact.h
similarity index 79%
rename from src/platform/API/Contact/ContactProperties.h
rename to src/platform/API/Contact/IContact.h
index a0ca03c..a7ce7ad 100755 (executable)
  */
 
 /**
- * @file        ContactProperties.h
+ * @file        IContact.h
  * @author      Kisub Song (kisubs.song@samsung.com)
  * @version     0.1
  * @brief
+ * ##
  */
 
-#ifndef _API_CONTACT_CONTACT_PROPERTIES_H_
-#define _API_CONTACT_CONTACT_PROPERTIES_H_
+#ifndef _API_CONTACT_ICONTACT_H_
+#define _API_CONTACT_ICONTACT_H_
 
 #include <ctime>
 #include <string>
@@ -43,17 +44,29 @@ namespace TizenApis {
 namespace Api {
 namespace Contact {
 
-class ContactProperties;
-typedef DPL::SharedPtr<ContactProperties> ContactPropertiesPtr;
+class IContact;
+typedef DPL::SharedPtr<IContact> ContactPtr;
 
-typedef std::vector<ContactPropertiesPtr> ContactPropertiesArray;
-typedef DPL::SharedPtr<ContactPropertiesArray> ContactPropertiesArrayPtr;
+typedef std::vector<ContactPtr> ContactArray;
+typedef DPL::SharedPtr<ContactArray> ContactArrayPtr;
 
-class ContactProperties
+class IContact
 {
 public:
-       ContactProperties();
-       virtual ~ContactProperties();
+       IContact();
+       IContact(const std::string &vObjectStr, const std::string &format);
+       virtual ~IContact();
+
+       virtual std::string convertToString(const std::string &format) = 0;
+
+       std::string getId() const;
+       void setId(const std::string value);
+       void setId(const int value);
+       bool getIdIsSet() const;
+
+       std::tm getLastUpdated() const;
+       void setLastUpdated(const std::tm &value);
+       bool getLastUpdatedIsSet() const;
 
        ContactNamePtr getName() const;
        void setName(const ContactNamePtr &value);
@@ -117,12 +130,14 @@ public:
        void addCategory(const std::string &value);
        int  getCategoriesNum() const;
 
-       void clear();
-       ContactPropertiesPtr clone();
+       virtual void clear();
+       virtual ContactPtr clone() const;
 
-private:
-       ContactNamePtr                          m_name;
-       ContactAccountPtr                       m_account;
+protected:
+       std::string                 m_id;
+       std::tm                     m_lastUpdated;
+       ContactNamePtr              m_name;
+       ContactAccountPtr           m_account;
        ContactAddressArrayPtr      m_addresses;
        std::string                 m_photoURI;
        ContactPhoneNumberArrayPtr  m_phoneNumbers;
@@ -136,6 +151,8 @@ private:
        std::string                 m_ringtoneURI;
        StringArrayPtr              m_categories;
 
+       bool m_idIsSet;
+       bool m_lastUpdatedIsSet;
        bool m_nameIsSet;
        bool m_accountIsSet;
        bool m_photoURIIsSet;
@@ -148,4 +165,4 @@ private:
 } // Api
 } // TizenApis
 
-#endif // _API_CONTACT_CONTACT_PROPERTIES_H_
+#endif // _API_CONTACT_CONTACT_H_