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
20 #include "CicoResourceConfig.h"
22 /*============================================================================*/
24 /*============================================================================*/
25 /*--------------------------------------------------------------------------*/
27 * @brief CicoResourceConfig::GetImagePath
28 * set the directory path of the image files.
30 * @param[out] buff buffer that the pass set
31 * @param[in] len buffer length
34 /*--------------------------------------------------------------------------*/
36 CicoResourceConfig::GetImagePath(char *buff, int len)
41 pkg = getenv("PKG_NAME");
43 snprintf(buff, len, ICO_IMAGE_PATH, pkg);
46 pkg = getenv(ICO_HS_CONFIG_TOP_ENV);
47 snprintf(buff, len, ICO_LOCAL_IMAGE_PATH,
48 pkg ? pkg : ICO_LOCAL_TOP_PATH);
50 ICO_DBG("buff=\"%s\"", buff);
53 /*--------------------------------------------------------------------------*/
55 * @brief CicoResourceConfig::GetSoundPath
56 * set the directory path of the sounds files.
58 * @param[out] buff buffer that the pass set
59 * @param[in] len buffer length
62 /*--------------------------------------------------------------------------*/
64 CicoResourceConfig::GetSoundPath(char *buff, int len)
69 pkg = getenv("PKG_NAME");
71 snprintf(buff, len, ICO_SOUND_PATH, pkg);
74 pkg = getenv(ICO_HS_CONFIG_TOP_ENV);
75 snprintf(buff, len, ICO_LOCAL_SOUND_PATH,
76 pkg ? pkg : ICO_LOCAL_TOP_PATH);
80 /*--------------------------------------------------------------------------*/
82 * @brief CicoResourceConfig::GetEdjPath
83 * set the directory path of efj files.
85 * @param[out] buff buffer that the pass set
86 * @param[in] len buffer length
89 /*--------------------------------------------------------------------------*/
91 CicoResourceConfig::GetEdjPath(char *buff, int len)
96 pkg = getenv("PKG_NAME");
98 snprintf(buff, len, ICO_EDJ_PATH, pkg);
101 pkg = getenv(ICO_HS_CONFIG_TOP_ENV);
102 snprintf(buff, len, ICO_LOCAL_EDJ_PATH,
103 pkg ? pkg : ICO_LOCAL_TOP_PATH);
107 /*--------------------------------------------------------------------------*/
109 * @brief CicoResourceConfig::GetConfPath
110 * set the directory path of edj files for onscreen.
112 * @param[out] buff buffer that the pass set
113 * @param[in] len buffer length
116 /*--------------------------------------------------------------------------*/
118 CicoResourceConfig::GetConfPath(char *buff, int len)
122 memset(buff, 0, len);
123 pkg = getenv("PKG_NAME");
125 snprintf(buff, len, ICO_MANIFEST_PATH, pkg);
128 pkg = getenv(ICO_HS_CONFIG_TOP_ENV);
129 snprintf(buff, len, ICO_LOCAL_MANIFEST_PATH,
130 pkg ? pkg : ICO_LOCAL_TOP_PATH);
133 // vim: set expandtab ts=4 sw=4: