2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
20 * @author Kisub Song (kisubs.song@samsung.com)
25 #ifndef _PLATFORM_CONTACT_CONTACT_H_
26 #define _PLATFORM_CONTACT_CONTACT_H_
36 class Contact : public IContact
42 virtual std::string convertToString(const std::string &format);
44 virtual void setContactFromString(const std::string &vObjectStr);
46 contacts_record_h getPlatformContactObject() const { return m_platformContactObject; };
48 void setNumbersJSObj(bool value, JSObjectRef initObj);
49 bool numbersJSObjIsSet() const;
50 JSObjectRef getNumbersJSObj();
51 JSValueRef getNumbersJSValue();
53 void setEmailsJSObj(bool value, JSObjectRef initObj);
54 bool EmailsJSObjIsSet() const;
55 JSObjectRef getEmailsJSObj();
56 JSValueRef getEmailsJSValue();
58 void setAnniversariesJSObj(bool value, JSObjectRef initObj);
59 bool anniversariesJSObjIsSet() const;
60 JSObjectRef getAnniversariesJSObj();
61 JSValueRef getAnniversariesJSValue();
63 void setUrlsJSObj(bool value, JSObjectRef initObj);
64 bool urlsJSObjIsSet() const;
65 JSObjectRef getUrlsJSObj();
66 JSValueRef getUrlsJSValue();
68 void setAddressesJSObj(bool value, JSObjectRef initObj);
69 bool addressesJSObjIsSet() const;
70 JSObjectRef getAddressesJSObj();
71 JSValueRef getAddressesJSValue();
73 void setOrganizationsJSObj(bool value, JSObjectRef initObj);
74 bool organizationsJSObjIsSet() const;
75 JSObjectRef getOrganizationsJSObj();
76 JSValueRef getOrganizationsJSValue();
78 void setNotesJSObj(bool value, JSObjectRef initObj);
79 bool notesJSObjIsSet() const;
80 JSObjectRef getNotesJSObj();
81 JSValueRef getNotesJSValue();
83 void setGroupIdsJSObj(bool value, JSObjectRef initObj);
84 bool groupIdsJSObjIsSet() const;
85 JSObjectRef getGroupIdsJSObj();
86 JSValueRef getGroupIdsJSValue();
88 void setContext(JSContextRef contextRef);
89 JSContextRef getContext();
92 contacts_record_h m_platformContactObject;
93 contacts_list_h m_platformContactObjectList;
95 bool m_numbersJSObjIsSet;
96 JSObjectRef m_numbersObj;
97 JSValueRef m_numbersJSValue;
99 bool m_emailsJSObjIsSet;
100 JSObjectRef m_emailsObj;
101 JSValueRef m_emailsJSValue;
103 bool m_anniversariesJSObjIsSet;
104 JSObjectRef m_anniversariesObj;
105 JSValueRef m_anniversariesJSValue;
107 bool m_urlsJSObjIsSet;
108 JSObjectRef m_urlsObj;
109 JSValueRef m_urlsJSValue;
111 bool m_addressesJSObjIsSet;
112 JSObjectRef m_addressesObj;
113 JSValueRef m_addressesJSValue;
115 bool m_organizationsJSObjIsSet;
116 JSObjectRef m_organizationsObj;
117 JSValueRef m_organizationsJSValue;
119 bool m_notesJSObjIsSet;
120 JSObjectRef m_notesObj;
121 JSValueRef m_notesJSValue;
123 bool m_groupIdsJSObjIsSet;
124 JSObjectRef m_groupIdsObj;
125 JSValueRef m_groupIdsJSValue;
127 JSContextRef m_context;
133 #endif // _PLATFORM_CONTACT_CONTACT_H_