From 930953873b6e9cd31fbb47c20ff28de85efdbecf Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Sun, 19 Dec 2010 23:23:54 +0100 Subject: Dump generated device_info for debugging --- src/device.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) 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); -- cgit v1.1-32-gdbae