giomodule-priv.h \
gioscheduler.c \
giostream.c \
- gkdbus.c \
- gkdbusclient.c \
+ gkdbus.c \
gkdbusconnection.c \
gloadableicon.c \
gmount.c \
giomodule.h \
gioscheduler.h \
giostream.h \
- gkdbus.h \
- gkdbusclient.h \
+ gkdbus.h \
gkdbusconnection.h \
gloadableicon.h \
gmount.h \
#include "gioenumtypes.h"
#include "gnetworkaddress.h"
#include "gsocketclient.h"
-#include "gkdbusclient.h"
-#include "giostream.h"
+#include "gkdbusconnection.h"
#include "gasyncresult.h"
#include "gsimpleasyncresult.h"
#include "glib-private.h"
if (g_strcmp0 (transport_name, "kdbus") == 0)
{
- GKdbusClient *client;
GKdbusConnection *connection;
const gchar *path;
path = g_hash_table_lookup (key_value_pairs, "path");
g_assert (ret == NULL);
- client = g_kdbus_client_new ();
- connection = g_kdbus_client_connect (client,
- path,
- cancellable,
- error);
+ connection = g_kdbus_connection_new ();
+ g_kdbus_connection_connect (connection,
+ path,
+ cancellable,
+ error);
g_object_unref (connectable);
- g_object_unref (client);
if (connection == NULL)
goto out;
+++ /dev/null
-/* GIO - GLib Input, Output and Streaming Library
- *
- * Copyright © 2013 Samsung
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors: Lukasz Skalski <l.skalski@partner.samsung.com>
- * Authors: Michal Eljasiewicz <m.eljasiewic@samsung.com>
- */
-
-#include "config.h"
-#include "gkdbusclient.h"
-#include <gio/gkdbusconnection.h>
-
-G_DEFINE_TYPE (GKdbusClient, g_kdbus_client, G_TYPE_OBJECT);
-
-struct _GKdbusClientPrivate
-{
- GHashTable *app_proxies;
-};
-
-
-// TODO
-static void
-g_kdbus_client_init (GKdbusClient *client)
-{
- client->priv = G_TYPE_INSTANCE_GET_PRIVATE (client,
- G_TYPE_KDBUS_CLIENT,
- GKdbusClientPrivate);
- client->priv->app_proxies = g_hash_table_new_full (g_str_hash,
- g_str_equal,
- g_free,
- NULL);
-}
-
-// TODO
-GKdbusClient *
-g_kdbus_client_new (void)
-{
- return g_object_new (G_TYPE_KDBUS_CLIENT, NULL);
-}
-
-// TODO
-static void
-g_kdbus_client_finalize (GObject *object)
-{
- GKdbusClient *client = G_KDBUS_CLIENT (object);
-
- g_hash_table_unref (client->priv->app_proxies);
-}
-
-// TODO
-static void
-g_kdbus_client_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- //GKdbusClient *client = G_KDBUS_CLIENT (object);
-
- switch (prop_id)
- {
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- }
-}
-
-// TODO
-static void
-g_kdbus_client_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- //GKdbusClient *client = G_KDBUS_CLIENT (object);
-
- switch (prop_id)
- {
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- }
-}
-
-// TODO
-static void
-g_kdbus_client_class_init (GKdbusClientClass *class)
-{
- GObjectClass *gobject_class = G_OBJECT_CLASS (class);
-
- g_type_class_add_private (class, sizeof (GKdbusClientPrivate));
-
- gobject_class->finalize = g_kdbus_client_finalize;
- gobject_class->set_property = g_kdbus_client_set_property;
- gobject_class->get_property = g_kdbus_client_get_property;
-}
-
-// TODO
-GKdbusConnection *
-g_kdbus_client_connect (GKdbusClient *client,
- const gchar *address,
- GCancellable *cancellable,
- GError **error)
-{
- GIOStream *connection = NULL;
- GError *last_error;
- last_error = NULL;
-
- while (connection == NULL)
- {
-
- if (g_cancellable_is_cancelled (cancellable))
- {
- g_clear_error (error);
- g_cancellable_set_error_if_cancelled (cancellable, error);
- break;
- }
-
- connection = g_object_new(G_TYPE_KDBUS_CONNECTION,NULL);
- if (g_kdbus_connection_connect (G_KDBUS_CONNECTION (connection),
- address, cancellable, &last_error))
- {
- //g_print("It works :)\n");
- }
- else
- {
- g_object_unref (connection);
- connection = NULL;
- }
- }
- return G_KDBUS_CONNECTION (connection);
-}
-
+++ /dev/null
-/* GIO - GLib Input, Output and Streaming Library
- *
- * Copyright © 2013 Samsung
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors: Lukasz Skalski <l.skalski@partner.samsung.com>
- * Authors: Michal Eljasiewicz <m.eljasiewic@samsung.com>
- */
-
-#ifndef __G_KDBUS_CLIENT_H__
-#define __G_KDBUS_CLIENT_H__
-
-#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
-#error "Only <gio/gio.h> can be included directly."
-#endif
-
-#include <glib-object.h>
-#include <gio/giotypes.h>
-
-G_BEGIN_DECLS
-
-#define G_TYPE_KDBUS_CLIENT (g_kdbus_client_get_type ())
-#define G_KDBUS_CLIENT(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
- G_TYPE_KDBUS_CLIENT, GKdbusClient))
-#define G_KDBUS_CLIENT_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
- G_TYPE_KDBUS_CLIENT, GKdbusClientClass))
-#define G_IS_KDBUS_CLIENT(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
- G_TYPE_KDBUS_CLIENT))
-#define G_IS_KDBUS_CLIENT_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
- G_TYPE_KDBUS_CLIENT))
-#define G_KDBUS_CLIENT_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
- G_TYPE_KDBUS_CLIENT, GKdbusClientClass))
-
-typedef struct _GKdbusClientPrivate GKdbusClientPrivate;
-typedef struct _GKdbusClientClass GKdbusClientClass;
-
-struct _GKdbusClientClass
-{
- GObjectClass parent_class;
-
- /* Padding for future expansion */
- void (*_g_reserved1) (void);
- void (*_g_reserved2) (void);
- void (*_g_reserved3) (void);
- void (*_g_reserved4) (void);
-};
-
-struct _GKdbusClient
-{
- GObject parent_instance;
- GKdbusClientPrivate *priv;
-};
-
-GLIB_AVAILABLE_IN_ALL
-GType g_kdbus_client_get_type (void) G_GNUC_CONST;
-
-GLIB_AVAILABLE_IN_ALL
-GKdbusClient *g_kdbus_client_new (void);
-
-
-GLIB_AVAILABLE_IN_ALL
-GKdbusConnection * g_kdbus_client_connect (GKdbusClient *client,
- const gchar *address,
- GCancellable *cancellable,
- GError **error);
-
-G_END_DECLS
-
-#endif /* __G_KDBUS_CLIENT_H___ */
};
// TODO
+GKdbusConnection *
+g_kdbus_connection_new (void)
+{
+ return g_object_new(G_TYPE_KDBUS_CONNECTION,NULL);
+}
+
+// TODO
gboolean
g_kdbus_connection_connect (GKdbusConnection *connection,
const gchar *address,
static void
g_kdbus_connection_init (GKdbusConnection *connection)
{
- //connection->kdbus = g_object_new(G_TYPE_KDBUS,NULL);
connection->priv = G_TYPE_INSTANCE_GET_PRIVATE (connection,
G_TYPE_KDBUS_CONNECTION,
GKdbusConnectionPrivate);
GLIB_AVAILABLE_IN_ALL
GType g_kdbus_connection_get_type (void) G_GNUC_CONST;
GLIB_AVAILABLE_IN_ALL
+GKdbusConnection *g_kdbus_connection_new (void);
+GLIB_AVAILABLE_IN_ALL
gboolean g_kdbus_connection_is_connected (GKdbusConnection *connection);
GLIB_AVAILABLE_IN_ALL
gboolean g_kdbus_connection_connect (GKdbusConnection *connection,