Merge "prevent issue." into tizen_2.1
authorByounghui <byounghui.lim@samsung.com>
Fri, 12 Apr 2013 02:29:11 +0000 (11:29 +0900)
committerGerrit Code Review <gerrit2@kim11>
Fri, 12 Apr 2013 02:29:11 +0000 (11:29 +0900)
inc/FMsgEmailManager.h [changed mode: 0644->0755]
inc/FMsgMmsManager.h [changed mode: 0644->0755]
inc/FMsgPushManager.h
inc/FMsgSmsManager.h [changed mode: 0644->0755]
inc/FMsgSmsMessage.h [changed mode: 0644->0755]
src/FMsgEmailManager.cpp [changed mode: 0644->0755]
src/FMsgMmsManager.cpp [changed mode: 0644->0755]
src/FMsgPushManager.cpp [changed mode: 0644->0755]
src/FMsgSmsManager.cpp [changed mode: 0644->0755]
src/FMsgSmsMessage.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 37803c8..9064425
@@ -165,6 +165,7 @@ namespace Tizen { namespace Messaging
                * @exception    E_INVALID_ARG                   The number of recipients is @c 0.
                * @exception    E_MAX_EXCEEDED                   The number of recipients has crossed the maximum limit (Maximum 20).
                * @exception    E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
+               * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
                * @remarks              The value of the flag, @c saveToSentbox, is fixed to @c false in the emulator.
                * @see                  IEmailListener::OnEmailMessageSent()
                */
old mode 100644 (file)
new mode 100755 (executable)
index 9a66cad..2e224f5
@@ -169,6 +169,7 @@ namespace Tizen { namespace Messaging
                * @exception    E_INVALID_ARG                   The number of recipients is @c 0 or the message is empty.
                * @exception    E_MAX_EXCEEDED                  The number of recipients has crossed the maximum limit (Maximum 10).
                * @exception    E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
+               * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
                * @remarks              Some service providers may not support sending MMS messages with an empty subject or body. @n
                *                               In this case, the result of the status report will be the E_FAILURE exception. @n
                *                               The CC and BCC recipients in the @c recipientList are merged with the TO recipients when sending an MMS message.
index fc0784f..2ee48ca 100755 (executable)
@@ -167,6 +167,7 @@ public:
        * @exception    E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
        * @exception    E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. @b Since: @b 2.1
        *                               For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
+       * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
        * @remarks      Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue() methods.
        * @see                  IPushManagerListener
        * @see                  IPushEventListener
@@ -189,6 +190,7 @@ public:
        * @exception    E_OUT_OF_MEMORY     The memory is insufficient.
        * @exception    E_SYSTEM            A system error has occurred.
        * @exception    E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
+       * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
        * @see                  IPushManagerListener::OnPushServiceRegistered()
        */
        result RegisterPushService(RequestId& reqId);
@@ -209,6 +211,7 @@ public:
        * @exception    E_OUT_OF_MEMORY     The memory is insufficient.
        * @exception    E_SYSTEM            A system error has occurred.
        * @exception    E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
+       * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
        * @see                  IPushManagerListener::OnPushServiceUnregistered()
        */
        result UnregisterPushService(RequestId& reqId);
@@ -240,6 +243,7 @@ public:
        * @exception    E_OUT_OF_MEMORY         The memory is insufficient.
        * @exception    E_SYSTEM                        A system error has occurred.
        * @exception    E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
+       * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
        * @remarks              The specific error code can be accessed using the GetLastResult() method.
        *               If the user launches the application using a ticker or a quick panel,
        *               the push message related to the notification is delivered to the application
@@ -273,6 +277,7 @@ public:
        * @exception    E_OUT_OF_MEMORY         The memory is insufficient.
        * @exception    E_SYSTEM                        A system error has occurred.
        * @exception    E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
+       * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
        * @see                                                          IPushManagerListener::OnPushMessageSent()
        */
        result SendPushMessage(const PushMessage& message, const Tizen::Base::String& registrationId, const Tizen::Base::String& appSecret, RequestId& reqId);
@@ -300,6 +305,7 @@ public:
        * @exception    E_OUT_OF_MEMORY         The memory is insufficient.
        * @exception    E_SYSTEM                        A system error has occurred.
        * @exception    E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
+       * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
        * @remarks      The maximum limit can be checked by using GetMaxRecipientCount().
        * @see                                                          IPushManagerListener::OnPushMessageSent()
        */
old mode 100644 (file)
new mode 100755 (executable)
index efbd29b..3760232
@@ -210,6 +210,7 @@ namespace Tizen { namespace Messaging
                * @exception    E_OUT_OF_MEMORY                 The memory is insufficient.
                * @exception    E_OBJ_ALREADY_EXIST             The listener already exists.
                * @exception    E_PRIVILEGE_DENIED              The application does not have the privilege to call this method.
+               * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
                * @see                  ISmsMessageEventListener
         * @see                 RemoveSmsMessageEventListener()
                */
@@ -231,6 +232,7 @@ namespace Tizen { namespace Messaging
                * @exception    E_OBJ_NOT_FOUND                 The listener is not found.
                * @exception    E_SYSTEM                                A system error has occurred.
                * @exception    E_PRIVILEGE_DENIED              The application does not have the privilege to call this method.
+               * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
                * @see                  ISmsMessageEventListener
         * @see                 AddSmsMessageEventListener()
                */
@@ -259,6 +261,7 @@ namespace Tizen { namespace Messaging
                * @exception    E_INVALID_ARG                   The number of recipients is @c 0.
                * @exception    E_MAX_EXCEEDED                  The number of recipients has crossed the maximum limit (Maximum 10).
                * @exception    E_PRIVILEGE_DENIED              The application does not have the privilege to call this method.
+               * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
                * @remarks              The CC and BCC recipients in the @c recipientList are ignored when sending an SMS message.
                * @see                  ISmsListener::OnSmsMessageSent()
                */
@@ -279,6 +282,7 @@ namespace Tizen { namespace Messaging
                * @exception    E_INVALID_ARG           The specified @c type is invalid.
                * @exception    E_SYSTEM                        A system error has occurred.
                * @exception    E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
+               * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
                * @remarks              In case of an error, this method returns the negative value. For example, @c -1. @n
                *                               The specific error code can be accessed using the GetLastResult() method.
                */
@@ -310,6 +314,7 @@ namespace Tizen { namespace Messaging
                * @exception    E_OUT_OF_MEMORY         The memory is insufficient.
                * @exception    E_SYSTEM                        A system error has occurred.
                * @exception    E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
+               * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
                * @remarks              The specific error code can be accessed using the GetLastResult() method. @n
                *               The search with the specified keywords searches using only the first 50 characters of the body text. @n
                *               The SMS messages in the searched result contain only @c 160 bytes for the body text. @n
@@ -345,6 +350,7 @@ namespace Tizen { namespace Messaging
                * @exception    E_OUT_OF_MEMORY         The memory is insufficient.
                * @exception    E_SYSTEM                        A system error has occurred.
                * @exception    E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
+               * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
                * @remarks              The specific error code can be accessed using the GetLastResult() method. @n
                *               The search with the specified keywords searches using only the first 50 characters of the body text. @n
                *               The SMS messages in the searched result contain only @c 160 bytes for the body text. @n
@@ -370,6 +376,7 @@ namespace Tizen { namespace Messaging
                * @exception    E_OBJ_NOT_FOUND         The SMS message with the specified @c messageId is not found.
                * @exception    E_SYSTEM                        A system error has occurred.
                * @exception    E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
+               * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
                * @remarks              The specific error code can be accessed using the GetLastResult() method. @n
                *                               In case of an error, this method returns an empty string.
                * @see                  SmsMessage::HasMoreText()
old mode 100644 (file)
new mode 100755 (executable)
index acba400..c83594d
@@ -154,6 +154,7 @@ namespace Tizen { namespace Messaging
                * @exception    E_SUCCESS                               The method is successful.
                * @exception    E_INVALID_OPERATION             This operation is only allowed to the incoming message or the message from the Inbox.
                * @exception    E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
+               * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
                * @remarks              The specific error code can be accessed using the GetLastResult() method.
                */
                Tizen::Base::String GetSenderAddress(void) const;
@@ -171,6 +172,7 @@ namespace Tizen { namespace Messaging
                * @exception    E_SUCCESS                               The method is successful.
                * @exception    E_INVALID_OPERATION             This operation is only allowed to the incoming message or the message from the Inbox.
                * @exception    E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
+               * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
                * @remarks              The specific error code can be accessed using the GetLastResult() method. @n
                *                               In case of an error, this method returns the instance denoting 00:00:00, January 1, 1.
                */
@@ -189,6 +191,7 @@ namespace Tizen { namespace Messaging
                * @exception    E_SUCCESS                               The method is successful.
                * @exception    E_INVALID_OPERATION             This operation is allowed only when the message is from the Inbox, Sentbox, or Outbox.
                * @exception    E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
+               * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
                * @remarks              In case of an error, this method returns the negative value. For example, @c -1. @n
                *                               The specific error code can be accessed using the GetLastResult() method.
                */
@@ -207,6 +210,7 @@ namespace Tizen { namespace Messaging
                * @exception    E_SUCCESS                               The method is successful.
                * @exception    E_INVALID_OPERATION             This operation is allowed only when the message is from the Sentbox or Outbox.
                * @exception    E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
+               * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
                * @remarks              The specific error code can be accessed using the GetLastResult() method. @n
                *                               In case of an error, this method returns the instance denoting 00:00:00, January 1, 1.
                */
@@ -225,6 +229,7 @@ namespace Tizen { namespace Messaging
                * @exception    E_SUCCESS                               The method is successful.
                * @exception    E_INVALID_OPERATION             This operation is allowed only when the message is from the Inbox, Sentbox, or Outbox.
                * @exception    E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
+               * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
                * @remarks              In case of an error, this method returns the SMS_MESSAGE_BOX_TYPE_NONE value. @n
                *                               The specific error code can be accessed using the GetLastResult() method.
                */
@@ -243,6 +248,7 @@ namespace Tizen { namespace Messaging
                * @exception    E_SUCCESS                               The method is successful.
                * @exception    E_INVALID_OPERATION             This operation is allowed only when the message is from the Sentbox or Outbox.
                * @exception    E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
+               * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
                * @remarks              The specific error code can be accessed using the GetLastResult() method.
                */
                RecipientList GetRecipientList(void) const;
@@ -261,6 +267,7 @@ namespace Tizen { namespace Messaging
                * @exception    E_SUCCESS                               The method is successful.
                * @exception    E_INVALID_OPERATION             This operation is allowed only when the message is from the Inbox, Sentbox, or Outbox.
                * @exception    E_PRIVILEGE_DENIED              The application does not have the privilege to call this method.
+               * @exception    E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
                * @remarks              If the return value is @c true, the SMS message contains more than @c 160 bytes for the body text. @n
                *                               To get the full body text, use SmsManager::GetFullText(). @n
                *                               The specific error code can be accessed using the GetLastResult() method.
old mode 100644 (file)
new mode 100755 (executable)
index c4d8e4e..9a18f4d
@@ -87,7 +87,9 @@ EmailManager::Send(const EmailMessage& message, const RecipientList& recipientLi
 
        // checking privilege
        r = _AccessController::CheckUserPrivilege(_PRV_MESSAGING_EMAIL, _PRV_MESSAGING_WRITE);
-       SysTryReturn(NID_MSG, r == E_SUCCESS, E_PRIVILEGE_DENIED, r = E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] Propagating.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "The application is not permitted to call this method.");
+
 
        SysAssertf(__pImpl != null, "The EmailManager instance is not constructed yet.");
        SysTryReturnResult(NID_MSG,
old mode 100644 (file)
new mode 100755 (executable)
index e0c3392..ed34bfa
@@ -91,7 +91,8 @@ MmsManager::Send(const MmsMessage& message, const RecipientList& recipientList,
 
        // checking privilege
        r = _AccessController::CheckUserPrivilege(_PRV_MESSAGING_MMS, _PRV_MESSAGING_WRITE);
-       SysTryReturn(NID_MSG, r == E_SUCCESS, E_PRIVILEGE_DENIED, r = E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] Propagating.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pImpl != null, "The MmsManager instance is not constructed yet.");
        SysTryReturnResult(NID_MSG,
old mode 100644 (file)
new mode 100755 (executable)
index 8093e1f..6c3dae3
@@ -54,7 +54,9 @@ PushManager::Construct(IPushManagerListener& managerListener, IPushEventListener
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_PUSH);
-       SysTryReturnResult(NID_MSG, r == E_SUCCESS, E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "The application is not permitted to call this method.");
+
 
        bool isPushSupported = false;
 
@@ -85,7 +87,9 @@ PushManager::RegisterPushService(RequestId& reqId)
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_PUSH);
-       SysTryReturnResult(NID_MSG, r == E_SUCCESS, E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "The application is not permitted to call this method.");
+
 
        SysAssertf(__pPushManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -104,7 +108,9 @@ PushManager::UnregisterPushService(RequestId& reqId)
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_PUSH);
-       SysTryReturnResult(NID_MSG, r == E_SUCCESS, E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "The application is not permitted to call this method.");
+
 
        SysAssertf(__pPushManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -140,7 +146,8 @@ PushManager::GetUnreadMessagesN(void)
        ClearLastResult();
 
        r = _AccessController::CheckUserPrivilege(_PRV_PUSH);
-       SysTryReturn(NID_MSG, r == E_SUCCESS, null, E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryReturn(NID_MSG, r == E_SUCCESS, null, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pPushManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -160,7 +167,8 @@ PushManager::SendPushMessage(const PushMessage& message, const String& registrat
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_PUSH);
-       SysTryReturnResult(NID_MSG, r == E_SUCCESS, E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pPushManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
 
@@ -179,7 +187,8 @@ PushManager::SendPushMessage(const PushMessage& message, const IList& registrati
        result r = E_SUCCESS;
 
        r = _AccessController::CheckUserPrivilege(_PRV_PUSH);
-       SysTryReturnResult(NID_MSG, r == E_SUCCESS, E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pPushManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
 
old mode 100644 (file)
new mode 100755 (executable)
index 8ec7c74..43dbcaa
@@ -144,7 +144,8 @@ SmsManager::AddSmsMessageEventListener(ISmsMessageEventListener& eventListener)
 
        // checking privilege
        r = _AccessController::CheckUserPrivilege(_PRV_MESSAGING_SMS, _PRV_MESSAGING_READ);
-       SysTryReturn(NID_MSG, r == E_SUCCESS, E_PRIVILEGE_DENIED, r = E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] Propagated.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // checking conditions
        SysAssertf(__pImpl != null, "The SmsManager instance is not constructed yet.");
@@ -171,7 +172,8 @@ SmsManager::RemoveSmsMessageEventListener(ISmsMessageEventListener& eventListene
 
        // checking privilege
        r = _AccessController::CheckUserPrivilege(_PRV_MESSAGING_SMS, _PRV_MESSAGING_READ);
-       SysTryReturn(NID_MSG, r == E_SUCCESS, E_PRIVILEGE_DENIED, r = E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] Propagated.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        // checking conditions
        SysAssertf(__pImpl != null, "The SmsManager instance is not constructed yet.");
@@ -198,12 +200,8 @@ SmsManager::GetTotalMessageCount(SmsMessageBoxType type) const
 
        // checking privilege
        r = _AccessController::CheckUserPrivilege(_PRV_MESSAGING_SMS, _PRV_MESSAGING_READ);
-       if (r != E_SUCCESS)
-       {
-               SetLastResult(E_PRIVILEGE_DENIED);
-               SysLogException(NID_MSG, GetLastResult(), "[E_PRIVILEGE_DENIED] Propagated.");
-               return -1;
-       }
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryReturn(NID_MSG, r == E_SUCCESS, -1, r, "The application is not permitted to call this method.");
 
        // checking condition
        SysAssertf(__pImpl != null, "The SmsManager instance is not constructed yet.");
@@ -245,13 +243,8 @@ SmsManager::SearchInboxN(const Tizen::Base::String* pKeyword, const Tizen::Base:
 
        // checking privilege
        r = _AccessController::CheckUserPrivilege(_PRV_MESSAGING_SMS, _PRV_MESSAGING_READ);
-       if (r != E_SUCCESS)
-       {
-               SetLastResult(E_PRIVILEGE_DENIED);
-               SysLogException(NID_MSG, GetLastResult(), "[E_PRIVILEGE_DENIED] Propagated.");
-               
-               goto CATCH;
-       }
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryCatch(NID_MSG, r == E_SUCCESS, ,r, "The application is not permitted to call this method.");
 
        // checking condition
        SysAssertf(__pImpl != null, "The SmsManager instance is not constructed yet.");
@@ -346,13 +339,8 @@ SmsManager::SearchMessageBoxN(SmsMessageBoxType type, const Tizen::Base::String*
 
        // checking privilege
        r = _AccessController::CheckUserPrivilege(_PRV_MESSAGING_SMS, _PRV_MESSAGING_READ);
-       if (r != E_SUCCESS)
-       {
-               SetLastResult(E_PRIVILEGE_DENIED);
-               SysLogException(NID_MSG, GetLastResult(), "[E_PRIVILEGE_DENIED] Propagated.");
-
-               goto CATCH;
-       }
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryCatch(NID_MSG, r == E_SUCCESS, ,r, "The application is not permitted to call this method.");
 
        // checking condition
        SysAssertf(__pImpl != null, "The SmsManager instance is not constructed yet.");
@@ -442,12 +430,8 @@ SmsManager::GetFullText(int messageId) const
 
        // checking privilege
        r = _AccessController::CheckUserPrivilege(_PRV_MESSAGING_SMS, _PRV_MESSAGING_READ);
-       if (r != E_SUCCESS)
-       {
-               SetLastResult(E_PRIVILEGE_DENIED);
-               SysLogException(NID_MSG, GetLastResult(), "[E_PRIVILEGE_DENIED] Propagated.");
-               goto CATCH;
-       }
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "The application is not permitted to call this method.");
 
        // checking condition
        SysAssertf(__pImpl != null, "The SmsManager instance is not constructed yet.");
@@ -485,7 +469,8 @@ SmsManager::Send(const SmsMessage& message, const RecipientList& recipientList,
 
        // checking privilege
        r = _AccessController::CheckUserPrivilege(_PRV_MESSAGING_SMS, _PRV_MESSAGING_WRITE);
-       SysTryReturn(NID_MSG, r == E_SUCCESS, E_PRIVILEGE_DENIED, r = E_PRIVILEGE_DENIED, "[E_PRIVILEGE_DENIED] Propagated.");
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryReturnResult(NID_MSG, r == E_SUCCESS, r, "The application is not permitted to call this method.");
 
        SysAssertf(__pImpl != null, "The SmsManager instance is not constructed yet.");
        SysTryReturnResult(NID_MSG,
old mode 100644 (file)
new mode 100755 (executable)
index 8f86bfc..cc313f0
@@ -118,12 +118,8 @@ SmsMessage::GetSenderAddress(void) const
 
        // checking privilege
        r = _AccessController::CheckUserPrivilege(_PRV_MESSAGING_SMS, _PRV_MESSAGING_READ);
-       if (r != E_SUCCESS)
-       {
-               SetLastResult(E_PRIVILEGE_DENIED);
-               SysLogException(NID_MSG, GetLastResult(), "[E_PRIVILEGE_DENIED] Propagating.");
-               return L"";
-       }
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryReturn(NID_MSG, r == E_SUCCESS, L"", r, "The application is not permitted to call this method.");
 
        if (__pImpl->__messageBoxType == SMS_MESSAGE_BOX_TYPE_SENTBOX || __pImpl->__messageBoxType == SMS_MESSAGE_BOX_TYPE_OUTBOX ||
                __pImpl->__messageBoxType == SMS_MESSAGE_BOX_TYPE_ALL)
@@ -148,14 +144,8 @@ SmsMessage::GetReceivedTime(void) const
 
        // checking privilege
        r = _AccessController::CheckUserPrivilege(_PRV_MESSAGING_SMS, _PRV_MESSAGING_READ);
-       if (r != E_SUCCESS)
-       {
-               SetLastResult(E_PRIVILEGE_DENIED);
-               SysLogException(NID_MSG, GetLastResult(), "[E_PRIVILEGE_DENIED] Propagating.");
-
-               dt.SetValue(1, 1, 1, 0, 0, 0);
-               return dt;
-       }
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "The application is not permitted to call this method.");
 
        // argument check
        if (__pImpl->__messageBoxType == SMS_MESSAGE_BOX_TYPE_SENTBOX || __pImpl->__messageBoxType == SMS_MESSAGE_BOX_TYPE_OUTBOX ||
@@ -172,6 +162,11 @@ SmsMessage::GetReceivedTime(void) const
        }
 
        return __pImpl->GetReceivedTime();
+
+CATCH:
+       dt.SetValue(1, 1, 1, 0, 0, 0);
+       return dt;
+
 }
 
 Tizen::Base::DateTime
@@ -183,14 +178,8 @@ SmsMessage::GetSentTime(void) const
 
        // checking privilege
        r = _AccessController::CheckUserPrivilege(_PRV_MESSAGING_SMS, _PRV_MESSAGING_READ);
-       if (r != E_SUCCESS)
-       {
-               SetLastResult(E_PRIVILEGE_DENIED);
-               SysLogException(NID_MSG, GetLastResult(), "[E_PRIVILEGE_DENIED] Propagating.");
-
-               dt.SetValue(1, 1, 1, 0, 0, 0);
-               return dt;
-       }
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "The application is not permitted to call this method.");
 
        // argument check
        if (__pImpl->__messageBoxType == SMS_MESSAGE_BOX_TYPE_INBOX || __pImpl->__messageBoxType == SMS_MESSAGE_BOX_TYPE_NONE ||
@@ -207,6 +196,12 @@ SmsMessage::GetSentTime(void) const
        }
 
        return __pImpl->GetSentTime();
+
+
+CATCH:
+       dt.SetValue(1, 1, 1, 0, 0, 0);
+       return dt;
+
 }
 
 int
@@ -217,12 +212,9 @@ SmsMessage::GetId(void) const
 
        // checking privilege
        r = _AccessController::CheckUserPrivilege(_PRV_MESSAGING_SMS, _PRV_MESSAGING_READ);
-       if (r != E_SUCCESS)
-       {
-               SetLastResult(E_PRIVILEGE_DENIED);
-               SysLogException(NID_MSG, GetLastResult(), "[E_PRIVILEGE_DENIED] Propagating.");
-               return -1;
-       }
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryReturn(NID_MSG, r == E_SUCCESS, -1, r, "The application is not permitted to call this method.");
+
 
        // argument check
        if (__pImpl->__messageBoxType == SMS_MESSAGE_BOX_TYPE_NONE || __pImpl->__messageBoxType == SMS_MESSAGE_BOX_TYPE_ALL)
@@ -247,12 +239,8 @@ SmsMessage::GetMessageBoxType(void) const
 
        // checking privilege
        r = _AccessController::CheckUserPrivilege(_PRV_MESSAGING_SMS, _PRV_MESSAGING_READ);
-       if (r != E_SUCCESS)
-       {
-               SetLastResult(E_PRIVILEGE_DENIED);
-               SysLogException(NID_MSG, GetLastResult(), "[E_PRIVILEGE_DENIED] Propagating.");
-               return SMS_MESSAGE_BOX_TYPE_NONE;
-       }
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryReturn(NID_MSG, r == E_SUCCESS, SMS_MESSAGE_BOX_TYPE_NONE, r, "The application is not permitted to call this method.");
 
        // argument check
        if (__pImpl->__messageBoxType == SMS_MESSAGE_BOX_TYPE_ALL)
@@ -276,12 +264,8 @@ SmsMessage::GetRecipientList(void) const
 
        // checking privilege
        r = _AccessController::CheckUserPrivilege(_PRV_MESSAGING_SMS, _PRV_MESSAGING_READ);
-       if (r != E_SUCCESS)
-       {
-               SetLastResult(E_PRIVILEGE_DENIED);
-               SysLogException(NID_MSG, GetLastResult(), "[E_PRIVILEGE_DENIED] Propagating.");
-               return recipients;
-       }
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryReturn(NID_MSG, r == E_SUCCESS, recipients, r, "The application is not permitted to call this method.");
 
        // argument check
        if (__pImpl->__messageBoxType == SMS_MESSAGE_BOX_TYPE_INBOX || __pImpl->__messageBoxType == SMS_MESSAGE_BOX_TYPE_NONE ||
@@ -306,12 +290,8 @@ SmsMessage::HasMoreText(void) const
 
        // checking privilege
        r = _AccessController::CheckUserPrivilege(_PRV_MESSAGING_SMS, _PRV_MESSAGING_READ);
-       if (r != E_SUCCESS)
-       {
-               SetLastResult(E_PRIVILEGE_DENIED);
-               SysLogException(NID_MSG, GetLastResult(), "[E_PRIVILEGE_DENIED] Propagating.");
-               return false;
-       }
+       r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+       SysTryReturn(NID_MSG, r == E_SUCCESS, false, r, "The application is not permitted to call this method.");
 
        // argument check
        if (__pImpl->__messageBoxType == SMS_MESSAGE_BOX_TYPE_NONE || __pImpl->__messageBoxType == SMS_MESSAGE_BOX_TYPE_ALL)