From cb5d3b5d00fb0369fb5be017eb16fe6f0b35c7a1 Mon Sep 17 00:00:00 2001 From: jomui Date: Wed, 8 Feb 2017 10:05:41 +0900 Subject: [PATCH] fix call EXPOST_API of HERE when loaded HERE plugin first Signed-off-by: jomui Change-Id: Ieedc338ac268852830dfc5019ca904bb4e6040c5 --- maps-plugin-mapzen.changes | 5 +++++ packaging/maps-plugin-mapzen.spec | 2 +- src/mapzen_plugin.c | 16 +++++++++++++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/maps-plugin-mapzen.changes b/maps-plugin-mapzen.changes index 21b2937..f1989c3 100644 --- a/maps-plugin-mapzen.changes +++ b/maps-plugin-mapzen.changes @@ -1,3 +1,8 @@ +[Version] maps-plugin-mapzen_0.0.2 +[Date] 08 Feb 2017 +[Title] fix call EXPOST_API of other plugin +[Developer] Jongmun Woo + [Version] maps-plugin-mapzen_0.0.1 [Date] 27 May 2016 [Title] Initialize version diff --git a/packaging/maps-plugin-mapzen.spec b/packaging/maps-plugin-mapzen.spec index 42d27af..515694b 100644 --- a/packaging/maps-plugin-mapzen.spec +++ b/packaging/maps-plugin-mapzen.spec @@ -1,6 +1,6 @@ Name: maps-plugin-mapzen Summary: Tizen Mapzen Maps Plug-in Library -Version: 0.0.1 +Version: 0.0.2 Release: 1 Group: Location/Libraries License: Apache-2.0 diff --git a/src/mapzen_plugin.c b/src/mapzen_plugin.c index 5aaaf8d..24f0698 100644 --- a/src/mapzen_plugin.c +++ b/src/mapzen_plugin.c @@ -133,6 +133,7 @@ EXPORT_API int maps_plugin_capture_snapshot(maps_view_h view, void **data, int * EXPORT_API int maps_plugin_init_module(maps_plugin_h *plugin, const char* module) { + MAPS_LOGD("maps_plugin_init_module"); if (!plugin) return MAPS_ERROR_INVALID_PARAMETER; @@ -150,7 +151,20 @@ EXPORT_API int maps_plugin_init_module(maps_plugin_h *plugin, const char* module EXPORT_API int maps_plugin_init(maps_plugin_h *plugin) { - return maps_plugin_init_module(plugin, NULL); + MAPS_LOGD("maps_plugin_init"); + if (!plugin) + return MAPS_ERROR_INVALID_PARAMETER; + + int ret = MAPS_ERROR_NONE; + if (!__plugin) + ret = mapzen_init(); + + if (ret == MAPS_ERROR_NONE) { + __maps_service_instance_count++; + __plugin = plugin; + } + + return convert_mapzen_error_to_maps_error(ret); } EXPORT_API int maps_plugin_shutdown(maps_plugin_h plugin) -- 2.7.4