[gupnp] Don't use anonymous structs for types



commit 45ff0c47fef0bde732eafdd519dcf95c02463f78
Author: Jens Georg <mail jensge org>
Date:   Thu Feb 3 23:53:59 2011 +0100

    Don't use anonymous structs for types
    
    Used for *mm bindings

 libgupnp/gupnp-context-manager.h       |   10 ++++++----
 libgupnp/gupnp-context.h               |   10 ++++++----
 libgupnp/gupnp-control-point.h         |   10 ++++++----
 libgupnp/gupnp-device-info.h           |   10 ++++++----
 libgupnp/gupnp-device-proxy.h          |   10 ++++++----
 libgupnp/gupnp-device.h                |   10 ++++++----
 libgupnp/gupnp-resource-factory.h      |   10 ++++++----
 libgupnp/gupnp-root-device.h           |   10 ++++++----
 libgupnp/gupnp-service-info.h          |   10 ++++++----
 libgupnp/gupnp-service-introspection.h |   12 ++++++++----
 libgupnp/gupnp-service-proxy.h         |   10 ++++++----
 libgupnp/gupnp-service.h               |   10 ++++++----
 libgupnp/gupnp-xml-doc.h               |   11 +++++++----
 13 files changed, 81 insertions(+), 52 deletions(-)
---
diff --git a/libgupnp/gupnp-context-manager.h b/libgupnp/gupnp-context-manager.h
index d67ae20..6f27dab 100644
--- a/libgupnp/gupnp-context-manager.h
+++ b/libgupnp/gupnp-context-manager.h
@@ -54,6 +54,8 @@ gupnp_context_manager_get_type (void) G_GNUC_CONST;
                  GUPnPContextManagerClass))
 
 typedef struct _GUPnPContextManagerPrivate GUPnPContextManagerPrivate;
+typedef struct _GUPnPContextManager GUPnPContextManager;
+typedef struct _GUPnPContextManagerClass GUPnPContextManagerClass;
 
 /**
  * GUPnPContextManager:
@@ -61,13 +63,13 @@ typedef struct _GUPnPContextManagerPrivate GUPnPContextManagerPrivate;
  * This struct contains private data only, and should be accessed using the
  * functions below.
  */
-typedef struct {
+struct _GUPnPContextManager {
         GObject parent;
 
         GUPnPContextManagerPrivate *priv;
-} GUPnPContextManager;
+};
 
-typedef struct {
+struct _GUPnPContextManagerClass {
         GObjectClass parent_class;
 
         /* future padding */
@@ -75,7 +77,7 @@ typedef struct {
         void (* _gupnp_reserved2) (void);
         void (* _gupnp_reserved3) (void);
         void (* _gupnp_reserved4) (void);
-} GUPnPContextManagerClass;
+};
 
 GUPnPContextManager *
 gupnp_context_manager_new              (GMainContext *main_context,
diff --git a/libgupnp/gupnp-context.h b/libgupnp/gupnp-context.h
index 2f10701..9ae21fb 100644
--- a/libgupnp/gupnp-context.h
+++ b/libgupnp/gupnp-context.h
@@ -53,6 +53,8 @@ gupnp_context_get_type (void) G_GNUC_CONST;
                  GUPnPContextClass))
 
 typedef struct _GUPnPContextPrivate GUPnPContextPrivate;
+typedef struct _GUPnPContext GUPnPContext;
+typedef struct _GUPnPContextClass GUPnPContextClass;
 
 /**
  * GUPnPContext:
@@ -60,13 +62,13 @@ typedef struct _GUPnPContextPrivate GUPnPContextPrivate;
  * This struct contains private data only, and should be accessed using the
  * functions below.
  */
-typedef struct {
+struct _GUPnPContext {
         GSSDPClient parent;
 
         GUPnPContextPrivate *priv;
-} GUPnPContext;
+};
 
