From 25449bf52d1279f73fee0ea35775646ca499ae02 Mon Sep 17 00:00:00 2001 From: mvglasow Date: Mon, 27 Nov 2017 05:32:38 +0100 Subject: Refine documentation (#378) * Refactor:route:Improve documentation Signed-off-by: mvglasow * Refactor:core:Refine documentation Signed-off-by: mvglasow * Refactor:core:Improve documentation Signed-off-by: mvglasow * Refactor:core:Improve documentatio Signed-off-by: mvglasow --- navit/map.h | 12 ++++++------ navit/xmlconfig.h | 57 ++++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 50 insertions(+), 19 deletions(-) diff --git a/navit/map.h b/navit/map.h index 305c26b96..4ffe0d401 100644 --- a/navit/map.h +++ b/navit/map.h @@ -79,13 +79,13 @@ struct map_methods { struct map_rect_priv * (*map_rect_new)(struct map_priv *map, struct map_selection *sel); /**< Function to create a new map rect on the map. */ void (*map_rect_destroy)(struct map_rect_priv *mr); /**< Function to destroy a map rect */ struct item * (*map_rect_get_item)(struct map_rect_priv *mr); /**< Function to return the next item from a map rect */ - struct item * (*map_rect_get_item_byid)(struct map_rect_priv *mr, int id_hi, int id_lo); /**< Function to get an item with a specific ID from a map rect */ - struct map_search_priv *(*map_search_new)(struct map_priv *map, struct item *item, struct attr *search, int partial); /**< Function to start a new search on the map */ - void (*map_search_destroy)(struct map_search_priv *ms); /**< Function to destroy a map search struct */ - struct item * (*map_search_get_item)(struct map_search_priv *ms); /**< Function to get the next item of a search on the map */ + struct item * (*map_rect_get_item_byid)(struct map_rect_priv *mr, int id_hi, int id_lo); /**< Function to get an item with a specific ID from a map rect, can be NULL */ + struct map_search_priv *(*map_search_new)(struct map_priv *map, struct item *item, struct attr *search, int partial); /**< Function to start a new search on the map, can be NULL */ + void (*map_search_destroy)(struct map_search_priv *ms); /**< Function to destroy a map search struct, ignored if `map_search_new` is NULL */ + struct item * (*map_search_get_item)(struct map_search_priv *ms); /**< Function to get the next item of a search on the map, ignored if `map_search_new` is NULL */ struct item * (*map_rect_create_item)(struct map_rect_priv *mr, enum item_type type); /**< Function to create a new item in the map */ - int (*map_get_attr)(struct map_priv *priv, enum attr_type type, struct attr *attr); - int (*map_set_attr)(struct map_priv *priv, struct attr *attr); + int (*map_get_attr)(struct map_priv *priv, enum attr_type type, struct attr *attr); /**< Function to get a map attribute, can be NULL */ + int (*map_set_attr)(struct map_priv *priv, struct attr *attr); /**< Function to set a map attribute, can be NULL */ }; diff --git a/navit/xmlconfig.h b/navit/xmlconfig.h index 2a2600473..483f215d0 100644 --- a/navit/xmlconfig.h +++ b/navit/xmlconfig.h @@ -65,20 +65,51 @@ typedef void *(*object_func_ref)(void *); typedef void *(*object_func_unref)(void *); +/** + * @brief Basic functions for Navit objects + * + * This is the minimal list of functions which is supported by every Navit object. + * + * Some members can be NULL for certain object types: while Navit does not mandate this function to be + * implemented for every object class, the function may need to be defined for some object classes. + * + * Default implementations are available for every function in the list except `create`, `init` and + * `dup`. These can be set directly, or type-specific implementations can call through to them as they + * see fit. + */ struct object_func { - enum attr_type type; - void *(*create)(struct attr *parent, struct attr **attrs); - int (*get_attr)(void *, enum attr_type type, struct attr *attr, struct attr_iter *iter); - struct attr_iter *(*iter_new)(void *); - void (*iter_destroy)(struct attr_iter *); - int (*set_attr)(void *, struct attr *attr); - int (*add_attr)(void *, struct attr *attr); - int (*remove_attr)(void *, struct attr *attr); - int (*init)(void *); - void (*destroy)(void *); - void *(*dup)(void *); - void *(*ref)(void *); - void *(*unref)(void *); + enum attr_type type; /**< The object type */ + void *(*create)(struct attr *parent, struct attr **attrs); /**< Function to create a new object instance */ + int (*get_attr)(void *, enum attr_type type, struct attr *attr, struct attr_iter *iter); /**< Function + * to get an attribute of the object, + * set to `navit_object_get_attr` for default behavior */ + struct attr_iter *(*iter_new)(void *); /**< Function to obtain a new attribute iterator, + * set to `navit_object_attr_iter_new` for default + * behavior, can be NULL for some object types */ + void (*iter_destroy)(struct attr_iter *); /**< Function to destroy an attribute iterator, + * set to `navit_object_attr_iter_destroy` for default + * behavior, can be NULL for some object types */ + int (*set_attr)(void *, struct attr *attr); /**< Function to set an attribute, + * set to `navit_object_set_attr` for default behavior, + * can be NULL for some object types */ + int (*add_attr)(void *, struct attr *attr); /**< Function to add an attribute, + * set to `navit_object_add_attr` for default behavior, + * can be NULL for some object types */ + int (*remove_attr)(void *, struct attr *attr); /**< Function to remove an attribute, + * set to `navit_object_remove_attr` for default behavior, + * can be NULL for some object types */ + int (*init)(void *); /**< TODO, + * can be NULL for some object types */ + void (*destroy)(void *); /**< Function to destroy an object instance, + * set to `navit_object_destroy` for default behavior, + * can be NULL */ + void *(*dup)(void *); /**< Function to create a copy of an object instance */ + void *(*ref)(void *); /**< Function to increase the reference count for an + * object instance, set to `navit_object_ref` for + * default behavior, can be NULL for some object types */ + void *(*unref)(void *); /**< Function to decrease the reference count for an + * object instance, set to `navit_object_unref` for + * default behavior, can be NULL for some object types */ }; extern struct object_func map_func, mapset_func, navit_func, osd_func, tracking_func, vehicle_func, maps_func, layout_func, roadprofile_func, vehicleprofile_func, layer_func, config_func, profile_option_func, script_func, log_func, speech_func, navigation_func, route_func; -- cgit v1.2.1 From a353f7c4d588603c628b35797e9413da87ddee9c Mon Sep 17 00:00:00 2001 From: youte62 Date: Mon, 27 Nov 2017 06:01:11 +0100 Subject: add:icon:concert (#342) add:icon:concert --- navit/icons/concert.svg | 79 +++++++++++++++++++------------------------------ 1 file changed, 31 insertions(+), 48 deletions(-) diff --git a/navit/icons/concert.svg b/navit/icons/concert.svg index d226e4c2d..c908b056f 100644 --- a/navit/icons/concert.svg +++ b/navit/icons/concert.svg @@ -9,14 +9,17 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - height="22" + height="200" id="svg2" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:version="0.92.2 (5c3e80d, 2017-08-06)" sodipodi:docname="concert.svg" sodipodi:version="0.32" version="1.0" - width="22"> + width="200" + inkscape:export-filename="C:\Users\jeremy\Pictures\svg\concert.png" + inkscape:export-xdpi="96" + inkscape:export-ydpi="96"> + transform="matrix(0.34431731,0,0,0.34431731,-0.1767767,0.6565548)"> + transform="matrix(0.04083073,0,0,0.04083073,35.725326,178.44255)"> + transform="matrix(0.04083073,0,0,0.04083073,35.725326,178.44255)"> - - - + cx="54.465088" + cy="171.69257" + r="25.818937" /> + cx="140.43051" + cy="128.74763" + r="25.818937" /> + width="21.705309" + height="113.89934" + x="58.578712" + y="55.204674" /> + width="21.705309" + height="113.89934" + x="144.54413" + y="13.819176" /> -- cgit v1.2.1 From b98cd3b04199a7a166777ca100b114ce0fb21698 Mon Sep 17 00:00:00 2001 From: jkoan Date: Mon, 27 Nov 2017 06:58:58 +0100 Subject: Add some Documentation to Plugins (#375) --- navit/Doxyfile | 4 ++-- navit/plugin.c | 9 ++++++++- navit/vehicle.c | 3 +++ navit/vehicle/android/vehicle_android.c | 17 ++++++++++++----- navit/vehicle/demo/vehicle_demo.c | 12 +++++++++++- navit/vehicle/file/vehicle_file.c | 10 +++++++++- navit/vehicle/gpsd/vehicle_gpsd.c | 10 +++++++++- navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c | 10 +++++++++- navit/vehicle/gypsy/vehicle_gypsy.c | 16 +++++++++++----- navit/vehicle/iphone/vehicle_iphone.c | 10 +++++++++- navit/vehicle/maemo/vehicle_maemo.c | 23 ++++++++++++++--------- navit/vehicle/null/vehicle_null.c | 10 +++++++++- navit/vehicle/qt5/vehicle_qt5.cpp | 12 ++++++++++-- navit/vehicle/webos/vehicle_webos.c | 10 +++++++++- navit/vehicle/wince/vehicle_wince.c | 10 +++++++++- 15 files changed, 134 insertions(+), 32 deletions(-) diff --git a/navit/Doxyfile b/navit/Doxyfile index 0960da8b9..6b3bc777a 100644 --- a/navit/Doxyfile +++ b/navit/Doxyfile @@ -809,7 +809,7 @@ EXCLUDE_SYMLINKS = NO # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = */support/* # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the @@ -1504,7 +1504,7 @@ MATHJAX_CODEFILE = # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. -SEARCHENGINE = NO +SEARCHENGINE = YES # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a web server instead of a web client using Javascript. There diff --git a/navit/plugin.c b/navit/plugin.c index 8c61bc9b7..aae09c470 100644 --- a/navit/plugin.c +++ b/navit/plugin.c @@ -1,4 +1,4 @@ -/** +/* * Navit, a modular navigation system. * Copyright (C) 2005-2008 Navit Team * @@ -38,6 +38,13 @@ #include "item.h" #include "debug.h" +/** + * @defgroup plugins + * @brief A interface to handle all plugins inside navit + * + * @{ + */ + #ifdef USE_PLUGINS #ifndef HAVE_GMODULE typedef void * GModule; diff --git a/navit/vehicle.c b/navit/vehicle.c index 33cecb0e9..26dc457cb 100644 --- a/navit/vehicle.c +++ b/navit/vehicle.c @@ -18,6 +18,8 @@ */ /** @file vehicle.c + * @defgroup vehicle-plugins vehicle plugins + * @ingroup plugins * @brief Generic components of the vehicle object. * * This file implements the generic vehicle interface, i.e. everything which is @@ -52,6 +54,7 @@ #include "vehicle.h" #include "navit_nls.h" + struct vehicle { NAVIT_OBJECT struct vehicle_methods meth; diff --git a/navit/vehicle/android/vehicle_android.c b/navit/vehicle/android/vehicle_android.c index 89882d048..4165b9b31 100644 --- a/navit/vehicle/android/vehicle_android.c +++ b/navit/vehicle/android/vehicle_android.c @@ -1,6 +1,4 @@ -/** @file vehicle_android.c - * @brief android uses dbus signals - * +/* * Navit, a modular navigation system. * Copyright (C) 2005-2008 Navit Team * @@ -18,8 +16,6 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * - * @Author Tim Niemeyer - * @date 2008-2009 */ #include @@ -35,6 +31,15 @@ #include "android.h" #include "vehicle.h" +/** + * @defgroup vehicle-android Vehicle Android + * @ingroup vehicle-plugins + * @brief The Vehicle to gain position data from android. Android uses dbus signals + * @author Tim Niemeyer + * @date 2008-2009 + * + */ + struct vehicle_priv { struct callback_list *cbl; struct coord_geo geo; /**< The last known position of the vehicle **/ @@ -294,3 +299,5 @@ plugin_init(void) dbg(lvl_debug, "enter\n"); plugin_register_category_vehicle("android", vehicle_android_new_android); } + +/** @} */ diff --git a/navit/vehicle/demo/vehicle_demo.c b/navit/vehicle/demo/vehicle_demo.c index 4a47c1476..1e2991300 100644 --- a/navit/vehicle/demo/vehicle_demo.c +++ b/navit/vehicle/demo/vehicle_demo.c @@ -1,4 +1,4 @@ -/** +/* * Navit, a modular navigation system. * Copyright (C) 2005-2008 Navit Team * @@ -34,6 +34,13 @@ #include "event.h" #include "util.h" +/** + * @defgroup vehicle-demo Vehicle Demo + * @ingroup vehicle-plugins + * @brief The Vehicle for a demo. It followes the route automatically + * + */ + struct vehicle_priv { int interval; int position_set; @@ -302,3 +309,6 @@ plugin_init(void) dbg(lvl_debug, "enter\n"); plugin_register_category_vehicle("demo", vehicle_demo_new); } + + +/** @} */ diff --git a/navit/vehicle/file/vehicle_file.c b/navit/vehicle/file/vehicle_file.c index affa05d24..81b99f829 100644 --- a/navit/vehicle/file/vehicle_file.c +++ b/navit/vehicle/file/vehicle_file.c @@ -1,4 +1,4 @@ -/** +/* * Navit, a modular navigation system. * Copyright (C) 2005-2008 Navit Team * @@ -59,6 +59,14 @@ int inet_aton(const char *cp, struct in_addr *inp) } #endif +/** + * @defgroup vehicle-file Vehicle File + * @ingroup vehicle-plugins + * @brief The Vehicle to gain position data from a file, pipe, serial interface or a socket + * + * @{ + */ + static void vehicle_file_disable_watch(struct vehicle_priv *priv); static void vehicle_file_enable_watch(struct vehicle_priv *priv); static int vehicle_file_parse(struct vehicle_priv *priv, char *buffer); diff --git a/navit/vehicle/gpsd/vehicle_gpsd.c b/navit/vehicle/gpsd/vehicle_gpsd.c index 27025c0a6..975d9c68a 100644 --- a/navit/vehicle/gpsd/vehicle_gpsd.c +++ b/navit/vehicle/gpsd/vehicle_gpsd.c @@ -1,4 +1,4 @@ -/** +/* * Navit, a modular navigation system. * Copyright (C) 2005-2008 Navit Team * @@ -35,6 +35,14 @@ #include "event.h" #include "types.h" +/** + * @defgroup vehicle-gpsd Vehicle Gpsd + * @ingroup vehicle-plugins + * @brief The Vehicle to gain position data from the gpsd service + * + * @{ + */ + static struct vehicle_priv { char *source; char *gpsd_query; diff --git a/navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c b/navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c index fa5eb8780..ebdf08707 100644 --- a/navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c +++ b/navit/vehicle/gpsd_dbus/vehicle_gpsd_dbus.c @@ -1,4 +1,4 @@ -/** +/* * Navit, a modular navigation system. * Copyright (C) 2005-2008 Navit Team * @@ -34,6 +34,14 @@ #include "vehicle.h" #include "event.h" +/** + * @defgroup vehicle-gpsd-dbus Vehicle Gpsd DBus + * @ingroup vehicle-plugins + * @brief The Vehicle to gain position data from Gpsd over DBus + * + * @{ + */ + static char *vehicle_gpsd_dbus_prefix="gpsd_dbus:"; struct vehicle_priv { diff --git a/navit/vehicle/gypsy/vehicle_gypsy.c b/navit/vehicle/gypsy/vehicle_gypsy.c index 589e53a3f..16175f2e8 100644 --- a/navit/vehicle/gypsy/vehicle_gypsy.c +++ b/navit/vehicle/gypsy/vehicle_gypsy.c @@ -1,6 +1,4 @@ -/** @file vehicle_gypsy.c - * @brief gypsy uses dbus signals - * +/* * Navit, a modular navigation system. * Copyright (C) 2005-2008 Navit Team * @@ -18,8 +16,6 @@ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * - * @Author Tim Niemeyer - * @date 2008-2009 */ #include @@ -47,6 +43,16 @@ #include "item.h" #include "vehicle.h" +/** + * @defgroup vehicle-gypsy Vehicle gypsy + * @ingroup vehicle-plugins + * @brief The Vehicle to gain position data from gypsy. gypsy uses dbus signals + * @Author Tim Niemeyer + * @date 2008-2009 + * + * @{ + */ + static struct vehicle_priv { char *source; GypsyControl *control; diff --git a/navit/vehicle/iphone/vehicle_iphone.c b/navit/vehicle/iphone/vehicle_iphone.c index 94fec114a..f8ce5b644 100644 --- a/navit/vehicle/iphone/vehicle_iphone.c +++ b/navit/vehicle/iphone/vehicle_iphone.c @@ -1,4 +1,4 @@ -/** +/* * Navit, a modular navigation system. * Copyright (C) 2005-2008 Navit Team * @@ -33,6 +33,14 @@ #include "event.h" #include "corelocation.h" +/** + * @defgroup vehicle-iphone Vehicle iPhone + * @ingroup vehicle-plugins + * @brief The Vehicle to gain position data from iPhone. + * + * @{ + */ + struct vehicle_priv { int interval; int position_set; diff --git a/navit/vehicle/maemo/vehicle_maemo.c b/navit/vehicle/maemo/vehicle_maemo.c index d686a6a03..015f1c8e3 100644 --- a/navit/vehicle/maemo/vehicle_maemo.c +++ b/navit/vehicle/maemo/vehicle_maemo.c @@ -1,4 +1,4 @@ -/** +/* * Navit, a modular navigation system. * Copyright (C) 2005-2008 Navit Team * @@ -18,14 +18,6 @@ */ -/* - Plugin for new Maemo's liblocation API. - - - source cound be on of "any","cwp","acwp","gnss","agnss" - retry_interval could be one of "1","2","5","10","20","30","60","120" measured in seconds -*/ - #include #include #include @@ -40,6 +32,19 @@ #include "vehicle.h" #include "event.h" +/** + * @defgroup vehicle-iphone Vehicle Maemo + * @ingroup vehicle-plugins + * @brief The Vehicle to gain position data from Maemo. + * + * Plugin for new Maemo's liblocation API. + * + * source cound be on of "any","cwp","acwp","gnss","agnss" + * retry_interval could be one of "1","2","5","10","20","30","60","120" measured in seconds + * + * @{ + */ + static struct vehicle_priv { LocationGPSDControl *control; LocationGPSDevice *device; diff --git a/navit/vehicle/null/vehicle_null.c b/navit/vehicle/null/vehicle_null.c index 643945c71..6b723f9ff 100644 --- a/navit/vehicle/null/vehicle_null.c +++ b/navit/vehicle/null/vehicle_null.c @@ -1,4 +1,4 @@ -/** @file vehicle_null.c +/* * @brief null uses dbus signals * * Navit, a modular navigation system. @@ -34,6 +34,14 @@ #include "item.h" #include "vehicle.h" +/** + * @defgroup vehicle-null Vehicle Null + * @ingroup vehicle-plugins + * @brief A dummy Vehicle to have a null movement. + * + * @{ + */ + struct vehicle_priv { struct callback_list *cbl; struct coord_geo geo; diff --git a/navit/vehicle/qt5/vehicle_qt5.cpp b/navit/vehicle/qt5/vehicle_qt5.cpp index 2a2b6f5cf..fc8a6635a 100644 --- a/navit/vehicle/qt5/vehicle_qt5.cpp +++ b/navit/vehicle/qt5/vehicle_qt5.cpp @@ -1,5 +1,4 @@ -/** @file vehicle_null.c - * @brief null uses dbus signals +/* * * Navit, a modular navigation system. * Copyright (C) 2005-2017 Navit Team @@ -41,6 +40,15 @@ extern "C" { #include "vehicle_qt5.h" #include "vehicle_qt5.moc" #include + +/** + * @defgroup vehicle-qt5 Vehicle QT5 + * @ingroup vehicle-plugins + * @brief The Vehicle to gain position data from qt5 + * + * @{ + */ + QNavitGeoReceiver::QNavitGeoReceiver(QObject* parent, struct vehicle_priv* c) : QObject(parent) { diff --git a/navit/vehicle/webos/vehicle_webos.c b/navit/vehicle/webos/vehicle_webos.c index a5bba4bce..c4bdcbaf2 100644 --- a/navit/vehicle/webos/vehicle_webos.c +++ b/navit/vehicle/webos/vehicle_webos.c @@ -1,4 +1,4 @@ -/** +/* * vim: sw=3 ts=3 * * Navit, a modular navigation system. @@ -37,6 +37,14 @@ #include "vehicle_webos.h" #include "bluetooth.h" +/** + * @defgroup vehicle-webos Vehicle WebOS + * @ingroup vehicle-plugins + * @brief The Vehicle to gain position data from WebOS + * + * @{ + */ + static char *vehicle_webos_prefix="webos:"; /*******************************************************************/ diff --git a/navit/vehicle/wince/vehicle_wince.c b/navit/vehicle/wince/vehicle_wince.c index aee3394b2..49f90b1f5 100644 --- a/navit/vehicle/wince/vehicle_wince.c +++ b/navit/vehicle/wince/vehicle_wince.c @@ -1,4 +1,4 @@ -/** +/* * Navit, a modular navigation system. * Copyright (C) 2005-2008 Navit Team * @@ -44,6 +44,14 @@ #include #include "support/win32/ConvertUTF.h" +/** + * @defgroup vehicle-wince Vehicle WinCE + * @ingroup vehicle-plugins + * @brief The Vehicle to gain position data from WinCE + * + * @{ + */ + #define SwitchToThread() Sleep(0) typedef int (WINAPI *PFN_BthSetMode)(DWORD pBthMode); -- cgit v1.2.1 From 683426ad2722099881518ddfc4c2bac52a196527 Mon Sep 17 00:00:00 2001 From: youte62 Date: Mon, 27 Nov 2017 07:18:58 +0100 Subject: add:icon:communication (#343) --- navit/icons/communication.svg | 59 +++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/navit/icons/communication.svg b/navit/icons/communication.svg index bad45d89a..35596b3c7 100644 --- a/navit/icons/communication.svg +++ b/navit/icons/communication.svg @@ -9,14 +9,17 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - height="22" + height="200" id="svg2" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:version="0.92.2 (5c3e80d, 2017-08-06)" sodipodi:docname="communication.svg" sodipodi:version="0.32" version="1.0" - width="22"> + width="200" + inkscape:export-filename="C:\Users\jeremy\Pictures\svg\communication.png" + inkscape:export-xdpi="96" + inkscape:export-ydpi="96"> + transform="matrix(0.34431731,0,0,0.34431731,-0.1767767,0.6565548)"> + transform="matrix(0.04083073,0,0,0.04083073,35.725326,178.44255)"> + transform="matrix(0.04083073,0,0,0.04083073,35.725326,178.44255)"> + cx="70.480728" + cy="55.175976" + r="23.618807" /> + cx="116.1574" + cy="28.675596" + r="2.2773874" /> + cx="134.79134" + cy="28.675596" + r="2.2773874" /> + cx="153.09462" + cy="28.675596" + r="2.2773874" /> -- cgit v1.2.1