Name: capi-maps-service
Summary: Tizen Maps Service API
-Version: 0.5.1
+Version: 0.5.2
Release: 1
Group: Location/API
License: Apache-2.0
if (!__has_maps_service_privilege())
return MAPS_ERROR_PERMISSION_DENIED;
- maps_error_e error = MAPS_ERROR_NOT_SUPPORTED;
+ int error = MAPS_ERROR_NOT_SUPPORTED;
do {
/* 0. Find the plugin, requested by the user */
-
const plugin::provider_info info =
plugin::find_by_names(string(maps_provider));
}
/* 3. Initialize the requested plugin */
- maps_plugin_h plugin_h = plugin::binary_extractor().init(info);
+ int init_error = MAPS_ERROR_NONE; /* Storage for init error code */
+
+ maps_plugin_h plugin_h = plugin::binary_extractor().init(info, &init_error);
if (!plugin_h) {
- error = MAPS_ERROR_NOT_SUPPORTED;
+ error = init_error;
MAPS_LOGE("ERROR! Plugin init failed");
break;
}
/* 5. Set status of completely correct plugin initialization */
error = MAPS_ERROR_NONE;
-
- } while(false);
+ } while (false);
if (error != MAPS_ERROR_NONE)
maps_service_destroy(*maps);
if (file_name.empty())
return provider_info::empty_instance;
- /* 1.Init plugin */
+ /* 1.Initialize plugin */
GMod *plugin = gmod_new(file_name, FALSE);
if (!plugin)
return provider_info::empty_instance;
return info;
}
-maps_plugin_h plugin::binary_extractor::init(const provider_info &info)
+maps_plugin_h plugin::binary_extractor::init(const provider_info &info,
+ int *init_error)
{
- /* 1.Init plugin */
- if (info.file.empty())
+ /* 1.Initialize plugin */
+ if (info.file.empty() || !init_error)
return NULL;
+ *init_error = MAPS_ERROR_NONE;
+
GMod *plugin = gmod_new(info.file, TRUE);
if (!plugin) {
MAPS_LOGE("Open Module Failed: %s", info.file.c_str());
{
}
public:
- provider_info get_plugin_info(const string &file_name) const;
- maps_plugin_h init(const provider_info &info);
+ provider_info get_plugin_info(const string &file_name) const;
+ maps_plugin_h init(const provider_info &info, int *init_error);
void shutdown(maps_plugin_h plugin_h);
private:
GMod *gmod_new(const string &module_file,
volatile int session::command::command_request_id = 1;
session::command session::command::empty_instance;
-session::command::command(maps_service_h ms) : m(ms), my_req_id(0)
+session::command::command(maps_service_h ms)
+ : m(ms), my_req_id(0), error(MAPS_ERROR_NONE)
{
}
if (this != (&src)) {
m = src.m;
my_req_id = src.my_req_id;
+ error = src.error;
}
return *this;
}
maps_service_h m;
protected:
int my_req_id;
+ protected:
+ int error;
public:
static volatile int command_request_id;
public:
static command empty_instance;
private:
command()
+ : m(NULL), my_req_id(-1), error(0)
{
} /* Please, do not construct an empty object */
public: