Added new CAPI to get Gate Announcement value 56/145456/1
authorsaerome kim <saerome.kim@samsung.com>
Tue, 22 Aug 2017 10:08:27 +0000 (19:08 +0900)
committersaerome kim <saerome.kim@samsung.com>
Tue, 22 Aug 2017 10:08:27 +0000 (19:08 +0900)
Change-Id: I696ab6c32ca84f00e24e359305bb5cf7ecd38f1e
Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
include/wifi-mesh-internal.h
include/wifi-mesh_private.h
src/wifi-mesh-dbus.c
src/wifi-mesh-internal.c
test/wifi-mesh-network.c

index 48e70c83529bbbd63902bd73e65f70b70df4a34d..b083a35a49b628752680ee43ea39932dcaa62c54 100644 (file)
@@ -2422,7 +2422,7 @@ int wifi_mesh_destroy_meshconf_info(wifi_mesh_meshconf_info_h meshconf);
  * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter
  *
  * @see wifi_mesh_get_meshconf_info()
- * @see mesh_meshconf_cb()
+ * @see wifi_mesh_destroy_meshconf_info()
  *
  */
 int wifi_mesh_get_meshconf_retry_timeout(wifi_mesh_meshconf_info_h meshconf,
@@ -2442,7 +2442,7 @@ int wifi_mesh_get_meshconf_retry_timeout(wifi_mesh_meshconf_info_h meshconf,
  * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter
  *
  * @see wifi_mesh_get_meshconf_info()
- * @see mesh_meshconf_cb()
+ * @see wifi_mesh_destroy_meshconf_info()
  *
  */
 
@@ -2464,7 +2464,7 @@ int wifi_mesh_get_meshconf_hwmp_max_preq_retries(
  * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter
  *
  * @see wifi_mesh_get_meshconf_info()
- * @see mesh_meshconf_cb()
+ * @see wifi_mesh_destroy_meshconf_info()
  *
  */
 int wifi_mesh_get_meshconf_confirm_timeout(wifi_mesh_meshconf_info_h meshconf,
@@ -2484,7 +2484,7 @@ int wifi_mesh_get_meshconf_confirm_timeout(wifi_mesh_meshconf_info_h meshconf,
  * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter
  *
  * @see wifi_mesh_get_meshconf_info()
- * @see mesh_meshconf_cb()
+ * @see wifi_mesh_destroy_meshconf_info()
  *
  */
 int wifi_mesh_get_meshconf_path_refresh_time(wifi_mesh_meshconf_info_h meshconf,
@@ -2504,7 +2504,7 @@ int wifi_mesh_get_meshconf_path_refresh_time(wifi_mesh_meshconf_info_h meshconf,
  * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter
  *
  * @see wifi_mesh_get_meshconf_info()
- * @see mesh_meshconf_cb()
+ * @see wifi_mesh_destroy_meshconf_info()
  *
  */
 int wifi_mesh_get_meshconf_holding_timeout(wifi_mesh_meshconf_info_h meshconf,
@@ -2524,7 +2524,7 @@ int wifi_mesh_get_meshconf_holding_timeout(wifi_mesh_meshconf_info_h meshconf,
  * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter
  *
  * @see wifi_mesh_get_meshconf_info()
- * @see mesh_meshconf_cb()
+ * @see wifi_mesh_destroy_meshconf_info()
  *
  */
 int wifi_mesh_get_meshconf_min_disc_timeout(wifi_mesh_meshconf_info_h meshconf,
@@ -2544,7 +2544,7 @@ int wifi_mesh_get_meshconf_min_disc_timeout(wifi_mesh_meshconf_info_h meshconf,
  * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter
  *
  * @see wifi_mesh_get_meshconf_info()
- * @see mesh_meshconf_cb()
+ * @see wifi_mesh_destroy_meshconf_info()
  *
  */
 int wifi_mesh_get_meshconf_max_peer_links(wifi_mesh_meshconf_info_h meshconf,
@@ -2564,7 +2564,7 @@ int wifi_mesh_get_meshconf_max_peer_links(wifi_mesh_meshconf_info_h meshconf,
  * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter
  *
  * @see wifi_mesh_get_meshconf_info()
- * @see mesh_meshconf_cb()
+ * @see wifi_mesh_destroy_meshconf_info()
  *
  */
 int wifi_mesh_get_meshconf_hwmp_preq_min_interval(
@@ -2585,7 +2585,7 @@ int wifi_mesh_get_meshconf_hwmp_preq_min_interval(
  * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter
  *
  * @see wifi_mesh_get_meshconf_info()
- * @see mesh_meshconf_cb()
+ * @see wifi_mesh_destroy_meshconf_info()
  *
  */
 int wifi_mesh_get_meshconf_ttl(
@@ -2605,7 +2605,7 @@ int wifi_mesh_get_meshconf_ttl(
  * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter
  *
  * @see wifi_mesh_get_meshconf_info()
- * @see mesh_meshconf_cb()
+ * @see wifi_mesh_destroy_meshconf_info()
  *
  */
 int wifi_mesh_get_meshconf_hwmp_active_path_timeout(
@@ -2626,7 +2626,7 @@ int wifi_mesh_get_meshconf_hwmp_active_path_timeout(
  * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter
  *
  * @see wifi_mesh_get_meshconf_info()
- * @see mesh_meshconf_cb()
+ * @see wifi_mesh_destroy_meshconf_info()
  *
  */
 int wifi_mesh_get_meshconf_element_ttl(wifi_mesh_meshconf_info_h meshconf,
@@ -2646,13 +2646,34 @@ int wifi_mesh_get_meshconf_element_ttl(wifi_mesh_meshconf_info_h meshconf,
  * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter
  *
  * @see wifi_mesh_get_meshconf_info()
- * @see mesh_meshconf_cb()
+ * @see wifi_mesh_destroy_meshconf_info()
  *
  */
 int wifi_mesh_get_meshconf_hwmp_rann_interval(
                                wifi_mesh_meshconf_info_h meshconf,
                                gushort *hwmp_rann_interval);
 
+/*
+ * @brief Gets the Gate Announcement value.
+ *
+ * @since_tizen 4.0
+ *
+ * @param[in] meshconf The Wi-Fi mesh conf handle
+ * @param[out] gate_announcements Gate Announcement
+ *
+ *
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #WIFI_MESH_ERROR_NONE Successful
+ * @retval #WIFI_MESH_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @see wifi_mesh_get_meshconf_info()
+ * @see wifi_mesh_destroy_meshconf_info()
+ *
+ */
+int wifi_mesh_get_meshconf_gate_announcements(
+                               wifi_mesh_meshconf_info_h meshconf,
+                               guchar *gate_announcements);
+
 #ifdef __cplusplus
 }
 #endif
index 15ebee56a4f00ce76cb23984775afdb65d89564a..049ebfcd272c0788f9116ae54b54a9990a2b5b9b 100644 (file)
@@ -146,6 +146,7 @@ struct mesh_meshconf_dump_s {
        guint hwmp_active_path_timeout; /**< HWMP Active Path Timeout */
        guchar element_ttl; /**< Element TTL */
        gushort hwmp_rann_interval; /**< HWMP RANN Interval */
+       guchar gate_announcements; /**< Gate Announcements */
 };
 
 #define NOTUSED(var) (var = var)
index 22ecb027e89366f51b7da616641258ee1d9ba9dd..fcf74d920b34d5e93611e3ce78599eb7b7ffaa88 100644 (file)
@@ -1851,6 +1851,9 @@ int _wifi_mesh_get_meshconf_info(wifi_mesh_h handle,
                        } else if (strcasecmp(key, "HWMP_RANN_INTERVAL") == 0) {
                                meshparam->hwmp_rann_interval = g_variant_get_uint16(val);
                                LOGE("HWMP_RANN_INTERVAL=%u", meshparam->hwmp_rann_interval);
+                       } else if (strcasecmp(key, "GATE_ANNOUNCEMENTS") == 0) {
+                               meshparam->gate_announcements = g_variant_get_byte(val);
+                               LOGE("GATE_ANNOUNCEMENTS=%u", meshparam->gate_announcements);
                        }
                }
                /* LCOV_EXCL_STOP */
index e9319c57cef54ff9e47214f01810485dd105a5c2..be8cf2406107b0d8dc97decbf13426a10d60e217 100644 (file)
@@ -1273,3 +1273,23 @@ EXPORT_API int wifi_mesh_get_meshconf_hwmp_rann_interval(
 
        return rv;
 }
+
+EXPORT_API int wifi_mesh_get_meshconf_gate_announcements(
+                               wifi_mesh_meshconf_info_h meshconf, guchar *gate_announcements)
+{
+       int rv = WIFI_MESH_ERROR_NONE;
+       struct mesh_meshconf_dump_s *pdump = meshconf;
+
+       CHECK_FEATURE_SUPPORTED(MESH_FEATURE);
+
+       if (NULL == meshconf || NULL == gate_announcements) {
+               /* LCOV_EXCL_START */
+               LOGE("Invalid parameter");
+               return WIFI_MESH_ERROR_INVALID_PARAMETER;
+               /* LCOV_EXCL_STOP */
+       }
+
+       *gate_announcements = pdump->gate_announcements;
+
+       return rv;
+}
index 6d1c33d0edb176f0b87623d7375d936ac692b764..e5945a967fb70d921b5bf96a4d18a905bec7ff49 100644 (file)
@@ -819,6 +819,7 @@ static int run_get_meshconf_information(MManager *mm, struct menu_data *menu)
        guint hwmp_active_path_timeout; /**< HWMP Active Path Timeout */
        guchar element_ttl; /**< Element TTL */
        gushort hwmp_rann_interval; /**< HWMP RANN Interval */
+       guchar gate_announcements; /**< Gate Announcements */
        msg("Get Mesh Conf Information");
 
        g_idx = 1;
@@ -873,6 +874,10 @@ static int run_get_meshconf_information(MManager *mm, struct menu_data *menu)
                                                                &hwmp_rann_interval);
        if (WIFI_MESH_ERROR_NONE == ret)
                msg("hwmp_rann_interval = %u", hwmp_rann_interval);
+       ret = wifi_mesh_get_meshconf_gate_announcements(meshconf,
+                                                               &gate_announcements);
+       if (WIFI_MESH_ERROR_NONE == ret)
+               msg("gate_announcements = %u", gate_announcements);
 
        ret = wifi_mesh_destroy_meshconf_info(meshconf);
        if (WIFI_MESH_ERROR_NONE != ret) {