Fixed crash in accessing non allocated memory
[platform/core/connectivity/net-config.git] / include / wifi-tdls.h
index 9f8ef29..9301971 100755 (executable)
@@ -1,50 +1,59 @@
-/*\r
- * Network Configuration Module\r
- *\r
- * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- *\r
- */\r
-#ifndef __TIZEN_NETWORK_WIFI_TDLS_H__\r
-#define __TIZEN_NETWORK_WIFI_TDLS_H__\r
-\r
-#ifdef __cplusplus\r
-        extern "C" {\r
-#endif\r
-\r
-#include <glib.h>\r
-#include "netsupplicant.h"\r
-\r
-typedef struct {\r
-       int is_connected;\r
-       int hdcp;\r
-       int port;\r
-       int availability;\r
-       int tdls_support;\r
-       unsigned char ip_add[4];\r
-}wifi_tdls_wfd_info_s;\r
-\r
-void netconfig_wifi_tlds_connected_event(GVariant *message);\r
-void netconfig_wifi_tlds_disconnected_event(GVariant *message);\r
-void __netconfig_wifi_notify_tdls_connected_event(const char *peer_mac);\r
-gboolean handle_tdls_disconnect(Wifi *wifi, GDBusMethodInvocation *context, gchar *peer_mac_addr);\r
-gboolean handle_tdls_connected_peer(Wifi *wifi, GDBusMethodInvocation *context);\r
-\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-#endif /* __TIZEN_NETWORK_WIFI_TDLS_H__ */\r
-\r
+/*
+ * Network Configuration Module
+ *
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#ifndef __TIZEN_NETWORK_WIFI_TDLS_H__
+#define __TIZEN_NETWORK_WIFI_TDLS_H__
+
+#ifdef __cplusplus
+        extern "C" {
+#endif
+
+#include <glib.h>
+#include "netsupplicant.h"
+
+
+typedef enum {
+       NETCONFIG_ERROR_TDLS_NO_ERROR                           = 0x00,
+       NETCONFIG_ERROR_TDLS_FAIL_DISCOVER                      = 0x01,
+       NETCONFIG_ERROR_TDLS_FAIL_DISCONNECT            = 0x02,
+       NETCONFIG_ERROR_TDLS_FAIL_CONNECT                       = 0x03,
+       NETCONFIG_ERROR_TDLS_ALREADY_DONE                       = 0x04,
+       NETCONFIG_ERROR_TDLS_FAIL_CHANNEL_SWITCH        = 0x05,
+} netconfig_tdls_error_e;
+
+void netconfig_wifi_tdls_peer_found_event(GVariant *message);
+void netconfig_wifi_tdls_connected_event(GVariant *message);
+void netconfig_wifi_tdls_disconnected_event(GVariant *message);
+void __netconfig_wifi_notify_tdls_connected_event(const char *peer_mac);
+gboolean handle_tdls_disconnect(Wifi *wifi, GDBusMethodInvocation *context, gchar *peer_mac_addr);
+gboolean handle_tdls_connected_peer(Wifi *wifi, GDBusMethodInvocation *context);
+gboolean handle_tdls_connect(Wifi *wifi, GDBusMethodInvocation *context, gchar *peer_mac_Addr);
+gboolean handle_tdls_discover(Wifi *wifi, GDBusMethodInvocation *context, gchar *peer_mac_Addr);
+gboolean handle_tdls_channel_switch(Wifi *wifi, GDBusMethodInvocation *context,
+                       gchar *peer_mac_Addr, int freq);
+gboolean handle_tdls_cancel_channel_switch(Wifi *wifi, GDBusMethodInvocation *context,
+                       gchar *peer_mac_Addr);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TIZEN_NETWORK_WIFI_TDLS_H__ */
+