sync
[framework/location/libslp-lbs-plugin-replay.git] / replay-plugin / include / setting.h
1 /*
2  * GPS manager replay plugin
3  *
4  * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Youngae Kang <youngae.kang@samsung.com>, Yunhan Kim <yhan.kim@samsung.com>,
7  *          Genie Kim <daejins.kim@samsung.com>, Minjune Kim <sena06.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/media/gps-manager/replay/"
29 #define DEFAULT_NMEA_LOG "/etc/gps-manager/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         READ_ERROR       = -1,
40         READ_SUCCESS     = 0,
41         READ_NOT_FIXED   = 1,
42 } read_error_t;
43
44 int setting_get_int(const char *path, int *val);
45 int setting_get_double(const char *path, double *val);
46 char *setting_get_string(const char *path);
47
48 typedef void (*key_changed_cb) (keynode_t * key, void *data);
49
50 int setting_notify_key_changed(const char *path, void *key_changed_cb);
51 int setting_ignore_key_changed(const char *path, void *key_changed_cb);
52 #endif                          /* _SETTING_H_ */