tizen 2.4 release
[framework/location/libslp-lbs-plugin-replay.git] / gps-plugin / include / setting.h
1 /*
2  * gps-manager replay plugin
3  *
4  * Copyright (c) 2011-2013 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Youngae Kang <youngae.kang@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
7  *                      Genie Kim <daejins.kim@samsung.com>
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21
22 #ifndef _SETTING_H_
23 #define _SETTING_H_
24
25 #include <vconf.h>
26 #include <vconf-internal-location-keys.h>
27
28 #define NMEA_FILE_PATH "/opt/usr/media/lbs-server/replay/"
29 #define DEFAULT_NMEA_LOG "/etc/lbs-server/replay/nmea_replay.log"
30
31 typedef enum {
32         REPLAY_OFF = 0,
33         REPLAY_NMEA,
34         REPLAY_MANUAL,
35         REPLAY_MODE_MAX
36 } replay_mode_t;
37
38 typedef enum {
39         BATCH_MODE_OFF = 0,
40         BATCH_MODE_ON
41 } batch_mode_t;
42
43 typedef enum {
44         READ_ERROR              = -1,
45         READ_SUCCESS    = 0,
46         READ_NOT_FIXED  = 1,
47 } read_error_t;
48
49 int setting_get_int(const char *path, int *val);
50 int setting_get_double(const char *path, double *val);
51 char *setting_get_string(const char *path);
52
53 typedef void (*key_changed_cb)(keynode_t *key, void *data);
54
55 int setting_notify_key_changed(const char *path, void *key_changed_cb);
56 int setting_ignore_key_changed(const char *path, void *key_changed_cb);
57 #endif                          /* _SETTING_H_ */