From 20e5b4e5c35c36b8c433695151b982b8a3b1dd0b Mon Sep 17 00:00:00 2001 From: Minjae Lee Date: Tue, 19 Mar 2013 11:26:17 +0900 Subject: [PATCH] Synchronized tizen_2.1 branch with master Change-Id: I3a7261dae429de37c3a568d7b8ab10b29fb5e3a0 Signed-off-by: Minjae Lee --- CMakeLists.txt | 1 + inc/FTelCallInfo.h | 1 - inc/FTelCallManager.h | 7 ++++--- inc/FTelITelephonyCallEventListener.h | 1 - inc/FTelITelephonyCallForwardListener.h | 6 ------ inc/FTelITelephonyNetworkEventListener.h | 1 - inc/FTelITelephonyNetworkSettingListener.h | 4 ---- inc/FTelNetworkInfo.h | 1 + inc/FTelNetworkManager.h | 1 + inc/FTelSimInfo.h | 5 +++-- inc/FTelSimStateManager.h | 1 + src/FTelCallManager.cpp | 14 ++++++++++++++ src/FTelNetworkInfo.cpp | 11 ++++++++++- src/FTelNetworkManager.cpp | 8 ++++++++ src/FTelSimInfo.cpp | 8 ++++++++ src/FTelSimStateManager.cpp | 8 ++++++++ src/FTel_SimEvent.h | 4 ++-- src/FTel_SimEventArg.cpp | 1 - src/FTel_SimManagerEvent.h | 6 +++--- src/FTel_SimManagerEventArg.h | 12 ++++-------- src/FTel_SimStateManagerImpl.cpp | 6 ------ 21 files changed, 68 insertions(+), 39 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ffc43d1..0512283 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,7 @@ INCLUDE_DIRECTORIES( /usr/include/osp/io /usr/include/osp/net /usr/include/osp/security + /usr/include/osp/system ) SET (${this_target}_SOURCE_FILES diff --git a/inc/FTelCallInfo.h b/inc/FTelCallInfo.h index efd3734..81626ce 100755 --- a/inc/FTelCallInfo.h +++ b/inc/FTelCallInfo.h @@ -71,7 +71,6 @@ public: * @since 2.0 * * @return The current call type - * @see Tizen::Telephony::CallType */ CallType GetCallType(void) const; diff --git a/inc/FTelCallManager.h b/inc/FTelCallManager.h index 58d00cd..e823109 100755 --- a/inc/FTelCallManager.h +++ b/inc/FTelCallManager.h @@ -118,6 +118,7 @@ public: * @return An error code * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. + * @exception E_UNSUPPORTED_OPERATION The device does not support the telephony feature. @b Since: @b 2.1 */ result Construct(void); @@ -131,7 +132,7 @@ public: * @param[in] listener The listener for change in status of a call * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. - * @see ITelephonyCallEventListener + * @exception E_UNSUPPORTED_OPERATION The device does not support the telephony feature. @b Since: @b 2.1 */ result Construct(ITelephonyCallEventListener& listener); @@ -222,7 +223,7 @@ public: * @since 2.0 * * @return The current call type, @n - * else TYPE_UNDEFINED_CALL if the method fails + * else @c TYPE_UNDEFINED_CALL if the method fails */ CallType GetCurrentCallType(void) const; @@ -232,7 +233,7 @@ public: * @since 2.0 * * @return The current call status, @n - * else CALL_STATUS_UNDEFINED if the method fails + * else @c CALL_STATUS_UNDEFINED if the method fails */ CallStatus GetCurrentCallStatus(void) const; diff --git a/inc/FTelITelephonyCallEventListener.h b/inc/FTelITelephonyCallEventListener.h index 00237d2..5bf8083 100644 --- a/inc/FTelITelephonyCallEventListener.h +++ b/inc/FTelITelephonyCallEventListener.h @@ -59,7 +59,6 @@ public: * * @param[in] callStatus The new status of a call * @param[in] pCallInfo The detailed information of a call - * @see Tizen::Telephony::CallStatus */ virtual void OnTelephonyCallStatusChangedN(CallStatus callStatus, CallInfo* pCallInfo) = 0; diff --git a/inc/FTelITelephonyCallForwardListener.h b/inc/FTelITelephonyCallForwardListener.h index 7f75574..82f08a4 100755 --- a/inc/FTelITelephonyCallForwardListener.h +++ b/inc/FTelITelephonyCallForwardListener.h @@ -30,18 +30,12 @@ namespace Tizen { namespace Telephony { /** - * @if VISPARTNER-OPERATOR - * * @interface ITelephonyCallForwardListener * @brief This interface provides methods to listen to the results of the call forwarding request. * * @since 2.0 * - * @visibility partner-operator - * * The %ITelephonyCallForwardListener interface provides methods to listen to the results of the call forwarding request. - * - * @endif */ class _OSP_EXPORT_ ITelephonyCallForwardListener : virtual public Tizen::Base::Runtime::IEventListener diff --git a/inc/FTelITelephonyNetworkEventListener.h b/inc/FTelITelephonyNetworkEventListener.h index 7d33b37..223e465 100644 --- a/inc/FTelITelephonyNetworkEventListener.h +++ b/inc/FTelITelephonyNetworkEventListener.h @@ -56,7 +56,6 @@ public: * @since 2.0 * * @param[in] networkStatus The new network status - * @see Tizen::Telephony::NetworkStatus */ virtual void OnTelephonyNetworkStatusChanged(const NetworkStatus& networkStatus) = 0; diff --git a/inc/FTelITelephonyNetworkSettingListener.h b/inc/FTelITelephonyNetworkSettingListener.h index 8cb8c86..2df36f2 100755 --- a/inc/FTelITelephonyNetworkSettingListener.h +++ b/inc/FTelITelephonyNetworkSettingListener.h @@ -15,14 +15,10 @@ // limitations under the License. // /** -* @if VISPARTNER-MANUFACTURER * @file FTelITelephonyNetworkSettingListener.h * @brief This is the header file for the %ITelephonyNetworkSettingListener interface. -* @visibility partner-manufacturer * * This header file contains the declarations of the %ITelephonyNetworkSettingListener interface. -* -* @endif */ #ifndef _FTEL_ITELEPHONY_NETWORK_SETTING_LISTENER_H_ #define _FTEL_ITELEPHONY_NETWORK_SETTING_LISTENER_H_ diff --git a/inc/FTelNetworkInfo.h b/inc/FTelNetworkInfo.h index f69106c..9084571 100755 --- a/inc/FTelNetworkInfo.h +++ b/inc/FTelNetworkInfo.h @@ -250,6 +250,7 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method. * @exception E_SYSTEM A system error has occurred. + * @exception E_UNSUPPORTED_OPERATION The device does not support the telephony feature. @b Since: @b 2.1 * @remarks The specific error code can be accessed using the GetLastResult() method. */ static int GetRssi(void); diff --git a/inc/FTelNetworkManager.h b/inc/FTelNetworkManager.h index 8e8b4db..db5fbd5 100755 --- a/inc/FTelNetworkManager.h +++ b/inc/FTelNetworkManager.h @@ -121,6 +121,7 @@ public: * @param[in] pListener The listener for change in status of a telephony network * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM A system error has occurred. + * @exception E_UNSUPPORTED_OPERATION The device does not support the telephony feature. @b Since: @b 2.1 */ result Construct(ITelephonyNetworkEventListener* pListener); diff --git a/inc/FTelSimInfo.h b/inc/FTelSimInfo.h index 1b6f9ca..37b5888 100755 --- a/inc/FTelSimInfo.h +++ b/inc/FTelSimInfo.h @@ -115,7 +115,7 @@ public: * Initializes this instance of %SimInfo. * * @brief [Deprecated] - * @deprecated This method is deprecated. Instead of using this method, it is recommended to use the SimManager::GetSimInfo() method to get the initialized SimInfo instance. + * @deprecated This method is deprecated. Instead of using this method, it is recommended to use the SimStateManager::GetSimInfo() method to get the initialized SimInfo instance. * * @since 2.0 * @@ -123,6 +123,7 @@ public: * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM The method cannot proceed due to a severe system error. * @exception E_DEVICE_UNAVAILABLE The operation has failed due to a missing SIM card. + * @exception E_UNSUPPORTED_OPERATION The device does not support the telephony feature. @b Since: @b 2.1 */ result Construct(void); @@ -302,7 +303,7 @@ public: * @return @c true if the values match, @n * else @c false * @param[in] rhs The other Object to be compared - * @see Object::Equals() + * @see Tizen::Base::Object::Equals() */ virtual bool Equals(const Tizen::Base::Object& rhs) const; diff --git a/inc/FTelSimStateManager.h b/inc/FTelSimStateManager.h index 693aad7..5e35926 100644 --- a/inc/FTelSimStateManager.h +++ b/inc/FTelSimStateManager.h @@ -70,6 +70,7 @@ public: * * @exception E_SUCCESS The method is successful. * @exception E_SYSTEM The method cannot proceed due to a severe system error. + * @exception E_UNSUPPORTED_OPERATION The device does not support the telephony feature. */ result Construct(void); diff --git a/src/FTelCallManager.cpp b/src/FTelCallManager.cpp index c80835f..12467be 100644 --- a/src/FTelCallManager.cpp +++ b/src/FTelCallManager.cpp @@ -22,10 +22,12 @@ #include #include #include +#include #include "FTel_CallManagerImpl.h" using namespace Tizen::Base; using namespace Tizen::Security; +using namespace Tizen::System; namespace Tizen { namespace Telephony @@ -43,10 +45,16 @@ CallManager::~CallManager(void) result CallManager::Construct(void) { + static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony"; + SysAssertf(__pCallManagerImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); result r = E_SUCCESS; + bool isTelephonySupported = false; + + r = _SystemInfoImpl::GetSysInfo(_TELEPHONY, isTelephonySupported); + SysTryReturnResult(NID_TEL, r == E_SUCCESS && isTelephonySupported, E_UNSUPPORTED_OPERATION, "Telephony is not supported."); __pCallManagerImpl = new (std::nothrow) _CallManagerImpl(); SysTryReturnResult(NID_TEL, __pCallManagerImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed."); @@ -65,10 +73,16 @@ CallManager::Construct(void) result CallManager::Construct(ITelephonyCallEventListener& listener) { + static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony"; + SysAssertf(__pCallManagerImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); result r = E_SUCCESS; + bool isTelephonySupported = false; + + r = _SystemInfoImpl::GetSysInfo(_TELEPHONY, isTelephonySupported); + SysTryReturnResult(NID_TEL, r == E_SUCCESS && isTelephonySupported, E_UNSUPPORTED_OPERATION, "Telephony is not supported."); __pCallManagerImpl = new (std::nothrow) _CallManagerImpl(); SysTryReturnResult(NID_TEL, __pCallManagerImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed."); diff --git a/src/FTelNetworkInfo.cpp b/src/FTelNetworkInfo.cpp index e3a9783..32137a8 100644 --- a/src/FTelNetworkInfo.cpp +++ b/src/FTelNetworkInfo.cpp @@ -22,11 +22,13 @@ #include #include #include +#include #include "FTel_NetworkInfoImpl.h" using namespace Tizen::Base; using namespace Tizen::Security; +using namespace Tizen::System; namespace Tizen { namespace Telephony @@ -184,14 +186,21 @@ NetworkInfo::GetHashCode(void) const int NetworkInfo::GetRssi(void) { + static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony"; + ClearLastResult(); int rssi = -1; result r = _AccessController::CheckUserPrivilege(_PRV_SYSTEMINFO, _PRV_TELEPHONY); - SysTryReturn(NID_TEL, r == E_SUCCESS, rssi, E_PRIVILEGE_DENIED, "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED)); + bool isTelephonySupported = false; + + r = _SystemInfoImpl::GetSysInfo(_TELEPHONY, isTelephonySupported); + SysTryReturn(NID_TEL, r == E_SUCCESS && isTelephonySupported, rssi, E_UNSUPPORTED_OPERATION, + "[%s] Telephony is not supported.", GetErrorMessage(E_UNSUPPORTED_OPERATION)); + rssi = _NetworkInfoImpl::GetRssi(); r = GetLastResult(); diff --git a/src/FTelNetworkManager.cpp b/src/FTelNetworkManager.cpp index 09af74e..866d96b 100644 --- a/src/FTelNetworkManager.cpp +++ b/src/FTelNetworkManager.cpp @@ -24,9 +24,11 @@ #include #include #include +#include #include "FTel_NetworkManagerImpl.h" using namespace Tizen::Security; +using namespace Tizen::System; namespace Tizen { namespace Telephony { @@ -44,10 +46,16 @@ NetworkManager::~NetworkManager(void) result NetworkManager::Construct(ITelephonyNetworkEventListener* pListener) { + static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony"; + SysAssertf(__pNetworkManagerImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); result r = E_SUCCESS; + bool isTelephonySupported = false; + + r = _SystemInfoImpl::GetSysInfo(_TELEPHONY, isTelephonySupported); + SysTryReturnResult(NID_TEL, r == E_SUCCESS && isTelephonySupported, E_UNSUPPORTED_OPERATION, "Telephony is not supported."); __pNetworkManagerImpl = new (std::nothrow) _NetworkManagerImpl(); SysTryReturnResult(NID_TEL, __pNetworkManagerImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed."); diff --git a/src/FTelSimInfo.cpp b/src/FTelSimInfo.cpp index ca24fc1..3c96ed9 100644 --- a/src/FTelSimInfo.cpp +++ b/src/FTelSimInfo.cpp @@ -22,10 +22,12 @@ #include #include #include +#include #include "FTel_SimInfoImpl.h" using namespace Tizen::Base; using namespace Tizen::Security; +using namespace Tizen::System; namespace Tizen { namespace Telephony { @@ -50,10 +52,16 @@ SimInfo::~SimInfo(void) result SimInfo::Construct(void) { + static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony"; + SysAssertf(__pSimInfoImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); result r = E_SUCCESS; + bool isTelephonySupported = false; + + r = _SystemInfoImpl::GetSysInfo(_TELEPHONY, isTelephonySupported); + SysTryReturnResult(NID_TEL, r == E_SUCCESS && isTelephonySupported, E_UNSUPPORTED_OPERATION, "Telephony is not supported."); __pSimInfoImpl = new (std::nothrow)_SimInfoImpl(); SysTryReturnResult(NID_TEL, __pSimInfoImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed"); diff --git a/src/FTelSimStateManager.cpp b/src/FTelSimStateManager.cpp index a10c6b5..2429991 100644 --- a/src/FTelSimStateManager.cpp +++ b/src/FTelSimStateManager.cpp @@ -22,11 +22,13 @@ #include #include #include +#include #include "FTel_SimStateManagerImpl.h" using namespace Tizen::Base; using namespace Tizen::Security; +using namespace Tizen::System; namespace Tizen { namespace Telephony @@ -44,10 +46,16 @@ SimStateManager::~SimStateManager(void) result SimStateManager::Construct(void) { + static const wchar_t _TELEPHONY[] = L"http://tizen.org/feature/network.telephony"; + SysAssertf(__pSimStateManagerImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class."); result r = E_SUCCESS; + bool isTelephonySupported = false; + + r = _SystemInfoImpl::GetSysInfo(_TELEPHONY, isTelephonySupported); + SysTryReturnResult(NID_TEL, r == E_SUCCESS && isTelephonySupported, E_UNSUPPORTED_OPERATION, "Telephony is not supported."); __pSimStateManagerImpl = new (std::nothrow)_SimStateManagerImpl(); SysTryReturnResult(NID_TEL, __pSimStateManagerImpl != null, E_OUT_OF_MEMORY, "Memory allocation failed"); diff --git a/src/FTel_SimEvent.h b/src/FTel_SimEvent.h index e1a0aa3..deb970c 100644 --- a/src/FTel_SimEvent.h +++ b/src/FTel_SimEvent.h @@ -41,8 +41,8 @@ namespace Tizen { namespace Telephony * @class _SimEvent * @brief This class handles SIM events. * - * When a NetworkManagerEvent event occurs, the _SimEvent object finds a ITelephonySimEventListener object - * which is registered for the SimManager object and calls an appropriate method of the listener. + * When a SimEvent occurs, the _SimEvent object finds a ITelephonySimEventListener object + * which is registered for the SimStateManager object and calls an appropriate method of the listener. */ class _SimEvent diff --git a/src/FTel_SimEventArg.cpp b/src/FTel_SimEventArg.cpp index 3b6eeb4..858bc7e 100644 --- a/src/FTel_SimEventArg.cpp +++ b/src/FTel_SimEventArg.cpp @@ -22,7 +22,6 @@ */ #include -//#include "FTel_SimManagerImpl.h" #include "FTel_SimEventArg.h" namespace Tizen { namespace Telephony diff --git a/src/FTel_SimManagerEvent.h b/src/FTel_SimManagerEvent.h index 7ca8ed5..735aca0 100644 --- a/src/FTel_SimManagerEvent.h +++ b/src/FTel_SimManagerEvent.h @@ -39,10 +39,10 @@ namespace Tizen { namespace Telephony /** * @class _SimManagerEvent - * @brief This class handles SimManager events related to SIM setting. + * @brief This class handles GetPinLockSetting event. * - * When a SimManager event related to SIM setting occurs, the _SimManagerEvent object finds a ITelephonySimManagerListener object - * which is registered for the Todo:Correct[Device] object and calls an appropriate method of the listener. + * When GetPinLockSetting event occurs, the _SimManagerEvent object finds a ISimStateManagerGetPinLockSettingListener object + * which is registered for the SimStateManager object and calls an appropriate method of the listener. */ class _SimManagerEvent diff --git a/src/FTel_SimManagerEventArg.h b/src/FTel_SimManagerEventArg.h index 7f1a125..cd5baa0 100644 --- a/src/FTel_SimManagerEventArg.h +++ b/src/FTel_SimManagerEventArg.h @@ -30,10 +30,6 @@ #include #include -//namespace Tizen { namespace Base { namespace Collection -//{ -//class IList; -//}}} namespace Tizen { namespace Telephony { @@ -47,11 +43,11 @@ enum _SimManagerEventType /** * @class _SimManagerEventArg - * @brief This class is used as an argument of methods of the ITelephonySimManagerListener class. + * @brief This class is used as an argument of methods of the ISimStateManagerGetPinLockSettingResultListener class. * - * This class is used as an argument of ITelephonySimManagerListener methods. - * When a SimManager event occurs, the _SimManagerEvent object finds a ITelephonySimManagerListener object - * which is registered for the SimManager object and calls an appropriate method of the listener. + * This class is used as an argument of ISimStateManagerGetPinLockSettingResultListener methods. + * When a SimStateManager event occurs, the _SimStateManagerEvent object finds a ISimStateManagerGetPinLockSettingResultListener object + * which is registered for the Device object and calls an appropriate method of the listener. */ class _SimManagerEventArg diff --git a/src/FTel_SimStateManagerImpl.cpp b/src/FTel_SimStateManagerImpl.cpp index 6c68ff9..c5c6e76 100644 --- a/src/FTel_SimStateManagerImpl.cpp +++ b/src/FTel_SimStateManagerImpl.cpp @@ -160,8 +160,6 @@ CATCH: void _SimStateManagerImpl::OnSimStateChangedCallback(TapiHandle* pHandle, const char* pNotiId, void* pData, void* pUserData) { - SysLog(NID_TEL, "Enter"); // Todo: Remove temporary log - TelSimCardStatus_t* status = (TelSimCardStatus_t*)pData; SysLog(NID_TEL, "TelSimCardStatus: [%d]", *status); @@ -220,8 +218,6 @@ _SimStateManagerImpl::OnSimStateChangedCallback(TapiHandle* pHandle, const char* (void)pSimStateManagerImpl->__pSimEvent->Fire(*pEventArg); } - - SysLog(NID_TEL, "Exit"); // Todo: Remove temporary log } void @@ -267,8 +263,6 @@ _SimStateManagerImpl::OnGetPinLockSettingCallback(TapiHandle* pHandle, int ret, SysTryReturnVoidResult(NID_TEL, pEventArg != null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); (void)pSimStateManagerImpl->__pSimManagerEvent->Fire(*pEventArg); - - SysLog(NID_TEL, "Exit"); // Todo: Remove temporary log } result -- 2.7.4