Change dbus service name for mobileap-agent and add test case for getting channel...
[platform/core/api/tethering.git] / include / tethering_private.h
index 29c9e4d..3572e13 100644 (file)
@@ -83,17 +83,24 @@ 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
+{
+       TETHERING_SUPPORTED_FEATURE,
+       TETHERING_SUPPORTED_FEATURE_WIFI,
+       TETHERING_SUPPORTED_FEATURE_BT,
+       TETHERING_SUPPORTED_FEATURE_USB,
+       TETHERING_SUPPORTED_FEATURE_MAX,
+} tethering_supported_feature_e;
+
 #define CHECK_FEATURE_SUPPORTED(...) \
        do { \
-               int rv = tethering_check_feature_supported(__VA_ARGS__, NULL); \
+               int rv = _tethering_check_feature_supported(__VA_ARGS__, NULL); \
                if(rv != TETHERING_ERROR_NONE) { \
-                       ERR("Not supported\n"); \
-                       set_last_result(TETHERING_ERROR_NOT_SUPPORT_API); \
-                       return TETHERING_ERROR_NOT_SUPPORT_API; \
+                       return rv; \
                } \
        } while (0)
 
-int tethering_check_feature_supported(const char* feature, ...);
+int _tethering_check_feature_supported(const char* feature, ...);
 
 /**
 * Start of mobileap-agent common values
@@ -184,8 +191,8 @@ typedef enum {
        E_SIGNAL_MAX
 } mobile_ap_sig_e;
 
-#define TETHERING_SERVICE_OBJECT_PATH  "/Tethering"
-#define TETHERING_SERVICE_NAME         "org.tizen.tethering"
+#define TETHERING_SERVICE_OBJECT_PATH  "/MobileapAgent"
+#define TETHERING_SERVICE_NAME         "org.tizen.MobileapAgent"
 #define TETHERING_SERVICE_INTERFACE    "org.tizen.tethering"
 
 #define TETHERING_SIGNAL_MATCH_RULE    "type='signal',interface='org.tizen.tethering'"
@@ -232,6 +239,8 @@ typedef enum {
 #define TETHERING_WIFI_KEY_MAX_LEN     64      /**< Maximum length of wifi key */
 #define TETHERING_WIFI_HASH_KEY_MAX_LEN        64
 
+#define TETHERING_WIFI_MODE_MAX_LEN 10  /**< Maximum length of mode */
+
 #define VCONFKEY_MOBILE_HOTSPOT_SSID   "memory/private/mobileap-agent/ssid"
 #define TETHERING_PASSPHRASE_PATH      "wifi_tethering.txt"
 #define TETHERING_WIFI_PASSPHRASE_STORE_KEY "tethering_wifi_passphrase"
@@ -241,8 +250,7 @@ typedef enum {
 * End of mobileap-agent common values
 */
 
-#define TETHERING_DEFAULT_SSID                         "Redwood"
-#define TETHERING_DEFAULT_PASSPHRASE                   "eoiugkl!"
+#define TETHERING_DEFAULT_SSID "Tizen"
 #define TETHERING_WIFI_SECURITY_TYPE_OPEN_STR          "open"
 #define TETHERING_WIFI_SECURITY_TYPE_WPA2_PSK_STR      "wpa2-psk"
 #define TETHERING_ERROR_RECOVERY_MAX                   3
@@ -286,7 +294,11 @@ typedef struct {
        char *ap_ssid;
        char passphrase[TETHERING_WIFI_KEY_MAX_LEN + 1];
        tethering_wifi_security_type_e sec_type;
+       tethering_wifi_mode_type_e mode_type;
        bool visibility;
+       bool mac_filter;
+       bool dhcp_enabled;
+       int channel;
 } __tethering_h;
 
 typedef struct {
@@ -308,8 +320,11 @@ typedef struct {
 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];
        tethering_wifi_security_type_e sec_type;
        bool visibility;
+       bool mac_filter;
+       int channel;
 } _softap_settings_t;
 
 #ifdef __cplusplus