summaryrefslogtreecommitdiff
path: root/main/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/common')
-rwxr-xr-xmain/src/common/ivug-common.h42
-rwxr-xr-xmain/src/common/ivug-config.c200
-rwxr-xr-xmain/src/common/ivug-config.h50
-rwxr-xr-xmain/src/common/ivug-datatypes.h32
-rwxr-xr-xmain/src/common/ivug-define.h60
-rwxr-xr-xmain/src/common/ivug-string.h112
6 files changed, 0 insertions, 496 deletions
diff --git a/main/src/common/ivug-common.h b/main/src/common/ivug-common.h
deleted file mode 100755
index ba817eb..0000000
--- a/main/src/common/ivug-common.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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 __IVUG_COMMON_H__
-#define __IVUG_COMMON_H__
-
-#include "ivug-define.h"
-#include "ivug-datatypes.h"
-#include "ivug-uuid.h"
-
-#include <Elementary.h>
-#include <assert.h>
-
-#include "statistics.h"
-#include "ivug-debug.h"
-#include "ivug-string.h"
-#include "ivug-util.h"
-#include "ivug-define.h"
-#include "ivug-config.h"
-#include "ivug-widget.h"
-
-
-#define _EDJ(o) elm_layout_edje_get(o)
-
-#define IMAGE_BETWEEN_MARGIN (30) // The value is width between photocam(unit is pixel).
-
-#endif /* __IVUG_COMMON_H__ */
-
diff --git a/main/src/common/ivug-config.c b/main/src/common/ivug-config.c
deleted file mode 100755
index 06efce5..0000000
--- a/main/src/common/ivug-config.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
- */
-
-
-#include "ivug-common.h"
-#include "ivug-define.h"
-#include "ivug-effect.h"
-#include "ivug-config.h"
-
-#include <vconf.h>
-#include <vconf-keys.h>
-
-// TODO: Request vconf key to setting part, Slide show setting vconf key
-#define VCONFKEY_GALLERY_INTERVAL_TIME "db/setting/gallery/interval_time" //double
-#define VCONFKEY_GALLERY_REPEAT_STATE "db/setting/gallery/repeat_state" //boolean
-#define VCONFKEY_GALLERY_SHUFFLE_STATE "db/setting/gallery/shuffle_state" //boolean
-#define VCONFKEY_GALLERY_TRANSITION_EFFECT "db/setting/gallery/ss_effect" //char
-
-enum { STATE_FALSE = 0, STATE_TRUE = 1, };
-
-/*
- Set lock screen with given image.
-
- CAUTION : does not check filepath integrity
-*/
-bool ivug_config_set_lockscreen_image(const char* filepath)
-{
- if(filepath == NULL)
- {
- MSG_IMAGEVIEW_ERROR("Lock screen path is NULL");
- return FALSE;
- }
-
- if(vconf_set_str( VCONFKEY_IDLE_LOCK_BGSET, filepath ) < 0)
- {
- MSG_IMAGEVIEW_ERROR("Lockscreen set Error : %s", filepath);
- return FALSE;
- }
-
- MSG_IMAGEVIEW_HIGH("Set Lockscreen filepath = %s", filepath);
-
- return TRUE;
-}
-
-/*
- Set home screen with given image
-
- CAUTION : does not check filepath integrity
-*/
-bool ivug_config_set_homescreen_image( const char* filepath )
-{
- if(filepath == NULL)
- {
- MSG_IMAGEVIEW_ERROR("Home screen path is NULL");
- return FALSE;
- }
-// TODO : Need to check file existence?????
- if(vconf_set_str(VCONFKEY_BGSET, filepath) < 0)
- {
- MSG_IMAGEVIEW_ERROR("Homescreen set Error");
- return FALSE;
- }
-
- MSG_IMAGEVIEW_HIGH("Set Homescreen filepath = %s", filepath);
- return TRUE;
-}
-
-
-static bool
-_ivug_config_get_slideshow_repeat_state(void)
-{
- int repeat_state = STATE_FALSE;
-
- if(vconf_get_bool(VCONFKEY_GALLERY_REPEAT_STATE, &repeat_state) < 0)
- {
- MSG_IMAGEVIEW_ERROR("vconf_get_bool failed, set as repeat state as default: false");
- return false;
- }
-
- MSG_IMAGEVIEW_HIGH("repeat state is: %d", repeat_state);
-
- return (repeat_state == STATE_TRUE ? true : false);
-}
-
-static bool
-_ivug_config_get_slideshow_shuffle_state(void)
-{
- int shuffle_state = STATE_FALSE;
-
- if(vconf_get_bool(VCONFKEY_GALLERY_SHUFFLE_STATE, &shuffle_state) < 0)
- {
- MSG_IMAGEVIEW_ERROR("vconf_get_bool failed, set as shuffle state as default: false");
- return false;
- }
-
- MSG_IMAGEVIEW_HIGH("shuffle state is: %d", shuffle_state);
-
- return (shuffle_state == STATE_TRUE ? true : false);
-}
-
-static double
-_ivug_config_get_slideshow_interval_time(void)
-{
- double interval_time = 0.0;
-
- if(vconf_get_dbl(VCONFKEY_GALLERY_INTERVAL_TIME, &interval_time) < 0)
- {
- MSG_IMAGEVIEW_ERROR("vconf_get_dbl failed, set as interval time as -1");
-
- interval_time = -1.0;
- }
-
- MSG_IMAGEVIEW_HIGH("interval time is: %f", interval_time);
- return interval_time;
-}
-
-static char *
-_ivug_config_get_slideshow_effect_type(void)
-{
-// TODO : Free returned string??
- char *effect_str = NULL;
- effect_str = vconf_get_str(VCONFKEY_GALLERY_TRANSITION_EFFECT);
-
- if(!effect_str)
- {
- MSG_IMAGEVIEW_ERROR("vconf_get_str failed, set as effect type as default");
-
- effect_str = NULL;
- }
-
- MSG_IMAGEVIEW_HIGH("effect is: %s", effect_str);
-
- return effect_str;
-}
-
-static ivug_effect_type
-_ivug_config_get_effect_type_by_string(char *effect_str)
-{
- ivug_retv_if(!effect_str, EFFECT_NONE);
-
- ivug_effect_type type = IVUG_EFFECT_TYPE_SLIDE;
-
- if(!strncmp(effect_str, "Slide", strlen(effect_str)))
- {
- type = IVUG_EFFECT_TYPE_SLIDE;
- }
- else //Set all other cases as default NONE
- {
- MSG_SLIDER_WARN("Invalid type : %s", effect_str);
- type = EFFECT_NONE;
- }
-
- MSG_IMAGEVIEW_HIGH("effect_str = %s, type = %d", effect_str, type);
-
- return type;
-}
-
-void
-ivug_config_get_slideshow_setting(slide_show_mode *mode,
- double *interval_time,
- ivug_effect_type *effect_type)
-{
- *mode = SLIDE_SHOW_MODE_NORMAL;
-
- bool state;
-
- state = _ivug_config_get_slideshow_repeat_state();
- if(state == true)
- {
- *mode |= SLIDE_SHOW_MODE_REPEAT;
- }
-
- state = _ivug_config_get_slideshow_shuffle_state();
- if(state == true)
- {
- *mode |= SLIDE_SHOW_MODE_SHUFFLE;
- }
-
- *interval_time = _ivug_config_get_slideshow_interval_time();
-
- /* EFFECT_NONE, EFFECT_FADE, EFFECT_BLIND, EFFECT_IRIS */
- char *effect = _ivug_config_get_slideshow_effect_type();
-
- *effect_type = _ivug_config_get_effect_type_by_string(effect);
-}
-
-
diff --git a/main/src/common/ivug-config.h b/main/src/common/ivug-config.h
deleted file mode 100755
index 31d9533..0000000
--- a/main/src/common/ivug-config.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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 __IVUG_CONFIG_H__
-#define __IVUG_CONFIG_H__
-
-typedef enum {
- SLIDE_SHOW_MODE_NORMAL = 0x00,
- SLIDE_SHOW_MODE_REPEAT = 0x01,
- SLIDE_SHOW_MODE_SHUFFLE = 0x02,
- SLIDE_SHOW_MODE_SHUFFLE_REPEAT = 0x03,
-} slide_show_mode;
-
-typedef enum {
- IVUG_EFFECT_TYPE_SLIDE = 0x00,
- IVUG_EFFECT_TYPE_MAX,
-} ivug_effect_type;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-bool ivug_config_set_lockscreen_image(const char* filepath);
-
-bool ivug_config_set_homescreen_image(const char* filepath);
-
-void ivug_config_get_slideshow_setting(slide_show_mode * /* OUT */ mode,
- double * /* OUT */ interval_time,
- ivug_effect_type * /* OUT */ effect_type);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif // __IVUG_CONFIG_H__
diff --git a/main/src/common/ivug-datatypes.h b/main/src/common/ivug-datatypes.h
deleted file mode 100755
index dc616e3..0000000
--- a/main/src/common/ivug-datatypes.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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 __IVUG_DATATYPES_H__
-#define __IVUG_DATATYPES_H__
-
-#include "ivug-define.h"
-
-typedef void *Handle;
-
-#ifdef _USE_MEDIAINFO_STRINGID_
-typedef const char *UUID;
-#else
-typedef int UUID;
-#endif
-
-#endif // __IVUG_DATATYPES_H__
-
diff --git a/main/src/common/ivug-define.h b/main/src/common/ivug-define.h
deleted file mode 100755
index 0cddf5b..0000000
--- a/main/src/common/ivug-define.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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.
- */
-
-
-/*
- system widely used definition.
-*/
-
-#pragma once
-
-#define IVUG_MAX_FILE_PATH_LEN (4096)
-
-/*
-Definition "PREFIX" is declared in CMakelist.txt
- PREFIX is "/opt/ug"
- PACKAGE is "ug-image-viewer-efl"
-
- Path name does not include trailing /.
-
- DATA_PATH is /opt/data
-*/
-#define LOCALE_PATH PREFIX"/res/locale"
-#define IMAGE_PATH PREFIX"/res/images/"PACKAGE
-#define EDJ_PATH PREFIX"/res/edje/"PACKAGE
-
-/*
- Home screen and Lock screen image should be put in DATA_PATH.
-*/
-#define DATA_PATH DATADIR"/"PACKAGE
-
-// TODO : Add comments
-#define IV_WINDOW_SIZE (41)//41 /* it's better to be odd number */
-#define IV_WINDOW_SIZE_FOR_SLIDE_SHOW (1)
-#define IV_RELOAD_OFFSET (4)//IV_WINDOW_SIZE/10 // it's better to be larger than 2
-
-#define USE_WIN_AS_PARENT
-
-#define NAVI_OPTION_BTN_STYLE "multiline"
-
-#define IVUG_DEFAULT_BG_COLOR 48
-
-#define _USE_MEDIAINFO_STRINGID_
-
-#define FEATURE_DYNAMIC_POPUP_HEIGHT
-
-#define USE_CUSTOM_STYLE
-
diff --git a/main/src/common/ivug-string.h b/main/src/common/ivug-string.h
deleted file mode 100755
index ab4458d..0000000
--- a/main/src/common/ivug-string.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright 2012 Samsung Electronics Co., Ltd
- *
- * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
- *
- * 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 __IVUG_STRING_H__
-#define __IVUG_STRING_H__
-
-#include <libintl.h>
-
-/* Original code is in appcore-common.h */
-#define _(str) gettext(str) /**< gettext alias */
-#define gettext_noop(str) (str) /**< keyword for xgettext to extract translatable strings */
-#define N_(str) gettext_noop(str) /**< gettext_noop alias */
-
-
-#define LOCALE_PATH PREFIX"/res/locale" /*TODO!!!*/
-
-#ifndef PACKAGE
-#error PACKAGE is not defined
-#endif
-
-#ifndef LOCALE_PATH
-#error LOCALE_PATH is not defined
-#endif
-
-//string
-#define IVUG_TEXT_DOMAIN PACKAGE
-#define IVUG_LOCALEDIR LOCALE_PATH
-
-// Not yet translated
-#define IDS_NULL _("")
-
-#define IDS_INVALID_IMAGE_FILE (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_POP_INVALID_IMAGE_FILE"))
-#define IDS_PERMISSION_DENIED (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_POP_PERMISSION_DENIED"))
-#define IDS_APPLICATION_NOT_INSTALLED (dgettext("sys_string","IDS_COM_BODY_APPLICATION_NOT_INSTALLED"))
-
-/*#define Details*/
-#define IDS_FORMAT (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_FILE_FORMAT"))
-#define IDS_DATE_CREATED (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_DATE_CREATED"))
-#define IDS_LOCATION (dgettext(IVUG_TEXT_DOMAIN, "IDS_COM_BODY_LOCATION"))
-#define IDS_FILE_LOCATION (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_FILE_LOCATION"))
-#define IDS_RESOLUTION (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_RESOLUTION"))
-#define IDS_LATITUDE (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_LATITUDE"))
-#define IDS_LONGITUDE (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_LONGITUDE"))
-
-#define IDS_N_A (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_N_A"))
-#define IDS_PRINT (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_BODY_PRINT"))
-
-/* Registered string in STMS IV */
-#define IDS_ADDED (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_POP_ADDED"))
-#define IDS_SLIDE_SHOW (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_SLIDE_SHOW"))
-
-#define IDS_SD_CARD_REMOVED (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_POP_SD_CARD_REMOVED"))
-#define IDS_SET_AS (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_SET_AS"))
-
-#define IDS_HOME_SCREEN_WALLPAPER (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"))
-#define IDS_LOCK_SCREEN_WALLPAPER (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"))
-#define IDS_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_POP_SET_WALLPAPER_FOR_HOME_SCREEN_AND_LOCK_SCREEN"))
-#define IDS_HOME_AND_LOCK_SCREEN_WALLPAPER (dgettext(IVUG_TEXT_DOMAIN, "IDS_IV_OPT_HOME_AND_LOCK_SCREEN_WALLPAPER"))
-
-// System string.
-#define IDS_DELETE_MSG (dgettext("sys_string","IDS_COM_POP_DELETE_Q"))
-#define IDS_NAME (dgettext("sys_string", "IDS_COM_BODY_DETAILS_NAME"))
-#define IDS_SIZE (dgettext("sys_string", "IDS_COM_BODY_SIZE"))
-
-#define IDS_COPY (dgettext("sys_string","IDS_COM_BODY_COPY"))
-
-#define IDS_ERROR (dgettext("sys_string","IDS_COM_POP_ERROR"))
-#define IDS_UNKNOWN (dgettext("sys_string", "IDS_COM_BODY_UNKNOWN"))
-
-#define IDS_LOADING (dgettext("sys_string", "IDS_COM_BODY_LOADING"))
-
-#define IDS_BLUETOOTH (dgettext("sys_string", "IDS_COM_BODY_BLUETOOTH"))
-
-#define IDS_CANCEL (dgettext("sys_string", "IDS_COM_SK_CANCEL"))
-#define IDS_DONE (dgettext("sys_string","IDS_COM_SK_DONE"))
-
-#define IDS_SET (dgettext("sys_string","IDS_COM_SK_SET"))
-#define IDS_BACK (dgettext("sys_string","IDS_COM_BODY_BACK"))
-
-#define IDS_OK (dgettext("sys_string","IDS_COM_SK_OK"))
-#define IDS_DELETE (dgettext("sys_string","IDS_COM_BODY_DELETE"))
-#define IDS_DELETED (dgettext("sys_string","IDS_COM_POP_DELETED"))
-
-#define IDS_SAVED (dgettext("sys_string","IDS_COM_POP_SAVED"))
-#define IDS_NO (dgettext("sys_string","IDS_COM_SK_NO"))
-#define IDS_YES (dgettext("sys_string","IDS_COM_SK_YES"))
-
-#define IDS_SUCCESS (dgettext("sys_string", "IDS_COM_POP_SUCCESS"))
-#define IDS_FAILED (dgettext("sys_string", "IDS_COM_POP_FAILED"))
-
-#define IDS_DETAILS (dgettext("sys_string","IDS_COM_BODY_DETAILS"))
-
-#define IDS_CLOSE (dgettext("sys_string", "IDS_COM_BODY_CLOSE"))
-#define IDS_NO_NAME (dgettext("sys_string", "IDS_COM_BODY_NO_NAME"))
-
-#endif // __IVUG_STRING_H__
-
-