Top |
Functions
Description
GUPnPResourceFactory objects are used by GUPnPControlPoint, GUPnPDeviceProxy and GUPnPDevice to create resource proxy and resource objects. Register UPnP type - GType pairs to have resource or resource proxy objects created with the specified GType whenever an object for a resource of the specified UPnP type is requested. The GTypes need to be derived from the relevant resource or resource proxy type (e.g. a device proxy type needs to be derived from GUPnPDeviceProxy).
Functions
gupnp_resource_factory_new ()
GUPnPResourceFactory *
gupnp_resource_factory_new (void
);
Create a new GUPnPResourceFactory object.
gupnp_resource_factory_get_default ()
GUPnPResourceFactory *
gupnp_resource_factory_get_default (void
);
Get the default singleton GUPnPResourceFactory object.
gupnp_resource_factory_register_resource_type ()
void gupnp_resource_factory_register_resource_type (GUPnPResourceFactory *factory
,const char *upnp_type
,GType type
);
Registers the GType type
for the resource of UPnP type upnp_type
. After
this call, the factory factory
will create object of GType type
each time
it is asked to create a resource object for UPnP type upnp_type
.
Note: GType type
must be a derived type of GUPNP_TYPE_DEVICE if resource is
a device or GUPNP_TYPE_SERVICE if its a service.
gupnp_resource_factory_unregister_resource_type ()
gboolean gupnp_resource_factory_unregister_resource_type (GUPnPResourceFactory *factory
,const char *upnp_type
);
Unregisters the GType assignment for the resource of UPnP type upnp_type
.
gupnp_resource_factory_register_resource_proxy_type ()
void gupnp_resource_factory_register_resource_proxy_type (GUPnPResourceFactory *factory
,const char *upnp_type
,GType type
);
Registers the GType type
for the proxy of resource of UPnP type upnp_type
.
After this call, the factory factory
will create object of GType type
each
time it is asked to create a resource proxy object for UPnP type upnp_type
.
Note: GType type
must be a derived type of GUPNP_TYPE_DEVICE_PROXY if
resource is a device or GUPNP_TYPE_SERVICE_PROXY if its a service.
gupnp_resource_factory_unregister_resource_proxy_type ()
gboolean gupnp_resource_factory_unregister_resource_proxy_type (GUPnPResourceFactory *factory
,const char *upnp_type
);
Unregisters the GType assignment for the proxy of resource of UPnP type
upnp_type
.