binding: navigation: rewrite of navigation binding
[apps/agl-service-navigation.git] / binding / navigation-api.h
1 /*
2  * Copyright 2019 Konsulko Group
3  * Author: Matt Ranostay <matt.ranostay@konsulko.com>
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18 #ifndef NAVIGATION_API_H
19 #define NAVIGATION_API_H
20
21 #include <stddef.h>
22
23 #define _GNU_SOURCE
24 #include <glib.h>
25 #include <stdlib.h>
26 #include <gio/gio.h>
27 #include <glib-object.h>
28
29 #include <json-c/json.h>
30
31 #define AFB_BINDING_VERSION 3
32 #include <afb/afb-binding.h>
33
34 #include <json-c/json.h>
35
36 struct call_work;
37
38 struct navigation_state {
39         // events
40         afb_event_t status_event;
41         afb_event_t position_event;
42         afb_event_t waypoints_event;
43
44         // storage
45         json_object *status_storage;
46         json_object *position_storage;
47         json_object *waypoints_storage;
48
49         // locking
50         GRWLock rw_lock;
51 };
52
53 #endif