Update change log and spec for wrt-plugins-tizen_0.4.38
authorDongjin Choi <milkelf.choi@samsung.com>
Fri, 31 May 2013 11:11:30 +0000 (20:11 +0900)
committerDongjin Choi <milkelf.choi@samsung.com>
Fri, 31 May 2013 11:11:30 +0000 (20:11 +0900)
[model] REDWOOD
[binary_type] PDA
[customer] OPEN

[Issue] N/A
[Problem] email conversation listener bug fix
[Cause] email conversation listener bug fix
[Solution] email conversation listener bug fix

[Issue] N/A
[Problem] find email has no mimeType for attachment
[Cause] mimeType is not set
[Solution] mimeType set for attachment

[Issue] N_SE-39969
[Problem] the settig of filter have a error in platform
[Cause] N/A
[Solution] modify the code to set the filter

[Systeminfo] Remove 'SYSTEM_INFO_KEY_CPS_SUPPORTED' key

[Issue] N/A
[Problem] Old notification privilege don't work
[Cause] backward compatibility was not guaranteed.
[Solution] inserted backward compatibility.

[team] WebAPI
[request] N/A
[horizontal_expansion] N/A

32 files changed:
packaging/wrt-plugins-tizen.spec
src/Calendar/CalendarConverter.cpp
src/Calendar/JSCalendarAlarm.cpp
src/Content/ContentManager.cpp
src/Filesystem/EventCopy.cpp
src/Filesystem/EventCreate.cpp
src/Filesystem/EventListNodes.cpp
src/Filesystem/EventMove.cpp
src/Filesystem/EventRemove.cpp
src/Filesystem/FilesystemUtils.cpp
src/Filesystem/JSStorage.cpp
src/Filesystem/Path.cpp
src/Filesystem/ResponseDispatcher.cpp
src/Filesystem/Stream.cpp
src/Filesystem/plugin_config.cpp
src/Messaging/Conversation.cpp
src/Messaging/Conversation.h
src/Messaging/Email.cpp
src/Messaging/IMessagingTypes.h
src/Messaging/MessageFilterConverter.cpp
src/Messaging/Messaging.cpp
src/Messaging/MessagingListener.cpp
src/Messaging/StorageChangesMessageFilterValidatorFactory.cpp
src/Messaging/StorageChangesMessageFilterValidatorFactory.h
src/Messaging/StorageChangesMessageGenerator.cpp
src/Messaging/StorageChangesMessageGenerator.h
src/Notification/config.xml
src/Systeminfo/JSDeviceCapabilitiesInfo.cpp
src/TimeUtil/JSTZDate.cpp
src/TimeUtil/JSTimeDuration.cpp
src/TimeUtil/TimeUtilConverter.cpp
src/TimeUtil/TimeUtilConverter.h

index 7243995..968efa0 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       wrt-plugins-tizen
 Summary:    JavaScript plugins for WebRuntime
-Version:    0.4.36
+Version:    0.4.38
 Release:    0
 Group:      Development/Libraries
 License:    Apache License, Version 2.0
