From: Sangtai Kim Date: Tue, 21 Feb 2012 01:52:46 +0000 (+0900) Subject: merge wrt-plugins-tizen_0.2.0-4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0caccb896fdc0131249effadfdc03a5cfc12cbff;p=profile%2Fivi%2Fwrt-plugins-tizen.git merge wrt-plugins-tizen_0.2.0-4 --- diff --git a/debian/changelog b/debian/changelog index d9489ab..f68d40f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Tue, 21 Feb 2012 10:38:25 +0900 + wrt-plugins-tizen (0.2.0-3) unstable; urgency=low * update call api diff --git a/src/platform/API/Call/CallDefine.h b/src/platform/API/Call/CallDefine.h index 160f0e9..c67fde7 100755 --- a/src/platform/API/Call/CallDefine.h +++ b/src/platform/API/Call/CallDefine.h @@ -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 diff --git a/src/platform/API/Mediacontent/MediacontentMedia.cpp b/src/platform/API/Mediacontent/MediacontentMedia.cpp index 6457d5e..40ae0d0 100644 --- a/src/platform/API/Mediacontent/MediacontentMedia.cpp +++ b/src/platform/API/Mediacontent/MediacontentMedia.cpp @@ -193,6 +193,17 @@ EditableAttributeListPtr MediacontentMedia::getEditableAttr() const } +void MediacontentMedia::setSize(int value) +{ + m_size = value; +} + +int MediacontentMedia::getSize() const +{ + return m_size; +} + + } } } diff --git a/src/platform/API/Mediacontent/MediacontentMedia.h b/src/platform/API/Mediacontent/MediacontentMedia.h index d606340..fab5eb8 100644 --- a/src/platform/API/Mediacontent/MediacontentMedia.h +++ b/src/platform/API/Mediacontent/MediacontentMedia.h @@ -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; diff --git a/src/platform/API/Messaging/AttachmentFactory.cpp b/src/platform/API/Messaging/AttachmentFactory.cpp index b1b43d9..6de68a4 100755 --- a/src/platform/API/Messaging/AttachmentFactory.cpp +++ b/src/platform/API/Messaging/AttachmentFactory.cpp @@ -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); diff --git a/src/platform/API/Messaging/MessageFilterValidator.cpp b/src/platform/API/Messaging/MessageFilterValidator.cpp index 694d5dc..65f4a99 100755 --- a/src/platform/API/Messaging/MessageFilterValidator.cpp +++ b/src/platform/API/Messaging/MessageFilterValidator.cpp @@ -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; } diff --git a/src/platform/API/Messaging/MessageFilterValidator.h b/src/platform/API/Messaging/MessageFilterValidator.h index 4b27b00..3327c0d 100755 --- a/src/platform/API/Messaging/MessageFilterValidator.h +++ b/src/platform/API/Messaging/MessageFilterValidator.h @@ -48,6 +48,7 @@ namespace TizenApis { std::vector m_isReadMatchFlagVec; std::vector m_priorityMatchFlagVec; std::vector m_subjectMatchFlagVec; + std::vector m_attachmentMatchFlagVec; std::map > m_attributeAndMatchFlagsMap; diff --git a/src/platform/API/Messaging/MessageFilterValidatorFactory.cpp b/src/platform/API/Messaging/MessageFilterValidatorFactory.cpp index 762e8ba..cfd63b9 100755 --- a/src/platform/API/Messaging/MessageFilterValidatorFactory.cpp +++ b/src/platform/API/Messaging/MessageFilterValidatorFactory.cpp @@ -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} }; diff --git a/src/platform/API/Messaging/MessageFilterValidatorFactory.h b/src/platform/API/Messaging/MessageFilterValidatorFactory.h index e9426db..69ec806 100755 --- a/src/platform/API/Messaging/MessageFilterValidatorFactory.h +++ b/src/platform/API/Messaging/MessageFilterValidatorFactory.h @@ -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; diff --git a/src/platform/Tizen/Calendar/EventWrapper.cpp b/src/platform/Tizen/Calendar/EventWrapper.cpp index f9e022c..ed194a6 100755 --- a/src/platform/Tizen/Calendar/EventWrapper.cpp +++ b/src/platform/Tizen/Calendar/EventWrapper.cpp @@ -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, diff --git a/src/platform/Tizen/Mediacontent/MediaFilterValidator.cpp b/src/platform/Tizen/Mediacontent/MediaFilterValidator.cpp index db09b11..353960d 100755 --- a/src/platform/Tizen/Mediacontent/MediaFilterValidator.cpp +++ b/src/platform/Tizen/Mediacontent/MediaFilterValidator.cpp @@ -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; } diff --git a/src/platform/Tizen/Mediacontent/MediaSearchVisitor.cpp b/src/platform/Tizen/Mediacontent/MediaSearchVisitor.cpp index 81d76a6..39f4c1c 100755 --- a/src/platform/Tizen/Mediacontent/MediaSearchVisitor.cpp +++ b/src/platform/Tizen/Mediacontent/MediaSearchVisitor.cpp @@ -65,25 +65,20 @@ map MediaSearchVisitor::attrEnumMap = { */ map MediaSearchVisitor::attrFolderEnumMap = { {"id", "id"}, - {"folderURL", "folder_path"}, + {"folderURI", "folder_path"}, {"title", "title"}, {"storageType", "storage_type"}, {"modifiedDate", "modified_date"}, }; map 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 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(); - } + } if(matchValue->getType() == PrimitiveType_Time) { diff --git a/src/platform/Tizen/Mediacontent/Mediacontent.cpp b/src/platform/Tizen/Mediacontent/Mediacontent.cpp index 75fc431..3795c4f 100644 --- a/src/platform/Tizen/Mediacontent/Mediacontent.cpp +++ b/src/platform/Tizen/Mediacontent/Mediacontent.cpp @@ -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("'"); diff --git a/src/platform/Tizen/Messaging/MessageQueryGenerator.cpp b/src/platform/Tizen/Messaging/MessageQueryGenerator.cpp index 0277ffc..b126750 100755 --- a/src/platform/Tizen/Messaging/MessageQueryGenerator.cpp +++ b/src/platform/Tizen/Messaging/MessageQueryGenerator.cpp @@ -132,6 +132,9 @@ namespace TizenApis { MessageFilterValidatorFactory::ATTRIBUTE_SUBJECT, "subject")); attributeMap.insert( std::pair( + MessageFilterValidatorFactory::ATTRIBUTE_ATTACHMENT, "attachment_count")); + attributeMap.insert( + std::pair( MessageFilterValidatorFactory::ATTRIBUTE_TYPE, "type")); attributeMap.insert( @@ -179,6 +182,9 @@ namespace TizenApis { MessageFilterValidatorFactory::ATTRIBUTE_SUBJECT, "A.SUBJECT")); attributeMap.insert( std::pair( + MessageFilterValidatorFactory::ATTRIBUTE_ATTACHMENT, "A.ATTACHMENT_COUNT")); + attributeMap.insert( + std::pair( 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); diff --git a/src/standards/Tizen/Alarm/AlarmAbsolute.h b/src/standards/Tizen/Alarm/AlarmAbsolute.h index 1c74fca..9b96254 100755 --- a/src/standards/Tizen/Alarm/AlarmAbsolute.h +++ b/src/standards/Tizen/Alarm/AlarmAbsolute.h @@ -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. + */ + #ifndef TIZENAPIS_API_ALARMABSOLUTE_H_ #define TIZENAPIS_API_ALARMABSOLUTE_H_ diff --git a/src/standards/Tizen/Alarm/AlarmRelative.h b/src/standards/Tizen/Alarm/AlarmRelative.h index a304ae8..4b3d17e 100755 --- a/src/standards/Tizen/Alarm/AlarmRelative.h +++ b/src/standards/Tizen/Alarm/AlarmRelative.h @@ -1,57 +1,74 @@ -#ifndef TIZENAPIS_API_ALARMRELATIVE_H_ -#define TIZENAPIS_API_ALARMRELATIVE_H_ - -#include +/* + * 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 #include -#include -#include -#include -#include -#include "alarm_common.h" - +#include +#include +#include +#include +#include "alarm_common.h" + namespace TizenApis { namespace Api { -namespace Alarm { - -using namespace TizenApis::Tizen1_0::Alarm; - -class AlarmRelative; -typedef DPL::SharedPtr AlarmRelativePtr; -typedef std::vector AlarmRelativeArrayPtr; - -class AlarmRelative +namespace Alarm { + +using namespace TizenApis::Tizen1_0::Alarm; + +class AlarmRelative; +typedef DPL::SharedPtr AlarmRelativePtr; +typedef std::vector AlarmRelativeArrayPtr; + +class AlarmRelative { - public: - typedef enum { + public: + typedef enum { ALARM_TYPE_DELAY, ALARM_TYPE_DATE, ALARM_TYPE_INVALID, } alarm_type_e; - - 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; - -}; - + + 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; + +}; + } } -} - -#endif +} + +#endif diff --git a/src/standards/Tizen/Alarm/alarm_common.h b/src/standards/Tizen/Alarm/alarm_common.h index ecdc8bf..daae204 100755 --- a/src/standards/Tizen/Alarm/alarm_common.h +++ b/src/standards/Tizen/Alarm/alarm_common.h @@ -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. + */ + + #ifndef TIZENAPIS_API_ALARM_COMMON_H_ #define TIZENAPIS_API_ALARM_COMMON_H_ diff --git a/src/standards/Tizen/Bluetooth/JSBluetoothAdapter.cpp b/src/standards/Tizen/Bluetooth/JSBluetoothAdapter.cpp index 85533c3..82d97fd 100644 --- a/src/standards/Tizen/Bluetooth/JSBluetoothAdapter.cpp +++ b/src/standards/Tizen/Bluetooth/JSBluetoothAdapter.cpp @@ -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) { diff --git a/src/standards/Tizen/Bluetooth/JSBluetoothServiceHandler.cpp b/src/standards/Tizen/Bluetooth/JSBluetoothServiceHandler.cpp index 04835e3..06259da 100644 --- a/src/standards/Tizen/Bluetooth/JSBluetoothServiceHandler.cpp +++ b/src/standards/Tizen/Bluetooth/JSBluetoothServiceHandler.cpp @@ -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) { diff --git a/src/standards/Tizen/Mediacontent/JSAudio.cpp b/src/standards/Tizen/Mediacontent/JSAudio.cpp index 9e43e05..d150fc5 100644 --- a/src/standards/Tizen/Mediacontent/JSAudio.cpp +++ b/src/standards/Tizen/Mediacontent/JSAudio.cpp @@ -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" diff --git a/src/standards/Tizen/Mediacontent/JSFolder.cpp b/src/standards/Tizen/Mediacontent/JSFolder.cpp index 920daba..c487f11 100644 --- a/src/standards/Tizen/Mediacontent/JSFolder.cpp +++ b/src/standards/Tizen/Mediacontent/JSFolder.cpp @@ -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); diff --git a/src/standards/Tizen/Mediacontent/JSFolder.h b/src/standards/Tizen/Mediacontent/JSFolder.h index 8b72168..6ab70d5 100644 --- a/src/standards/Tizen/Mediacontent/JSFolder.h +++ b/src/standards/Tizen/Mediacontent/JSFolder.h @@ -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 ); -*/ - - }; } diff --git a/src/standards/Tizen/Mediacontent/JSMedia.cpp b/src/standards/Tizen/Mediacontent/JSMedia.cpp index 8a037fa..9b1ce32 100644 --- a/src/standards/Tizen/Mediacontent/JSMedia.cpp +++ b/src/standards/Tizen/Mediacontent/JSMedia.cpp @@ -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, diff --git a/src/standards/Tizen/Mediacontent/JSMedia.h b/src/standards/Tizen/Mediacontent/JSMedia.h index 0035f9f..7849d14 100644 --- a/src/standards/Tizen/Mediacontent/JSMedia.h +++ b/src/standards/Tizen/Mediacontent/JSMedia.h @@ -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, diff --git a/src/standards/Tizen/Mediacontent/JSVideo.cpp b/src/standards/Tizen/Mediacontent/JSVideo.cpp index e3e0e4d..e95f70b 100644 --- a/src/standards/Tizen/Mediacontent/JSVideo.cpp +++ b/src/standards/Tizen/Mediacontent/JSVideo.cpp @@ -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" diff --git a/src/standards/Tizen/Messaging/JSMessagingStorage.cpp b/src/standards/Tizen/Messaging/JSMessagingStorage.cpp index ef14996..8a7793a 100755 --- a/src/standards/Tizen/Messaging/JSMessagingStorage.cpp +++ b/src/standards/Tizen/Messaging/JSMessagingStorage.cpp @@ -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)