/usr/include/osp/base
/usr/include/osp/io
/usr/include/osp/security
+ /usr/include/osp/system
/usr/include/vconf
/usr/include/wifi-direct
)
#include <FNetNetAccountManager.h>
#include <FBaseSysLog.h>
#include <FSec_AccessController.h>
+#include <FSys_SystemInfoImpl.h>
#include "FNet_NetAccountManagerImpl.h"
using namespace std;
using namespace Tizen::Base;
using namespace Tizen::Base::Collection;
using namespace Tizen::Security;
+using namespace Tizen::System;
namespace Tizen { namespace Net
{
SysTryReturn(NID_NET, r == E_SUCCESS, INVALID_HANDLE, r,
"[%s] The application does not have the privilege to call this method.", GetErrorMessage(r));
+#ifndef _OSP_EMUL_
+ static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony";
+
+ bool isTelephonySupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_TELEPHONY, isTelephonySupported);
+ SysTryReturn(NID_NET, r == E_SUCCESS && isTelephonySupported, INVALID_HANDLE, E_UNSUPPORTED_OPERATION,
+ "[%s] Telephony is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION));
+#endif // !_OSP_EMUL_
+
SysAssertf(__pNetAccountManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
netAccountId = __pNetAccountManagerImpl->CreateNetAccount(netAccountInfo);
SysTryReturnResult(NID_NET, r == E_SUCCESS, r,
"[%s] The application does not have the privilege to call this method.", GetErrorMessage(r));
+#ifndef _OSP_EMUL_
+ static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony";
+
+ bool isTelephonySupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_TELEPHONY, isTelephonySupported);
+ SysTryReturnResult(NID_NET, r == E_SUCCESS && isTelephonySupported, E_UNSUPPORTED_OPERATION, "Telephony is not supported.");
+#endif // !_OSP_EMUL_
+
SysAssertf(__pNetAccountManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
r = __pNetAccountManagerImpl->UpdateNetAccount(netAccountInfo);
SysAssertf(__pNetAccountManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
+#ifndef _OSP_EMUL_
+ if (netBearerType == NET_BEARER_PS)
+ {
+ static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony";
+
+ bool isTelephonySupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_TELEPHONY, isTelephonySupported);
+ SysTryReturn(NID_NET, r == E_SUCCESS && isTelephonySupported, INVALID_HANDLE, E_UNSUPPORTED_OPERATION,
+ "[%s] Telephony is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION));
+ }
+ else if (netBearerType == NET_BEARER_WIFI)
+ {
+ static const wchar_t _WIFI[] = L"http://tizen.org/feature/network.wifi";
+
+ bool isWifiSupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_WIFI, isWifiSupported);
+ SysTryReturn(NID_NET, r == E_SUCCESS && isWifiSupported, INVALID_HANDLE, E_UNSUPPORTED_OPERATION,
+ "[%s] Wi-Fi is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION));
+ }
+ else if (netBearerType == NET_BEARER_WIFI_DIRECT)
+ {
+ static const wchar_t _WIFI_DIRECT[] = L"http://tizen.org/feature/network.wifi.direct";
+
+ bool isWifiDirectSupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_WIFI_DIRECT, isWifiDirectSupported);
+ SysTryReturn(NID_NET, r == E_SUCCESS && isWifiDirectSupported, INVALID_HANDLE, E_UNSUPPORTED_OPERATION,
+ "[%s] Wi-Fi direct is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION));
+ }
+ else if (netBearerType == NET_BEARER_USB)
+ {
+ static const wchar_t _USB[] = L"http://tizen.org/feature/usb.host";
+
+ bool isUsbSupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_USB, isUsbSupported);
+ SysTryReturn(NID_NET, r == E_SUCCESS && isUsbSupported, INVALID_HANDLE, E_UNSUPPORTED_OPERATION,
+ "[%s] USB is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION));
+ }
+// ToDo - Check MMS after MMS feature key works well.
+// else if (netBearerType == NET_BEARER_MMS)
+// {
+// static const wchar_t _MMS[] = L"http://tizen.org/feature/network.telephony.mms";
+//
+// bool isMmsSupported = false;
+//
+// r = _SystemInfoImpl::GetSysInfo(_MMS, isMmsSupported);
+// SysTryReturn(NID_NET, r == E_SUCCESS && isMmsSupported, INVALID_HANDLE, E_UNSUPPORTED_OPERATION,
+// "[%s] MMS is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION));
+// }
+#endif // !_OSP_EMUL_
+
netAccountId = __pNetAccountManagerImpl->GetNetAccountId(netBearerType);
r = GetLastResult();
SysTryReturn(NID_NET, netAccountId != INVALID_HANDLE, INVALID_HANDLE, r, "[%s] Propagating.", GetErrorMessage(r));
SysTryReturnResult(NID_NET, r == E_SUCCESS, r,
"[%s] The application does not have the privilege to call this method.", GetErrorMessage(r));
+#ifndef _OSP_EMUL_
+ if (netPreference == NET_WIFI_ONLY)
+ {
+ static const wchar_t _WIFI[] = L"http://tizen.org/feature/network.wifi";
+
+ bool isWifiSupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_WIFI, isWifiSupported);
+ SysTryReturnResult(NID_NET, r == E_SUCCESS && isWifiSupported, E_UNSUPPORTED_OPERATION, "Wi-Fi is not supported.");
+ }
+ else if (netPreference == NET_PS_ONLY)
+ {
+ static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony";
+
+ bool isTelephonySupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_TELEPHONY, isTelephonySupported);
+ SysTryReturnResult(NID_NET, r == E_SUCCESS && isTelephonySupported, E_UNSUPPORTED_OPERATION, "Telephony is not supported.");
+ }
+#endif // !_OSP_EMUL_
SysAssertf(__pNetAccountManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
#include <FNetNetAccountManager.h>
#include <FBaseSysLog.h>
#include <FSec_AccessController.h>
+#include <FSys_SystemInfoImpl.h>
#include "FNet_NetTypes.h"
#include "FNet_NetAccountDatabase.h"
#include "FNet_NetAccountInfoImpl.h"
using namespace Tizen::Base;
using namespace Tizen::Security;
+using namespace Tizen::System;
namespace Tizen { namespace Net
{
SysAssertf(__pNetAccountManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
+#ifndef _OSP_EMUL_
+ if (netAccountInfo.GetAccountId() == _DEFAULT_PS_ACCOUNT_ID)
+ {
+ static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony";
+
+ bool isTelephonySupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_TELEPHONY, isTelephonySupported);
+ SysTryReturnResult(NID_NET, r == E_SUCCESS && isTelephonySupported, E_UNSUPPORTED_OPERATION, "Telephony is not supported.");
+ }
+// ToDo - Check MMS after MMS feature key works well.
+// else if (netAccountInfo.GetAccountId() == _DEFAULT_MMS_ACCOUNT_ID)
+// {
+// static const wchar_t _MMS[] = L"http://tizen.org/feature/network.telephony.mms";
+//
+// bool isMmsSupported = false;
+//
+// r = _SystemInfoImpl::GetSysInfo(_MMS, isMmsSupported);
+// SysTryReturnResult(NID_NET, r == E_SUCCESS && isMmsSupported, E_UNSUPPORTED_OPERATION, "MMS is not supported.");
+// }
+#endif // !_OSP_EMUL_
+
SysTryReturnResult(NID_NET, netAccountInfo.GetAccountId() > 0, E_INVALID_ARG,
"Invalid argument is used. accountId=%d", netAccountInfo.GetAccountId());
SysTryReturnResult(NID_NET, !netAccountInfo.GetAccountName().IsEmpty(), E_INVALID_ARG,
SysAssertf(__pNetAccountManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
+#ifndef _OSP_EMUL_
+ if (netProfileName.Equals(L"Internet", false))
+ {
+ static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony";
+
+ bool isTelephonySupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_TELEPHONY, isTelephonySupported);
+ SysTryReturn(NID_NET, r == E_SUCCESS && isTelephonySupported, INVALID_HANDLE, E_UNSUPPORTED_OPERATION,
+ "[%s] Telephony is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION));
+ }
+// ToDo - Check MMS after MMS feature key works well.
+// else if (netProfileName.Equals(L"Mms", false))
+// {
+// static const wchar_t _MMS[] = L"http://tizen.org/feature/network.telephony.mms";
+//
+// bool isMmsSupported = false;
+//
+// r = _SystemInfoImpl::GetSysInfo(_MMS, isMmsSupported);
+// SysTryReturn(NID_NET, r == E_SUCCESS && isMmsSupported, INVALID_HANDLE, E_UNSUPPORTED_OPERATION,
+// "[%s] MMS is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION));
+// }
+#endif // !_OSP_EMUL_
+
_NetIpcProxy* pProxy = _NetIpcProxy::GetInstance();
SysTryReturn(NID_NET, pProxy != null, INVALID_HANDLE, E_SYSTEM,
"[%s] A system error has been occurred. Failed to get an IPC proxy.", GetErrorMessage(E_SYSTEM));
#include <FNetNetConnectionManager.h>
#include <FBaseSysLog.h>
#include <FSec_AccessController.h>
+#include <FSys_SystemInfoImpl.h>
#include "FNet_NetConnectionManagerImpl.h"
using namespace Tizen::Base;
using namespace Tizen::Base::Collection;
using namespace Tizen::Security;
+using namespace Tizen::System;
namespace Tizen { namespace Net
{
SysTryReturnResult(NID_NET, r == E_SUCCESS, r,
"[%s] The application does not have the privilege to call this method.", GetErrorMessage(r));
+#ifndef _OSP_EMUL_
+ if (netPreference == NET_WIFI_ONLY)
+ {
+ static const wchar_t _WIFI[] = L"http://tizen.org/feature/network.wifi";
+
+ bool isWifiSupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_WIFI, isWifiSupported);
+ SysTryReturnResult(NID_NET, r == E_SUCCESS && isWifiSupported, E_UNSUPPORTED_OPERATION, "Wi-Fi is not supported.");
+ }
+ else if (netPreference == NET_PS_ONLY)
+ {
+ static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony";
+
+ bool isTelephonySupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_TELEPHONY, isTelephonySupported);
+ SysTryReturnResult(NID_NET, r == E_SUCCESS && isTelephonySupported, E_UNSUPPORTED_OPERATION, "Telephony is not supported.");
+ }
+#endif // !_OSP_EMUL_
+
SysAssertf(__pNetConnectionManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
r = __pNetConnectionManagerImpl->SetNetPreference(netPreference);
#include <FNet_NetTypes.h>
#include <FBaseSysLog.h>
#include <FSec_AccessController.h>
+#include <FSys_SystemInfoImpl.h>
#include "FNet_NetStatisticsImpl.h"
using namespace std;
using namespace Tizen::Base;
using namespace Tizen::Security;
+using namespace Tizen::System;
namespace Tizen { namespace Net
{
SysTryReturn(NID_NET, r == E_SUCCESS, INVALID_HANDLE, r,
"[%s] The application does not have the privilege to call this method.", GetErrorMessage(r));
+#ifndef _OSP_EMUL_
+ if (operationMode == NET_BEARER_WIFI)
+ {
+ static const wchar_t _WIFI[] = L"http://tizen.org/feature/network.wifi";
+
+ bool isWifiSupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_WIFI, isWifiSupported);
+ SysTryReturn(NID_NET, r == E_SUCCESS && isWifiSupported, INVALID_HANDLE, E_UNSUPPORTED_OPERATION,
+ "[%s] Wi-Fi is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION));
+ }
+ else if (operationMode == NET_BEARER_PS)
+ {
+ static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony";
+
+ bool isTelephonySupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_TELEPHONY, isTelephonySupported);
+ SysTryReturn(NID_NET, r == E_SUCCESS && isTelephonySupported, INVALID_HANDLE, E_UNSUPPORTED_OPERATION,
+ "[%s] Telephony is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION));
+ }
+#endif // !_OSP_EMUL_
+
SysAssertf(__pNetStatisticsImpl != null, "Not yet constructed. Construct() should be called before use.");
ret = __pNetStatisticsImpl->GetNetStatisticsInfo(operationMode, netStatType);
SysAssertf(__pNetStatisticsImpl != null, "Not yet constructed. Construct() should be called before use.");
+#ifndef _OSP_EMUL_
+ if (operationMode == NET_BEARER_WIFI)
+ {
+ static const wchar_t _WIFI[] = L"http://tizen.org/feature/network.wifi";
+
+ bool isWifiSupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_WIFI, isWifiSupported);
+ SysTryReturnResult(NID_NET, r == E_SUCCESS && isWifiSupported, E_UNSUPPORTED_OPERATION, "Wi-Fi is not supported.");
+ }
+ else if (operationMode == NET_BEARER_PS)
+ {
+ static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony";
+
+ bool isTelephonySupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_TELEPHONY, isTelephonySupported);
+ SysTryReturnResult(NID_NET, r == E_SUCCESS && isTelephonySupported, E_UNSUPPORTED_OPERATION, "Telephony is not supported.");
+ }
+#endif // !_OSP_EMUL_
+
r = __pNetStatisticsImpl->Reset(operationMode, netStatType);
SysTryReturnResult(NID_NET, r == E_SUCCESS, r, "Propagating.");
SysAssertf(__pNetStatisticsImpl != null, "Not yet constructed. Construct() should be called before use.");
+#ifndef _OSP_EMUL_
+ if (operationMode == NET_BEARER_WIFI)
+ {
+ static const wchar_t _WIFI[] = L"http://tizen.org/feature/network.wifi";
+
+ bool isWifiSupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_WIFI, isWifiSupported);
+ SysTryReturnResult(NID_NET, r == E_SUCCESS && isWifiSupported, E_UNSUPPORTED_OPERATION, "Wi-Fi is not supported.");
+ }
+ else if (operationMode == NET_BEARER_PS)
+ {
+ static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony";
+
+ bool isTelephonySupported = false;
+
+ r = _SystemInfoImpl::GetSysInfo(_TELEPHONY, isTelephonySupported);
+ SysTryReturnResult(NID_NET, r == E_SUCCESS && isTelephonySupported, E_UNSUPPORTED_OPERATION, "Telephony is not supported.");
+ }
+#endif // !_OSP_EMUL_
+
r = __pNetStatisticsImpl->ResetAll(operationMode);
SysTryReturnResult(NID_NET, r == E_SUCCESS, r, "Propagating.");