summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-12-19 23:23:54 +0100
committerGravatar Martin Szulecki2012-03-18 18:56:09 +0100
commit8fa75bcbc5a35e60c1a4af2ead6a25755801cdd0 (patch)
treeaee0cbc973f127b605fe1770df69caf545eb952a
parent60008d3cc6e3c19298a43bc89125efc7f11959a0 (diff)
downloadsbmanager-8fa75bcbc5a35e60c1a4af2ead6a25755801cdd0.tar.gz
sbmanager-8fa75bcbc5a35e60c1a4af2ead6a25755801cdd0.tar.bz2
Dump generated device_info for debugging
-rw-r--r--src/device.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index 2b847a4..3ae3903 100644
--- a/src/device.c
+++ b/src/device.c
@@ -335,6 +335,30 @@ gboolean device_poll_battery_capacity(const char *uuid, device_info_t *device_in
return res;
}
+static void device_dump_info(device_info_t info) {
+ printf("%s: Device Information\n", __func__);
+
+ printf("%s: UUID: %s\n", __func__, info->uuid);
+ printf("%s: Name: %s\n", __func__, info->device_name);
+ printf("%s: Type: %s\n", __func__, info->device_type);
+
+ printf("%s: Battery\n", __func__);
+ printf("%s: PollInterval: %d\n", __func__, info->battery_poll_interval);
+ printf("%s: CurrentCapacity: %d\n", __func__, info->battery_capacity);
+
+ printf("%s: HomeScreen Settings\n", __func__);
+
+ printf("%s: IconColumns: %d\n", __func__, info->home_screen_icon_columns);
+ printf("%s: IconRows: %d\n", __func__, info->home_screen_icon_rows);
+ printf("%s: IconDockMaxCount: %d\n", __func__, info->home_screen_icon_dock_max_count);
+ printf("%s: IconWidth: %d\n", __func__, info->home_screen_icon_width);
+ printf("%s: IconHeight: %d\n", __func__, info->home_screen_icon_height);
+
+ printf("%s: IconFolder Settings\n", __func__);
+ printf("%s: IconWidth: %d\n", __func__, info->home_screen_icon_width);
+ printf("%s: IconHeight: %d\n", __func__, info->home_screen_icon_height);
+}
+
gboolean device_get_info(const char *uuid, device_info_t *device_info, GError **error)
{
uint8_t boolean = FALSE;
@@ -461,6 +485,8 @@ gboolean device_get_info(const char *uuid, device_info_t *device_info, GError **
res = TRUE;
+ device_dump_info((*device_info));
+
leave_cleanup:
if (client) {
lockdownd_client_free(client);