Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Contents of /branches/libroutino/src/routino.h
Parent Directory
|
Revision Log
Revision 1738 -
(show annotations)
(download)
(as text)
Thu Jul 9 19:01:12 2015 UTC (9 years, 9 months ago) by amb
File MIME type: text/x-chdr
File size: 3156 byte(s)
Thu Jul 9 19:01:12 2015 UTC (9 years, 9 months ago) by amb
File MIME type: text/x-chdr
File size: 3156 byte(s)
Update the library and include a version of the router program that uses the libroutino shared library for calculating routes. Currently generates output files of all types and accepts but ignores all options to change this.
1 | /*************************************** |
2 | Routino library header file. |
3 | |
4 | Part of the Routino routing software. |
5 | ******************/ /****************** |
6 | This file Copyright 2015 Andrew M. Bishop |
7 | |
8 | This program is free software: you can redistribute it and/or modify |
9 | it under the terms of the GNU Affero General Public License as published by |
10 | the Free Software Foundation, either version 3 of the License, or |
11 | (at your option) any later version. |
12 | |
13 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU Affero General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU Affero General Public License |
19 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
20 | ***************************************/ |
21 | |
22 | |
23 | #ifndef ROUTINO_H |
24 | #define ROUTINO_H /*+ To stop multiple inclusions. +*/ |
25 | |
26 | /* Limit the exported symbols in the library */ |
27 | |
28 | #if defined(_MSC_VER) |
29 | #ifdef LIBROUTINO |
30 | #define DLL_PUBLIC __declspec(dllexport) |
31 | #else |
32 | #define DLL_PUBLIC __declspec(dllimport) |
33 | #endif |
34 | #endif |
35 | |
36 | #if defined(__GNUC__) && __GNUC__ >= 4 |
37 | #if defined(__MINGW32__) || defined(__CYGWIN__) |
38 | #ifdef LIBROUTINO |
39 | #define DLL_PUBLIC __attribute__ ((dllexport)) |
40 | #else |
41 | #define DLL_PUBLIC __attribute__ ((dllimport)) |
42 | #endif |
43 | #else |
44 | #ifdef LIBROUTINO |
45 | #define DLL_PUBLIC __attribute__ ((visibility ("default"))) |
46 | #endif |
47 | #endif |
48 | #endif |
49 | |
50 | #ifndef DLL_PUBLIC |
51 | #define DLL_PUBLIC |
52 | #endif |
53 | |
54 | |
55 | /* Handle compilation with a C++ compiler */ |
56 | |
57 | #ifdef __cplusplus |
58 | extern "C" |
59 | { |
60 | #endif |
61 | |
62 | |
63 | /* Routino types */ |
64 | |
65 | typedef struct _Routino_Database Routino_Database; |
66 | typedef struct _Routino_Waypoint Routino_Waypoint; |
67 | |
68 | #ifdef LIBROUTINO |
69 | typedef struct _Profile Routino_Profile; |
70 | typedef struct _Translation Routino_Translation; |
71 | #else |
72 | typedef struct _Routino_Profile Routino_Profile; |
73 | typedef struct _Routino_Translation Routino_Translation; |
74 | #endif |
75 | |
76 | |
77 | /* Routino library functions */ |
78 | |
79 | DLL_PUBLIC void Routino_Quickest(void); |
80 | DLL_PUBLIC void Routino_Shortest(void); |
81 | |
82 | DLL_PUBLIC Routino_Database *Routino_LoadDatabase(const char *dirname,const char *prefix); |
83 | DLL_PUBLIC void Routino_UnloadDatabase(Routino_Database *database); |
84 | |
85 | DLL_PUBLIC int Routino_ParseXMLProfiles(const char *filename); |
86 | DLL_PUBLIC Routino_Profile *Routino_GetProfile(const char *name); |
87 | DLL_PUBLIC void Routino_FreeXMLProfiles(void); |
88 | |
89 | DLL_PUBLIC int Routino_ParseXMLTranslations(const char *filename); |
90 | DLL_PUBLIC Routino_Translation *Routino_GetTranslation(const char *language); |
91 | DLL_PUBLIC void Routino_FreeXMLTranslations(void); |
92 | |
93 | DLL_PUBLIC Routino_Waypoint *Routino_FindWaypoint(Routino_Database *database,Routino_Profile *profile,double latitude,double longitude); |
94 | |
95 | DLL_PUBLIC int Routino_CalculateRoute(Routino_Database *database,Routino_Profile *profile,Routino_Translation *translation, |
96 | Routino_Waypoint **waypoints,int nwaypoints); |
97 | |
98 | |
99 | /* Handle compilation with a C++ compiler */ |
100 | |
101 | #ifdef __cplusplus |
102 | } |
103 | #endif |
104 | |
105 | #endif /* ROUTINO_H */ |