GNOME Bugzilla – Bug 697314
gupnp_context_manager_rescan_control_points needed
Last modified: 2013-04-12 11:59:21 UTC
GSSDP has introduced a new rescan function that allows a rescan to be performed on a control point. The problem is that this function is difficult for clients of GUPnP to use. The reason is that although GUPnP clients typically create the control points themselves, they pass ownership of these objects to an instance of GUPnPContextManager who then manages the life time of these objects. To safely implement the rescan features, clients of the current version of GUPnP need to maintain their own list of control points, which they need to update when new contexts become available and old contexts disappear. But this is quite a lot of work and it duplicates the work already done by GUPnPContextManager. So to summarise, implementing rescan would be much easier if there was support for rescan in the GUPnPContextManager. So the proposal is to add a function called gupnp_context_manager_rescan_control_points. Clients, would then only have one function to call to rescan all the networks for the control points in which they are interested. The documentation for this function should make it clear that the method searches for new devices on existing networks and does not search for new networks.
Created attachment 240959 [details] [review] Patch proposal for this bug
Review of attachment 240959 [details] [review]: Hi Sebastien, Just a quick comment. The other public GUPnPContextManager functions have a check at the start of the function to make sure manager is not NULL, e.g., g_return_if_fail (GUPNP_IS_CONTEXT_MANAGER (manager)); You should probably add this check.
Created attachment 241014 [details] [review] Version 2 (g_return_if_fail() addition)