X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Ftethering_private.h;h=b6a36c23df80722c9d4ac3d1480ccb710448762c;hb=HEAD;hp=e5797c1f9837adbd54f9f4bf238d79ca8e1a8658;hpb=49586aa2baca979d09a7ba69e054b34073c6b248;p=platform%2Fcore%2Fapi%2Ftethering.git diff --git a/include/tethering_private.h b/include/tethering_private.h index e5797c1..b6a36c2 100644 --- a/include/tethering_private.h +++ b/include/tethering_private.h @@ -77,6 +77,23 @@ extern "C" { } while (0) /** + * To lock and unlock Mutex + */ + +#define TETHERING_LOCK \ + do { \ + _tethering_lock(); \ + } while(0) + +#define TETHERING_UNLOCK \ + do { \ + _tethering_unlock(); \ + } while(0) + +void _tethering_lock(void); +void _tethering_unlock(void); + +/** * To check supported feature */ @@ -117,6 +134,9 @@ int _tethering_check_feature_supported(const char* feature, ...); * Common configuration */ #define TETHERING_STR_INFO_LEN 40 /**< length of the ip or mac address */ +#define TETHERING_IPV4_ADDRESS_MAX_LEN 15 /**< Maximum length of IP address */ +#define TETHERING_IPV4_ADDRESS_MIN_LEN 7 /**< Minimum length of IP address */ + /** * Mobile AP error code @@ -174,6 +194,8 @@ typedef enum { E_SIGNAL_NET_CLOSED = 0, E_SIGNAL_WIFI_TETHER_ON, E_SIGNAL_WIFI_TETHER_OFF, + E_SIGNAL_P2P_TETHER_ON, + E_SIGNAL_P2P_TETHER_OFF, E_SIGNAL_USB_TETHER_ON, E_SIGNAL_USB_TETHER_OFF, E_SIGNAL_BT_TETHER_ON, @@ -200,6 +222,8 @@ typedef enum { #define SIGNAL_NAME_STA_DISCONNECT "sta_disconnected" #define SIGNAL_NAME_WIFI_TETHER_ON "wifi_on" #define SIGNAL_NAME_WIFI_TETHER_OFF "wifi_off" +#define SIGNAL_NAME_P2P_TETHER_ON "p2p_on" +#define SIGNAL_NAME_P2P_TETHER_OFF "p2p_off" #define SIGNAL_NAME_USB_TETHER_ON "usb_on" #define SIGNAL_NAME_USB_TETHER_OFF "usb_off" #define SIGNAL_NAME_BT_TETHER_ON "bluetooth_on" @@ -295,6 +319,7 @@ typedef struct { char passphrase[TETHERING_WIFI_KEY_MAX_LEN + 1]; tethering_wifi_security_type_e sec_type; tethering_wifi_mode_type_e mode_type; + char ip_address[TETHERING_IPV4_ADDRESS_MAX_LEN + 1]; bool visibility; bool mac_filter; bool port_forwarding; @@ -327,6 +352,7 @@ typedef struct { char ssid[TETHERING_WIFI_SSID_MAX_LEN + 1]; char key[TETHERING_WIFI_KEY_MAX_LEN + 1]; char mode[TETHERING_WIFI_MODE_MAX_LEN + 1]; + char ip_address[TETHERING_IPV4_ADDRESS_MAX_LEN + 1]; tethering_wifi_security_type_e sec_type; bool visibility; bool mac_filter;