[gupnp-av] Feature: Turns out it's useful to derive from that
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp-av] Feature: Turns out it's useful to derive from that
- Date: Sat, 10 Jul 2021 07:19:33 +0000 (UTC)
commit f297aca19c08e3f1de9ddc2a413686b85ccf2a85
Author: Jens Georg <mail jensge org>
Date: Thu Jul 8 22:18:28 2021 +0200
Feature: Turns out it's useful to derive from that
Not all features are just providing objectIDs. CLOCKSYNC or FFQ for
example are more complex
libgupnp-av/gupnp-feature.c | 8 --------
libgupnp-av/gupnp-feature.h | 11 +++++++++--
2 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/libgupnp-av/gupnp-feature.c b/libgupnp-av/gupnp-feature.c
index f904ce5..ee12015 100644
--- a/libgupnp-av/gupnp-feature.c
+++ b/libgupnp-av/gupnp-feature.c
@@ -18,10 +18,6 @@
#include "gupnp-feature.h"
-struct _GUPnPFeatureClass {
- GObjectClass parent_class;
-};
-
struct _GUPnPFeaturePrivate {
char *name;
char *version;
@@ -29,10 +25,6 @@ struct _GUPnPFeaturePrivate {
};
typedef struct _GUPnPFeaturePrivate GUPnPFeaturePrivate;
-struct _GUPnPFeature {
- GObject parent;
-};
-
G_DEFINE_TYPE_WITH_PRIVATE (GUPnPFeature,
gupnp_feature,
G_TYPE_OBJECT)
diff --git a/libgupnp-av/gupnp-feature.h b/libgupnp-av/gupnp-feature.h
index 3126384..ffd486d 100644
--- a/libgupnp-av/gupnp-feature.h
+++ b/libgupnp-av/gupnp-feature.h
@@ -14,11 +14,18 @@
G_BEGIN_DECLS
-typedef struct _GUPnPFeature GUPnPFeature;
-G_DECLARE_FINAL_TYPE (GUPnPFeature, gupnp_feature, GUPNP, FEATURE, GObject)
+G_DECLARE_DERIVABLE_TYPE(GUPnPFeature,
+ gupnp_feature,
+ GUPNP,
+ FEATURE,
+ GObject)
#define GUPNP_TYPE_FEATURE (gupnp_feature_get_type ())
+struct _GUPnPFeatureClass {
+ GObjectClass parent_class;
+};
+
const char *
gupnp_feature_get_name (GUPnPFeature *feature);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]