merge wrt-plugins-tizen_0.2.0-4
authorSangtai Kim <sangtai.kim@samsung.com>
Tue, 21 Feb 2012 01:52:46 +0000 (10:52 +0900)
committerSangtai Kim <sangtai.kim@samsung.com>
Tue, 21 Feb 2012 01:52:46 +0000 (10:52 +0900)
26 files changed:
debian/changelog
src/platform/API/Call/CallDefine.h
src/platform/API/Mediacontent/MediacontentMedia.cpp
src/platform/API/Mediacontent/MediacontentMedia.h
src/platform/API/Messaging/AttachmentFactory.cpp
src/platform/API/Messaging/MessageFilterValidator.cpp
src/platform/API/Messaging/MessageFilterValidator.h
src/platform/API/Messaging/MessageFilterValidatorFactory.cpp
src/platform/API/Messaging/MessageFilterValidatorFactory.h
src/platform/Tizen/Calendar/EventWrapper.cpp
src/platform/Tizen/Mediacontent/MediaFilterValidator.cpp
src/platform/Tizen/Mediacontent/MediaSearchVisitor.cpp
src/platform/Tizen/Mediacontent/Mediacontent.cpp
src/platform/Tizen/Messaging/MessageQueryGenerator.cpp
src/standards/Tizen/Alarm/AlarmAbsolute.h
src/standards/Tizen/Alarm/AlarmRelative.h
src/standards/Tizen/Alarm/alarm_common.h
src/standards/Tizen/Bluetooth/JSBluetoothAdapter.cpp
src/standards/Tizen/Bluetooth/JSBluetoothServiceHandler.cpp
src/standards/Tizen/Mediacontent/JSAudio.cpp
src/standards/Tizen/Mediacontent/JSFolder.cpp
src/standards/Tizen/Mediacontent/JSFolder.h
src/standards/Tizen/Mediacontent/JSMedia.cpp
src/standards/Tizen/Mediacontent/JSMedia.h
src/standards/Tizen/Mediacontent/JSVideo.cpp
src/standards/Tizen/Messaging/JSMessagingStorage.cpp

index d9489ab..f68d40f 100644 (file)
@@ -1,3 +1,12 @@
+wrt-plugins-tizen (0.2.0-4) unstable; urgency=low
+
+  * Contact, Call, MediaContent bug fix
+  * Git : slp/pkgs/w/wrt-plugins-tizen
+  * Tag : wrt-plugins-tizen_0.2.0-4
+
+
+ -- Sangtai Kim <sangtai.kim@samsung.com>  Tue, 21 Feb 2012 10:38:25 +0900
+
 wrt-plugins-tizen (0.2.0-3) unstable; urgency=low
 
   * update call api
index 160f0e9..c67fde7 100755 (executable)
@@ -66,7 +66,7 @@ namespace {
 #define STR_RELATED_ID                 "related_id"
 
 #define STR_TEL_URI                    "tel://"
-#define STR_TIZEN_DIALER               "com.samsung.phone" //org.tizen.phone
+#define STR_TIZEN_DIALER               "org.tizen.phone"
 
 #define STR_SERVICE_NAME               "serviceName"
 #define STR_PROVIDER_ID                        "providerId"
@@ -79,4 +79,4 @@ namespace {
 #define STR_EMERGENCY_NUMBERS  "emergencyNumbers"
 }
 
-#endif
\ No newline at end of file
+#endif
index 6457d5e..40ae0d0 100644 (file)
@@ -193,6 +193,17 @@ EditableAttributeListPtr   MediacontentMedia::getEditableAttr() const
 }
 
 
+void MediacontentMedia::setSize(int value)
+{
+       m_size = value;
+}
+
+int MediacontentMedia::getSize() const
+{
+       return m_size;
+}
+
+
 }
 }
 }
index d606340..fab5eb8 100644 (file)
@@ -49,31 +49,33 @@ class MediacontentMedia
        MediacontentMedia();
        virtual ~MediacontentMedia();
 
-       string getMediaUUID() const;
-       string getMediaType() const;
-       string getMimeType();
-       string getDisplayName() const;
-       string getFilePath() const;
-       string getThumbnailPath() const;
-       tm getCreatedDate() const;
-       tm getReleasedDate() const;
-       tm getModifiedDate() const;
-       string getDescription() const;  
+       virtual string getMediaUUID() const;
+       virtual string getMediaType() const;
+       virtual string getMimeType();
+       virtual string getDisplayName() const;
+       virtual string getFilePath() const;
+       virtual string getThumbnailPath() const;
+       virtual tm getCreatedDate() const;
+       virtual tm getReleasedDate() const;
+       virtual tm getModifiedDate() const;
+       virtual string getDescription() const;  
        int getFavorite() const;
+       virtual int getSize() const;
 
        bool getIsChangedFavorite() const;
 
-       void setMediaUUID(const string &value);
-       void setMediaType(const string &value);
-       void setMimeType(const string &value);
-       void setDisplayName(const string &value);       
-       void setFilePath(const string &value);  
-       void setThumbnailPath(const string &value);     
-       void setCreatedDate(const tm &value);
-       void setReleasedDate(const tm &value);
-       void setModifiedDate(const tm &value);  
-       void setFavorite( int value);
-       void setDescription(const string &value);
+       virtual void setMediaUUID(const string &value);
+       virtual void setMediaType(const string &value);
+       virtual void setMimeType(const string &value);
+       virtual void setDisplayName(const string &value);       
+       virtual void setFilePath(const string &value);  
+       virtual void setThumbnailPath(const string &value);     
+       virtual void setCreatedDate(const tm &value);
+       virtual void setReleasedDate(const tm &value);
+       virtual void setModifiedDate(const tm &value);  
+       virtual void setFavorite( int value);
+       virtual void setDescription(const string &value);
+       virtual void setSize(int value);
 
        void display() const;
        virtual EditableAttributeListPtr        getEditableAttr() const;
