merge wrt-plugins-tizen_0.2.0-3
[platform/framework/web/wrt-plugins-tizen.git] / src / standards / Tizen / Call / JSCallHistoryEntry.cpp
index 9c0751d..5ce2981 100755 (executable)
@@ -24,6 +24,7 @@
 #include <API/Call/CallHistoryEntryProperties.h>
 #include <API/Call/CallHistoryFactory.h>
 #include <API/Call/ICallHistoryEntry.h>
+#include <API/Call/CallDefine.h>
 #include <Tizen/Common/JSTizenException.h>
 #include <Tizen/Common/JSTizenExceptionFactory.h>
 #include <Tizen/Common/SecurityExceptions.h>
@@ -40,20 +41,6 @@ using namespace WrtDeviceApis::CommonsJavaScript;
 using namespace Api::Call;
 using namespace TizenApis::Commons;
 
-#define STR_ENTRY_ID                   "entryId"
-#define STR_SERVICE_ID                 "serviceId"
-#define STR_CALL_TYPE                  "callType"
-#define STR_TAGS                               "tags"
-#define STR_REMOTE_PARTIES             "remoteParties"
-#define STR_FORWARDEDFROM              "forwardedFrom"
-#define STR_START_TIME                 "startTime"
-#define STR_DURATION                   "duration"
-#define STR_END_REASON                 "endReason"
-#define STR_DIRECTION                  "direction"
-#define STR_RECORDING                  "recording"
-#define STR_COST                               "cost"
-#define STR_CURRENCY                   "currency"
-
 JSClassDefinition JSCallHistoryEntry::m_classInfo = {
        0,
        kJSClassAttributeNone,
@@ -195,9 +182,9 @@ bool JSCallHistoryEntry::setProperty(JSContextRef context,
                                std::string direction(converter.toString(value));
 
                                if (callHistoryEntry != NULL) {
-                                       if((entryInfo->getDirection().compare("missed-new") == 0) && (direction.compare("missed") == 0)) {
+                                       if((entryInfo->getDirection().compare(STR_MISSED_NEW) == 0) && (direction.compare(STR_MISSED) == 0)) {
                                                callHistoryEntry->setMarkSeen(entryInfo->getEntryId());
-                                               entryInfo->setDirection("missed");
+                                               entryInfo->setDirection(STR_MISSED);
                                        } else {
                                                Throw(WrtDeviceApis::Commons::UnsupportedException);
                                        }