summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjongmun.woo <jongmun.woo@samsung.com>2016-04-01 01:23:35 (GMT)
committerjongmun.woo <jongmun.woo@samsung.com>2016-04-01 04:54:14 (GMT)
commita5ed7546fb5b108b19232aaad05cfad283bf2ac0 (patch)
tree0310970b27074e3a51005ce09d37517a632ba325
parentc400ecaa1c99b657a3371a1e82cacd9e64e3128b (diff)
downloadgeofence-dbus-a5ed7546fb5b108b19232aaad05cfad283bf2ac0.zip
geofence-dbus-a5ed7546fb5b108b19232aaad05cfad283bf2ac0.tar.gz
geofence-dbus-a5ed7546fb5b108b19232aaad05cfad283bf2ac0.tar.bz2
Signed-off-by: jongmun.woo <jongmun.woo@samsung.com> Change-Id: Ia6a8a98a19e6cd14723a2aa3b31a71cb052cd576
-rw-r--r--geofence/include/geofence_client_priv.h8
-rw-r--r--geofence/src/geofence_client.c32
-rw-r--r--packaging/geofence-dbus.spec2
3 files changed, 18 insertions, 24 deletions
diff --git a/geofence/include/geofence_client_priv.h b/geofence/include/geofence_client_priv.h
index 9b6eb68..80ab766 100644
--- a/geofence/include/geofence_client_priv.h
+++ b/geofence/include/geofence_client_priv.h
@@ -28,10 +28,10 @@ __BEGIN_DECLS
#undef LOG_TAG
#define LOG_TAG "GEOFENCE_DBUS_CLIENT"
#endif
-#define GEOFENCE_CLIENT_LOGI(fmt, args...) { LOGI(fmt, ##args); }
-#define GEOFENCE_CLIENT_LOGD(fmt, args...) { LOGD(fmt, ##args); }
-#define GEOFENCE_CLIENT_LOGW(fmt, args...) { LOGW(fmt, ##args); }
-#define GEOFENCE_CLIENT_LOGE(fmt, args...) { LOGE(fmt, ##args); }
+#define GEOFENCE_CLIENT_LOGI(fmt, args...) LOGI(fmt, ##args)
+#define GEOFENCE_CLIENT_LOGD(fmt, args...) LOGD(fmt, ##args)
+#define GEOFENCE_CLIENT_LOGW(fmt, args...) LOGW(fmt, ##args)
+#define GEOFENCE_CLIENT_LOGE(fmt, args...) LOGE(fmt, ##args)
#define GEOFENCE_CLIENT_SECLOG(fmt, args...) SECURE_LOGW(fmt, ##args)
#else
#define GEOFENCE_CLIENT_LOGI(fmt, args...)
diff --git a/geofence/src/geofence_client.c b/geofence/src/geofence_client.c
index 319f75d..7b3e7db 100644
--- a/geofence/src/geofence_client.c
+++ b/geofence/src/geofence_client.c
@@ -312,9 +312,9 @@ EXPORT_API int geo_client_delete_place(geofence_client_dbus_h geofence_client, g
int ret = GEOFENCE_CLIENT_ERROR_NONE;
proxy = g_dbus_proxy_new_sync(handle->conn, G_DBUS_PROXY_FLAGS_NONE, NULL, handle->service_name, handle->signal_path, GEOFENCE_INTERFACE_NAME, NULL, &error);
- if (proxy) {
+ if (proxy)
g_dbus_proxy_call(proxy, "DeletePlace", g_variant_new("(is)", place_id, app_id), G_DBUS_CALL_FLAGS_NONE, -1, NULL, NULL, &error);
- } else {
+ else {
if (error) {
GEOFENCE_CLIENT_LOGE("Fail to get proxy Error[%s]", error->message);
g_error_free(error);
@@ -422,7 +422,6 @@ EXPORT_API int geo_client_start(geofence_client_dbus_h geofence_client, geofence
g_return_val_if_fail(geofence_client, GEOFENCE_CLIENT_ERROR_PARAMETER);
geofence_client_dbus_s *handle = (geofence_client_dbus_s *)geofence_client;
- gchar *signal_path = NULL;
handle->service_name = g_strdup(GEOFENCE_SERVICE_NAME);
handle->service_path = g_strdup(GEOFENCE_SERVICE_PATH);
@@ -434,37 +433,32 @@ EXPORT_API int geo_client_start(geofence_client_dbus_h geofence_client, geofence
handle->user_data = user_data;
handle->geofence_evt_id = g_dbus_connection_signal_subscribe(handle->conn, handle->service_name, GEOFENCE_INTERFACE_NAME, "GeofenceInout", handle->signal_path, NULL, G_DBUS_SIGNAL_FLAGS_NONE, __geofence_signal_callback, handle, NULL);
- if (handle->geofence_evt_id) {
+ if (handle->geofence_evt_id)
GEOFENCE_CLIENT_LOGD("Listening GeofenceInout");
- } else {
+ else
GEOFENCE_CLIENT_LOGD("Fail to listen GeofenceInout");
- }
handle->geofence_proximity_id = g_dbus_connection_signal_subscribe(handle->conn, handle->service_name, GEOFENCE_INTERFACE_NAME, "GeofenceProximity", handle->signal_path, NULL, G_DBUS_SIGNAL_FLAGS_NONE, __geofence_signal_callback, handle, NULL);
- if (handle->geofence_proximity_id) {
+ if (handle->geofence_proximity_id)
GEOFENCE_CLIENT_LOGD("Listening GeofenceProximity");
- } else {
+ else
GEOFENCE_CLIENT_LOGD("Fail to listen GeofenceProximity");
- }
handle->geofence_evt_status_id = g_dbus_connection_signal_subscribe(handle->conn, handle->service_name, GEOFENCE_INTERFACE_NAME, "GeofenceEvent", handle->signal_path, NULL, G_DBUS_SIGNAL_FLAGS_NONE, __geofence_signal_callback, handle, NULL);
- if (handle->geofence_evt_status_id) {
+ if (handle->geofence_evt_status_id)
GEOFENCE_CLIENT_LOGD("Listening Geofence event");
- } else {
+ else {
GEOFENCE_CLIENT_LOGD("Fail to listen Geofence event");
return GEOFENCE_CLIENT_ERROR_DBUS_CALL;
}
}
- g_free(signal_path);
-
#if SUPPORT_MULTI_CLIENT
GVariant *param = NULL;
GVariantBuilder *builder = NULL;
-
GEOFENCE_CLIENT_LOGD("START: CMD-START");
builder = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
g_variant_builder_add(builder, "{sv}", "CMD", g_variant_new_string("START"));
@@ -547,9 +541,9 @@ static int __geofence_client_create_connection(geofence_client_dbus_s *client)
GEOFENCE_CLIENT_LOGD("bus_addr: %s", bus_addr);
client->conn = g_dbus_connection_new_for_address_sync(bus_addr,
- G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT |
- G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION,
- NULL, NULL, &error);
+ G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT |
+ G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION,
+ NULL, NULL, &error);
g_free(bus_addr);
if (!client->conn) {
@@ -568,9 +562,9 @@ static int __geofence_client_create_connection(geofence_client_dbus_s *client)
static void __glib_log(const gchar *log_domain, GLogLevelFlags log_level, const gchar *msg, gpointer user_data)
{
geofence_client_dbus_s *client = (geofence_client_dbus_s *)user_data;
- if (client != NULL) {
+ if (client != NULL)
GEOFENCE_CLIENT_LOGD("client->conn: %p", client->conn);
- }
+
GEOFENCE_CLIENT_LOGE("GLIB[%d]: %s", log_level, msg);
}
diff --git a/packaging/geofence-dbus.spec b/packaging/geofence-dbus.spec
index fd1df4b..2b0179a 100644
--- a/packaging/geofence-dbus.spec
+++ b/packaging/geofence-dbus.spec
@@ -1,6 +1,6 @@
Name: geofence-dbus
Summary: Dbus interface for Geofence service
-Version: 0.3.2
+Version: 0.3.3
Release: 1
Group: Location/Libraries
License: Apache-2.0