[gupnp] Be nicer to G-I in WhitList



commit 3b3ff4c5c80f670c6afd30a83f769a9e6cf0bc80
Author: Jens Georg <mail jensge org>
Date:   Fri Aug 16 14:58:34 2013 +0200

    Be nicer to G-I in WhitList
    
    Use "standard" naming for property accessors

 doc/gupnp-sections.txt           |    6 +++---
 libgupnp/gupnp-context-manager.c |    6 +++---
 libgupnp/gupnp-white-list.c      |   14 ++++++++------
 libgupnp/gupnp-white-list.h      |    6 +++---
 vala/GUPnP-1.0.metadata          |    2 ++
 5 files changed, 19 insertions(+), 15 deletions(-)
---
diff --git a/doc/gupnp-sections.txt b/doc/gupnp-sections.txt
index 032066a..e0cd73c 100644
--- a/doc/gupnp-sections.txt
+++ b/doc/gupnp-sections.txt
@@ -453,10 +453,10 @@ GUPnPWhiteList
 gupnp_white_list_add_entry
 gupnp_white_list_check_context
 gupnp_white_list_clear
-gupnp_white_list_enable
-gupnp_white_list_get_entry_list
+gupnp_white_list_set_enabled
+gupnp_white_list_get_entries
 gupnp_white_list_is_empty
-gupnp_white_list_is_enabled
+gupnp_white_list_get_enabled
 gupnp_white_list_new
 gupnp_white_list_remove_entry
 <SUBSECTION Standard>