-typedef struct {
+struct _GUPnPContextClass {
         GSSDPClientClass parent_class;
 
         /* future padding */
@@ -74,7 +76,7 @@ typedef struct {
         void (* _gupnp_reserved2) (void);
         void (* _gupnp_reserved3) (void);
         void (* _gupnp_reserved4) (void);
-} GUPnPContextClass;
+};
 
 GUPnPContext *
 gupnp_context_new                      (GMainContext *main_context,
diff --git a/libgupnp/gupnp-control-point.h b/libgupnp/gupnp-control-point.h
index 3057827..ce184a1 100644
--- a/libgupnp/gupnp-control-point.h
+++ b/libgupnp/gupnp-control-point.h
@@ -56,6 +56,8 @@ gupnp_control_point_get_type (void) G_GNUC_CONST;
                  GUPnPControlPointClass))
 
 typedef struct _GUPnPControlPointPrivate GUPnPControlPointPrivate;
+typedef struct _GUPnPControlPoint GUPnPControlPoint;
+typedef struct _GUPnPControlPointClass GUPnPControlPointClass;
 
 /**
  * GUPnPControlPoint:
@@ -63,13 +65,13 @@ typedef struct _GUPnPControlPointPrivate GUPnPControlPointPrivate;
  * This struct contains private data only, and should be accessed using the
  * functions below.
  */
-typedef struct {
+struct _GUPnPControlPoint {
         GSSDPResourceBrowser parent;
 
         GUPnPControlPointPrivate *priv;
-} GUPnPControlPoint;
+};
 
-typedef struct {
+struct _GUPnPControlPointClass {
         GSSDPResourceBrowserClass parent_class;
 
         /* signals */
@@ -89,7 +91,7 @@ typedef struct {
         void (* _gupnp_reserved1) (void);
         void (* _gupnp_reserved2) (void);
         void (* _gupnp_reserved3) (void);
-} GUPnPControlPointClass;
+};
 
 GUPnPControlPoint *
 gupnp_control_point_new                  (GUPnPContext         *context,
diff --git a/libgupnp/gupnp-device-info.h b/libgupnp/gupnp-device-info.h
index df7aa80..f573c63 100644
--- a/libgupnp/gupnp-device-info.h
+++ b/libgupnp/gupnp-device-info.h
@@ -57,6 +57,8 @@ gupnp_device_info_get_type (void) G_GNUC_CONST;
                  GUPnPDeviceInfoClass))
 
 typedef struct _GUPnPDeviceInfoPrivate GUPnPDeviceInfoPrivate;
+typedef struct _GUPnPDeviceInfo GUPnPDeviceInfo;
+typedef struct _GUPnPDeviceInfoClass GUPnPDeviceInfoClass;
 
 /**
  * GUPnPDeviceInfo:
@@ -64,13 +66,13 @@ typedef struct _GUPnPDeviceInfoPrivate GUPnPDeviceInfoPrivate;
  * This struct contains private data only, and should be accessed using the
  * functions below.
  */
-typedef struct {
+struct _GUPnPDeviceInfo {
         GObject parent;
 
         GUPnPDeviceInfoPrivate *priv;
-} GUPnPDeviceInfo;
+};
 
-typedef struct {
+struct _GUPnPDeviceInfoClass {
         GObjectClass parent_class;
 
         /* vtable */
@@ -85,7 +87,7 @@ typedef struct {
         void (* _gupnp_reserved2) (void);
         void (* _gupnp_reserved3) (void);
         void (* _gupnp_reserved4) (void);
-} GUPnPDeviceInfoClass;
+};
 
 
 GUPnPContext *
diff --git a/libgupnp/gupnp-device-proxy.h b/libgupnp/gupnp-device-proxy.h
index 5e19f19..7d513f9 100644
--- a/libgupnp/gupnp-device-proxy.h
+++ b/libgupnp/gupnp-device-proxy.h
@@ -51,6 +51,8 @@ gupnp_device_proxy_get_type (void) G_GNUC_CONST;
                  GUPnPDeviceProxyClass))
 
 typedef struct _GUPnPDeviceProxyPrivate GUPnPDeviceProxyPrivate;
+typedef struct _GUPnPDeviceProxy GUPnPDeviceProxy;
+typedef struct _GUPnPDeviceProxyClass GUPnPDeviceProxyClass;
 
 /**
  * GUPnPDeviceProxy:
@@ -58,13 +60,13 @@ typedef struct _GUPnPDeviceProxyPrivate GUPnPDeviceProxyPrivate;
  * This struct contains private data only, and should be accessed using the
  * functions below.
  */
