/* * Syncdaemon API * * Authors: Rodrigo Moya * * Copyright 2010 Canonical Ltd. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . * */ #include "utils.h" GHashTable * copy_str_str_hash_table (GHashTable *source) { GHashTableIter iter; gpointer key, value; GHashTable *target = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); g_hash_table_iter_init (&iter, source); while (g_hash_table_iter_next (&iter, &key, &value)) g_hash_table_insert (target, g_strdup (key), g_strdup (value)); return target; } void no_output_dbus_call_ended_cb (DBusGProxy *proxy, DBusGProxyCall *call_id, gpointer user_data) { GError *error = NULL; if (!dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) { g_warning ("Error ending DBus call: %s", error->message); g_error_free (error); } }