diff options
author | Jens Georg <mail@jensge.org> | 2021-07-04 00:31:56 +0200 |
---|---|---|
committer | Jens Georg <mail@jensge.org> | 2021-07-04 00:42:26 +0200 |
commit | 23597361a32a50b95764c1e69aeb760bfa8269b0 (patch) | |
tree | 0d2662289863e510f5ca09730562ce7873e61212 | |
parent | b85c0758f1c001482408f1f4d7903b75a3eb1740 (diff) | |
download | gupnp-av-23597361a32a50b95764c1e69aeb760bfa8269b0.tar.gz |
Make Feature and FeatureListParser final types
It is not useful to ever derive from that
-rw-r--r-- | libgupnp-av/gupnp-feature-list-parser.c | 4 | ||||
-rw-r--r-- | libgupnp-av/gupnp-feature-list-parser.h | 19 | ||||
-rw-r--r-- | libgupnp-av/gupnp-feature.c | 8 | ||||
-rw-r--r-- | libgupnp-av/gupnp-feature.h | 11 |
4 files changed, 21 insertions, 21 deletions
diff --git a/libgupnp-av/gupnp-feature-list-parser.c b/libgupnp-av/gupnp-feature-list-parser.c index 16e5ddd..16208b5 100644 --- a/libgupnp-av/gupnp-feature-list-parser.c +++ b/libgupnp-av/gupnp-feature-list-parser.c @@ -23,6 +23,10 @@ #include "gupnp-av.h" #include "xml-util.h" +struct _GUPnPFeatureListParser { + GObject parent; +}; + /* GUPnPFeatureListParser */ G_DEFINE_TYPE (GUPnPFeatureListParser, gupnp_feature_list_parser, diff --git a/libgupnp-av/gupnp-feature-list-parser.h b/libgupnp-av/gupnp-feature-list-parser.h index 08ca0d8..52edeb8 100644 --- a/libgupnp-av/gupnp-feature-list-parser.h +++ b/libgupnp-av/gupnp-feature-list-parser.h @@ -15,18 +15,13 @@ G_BEGIN_DECLS -G_DECLARE_DERIVABLE_TYPE(GUPnPFeatureListParser, - gupnp_feature_list_parser, - GUPNP, - FEATURE_LIST_PARSER, - GObject) - -#define GUPNP_TYPE_FEATURE_LIST_PARSER \ - (gupnp_feature_list_parser_get_type ()) - -struct _GUPnPFeatureListParserClass{ - GObjectClass parent_class; -}; +G_DECLARE_FINAL_TYPE (GUPnPFeatureListParser, + gupnp_feature_list_parser, + GUPNP, + FEATURE_LIST_PARSER, + GObject) + +#define GUPNP_TYPE_FEATURE_LIST_PARSER (gupnp_feature_list_parser_get_type ()) GUPnPFeatureListParser * gupnp_feature_list_parser_new (void); diff --git a/libgupnp-av/gupnp-feature.c b/libgupnp-av/gupnp-feature.c index ee12015..f904ce5 100644 --- a/libgupnp-av/gupnp-feature.c +++ b/libgupnp-av/gupnp-feature.c @@ -18,6 +18,10 @@ #include "gupnp-feature.h" +struct _GUPnPFeatureClass { + GObjectClass parent_class; +}; + struct _GUPnPFeaturePrivate { char *name; char *version; @@ -25,6 +29,10 @@ 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 ffd486d..3126384 100644 --- a/libgupnp-av/gupnp-feature.h +++ b/libgupnp-av/gupnp-feature.h @@ -14,18 +14,11 @@ G_BEGIN_DECLS -G_DECLARE_DERIVABLE_TYPE(GUPnPFeature, - gupnp_feature, - GUPNP, - FEATURE, - GObject) +typedef struct _GUPnPFeature GUPnPFeature; +G_DECLARE_FINAL_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); |