Remove unused 'wifi_manager_get_vsie_list' CAPI. 50/158950/2 submit/tizen/20171108.071810
authorNiraj Kumar Goit <niraj.g@samsung.com>
Mon, 6 Nov 2017 06:01:40 +0000 (11:31 +0530)
committertaesub kim <taesub.kim@samsung.com>
Wed, 8 Nov 2017 01:28:24 +0000 (01:28 +0000)
Change-Id: I24ea0d0deb3e6e9b96528c9478ac6cc553537da1
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
include/network_dbus.h
include/network_interface.h
include/wifi_internal.h
include/wifi_manager_extension.h
src/network_dbus.c
src/network_interface.c
src/wifi_internal.c
src/wifi_manager.c

index 8d86a87..3b8e8df 100755 (executable)
@@ -147,7 +147,6 @@ int _net_dbus_get_autoscan(gboolean *autoscan);
 int _net_dbus_add_vsie(unsigned int frame_id, const char *vsie_str);
 int _net_dbus_get_vsie(unsigned int frame_id, char **vsie_str);
 int _net_dbus_remove_vsie(unsigned int frame_id, const char *vsie_str);
-int _net_dbus_get_vsie_list(GSList **vsie_list);
 int _net_dbus_flush_bss(void);
 int _net_dbus_get_auto_connect_mode(int *connect_mode);
 int _net_dbus_set_auto_connect_mode(int connect_mode);
index 8e823f3..df57edb 100755 (executable)
@@ -222,11 +222,6 @@ typedef struct {
        net_wifi_eap_auth_type_e eap_auth_type;
 } net_eap_config_s;
 
-typedef struct {
-       char *elem;     //vendor element
-       int length;     //size of vendor element
-} net_vsie_data_s;
-
 typedef void (*net_event_cb)(const net_event_info_s* net_event, void* user_data);
 
 int net_register_client_ext(net_event_cb event_cb, void *user_data);
@@ -258,7 +253,6 @@ int net_multi_scan_wifi(GSList *specific_scan_list, int type);
 int net_wifi_add_vsie(unsigned int frame_id, const char *vsie_str);
 int net_wifi_get_vsie(unsigned int frame_id, char **vsie_str);
 int net_wifi_remove_vsie(unsigned int frame_id, const char *vsie_str);
-int net_wifi_get_vsie_list(GSList **vsie_list);
 int net_wifi_flush_bss(void);
 int net_wifi_get_auto_connect_mode(int *connect_mode);
 int net_wifi_set_auto_connect_mode(int connect_mode);
index e16bd81..41901ea 100755 (executable)
@@ -289,7 +289,6 @@ int _wifi_get_vsie(wifi_manager_h wifi,
                wifi_manager_vsie_frames_e frame_id, char **vsie_str);
 int _wifi_remove_vsie(wifi_manager_h wifi,
                wifi_manager_vsie_frames_e frame_id, const char *vsie_str);
-int _wifi_get_vsie_list(wifi_manager_vsie_list_cb callback, void *user_data);
 
 int _wifi_flush_bss(void);
 int _wifi_get_auto_connect(int *connect_mode);
