2 * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
4 * This program is licensed under the terms and conditions of the
5 * Apache License, version 2.0. The full text of the Apache License is at
6 * http://www.apache.org/licenses/LICENSE-2.0
10 * @brief configuration of resource path
18 #include <tzplatform_config.h>
21 #include "CicoResourceConfig.h"
23 /*============================================================================*/
25 /*============================================================================*/
26 /*--------------------------------------------------------------------------*/
28 * @brief CicoResourceConfig::GetImagePath
29 * set the directory path of the image files.
31 * @param[out] buff buffer that the pass set
32 * @param[in] len buffer length
35 /*--------------------------------------------------------------------------*/
37 CicoResourceConfig::GetImagePath(char *buff, int len)
42 pkg = getenv("PKG_NAME");
44 snprintf(buff, len, ICO_IMAGE_PATH, tzplatform_getenv(TZ_SYS_RO_APP), pkg);
47 pkg = getenv(ICO_HS_CONFIG_TOP_ENV);
48 snprintf(buff, len, ICO_LOCAL_IMAGE_PATH,
49 pkg ? pkg : ICO_LOCAL_TOP_PATH);
51 ICO_DBG("buff=\"%s\"", buff);
54 /*--------------------------------------------------------------------------*/
56 * @brief CicoResourceConfig::GetSoundPath
57 * set the directory path of the sounds files.
59 * @param[out] buff buffer that the pass set
60 * @param[in] len buffer length
63 /*--------------------------------------------------------------------------*/
65 CicoResourceConfig::GetSoundPath(char *buff, int len)
70 pkg = getenv("PKG_NAME");
72 snprintf(buff, len, ICO_SOUND_PATH, tzplatform_getenv(TZ_SYS_RO_APP), pkg);
75 pkg = getenv(ICO_HS_CONFIG_TOP_ENV);
76 snprintf(buff, len, ICO_LOCAL_SOUND_PATH,
77 pkg ? pkg : ICO_LOCAL_TOP_PATH);
81 /*--------------------------------------------------------------------------*/
83 * @brief CicoResourceConfig::GetEdjPath
84 * set the directory path of efj files.
86 * @param[out] buff buffer that the pass set
87 * @param[in] len buffer length
90 /*--------------------------------------------------------------------------*/
92 CicoResourceConfig::GetEdjPath(char *buff, int len)
97 pkg = getenv("PKG_NAME");
99 snprintf(buff, len, ICO_EDJ_PATH, tzplatform_getenv(TZ_SYS_RO_APP), pkg);
102 pkg = getenv(ICO_HS_CONFIG_TOP_ENV);
103 snprintf(buff, len, ICO_LOCAL_EDJ_PATH,
104 pkg ? pkg : ICO_LOCAL_TOP_PATH);
108 /*--------------------------------------------------------------------------*/
110 * @brief CicoResourceConfig::GetConfPath
111 * set the directory path of edj files for onscreen.
113 * @param[out] buff buffer that the pass set
114 * @param[in] len buffer length
117 /*--------------------------------------------------------------------------*/
119 CicoResourceConfig::GetConfPath(char *buff, int len)
123 memset(buff, 0, len);
124 pkg = getenv("PKG_NAME");
126 snprintf(buff, len, ICO_MANIFEST_PATH,
127 tzplatform_getenv(TZ_SYS_RO_APP), pkg);
130 pkg = getenv(ICO_HS_CONFIG_TOP_ENV);
131 snprintf(buff, len, ICO_LOCAL_MANIFEST_PATH,
132 pkg ? pkg : ICO_LOCAL_TOP_PATH);
135 // vim: set expandtab ts=4 sw=4: