tizen beta release
[framework/location/gps-manager.git] / gps-manager / server.h
1 /*
2  * gps-manager
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 _SERVER_H_
23 #define _SERVER_H_
24
25 #include "gps_manager.h"
26
27 #define SUPL_SERVER_URL_DEFAULT "your.supl-server.com"
28 #define SUPL_SERVER_PORT_DEFAULT 7275
29
30 //This structure must be synchronized with State of mctxlDef.h
31 typedef enum {
32         GPS_STATE_AVAILABLE,
33         GPS_STATE_OUT_OF_SERVICE,
34         GPS_STATE_TEMPORARILY_UNAVAILABLE,
35 } gps_state_t;
36
37 typedef enum {
38         GPS_SESSION_STOPPED,
39         GPS_SESSION_STARTING,
40         GPS_SESSION_STARTED,
41         GPS_SESSION_STOPPING,
42 } gps_session_state_t;
43
44 typedef enum {
45         AGPS_VERIFICATION_YES = 0x00,                   /**<    Specifies Confirmation yes.     */
46         AGPS_VERIFICATION_NO = 0x01,                    /**<    Specifies Confirmation no.      */
47         AGPS_VERIFICATION_NORESPONSE = 0x02,            /**<    Specifies Confirmation no response. */
48 } agps_verification_t;
49
50 typedef enum {
51         GPS_MAIN_NOTIFY_NO_VERIFY = 0x00,
52         GPS_MAIN_NOTIFY_ONLY = 0x01,
53         GPS_MAIN_NOTIFY_ALLOW_NORESPONSE = 0x02,
54         GPS_MAIN_NOTIFY_NOTALLOW_NORESPONSE = 0x03,
55         GPS_MAIN_NOTIFY_PRIVACY_NEEDED = 0x04,
56         GPS_MAIN_NOTIFY_PRIVACY_OVERRIDE = 0x05,
57 } gps_main_notify_type_t;
58
59 typedef struct {
60         char requester_name[50];        /**<  Specifies Requester name*/
61         char client_name[50];           /**<  Specifies Client name */
62 } gps_main_verif_info_t;
63
64 typedef struct {
65         void *msg_body;
66         int msg_size;
67         int num_btn;
68 } gps_ni_popup_data_t;
69
70 int initialize_server(int argc, char **argv);
71 int deinitialize_server();
72
73 int request_start_session(void);
74 int request_stop_session(void);
75 int register_update_callbacks(struct gps_callbacks *gps_callback, void *user_data);
76
77 #endif                          /* _SERVER_H_ */