@@ -89,6 +91,7 @@ class MediacontentMedia
        tm m_createdDate;
        tm m_releasedDate;
        tm m_modifiedDate;
+       int m_size;
        int m_favorite;
        bool m_isChangedFavorite;
        bool m_isGetMimetype;
index b1b43d9..6de68a4 100755 (executable)
@@ -211,11 +211,10 @@ std::string AttachmentFactory::getVirtualPathFromRealPath(JSContextRef context,
                std::string virtualpath = vroot +  AttachmentFactory::m_pathSeparator + tail ;
                LogDebug("virtualpath = " << virtualpath);
                return virtualpath;
-       }       
+       }
 
-       //other file.
-       
-       //copy file
+       //another folder
+       //copy
        size_t pos = realpath.find_last_of("/");
        if ((pos + 1) >= realpath.size()) {
            LogError("Problem with short name creation");
@@ -227,17 +226,20 @@ std::string AttachmentFactory::getVirtualPathFromRealPath(JSContextRef context,
        {
                LogError("Problem with short name creation");
                Throw(InvalidArgumentException);
-       }       
+       }
        
      std::stringstream to_oss;
                to_oss << "/email/" << attachShortName;
-               LogDebug("temp file=" << to_oss.str());
+               
+       LogDebug("temp file=" << to_oss.str());
        
        std::stringstream cp_oss;
        cp_oss << COMMAND_NAME;
        cp_oss << " " << COMMAND_SWITCH_RECURSIVE;
        cp_oss << " \"" << realpath << "\"";
        cp_oss << " \"" << privat_dir << to_oss.str() << "\"";
+
+       LogDebug("cp path=" << cp_oss.str());
        
        std::string vrootpath(VPATH_WGT_PRIVATE);
        
index 694d5dc..65f4a99 100755 (executable)
@@ -80,6 +80,8 @@ namespace TizenApis {
 
                        m_priorityMatchFlagVec.push_back(MessageFilterValidatorFactory::MATCH_EXACTLY);
 
+                       m_attachmentMatchFlagVec.push_back(MessageFilterValidatorFactory::MATCH_EXACTLY);
+                       
                        m_subjectMatchFlagVec.push_back(MessageFilterValidatorFactory::MATCH_EXACTLY);
                        m_subjectMatchFlagVec.push_back(MessageFilterValidatorFactory::MATCH_CONTAINS);
                }
@@ -96,6 +98,7 @@ namespace TizenApis {
                        m_attributeAndMatchFlagsMap[MessageFilterValidatorFactory::ATTRIBUTE_IS_READ]   = m_isReadMatchFlagVec;
                        m_attributeAndMatchFlagsMap[MessageFilterValidatorFactory::ATTRIBUTE_PRIORITY]  = m_priorityMatchFlagVec;
                        m_attributeAndMatchFlagsMap[MessageFilterValidatorFactory::ATTRIBUTE_SUBJECT]   = m_subjectMatchFlagVec;
+                       m_attributeAndMatchFlagsMap[MessageFilterValidatorFactory::ATTRIBUTE_ATTACHMENT] = m_attachmentMatchFlagVec;
                        m_attributeAndMatchFlagsMap[MessageFilterValidatorFactory::ATTRIBUTE_TO]        = m_toMatchFlagVec;
                }
 
index 4b27b00..3327c0d 100755 (executable)
@@ -48,6 +48,7 @@ namespace TizenApis {
                                std::vector<std::string>  m_isReadMatchFlagVec;
                                std::vector<std::string>  m_priorityMatchFlagVec;
                                std::vector<std::string>  m_subjectMatchFlagVec;
+                               std::vector<std::string>  m_attachmentMatchFlagVec;
 
                                std::map<std::string, std::vector<std::string> > m_attributeAndMatchFlagsMap;
 
index 762e8ba..cfd63b9 100755 (executable)
@@ -40,6 +40,7 @@ namespace TizenApis {
                const std::string MessageFilterValidatorFactory::ATTRIBUTE_IS_READ          = "isRead";
                const std::string MessageFilterValidatorFactory::ATTRIBUTE_PRIORITY         = "priority";
                const std::string MessageFilterValidatorFactory::ATTRIBUTE_SUBJECT          = "subject";
+               const std::string MessageFilterValidatorFactory::ATTRIBUTE_ATTACHMENT   = "hasAttachment";
 
                 std::string MessageFilterValidatorFactory::MATCH_EXACTLY              = "EXACTLY";
                 std::string MessageFilterValidatorFactory::MATCH_CONTAINS             = "CONTAINS";
@@ -60,6 +61,7 @@ namespace TizenApis {
                                {MessageFilterValidatorFactory::ATTRIBUTE_IS_READ.c_str(),   Api::Tizen::PrimitiveType_Boolean},
                                {MessageFilterValidatorFactory::ATTRIBUTE_PRIORITY.c_str(),  Api::Tizen::PrimitiveType_Boolean},
                                {MessageFilterValidatorFactory::ATTRIBUTE_SUBJECT.c_str(),   Api::Tizen::PrimitiveType_String},
+                               {MessageFilterValidatorFactory::ATTRIBUTE_ATTACHMENT.c_str(),   Api::Tizen::PrimitiveType_Boolean},
                                {0,                  Api::Tizen::PrimitiveType_NoType}
                };
 
index e9426db..69ec806 100755 (executable)
@@ -52,6 +52,7 @@ namespace TizenApis {
                                static const std::string ATTRIBUTE_IS_READ;
                                static const std::string ATTRIBUTE_PRIORITY;
                                static const std::string ATTRIBUTE_SUBJECT;
+                               static const std::string ATTRIBUTE_ATTACHMENT;
 
                                static  std::string MATCH_EXACTLY;
                                static  std::string MATCH_CONTAINS;
index f9e022c..ed194a6 100755 (executable)
@@ -1100,12 +1100,11 @@ void EventWrapper::setAttendeesToPlatformEvent()
             }
 
             // save status
-            //cal_event_attendee_status_type_t status = EVENT_ATTENDEE_PENDING_AT_STATUS;
-            cal_event_attendee_status_type_t status = EVENT_ATTENDEE_COMPLETED_AT_STATUS;
+            cal_event_attendee_status_type_t status = EVENT_ATTENDEE_PENDING_AT_STATUS;
             switch (attendeeList->at(i)->getStatus()) {
-            //case EventAttendee::PENDING_AT_STATUS:
-            //    status = EVENT_ATTENDEE_PENDING_AT_STATUS;
-            //    break;
+            case EventAttendee::PENDING_AT_STATUS:
+                status = EVENT_ATTENDEE_PENDING_AT_STATUS;
+                break;
             case EventAttendee::ACCEPTED_AT_STATUS:
                 status = EVENT_ATTENDEE_ACCEPTED_AT_STATUS;
                 break;
@@ -1881,9 +1880,9 @@ void EventWrapper::setAttendeesFromPlatformEvent()
             return;
         }
         switch (attendeeStatus) {
-        //case EVENT_ATTENDEE_PENDING_AT_STATUS:
-        //    attendeePtr->setStatus(EventAttendee::PENDING_AT_STATUS);
-        //    break;
+        case EVENT_ATTENDEE_PENDING_AT_STATUS:
+            attendeePtr->setStatus(EventAttendee::PENDING_AT_STATUS);
+            break;
         case EVENT_ATTENDEE_ACCEPTED_AT_STATUS:
             attendeePtr->setStatus(EventAttendee::ACCEPTED_AT_STATUS);
             break;
@@ -2099,11 +2098,11 @@ void EventWrapper::displayPlatformEvent()
                  m_platformEvent, CAL_VALUE_INT_SENSITIVITY));
     LogDebug("event availability: " << calendar_svc_struct_get_int(
                  m_platformEvent, CAL_VALUE_INT_BUSY_STATUS));
-    //LogDebug("event alarmType: " << calendar_svc_struct_get_int(
-    //             m_platformEvent, CAL_VALUE_INT_ALARM_TYPE));
-    //LogDebug("event alarm time: " << calendar_svc_struct_get_time(
-    //             m_platformEvent, CAL_VALUE_GMT_ALARM_TIME,
-    //             CAL_TZ_FLAG_GMT));
+    LogDebug("event alarmType: " << calendar_svc_struct_get_int(
+                 m_platformEvent, CAL_VALUE_INT_ALARM_TYPE));
+    LogDebug("event alarm time: " << calendar_svc_struct_get_time(
+                 m_platformEvent, CAL_VALUE_GMT_ALARM_TIME,
+                 CAL_TZ_FLAG_GMT));
 
     GList *categoryList = NULL;
     if (CAL_SUCCESS != calendar_svc_struct_get_list(m_platformEvent,
index db09b11..353960d 100755 (executable)
@@ -25,7 +25,7 @@ namespace Mediacontent{
 static PropertyStructArray folderProperties =
 {
        {"id",                                  PrimitiveType_String},
-       {"folderURL",                   PrimitiveType_String},
+       {"folderURI",                   PrimitiveType_String},
        {"storageType",                 PrimitiveType_String},
        {"title",                               PrimitiveType_String},
        {"modifiedDate",                PrimitiveType_Time},
@@ -38,24 +38,21 @@ static PropertyStructArray mediaProperties =
        {"type",                                PrimitiveType_String},
        {"mimeType",                    PrimitiveType_String},
        {"title",                               PrimitiveType_String},
-       {"fileURL",                             PrimitiveType_String},
-       {"thumbnailURL",                PrimitiveType_String},
+       {"fileURI",                             PrimitiveType_String},
+       {"thumbnailURIs",               PrimitiveType_String},
        {"description",                 PrimitiveType_String},  
        {"rating",                              PrimitiveType_Int},     
-       {"fileURL",                             PrimitiveType_String},
-       {"createdDate",                 PrimitiveType_Time},
        {"releasedDate",                PrimitiveType_Time},
        {"modifiedDate",                PrimitiveType_Time},
        {"geolocation.latitude",        PrimitiveType_Double},
        {"geolocation.longitude",       PrimitiveType_Double},  
        {"album",                               PrimitiveType_String},  
-       {"artist",                              PrimitiveType_String},  
+       {"artists",                             PrimitiveType_String},  
        {"width",                               PrimitiveType_String},  
        {"height",                              PrimitiveType_String},          
        {"playedTime",                  PrimitiveType_Long},            
        {"playCount",                   PrimitiveType_Long},            
-       {"genre",                               PrimitiveType_String},                  
-       {"artist",                              PrimitiveType_String},                          
+       {"genres",                              PrimitiveType_String},                  
        {0, PrimitiveType_NoType}
 
 };
@@ -75,7 +72,7 @@ FilterValidatorPtr MediaFilterValidatorFactory::getMediaFilterValidator(QueryTyp
        else if(value == QUERY_MEDIA)
        {
        LogDebug("create validator of media item");
-               theMediaInstance = FilterValidatorPtr(new FilterValidator(folderProperties));
+               theMediaInstance = FilterValidatorPtr(new FilterValidator(mediaProperties));
                return theMediaInstance;
        }
           
index 81d76a6..39f4c1c 100755 (executable)
@@ -65,25 +65,20 @@ map<string, int> MediaSearchVisitor::attrEnumMap = {
 */
 map<string, string> MediaSearchVisitor::attrFolderEnumMap = {
                {"id",                          "id"},
-               {"folderURL",           "folder_path"},
+               {"folderURI",           "folder_path"},
                {"title",                       "title"},
                {"storageType",         "storage_type"},                
                {"modifiedDate",        "modified_date"},                               
 };
 
 map<string, string> MediaSearchVisitor::attrMediaEnumMap = {
-//media folder attributes.
-               {"folder.id",                   "folder_uuid"},
-               {"folder.title",                "folder_name"},         
-               {"folder.folderURL",    "folder_path"},
-               {"folder.storageType",  "storage_type"},        
 //media item attribues.
                {"id",                          "media_uuid"},
                {"type",                        "content_type"},
 //             {"mimeType",            "mime_type"},
                {"title",                       "display_name"},                
-               {"fileURL",                     "path"},
-               {"thumbnailURL",        "thumbnail_path"},              
+               {"itemURI",                     "path"},
+               {"thumbnailURIs",       "thumbnail_path"},              
                {"description",         "description"},         
                {"rating",                      "rating"},      
                {"createdDate",         "created_date"},        
@@ -93,13 +88,12 @@ map<string, string> MediaSearchVisitor::attrMediaEnumMap = {
                {"geolocation.latitude",        "latitude"}, 
                {"geolocation.longitude",       "longitude"}, 
                {"album",                       "album"}, 
-               {"artist",                      "artist"}, 
+               {"artists",                     "artist"}, 
                {"width",                       "width"}, 
                {"height",                      "height"},
                {"playedTime",          "last_played_time"},            
                {"playCount",           "played_count"},                
-               {"genre",                       "genre"},
-               {"artist",                      "artist"},
+               {"genres",                      "genre"},
 };
 
 
@@ -212,7 +206,7 @@ string MediaSearchVisitor::convertAttribute(string &attrName, AnyPtr& matchValue
        else
        {
                matchValueStr = matchValue->toString();
-       }\r
+       }
 
        if(matchValue->getType() == PrimitiveType_Time)
        {
index 75fc431..3795c4f 100644 (file)
@@ -36,15 +36,15 @@ const string SELECT_FOLDER_QUERY =
        "select folder_uuid, path, title, storage_type,modified_date from (select folder_uuid, path, folder_name as title, storage_type,modified_date from visual_folder where valid=1 union select folder_uuid, path, folder_name as title, storage_type,modified_date from audio_folder) where 1  ";
 
 const string VIEW_MEDIA_QUERY_WITH_FOLDER =
-       "select visual_uuid, folder_uuid, content_type, display_name, path, thumbnail_path,created_date, released_date, modified_date, description,rating, album, artist, last_played_time, played_count,longitude, latitude, width, height, orientation, genre, author, duration from \
-(select visual_uuid,folder_uuid, content_type, display_name, path, thumbnail_path,null as created_date, released_date, modified_date, description,rating, album, artist, last_played_time, null as played_count,longitude, latitude, width, height, orientation,null as genre, null as author, duration from visual_media join \
-       (select * from \
-               (select visual_uuid as meta_uuid, longitude, latitude, description, width, height, datetaken as released_date, orientation,null as album, null as artist, null as last_played_time,null as duration from image_meta \
-               union all \
-               select visual_uuid as meta_uuid, longitude, latitude, description, width, height, datetaken as released_date, null as orientation, album, artist, last_played_time,duration from video_meta)) \
-on visual_uuid=meta_uuid \
-union all \
-       select audio_uuid, folder_uuid as folder_uuid, content_type, title as display_name, path, thumbnail_path, added_time, year, modified_date, description, favourite, album, artist, last_played_time, played_count, null as longitude, null as latitude, null as width, null as height, null as orientation, genre, author, duration from audio_media) where 1 ";
+       "select visual_uuid, folder_uuid, content_type, display_name, path, thumbnail_path,created_date, released_date, modified_date, description,rating, album, artist, last_played_time, played_count,longitude, latitude, width, height, orientation, genre, author, duration,size from \
+       (select visual_uuid,folder_uuid, content_type, display_name, path, thumbnail_path,null as created_date, released_date, modified_date, description,rating, album, artist, last_played_time, null as played_count,longitude, latitude, width, height, orientation,null as genre, null as author, duration,size from visual_media join \
+               (select * from \
+                       (select visual_uuid as meta_uuid, longitude, latitude, description, width, height, datetaken as released_date, orientation,null as album, null as artist, null as last_played_time,null as duration from image_meta \
+                       union all \
+                       select visual_uuid as meta_uuid, longitude, latitude, description, width, height, datetaken as released_date, null as orientation, album, artist, last_played_time,duration from video_meta)) \
+       on visual_uuid=meta_uuid \
+       union all \
+               select audio_uuid, folder_uuid as folder_uuid, content_type, title as display_name, path, thumbnail_path, added_time, year, modified_date, description, favourite, album, artist, last_played_time, played_count, null as longitude, null as latitude, null as width, null as height, null as orientation, genre, author, duration, size from audio_media) where 1 ";
 
 const string SELECT_MEDIA_ID_WITH_FOLDER = 
        "select item_id from item_view where folder_uuid=";
@@ -734,6 +734,7 @@ void Mediacontent::readImageFromDB(sqlite3_stmt* pStmt, MediacontentImage* newIm
                                break;
                }               
                newImage->setImageOrientation(orientationStr);
+               newImage->setSize(sqlite3_column_double(pStmt,23));
        }
        
 }
@@ -793,6 +794,7 @@ void Mediacontent::readVideoFromDB(sqlite3_stmt* pStmt, MediacontentVideo* newVi
                newVideo->setVideoHeight(sqlite3_column_int(pStmt,18));
        
                newVideo->setVideoDuration(sqlite3_column_int(pStmt,22));
+               newVideo->setSize(sqlite3_column_double(pStmt,23));
 
        }               
 
@@ -853,6 +855,7 @@ void Mediacontent::readAudioFromDB(sqlite3_stmt* pStmt, MediacontentAudio* newAu
                        newAudio->setAudioComposer(tmp);
 
                newAudio->setAudioDuration(sqlite3_column_int(pStmt,22));
+               newAudio->setSize(sqlite3_column_double(pStmt,23));
 
                string queryExtraAudio(SELECT_EXTRA_AUDIO);
                queryExtraAudio.append("'");
index 0277ffc..b126750 100755 (executable)
@@ -132,6 +132,9 @@ namespace TizenApis {
                                                                                                        MessageFilterValidatorFactory::ATTRIBUTE_SUBJECT,          "subject"));
                        attributeMap.insert(
                                                                                        std::pair<std::string, std::string>(
+                                                                                                       MessageFilterValidatorFactory::ATTRIBUTE_ATTACHMENT,    "attachment_count"));   
+                       attributeMap.insert(
+                                                                                       std::pair<std::string, std::string>(
                                                                                                        MessageFilterValidatorFactory::ATTRIBUTE_TYPE,             "type"));
 
                        attributeMap.insert(
@@ -179,6 +182,9 @@ namespace TizenApis {
                                                                                                        MessageFilterValidatorFactory::ATTRIBUTE_SUBJECT,          "A.SUBJECT"));
                        attributeMap.insert(
                                                                                        std::pair<std::string, std::string>(
+                                                                                                       MessageFilterValidatorFactory::ATTRIBUTE_ATTACHMENT,    "A.ATTACHMENT_COUNT"));                 
+                       attributeMap.insert(
+                                                                                       std::pair<std::string, std::string>(
                                                                                                        MessageFilterValidatorFactory::ATTRIBUTE_TYPE,             "A.MAIN_TYPE"));
 
                        LogDebug(">>");
@@ -453,11 +459,17 @@ namespace TizenApis {
                                        }
                                }
 
-                               if(attrName.compare(MessageFilterValidatorFactory::ATTRIBUTE_IS_READ)==0){
+                               if(attrName.compare(MessageFilterValidatorFactory::ATTRIBUTE_IS_READ)==0) {
                                        retClause = emfAttributeName + "=" + convertBooleanStringToIntegerString(valueString);
-                               }       else if(attrName.compare(MessageFilterValidatorFactory::ATTRIBUTE_FOLDER)==0){
+                               } else if(attrName.compare(MessageFilterValidatorFactory::ATTRIBUTE_FOLDER)==0) {
                                        retClause = emfAttributeName + "=" + createFolderType(valueString);
-                               }else{
+                               } else if (attrName.compare(MessageFilterValidatorFactory::ATTRIBUTE_ATTACHMENT) == 0 ) {
+                                       if(valueString.compare("true") == 0){
+                                               retClause = emfAttributeName + " > 0" ;
+                                       } else {
+                                               retClause = emfAttributeName + " = 0" ;
+                                       }
+                               } else {
                                        retClause = emfAttributeName + " = '" + value->toString() + "'"; //TODO need to check
                                }
                        }while(false);
index 1c74fca..9b96254 100755 (executable)
@@ -1,3 +1,19 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */\r
+\r
 #ifndef TIZENAPIS_API_ALARMABSOLUTE_H_\r
 #define TIZENAPIS_API_ALARMABSOLUTE_H_\r
 \r
index a304ae8..4b3d17e 100755 (executable)
@@ -1,57 +1,74 @@
-#ifndef TIZENAPIS_API_ALARMRELATIVE_H_\r
-#define TIZENAPIS_API_ALARMRELATIVE_H_\r
-\r
-#include <string>\r
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef TIZENAPIS_API_ALARMRELATIVE_H_
+#define TIZENAPIS_API_ALARMRELATIVE_H_
+
+#include <string>
 #include <vector>
-#include <dpl/log/log.h>\r
-#include <dpl/shared_ptr.h>\r
-#include <time.h>\r
-#include <app.h>\r
-#include "alarm_common.h"\r
-\r
+#include <dpl/log/log.h>
+#include <dpl/shared_ptr.h>
+#include <time.h>
+#include <app.h>
+#include "alarm_common.h"
+
 namespace TizenApis {
 namespace Api {
-namespace Alarm {\r
-\r
-using namespace TizenApis::Tizen1_0::Alarm;\r
-\r
-class AlarmRelative;\r
-typedef DPL::SharedPtr<AlarmRelative> AlarmRelativePtr;\r
-typedef std::vector<AlarmRelativePtr> AlarmRelativeArrayPtr;\r
-\r
-class AlarmRelative\r
+namespace Alarm {
+
+using namespace TizenApis::Tizen1_0::Alarm;
+
+class AlarmRelative;
+typedef DPL::SharedPtr<AlarmRelative> AlarmRelativePtr;
+typedef std::vector<AlarmRelativePtr> AlarmRelativeArrayPtr;
+
+class AlarmRelative
 {
-  public:\r
-    typedef enum {\r
+  public:
+    typedef enum {
         ALARM_TYPE_DELAY,
         ALARM_TYPE_DATE,
         ALARM_TYPE_INVALID,
     } alarm_type_e;
-    \r
-    AlarmRelative();\r
-    AlarmRelative(service_h handle);\r
-    ~AlarmRelative();\r
-    void setIsRecurrence(bool value);\r
-    int getId() const;\r
-    void setId(const int id);\r
-    void setDelay(int delay);\r
-    int getDelay();\r
-    bool isRecurrence();\r
-    void setPeriod(int value);\r
-    int getPeriod();\r
-    service_h getService();\r
-\r
-  private:\r
-    int m_id;\r
-    int m_delay;\r
-    bool m_isRecurrence;\r
-    int m_Period;\r
-    service_h m_service_handle;\r
-    \r
-};\r
-\r
+    
+    AlarmRelative();
+    AlarmRelative(service_h handle);
+    ~AlarmRelative();
+    void setIsRecurrence(bool value);
+    int getId() const;
+    void setId(const int id);
+    void setDelay(int delay);
+    int getDelay();
+    bool isRecurrence();
+    void setPeriod(int value);
+    int getPeriod();
+    service_h getService();
+
+  private:
+    int m_id;
+    int m_delay;
+    bool m_isRecurrence;
+    int m_Period;
+    service_h m_service_handle;
+    
+};
+
 }
 }
-}\r
-\r
-#endif\r
+}
+
+#endif
index ecdc8bf..daae204 100755 (executable)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */\r
\r
+\r
 #ifndef TIZENAPIS_API_ALARM_COMMON_H_\r
 #define TIZENAPIS_API_ALARM_COMMON_H_\r
 \r
index 85533c3..82d97fd 100644 (file)
@@ -164,7 +164,7 @@ JSValueRef JSBluetoothAdapter::setName(JSContextRef context, JSObjectRef object,
 
                TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
                
-               if (argumentCount < 2 || argumentCount > 3)
+               if (argumentCount < 1 || argumentCount > 3)
                {
                        Throw(InvalidArgumentException);        
                }
@@ -175,7 +175,11 @@ JSValueRef JSBluetoothAdapter::setName(JSContextRef context, JSObjectRef object,
                }
 
                BluetoothConverter converter(priv->getContext());
-               successCallback = converter.toFunction(arguments[1]);
+
+               if (argumentCount >= 2)
+               {
+                       successCallback = converter.toFunctionOrNull(arguments[1]);
+               }
 
                if (argumentCount >= 3)
                {
@@ -491,7 +495,7 @@ JSValueRef JSBluetoothAdapter::setPowered(JSContextRef context, JSObjectRef obje
                
                TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
 
-               if (argumentCount < 2 || argumentCount > 3)
+               if (argumentCount < 1 || argumentCount > 3)
                {
                        Throw(InvalidArgumentException);        
                }
@@ -502,7 +506,11 @@ JSValueRef JSBluetoothAdapter::setPowered(JSContextRef context, JSObjectRef obje
                }
                
                BluetoothConverter converter(priv->getContext());
-               successCallback = converter.toFunction(arguments[1]);
+
+               if (argumentCount >= 2)
+               {
+                       successCallback = converter.toFunctionOrNull(arguments[1]);
+               }
 
                if (argumentCount >= 3)
                {
@@ -593,12 +601,22 @@ JSValueRef JSBluetoothAdapter::setVisible(JSContextRef context, JSObjectRef obje
                TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
 
                
-               if (argumentCount < 2 || argumentCount > 4)
+               if (argumentCount < 1 || argumentCount > 4)
                {
                        Throw(InvalidArgumentException);        
                }
+
+               if (JSValueIsNull(context, arguments[0]) == true || JSValueIsBoolean(context, arguments[0]) == false)
+               {
+                       Throw(ConversionException);
+               }
+               
                BluetoothConverter converter(priv->getContext());
-               successCallback = converter.toFunction(arguments[1]);
+
+               if (argumentCount >= 2) 
+               {
+                       successCallback = converter.toFunctionOrNull(arguments[1]);
+               }
 
                if (argumentCount >= 3)
                {
@@ -808,14 +826,18 @@ JSValueRef JSBluetoothAdapter::stopDiscovery(JSContextRef context, JSObjectRef o
 
                TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
                
-               if (argumentCount < 1 || argumentCount > 2)
+               if (argumentCount > 2)
                {
                        LogError("InvalidArgumentException");
                        Throw(InvalidArgumentException);        
                }
 
                BluetoothConverter converter(priv->getContext());
-               successCallback = converter.toFunction(arguments[0]);
+
+               if (argumentCount >= 1)
+               {
+                       successCallback = converter.toFunctionOrNull(arguments[0]);
+               }
                
                if (argumentCount >= 2)
                {
@@ -1193,7 +1215,7 @@ JSValueRef JSBluetoothAdapter::destroyBonding(JSContextRef context, JSObjectRef
 
                TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
                
-               if (argumentCount < 2 || argumentCount > 3)
+               if (argumentCount < 1 || argumentCount > 3)
                {
                        LogError("Wrong parameter count passed");
                        return JSTizenExceptionFactory::postException(context, exception, 
@@ -1202,7 +1224,11 @@ JSValueRef JSBluetoothAdapter::destroyBonding(JSContextRef context, JSObjectRef
 
                BluetoothConverter converter(priv->getContext());
                std::string address = converter.toBluetoothDeviceAddress(arguments[0]);
-               successCallback = converter.toFunction(arguments[1]);
+
+               if (argumentCount >= 2)
+               {
+                       successCallback = converter.toFunctionOrNull(arguments[1]);
+               }
                
                if (argumentCount >= 3)
                {
index 04835e3..06259da 100644 (file)
@@ -376,7 +376,7 @@ JSValueRef JSBluetoothServiceHandler::unregisterRFCOMMService(JSContextRef conte
                        Throw(UnknownException);        
                }
 
-               if (argumentCount < 1 || argumentCount > 2)
+               if (argumentCount > 2)
                {
                        LogError("Wrong parameter count passed");
                        Throw(InvalidArgumentException);
@@ -391,7 +391,10 @@ JSValueRef JSBluetoothServiceHandler::unregisterRFCOMMService(JSContextRef conte
 
                BluetoothConverter converter(priv->getContext());
 
-               successCallback = converter.toFunction(arguments[0]);
+               if (argumentCount >= 1)
+               {
+                       successCallback = converter.toFunctionOrNull(arguments[0]);
+               }
                
                if (argumentCount >= 2)
                {
index 9e43e05..d150fc5 100644 (file)
@@ -37,7 +37,7 @@
 #define TIZEN_MEDIACONTENT_AUDIO_BITRATE                       "bitrate"
 #define TIZEN_MEDIACONTENT_AUDIO_TRACKNUM                      "trackNumber"
 #define TIZEN_MEDIACONTENT_AUDIO_DURATION                      "duration"
-#define TIZEN_MEDIACONTENT_AUDIO_PLAYEDCOUNT           "playedCount"   
+#define TIZEN_MEDIACONTENT_AUDIO_PLAYEDCOUNT           "playCount"     
 #define TIZEN_MEDIACONTENT_AUDIO_PLAYEDTIME                    "playedTime"    
 #define TIZEN_MEDIACONTENT_AUDIO_SIZE                          "size"  
 
index 920daba..c487f11 100644 (file)
@@ -39,7 +39,7 @@ namespace Mediacontent {
 #define TIZEN_MEDIACONTENT_FOLDER_ATTRIBUTENAME        "Folder"
 #define TIZEN_MEDIACONTENT_FOLDER_UID                          "id"
 #define TIZEN_MEDIACONTENT_FOLDER_NAME                         "title"
-#define TIZEN_MEDIACONTENT_FOLDER_PATH                         "folderUrl"
+#define TIZEN_MEDIACONTENT_FOLDER_PATH                         "folderURI"
 #define TIZEN_MEDIACONTENT_FOLDER_STORAGE_TYPE         "storageType"
 #define TIZEN_MEDIACONTENT_FOLDER_MODIFIEDDATE         "modifiedDate"
 
@@ -191,7 +191,7 @@ JSValueRef JSFolder::getPropertyPath(
            JSStringRef propertyName, 
            JSValueRef* exception)
 {
-    LogDebug("entered");
+    LogDebug("getPropertyPath::entered");
     Try
     {
         Converter converter(context);
index 8b72168..6ab70d5 100644 (file)
@@ -83,6 +83,7 @@ class JSFolder
                        JSObjectRef object,
                        JSStringRef propertyName,
                        JSValueRef* exception);
+       
        static JSValueRef       getPropertyPath(
                        JSContextRef context,
                        JSObjectRef object,
@@ -119,16 +120,6 @@ class JSFolder
                        JSStringRef propertyName,
                        JSValueRef* exception);
 
-/*     static JSValueRef       findMedia(
-                       JSContextRef context, 
-                       JSObjectRef object,
-                       JSObjectRef thisObject,
-                       size_t argumentCount,
-                       const JSValueRef arguments[],
-                       JSValueRef* exception );
-*/
-
-
 };
 
 }
index 8a037fa..9b1ce32 100644 (file)
@@ -35,13 +35,13 @@ namespace Mediacontent {
 #define TIZEN_MEDIACONTENT_MEDIA_TYPE                          "type"
 #define TIZEN_MEDIACONTENT_MEDIA_MIME_TYPE                     "mimeType"
 #define TIZEN_MEDIACONTENT_MEDIA_TITLE                         "title"
-#define TIZEN_MEDIACONTENT_MEDIA_FILE_URL                      "fileURL"
+#define TIZEN_MEDIACONTENT_MEDIA_FILE_URL                      "itemURI"
 #define TIZEN_MEDIACONTENT_MEDIA_THUMBNAILPATH         "thumbnailPath"
-#define TIZEN_MEDIACONTENT_MEDIA_CREATEDDATE           "createdDate"   
 #define TIZEN_MEDIACONTENT_MEDIA_RELEASEDDATE          "releasedDate"  
 #define TIZEN_MEDIACONTENT_MEDIA_MODIFIEDDATE          "modifiedDate"  
 #define TIZEN_MEDIACONTENT_MEDIA_DESCRIPTION           "description"   
 #define TIZEN_MEDIACONTENT_MEDIA_RATING                                "rating"        
+#define TIZEN_MEDIACONTENT_MEDIA_SIZE                          "size"  
 #define TIZEN_MEDIACONTENT_MEDIA_EDIABLEATTR           "editableAttibutes"     
 
 
@@ -77,10 +77,10 @@ JSStaticValue JSMedia::m_property[] =
     { TIZEN_MEDIACONTENT_MEDIA_TITLE, getPropertyDisplayName, NULL, kJSPropertyAttributeReadOnly},
     { TIZEN_MEDIACONTENT_MEDIA_FILE_URL, getPropertyFilePath, NULL, kJSPropertyAttributeReadOnly},
     { TIZEN_MEDIACONTENT_MEDIA_THUMBNAILPATH, getPropertyThumbnailPath, NULL, kJSPropertyAttributeReadOnly},
-    { TIZEN_MEDIACONTENT_MEDIA_CREATEDDATE, getPropertyCreatedDate, NULL, kJSPropertyAttributeReadOnly},
     { TIZEN_MEDIACONTENT_MEDIA_RELEASEDDATE, getPropertyReleasedDate, NULL, kJSPropertyAttributeReadOnly},    
     { TIZEN_MEDIACONTENT_MEDIA_MODIFIEDDATE, getPropertyModifiedDate, NULL, kJSPropertyAttributeReadOnly},
     { TIZEN_MEDIACONTENT_MEDIA_DESCRIPTION, getPropertyDescription, NULL, kJSPropertyAttributeReadOnly},    
+    { TIZEN_MEDIACONTENT_MEDIA_SIZE, getPropertySize, NULL, kJSPropertyAttributeReadOnly},     
     { TIZEN_MEDIACONTENT_MEDIA_EDIABLEATTR, getPropertyEditableAttr, NULL, kJSPropertyAttributeReadOnly},        
     { TIZEN_MEDIACONTENT_MEDIA_RATING, getPropertyFavorite, setPropertyFavorite, kJSPropertyAttributeNone},        
     { 0, 0, 0, 0 }
@@ -272,28 +272,6 @@ JSValueRef JSMedia::getPropertyDescription(
 }
 
 
-
-JSValueRef JSMedia::getPropertyCreatedDate(
-                                       JSContextRef context,
-                                       JSObjectRef object,
-                                       JSStringRef propertyName,
-                                       JSValueRef* exception)
-{
-    LogDebug("entered");
-    Try
-    {
-        Converter converter(context);
-        MediacontentMediaPtr event = getMediaObject(object);
-        return converter.toJSValueRef(event->getCreatedDate());
-    }
-    Catch(Exception)
-    {
-        LogWarning("trying to get incorrect value");
-    }
-    return JSValueMakeUndefined(context);
-
-}
-
 JSValueRef JSMedia::getPropertyModifiedDate(
                                        JSContextRef context,
                                        JSObjectRef object, 
@@ -376,6 +354,29 @@ JSValueRef JSMedia::getPropertyType(
     return JSValueMakeUndefined(context);
 }
 
+
+JSValueRef JSMedia::getPropertySize(
+                                       JSContextRef context,
+                                       JSObjectRef object,
+                                       JSStringRef propertyName,
+                                       JSValueRef* exception)
+{
+    LogDebug("getPropertyType::entered");
+    Try
+    {
+        Converter converter(context);
+        MediacontentMediaPtr event = getMediaObject(object);
+        LogDebug("size:" << event->getSize());
+        return converter.toJSValueRef(event->getSize());
+    }
+    Catch(Exception)
+    {
+        LogWarning("trying to get incorrect value");
+    }
+    return JSValueMakeUndefined(context);
+}
+
+
 JSValueRef JSMedia::getPropertyEditableAttr(
                                        JSContextRef context,
                                        JSObjectRef object,
index 0035f9f..7849d14 100644 (file)
@@ -123,12 +123,6 @@ class JSMedia
                                                JSStringRef propertyName,
                                                JSValueRef* exception);
 
-       static JSValueRef       getPropertyCreatedDate(
-                                               JSContextRef context,
-                                               JSObjectRef object,
-                                               JSStringRef propertyName,
-                                               JSValueRef* exception);
-
        static JSValueRef       getPropertyReleasedDate(
                                                JSContextRef context,
                                                JSObjectRef object,
@@ -146,13 +140,20 @@ class JSMedia
                                                JSObjectRef object,
                                                JSStringRef propertyName,
                                                JSValueRef* exception);  
+
+       static JSValueRef getPropertySize(
+                                               JSContextRef context,
+                                               JSObjectRef object,
+                                               JSStringRef propertyName,
+                                               JSValueRef* exception);
+
+       
        static JSValueRef       getPropertyEditableAttr(
                                                JSContextRef context,
                                                JSObjectRef object,
                                                JSStringRef propertyName,
                                                JSValueRef* exception);
                                        
-
        static bool                     setPropertyFavorite(
                                                JSContextRef context,
                                                JSObjectRef object,
index e3e0e4d..e95f70b 100644 (file)
@@ -31,7 +31,7 @@
 #define TIZEN_MEDIACONTENT_VIDEO_ATTRIBUTENAME         "Video"
 #define TIZEN_MEDIACONTENT_VIDEO_GEOLOCATION           "geolocation"
 #define TIZEN_MEDIACONTENT_VIDEO_ALBUM                         "album"
-#define TIZEN_MEDIACONTENT_VIDEO_ARTIST                        "artist"
+#define TIZEN_MEDIACONTENT_VIDEO_ARTIST                        "artists"
 #define TIZEN_MEDIACONTENT_VIDEO_PLAYEDTIME            "playedTime" 
 #define TIZEN_MEDIACONTENT_VIDEO_PLAYCOUNT                     "playCount" 
 #define TIZEN_MEDIACONTENT_VIDEO_DURATION                      "duration"      
index ef14996..8a7793a 100755 (executable)
@@ -286,12 +286,11 @@ namespace Tizen1_0 {
                        TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);  
 
                        Api::Messaging::EventQueryMessagesPtr event(new Api::Messaging::EventQueryMessages());
-
-                               FilterConverterFactory::ConverterType filterConverter = FilterConverterFactory::getConverter(context);
-
+                       FilterConverterFactory::ConverterType filterConverter = FilterConverterFactory::getConverter(context);
+                       LogDebug("start filter");
                        Api::Tizen::FilterPtr filter = filterConverter->toFilter(arguments[0]);
-                               event->setFilter(filter);
-
+                       event->setFilter(filter);
+                       LogDebug("end filter");
                        callbackManager->setOnSuccess(converter->toFunction(arguments[1]));     
                        
                        if(argumentCount > 2)