summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwangbok Kim <gwangbok.kim@samsung.com>2013-04-11 19:53:07 +0900
committerGwangbok Kim <gwangbok.kim@samsung.com>2013-04-11 20:21:43 +0900
commitdd8368cfa469452af3145be5f4d07aed3565c80c (patch)
tree3ea4e79c3f729e4b858465c9bd4f2215095bcc57
parent5ac00c579efc166f7e945fdbbce0a3fa04822e11 (diff)
downloadsocial-dd8368cfa469452af3145be5f4d07aed3565c80c.tar.gz
social-dd8368cfa469452af3145be5f4d07aed3565c80c.tar.bz2
social-dd8368cfa469452af3145be5f4d07aed3565c80c.zip
add doxygen and fix code for E_USER_NOT_CONSENTED
Change-Id: Ifbcbbbb99bfe931d86ff13489341f16b8f526381 Signed-off-by: Gwangbok Kim <gwangbok.kim@samsung.com>
-rw-r--r--inc/FSclAddressbook.h36
-rw-r--r--inc/FSclAddressbookManager.h48
-rw-r--r--inc/FSclPerson.h5
-rw-r--r--src/FSclAddressbook.cpp212
-rw-r--r--src/FSclAddressbookManager.cpp266
-rw-r--r--src/FSclPerson.cpp25
6 files changed, 382 insertions, 210 deletions
diff --git a/inc/FSclAddressbook.h b/inc/FSclAddressbook.h
index 1f2f6c8..2d4ad3b 100644
--- a/inc/FSclAddressbook.h
+++ b/inc/FSclAddressbook.h
@@ -324,6 +324,7 @@ public:
* @param[in] pListener The event listener
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
*/
result SetEventListener(IAddressbookEventListener* pListener);
@@ -341,6 +342,7 @@ public:
* @param[in] pListener The event listener
* @exception E_SUCCESS The method is successful.
* @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.
* @exception E_SYSTEM The method cannot proceed due to a severe system error
*/
result SetAddressbookChangeEventListener(IAddressbookChangeEventListener* pListener);
@@ -358,6 +360,7 @@ public:
* @param[in,out] contact The contact to add
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The contact ID is not #INVALID_RECORD_ID, or
* the properties of the contact have not been set.
* @exception E_STORAGE_FULL The storage is insufficient.
@@ -380,6 +383,7 @@ public:
* @param[in,out] contact The contact to remove
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c contact is invalid.
* @exception E_OBJ_NOT_FOUND The specified @c contact does not exist.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
@@ -397,6 +401,7 @@ public:
* @param[in] contactId The contact ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c contactId is invalid.
* @exception E_OBJ_NOT_FOUND The specified @c contactId does not exist.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
@@ -415,6 +420,7 @@ public:
* @param[in] contact The contact to update
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_OBJ_NOT_FOUND The specified @c contact does not exist in this address book.
* @exception E_INVALID_ARG The specified @c contact is invalid, or
* the properties of the specified @c contact have not been set.
@@ -442,6 +448,7 @@ public:
* @param[in,out] category The category to add
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG Either of the following conditions has occurred: @n
* - The name of the category has not been set. @n
* - The category ID of the @c category is not #INVALID_RECORD_ID. @n
@@ -476,6 +483,7 @@ public:
* @param[in,out] category The category to remove
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c category is invalid or a default category.
* @exception E_OBJ_NOT_FOUND The specified @c category does not exist in this address book.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
@@ -494,6 +502,7 @@ public:
* @param[in] categoryId The category ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c categoryId is invalid or the category specified by @ categoryId is a default category.
* @exception E_OBJ_NOT_FOUND The specified @c categoryId does not exist in this address book.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
@@ -519,6 +528,7 @@ public:
* @param[in] category The category to update
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_OBJ_NOT_FOUND The specified @c category does not exist in this address book.
* @exception E_INVALID_ARG The specified @c category is invalid, or
* one of the contact members is invalid.
@@ -552,6 +562,7 @@ public:
* else an empty list if there is no contact, or @c null if an exception occurs (@ref Contact list)
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
@@ -576,6 +587,7 @@ public:
* @param[in] categoryId The category ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c categoryId is less than INVALID_RECORD_ID.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks
@@ -602,6 +614,7 @@ public:
* @param[in] countPerPage The maximum count of the result items on a page
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_OUT_OF_RANGE The specified @c pageNo or @c countPerPage is less than @c 1.
* @exception E_INVALID_ARG A specified input parameter is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
@@ -630,6 +643,7 @@ public:
* @param[in] countPerPage The maximum count of the result items on a page
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_OUT_OF_RANGE The specified @c pageNo or @c countPerPage is less than @c 1.
* @exception E_INVALID_ARG The specified @c category is invalid, or
* one of the contact members is invalid.
@@ -655,6 +669,7 @@ public:
* @param[in] contactId The contact ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c contactId is invalid.
* @exception E_OBJ_NOT_FOUND The specified @c contactId is not found.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
@@ -673,6 +688,7 @@ public:
* else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
@@ -690,6 +706,7 @@ public:
* @param [in] contactId The contact ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified contact or category does not exist, or the specified contact and category are not in this addressbook.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks If the contact is already a member of the category, this method does nothing.
@@ -708,6 +725,7 @@ public:
* @param [in] contactId The contact ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified contact or category does not exist, or the specified contact and category are not in this addressbook.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks If the contact is not a member of the category, this method does nothing.
@@ -726,6 +744,7 @@ public:
* else an empty list if there is no category, or @c null if an exception occurs (@ref Category list)
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
@@ -744,6 +763,7 @@ public:
* @param[in] contactId The contact ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c contactId is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
@@ -761,6 +781,7 @@ public:
* else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
@@ -778,6 +799,7 @@ public:
* @param[in] categoryId The category ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c categoryId is invalid.
* @exception E_OBJ_NOT_FOUND The specified record is not found.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
@@ -799,6 +821,7 @@ public:
* @param[in] email The substring of the email to search
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c email is an empty string.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks
@@ -823,6 +846,7 @@ public:
* @param[in] name The substring of the name to search
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c name is an empty string.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks
@@ -848,6 +872,7 @@ public:
* @param[in] phoneNumber The substring of the phone number to search
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c phoneNumber is an empty string.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks
@@ -869,6 +894,7 @@ public:
* else @c -1 if an exception occurs
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @see GetChangedContactsAfterN()
@@ -892,6 +918,7 @@ public:
* @param[out] latestVersion The latest change version among the changed contacts
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c version is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
@@ -932,6 +959,7 @@ public:
* @param[out] latestVersion The latest change version among the changed contacts
* @exception E_SUCCESS The method is successful.
* @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.
* @exception E_INVALID_ARG The specified @c version is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error
* @remarks The specific error code can be accessed using the GetLastResult() method.
@@ -976,6 +1004,7 @@ public:
* @param[out] latestVersion The latest change version among the changed categories
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c version is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
@@ -1017,6 +1046,7 @@ public:
* @param[out] latestVersion The latest change version among the changed categories
* @exception E_SUCCESS The method is successful.
* @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.
* @exception E_INVALID_ARG The specified @c version is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error
* @remarks The specific error code can be accessed using the GetLastResult() method.
@@ -1056,6 +1086,7 @@ public:
* @param[in] pUserProfile The user profile to set
* @exception E_SUCCESS The method is successful.
* @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.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
*/
result SetUserProfile(const UserProfile* pUserProfile);
@@ -1071,6 +1102,7 @@ public:
* else @c null if the user profile does not exist, or if an exception has occurred
* @exception E_SUCCESS The method is successful.
* @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.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
@@ -1089,6 +1121,7 @@ public:
* @param[in] version The change version
* @exception E_SUCCESS The method is successful.
* @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.
* @exception E_INVALID_ARG The specified @c version is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
@@ -1135,6 +1168,7 @@ public:
* @param[out] pContactIdList A pointer to the list of contact IDs that have been added successfully @n Pass @c null if the contact IDs are not necessary.
* @exception E_SUCCESS The method is successful.
* @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.
* @exception E_INVALID_ARG Either of the following conditions has occurred:
* - The specified @c contactList is empty.
* - The specified @c contactList contains an empty contact.
@@ -1157,6 +1191,7 @@ public:
* @param[in] contactList The contacts to update @n The list should contain the Contact instances.
* @exception E_SUCCESS The method is successful.
* @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.
* @exception E_INVALID_ARG Either of the following conditions has occurred:
* - The specified @c contactList is empty.
* - The specified @c contactList contains an empty contact.
@@ -1180,6 +1215,7 @@ public:
* @param[in] contactIdList The list of contact IDs to delete
* @exception E_SUCCESS The method is successful.
* @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.
* @exception E_INVALID_ARG The specified @c contactIdList is empty or contains an invalid ID.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks If an exception occurs during removing contacts, the changes are getting rollbacked. @n
diff --git a/inc/FSclAddressbookManager.h b/inc/FSclAddressbookManager.h
index 5b9bf9a..51f8c00 100644
--- a/inc/FSclAddressbookManager.h
+++ b/inc/FSclAddressbookManager.h
@@ -78,6 +78,7 @@ public:
* @param[in] name The addressbook name
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c accountId is invalid or @c name is an empty string.
* @exception E_OBJ_ALREADY_EXIST The addressbook with the specified account ID or name already exists.
* @exception E_STORAGE_FULL The storage is insufficient.
@@ -99,6 +100,7 @@ public:
* @param[in] addressbookId The addressbook ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c addressbookId is invalid or the addressbook specified by @c addressbookId is a default addressbook.
* @exception E_OBJ_NOT_FOUND The specified @c addressbookId does not exist.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
@@ -117,6 +119,7 @@ public:
* @param[in] accountId The account ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c accountId is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
@@ -134,6 +137,7 @@ public:
* else an empty list if there is no addressbook, or @c null if an exception occurs (@ref Addressbook list)
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
@@ -150,6 +154,7 @@ public:
* @param[in] addressbookId The addressbook ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c addressbookId is invalid.
* @exception E_OBJ_NOT_FOUND The specified @c addressbookId does not exist.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
@@ -174,6 +179,7 @@ public:
* @param[in] pListener The event listener
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
*/
result SetEventListener(IAddressbookEventListener* pListener);
@@ -191,6 +197,7 @@ public:
* @param[in] pListener The event listener
* @exception E_SUCCESS The method is successful.
* @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.
* @exception E_SYSTEM The method cannot proceed due to a severe system error
*/
result SetAddressbookChangeEventListener(IAddressbookChangeEventListener* pListener);
@@ -209,6 +216,7 @@ public:
* @param[in] addressbookId The addressbook ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG Either of the following conditions has occurred: @n
* - The contact ID is not #INVALID_RECORD_ID. @n
* - The properties of the contact have not been set. @n
@@ -233,6 +241,7 @@ public:
* @param[in] contactId The contact ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c contactId is invalid.
* @exception E_OBJ_NOT_FOUND The specified @c contactId does not exist.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
@@ -251,6 +260,7 @@ public:
* @param[in] contact The contact to update
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_OBJ_NOT_FOUND The specified @c contact does not exist in this address book.
* @exception E_INVALID_ARG The specified @c contact is invalid, or
* the properties of the specified @c contact have not been set.
@@ -273,6 +283,7 @@ public:
* @param[in] addressbookId The addressbook ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG Either of the following conditions has occurred: @n
* - The name of the category has not been set. @n
* - One of the member contacts is invalid. @n
@@ -294,6 +305,7 @@ public:
* @param[in] categoryId The category ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c categoryId is invalid or the category specified by @c categoryId is a default category.
* @exception E_OBJ_NOT_FOUND The specified @c categoryId does not exist in this address book.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
@@ -312,6 +324,7 @@ public:
* @param[in] category The category to update
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_OBJ_NOT_FOUND The specified @c category does not exist in this address book.
* @exception E_INVALID_ARG The specified @c category is invalid, or
* one of the contact members is invalid.
@@ -332,6 +345,7 @@ public:
* else an empty list if there is no contact, or @c null if an exception occurs (@ref Contact list)
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
@@ -356,6 +370,7 @@ public:
* @param[in] categoryId The category ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c categoryId is less than INVALID_RECORD_ID.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks
@@ -379,6 +394,7 @@ public:
* @param[in] personId The person ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c personId is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
@@ -399,6 +415,7 @@ public:
* @param[in] personId The person ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c personId is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
@@ -417,6 +434,7 @@ public:
* @param[in] contactId The contact ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c contactId is invalid.
* @exception E_OBJ_NOT_FOUND The specified @c contactId is not found.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
@@ -435,6 +453,7 @@ public:
* else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
@@ -452,6 +471,7 @@ public:
* @param [in] contactId The contact ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified contact or category does not exist,
* or the specified contact and category are not in the same addressbook.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
@@ -471,6 +491,7 @@ public:
* @param [in] contactId The contact ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified contact or category does not exist.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks If the contact is not a member of the category, this method does nothing.
@@ -489,6 +510,7 @@ public:
* else an empty list if there is no category, or @c null if an exception occurs (@ref Category list)
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
@@ -507,6 +529,7 @@ public:
* @param[in] contactId The contact ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c contactId is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
@@ -524,6 +547,7 @@ public:
* else @c -1 if an error occurs
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
@@ -541,6 +565,7 @@ public:
* @param[in] categoryId The category ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c categoryId is invalid.
* @exception E_OBJ_NOT_FOUND The specified record is not found.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
@@ -562,6 +587,7 @@ public:
* @param[in] email The substring of the email to search
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c email is an empty string.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks
@@ -588,6 +614,7 @@ public:
* @param[in] name The substring of the name to search
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c name is an empty string.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks
@@ -614,6 +641,7 @@ public:
* @param[in] phoneNumber The substring of the phone number to search
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c phoneNumber is an empty string.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks
@@ -636,6 +664,7 @@ public:
* else @c -1 if an exception occurs
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @see GetChangedContactsAfterN()
@@ -659,6 +688,7 @@ public:
* @param[out] latestVersion The latest change version among the changed contacts
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c version is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
@@ -703,6 +733,7 @@ public:
* @param[out] latestVersion The latest change version among the changed categories
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c version is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
@@ -743,6 +774,7 @@ public:
* @param[in] personId The person ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c personId is invalid.
* @exception E_OBJ_NOT_FOUND The specified @c personId is not found.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
@@ -762,6 +794,7 @@ public:
* @param[in] personId The person ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c personId is invalid.
* @exception E_OBJ_NOT_FOUND The specified person does not exist.
* @exception E_SYSTEM The method cannot be proceed due to a severe system error.
@@ -780,6 +813,7 @@ public:
* else an empty list if there is no person, or @c null if an exception occurs (@ref Person list)
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_SYSTEM The method cannot be proceed due to a severe system error.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
@@ -804,6 +838,7 @@ public:
* @param[in] categoryId The category ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c categoryId is invalid.
* @exception E_OBJ_NOT_FOUND The specified category does not exist.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
@@ -828,6 +863,7 @@ public:
* else an empty list if there is no favorite person, or @c null if an exception occurs (@ref Person list)
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
@@ -853,6 +889,7 @@ public:
* @param[in] keyword The key to search
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c keyword is an empty string.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks
@@ -877,6 +914,7 @@ public:
* else @c false to set the specified person as a non-favorite
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c personId is invalid.
* @exception E_OBJ_NOT_FOUND The specified person does not exist.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
@@ -904,6 +942,7 @@ public:
* @param[in] targetPersonId The target person ID
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c sourcePersonId or @c targetPersonId is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
*/
@@ -930,6 +969,7 @@ public:
* @param[out] newPersonId The ID of the new person
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c personId or @c contactId is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
*/
@@ -954,6 +994,7 @@ public:
* @param[in] maxCount The maximum count of the searched results @n If this value is @c 0, it will be ignored.
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c offset or @c maxCount is less than @c 0.
* Or, the @c propertyToSort is not an elements of the enumerator that corresponds with the type of the specified @c filter.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
@@ -985,6 +1026,7 @@ public:
* @param[in] filter The filter that specifies the search condition @n If the filter is empty, all items that are specified by the type of this filter will be searched.
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @see AddressbookFilterProperty
@@ -1026,6 +1068,7 @@ public:
* @param[in] vcardPath The file path of a vCard file
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c person is invalid.
* @exception E_ILLEGAL_ACCESS Access is denied due to insufficient permission.
* @exception E_FILE_ALREADY_EXIST The specified file already exists.
@@ -1046,6 +1089,7 @@ public:
* @param[in] vcardPath The file path of a vCard file
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG Either the specified @c personList is invalid or
* the specified @c vcardPath is invalid.
* @exception E_ILLEGAL_ACCESS Access is denied due to insufficient permission.
@@ -1134,6 +1178,7 @@ public:
* @param[in] person The person to export
* @exception E_SUCCESS The method is successful.
* @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.
* @exception E_INVALID_ARG The specified @c person is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
@@ -1153,6 +1198,7 @@ public:
* @param[in] personList The person list to export @n The list should contain the Person instances.
* @exception E_SUCCESS The method is successful.
* @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.
* @exception E_INVALID_ARG The specified @c personList contains invalid person.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
@@ -1253,6 +1299,7 @@ public:
* else an empty list if there is no user profile, or @c null if an exception occurs (@ref UserProfile list)
* @exception E_SUCCESS The method is successful.
* @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.
* @exception E_SYSTEM The method cannot be proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
@@ -1270,6 +1317,7 @@ public:
* @param[in] addressbookId The addressbook ID
* @exception E_SUCCESS The method is successful.
* @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.
* @exception E_INVALID_ARG The specified @c addressbookId is invalid.
* @exception E_OBJ_NOT_FOUND The specified @c addressbook is not found.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
diff --git a/inc/FSclPerson.h b/inc/FSclPerson.h
index f8f6a60..60fa911 100644
--- a/inc/FSclPerson.h
+++ b/inc/FSclPerson.h
@@ -195,6 +195,7 @@ public:
* else @c false to set this person as non-favorite
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @see IsFavorite()
* @see AddressbookManager::GetFavoritePersonsN()
@@ -213,6 +214,7 @@ public:
* @param[in] phoneNumber The phone number
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c phoneNumber is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @see GetPrimaryPhoneNumber()
@@ -230,6 +232,7 @@ public:
* @param[in] email The email
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_INVALID_ARG The specified @c phoneNumber is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @see GetPrimaryEmail()
@@ -246,6 +249,7 @@ public:
* @return The primary phone number @n If this instance does not have the primary email, an empty PhoneNumber instance is returned.
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @see SetAsPrimaryPhoneNumber()
@@ -262,6 +266,7 @@ public:
* @return The primary email @n If this instance does not have the primary email, an empty Email instance is returned.
* @exception E_SUCCESS The method is successful.
* @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
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* @see SetAsPrimaryEmail()
diff --git a/src/FSclAddressbook.cpp b/src/FSclAddressbook.cpp
index 8c6832c..ccf9bf5 100644
--- a/src/FSclAddressbook.cpp
+++ b/src/FSclAddressbook.cpp
@@ -86,12 +86,13 @@ CATCH:
result
Addressbook::SetEventListener(IAddressbookEventListener* pListener)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookImpl->SetAddressbookEventListener(pListener);
+ r = __pAddressbookImpl->SetAddressbookEventListener(pListener);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -100,12 +101,13 @@ Addressbook::SetEventListener(IAddressbookEventListener* pListener)
result
Addressbook::SetAddressbookChangeEventListener(IAddressbookChangeEventListener* pListener)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookImpl->SetAddressbookChangeEventListener(pListener);
+ r = __pAddressbookImpl->SetAddressbookChangeEventListener(pListener);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -141,12 +143,13 @@ Addressbook::GetAccountId(void) const
result
Addressbook::AddContact(Contact& contact)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookImpl->AddContact(contact);
+ r = __pAddressbookImpl->AddContact(contact);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -155,12 +158,13 @@ Addressbook::AddContact(Contact& contact)
result
Addressbook::AddCategory(Category& category)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookImpl->AddCategory(category);
+ r = __pAddressbookImpl->AddCategory(category);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -169,12 +173,13 @@ Addressbook::AddCategory(Category& category)
result
Addressbook::RemoveContact(Contact& contact)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookImpl->RemoveContact(contact);
+ r = __pAddressbookImpl->RemoveContact(contact);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -183,12 +188,13 @@ Addressbook::RemoveContact(Contact& contact)
result
Addressbook::RemoveContact(RecordId contactId)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookImpl->RemoveContact(contactId);
+ r = __pAddressbookImpl->RemoveContact(contactId);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -197,12 +203,13 @@ Addressbook::RemoveContact(RecordId contactId)
result
Addressbook::RemoveCategory(Category& category)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookImpl->RemoveCategory(category.GetRecordId());
+ r = __pAddressbookImpl->RemoveCategory(category.GetRecordId());
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
_CategoryImpl::GetInstance(category)->Invalidate();
@@ -214,12 +221,13 @@ Addressbook::RemoveCategory(Category& category)
result
Addressbook::RemoveCategory(RecordId categoryId)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookImpl->RemoveCategory(categoryId);
+ r = __pAddressbookImpl->RemoveCategory(categoryId);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -228,12 +236,13 @@ Addressbook::RemoveCategory(RecordId categoryId)
result
Addressbook::UpdateContact(const Contact& contact)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookImpl->UpdateContact(contact);
+ r = __pAddressbookImpl->UpdateContact(contact);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -242,12 +251,13 @@ Addressbook::UpdateContact(const Contact& contact)
result
Addressbook::UpdateCategory(const Category& category)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookImpl->UpdateCategory(category);
+ r = __pAddressbookImpl->UpdateCategory(category);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -256,8 +266,9 @@ Addressbook::UpdateCategory(const Category& category)
IList*
Addressbook::GetAllContactsN(void) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -270,8 +281,9 @@ Addressbook::GetAllContactsN(void) const
IList*
Addressbook::GetContactsByCategoryN(RecordId categoryId) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -284,12 +296,13 @@ Addressbook::GetContactsByCategoryN(RecordId categoryId) const
result
Addressbook::AddMemberToCategory(RecordId categoryId, RecordId contactId)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookImpl->AddMemberToCategory(categoryId, contactId);
+ r = __pAddressbookImpl->AddMemberToCategory(categoryId, contactId);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -298,12 +311,13 @@ Addressbook::AddMemberToCategory(RecordId categoryId, RecordId contactId)
result
Addressbook::RemoveMemberFromCategory(RecordId categoryId, RecordId contactId)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookImpl->RemoveMemberFromCategory(categoryId, contactId);
+ r = __pAddressbookImpl->RemoveMemberFromCategory(categoryId, contactId);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -312,8 +326,9 @@ Addressbook::RemoveMemberFromCategory(RecordId categoryId, RecordId contactId)
IList*
Addressbook::GetAllCategoriesN(void) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -326,8 +341,9 @@ Addressbook::GetAllCategoriesN(void) const
IList*
Addressbook::GetCategoriesByContactN(RecordId contactId) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -340,8 +356,9 @@ Addressbook::GetCategoriesByContactN(RecordId contactId) const
IList*
Addressbook::GetContactsN(int pageNo, int countPerPage) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -354,8 +371,9 @@ Addressbook::GetContactsN(int pageNo, int countPerPage) const
IList*
Addressbook::GetContactsInN(const Category& category, int pageNo, int countPerPage) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -368,8 +386,9 @@ Addressbook::GetContactsInN(const Category& category, int pageNo, int countPerPa
IList*
Addressbook::SearchContactsByEmailN(const String& email) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -382,8 +401,9 @@ Addressbook::SearchContactsByEmailN(const String& email) const
IList*
Addressbook::SearchContactsByNameN(const String& name) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -396,8 +416,9 @@ Addressbook::SearchContactsByNameN(const String& name) const
IList*
Addressbook::SearchContactsByPhoneNumberN(const String& phoneNumber) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -410,8 +431,9 @@ Addressbook::SearchContactsByPhoneNumberN(const String& phoneNumber) const
int
Addressbook::GetCategoryCount(void) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, -1, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, -1, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -424,8 +446,9 @@ Addressbook::GetCategoryCount(void) const
int
Addressbook::GetContactCount(void) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, -1, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, -1, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -438,8 +461,9 @@ Addressbook::GetContactCount(void) const
Contact*
Addressbook::GetContactN(RecordId contactId) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -452,8 +476,9 @@ Addressbook::GetContactN(RecordId contactId) const
Category*
Addressbook::GetCategoryN(RecordId categoryId) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -466,8 +491,9 @@ Addressbook::GetCategoryN(RecordId categoryId) const
int
Addressbook::GetLatestVersion(void) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, -1, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, -1, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -480,8 +506,9 @@ Addressbook::GetLatestVersion(void) const
IList*
Addressbook::GetChangedContactsAfterN(int version, int& latestVersion) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -494,8 +521,9 @@ Addressbook::GetChangedContactsAfterN(int version, int& latestVersion) const
IList*
Addressbook::GetChangedCategoriesAfterN(int version, int& latestVersion) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -508,8 +536,9 @@ Addressbook::GetChangedCategoriesAfterN(int version, int& latestVersion) const
IList*
Addressbook::GetChangedContactInfoListN(int version, int& latestVersion) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -522,8 +551,9 @@ Addressbook::GetChangedContactInfoListN(int version, int& latestVersion) const
IList*
Addressbook::GetChangedCategoryInfoListN(int version, int& latestVersion) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -536,13 +566,12 @@ Addressbook::GetChangedCategoryInfoListN(int version, int& latestVersion) const
result
Addressbook::AddContacts(const IList& contactList, IListT<RecordId>* pContactIdList)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = E_SUCCESS;
-
r = __pAddressbookImpl->AddContacts(contactList, pContactIdList);
return r;
@@ -551,13 +580,12 @@ Addressbook::AddContacts(const IList& contactList, IListT<RecordId>* pContactIdL
result
Addressbook::UpdateContacts(const IList& contactList)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = E_SUCCESS;
-
r = __pAddressbookImpl->UpdateContacts(contactList);
return r;
@@ -566,13 +594,12 @@ Addressbook::UpdateContacts(const IList& contactList)
result
Addressbook::RemoveContacts(const IListT<RecordId>& contactIdList)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = E_SUCCESS;
-
r = __pAddressbookImpl->RemoveContacts(contactIdList);
return r;
@@ -581,12 +608,13 @@ Addressbook::RemoveContacts(const IListT<RecordId>& contactIdList)
result
Addressbook::SetUserProfile(const UserProfile* pUserProfile)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_USERPROFILE_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_USERPROFILE_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookImpl->SetUserProfile(pUserProfile);
+ r = __pAddressbookImpl->SetUserProfile(pUserProfile);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -595,8 +623,9 @@ Addressbook::SetUserProfile(const UserProfile* pUserProfile)
UserProfile*
Addressbook::GetUserProfileN(void) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_USERPROFILE_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_USERPROFILE_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -609,8 +638,9 @@ Addressbook::GetUserProfileN(void) const
bool
Addressbook::IsUserProfileChangedAfter(int version) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_USERPROFILE_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_USERPROFILE_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, false, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookImpl != null,
"Not yet constructed. Construct() should be called before use.");
diff --git a/src/FSclAddressbookManager.cpp b/src/FSclAddressbookManager.cpp
index 6898c65..9e347a7 100644
--- a/src/FSclAddressbookManager.cpp
+++ b/src/FSclAddressbookManager.cpp
@@ -81,12 +81,13 @@ CATCH:
result
AddressbookManager::SetEventListener(IAddressbookEventListener* pListener)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookManagerImpl->SetEventListener(pListener);
+ r = __pAddressbookManagerImpl->SetEventListener(pListener);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -95,12 +96,13 @@ AddressbookManager::SetEventListener(IAddressbookEventListener* pListener)
result
AddressbookManager::SetAddressbookChangeEventListener(IAddressbookChangeEventListener* pListener)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookManagerImpl->SetAddressbookChangeEventListener(pListener);
+ r = __pAddressbookManagerImpl->SetAddressbookChangeEventListener(pListener);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -109,8 +111,9 @@ AddressbookManager::SetAddressbookChangeEventListener(IAddressbookChangeEventLis
Addressbook*
AddressbookManager::CreateAddressbookN(AccountId accountId, const String& name)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -123,12 +126,13 @@ AddressbookManager::CreateAddressbookN(AccountId accountId, const String& name)
result
AddressbookManager::DeleteAddressbook(AddressbookId addressbookId)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookManagerImpl->DeleteAddressbook(addressbookId);
+ r = __pAddressbookManagerImpl->DeleteAddressbook(addressbookId);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -137,8 +141,9 @@ AddressbookManager::DeleteAddressbook(AddressbookId addressbookId)
IList*
AddressbookManager::GetAddressbooksByAccountN(AccountId accountId) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -151,8 +156,9 @@ AddressbookManager::GetAddressbooksByAccountN(AccountId accountId) const
IList*
AddressbookManager::GetAllAddressbooksN(void) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -165,8 +171,9 @@ AddressbookManager::GetAllAddressbooksN(void) const
Addressbook*
AddressbookManager::GetAddressbookN(AddressbookId addressbookId) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -179,12 +186,13 @@ AddressbookManager::GetAddressbookN(AddressbookId addressbookId) const
result
AddressbookManager::AddContact(Contact& contact, AddressbookId addressbookId)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookManagerImpl->AddContact(contact, addressbookId);
+ r = __pAddressbookManagerImpl->AddContact(contact, addressbookId);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -193,12 +201,13 @@ AddressbookManager::AddContact(Contact& contact, AddressbookId addressbookId)
result
AddressbookManager::AddCategory(Category& category, AddressbookId addressbookId)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookManagerImpl->AddCategory(category, addressbookId);
+ r = __pAddressbookManagerImpl->AddCategory(category, addressbookId);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -207,12 +216,13 @@ AddressbookManager::AddCategory(Category& category, AddressbookId addressbookId)
result
AddressbookManager::RemoveContact(RecordId contactId)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookManagerImpl->RemoveContact(contactId);
+ r = __pAddressbookManagerImpl->RemoveContact(contactId);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -221,12 +231,13 @@ AddressbookManager::RemoveContact(RecordId contactId)
result
AddressbookManager::RemoveCategory(RecordId categoryId)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookManagerImpl->RemoveCategory(categoryId);
+ r = __pAddressbookManagerImpl->RemoveCategory(categoryId);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -235,12 +246,13 @@ AddressbookManager::RemoveCategory(RecordId categoryId)
result
AddressbookManager::UpdateContact(const Contact& contact)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookManagerImpl->UpdateContact(contact);
+ r = __pAddressbookManagerImpl->UpdateContact(contact);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -249,12 +261,13 @@ AddressbookManager::UpdateContact(const Contact& contact)
result
AddressbookManager::UpdateCategory(const Category& category)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookManagerImpl->UpdateCategory(category);
+ r = __pAddressbookManagerImpl->UpdateCategory(category);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -263,8 +276,9 @@ AddressbookManager::UpdateCategory(const Category& category)
IList*
AddressbookManager::GetAllContactsN(void) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -277,8 +291,9 @@ AddressbookManager::GetAllContactsN(void) const
IList*
AddressbookManager::GetContactsByCategoryN(RecordId categoryId) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -291,8 +306,9 @@ AddressbookManager::GetContactsByCategoryN(RecordId categoryId) const
IList*
AddressbookManager::GetContactsByPersonN(PersonId personId) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -305,12 +321,13 @@ AddressbookManager::GetContactsByPersonN(PersonId personId) const
result
AddressbookManager::AddMemberToCategory(RecordId categoryId, RecordId contactId)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookManagerImpl->AddMemberToCategory(categoryId, contactId);
+ r = __pAddressbookManagerImpl->AddMemberToCategory(categoryId, contactId);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -319,12 +336,13 @@ AddressbookManager::AddMemberToCategory(RecordId categoryId, RecordId contactId)
result
AddressbookManager::RemoveMemberFromCategory(RecordId categoryId, RecordId contactId)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookManagerImpl->RemoveMemberFromCategory(categoryId, contactId);
+ r = __pAddressbookManagerImpl->RemoveMemberFromCategory(categoryId, contactId);
SysTryReturn(NID_SCL, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
return E_SUCCESS;
@@ -333,8 +351,9 @@ AddressbookManager::RemoveMemberFromCategory(RecordId categoryId, RecordId conta
IList*
AddressbookManager::GetAllCategoriesN(void) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -347,8 +366,9 @@ AddressbookManager::GetAllCategoriesN(void) const
IList*
AddressbookManager::GetCategoriesByContactN(RecordId contactId) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -361,8 +381,9 @@ AddressbookManager::GetCategoriesByContactN(RecordId contactId) const
IList*
AddressbookManager::GetCategoriesByPersonN(PersonId personId) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -375,8 +396,9 @@ AddressbookManager::GetCategoriesByPersonN(PersonId personId) const
IList*
AddressbookManager::SearchContactsByEmailN(const String& email) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -389,8 +411,9 @@ AddressbookManager::SearchContactsByEmailN(const String& email) const
IList*
AddressbookManager::SearchContactsByNameN(const String& name) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -403,8 +426,9 @@ AddressbookManager::SearchContactsByNameN(const String& name) const
IList*
AddressbookManager::SearchContactsByPhoneNumberN(const String& phoneNumber) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -417,8 +441,9 @@ AddressbookManager::SearchContactsByPhoneNumberN(const String& phoneNumber) cons
int
AddressbookManager::GetCategoryCount(void) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, -1, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, -1, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -431,8 +456,9 @@ AddressbookManager::GetCategoryCount(void) const
int
AddressbookManager::GetContactCount(void) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, -1, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, -1, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -445,8 +471,9 @@ AddressbookManager::GetContactCount(void) const
Contact*
AddressbookManager::GetContactN(RecordId contactId) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -459,8 +486,9 @@ AddressbookManager::GetContactN(RecordId contactId) const
Person*
AddressbookManager::GetPersonN(PersonId personId) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -472,8 +500,9 @@ AddressbookManager::GetPersonN(PersonId personId) const
Category*
AddressbookManager::GetCategoryN(RecordId categoryId) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -486,8 +515,9 @@ AddressbookManager::GetCategoryN(RecordId categoryId) const
int
AddressbookManager::GetLatestVersion(void) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, -1, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, -1, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -500,8 +530,9 @@ AddressbookManager::GetLatestVersion(void) const
IList*
AddressbookManager::GetChangedContactsAfterN(int version, int& latestVersion) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -514,8 +545,9 @@ AddressbookManager::GetChangedContactsAfterN(int version, int& latestVersion) co
IList*
AddressbookManager::GetChangedCategoriesAfterN(int version, int& latestVersion) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -528,8 +560,9 @@ AddressbookManager::GetChangedCategoriesAfterN(int version, int& latestVersion)
result
AddressbookManager::RemovePerson(PersonId personId)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -539,8 +572,9 @@ AddressbookManager::RemovePerson(PersonId personId)
result
AddressbookManager::SetPersonAsFavorite(PersonId personId, bool isFavorite)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -550,8 +584,9 @@ AddressbookManager::SetPersonAsFavorite(PersonId personId, bool isFavorite)
IList*
AddressbookManager::GetAllPersonsN(void) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -561,8 +596,9 @@ AddressbookManager::GetAllPersonsN(void) const
IList*
AddressbookManager::GetPersonsByCategoryN(RecordId categoryId) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -572,8 +608,9 @@ AddressbookManager::GetPersonsByCategoryN(RecordId categoryId) const
IList*
AddressbookManager::GetFavoritePersonsN() const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -583,8 +620,9 @@ AddressbookManager::GetFavoritePersonsN() const
IList*
AddressbookManager::SearchPersonsN(const Tizen::Base::String& keyword) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -594,12 +632,13 @@ AddressbookManager::SearchPersonsN(const Tizen::Base::String& keyword) const
result
AddressbookManager::MergePersons(PersonId sourcePersonId, PersonId targetPersonId)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookManagerImpl->MergePersons(sourcePersonId, targetPersonId);
+ r = __pAddressbookManagerImpl->MergePersons(sourcePersonId, targetPersonId);
SysTryReturn(NID_SCL, r == E_SUCCESS, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
return E_SUCCESS;
@@ -608,12 +647,13 @@ AddressbookManager::MergePersons(PersonId sourcePersonId, PersonId targetPersonI
result
AddressbookManager::UnlinkContact(PersonId personId, RecordId contactId, PersonId& newPersonId)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
- result r = __pAddressbookManagerImpl->UnlinkContact(personId, contactId, newPersonId);
+ r = __pAddressbookManagerImpl->UnlinkContact(personId, contactId, newPersonId);
SysTryReturn(NID_SCL, r == E_SUCCESS, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
return E_SUCCESS;
@@ -623,8 +663,9 @@ IList*
AddressbookManager::SearchN(const AddressbookFilter& filter,
unsigned long propertyToSort, Tizen::Base::SortOrder sortOrder, int offset, int maxCount)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -634,8 +675,9 @@ AddressbookManager::SearchN(const AddressbookFilter& filter,
int
AddressbookManager::GetMatchedItemCount(const AddressbookFilter& filter)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, -1, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, -1, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -651,8 +693,9 @@ AddressbookManager::ParseContactsFromVcardN(const Tizen::Base::String& vcardPath
result
AddressbookManager::ExportPersonToVcard(const Person& person, const Tizen::Base::String& vcardPath)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -662,8 +705,9 @@ AddressbookManager::ExportPersonToVcard(const Person& person, const Tizen::Base:
result
AddressbookManager::ExportPersonsToVcard(const Tizen::Base::Collection::IList& personList, const Tizen::Base::String& vcardPath)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -697,8 +741,9 @@ AddressbookManager::ExportContactsToVcardStreamN(const Tizen::Base::Collection::
ByteBuffer*
AddressbookManager::ExportPersonToVcardStreamN(const Person& person)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -708,8 +753,9 @@ AddressbookManager::ExportPersonToVcardStreamN(const Person& person)
ByteBuffer*
AddressbookManager::ExportPersonsToVcardStreamN(const Tizen::Base::Collection::IList& personList)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -761,8 +807,9 @@ AddressbookManager::ExportUserProfilesToVcard(const Tizen::Base::Collection::ILi
Tizen::Base::Collection::IList*
AddressbookManager::GetAllUserProfilesN(void) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_USERPROFILE_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_USERPROFILE_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
@@ -772,8 +819,9 @@ AddressbookManager::GetAllUserProfilesN(void) const
UserProfile*
AddressbookManager::GetUserProfileN(AddressbookId addressbookId) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_USERPROFILE_READ) == E_SUCCESS, null, E_PRIVILEGE_DENIED,
- "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_USERPROFILE_READ);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, null, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
SysAssertf(__pAddressbookManagerImpl != null,
"Not yet constructed. Construct() should be called before use.");
diff --git a/src/FSclPerson.cpp b/src/FSclPerson.cpp
index f251206..1707947 100644
--- a/src/FSclPerson.cpp
+++ b/src/FSclPerson.cpp
@@ -81,8 +81,9 @@ Person::GetId(void) const
result
Person::SetAsFavorite(bool isFavorite)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED
- , "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
return __pPersonImpl->SetAsFavorite(isFavorite);
}
@@ -126,8 +127,9 @@ Person::GetAccountIdsN(void) const
result
Person::SetAsPrimaryPhoneNumber(const PhoneNumber& phoneNumber)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED
- , "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
return __pPersonImpl->SetAsPrimaryPhoneNumber(phoneNumber);
}
@@ -135,8 +137,9 @@ Person::SetAsPrimaryPhoneNumber(const PhoneNumber& phoneNumber)
result
Person::SetAsPrimaryEmail(const Email& email)
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE) == E_SUCCESS, E_PRIVILEGE_DENIED, E_PRIVILEGE_DENIED
- , "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, r, r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
return __pPersonImpl->SetAsPrimaryEmail(email);
}
@@ -144,8 +147,9 @@ Person::SetAsPrimaryEmail(const Email& email)
PhoneNumber
Person::GetPrimaryPhoneNumber(void) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, PhoneNumber(), E_PRIVILEGE_DENIED
- , "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, PhoneNumber(), r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
return __pPersonImpl->GetPrimaryPhoneNumber();
}
@@ -153,8 +157,9 @@ Person::GetPrimaryPhoneNumber(void) const
Email
Person::GetPrimaryEmail(void) const
{
- SysTryReturn(NID_SCL, _AccessController::CheckUserPrivilege(_PRV_CONTACT_READ) == E_SUCCESS, Email(), E_PRIVILEGE_DENIED
- , "[%s] The application does not have the privilege to call this method.", GetErrorMessage(E_PRIVILEGE_DENIED));
+ result r = _AccessController::CheckUserPrivilege(_PRV_CONTACT_WRITE);
+ r = TransExceptionsExclusive(r, E_PRIVILEGE_DENIED, E_USER_NOT_CONSENTED);
+ SysTryReturn(NID_SCL, r == E_SUCCESS, Email(), r, "[%s] The application is not permitted to call this method.", GetErrorMessage(r));
return __pPersonImpl->GetPrimaryEmail();
}