Refactoring for tethering channel value
[platform/core/api/tethering.git] / include / tethering_private.h
index 3999a72..b555868 100644 (file)
@@ -84,8 +84,7 @@ extern "C" {
 #define TETHERING_USB_FEATURE          "http://tizen.org/feature/network.tethering.usb"
 #define TETHERING_WIFI_FEATURE         "http://tizen.org/feature/network.tethering.wifi"
 
-typedef enum
-{
+typedef enum {
        TETHERING_SUPPORTED_FEATURE,
        TETHERING_SUPPORTED_FEATURE_WIFI,
        TETHERING_SUPPORTED_FEATURE_BT,
@@ -96,7 +95,7 @@ typedef enum
 #define CHECK_FEATURE_SUPPORTED(...) \
        do { \
                int rv = _tethering_check_feature_supported(__VA_ARGS__, NULL); \
-               if(rv != TETHERING_ERROR_NONE) { \
+               if (rv != TETHERING_ERROR_NONE) { \
                        return rv; \
                } \
        } while (0)
@@ -117,7 +116,7 @@ int _tethering_check_feature_supported(const char* feature, ...);
 * Common configuration
 */
 #define TETHERING_TYPE_MAX             5       /**< All, USB, Wi-Fi, BT, Wi-Fi AP */
-#define TETHERING_STR_INFO_LEN         20      /**< length of the ip or mac address */
+#define TETHERING_STR_INFO_LEN 40      /**< length of the ip or mac address */
 
 /**
 * Mobile AP error code
@@ -156,6 +155,9 @@ typedef enum {
        MOBILE_AP_ENABLE_BT_TETHERING_CFM,
        MOBILE_AP_DISABLE_BT_TETHERING_CFM,
 
+       MOBILE_AP_ENABLE_P2P_TETHERING_CFM,
+       MOBILE_AP_DISABLE_P2P_TETHERING_CFM,
+
        MOBILE_AP_GET_STATION_INFO_CFM,
        MOBILE_AP_GET_DATA_PACKET_USAGE_CFM
 } mobile_ap_event_e;
@@ -164,6 +166,7 @@ typedef enum {
        MOBILE_AP_TYPE_WIFI,
        MOBILE_AP_TYPE_USB,
        MOBILE_AP_TYPE_BT,
+       MOBILE_AP_TYPE_P2P,
        MOBILE_AP_TYPE_MAX,
 } mobile_ap_type_e;
 
@@ -178,7 +181,6 @@ typedef enum {
        E_SIGNAL_NO_DATA_TIMEOUT,
        E_SIGNAL_LOW_BATTERY_MODE,
        E_SIGNAL_FLIGHT_MODE,
-       E_SIGNAL_POWER_SAVE_MODE,
        E_SIGNAL_SECURITY_TYPE_CHANGED,
        E_SIGNAL_SSID_VISIBILITY_CHANGED,
        E_SIGNAL_PASSPHRASE_CHANGED,
@@ -245,6 +247,7 @@ typedef enum {
 */
 
 #define TETHERING_DEFAULT_SSID "Tizen"
+#define TETHERING_WIFI_CHANNEL 6
 #define TETHERING_WIFI_SECURITY_TYPE_OPEN_STR          "open"
 #define TETHERING_WIFI_SECURITY_TYPE_WPA2_PSK_STR      "wpa2-psk"
 #define TETHERING_WIFI_SECURITY_TYPE_WPS_STR   "wps"
@@ -292,7 +295,6 @@ typedef struct {
        bool port_forwarding;
        bool port_filtering;
        bool dhcp_enabled;
-       bool change_mac;
        int channel;
        int wifi_max_connected;
 } __tethering_h;
@@ -324,6 +326,10 @@ typedef struct {
        int channel;
 } _softap_settings_t;
 
+void _tethering_add_handle(tethering_h handle);
+void _tethering_remove_handle(tethering_h handle);
+bool _tethering_check_handle(tethering_h handle);
+
 #ifdef __cplusplus
 }
 #endif