-typedef struct {
+struct _GUPnPDeviceProxy {
         GUPnPDeviceInfo parent;
 
         GUPnPDeviceProxyPrivate *priv;
-} GUPnPDeviceProxy;
+};
 
-typedef struct {
+struct _GUPnPDeviceProxyClass {
         GUPnPDeviceInfoClass parent_class;
 
         /* future padding */
@@ -72,7 +74,7 @@ typedef struct {
         void (* _gupnp_reserved2) (void);
         void (* _gupnp_reserved3) (void);
         void (* _gupnp_reserved4) (void);
-} GUPnPDeviceProxyClass;
+};
 
 G_END_DECLS
 
diff --git a/libgupnp/gupnp-device.h b/libgupnp/gupnp-device.h
index 463e0cd..c45da1b 100644
--- a/libgupnp/gupnp-device.h
+++ b/libgupnp/gupnp-device.h
@@ -51,6 +51,8 @@ gupnp_device_get_type (void) G_GNUC_CONST;
                  GUPnPDeviceClass))
 
 typedef struct _GUPnPDevicePrivate GUPnPDevicePrivate;
+typedef struct _GUPnPDevice GUPnPDevice;
+typedef struct _GUPnPDeviceClass GUPnPDeviceClass;
 
 /**
  * GUPnPDevice:
@@ -58,13 +60,13 @@ typedef struct _GUPnPDevicePrivate GUPnPDevicePrivate;
  * This struct contains private data only, and should be accessed using the
  * functions below.
  */
-typedef struct {
+struct _GUPnPDevice {
         GUPnPDeviceInfo parent;
 
         GUPnPDevicePrivate *priv;
-} GUPnPDevice;
+};
 
-typedef struct {
+struct _GUPnPDeviceClass {
         GUPnPDeviceInfoClass parent_class;
 
         /* future padding */
@@ -72,7 +74,7 @@ typedef struct {
         void (* _gupnp_reserved2) (void);
         void (* _gupnp_reserved3) (void);
         void (* _gupnp_reserved4) (void);
-} GUPnPDeviceClass;
+};
 
 G_END_DECLS
 
diff --git a/libgupnp/gupnp-resource-factory.h b/libgupnp/gupnp-resource-factory.h
index 3431256..01f5edb 100644
--- a/libgupnp/gupnp-resource-factory.h
+++ b/libgupnp/gupnp-resource-factory.h
@@ -53,6 +53,8 @@ gupnp_resource_factory_get_type (void) G_GNUC_CONST;
                  GUPnPResourceFactoryClass))
 
 typedef struct _GUPnPResourceFactoryPrivate GUPnPResourceFactoryPrivate;
+typedef struct _GUPnPResourceFactory GUPnPResourceFactory;
+typedef struct _GUPnPResourceFactoryClass GUPnPResourceFactoryClass;
 
 /**
  * GUPnPResourceFactory:
@@ -60,13 +62,13 @@ typedef struct _GUPnPResourceFactoryPrivate GUPnPResourceFactoryPrivate;
  * This struct contains private data only, and should be accessed using the
  * functions below.
  */
-typedef struct {
+struct _GUPnPResourceFactory {
         GObject parent;
 
         GUPnPResourceFactoryPrivate *priv;
-} GUPnPResourceFactory;
+};
 
-typedef struct {
+struct _GUPnPResourceFactoryClass {
         GObjectClass parent_class;
 
         /* future padding */
@@ -74,7 +76,7 @@ typedef struct {
         void (* _gupnp_reserved2) (void);
         void (* _gupnp_reserved3) (void);
         void (* _gupnp_reserved4) (void);
-} GUPnPResourceFactoryClass;
+};
 
 GUPnPResourceFactory *
 gupnp_resource_factory_new         (void);
diff --git a/libgupnp/gupnp-root-device.h b/libgupnp/gupnp-root-device.h
index 3f6ed64..22f5598 100644
--- a/libgupnp/gupnp-root-device.h
+++ b/libgupnp/gupnp-root-device.h
@@ -56,6 +56,8 @@ gupnp_root_device_get_type (void) G_GNUC_CONST;
                  GUPnPRootDeviceClass))
 
 typedef struct _GUPnPRootDevicePrivate GUPnPRootDevicePrivate;
