[gupnp] Add getter for ContextManager.port



commit 87d4549b22ab293d3f6f9bffb8f643f8410cca4b
Author: Jens Georg <mail jensge org>
Date:   Wed Oct 24 20:20:25 2012 +0200

    Add getter for ContextManager.port

 libgupnp/gupnp-context-manager.c |   14 ++++++++++++++
 libgupnp/gupnp-context-manager.h |    2 ++
 2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/libgupnp/gupnp-context-manager.c b/libgupnp/gupnp-context-manager.c
index dbac15d..2888a1b 100644
--- a/libgupnp/gupnp-context-manager.c
+++ b/libgupnp/gupnp-context-manager.c
@@ -415,3 +415,17 @@ gupnp_context_manager_manage_root_device (GUPnPContextManager *manager,
                                                 g_object_ref (root_device));
 }
 
+/**
+ * gupnp_context_manager_get_port:
+ * @manager: A #GUPnPContextManager
+ *
+ * Get the network port associated with this context manager.
+ * Returns: The network port asssociated with this context manager.
+ */
+guint
+gupnp_context_manager_get_port (GUPnPContextManager *manager)
+{
+        g_return_if_fail (GUPNP_IS_CONTEXT_MANAGER (manager));
+
+        return manager->priv->port;
+}
diff --git a/libgupnp/gupnp-context-manager.h b/libgupnp/gupnp-context-manager.h
index 2782898..9fa2154 100644
--- a/libgupnp/gupnp-context-manager.h
+++ b/libgupnp/gupnp-context-manager.h
@@ -99,6 +99,8 @@ gupnp_context_manager_manage_root_device
                                        (GUPnPContextManager     *manager,
                                         GUPnPRootDevice         *root_device);
 
+guint
+gupnp_context_manager_get_port         (GUPnPContextManager *manager);
 G_END_DECLS
 
 #endif /* __GUPNP_CONTEXT_MANAGER_H__ */



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