summaryrefslogtreecommitdiff
path: root/ytstenut
diff options
context:
space:
mode:
authorRob Staudinger <robsta@linux.intel.com>2011-10-31 12:53:26 +0100
committerRob Staudinger <robsta@linux.intel.com>2011-10-31 12:53:26 +0100
commitfb359c526c182cfe03749a7548c390328fd7fe5e (patch)
treef76cbdf36b83439a5de032747032b98b03d775aa /ytstenut
parentc0174d6dcf750c721f4394c4f8a24fafe24fa4f4 (diff)
(Proxy)Service: make classes "final" so they can't be subclassed
Hide the class- and instance-structs so the Service and ProxyService classes can't be derived. Mostly cosmetics because there's no API to hook derived classes into the framework, but better save than sorry.
Diffstat (limited to 'ytstenut')
-rw-r--r--ytstenut/yts-proxy-service-impl.h2
-rw-r--r--ytstenut/yts-proxy-service-internal.h9
-rw-r--r--ytstenut/yts-proxy-service.h9
-rw-r--r--ytstenut/yts-service-impl.h4
-rw-r--r--ytstenut/yts-service-internal.h8
-rw-r--r--ytstenut/yts-service.c4
-rw-r--r--ytstenut/yts-service.h18
7 files changed, 24 insertions, 30 deletions
diff --git a/ytstenut/yts-proxy-service-impl.h b/ytstenut/yts-proxy-service-impl.h
index ed30d6e..69032c9 100644
--- a/ytstenut/yts-proxy-service-impl.h
+++ b/ytstenut/yts-proxy-service-impl.h
@@ -22,7 +22,7 @@
#define YTS_PROXY_SERVICE_IMPL_H
#include <glib-object.h>
-#include <ytstenut/yts-proxy-service.h>
+#include <ytstenut/yts-proxy-service-internal.h>
G_BEGIN_DECLS
diff --git a/ytstenut/yts-proxy-service-internal.h b/ytstenut/yts-proxy-service-internal.h
index 526b2bb..d5d3753 100644
--- a/ytstenut/yts-proxy-service-internal.h
+++ b/ytstenut/yts-proxy-service-internal.h
@@ -22,6 +22,15 @@
#define YTS_PROXY_SERVICE_INTERNAL_H
#include <ytstenut/yts-proxy-service.h>
+#include <ytstenut/yts-service-internal.h>
+
+struct YtsProxyService {
+ YtsService parent;
+};
+
+struct YtsProxyServiceClass {
+ YtsServiceClass parent;
+};
bool
yts_proxy_service_dispatch_event (YtsProxyService *self,
diff --git a/ytstenut/yts-proxy-service.h b/ytstenut/yts-proxy-service.h
index c1783e9..67f1f6c 100644
--- a/ytstenut/yts-proxy-service.h
+++ b/ytstenut/yts-proxy-service.h
@@ -44,13 +44,8 @@ G_BEGIN_DECLS
#define YTS_PROXY_SERVICE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), YTS_TYPE_PROXY_SERVICE, YtsProxyServiceClass))
-typedef struct {
- YtsService parent;
-} YtsProxyService;
-
-typedef struct {
- YtsServiceClass parent;
-} YtsProxyServiceClass;
+typedef struct YtsProxyService YtsProxyService;
+typedef struct YtsProxyServiceClass YtsProxyServiceClass;
GType
yts_proxy_service_get_type (void) G_GNUC_CONST;
diff --git a/ytstenut/yts-service-impl.h b/ytstenut/yts-service-impl.h
index 965a8bc..0dfb63b 100644
--- a/ytstenut/yts-service-impl.h
+++ b/ytstenut/yts-service-impl.h
@@ -22,7 +22,7 @@
#define YTS_SERVICE_IMPL_H
#include <glib-object.h>
-#include <ytstenut/yts-service.h>
+#include <ytstenut/yts-service-internal.h>
G_BEGIN_DECLS
@@ -44,12 +44,10 @@ G_BEGIN_DECLS
(G_TYPE_INSTANCE_GET_CLASS ((obj), YTS_TYPE_SERVICE_IMPL, YtsServiceImplClass))
typedef struct {
- /*< private >*/
YtsService parent;
} YtsServiceImpl;
typedef struct {
- /*< private >*/
YtsServiceClass parent;
} YtsServiceImplClass;
diff --git a/ytstenut/yts-service-internal.h b/ytstenut/yts-service-internal.h
index 884b086..1be6d04 100644
--- a/ytstenut/yts-service-internal.h
+++ b/ytstenut/yts-service-internal.h
@@ -24,6 +24,14 @@
#include <ytstenut/yts-metadata.h>
#include <ytstenut/yts-service.h>
+struct YtsService {
+ GObject parent;
+};
+
+struct YtsServiceClass {
+ GObjectClass parent;
+};
+
void
yts_service_send_message (YtsService *self,
YtsMetadata *message);
diff --git a/ytstenut/yts-service.c b/ytstenut/yts-service.c
index 9a20e07..02583cf 100644
--- a/ytstenut/yts-service.c
+++ b/ytstenut/yts-service.c
@@ -290,9 +290,7 @@ yts_service_class_init (YtsServiceClass *klass)
_signals[SIG_STATUS_CHANGED] = g_signal_new ("status-changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (YtsServiceClass,
- status_changed),
- NULL, NULL,
+ 0, NULL, NULL,
yts_marshal_VOID__STRING_STRING,
G_TYPE_NONE, 2,
G_TYPE_STRING,
diff --git a/ytstenut/yts-service.h b/ytstenut/yts-service.h
index e5721e6..3bac861 100644
--- a/ytstenut/yts-service.h
+++ b/ytstenut/yts-service.h
@@ -45,22 +45,8 @@ G_BEGIN_DECLS
#define YTS_SERVICE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), YTS_TYPE_SERVICE, YtsServiceClass))
-typedef struct {
- /*< private >*/
- GObject parent;
-} YtsService;
-
-typedef struct {
- /*< private >*/
- GObjectClass parent;
-
- /*< public >*/
- void
- (*status_changed) (YtsService *self,
- char const *fqc_id,
- char const *status_xml);
-
-} YtsServiceClass;
+typedef struct YtsService YtsService;
+typedef struct YtsServiceClass YtsServiceClass;
GType
yts_service_get_type (void) G_GNUC_CONST;