((enable) ? BLUETOOTH_DPM_BT_ALLOWED : \
BLUETOOTH_DPM_BT_RESTRICTED)
-
-#define MOBILEAP_INTERFACE \
- "org.tizen.MobileapAgent", \
- "/MobileapAgent", \
- "org.tizen.tethering"
-
namespace DevicePolicyManager {
namespace {
if (!SetPolicyAllowed(context, "bluetooth-tethering", enable)) {
return 0;
}
-
- dbus::Connection &systemDBus = dbus::Connection::getSystem();
- systemDBus.methodcall(MOBILEAP_INTERFACE,
- "change_policy",
- -1,
- "",
- "(sb)",
- "bluetooth-tethering",
- enable);
} catch (runtime::Exception& e) {
ERROR("Failed to change bluetooth tethering state");
return -1;
"org.tizen.system.deviced.SysNoti", \
"control"
-#define MOBILEAP_INTERFACE \
- "org.tizen.MobileapAgent", \
- "/MobileapAgent", \
- "org.tizen.tethering"
-
namespace DevicePolicyManager {
namespace {
if (!SetPolicyAllowed(context, "usb-tethering", enable)) {
return 0;
}
-
- dbus::Connection &systemDBus = dbus::Connection::getSystem();
- systemDBus.methodcall(MOBILEAP_INTERFACE,
- "change_policy",
- -1,
- "",
- "(sb)",
- "usb-tethering",
- enable);
} catch (runtime::Exception& e) {
ERROR("Failed to change USB tethering state");
return -1;
"/net/netconfig/network", \
"net.netconfig.network"
-#define MOBILEAP_INTERFACE \
- "org.tizen.MobileapAgent", \
- "/MobileapAgent", \
- "org.tizen.tethering"
-
namespace DevicePolicyManager {
namespace {
if (!SetPolicyAllowed(context, "wifi-hotspot", enable)) {
return 0;
}
-
- dbus::Connection &systemDBus = dbus::Connection::getSystem();
- systemDBus.methodcall(MOBILEAP_INTERFACE,
- "change_policy",
- -1,
- "",
- "(sb)",
- "wifi-hotspot",
- enable);
} catch (runtime::Exception& e) {
ERROR("Failed to change Wi-Fi hotspot state");
return -1;