diff options
author | Jens Georg <mail@jensge.org> | 2021-07-08 22:18:28 +0200 |
---|---|---|
committer | Jens Georg <mail@jensge.org> | 2021-07-08 22:18:28 +0200 |
commit | f297aca19c08e3f1de9ddc2a413686b85ccf2a85 (patch) | |
tree | 22b772462473034b8b8526355557639ad2cb032f | |
parent | 013e6769f86a01a97664c686fe1481edd5a9c51e (diff) | |
download | gupnp-av-f297aca19c08e3f1de9ddc2a413686b85ccf2a85.tar.gz |
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
-rw-r--r-- | libgupnp-av/gupnp-feature.c | 8 | ||||
-rw-r--r-- | 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); |