* limitations under the License.
*/
+#include <app.h>
#include <stdio.h>
#include "heremaps-uc-dbus.h"
g_error_free(error);
error = NULL;
}
- return HEREMAPS_UC_DBUS_ERROR_CONNECTION;
- }
- MAPS_LOGD("handle->conn: %p", handle->conn);
- g_free(bus_addr);
-
- handle->service_name = g_strdup(UC_RECEIVER_NAME);
- handle->service_path = g_strdup(UC_RECEIVER_PATH);
- handle->signal_path = g_strdup_printf("%s/%s", handle->service_path, "SAMSUNG");
- MAPS_LOGD("Object Path [%s]", handle->signal_path);
-
- proxy = g_dbus_proxy_new_sync(handle->conn, G_DBUS_PROXY_FLAGS_NONE, NULL, handle->service_name, handle->signal_path, UC_INTERFACE_NAME, NULL, NULL);
- if (proxy) {
- MAPS_LOGD("proxy: %p", proxy);
- g_object_unref(proxy);
+ app_control_h app_control = NULL;
+ app_control_create(&app_control);
+ app_control_set_app_id(app_control, "org.tizen.heremaps-uc");
+ app_control_send_launch_request(app_control, NULL, NULL);
+ app_control_destroy(app_control);
} else {
- if (error) {
- MAPS_LOGD("Fail to get proxy Error[%s]", error->message);
- g_error_free(error);
+ MAPS_LOGD("handle->conn: %p", handle->conn);
+
+ handle->service_name = g_strdup(UC_RECEIVER_NAME);
+ handle->service_path = g_strdup(UC_RECEIVER_PATH);
+ handle->signal_path = g_strdup_printf("%s/%s", handle->service_path, "SAMSUNG");
+ MAPS_LOGD("Object Path [%s]", handle->signal_path);
+
+ proxy = g_dbus_proxy_new_sync(handle->conn, G_DBUS_PROXY_FLAGS_NONE, NULL, handle->service_name, handle->signal_path, UC_INTERFACE_NAME, NULL, NULL);
+ if (proxy) {
+ MAPS_LOGD("proxy: %p", proxy);
+ g_object_unref(proxy);
+ } else {
+ if (error) {
+ MAPS_LOGD("Fail to get proxy Error[%s]", error->message);
+ g_error_free(error);
+ }
}
+ MAPS_LOGD("g_dbus_proxy_new_sync is done");
}
- MAPS_LOGD("g_dbus_proxy_new_sync is done");
if (handle->conn) {
g_object_unref(handle->conn);
handle->conn = NULL;
MAPS_LOGD("g_object_unref : handle->conn");
}
+ g_free(bus_addr);
g_free(handle->service_path);
g_free(handle->service_name);
g_free(handle->signal_path);