diff --git a/libgupnp/gupnp-context-manager.c b/libgupnp/gupnp-context-manager.c
index 4e0a84a..21ce53b 100644
--- a/libgupnp/gupnp-context-manager.c
+++ b/libgupnp/gupnp-context-manager.c
@@ -89,7 +89,7 @@ on_context_available (GUPnPContextManager    *manager,
         /* Try to catch the notification, only if the white list
          * is enabled, not empty and the context doesn't match */
         if (!gupnp_white_list_is_empty (white_list) &&
-            gupnp_white_list_is_enabled (white_list) &&
+            gupnp_white_list_get_enabled (white_list) &&
             !gupnp_white_list_check_context (white_list, context)) {
                 /* If the conext doesn't match, block the notification
                  * and disable the context */
@@ -236,7 +236,7 @@ on_white_list_change_cb (GUPnPWhiteList *white_list,
         gboolean enabled;
         gboolean is_empty;
 
-        enabled = gupnp_white_list_is_enabled (white_list);
+        enabled = gupnp_white_list_get_enabled (white_list);
         is_empty = gupnp_white_list_is_empty (white_list);
 
         if (enabled)
@@ -254,7 +254,7 @@ on_white_list_enabled_cb (GUPnPWhiteList *white_list,
         gboolean enabled;
         gboolean is_empty;
 
-        enabled = gupnp_white_list_is_enabled (white_list);
+        enabled = gupnp_white_list_get_enabled (white_list);
         is_empty = gupnp_white_list_is_empty (white_list);
 
         if (!is_empty)
diff --git a/libgupnp/gupnp-white-list.c b/libgupnp/gupnp-white-list.c
index 90de39b..fe4abbe 100644
--- a/libgupnp/gupnp-white-list.c
+++ b/libgupnp/gupnp-white-list.c
@@ -161,6 +161,8 @@ gupnp_white_list_class_init (GUPnPWhiteListClass *klass)
          * GUPnPWhiteList:entries:
          *
          * Whether this white list is active or not.
+         * Type: GList
+         * Transfer: none
          **/
         g_object_class_install_property
                 (object_class,
@@ -189,14 +191,14 @@ gupnp_white_list_new (void)
 }
 
 /**
- * gupnp_white_list_enable:
+ * gupnp_white_list_set_enabled:
  * @white_list: A #GUPnPWhiteList
  * @enable:  %TRUE to enable @white_list, %FALSE otherwise
  *
  * Enable or disable the #GUPnPWhiteList to perform the network filtering.
 **/
 void
-gupnp_white_list_enable (GUPnPWhiteList *white_list, gboolean enable)
+gupnp_white_list_set_enabled (GUPnPWhiteList *white_list, gboolean enable)
 {
         g_return_if_fail (GUPNP_IS_WHITE_LIST (white_list));
 
@@ -205,7 +207,7 @@ gupnp_white_list_enable (GUPnPWhiteList *white_list, gboolean enable)
 }
 
 /**
- * gupnp_white_list_is_enabled:
+ * gupnp_white_list_get_enabled:
  * @white_list: A #GUPnPWhiteList
  *
  * Return the status of the #GUPnPWhiteList
@@ -213,7 +215,7 @@ gupnp_white_list_enable (GUPnPWhiteList *white_list, gboolean enable)
  * Return value: %TRUE if @white_list is enabled, %FALSE otherwise.
  **/
 gboolean
-gupnp_white_list_is_enabled (GUPnPWhiteList *white_list)
+gupnp_white_list_get_enabled (GUPnPWhiteList *white_list)
 {
         g_return_val_if_fail (GUPNP_IS_WHITE_LIST (white_list), FALSE);
 
@@ -309,7 +311,7 @@ gupnp_white_list_remove_entry (GUPnPWhiteList *white_list, gchar* entry)
 }
 
 /**
- * gupnp_white_list_get_entry_list:
+ * gupnp_white_list_get_entries:
  * @white_list: A #GUPnPWhiteList
  *
  * Get the #GList of entries that compose the white list. Do not free
@@ -319,7 +321,7 @@ gupnp_white_list_remove_entry (GUPnPWhiteList *white_list, gchar* entry)
  * Do not modify or free the list nor its elements.
  **/
 GList *
-gupnp_white_list_get_entry_list (GUPnPWhiteList *white_list)
+gupnp_white_list_get_entries (GUPnPWhiteList *white_list)
 {
         g_return_val_if_fail (GUPNP_IS_WHITE_LIST (white_list), NULL);
 
diff --git a/libgupnp/gupnp-white-list.h b/libgupnp/gupnp-white-list.h
index 1ed4fbf..9b21b12 100644
--- a/libgupnp/gupnp-white-list.h
+++ b/libgupnp/gupnp-white-list.h
@@ -75,11 +75,11 @@ GUPnPWhiteList *
 gupnp_white_list_new            (void);
 
 void
-gupnp_white_list_enable         (GUPnPWhiteList *white_list,
+gupnp_white_list_set_enabled    (GUPnPWhiteList *white_list,
                                  gboolean enable);
 
 gboolean
-gupnp_white_list_is_enabled     (GUPnPWhiteList *white_list);
+gupnp_white_list_get_enabled     (GUPnPWhiteList *white_list);
 
 gboolean
 gupnp_white_list_is_empty       (GUPnPWhiteList *white_list);
@@ -93,7 +93,7 @@ gupnp_white_list_remove_entry   (GUPnPWhiteList *white_list,
                                  gchar* entry);
 
 GList *
-gupnp_white_list_get_entry_list (GUPnPWhiteList *white_list);
+gupnp_white_list_get_entries    (GUPnPWhiteList *white_list);
 
 void
 gupnp_white_list_clear          (GUPnPWhiteList *white_list);
diff --git a/vala/GUPnP-1.0.metadata b/vala/GUPnP-1.0.metadata
index 50f14b1..a8ab94c 100644
--- a/vala/GUPnP-1.0.metadata
+++ b/vala/GUPnP-1.0.metadata
@@ -28,6 +28,8 @@ ServiceProxy
     .end_action_list skip
     .send_action_hash skip
     .send_action_list skip
+WhiteList
+    .entries skip
 ControlError skip
 control_error_quark skip
 EventingError skip


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