Merge "apply config module"
[apps/native/tizen-things-daemon.git] / daemon / include / ttd-config.h
1 /*
2  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://floralicense.org/license/
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 #ifndef __TT_DAEMON_CONFIG_H__
18 #define __TT_DAEMON_CONFIG_H__
19
20 #include <stdbool.h>
21
22 #define TTD_SETTING_INFO "setting"
23 #define TTD_SETTING_DISCONNECTED_LIMIT_TIME "network_disconnected_limit"
24
25 int ttd_config_init(void);
26 void ttd_config_fini(void);
27 int ttd_config_write(void *cmd_data);
28 int ttd_config_read_integer(const char *group, const char *key, int *value);
29 int ttd_config_read_boolean(const char *group, const char *key, bool *value);
30 int ttd_config_read_string(const char *group, const char *key, char **value);
31 int ttd_config_write_integer(const char *group, const char *key, int value);
32 int ttd_config_write_boolean(const char *group, const char *key, bool value);
33 int ttd_config_write_string(const char *group, const char *key, const char *value);
34 int ttd_config_remove_group(const char *group);
35 int ttd_config_remove_key(const char *group, const char *key);
36
37 #endif /* __TT_DAEMON_CONFIG_H__ */
38