aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-04-15 09:04:57 -0500
committerTed Gould <ted@canonical.com>2009-04-15 09:04:57 -0500
commitab032f25b52b507873dcaf7779013be048bb2a31 (patch)
tree3359aed04d2d2fc30bebe7a945efdcf13aed150e
parent0fd3f0a9812693dc73c67a5de6e4ce101f736acf (diff)
downloadlibdbusmenu-ab032f25b52b507873dcaf7779013be048bb2a31.tar.gz
libdbusmenu-ab032f25b52b507873dcaf7779013be048bb2a31.tar.bz2
libdbusmenu-ab032f25b52b507873dcaf7779013be048bb2a31.zip
Adding basic client and server objects.
-rw-r--r--.bzrignore2
-rw-r--r--libdbusmenu-glib/Makefile.am11
-rw-r--r--libdbusmenu-glib/client.c53
-rw-r--r--libdbusmenu-glib/client.h31
-rw-r--r--libdbusmenu-glib/server.c54
-rw-r--r--libdbusmenu-glib/server.h31
6 files changed, 180 insertions, 2 deletions
diff --git a/.bzrignore b/.bzrignore
index 1ecdd00..981c365 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -18,3 +18,5 @@ libdbusmenu-qt/libdbusmenu_qt_la-test.lo
libdbusmenu-glib/libdbusmenu_glib_la-menuitem.lo
dbusmenu-client.h
dbusmenu-server.h
+libdbusmenu_glib_la-client.lo
+libdbusmenu_glib_la-server.lo
diff --git a/libdbusmenu-glib/Makefile.am b/libdbusmenu-glib/Makefile.am
index 59a6e8c..e248403 100644
--- a/libdbusmenu-glib/Makefile.am
+++ b/libdbusmenu-glib/Makefile.am
@@ -9,12 +9,19 @@ lib_LTLIBRARIES = \
libdbusmenu_glibincludedir=$(includedir)/libdbusmenu-0.1/libdbusmenu-glib/
libdbusmenu_glibinclude_HEADERS = \
- menuitem.h
+ menuitem.h \
+ server.h \
+ client.h
libdbusmenu_glib_la_SOURCES = \
dbusmenu-server.h \
dbusmenu-client.h \
- menuitem.c
+ menuitem.h \
+ menuitem.c \
+ server.h \
+ server.c \
+ client.h \
+ client.c
libdbusmenu_glib_la_LDFLAGS = \
-version-info $(LIBDBUSMENU_CURRENT):$(LIBDBUSMENU_REVISION):$(LIBDBUSMENU_AGE) \
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
new file mode 100644
index 0000000..85b02c4
--- /dev/null
+++ b/libdbusmenu-glib/client.c
@@ -0,0 +1,53 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "client.h"
+
+typedef struct _DbusmenuClientPrivate DbusmenuClientPrivate;
+
+struct _DbusmenuClientPrivate
+{
+};
+
+#define DBUSMENU_CLIENT_GET_PRIVATE(o) \
+(G_TYPE_INSTANCE_GET_PRIVATE ((o), DBUSMENU_CLIENT_TYPE, DbusmenuClientPrivate))
+
+static void dbusmenu_client_class_init (DbusmenuClientClass *klass);
+static void dbusmenu_client_init (DbusmenuClient *self);
+static void dbusmenu_client_dispose (GObject *object);
+static void dbusmenu_client_finalize (GObject *object);
+
+G_DEFINE_TYPE (DbusmenuClient, dbusmenu_client, G_TYPE_OBJECT);
+
+static void
+dbusmenu_client_class_init (DbusmenuClientClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (DbusmenuClientPrivate));
+
+ object_class->dispose = dbusmenu_client_dispose;
+ object_class->finalize = dbusmenu_client_finalize;
+
+ return;
+}
+
+static void
+dbusmenu_client_init (DbusmenuClient *self)
+{
+}
+
+static void
+dbusmenu_client_dispose (GObject *object)
+{
+ G_OBJECT_CLASS (dbusmenu_client_parent_class)->dispose (object);
+ return;
+}
+
+static void
+dbusmenu_client_finalize (GObject *object)
+{
+ G_OBJECT_CLASS (dbusmenu_client_parent_class)->finalize (object);
+ return;
+}
diff --git a/libdbusmenu-glib/client.h b/libdbusmenu-glib/client.h
new file mode 100644
index 0000000..861e3b5
--- /dev/null
+++ b/libdbusmenu-glib/client.h
@@ -0,0 +1,31 @@
+#ifndef __DBUSMENU_CLIENT_H__
+#define __DBUSMENU_CLIENT_H__
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define DBUSMENU_CLIENT_TYPE (dbusmenu_client_get_type ())
+#define DBUSMENU_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DBUSMENU_CLIENT_TYPE, DbusmenuClient))
+#define DBUSMENU_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DBUSMENU_CLIENT_TYPE, DbusmenuClientClass))
+#define DBUSMENU_IS_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DBUSMENU_CLIENT_TYPE))
+#define DBUSMENU_IS_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUSMENU_CLIENT_TYPE))
+#define DBUSMENU_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUSMENU_CLIENT_TYPE, DbusmenuClientClass))
+
+typedef struct _DbusmenuClient DbusmenuClient;
+typedef struct _DbusmenuClientClass DbusmenuClientClass;
+
+struct _DbusmenuClientClass {
+ GObjectClass parent_class;
+};
+
+struct _DbusmenuClient {
+ GObject parent;
+};
+
+GType dbusmenu_client_get_type (void);
+
+G_END_DECLS
+
+#endif
diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c
new file mode 100644
index 0000000..6b3f751
--- /dev/null
+++ b/libdbusmenu-glib/server.c
@@ -0,0 +1,54 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "server.h"
+
+typedef struct _DbusmenuServerPrivate DbusmenuServerPrivate;
+
+struct _DbusmenuServerPrivate
+{
+};
+
+#define DBUSMENU_SERVER_GET_PRIVATE(o) \
+(G_TYPE_INSTANCE_GET_PRIVATE ((o), DBUSMENU_SERVER_TYPE, DbusmenuServerPrivate))
+
+static void dbusmenu_server_class_init (DbusmenuServerClass *klass);
+static void dbusmenu_server_init (DbusmenuServer *self);
+static void dbusmenu_server_dispose (GObject *object);
+static void dbusmenu_server_finalize (GObject *object);
+
+G_DEFINE_TYPE (DbusmenuServer, dbusmenu_server, G_TYPE_OBJECT);
+
+static void
+dbusmenu_server_class_init (DbusmenuServerClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (DbusmenuServerPrivate));
+
+ object_class->dispose = dbusmenu_server_dispose;
+ object_class->finalize = dbusmenu_server_finalize;
+
+ return;
+}
+
+static void
+dbusmenu_server_init (DbusmenuServer *self)
+{
+ return;
+}
+
+static void
+dbusmenu_server_dispose (GObject *object)
+{
+ G_OBJECT_CLASS (dbusmenu_server_parent_class)->dispose (object);
+ return;
+}
+
+static void
+dbusmenu_server_finalize (GObject *object)
+{
+ G_OBJECT_CLASS (dbusmenu_server_parent_class)->finalize (object);
+ return;
+}
diff --git a/libdbusmenu-glib/server.h b/libdbusmenu-glib/server.h
new file mode 100644
index 0000000..b47a5e9
--- /dev/null
+++ b/libdbusmenu-glib/server.h
@@ -0,0 +1,31 @@
+#ifndef __DBUSMENU_SERVER_H__
+#define __DBUSMENU_SERVER_H__
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define DBUSMENU_SERVER_TYPE (dbusmenu_server_get_type ())
+#define DBUSMENU_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DBUSMENU_SERVER_TYPE, DbusmenuServer))
+#define DBUSMENU_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DBUSMENU_SERVER_TYPE, DbusmenuServerClass))
+#define DBUSMENU_IS_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DBUSMENU_SERVER_TYPE))
+#define DBUSMENU_IS_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUSMENU_SERVER_TYPE))
+#define DBUSMENU_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUSMENU_SERVER_TYPE, DbusmenuServerClass))
+
+typedef struct _DbusmenuServer DbusmenuServer;
+typedef struct _DbusmenuServerClass DbusmenuServerClass;
+
+struct _DbusmenuServerClass {
+ GObjectClass parent_class;
+};
+
+struct _DbusmenuServer {
+ GObject parent;
+};
+
+GType dbusmenu_server_get_type (void);
+
+G_END_DECLS
+
+#endif