static void aur_client_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { AurClient *client = (AurClient *) (object); switch (prop_id) { case PROP_SERVER_HOST:{ if (client->server_host) g_free (client->server_host); client->server_host = g_value_dup_string (value); if (client->server_host) split_server_host (client); break; } case PROP_FLAGS:{ client->flags = g_value_get_uint (value); break; } case PROP_ASYNC_MAIN_CONTEXT:{ if (client->context) g_main_context_unref (client->context); client->context = (GMainContext *) (g_value_dup_boxed (value)); break; } default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void snra_client_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { SnraClient *client = (SnraClient *) (object); switch (prop_id) { case PROP_SERVER_HOST: if (client->server_host) g_free (client->server_host); client->server_host = g_value_dup_string (value); if (client->server_host) split_server_host (client); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }