Plugin updated
[platform/adaptation/artik/lbs-plugin-gps-artik7.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  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18
19 #ifndef _SETTING_H_
20 #define _SETTING_H_
21
22 #include <vconf.h>
23 #include <vconf-internal-location-keys.h>
24
25
26 typedef enum {
27         MODE_DUMMY_GPS = 0,
28         MODE_REAL_GPS,
29         MODE_EMULATOR,
30 } replay_mode_t;
31
32 typedef enum {
33         BATCH_MODE_OFF = 0,
34         BATCH_MODE_ON
35 } batch_mode_t;
36
37 typedef enum {
38         READ_ERROR              = -1,
39         READ_SUCCESS    = 0,
40         READ_NOT_FIXED  = 1,
41 } read_error_t;
42
43 int setting_get_int(const char *path, int *val);
44 int setting_get_double(const char *path, double *val);
45 char *setting_get_string(const char *path);
46
47 typedef void (*key_changed_cb)(keynode_t *key, void *data);
48
49 int setting_notify_key_changed(const char *path, void *key_changed_cb);
50 int setting_ignore_key_changed(const char *path, void *key_changed_cb);
51 #endif                          /* _SETTING_H_ */