2 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (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://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <dali-toolkit/devel-api/asset-manager/asset-manager.h>
22 #include <dali/devel-api/adaptor-framework/environment-variable.h>
26 #define TOKEN_STRING(x) #x
28 } // unnamed namespace
34 const std::string AssetManager::GetDaliImagePath()
37 * @note DALI_IMAGE_DIR is a macro that can be defined either with a file system path or zero.
38 * If it's defined as zero then the value is retrieved from an environment variable
39 * named DALI_IMAGE_DIR.
41 return (nullptr == DALI_IMAGE_DIR) ? EnvironmentVariable::GetEnvironmentVariable(TOKEN_STRING(DALI_IMAGE_DIR)) : DALI_IMAGE_DIR;
44 const std::string AssetManager::GetDaliSoundPath()
47 * @note DALI_SOUND_DIR is a macro that can be defined either with a file system path or zero.
48 * If it's defined as zero then the value is retrieved from an environment variable
49 * named DALI_SOUND_DIR.
51 return (nullptr == DALI_SOUND_DIR) ? EnvironmentVariable::GetEnvironmentVariable(TOKEN_STRING(DALI_SOUND_DIR)) : DALI_SOUND_DIR;
54 const std::string AssetManager::GetDaliStylePath()
57 * @note DALI_STYLE_DIR is a macro that can be defined either with a file system path or zero.
58 * If it's defined as zero then the value is retrieved from an environment variable
59 * named DALI_STYLE_DIR.
61 return (nullptr == DALI_STYLE_DIR) ? EnvironmentVariable::GetEnvironmentVariable(TOKEN_STRING(DALI_STYLE_DIR)) : DALI_STYLE_DIR;
64 const std::string AssetManager::GetDaliStyleImagePath()
67 * @note DALI_STYLE_IMAGE_DIR is a macro that can be defined either with a file system path or zero.
68 * If it's defined as zero then the value is retrieved from an environment variable
69 * named DALI_STYLE_IMAGE_DIR.
71 return (nullptr == DALI_STYLE_IMAGE_DIR) ? EnvironmentVariable::GetEnvironmentVariable(TOKEN_STRING(DALI_STYLE_IMAGE_DIR)) : DALI_STYLE_IMAGE_DIR;
74 const std::string AssetManager::GetDaliDataReadOnlyPath()
77 * @note DALI_DATA_READ_ONLY_DIR is a macro that can be defined either with a file system path or zero.
78 * If it's defined as zero then the value is retrieved from an environment variable
79 * named DALI_DATA_READ_ONLY_DIR.
81 return (nullptr == DALI_DATA_READ_ONLY_DIR) ? EnvironmentVariable::GetEnvironmentVariable(TOKEN_STRING(DALI_DATA_READ_ONLY_DIR)) : DALI_DATA_READ_ONLY_DIR;
84 } // namespace Toolkit