+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
#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"
#define STR_EMERGENCY_NUMBERS "emergencyNumbers"
}
-#endif
\ No newline at end of file
+#endif
}
+void MediacontentMedia::setSize(int value)
+{
+ m_size = value;
+}
+
+int MediacontentMedia::getSize() const
+{
+ return m_size;
+}
+
+
}
}
}
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;
tm m_createdDate;
tm m_releasedDate;
tm m_modifiedDate;
+ int m_size;
int m_favorite;
bool m_isChangedFavorite;
bool m_isGetMimetype;
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");
{
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);
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);
}
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;
}
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;
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";
{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}
};
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;
}
// 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;
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;
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,
static PropertyStructArray folderProperties =
{
{"id", PrimitiveType_String},
- {"folderURL", PrimitiveType_String},
+ {"folderURI", PrimitiveType_String},
{"storageType", PrimitiveType_String},
{"title", PrimitiveType_String},
{"modifiedDate", PrimitiveType_Time},
{"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}
};
else if(value == QUERY_MEDIA)
{
LogDebug("create validator of media item");
- theMediaInstance = FilterValidatorPtr(new FilterValidator(folderProperties));
+ theMediaInstance = FilterValidatorPtr(new FilterValidator(mediaProperties));
return theMediaInstance;
}
*/
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"},
{"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"},
};
else
{
matchValueStr = matchValue->toString();
- }\r
+ }
if(matchValue->getType() == PrimitiveType_Time)
{
"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=";
break;
}
newImage->setImageOrientation(orientationStr);
+ newImage->setSize(sqlite3_column_double(pStmt,23));
}
}
newVideo->setVideoHeight(sqlite3_column_int(pStmt,18));
newVideo->setVideoDuration(sqlite3_column_int(pStmt,22));
+ newVideo->setSize(sqlite3_column_double(pStmt,23));
}
newAudio->setAudioComposer(tmp);
newAudio->setAudioDuration(sqlite3_column_int(pStmt,22));
+ newAudio->setSize(sqlite3_column_double(pStmt,23));
string queryExtraAudio(SELECT_EXTRA_AUDIO);
queryExtraAudio.append("'");
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(
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(">>");
}
}
- 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);
+/*
+ * 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
-#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
+/*
+ * 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
TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
- if (argumentCount < 2 || argumentCount > 3)
+ if (argumentCount < 1 || argumentCount > 3)
{
Throw(InvalidArgumentException);
}
}
BluetoothConverter converter(priv->getContext());
- successCallback = converter.toFunction(arguments[1]);
+
+ if (argumentCount >= 2)
+ {
+ successCallback = converter.toFunctionOrNull(arguments[1]);
+ }
if (argumentCount >= 3)
{
TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
- if (argumentCount < 2 || argumentCount > 3)
+ if (argumentCount < 1 || argumentCount > 3)
{
Throw(InvalidArgumentException);
}
}
BluetoothConverter converter(priv->getContext());
- successCallback = converter.toFunction(arguments[1]);
+
+ if (argumentCount >= 2)
+ {
+ successCallback = converter.toFunctionOrNull(arguments[1]);
+ }
if (argumentCount >= 3)
{
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)
{
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)
{
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,
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)
{
Throw(UnknownException);
}
- if (argumentCount < 1 || argumentCount > 2)
+ if (argumentCount > 2)
{
LogError("Wrong parameter count passed");
Throw(InvalidArgumentException);
BluetoothConverter converter(priv->getContext());
- successCallback = converter.toFunction(arguments[0]);
+ if (argumentCount >= 1)
+ {
+ successCallback = converter.toFunctionOrNull(arguments[0]);
+ }
if (argumentCount >= 2)
{
#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"
#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"
JSStringRef propertyName,
JSValueRef* exception)
{
- LogDebug("entered");
+ LogDebug("getPropertyPath::entered");
Try
{
Converter converter(context);
JSObjectRef object,
JSStringRef propertyName,
JSValueRef* exception);
+
static JSValueRef getPropertyPath(
JSContextRef context,
JSObjectRef object,
JSStringRef propertyName,
JSValueRef* exception);
-/* static JSValueRef findMedia(
- JSContextRef context,
- JSObjectRef object,
- JSObjectRef thisObject,
- size_t argumentCount,
- const JSValueRef arguments[],
- JSValueRef* exception );
-*/
-
-
};
}
#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"
{ 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 }
}
-
-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,
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,
JSStringRef propertyName,
JSValueRef* exception);
- static JSValueRef getPropertyCreatedDate(
- JSContextRef context,
- JSObjectRef object,
- JSStringRef propertyName,
- JSValueRef* exception);
-
static JSValueRef getPropertyReleasedDate(
JSContextRef context,
JSObjectRef object,
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,
#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"
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)