GNOME Bugzilla – Bug 684297
Can't retrieve all "upnp:createClass" attributes with existing gupnp_didl_lite_container APIs
Last modified: 2019-02-22 05:58:07 UTC
Existing gupnp_didl_lite_container_get_create_classes (...)) API doesn't allow to retrieve the "IncludeDerived" and friendlyName attributes of the "upnp:createClass" elements, the returned result is a Glist of UTF8 string representing the class name. To enable the retrieval of these attributes, I propose the following change to add: - A new GUPnPDIDLLiteCreateClasses GObject with the "upnp:createClass" properties (content, includeDerived, friendly name) and their related Getter/Setter APIs. - A new GUPnPDIDLLiteContainer GObject method to get all its "upnp:createClass" elements as a GList of GUPnPDIDLLiteCreateClasses objects: GList * gupnp_didl_lite_container_get_create_classes_full( GUPnPDIDLLiteContainer *container);
Created attachment 224633 [details] [review] Patch for getting createClass attributes
Review of attachment 224633 [details] [review]: - Patch has trailing whitespaces - I think "All rights reserved." clashes with (L)GPL. ::: libgupnp-av/gupnp-didl-lite-container.c @@ +279,3 @@ + * @container: #GUPnPDIDLLiteContainer + * + * Gets the list of create classes of the @ocontainer. typo: ocontainer -> container @@ +313,3 @@ + + cc = gupnp_didl_lite_create_class_new_from_xml ( + g_return_val_if_fail (GUPNP_IS_DIDL_LITE_CONTAINER (container), NULL); Weird indent. ::: libgupnp-av/gupnp-didl-lite-createclass-private.h @@ +31,3 @@ +G_BEGIN_DECLS + +GUPnPDIDLLiteCreateClass * Please mark as G_GNUC_INTERNAL ::: libgupnp-av/gupnp-didl-lite-createclass.c @@ +411,3 @@ + * Creates a new #GUPnPDIDLLiteCreateClass for the @xml_node. + * + * Return value: A new #GUPnPDIDLLiteCreateClass object. Unref after usage. Could add (transfer full) annotation, but not strictly necessary because it's internal API. ::: libgupnp-av/gupnp-didl-lite-object-private.h @@ +36,3 @@ xmlNs *dlna_ns); +GUPnPXMLDoc * Please mark as G_GNUC_INTERNAL
the "All rights reserved." also appears in upstream files: <gupnp/libgupnp/gupnp-connman-manager.c> <gupnp/libgupnp/gupnp-connman-manager.h> I guess it should be removed from there too ?
Those were done by Intel and I didn't pay attention ;) Patch welcome, of course :)
Created attachment 224915 [details] [review] v2 I've applied changes reported by the patch V1 review.
Pushed slightly adapted to master