Synchronized tizen_2.1 branch with master
authorMinjae Lee <minjae17.lee@samsung.com>
Tue, 19 Mar 2013 02:26:17 +0000 (11:26 +0900)
committerMinjae Lee <minjae17.lee@samsung.com>
Tue, 19 Mar 2013 02:26:17 +0000 (11:26 +0900)
Change-Id: I3a7261dae429de37c3a568d7b8ab10b29fb5e3a0
Signed-off-by: Minjae Lee <minjae17.lee@samsung.com>
21 files changed:
CMakeLists.txt
inc/FTelCallInfo.h
inc/FTelCallManager.h
inc/FTelITelephonyCallEventListener.h
inc/FTelITelephonyCallForwardListener.h
inc/FTelITelephonyNetworkEventListener.h
inc/FTelITelephonyNetworkSettingListener.h
inc/FTelNetworkInfo.h
inc/FTelNetworkManager.h
inc/FTelSimInfo.h
inc/FTelSimStateManager.h
src/FTelCallManager.cpp
src/FTelNetworkInfo.cpp
src/FTelNetworkManager.cpp
src/FTelSimInfo.cpp
src/FTelSimStateManager.cpp
src/FTel_SimEvent.h
src/FTel_SimEventArg.cpp
src/FTel_SimManagerEvent.h
src/FTel_SimManagerEventArg.h
src/FTel_SimStateManagerImpl.cpp

index ffc43d1..0512283 100755 (executable)
@@ -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
index efd3734..81626ce 100755 (executable)
@@ -71,7 +71,6 @@ public:
      * @since   2.0
      *
      * @return  The current call type
-     * @see Tizen::Telephony::CallType
      */
        CallType GetCallType(void) const;
 
index 58d00cd..e823109 100755 (executable)
@@ -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;
 
index 00237d2..5bf8083 100644 (file)
@@ -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;
 
index 7f75574..82f08a4 100755 (executable)
 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
index 7d33b37..223e465 100644 (file)
@@ -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;
 
index 8cb8c86..2df36f2 100755 (executable)
 // 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_
index f69106c..9084571 100755 (executable)
@@ -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);
index 8e8b4db..db5fbd5 100755 (executable)
@@ -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);
 
index 1b6f9ca..37b5888 100755 (executable)
@@ -115,7 +115,7 @@ public:
         * Initializes this instance of %SimInfo.
         *
         * @brief   <i> [Deprecated] </i>
-        * @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;
 
index 693aad7..5e35926 100644 (file)
@@ -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);
 
index c80835f..12467be 100644 (file)
 #include <FTelCallManager.h>
 #include <FBaseSysLog.h>
 #include <FSec_AccessController.h>
+#include <FSys_SystemInfoImpl.h>
 #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.");
index e3a9783..32137a8 100644 (file)
 #include <FTelNetworkInfo.h>
 #include <FBaseSysLog.h>
 #include <FSec_AccessController.h>
+#include <FSys_SystemInfoImpl.h>
 #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();
index 09af74e..866d96b 100644 (file)
 #include <FTelITelephonyNetworkEventListener.h>
 #include <FTelITelephonyNetworkSettingListener.h>
 #include <FSec_AccessController.h>
+#include <FSys_SystemInfoImpl.h>
 #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.");
index ca24fc1..3c96ed9 100644 (file)
 #include <FTelSimInfo.h>
 #include <FBaseSysLog.h>
 #include <FSec_AccessController.h>
+#include <FSys_SystemInfoImpl.h>
 #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");
index a10c6b5..2429991 100644 (file)
 #include <FBaseSysLog.h>
 #include <FSec_AccessController.h>
 #include <FTelSimStateManager.h>
+#include <FSys_SystemInfoImpl.h>
 #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");
index e1a0aa3..deb970c 100644 (file)
@@ -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
index 3b6eeb4..858bc7e 100644 (file)
@@ -22,7 +22,6 @@
  */
 
 #include <FBaseErrorDefine.h>
-//#include "FTel_SimManagerImpl.h"
 #include "FTel_SimEventArg.h"
 
 namespace Tizen { namespace Telephony
index 7ca8ed5..735aca0 100644 (file)
@@ -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
index 7f1a125..cd5baa0 100644 (file)
 #include <FBaseRtIEventArg.h>
 #include <FTelTypes.h>
 
-//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
index 6c68ff9..c5c6e76 100644 (file)
@@ -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