Ejemplo n.º 1
0
static void mega_http_client_dispose(GObject *object)
{
  G_GNUC_UNUSED MegaHttpClient *http_client = MEGA_HTTP_CLIENT(object);

  // Free everything that may hold reference to MegaHttpClient

  G_OBJECT_CLASS(mega_http_client_parent_class)->dispose(object);
}
Ejemplo n.º 2
0
static void mega_http_client_get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
{
  MegaHttpClient *http_client = MEGA_HTTP_CLIENT(object);

  switch (property_id)
  {
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
  }
}
Ejemplo n.º 3
0
static void mega_http_client_finalize(GObject *object)
{
  MegaHttpClient *http_client = MEGA_HTTP_CLIENT(object);
  MegaHttpClientPrivate* priv = http_client->priv;
  
  goto_state(http_client, CONN_STATE_NONE, NULL, NULL);

  g_free(priv->host);
  g_free(priv->resource);
  g_hash_table_destroy(priv->request_headers);
  g_hash_table_destroy(priv->response_headers);
  g_object_unref(priv->client);
  g_regex_unref(priv->regex_url);
  g_regex_unref(priv->regex_status);

  G_OBJECT_CLASS(mega_http_client_parent_class)->finalize(object);
}