+typedef struct _GUPnPRootDevice GUPnPRootDevice;
+typedef struct _GUPnPRootDeviceClass GUPnPRootDeviceClass;
 
 /**
  * GUPnPRootDevice:
@@ -63,13 +65,13 @@ typedef struct _GUPnPRootDevicePrivate GUPnPRootDevicePrivate;
  * This struct contains private data only, and should be accessed using the
  * functions below.
  */
-typedef struct {
+struct _GUPnPRootDevice {
         GUPnPDevice parent;
 
         GUPnPRootDevicePrivate *priv;
-} GUPnPRootDevice;
+};
 
-typedef struct {
+struct _GUPnPRootDeviceClass {
         GUPnPDeviceClass parent_class;
 
         /* future padding */
@@ -77,7 +79,7 @@ typedef struct {
         void (* _gupnp_reserved2) (void);
         void (* _gupnp_reserved3) (void);
         void (* _gupnp_reserved4) (void);
-} GUPnPRootDeviceClass;
+};
 
 GUPnPRootDevice *
 gupnp_root_device_new             (GUPnPContext         *context,
diff --git a/libgupnp/gupnp-service-info.h b/libgupnp/gupnp-service-info.h
index 2ef8adb..fff9c89 100644
--- a/libgupnp/gupnp-service-info.h
+++ b/libgupnp/gupnp-service-info.h
@@ -56,6 +56,8 @@ gupnp_service_info_get_type (void) G_GNUC_CONST;
                  GUPnPServiceInfoClass))
 
 typedef struct _GUPnPServiceInfoPrivate GUPnPServiceInfoPrivate;
+typedef struct _GUPnPServiceInfo GUPnPServiceInfo;
+typedef struct _GUPnPServiceInfoClass GUPnPServiceInfoClass;
 
 /**
  * GUPnPServiceInfo:
@@ -63,13 +65,13 @@ typedef struct _GUPnPServiceInfoPrivate GUPnPServiceInfoPrivate;
  * This struct contains private data only, and should be accessed using the
  * functions below.
  */
-typedef struct {
+struct _GUPnPServiceInfo {
         GObject parent;
 
         GUPnPServiceInfoPrivate *priv;
-} GUPnPServiceInfo;
+};
 
-typedef struct {
+struct _GUPnPServiceInfoClass {
         GObjectClass parent_class;
 
         /* future padding */
@@ -77,7 +79,7 @@ typedef struct {
         void (* _gupnp_reserved2) (void);
         void (* _gupnp_reserved3) (void);
         void (* _gupnp_reserved4) (void);
-} GUPnPServiceInfoClass;
+};
 
 /**
  * GUPnPServiceIntrospectionCallback
diff --git a/libgupnp/gupnp-service-introspection.h b/libgupnp/gupnp-service-introspection.h
index 6d1b734..803afe7 100644
--- a/libgupnp/gupnp-service-introspection.h
+++ b/libgupnp/gupnp-service-introspection.h
@@ -129,6 +129,10 @@ typedef struct {
 
 typedef struct _GUPnPServiceIntrospectionPrivate
                 GUPnPServiceIntrospectionPrivate;
+typedef struct _GUPnPServiceIntrospection
+                GUPnPServiceIntrospection;
+typedef struct _GUPnPServiceIntrospectionClass
+                GUPnPServiceIntrospectionClass;
 
 /**
  * GUPnPServiceIntrospection:
@@ -136,15 +140,15 @@ typedef struct _GUPnPServiceIntrospectionPrivate
  * This struct contains private data only, and should be accessed using the
  * functions below.
  */
-typedef struct {
+struct _GUPnPServiceIntrospection {
         GObject parent;
 
         GUPnPServiceIntrospectionPrivate *priv;
-} GUPnPServiceIntrospection;
+};
 
-typedef struct {
+struct _GUPnPServiceIntrospectionClass {
         GObjectClass parent_class;
-} GUPnPServiceIntrospectionClass;
+};
 
 const GList *
 gupnp_service_introspection_list_action_names
diff --git a/libgupnp/gupnp-service-proxy.h b/libgupnp/gupnp-service-proxy.h
index 445e2a3..9cecf10 100644
--- a/libgupnp/gupnp-service-proxy.h
+++ b/libgupnp/gupnp-service-proxy.h
@@ -52,6 +52,8 @@ gupnp_service_proxy_get_type (void) G_GNUC_CONST;
                  GUPnPServiceProxyClass))
 
 typedef struct _GUPnPServiceProxyPrivate GUPnPServiceProxyPrivate;
