4af2744a87f954564bb20bf2956237744ca2d967
[apps/native/sample/sample-core-components.git] / rule / watchface / project / src / data.c
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 /*
18  * @brief Get path of resource
19  * @param[in] file_in File name
20  * @param[out] file_path_out The point to which save full path of the resource
21  * @param[in] file_path_max Size of file name include path
22  */
23 void data_get_resource_path(const char *file_in, char *file_path_out, int file_path_max)
24 {
25         char *res_path = app_get_resource_path();
26         if (res_path) {
27                 snprintf(file_path_out, file_path_max, "%s%s", res_path, file_in);
28                 free(res_path);
29         }
30 }
31
32 /*
33  * @brief Initialization function for data module
34  */
35 void data_initialize(void)
36 {
37         /*
38          * If you need to initialize managing data,
39          * please use this function.
40          */
41 }
42
43 /*
44  * @brief Finalization function for data module
45  */
46 void data_finalize(void)
47 {
48         /*
49          * If you need to finalize managing data,
50          * please use this function.
51          */
52 }