2 * Copyright 2016 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.1 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include <app_common.h>
22 #include "lockscreen.h"
24 const char *util_get_file_path(enum app_subdir dir, const char *relative)
26 static char buf[PATH_MAX];
31 prefix = app_get_data_path();
34 prefix = app_get_cache_path();
36 case APP_DIR_RESOURCE:
37 prefix = app_get_resource_path();
39 case APP_DIR_SHARED_DATA:
40 prefix = app_get_shared_data_path();
42 case APP_DIR_SHARED_RESOURCE:
43 prefix = app_get_shared_resource_path();
45 case APP_DIR_SHARED_TRUSTED:
46 prefix = app_get_shared_trusted_path();
48 case APP_DIR_EXTERNAL_DATA:
49 prefix = app_get_external_data_path();
51 case APP_DIR_EXTERNAL_CACHE:
52 prefix = app_get_external_cache_path();
54 case APP_DIR_EXTERNAL_SHARED_DATA:
55 prefix = app_get_external_shared_data_path();
58 FAT("Not handled directory type.");
61 size_t res = eina_file_path_join(buf, sizeof(buf), prefix, relative);
63 if (res > sizeof(buf)) {
64 ERR("Path exceeded PATH_MAX");
71 const Elm_Theme *util_lockscreen_theme_get(void)
73 static Elm_Theme *theme;
76 theme = elm_theme_new();
77 elm_theme_ref_set(theme, NULL);
78 elm_theme_overlay_add(NULL, util_get_res_file_path(EDJE_DIR"index.edj"));
83 void util_feedback_tap_play(void)
87 int ret = feedback_initialize();
88 if (ret != FEEDBACK_ERROR_NONE) {
89 FAT("feedback_initialize failed.");
93 feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);