+typedef struct _GUPnPServiceProxy GUPnPServiceProxy;
+typedef struct _GUPnPServiceProxyClass GUPnPServiceProxyClass;
 
 /**
  * GUPnPServiceProxy:
@@ -59,13 +61,13 @@ typedef struct _GUPnPServiceProxyPrivate GUPnPServiceProxyPrivate;
  * This struct contains private data only, and should be accessed using the
  * functions below.
  */
-typedef struct {
+struct _GUPnPServiceProxy {
         GUPnPServiceInfo parent;
 
         GUPnPServiceProxyPrivate *priv;
-} GUPnPServiceProxy;
+};
 
-typedef struct {
+struct _GUPnPServiceProxyClass {
         GUPnPServiceInfoClass parent_class;
 
         /* signals */
@@ -77,7 +79,7 @@ typedef struct {
         void (* _gupnp_reserved2) (void);
         void (* _gupnp_reserved3) (void);
         void (* _gupnp_reserved4) (void);
-} GUPnPServiceProxyClass;
+};
 
 /**
  * GUPnPServiceProxyAction
diff --git a/libgupnp/gupnp-service.h b/libgupnp/gupnp-service.h
index 6c5325d..0f0f3a9 100644
--- a/libgupnp/gupnp-service.h
+++ b/libgupnp/gupnp-service.h
@@ -65,6 +65,8 @@ gupnp_service_action_get_type (void) G_GNUC_CONST;
 #define GUPNP_TYPE_SERVICE_ACTION (gupnp_service_action_get_type ())
 
 typedef struct _GUPnPServicePrivate GUPnPServicePrivate;
+typedef struct _GUPnPService GUPnPService;
+typedef struct _GUPnPServiceClass GUPnPServiceClass;
 
 /**
  * GUPnPService:
@@ -72,13 +74,13 @@ typedef struct _GUPnPServicePrivate GUPnPServicePrivate;
  * This struct contains private data only, and should be accessed using the
  * functions below.
  */
-typedef struct {
+struct _GUPnPService {
         GUPnPServiceInfo parent;
 
         GUPnPServicePrivate *priv;
-} GUPnPService;
+};
 
-typedef struct {
+struct _GUPnPServiceClass {
         GUPnPServiceInfoClass parent_class;
 
         void (* action_invoked) (GUPnPService       *service,
@@ -97,7 +99,7 @@ typedef struct {
         void (* _gupnp_reserved2) (void);
         void (* _gupnp_reserved3) (void);
         void (* _gupnp_reserved4) (void);
-} GUPnPServiceClass;
+};
 
 
 GType
diff --git a/libgupnp/gupnp-xml-doc.h b/libgupnp/gupnp-xml-doc.h
index eba12ab..d7fddf1 100644
--- a/libgupnp/gupnp-xml-doc.h
+++ b/libgupnp/gupnp-xml-doc.h
@@ -52,15 +52,18 @@ gupnp_xml_doc_get_type (void) G_GNUC_CONST;
                  GUPNP_TYPE_XML_DOC, \
                  GUPnPXMLDocClass))
 
-typedef struct {
+typedef struct _GUPnPXMLDoc GUPnPXMLDoc;
+typedef struct _GUPnPXMLDocClass GUPnPXMLDocClass;
+
+struct _GUPnPXMLDoc {
         GObject parent;
         /*< public >*/
         xmlDoc *doc;
-} GUPnPXMLDoc;
+};
 
-typedef struct {
+struct _GUPnPXMLDocClass {
         GObjectClass parent_class;
-} GUPnPXMLDocClass;
+};
 
 GUPnPXMLDoc *
 gupnp_xml_doc_new                       (xmlDoc         *xml_doc);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]