BuildRequires: pkgconfig(alarm-service)
BuildRequires: pkgconfig(capi-network-connection)
BuildRequires: pkgconfig(capi-network-wifi-manager)
+BuildRequires: pkgconfig(capi-system-device)
BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(deviced)
BuildRequires: pkgconfig(dlog)
#include <netinet/in.h>
#include <arpa/inet.h>
#include <gio/gio.h>
+#include <device/usb-gadget.h>
#include "mobileap.h"
#include "mobileap_common.h"
vconf_keynode_get_name(key), vconf_key);
if (_mobileap_is_enabled(MOBILE_AP_STATE_USB)) {
- if (vconf_key != SET_USB_RNDIS) {
+ if ((vconf_key & USB_GADGET_FUNC_RNDIS) == 0) {
DBG("Is progressing for usb mode change\n");
return;
}
if (ret != 0)
ERR("vconf_get_int is failed. but ignored [%d]\n", ret);
- if (vconf_key != SET_USB_RNDIS) {
+ if ((vconf_key & USB_GADGET_FUNC_RNDIS) == 0) {
ERR("USB Mode is changed suddenly\n");
if (!_mobileap_get_ipv6_state(MOBILE_AP_STATE_USB))
_disable_usb_tethering(obj, MOBILE_AP_ADDRESS_TYPE_IPV4);
g_free(usb_hw_addr);
g_free(usb_ipv6_addr);
} else {
- if (vconf_key == SET_USB_RNDIS) {
+ if (vconf_key & USB_GADGET_FUNC_RNDIS) {
DBG("Is progressing for usb mode change\n");
return;
}
{
mobile_ap_error_code_e ret = MOBILE_AP_ERROR_NONE;
int vconf_ret;
- int usb_mode = SET_USB_NONE;
+ int usb_mode = USB_GADGET_FUNC_NONE;
char *usb_hw_addr = NULL;
char *usb_ipv6_addr = NULL;
goto FAIL;
}
- if (usb_mode == SET_USB_RNDIS) {
+ if (usb_mode & USB_GADGET_FUNC_RNDIS) {
vconf_ignore_key_changed(VCONFKEY_USB_CUR_MODE,
__handle_usb_mode_change);
if (address_type == MOBILE_AP_ADDRESS_TYPE_IPV4) {
GDBusMethodInvocation *context, mobile_ap_address_type_e address_type)
{
mobile_ap_error_code_e ret = MOBILE_AP_ERROR_NONE;
- int usb_mode = SET_USB_NONE;
+ int usb_mode = USB_GADGET_FUNC_NONE;
int vconf_ret = 0;
DBG("+\n");
goto DONE;
}
- if (usb_mode != SET_USB_RNDIS) {
+ if ((usb_mode & USB_GADGET_FUNC_RNDIS) != 0) {
DBG("Don't need to wait for usb-setting\n"); //LCOV_EXCL_LINE
goto DONE;
}