[kdbus] Import gio/gkdbus* files from previous patchset.
[platform/upstream/glib.git] / gio / gkdbusconnection.h
1 /*  GIO - GLib Input, Output and Streaming Library
2  *
3  * Copyright (C) 2013 Samsung Electronics
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General
16  * Public License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18  * Boston, MA 02111-1307, USA.
19  *
20  * Author: Michal Eljasiewicz   <m.eljasiewic@samsung.com>
21  * Author: Lukasz Skalski       <l.skalski@samsung.com>
22  */
23
24 #ifndef __G_KDBUS_CONNECTION_H__
25 #define __G_KDBUS_CONNECTION_H__
26
27 #if !defined (GIO_COMPILATION)
28 #error "gkdbusconnection.h is a private header file."
29 #endif
30
31 #include <glib-object.h>
32 #include <gio/gkdbus.h>
33 #include <gio/giostream.h>
34
35 G_BEGIN_DECLS
36
37 #define G_TYPE_KDBUS_CONNECTION              (_g_kdbus_connection_get_type ())
38 #define G_KDBUS_CONNECTION(o)                (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_KDBUS_CONNECTION, GKdbusConnection))
39 #define G_KDBUS_CONNECTION_CLASS(k)          (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_KDBUS_CONNECTION, GKdbusConnectionClass))
40 #define G_KDBUS_CONNECTION_GET_CLASS(o)      (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_KDBUS_CONNECTION, GKdbusConnectionClass))
41 #define G_IS_KDBUS_CONNECTION(o)             (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_KDBUS_CONNECTION))
42 #define G_IS_KDBUS_CONNECTION_CLASS(k)       (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_KDBUS_CONNECTION))
43
44 typedef struct _GKdbusConnection              GKdbusConnection;
45 typedef struct _GKdbusConnectionClass         GKdbusConnectionClass;
46 typedef struct _GKdbusConnectionPrivate       GKdbusConnectionPrivate;
47
48 struct _GKdbusConnectionClass
49 {
50   GIOStreamClass parent_class;
51 };
52
53 struct _GKdbusConnection
54 {
55   GIOStream parent_instance;
56   GKdbusConnectionPrivate *priv;
57 };
58
59
60 GType              _g_kdbus_connection_get_type                  (void) G_GNUC_CONST;
61
62 GKdbusConnection * _g_kdbus_connection_new                       (void);
63
64 gboolean           _g_kdbus_connection_connect                   (GKdbusConnection  *connection,
65                                                                   const gchar       *address,
66                                                                   GCancellable      *cancellable,
67                                                                   GError           **error);
68
69 GKdbus *           _g_kdbus_connection_get_kdbus                 (GKdbusConnection  *connection);
70
71 G_END_DECLS
72
73 #endif /* __G_KDBUS_CONNECTION_H__ */