index 16a5cc9..7945273 100755 (executable)
@@ -92,20 +92,6 @@ typedef enum {
 */
 
 /**
- * @brief Called when you get the vsie repeatedly.
- * @since_tizen 4.0
- *
- * @param[in] vsie           The vsie data
- * @param[in] length         The length of vsie data
- * @param[in] user_data      The user data passed from the request function
- *
- * @return @c true to continue with the next iteration of the loop, \n
- *           otherwise @c false to break out of the loop
- * @see wifi_manager_get_vsie_list()
- */
-typedef bool(*wifi_manager_vsie_list_cb)(char* vsie, int length, void* user_data);
-
-/**
  * @brief Enables or disables auto-scanning
  * @details If auto-scanning is disabled, then background scan and wps scan don't work.
  * By default, the auto-scanning is enabled automatically until disabling auto-scanning.
@@ -250,25 +236,6 @@ int wifi_manager_remove_vsie(wifi_manager_h wifi,
                wifi_manager_vsie_frames_e frame_id, const char *vsie_str);
 
 /**
- * @brief Gets the vsie result of the scan.
- * @since_tizen 4.0
- *
- * @param[in] wifi           The Wi-Fi handle
- * @param[in] callback       The callback to be called
- * @param[in] user_data      The user data passed to the callback function
- *
- * @return 0 on success, otherwise negative error value
- * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
- * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
- * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
- * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
- * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
- * @post This function invokes wifi_manager_vsie_list_cb().
- */
-int wifi_manager_get_vsie_list(wifi_manager_h wifi,
-               wifi_manager_vsie_list_cb callback, void *user_data);
-
-/**
  * @brief Gets the vsie result of the AP.
  * @since_tizen 5.0
  * @remarks @a vsie must be released with free().
index 29f13cd..81656e0 100755 (executable)
@@ -2017,91 +2017,6 @@ int _net_dbus_remove_vsie(unsigned int frame_id, const char *vsie_str)
        return Error;
 }
 
-static int _net_get_vsies(GVariant *msg, GSList **vsie_list)
-{
-       WIFI_LOG(WIFI_INFO, "Extract vsie data");
-
-       GVariant *var;
-       GVariantIter *iter, *next;
-       char *obj;
-       gchar *key;
-
-       g_variant_get(msg, "(a(oa{sv}))", &iter);
-       while (g_variant_iter_loop(iter, "(oa{sv})", &obj, &next)) {
-               if (obj == NULL || g_str_has_prefix(obj, CONNMAN_WIFI_SERVICE_PROFILE_PREFIX) == false)
-                       continue;
-
-               while (g_variant_iter_loop(next, "{sv}", &key, &var)) {
-                       if (g_strcmp0(key, "Vsie") == 0) {
-                               const char *vsie = NULL;
-                               net_vsie_data_s *vendor_data;
-                               gsize vsie_len;
-                               int i;
-
-                               vsie = g_variant_get_fixed_array(var, &vsie_len, sizeof(guchar));
-
-                               if (vsie) {
-                                       vendor_data = (net_vsie_data_s*)g_try_malloc0(sizeof(net_vsie_data_s));
-                                       if (vendor_data) {
-                                               vendor_data->length = vsie_len;
-                                               vendor_data->elem = (char *)g_try_malloc0(vsie_len);
-                                               if (vendor_data->elem)
-                                                       memcpy(vendor_data->elem, vsie, vsie_len);
-                                               else {
-                                                       WIFI_LOG(WIFI_ERROR, "Failed to allocate memory");
-                                                       g_free(vendor_data);
-                                                       g_free(obj);
-                                                       g_free(key);
-                                                       g_free(var);
-                                                       g_variant_iter_free(next);
-                                                       g_variant_iter_free(iter);
-                                                       return -1;
-                                               }
-
-                                               WIFI_LOG(WIFI_INFO, "VSIE Len: %d", vendor_data->length);
-                                               for (i = 0; i < vsie_len; i++)
-                                                       WIFI_LOG(WIFI_INFO, "vendor elem: %02x", vendor_data->elem[i]);
-
-                                               *vsie_list = g_slist_append(*vsie_list, (void *)vendor_data);
-                                       }
-                               }
-                       }
-               }
-       }
-       g_variant_iter_free(iter);
-
-       return NET_ERR_NONE;
-}
-
-int _net_dbus_get_vsie_list(GSList **vsie_list)
-{
-       __NETWORK_FUNC_ENTER__;
-
-       net_err_e Error = NET_ERR_NONE;
-       GVariant *message = NULL;
-
-       message = _net_invoke_dbus_method(
-                       CONNMAN_SERVICE,
-                       CONNMAN_MANAGER_PATH,
-                       CONNMAN_MANAGER_INTERFACE,
-                       "GetVsies",
-                       NULL,
-                       &Error);
-
-       if (message == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Failed to get vsie info");
-               __NETWORK_FUNC_EXIT__;
-               return Error;
-       }
-
-       Error = _net_get_vsies(message, vsie_list);
-
-       g_variant_unref(message);
-
-       __NETWORK_FUNC_EXIT__;
-       return Error;
-}
-
 int _net_dbus_flush_bss(void)
 {
        __NETWORK_FUNC_ENTER__;
index e656b1e..3fb7b86 100755 (executable)
@@ -1756,43 +1756,6 @@ int net_wifi_remove_vsie(unsigned int frame_id, const char *vsie_str)
        return Error;
 }
 
-int net_wifi_get_vsie_list(GSList **vsie_list)
-{
-       __NETWORK_FUNC_ENTER__;
-
-       net_err_e Error = NET_ERR_NONE;
-
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       if (NetworkInfo.wifi_state == WIFI_OFF) {
-               if ((NetworkInfo.wifi_state = _net_get_wifi_state(&Error)) == WIFI_OFF) {
-                       WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered off!");
-                       __NETWORK_FUNC_EXIT__;
-                       return NET_ERR_INVALID_OPERATION;
-               }
-       }
-
-       if (_net_dbus_is_pending_call_used() == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "pending call in progress");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_INVALID_OPERATION;
-       }
-
-       Error = _net_dbus_get_vsie_list(vsie_list);
-       if (Error != NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR,
-                       "_net_dbus_get_vsie_list failed. Error [%s]",
-                       _net_print_error(Error));
-       }
-
-       __NETWORK_FUNC_EXIT__;
-       return Error;
-}
-
 EXPORT_API int net_wifi_flush_bss(void)
 {
        __NETWORK_CAPI_FUNC_ENTER__;
index a5d5b2b..4b8cb68 100755 (executable)
@@ -1728,40 +1728,6 @@ int _wifi_remove_vsie(wifi_manager_h wifi,
        return WIFI_MANAGER_ERROR_OPERATION_FAILED;
 }
 
-int _wifi_get_vsie_list(wifi_manager_vsie_list_cb callback, void *user_data)
-{
-       int rv;
-       GSList *vsie_list = NULL;
-
-       rv = net_wifi_get_vsie_list(&vsie_list);
-
-       if (rv == NET_ERR_ACCESS_DENIED) {
-               WIFI_LOG(WIFI_ERROR, "Access denied");
-               return WIFI_MANAGER_ERROR_PERMISSION_DENIED;
-       } else if (rv == NET_ERR_INVALID_OPERATION) {
-               WIFI_LOG(WIFI_ERROR, "Invalid Operation");
-               return WIFI_MANAGER_ERROR_INVALID_OPERATION;
-       } else if (rv == NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR, "Error None");
-               GSList *list;
-               int ret;
-               for (list = vsie_list; list; list = list->next) {
-                       ret = callback((char *)((net_vsie_data_s *)list->data)->elem,
-                                       ((net_vsie_data_s *)list->data)->length, user_data);
-                       if (ret == false)
-                               break;
-               }
-
-               g_slist_free_full(vsie_list, g_free);
-               vsie_list = NULL;
-
-               return WIFI_MANAGER_ERROR_NONE;
-       }
-
-       WIFI_LOG(WIFI_ERROR, "Operation Failed");
-       return WIFI_MANAGER_ERROR_OPERATION_FAILED;
-}
-
 int _wifi_flush_bss(void)
 {
        int rv;
index 442cfec..eb33cb5 100755 (executable)
@@ -1212,24 +1212,6 @@ EXPORT_API int wifi_manager_remove_vsie(wifi_manager_h wifi,
        return _wifi_remove_vsie(wifi, frame_id, vsie_str);
 }
 
-EXPORT_API int wifi_manager_get_vsie_list(wifi_manager_h wifi,
-                       wifi_manager_vsie_list_cb callback, void *user_data)
-{
-       __NETWORK_CAPI_FUNC_ENTER__;
-
-       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
-
-       WIFI_LOG(WIFI_INFO,  "WiFi get vsies\n");
-       if (callback == NULL || !(__wifi_check_handle_validity(wifi))) {
-               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
-               __NETWORK_CAPI_FUNC_EXIT__;
-               return WIFI_MANAGER_ERROR_INVALID_PARAMETER;
-       }
-
-       __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_get_vsie_list(callback, user_data);
-}
-
 EXPORT_API int wifi_manager_flush_bss(wifi_manager_h wifi)
 {
        __NETWORK_CAPI_FUNC_ENTER__;