index 9bc0a6d..920a6d6 100755 (executable)
@@ -713,7 +713,7 @@ EventAlarmPtr CalendarConverter::toEventAlarm(JSValueRef alarm)
     }
     if (!JSValueIsUndefined(m_context, beforeData)) {
         TimeUtilConverter timeConverter(m_context);
-        result->setDuration(timeConverter.getDurationPropertis(beforeData));
+        result->setDuration(timeConverter.getDurationProperties(beforeData));
     }
     if (!JSValueIsUndefined(m_context, methodData)) {
         result->setMethod(toEventAlarmType(toString(methodData)));
index 39beb03..973aaab 100755 (executable)
@@ -151,7 +151,7 @@ JSObjectRef DLL_EXPORT JSCalendarAlarm::constructor(JSContextRef context,
             }
         } else if (JSValueIsObjectOfClass(context, arguments[0], JSTimeDuration::getClassRef())){
             LoggerD("before case");
-            alarm->setDuration(timeConverter.getDurationPropertis(arguments[0]));
+            alarm->setDuration(timeConverter.getDurationProperties(arguments[0]));
 
             if (argumentCount>=2) {
                 alarm->setMethod(converter.toEventAlarmType(converter.toString(arguments[1])));
@@ -287,7 +287,7 @@ bool JSCalendarAlarm::setProperty(JSContextRef context,
                 ThrowMsg(ConversionException, "Wrong before type.");
             }
             TimeUtilConverter timeConverter(context);
-            alarm->setDuration(timeConverter.getDurationPropertis(value));
+            alarm->setDuration(timeConverter.getDurationProperties(value));
             return true;
         } else if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_CALENDAR_ALARM_DESCRIPTION)) {
             alarm->setDescription(converter.toString(value));
index 6c1ca0a..1dcf289 100755 (executable)
@@ -727,7 +727,7 @@ void MediacontentManager::OnRequestReceived(const IEventFindFolderPtr &eFolder)
     //set filter
     if ( MEDIA_CONTENT_ERROR_NONE == media_filter_create(&filter))
     {
-        string condition="FOLDER_STORAGE_TYPE = 0 OR FOLDER_STORAGE_TYPE = 1";
+        string condition="(FOLDER_STORAGE_TYPE = 0 OR FOLDER_STORAGE_TYPE = 1)";
         LoggerI("condition:" + condition);
         media_filter_set_condition(filter, condition.c_str(), MEDIA_CONTENT_COLLATE_DEFAULT ); //set condition
         if ( MEDIA_CONTENT_ERROR_NONE != 
index 84e567c..cfe7346 100755 (executable)
@@ -17,7 +17,7 @@
 
  
 #include "EventCopy.h"
-#include <dpl/assert.h>
+
 
 namespace DeviceAPI {
 namespace Filesystem {
@@ -27,8 +27,6 @@ EventCopy::EventCopy(const IPathPtr& src,
     m_dest(dest),
     m_options(OPT_NONE)
 {
-    Assert(src && "Source path not set.");
-    Assert(dest && "Destination path not set.");
 }
 
 IPathPtr EventCopy::getDestination() const
index ce8d84d..343a394 100755 (executable)
@@ -18,7 +18,6 @@
  
 #include "EventCreate.h"
 
-#include <dpl/assert.h>
 
 namespace DeviceAPI {
 namespace Filesystem {
@@ -28,7 +27,6 @@ EventCreate::EventCreate(const IPathPtr& path,
     m_type(type),
     m_options(OPT_NONE)
 {
-    Assert(path && "Path is not set.");
 }
 
 IPathPtr EventCreate::getPath() const
index f5b1659..c169442 100755 (executable)
@@ -17,7 +17,7 @@
 
  
 #include "EventListNodes.h"
-#include <dpl/assert.h>
+#include <Commons/Exception.h>
 #include "INode.h"
 #include "Enums.h"
 
@@ -25,7 +25,10 @@ namespace DeviceAPI {
 namespace Filesystem {
 EventListNodes::EventListNodes(const INodePtr& node) : m_node(node)
 {
-    Assert(m_node && "Node can't be NULL.");
+       if (node == NULL)
+       {
+               ThrowMsg(WrtDeviceApis::Commons::PlatformException, "Can not new an object");
+       }
 }
 
 INodePtr EventListNodes::getNode() const
@@ -55,4 +58,4 @@ void EventListNodes::setResult(const NodeList& list)
 
 
 } // Filesystem
-} // TizenApis
\ No newline at end of file
+} // TizenApis
index f721e16..fd9afcc 100755 (executable)
@@ -17,7 +17,6 @@
 
  
 #include "EventMove.h"
-#include <dpl/assert.h>
 
 namespace DeviceAPI {
 namespace Filesystem {
@@ -27,8 +26,7 @@ EventMove::EventMove(const IPathPtr& src,
     m_dest(dest),
     m_options(OPT_NONE)
 {
-    Assert(src && "Source path not set.");
-    Assert(dest && "Destination path not set.");
+
 }
 
 IPathPtr EventMove::getDestination() const
index 9c0da9b..2253943 100755 (executable)
@@ -17,7 +17,6 @@
 
  
 #include "EventRemove.h"
-#include <dpl/assert.h>
 
 namespace DeviceAPI {
 namespace Filesystem {
@@ -25,7 +24,6 @@ EventRemove::EventRemove(const IPathPtr& path) :
     m_path(path),
     m_options(OPT_NONE)
 {
-    Assert(m_path && "Path is not set.");
 }
 
 IPathPtr EventRemove::getPath() const
index f4b0b35..e351ff3 100644 (file)
@@ -17,7 +17,6 @@
 
 #include <map>
 #include <string>
-#include <dpl/assert.h>
 #include <Commons/Exception.h>
 #include "Enums.h"
 #include "IManager.h"
index 25027ef..35f4f01 100644 (file)
@@ -128,9 +128,11 @@ JSValueRef JSStorage::getProperty(JSContextRef context,
                JSValueRef* exception)
 {
        JSStoragePriv *priv = static_cast<JSStoragePriv*>(JSObjectGetPrivate(object));
-       assert(priv && "Private object not set.");
 
        Try {
+               if (!priv) {
+                       ThrowMsg(Commons::PlatformException, "Can not new an object");
+               }
                StorageProperties *storages = priv->getObject();
                Converter convert(context);
 
index 1232a91..453b946 100644 (file)
@@ -20,7 +20,6 @@
 #include <iterator>
 #include <stdlib.h>
 #include <limits.h>
-#include <dpl/assert.h>
 #include <Commons/Exception.h>
 #include <Commons/StringUtils.h>
 #include "Path.h"
index 4f2d96f..3eda79a 100644 (file)
@@ -62,7 +62,6 @@ void ResponseDispatcher::OnAnswerReceived(const EventResolvePtr& event)
        LoggerD("ENTER");
        EventGetNodeDataPtr data =
        DPL::DynamicPointerCast<EventGetNodeData>(event->getPrivateData());
-       Assert(NULL != data);
 
        FilesystemAsyncCallbackManagerSingleton::Instance().unregisterCallbackManager(data->getCallbackManager());
 
@@ -103,7 +102,6 @@ void ResponseDispatcher::OnAnswerReceived(const EventListNodesPtr& event)
        DPL::DynamicPointerCast<JSFile::ListFilesPrivateData>(event->getPrivateData());
 
        JSCallbackManagerPtr data = privData->getCallbackManager();
-       Assert(NULL != data);
 
        FilesystemAsyncCallbackManagerSingleton::Instance().unregisterCallbackManager(data);
 
@@ -132,7 +130,6 @@ void ResponseDispatcher::OnAnswerReceived(const EventOpenPtr& event)
        LoggerD("ENTER");
        DPL::SharedPtr<JSCallbackManager> data =
        DPL::DynamicPointerCast<JSCallbackManager>(event->getPrivateData());
-       Assert(NULL != data);
 
        FilesystemAsyncCallbackManagerSingleton::Instance().unregisterCallbackManager(data);
 
@@ -157,7 +154,6 @@ void ResponseDispatcher::OnAnswerReceived(const EventCopyPtr& event)
        LoggerD("ENTER");
        DPL::SharedPtr<JSCallbackManager> data =
        DPL::DynamicPointerCast<JSCallbackManager>(event->getPrivateData());
-       Assert(NULL != data);
 
        FilesystemAsyncCallbackManagerSingleton::Instance().unregisterCallbackManager(data);
 
@@ -188,7 +184,6 @@ void ResponseDispatcher::OnAnswerReceived(const EventMovePtr& event)
        LoggerD("ENTER");
        DPL::SharedPtr<JSCallbackManager> data =
        DPL::DynamicPointerCast<JSCallbackManager>(event->getPrivateData());
-       Assert(NULL != data);
 
        FilesystemAsyncCallbackManagerSingleton::Instance().unregisterCallbackManager(data);
 
@@ -220,7 +215,6 @@ void ResponseDispatcher::OnAnswerReceived(const EventRemovePtr& event)
        LoggerD("--| ENTER");
        DPL::SharedPtr<JSCallbackManager> data =
        DPL::DynamicPointerCast<JSCallbackManager>(event->getPrivateData());
-       Assert(NULL != data);
 
        FilesystemAsyncCallbackManagerSingleton::Instance().unregisterCallbackManager(data);
 
@@ -246,7 +240,6 @@ void ResponseDispatcher::OnAnswerReceived(const EventReadTextPtr& event)
        LoggerD("--| ENTER");
        DPL::SharedPtr<JSCallbackManager> data =
        DPL::DynamicPointerCast<JSCallbackManager>(event->getPrivateData());
-       Assert(NULL != data);
 
        FilesystemAsyncCallbackManagerSingleton::Instance().unregisterCallbackManager(data);    
 
@@ -292,7 +285,6 @@ void ResponseDispatcher::OnAnswerReceived(const EventReadTextPtr& event)
 void ResponseDispatcher::OnAnswerReceived(const EventGetStoragePtr& event)
 {
        DPL::SharedPtr<JSCallbackManager> data = DPL::DynamicPointerCast<JSCallbackManager>(event->getPrivateData());
-       Assert(NULL != data);
 
        FilesystemAsyncCallbackManagerSingleton::Instance().unregisterCallbackManager(data);
 
@@ -322,7 +314,6 @@ void ResponseDispatcher::OnAnswerReceived(const EventGetStoragePtr& event)
 void ResponseDispatcher::OnAnswerReceived(const EventListStoragesPtr& event)
 {
        DPL::SharedPtr<JSCallbackManager> data = DPL::DynamicPointerCast<JSCallbackManager>(event->getPrivateData());
-       Assert(NULL != data);
 
        FilesystemAsyncCallbackManagerSingleton::Instance().unregisterCallbackManager(data);
 
index c0e9af7..2660193 100644 (file)
@@ -20,7 +20,6 @@
 
 #include <stdio.h>
 #include <new>
-#include <dpl/assert.h>
 #include <dpl/scoped_array.h>
 
 #include <Commons/Exception.h>
@@ -38,7 +37,6 @@ Stream::Stream(const NodePtr& parent,
     m_parent(parent),
     m_mode(mode)
 {
-    Assert(m_parent && "Stream needs to have parent.");
 
     std::ios_base::openmode mode_ = std::ios_base::binary;
     if (mode & AM_READ) { mode_ |= std::ios_base::in; }
index 40ec29c..e0ca0b2 100755 (executable)
@@ -19,7 +19,6 @@
 #include <map>
 #include <utility>
 
-#include <dpl/assert.h>
 #include <Commons/FunctionDefinition.h>
 #include <Commons/FunctionDeclaration.h>
 #include <Commons/Exception.h>
@@ -357,9 +356,6 @@ void setFilesystemPermDevCaps(int permissions,
         WrtDeviceApis::Commons::AceFunction* outFunction)
 {
     using namespace WrtDeviceApis::Commons;
-
-    Assert(outFunction && (permissions != Filesystem::PERM_NONE));
-
     AceDeviceCapParam paramLocation = AceDeviceCapParam(
             FILESYSTEM_PARAM_LOCATION, path);
 
@@ -400,8 +396,6 @@ void setFilesystemAccessModeDevCaps(int accessMode,
 {
     using namespace WrtDeviceApis::Commons;
 
-    Assert(outFunction);
-
     AceDeviceCapParam paramLocation = AceDeviceCapParam(
             FILESYSTEM_PARAM_LOCATION,
             path);
index e400bbf..a01494c 100644 (file)
@@ -46,9 +46,9 @@ Conversation::Conversation(unsigned int threadId, MessageType msgType)
        {
                makeConversationFromEmailThreadId(threadId);
        }
-       else if(msgType == EMPTY_MESSAGE)
+       else if((msgType == EMPTY_MESSAGE_CONVERSATION)||(msgType == EMPTY_EMAIL_CONVERSATION))
        {
-               // do nothing
+               makeEmptyConversation(threadId, msgType);
        }
        else
        {
@@ -750,6 +750,33 @@ bool Conversation::makeConversationFromEmailThreadId(unsigned int emailTreadId)
        return m_result;
 
 }
+
+void Conversation::makeEmptyConversation(unsigned int threadIndex, MessageType msgType)
+{
+       LoggerD("Enter");
+       if(msgType == EMPTY_MESSAGE_CONVERSATION)
+       {
+               m_type = SMS;
+               m_Id = 0;
+       }
+       else
+       {
+               m_type = EMAIL;
+               m_Id = threadIndex;
+       }
+       m_time = 0;
+       m_messageCount = 0;
+       m_unreadMessages = 0;
+       m_preview = "";
+       m_read = false;
+       m_from = "";
+       m_subject = "";
+       m_lastMessageId = 0;
+       m_direction = 0;
+       m_result = true;
+}
+
+
 Conversation::~Conversation()
 {
 }
index ce4eda2..1185b16 100644 (file)
@@ -68,6 +68,7 @@ public:
 //     void makeConversationFromThread(msg_thread_view_t msg_thread);
        void makeConversationFromThread(msg_struct_t msg_thread);
        bool makeConversationFromEmailThreadId(unsigned int emailTreadId);
+       void makeEmptyConversation(unsigned int threadIndex, MessageType msgType);      
        void setConvId(const int id);
 #if 0
        // setter
index fde5680..98b8302 100644 (file)
@@ -609,6 +609,10 @@ void Email::readBody() {
                                        tmpAtt->setAttachmentID(attachment[i].attachment_id);
                                        tmpAtt->setDownloaded(attachment[i].save_status);
                                        tmpAtt->setIsInlineAttachment((bool)attachment[i].inline_content_status);
+                                       if(attachment[i].attachment_mime_type)
+                                       {
+                                               tmpAtt->setMimeType(attachment[i].attachment_mime_type);
+                                       }
                                        tmpAtt->setNth(i+1);
                                        LoggerD(" setNth(i+1) : " << i+1);
                                        if(attachment[i].inline_content_status == 0)
@@ -1310,11 +1314,16 @@ void Email::updateAttachments()
                                attachment_info->attachment_path = String::strdup( buf );
                                attachment_info->save_status = true;
                                attachment_info->inline_content_status = 0;
+                               if(att->getMimeType().size() > 0)
+                               {
+                                       attachment_info->attachment_mime_type = String::strdup(att->getMimeType());
+                               }
 
                                LoggerD("attachment_info->attachment_name=" << attachment_info->attachment_name);
                                LoggerD("attachment_info->attachment_path=" << attachment_info->attachment_path);
                                LoggerD("attachment_info->save_status=" << attachment_info->save_status);
                                LoggerD("attachment_info->inline_content_status=" << attachment_info->inline_content_status);
+                               LoggerD("attachment_info->attachment_mime_type=" << attachment_info->attachment_mime_type);
 
                                LoggerD("Copy Command=" << cp_cmd.str());
                                if (EINA_TRUE != ecore_file_is_dir(att->getFullPath().c_str())) {
@@ -1393,6 +1402,10 @@ void Email::updateAttachments()
                                attachment_info->save_status = true;
                                attachment_info->inline_content_status = 1;
                                LoggerD("attachment_info->inline_content_status=" << attachment_info->inline_content_status);
+                               if(att->getMimeType().size() > 0)
+                               {
+                                       attachment_info->attachment_mime_type = String::strdup(att->getMimeType());
+                               }
 
                                LoggerD("Copy Command=" << cp_cmd.str());
                                if (EINA_TRUE != ecore_file_is_dir(att->getFullPath().c_str())) {
@@ -1402,6 +1415,7 @@ void Email::updateAttachments()
                                                ThrowMsg(WrtDeviceApis::Commons::PlatformException, "Failed to copy file");
                                        }
                                }
+                               LoggerD("attachment_info->attachment_mime_type=" << attachment_info->attachment_mime_type);
 
 /*
                                int result = system(cp_cmd.str().c_str());
index bb2a7a6..779e169 100644 (file)
@@ -38,6 +38,8 @@ enum MessageType
        BINARYSMS,
        VIRTUAL_MESSAGE,
        EMPTY_MESSAGE,
+       EMPTY_MESSAGE_CONVERSATION,     
+       EMPTY_EMAIL_CONVERSATION,       
        MESSAGETYPE_COUNT
 };
 
index 3a35d2e..5374cc6 100644 (file)
@@ -102,6 +102,7 @@ static PropertyStructArray propertiesFolders =
 
 static PropertyStructArray propertiesMessagesChange =
 {
+               { ATTRIBUTE_ID,                                 PrimitiveType_String },
                { ATTRIBUTE_SERVICE_ID,         PrimitiveType_String },
                { ATTRIBUTE_CONVERSATION_ID,    PrimitiveType_String },
                { ATTRIBUTE_FOLDER_ID,          PrimitiveType_String },
index 44cd54b..6478111 100644 (file)
@@ -1375,7 +1375,7 @@ void Messaging::OnEventReceived(const DBus::MessageEvent& event)
                                                stream >> id;
 
                                                IMessagePtr msg = MessageFactory::createMessage(EMPTY_MESSAGE, id);
-                                               IConversationPtr conversation(new Conversation());
+                                               IConversationPtr conversation(new Conversation(mail_id, EMPTY_EMAIL_CONVERSATION));
 
                                                FolderType folder = msg->getCurrentFolder();
                                                jsEvent->setMsg_Event_Type(EventMessageReceived::MSG_DELETED);
@@ -1401,7 +1401,7 @@ void Messaging::OnEventReceived(const DBus::MessageEvent& event)
                                LoggerI("Email received. mail_id: " << mail_id);
 
                                IMessagePtr msg = MessageFactory::createMessage(EMAIL, mail_id);
-                               IConversationPtr conversation(new Conversation(thread_id, EMAIL));
+                               IConversationPtr conversation(new Conversation(mail_id, EMAIL));
 
                                FolderType folder = msg->getCurrentFolder();
                                jsEvent->setMsg_Event_Type(EventMessageReceived::MSG_UPDATED);
@@ -1421,7 +1421,7 @@ void Messaging::OnEventReceived(const DBus::MessageEvent& event)
                        { // TODO also RECEIVE_THREAD_ITEM?
                                LoggerI("Email received. delete thread Id : " << mail_id);
 
-                               IConversationPtr conversation(new Conversation());
+                               IConversationPtr conversation(new Conversation(mail_id, EMPTY_EMAIL_CONVERSATION));
                                conversation->setConvId(mail_id);
                                jsEvent->setMsg_Event_Type(EventMessageReceived::MSG_DELETED);
                                jsEvent->setConversation(conversation);
index 1e1d5e7..f37431b 100644 (file)
@@ -547,7 +547,7 @@ void MessagingListener::onAnswerReceived(
                                DeviceAPI::Tizen::FilterPtr filter = multiCallbacks->getFilter();
                                IMessagePtr msg = event->getMessage();
 
-                               if(filter != NULL && msg->getMessageType() != EMPTY_MESSAGE)
+                               if(filter != NULL)
                                {
                                        LoggerD("Filter exist");                        
                                        StorageChangesMessageGeneratorPtr queryGenerator(new StorageChangesMessageGenerator(event->getMessage(), event->getConversation()));
@@ -555,7 +555,6 @@ void MessagingListener::onAnswerReceived(
                                        DeviceAPI::Tizen::IFilterVisitorPtr filterVisitor = DPL::StaticPointerCast<DeviceAPI::Tizen::IFilterVisitor>(queryGenerator);
                                        filter->travel(filterVisitor, 0);
                                        std::vector<IMessagePtr> msgs; // for msg
-       //                              IMessagePtr msg = event->getMessage();
                                        if(queryGenerator->getCompareResult())
                                        {
                                                LoggerD("Message call back");
index b2ccf23..7489fe0 100755 (executable)
@@ -22,6 +22,7 @@ using namespace DeviceAPI::Tizen;
 namespace DeviceAPI {
        namespace Messaging {
 
+               const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_ID                       = "id";
                const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_SERVICE_ID       = "serviceId";
                const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_CONVERSATION_ID  = "conversationId";           
                const std::string StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_FOLDER_ID        = "folderId";
@@ -42,6 +43,7 @@ namespace DeviceAPI {
 
                static PropertyStructArray properties =
                {
+                               {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_ID.c_str(),                    DeviceAPI::Tizen::PrimitiveType_String},
                                {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_SERVICE_ID.c_str(),            DeviceAPI::Tizen::PrimitiveType_String},
                                {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_CONVERSATION_ID.c_str(),       DeviceAPI::Tizen::PrimitiveType_String},
                                {StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_FOLDER_ID.c_str(),             DeviceAPI::Tizen::PrimitiveType_String},
index eeea490..8f8faca 100644 (file)
@@ -34,6 +34,7 @@ namespace DeviceAPI {
                                static StorageChangesMessageFilterValidatorPtr getStorageChangesMessageFilterValidator();
 
                        public:
+                               static const std::string ATTRIBUTE_ID;
                                static const std::string ATTRIBUTE_SERVICE_ID;
                                static const std::string ATTRIBUTE_CONVERSATION_ID;
                                static const std::string ATTRIBUTE_FOLDER_ID;                           
index 90985f9..127ec50 100644 (file)
@@ -38,6 +38,7 @@ namespace DeviceAPI {
                        m_messageType(MESSAGE_TYPE_NOT_INITIALIZED) , m_serviceId(-1)
                        {
 
+                       m_id = msg->getIdRef();
                        m_type = msg->getMessageType();
                        m_folder = msg->getCurrentFolder();
                        m_dateTime = msg->getDateTime();
@@ -451,6 +452,25 @@ namespace DeviceAPI {
                        std::string valueString;
 
 //  Check msg_type and filter_type
+                       if(attrName.compare(StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_ID)==0){
+                               LoggerD("<<< value:[" << value << "]");
+                               LoggerD("<<< value->toString():[" << value->toString() << "]");
+                               LoggerD("<<< m_id:[" << m_id << "]");
+                       
+                               valueString = m_id;
+                               if(getMatchFlagResult(value, valueString, matchFlag))
+                               {
+                                       m_result.push_back(TRUE);
+                                       LoggerD("<<< id is same");
+                               }
+                               else
+                               {
+                                       m_result.push_back(FALSE);
+                                       LoggerD("<<< id is different");
+                               }
+                               return;
+                       }
+
                        if(attrName.compare(StorageChangesMessageFilterValidatorFactory::ATTRIBUTE_SERVICE_ID)==0){
                                LoggerD("<<< value:[" << value << "]");
                                int nType = atoi(value->toString().c_str());                            
index e4ce2d6..1ba9070 100644 (file)
@@ -89,7 +89,7 @@ namespace DeviceAPI {
                                std::vector<bool> m_result;
                                std::vector<int> m_operand;                             
 
-//                             std::string m_id;
+                               std::string m_id;
                                MessageType m_type;
                                FolderType m_folder;
                                struct tm m_dateTime;
index ed780b9..a63a880 100644 (file)
         <device-capability>notification</device-capability>
     </api-feature>
 
-</plugin-properties>
\ No newline at end of file
+    <api-feature>
+        <name>http://tizen.org/privilege/notification.read</name>
+    </api-feature>
+    
+    <api-feature>
+        <name>http://tizen.org/privilege/notification.write</name>
+        <device-capability>notification</device-capability>
+    </api-feature>
+
+</plugin-properties>
index 3f3a715..c850b31 100755 (executable)
@@ -444,10 +444,18 @@ JSValueRef JSDeviceCapabilitiesInfo::getProperty(JSContextRef context, JSObjectR
             return convert.toJSValueRef(deviceCapabilitiesInfo->cameraBackFlash);
         } else if (JSStringIsEqualToUTF8CString(propertyName, DEVICE_CAPABILITIES_LOCATION)) {
             bool location = false;
-            if (system_info_get_value_bool(SYSTEM_INFO_KEY_CPS_SUPPORTED, &location) == SYSTEM_INFO_ERROR_NONE) {
-                LoggerD("location : " << location);
-                deviceCapabilitiesInfo->location = location;
+            bool locationGps = false;
+            bool locationWps = false;
+            if (system_info_get_value_bool(SYSTEM_INFO_KEY_GPS_SUPPORTED, &locationGps) == SYSTEM_INFO_ERROR_NONE) {
+                LoggerD("locationGps : " << locationGps);
+            }
+            if (system_info_get_value_bool(SYSTEM_INFO_KEY_WPS_SUPPORTED, &locationWps) == SYSTEM_INFO_ERROR_NONE) {
+                LoggerD("locationWps : " << locationWps);
+            }
+            if (locationGps || locationWps) {
+                location = true;
             }
+            deviceCapabilitiesInfo->location = location;
             return convert.toJSValueRef(deviceCapabilitiesInfo->location);
         } else if (JSStringIsEqualToUTF8CString(propertyName, DEVICE_CAPABILITIES_LOCATIONGPS)) {
             bool locationGps = false;
index 1364cda..4cd51e1 100644 (file)
@@ -540,9 +540,9 @@ JSValueRef JSTZDate::addDuration(JSContextRef context, JSObjectRef function,
 
                DurationProperties duration;
                if (argumentCount == 0)
-                       duration= converter.getDurationPropertis(JSValueMakeUndefined(context));
+                       duration= converter.getDurationProperties(JSValueMakeUndefined(context));
                else
-                       duration= converter.getDurationPropertis(arguments[0]);
+                       duration= converter.getDurationProperties(arguments[0]);
 
                LoggerD("unit : " << duration.unit << " Length:" << duration.length);
                TZDatePrivObject* privateObject = static_cast<TZDatePrivObject*>(JSObjectGetPrivate(thisObject));
index 5e15c3d..cd36745 100755 (executable)
@@ -247,12 +247,12 @@ JSValueRef JSTimeDuration::diffTimeDuration(JSContextRef context, JSObjectRef th
 
        TimeUtilConverter converter(context);
 
-       DurationProperties first = converter.getDurationPropertis(thisObject);
+       DurationProperties first = converter.getDurationProperties(thisObject);
        DurationProperties second;
        if (argumentCount == 0)
-               second= converter.getDurationPropertis(JSValueMakeUndefined(context));
+               second= converter.getDurationProperties(JSValueMakeUndefined(context));
        else
-               second= converter.getDurationPropertis(arguments[0]);
+               second= converter.getDurationProperties(arguments[0]);
 
        DurationProperties diff;
        if (first.unit > second.unit) {
index 68cb952..fb931ae 100755 (executable)
@@ -108,7 +108,7 @@ DurationPropertiesPtr TimeUtilConverter::getDuration(JSValueRef value) {
        return duration;
 }
 
-DurationProperties TimeUtilConverter::getDurationPropertis(JSValueRef value) {
+DurationProperties TimeUtilConverter::getDurationProperties(JSValueRef value) {
        DurationProperties duration;
        duration.length = getDurationLength(value);
        duration.unit = getDurationUnit(value);
index 878311e..3962903 100755 (executable)
@@ -50,7 +50,7 @@ class TimeUtilConverter : public Converter
        JSObjectRef makeDurationObject(const DurationProperties &duration);
        JSObjectRef makeMillisecondDurationObject(const long long length);
        DurationPropertiesPtr getDuration(JSValueRef value);
-       DurationProperties getDurationPropertis(JSValueRef value);
+       DurationProperties getDurationProperties(JSValueRef value);
        long long getDurationLength(JSValueRef value);
        long long getDurationLength(JSObjectRef object);
        short getDurationUnit(JSValueRef value);