summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xCMakeLists.txt2
-rw-r--r--packaging/libmedia-service.spec1
-rwxr-xr-xsrc/common/media-svc-util.c26
3 files changed, 26 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b73b9d0..f099906 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,7 +52,7 @@ EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED glib-2.0 dlog sqlite3 db-util libexif mm-fileinfo media-thumbnail libmedia-utils aul uuid vconf capi-media-image-util)
+pkg_check_modules(pkgs REQUIRED glib-2.0 dlog sqlite3 db-util libexif mm-fileinfo media-thumbnail libmedia-utils aul uuid vconf capi-media-image-util capi-system-info)
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
diff --git a/packaging/libmedia-service.spec b/packaging/libmedia-service.spec
index b4b9e09..e7e93fa 100644
--- a/packaging/libmedia-service.spec
+++ b/packaging/libmedia-service.spec
@@ -23,6 +23,7 @@ BuildRequires: pkgconfig(libmedia-utils)
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(libtzplatform-config)
BuildRequires: pkgconfig(capi-media-image-util)
+BuildRequires: pkgconfig(capi-system-info)
%description
This package is a library that provides the media information service for the multimedia applications.
diff --git a/src/common/media-svc-util.c b/src/common/media-svc-util.c
index 1068375..26112f7 100755
--- a/src/common/media-svc-util.c
+++ b/src/common/media-svc-util.c
@@ -30,6 +30,7 @@
#undef __USE_XOPEN
#endif
#include <string.h>
+#include <system_info.h>
#include <sys/vfs.h>
#include <glib/gstdio.h>
#include <sys/stat.h>
@@ -78,6 +79,8 @@
#define MEDIA_SVC_DEFAULT_FORMAT_LEN 19
+static int media_svc_pinyin_support = -1;
+
typedef struct {
char content_type[15];
int category_by_mime;
@@ -836,6 +839,23 @@ static char *__media_svc_get_title_from_filepath(const char *path)
return title;
}
+bool __media_svc_check_support_pinyin()
+{
+ int ret = SYSTEM_INFO_ERROR_NONE;
+ bool is_supported = false;
+
+ if (media_svc_pinyin_support == -1) {
+ ret = system_info_get_platform_bool("http://tizen.org/feature/content.filter.pinyin", &is_supported);
+ if (ret != SYSTEM_INFO_ERROR_NONE) {
+ media_svc_debug("SYSTEM_INFO_ERROR: content.filter.pinyin [%d]", ret);
+ return false;
+ }
+
+ media_svc_pinyin_support = is_supported;
+ }
+
+ return media_svc_pinyin_support;
+}
int _media_svc_rename_file(const char *old_name, const char *new_name)
{
if ((old_name == NULL) || (new_name == NULL)) {
@@ -1989,8 +2009,10 @@ int _media_svc_get_pinyin_str(const char *src_str, char **pinyin_str)
bool _media_svc_check_pinyin_support(void)
{
- /*Check CSC*/
- return TRUE;
+ /* Check CSC : TODO : need to check CSC */
+
+ /* Check content.filter.pinyin feature */
+ return __media_svc_check_support_pinyin();
}
int _media_svc_get_media_type(const char *path, int *mediatype)