Modify API Reference
authorJongkyu Koo <jk.koo@samsung.com>
Tue, 16 May 2017 06:41:51 +0000 (15:41 +0900)
committerJongkyu Koo <jk.koo@samsung.com>
Tue, 16 May 2017 06:56:46 +0000 (15:56 +0900)
Change-Id: If65a7b7d4e9fd8b3e223b91a79267e046070a8d4
Signed-off-by: Jongkyu Koo <jk.koo@samsung.com>
12 files changed:
src/Tizen.Pims.Contacts/Interop/Interop.Database.cs
src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsDatabase.cs
src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsFilter.cs
src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsList.cs
src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsManager.cs
src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsQuery.cs
src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsRecord.cs
src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsVcard.cs
src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsViews.cs
src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/DBStatusChangedEventArgs.cs
src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/NameDisplayOrderChangedEventArgs.cs [changed mode: 0755->0644]
src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/NameSortingOrderChangedEventArgs.cs [changed mode: 0755->0644]

index 0dd1b96..787baaa 100644 (file)
@@ -62,16 +62,16 @@ internal static partial class Interop
         internal static extern int ReplaceRecords(IntPtr listHandle, int[] recordIdArray, int count);
 
         [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_get_current_version")]
-        internal static extern int GetVersion(out int contactsDbVersion);
+        internal static extern int GetVersion(out int contactsDBVersion);
 
         [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_add_changed_cb")]
-        internal static extern int AddChangedCb(string uri, ContactsDbChangedCallback callback, IntPtr userData);
+        internal static extern int AddChangedCb(string uri, ContactsDBChangedCallback callback, IntPtr userData);
 
         [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_remove_changed_cb")]
-        internal static extern int RemoveChangedCb(string uri, ContactsDbChangedCallback callback, IntPtr userData);
+        internal static extern int RemoveChangedCb(string uri, ContactsDBChangedCallback callback, IntPtr userData);
 
         [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_get_changes_by_version")]
-        internal static extern int GetChangesByVersion(string uri, int addressBookId, int contactsDbVersion, out IntPtr changeRecordList, out int currentContactsDbVersion);
+        internal static extern int GetChangesByVersion(string uri, int addressBookId, int contactsDBVersion, out IntPtr changeRecordList, out int currentContactsDBVersion);
 
         [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_search_records")]
         internal static extern int Search(string uri, string keyword, int offset, int limit, out IntPtr listHandle);
@@ -101,18 +101,18 @@ internal static partial class Interop
         internal static extern int GetLastChangeVersion(out int version);
 
         [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_get_status")]
-        internal static extern int GetStatus(out Tizen.Pims.Contacts.ContactsDatabase.DbStatus status);
+        internal static extern int GetStatus(out Tizen.Pims.Contacts.ContactsDatabase.DBStatus status);
 
         [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_add_changed_cb")]
-        internal static extern int AddStatusChangedCb(ContactsDbStatusChangedCallback callback, IntPtr userData);
+        internal static extern int AddStatusChangedCb(ContactsDBStatusChangedCallback callback, IntPtr userData);
 
         [DllImport(Libraries.Contacts, EntryPoint = "contacts_db_remove_changed_cb")]
-        internal static extern int RemoveStatusChangedCb(ContactsDbStatusChangedCallback callback, IntPtr userData);
+        internal static extern int RemoveStatusChangedCb(ContactsDBStatusChangedCallback callback, IntPtr userData);
 
         [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
-        internal delegate void ContactsDbChangedCallback(string uri, IntPtr userData);
+        internal delegate void ContactsDBChangedCallback(string uri, IntPtr userData);
 
         [UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)]
-        internal delegate void ContactsDbStatusChangedCallback(Tizen.Pims.Contacts.ContactsDatabase.DbStatus status, IntPtr userData);
+        internal delegate void ContactsDBStatusChangedCallback(Tizen.Pims.Contacts.ContactsDatabase.DBStatus status, IntPtr userData);
     }
 }
index e55bd09..e632904 100644 (file)
@@ -21,43 +21,46 @@ using System.Runtime.InteropServices;
 namespace Tizen.Pims.Contacts
 {
     /// <summary>
-    /// ContactsDatabase class is the interface class for managing contacts information from/to the database.
-    /// This class allows user to access/create/update db operations for contacts information.
+    /// ContactsDatabase provides methods to manage contacts information from/to the database.
     /// </summary>
+    /// <remarks>
+    /// This class allows user to access/create/update db operations for contacts information.
+    /// </remarks>
     public class ContactsDatabase
     {
         /// <summary>
-        /// Called when the designated view changes.
+        /// Delegete for detecting the contacts database changes
         /// </summary>
         /// <param name="uri">The contacts view URI</param>
         /// <remarks>
         /// The delegate must be registered using AddDBChangedDelegate.
+        /// It's invoked when the designated view changes.
         /// </remarks>
         /// <see cref="AddDBChangedDelegate"/>
-        public delegate void ContactsDbChangedDelegate(string uri);
+        public delegate void ContactsDBChangedDelegate(string uri);
         private Object thisLock = new Object();
-        private Interop.Database.ContactsDbStatusChangedCallback _contactsDbStatusChangedCallback;
+        private Interop.Database.ContactsDBStatusChangedCallback _contactsDBStatusChangedCallback;
         private event EventHandler<DBStatusChangedEventArgs> _dbStatusChanged;
-        private Dictionary<string, ContactsDbChangedDelegate> _callbackMap = new Dictionary<string, ContactsDbChangedDelegate>();
-        private Dictionary<string, Interop.Database.ContactsDbChangedCallback> _delegateMap = new Dictionary<string, Interop.Database.ContactsDbChangedCallback>();
-        private Interop.Database.ContactsDbChangedCallback _dbChangedDelegate;
+        private Dictionary<string, ContactsDBChangedDelegate> _callbackMap = new Dictionary<string, ContactsDBChangedDelegate>();
+        private Dictionary<string, Interop.Database.ContactsDBChangedCallback> _delegateMap = new Dictionary<string, Interop.Database.ContactsDBChangedCallback>();
+        private Interop.Database.ContactsDBChangedCallback _dbChangedDelegate;
 
         internal ContactsDatabase()
         {
-            //To be created in ContactsManager only.
+            ///To be created in ContactsManager only.
         }
 
         /// <summary>
         /// Enumeration for contacts database status.
         /// </summary>
-        public enum DbStatus
+        public enum DBStatus
         {
             /// <summary>
             /// Normal
             /// </summary>
             Normal,
             /// <summary>
-            /// Enumeration for contact DB status.
+            /// Changing collation.
             /// </summary>
             ChangingCollation
         }
@@ -86,7 +89,7 @@ namespace Tizen.Pims.Contacts
         }
 
         /// <summary>
-        /// (event) DBStatusChanged is raised when changing contacts database status.
+        /// Occurs when contacts database status is changed.
         /// </summary>
         public event EventHandler<DBStatusChangedEventArgs> DBStatusChanged
         {
@@ -94,13 +97,13 @@ namespace Tizen.Pims.Contacts
             {
                 lock (thisLock)
                 {
-                    _contactsDbStatusChangedCallback = (DbStatus status, IntPtr userData) =>
+                    _contactsDBStatusChangedCallback = (DBStatus status, IntPtr userData) =>
                     {
                         DBStatusChangedEventArgs args = new DBStatusChangedEventArgs(status);
                         _dbStatusChanged?.Invoke(this, args);
                     };
 
-                    int error = Interop.Database.AddStatusChangedCb(_contactsDbStatusChangedCallback, IntPtr.Zero);
+                    int error = Interop.Database.AddStatusChangedCb(_contactsDBStatusChangedCallback, IntPtr.Zero);
                     if ((int)ContactsError.None != error)
                     {
                         Log.Error(Globals.LogTag, "Add StatusChanged Failed with error " + error);
@@ -117,7 +120,7 @@ namespace Tizen.Pims.Contacts
             {
                 lock (thisLock)
                 {
-                    int error = Interop.Database.RemoveStatusChangedCb(_contactsDbStatusChangedCallback, IntPtr.Zero);
+                    int error = Interop.Database.RemoveStatusChangedCb(_contactsDBStatusChangedCallback, IntPtr.Zero);
                     if ((int)ContactsError.None != error)
                     {
                         Log.Error(Globals.LogTag, "Remove StatusChanged Failed with error " + error);
@@ -129,55 +132,64 @@ namespace Tizen.Pims.Contacts
 
         }
 
-
         /// <summary>
-        /// The current contacts database version.
+        /// The contacts database status.
         /// </summary>
-        public int Version
+        public DBStatus Status
         {
             get
             {
-                int version = -1;
-                int error = Interop.Database.GetVersion(out version);
+                DBStatus status;
+                int error = Interop.Database.GetStatus(out status);
                 if ((int)ContactsError.None != error)
                 {
-                    Log.Error(Globals.LogTag, "Version Failed with error " + error);
+                    Log.Error(Globals.LogTag, "GetStatus Failed with error " + error);
                 }
-                return version;
+                return status;
             }
         }
 
         /// <summary>
-        /// The last successful changed contacts database version on the current connection.
+        /// Gets current contacts database version.
         /// </summary>
-        public int LastChangeVersion
+        /// <returns>The current contacts database version</returns>
+        /// <privilege>http://tizen.org/privilege/contact.read</privilege>
+        /// <privilege>http://tizen.org/privilege/callhistory.read</privilege>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+        public int GetVersion()
         {
-            get
+            int version = -1;
+            int error = Interop.Database.GetVersion(out version);
+            if ((int)ContactsError.None != error)
             {
-                int version = -1;
-                int error = Interop.Database.GetLastChangeVersion(out version);
-                if ((int)ContactsError.None != error)
-                {
-                    Log.Error(Globals.LogTag, "LastChangeVersion Failed with error " + error);
-                }
-                return version;
+                Log.Error(Globals.LogTag, "GetVersion() Failed with error " + error);
+                throw ContactsErrorFactory.CheckAndCreateException(error);
             }
+            return version;
         }
 
         /// <summary>
-        /// The contacts database status.
+        /// Gets last successful changed contacts database version on the current connection.
         /// </summary>
-        public DbStatus Status
+        /// <returns>The last successful changed contacts database version on the current connection</returns>
+        /// <privilege>http://tizen.org/privilege/contact.read</privilege>
+        /// <privilege>http://tizen.org/privilege/callhistory.read</privilege>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
+        public int GetLastChangeVersion
         {
             get
             {
-                DbStatus status;
-                int error = Interop.Database.GetStatus(out status);
+                int version = -1;
+                int error = Interop.Database.GetLastChangeVersion(out version);
                 if ((int)ContactsError.None != error)
                 {
-                    Log.Error(Globals.LogTag, "GetStatus Failed with error " + error);
+                    Log.Error(Globals.LogTag, "GetLastChangeVersion Failed with error " + error);
                 }
-                return status;
+                return version;
             }
         }
 
@@ -186,6 +198,13 @@ namespace Tizen.Pims.Contacts
         /// </summary>
         /// <param name="record">The record to insert</param>
         /// <returns>The ID of inserted record</returns>
+        /// <privilege>http://tizen.org/privilege/contact.write</privilege>
+        /// <privilege>http://tizen.org/privilege/callhistory.write</privilege>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
         public int Insert(ContactsRecord record)
         {
             int id = -1;
@@ -203,6 +222,13 @@ namespace Tizen.Pims.Contacts
         /// </summary>
         /// <param name="list">The record list</param>
         /// <returns>The inserted record ID array</returns>
+        /// <privilege>http://tizen.org/privilege/contact.write</privilege>
+        /// <privilege>http://tizen.org/privilege/callhistory.write</privilege>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
         public int[] Insert(ContactsList list)
         {
             IntPtr ids;
@@ -226,6 +252,13 @@ namespace Tizen.Pims.Contacts
         /// <param name="viewUri">The view URI of a record</param>
         /// <param name="recordId">The record ID</param>
         /// <returns>The record associated with the record ID</returns>
+        /// <privilege>http://tizen.org/privilege/contact.read</privilege>
+        /// <privilege>http://tizen.org/privilege/callhistory.read</privilege>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
         public ContactsRecord Get(string viewUri, int recordId)
         {
             IntPtr handle;
@@ -242,6 +275,13 @@ namespace Tizen.Pims.Contacts
         /// Updates a record in the contacts database.
         /// </summary>
         /// <param name="record">The record to update</param>
+        /// <privilege>http://tizen.org/privilege/contact.write</privilege>
+        /// <privilege>http://tizen.org/privilege/callhistory.write</privilege>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
         public void Update(ContactsRecord record)
         {
             int error = Interop.Database.Update(record._recordHandle);
@@ -256,6 +296,13 @@ namespace Tizen.Pims.Contacts
         /// Updates multiple records in the contacts database as a batch operation.
         /// </summary>
         /// <param name="list">The record list</param>
+        /// <privilege>http://tizen.org/privilege/contact.write</privilege>
+        /// <privilege>http://tizen.org/privilege/callhistory.write</privilege>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
         public void Update(ContactsList list)
         {
             int error = Interop.Database.UpdateRecords(list._listHandle);
@@ -271,6 +318,13 @@ namespace Tizen.Pims.Contacts
         /// </summary>
         /// <param name="viewUri">The view URI of a record</param>
         /// <param name="recordId">The record ID to delete</param>
+        /// <privilege>http://tizen.org/privilege/contact.write</privilege>
+        /// <privilege>http://tizen.org/privilege/callhistory.write</privilege>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
         public void Delete(string viewUri, int recordId)
         {
             int error = Interop.Database.Delete(viewUri, recordId);
@@ -286,6 +340,13 @@ namespace Tizen.Pims.Contacts
         /// </summary>
         /// <param name="viewUri">The view URI of the records to delete</param>
         /// <param name="idArray">The record IDs to delete</param>
+        /// <privilege>http://tizen.org/privilege/contact.write</privilege>
+        /// <privilege>http://tizen.org/privilege/callhistory.write</privilege>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
         public void Delete(string viewUri, int[] idArray)
         {
             int error = Interop.Database.DeleteRecords(viewUri, idArray, idArray.Length);
@@ -300,7 +361,14 @@ namespace Tizen.Pims.Contacts
         /// Replaces a record in the contacts database.
         /// </summary>
         /// <param name="record">The record to replace</param>
-        /// <param name="id">the record ID</param>
+        /// <param name="id">the record ID to be replaced</param>
+        /// <privilege>http://tizen.org/privilege/contact.write</privilege>
+        /// <privilege>http://tizen.org/privilege/callhistory.write</privilege>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
         public void Replace(ContactsRecord record, int recordId)
         {
             int error = Interop.Database.Replace(record._recordHandle, recordId);
@@ -315,7 +383,14 @@ namespace Tizen.Pims.Contacts
         /// Replaces multiple records in the contacts database as a batch operation.
         /// </summary>
         /// <param name="list">The record list to replace</param>
-        /// <param name="idArray">The record IDs</param>
+        /// <param name="idArray">The record IDs to be replaced</param>
+        /// <privilege>http://tizen.org/privilege/contact.write</privilege>
+        /// <privilege>http://tizen.org/privilege/callhistory.write</privilege>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
         public void Replace(ContactsList list, int[] idArray)
         {
             int error = Interop.Database.ReplaceRecords(list._listHandle, idArray, idArray.Length);
@@ -335,6 +410,13 @@ namespace Tizen.Pims.Contacts
         /// <returns>
         /// The record list
         /// </returns>
+        /// <privilege>http://tizen.org/privilege/contact.read</privilege>
+        /// <privilege>http://tizen.org/privilege/callhistory.read</privilege>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
         public ContactsList GetAll(string viewUri, int offset, int limit)
         {
             IntPtr handle;
@@ -356,6 +438,13 @@ namespace Tizen.Pims.Contacts
         /// <returns>
         /// The record list
         /// </returns>
+        /// <privilege>http://tizen.org/privilege/contact.read</privilege>
+        /// <privilege>http://tizen.org/privilege/callhistory.read</privilege>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
         public ContactsList GetRecordsWithQuery(ContactsQuery query, int offset, int limit)
         {
             IntPtr handle;
@@ -378,6 +467,12 @@ namespace Tizen.Pims.Contacts
         /// <returns>
         /// The record list
         /// </returns>
+        /// <privilege>http://tizen.org/privilege/contact.read</privilege>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when application does not have proper privileges</exception>
         public ContactsList GetChangesByVersion(string viewUri, int addressbookId, int contactsDBVersion, out int currentDBVersion)
         {
             IntPtr recordList;
@@ -394,19 +489,19 @@ namespace Tizen.Pims.Contacts
         /// Finds records based on a given keyword.
         /// </summary>
         /// <remarks>
-        /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact,
-        /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned
-        /// and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned.
+        /// This API works only for the Views below.
+        /// Person, PersonContact, PersonGroupRelation, PersonGroupAssigned and PersonGroupNotAssigned.
         /// </remarks>
         /// <param name="viewUri">The view URI to find records</param>
-        /// <param name="keywrod">The keyword</param>
+        /// <param name="keyword">The keyword</param>
         /// <param name="offset">The index from which to get results</param>
         /// <param name="limit">The number to limit results(value 0 is used for get all records)</param>
         /// <returns></returns>
-        public ContactsList Search(string viewUri, string keywrod, int offset, int limit)
+        /// <privilege>http://tizen.org/privilege/contact.read</privilege>
+        public ContactsList Search(string viewUri, string keyword, int offset, int limit)
         {
             IntPtr recordList;
-            int error = Interop.Database.Search(viewUri, keywrod, offset, limit, out recordList);
+            int error = Interop.Database.Search(viewUri, keyword, offset, limit, out recordList);
             if ((int)ContactsError.None != error)
             {
                 Log.Error(Globals.LogTag, "Search Failed with error " + error);
@@ -419,9 +514,8 @@ namespace Tizen.Pims.Contacts
         /// Finds records based on given query and keyword.
         /// </summary>
         /// <remarks>
-        /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact,
-        /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned
-        /// and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned.
+        /// This API works only for the Views below.
+        /// Person, PersonContact, PersonGroupRelation, PersonGroupAssigned and PersonGroupNotAssigned.
         /// </remarks>
         /// <param name="query">The query to filter</param>
         /// <param name="keyword">The keyword</param>
@@ -444,11 +538,8 @@ namespace Tizen.Pims.Contacts
         /// Finds records based on a keyword and range.
         /// </summary>
         /// <remarks>
-        /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact,
-        /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned,
-        /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned. These views can search records with range @ref CONTACTS_SEARCH_RANGE_NAME, @ref CONTACTS_SEARCH_RANGE_NUMBER, @ref CONTACTS_SEARCH_RANGE_DATA.
-        /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_number can search records with @ref CONTACTS_SEARCH_RANGE_NAME and @ref CONTACTS_SEARCH_RANGE_NUMBER.
-        /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_email can search records with @ref CONTACTS_SEARCH_RANGE_NAME and @ref CONTACTS_SEARCH_RANGE_EMAIL.
+        /// This API works only for the Views below.
+        /// Person, PersonContact, PersonGroupRelation, PersonGroupAssigned, PersonGroupNotAssigned, PersonNumber and PersonEmail
         /// </remarks>
         /// <param name="viewUri">The view URI</param>
         /// <param name="keyword">The keyword</param>
@@ -472,10 +563,9 @@ namespace Tizen.Pims.Contacts
         /// Finds records based on a given keyword for snippet
         /// </summary>
         /// <remarks>
-        /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact,
-        /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned
-        /// and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned
-        /// Because start match and end match is needed to be composed with keyword, this API performance is lower than contacts_db_search_records().
+        /// This API works only for the Views below.
+        /// Person, PersonContact, PersonGroupRelation, PersonGroupAssigned and PersonGroupNotAssigned.
+        /// Because start match and end match are needed to be composed with keyword, this API performance is lower than Search(string viewUri, string keyword, int offset, int limit).
         /// </remarks>
         /// <param name="viewUri">The view URI to find records</param>
         /// <param name="keyword">The keyword</param>
@@ -501,10 +591,9 @@ namespace Tizen.Pims.Contacts
         /// Finds records based on given query and keyword for snippet.
         /// </summary>
         /// <remarks>
-        /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact,
-        /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned
-        /// and @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned
-        /// Because start match and end match is needed to be composed with keyword, this API performance is lower than contacts_db_search_records_with_query().
+        /// This API works only for the Views below.
+        /// Person, PersonContact, PersonGroupRelation, PersonGroupAssigned and PersonGroupNotAssigned.
+        /// Because start match and end match are needed to be composed with keyword, this API performance is lower than Search(ContactsQuery query, string keyword, int offset, int limit).
         /// </remarks>
         /// <param name="query">The query to filter</param>
         /// <param name="keyword">The keyword</param>
@@ -530,12 +619,9 @@ namespace Tizen.Pims.Contacts
         /// Finds records based on a keyword and range for snippet.
         /// </summary>
         /// <remarks>
-        /// This API works only for @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_contact,
-        /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_grouprel, @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_assigned,
-        /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_group_not_assigned. These views can search records with range @ref CONTACTS_SEARCH_RANGE_NAME, @ref CONTACTS_SEARCH_RANGE_NUMBER, @ref CONTACTS_SEARCH_RANGE_DATA.
-        /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_number can search records with @ref CONTACTS_SEARCH_RANGE_NAME and @ref CONTACTS_SEARCH_RANGE_NUMBER.
-        /// @ref CAPI_SOCIAL_CONTACTS_SVC_VIEW_MODULE_contacts_person_email can search records with @ref CONTACTS_SEARCH_RANGE_NAME and @ref CONTACTS_SEARCH_RANGE_EMAIL.
-        /// Because start match and end match is needed to be composed with keyword, this API performance is lower than contacts_db_search_records_with_range().
+        /// This API works only for the Views below.
+        /// Person, PersonContact, PersonGroupRelation, PersonGroupAssigned, PersonGroupNotAssigned, PersonNumber and PersonEmail
+        /// Because start match and end match are needed to be composed with keyword, this API performance is lower than Search(string viewUri, string keyword, int offset, int limit, int range).
         /// </remarks>
         /// <param name="viewUri">The view URI</param>
         /// <param name="keyword">The keyword</param>
@@ -597,7 +683,7 @@ namespace Tizen.Pims.Contacts
         /// </summary>
         /// <param name="viewUri">The view URI of records whose changes are monitored</param>
         /// <param name="callback">The callback function to register</param>
-        public void AddDBChangedDelegate(string viewUri, ContactsDbChangedDelegate callback)
+        public void AddDBChangedDelegate(string viewUri, ContactsDBChangedDelegate callback)
         {
             _dbChangedDelegate = (string uri, IntPtr userData) =>
             {
@@ -618,7 +704,7 @@ namespace Tizen.Pims.Contacts
         /// </summary>
         /// <param name="viewUri">The view URI of records whose changes are monitored</param>
         /// <param name="callback">The callback function to register</param>
-        public void RemoveDBChangedDelegate(string viewUri, ContactsDbChangedDelegate callback)
+        public void RemoveDBChangedDelegate(string viewUri, ContactsDBChangedDelegate callback)
         {
             int error = Interop.Database.RemoveChangedCb(viewUri, _delegateMap[viewUri], IntPtr.Zero);
             if ((int)ContactsError.None != error)
index 32effe5..09de129 100644 (file)
@@ -21,6 +21,7 @@ using static Interop.Contacts;
 namespace Tizen.Pims.Contacts
 {
     /// <summary>
+    /// A filter includes the conditions for the search
     /// </summary>
     public class ContactsFilter:IDisposable
     {
@@ -33,6 +34,9 @@ namespace Tizen.Pims.Contacts
         /// <param name="propertyId">The property ID to add a condition</param>
         /// <param name="matchType">The match flag</param>
         /// <param name="matchValue">The match value</param>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
         public ContactsFilter(string viewUri, uint propertyId, StringMatchType matchType, string matchValue)
         {
             int error = Interop.Filter.ContactsFilterCreate(viewUri, out _filterHandle);
@@ -57,6 +61,9 @@ namespace Tizen.Pims.Contacts
         /// <param name="propertyId">The property ID to add a condition</param>
         /// <param name="matchType">The match flag</param>
         /// <param name="matchValue">The match value</param>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
         public ContactsFilter(string viewUri, uint propertyId, IntegerMatchType matchType, int matchValue)
         {
             int error = Interop.Filter.ContactsFilterCreate(viewUri, out _filterHandle);
@@ -81,6 +88,9 @@ namespace Tizen.Pims.Contacts
         /// <param name="propertyId">The property ID to add a condition</param>
         /// <param name="matchType">The match flag</param>
         /// <param name="matchValue">The match value</param>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
         public ContactsFilter(string viewUri, uint propertyId, IntegerMatchType matchType, long matchValue)
         {
             int error = Interop.Filter.ContactsFilterCreate(viewUri, out _filterHandle);
@@ -105,6 +115,9 @@ namespace Tizen.Pims.Contacts
         /// <param name="propertyId">The property ID to add a condition</param>
         /// <param name="matchType">The match flag</param>
         /// <param name="matchValue">The match value</param>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
         public ContactsFilter(string viewUri, uint propertyId, IntegerMatchType matchType, double matchValue)
         {
             int error = Interop.Filter.ContactsFilterCreate(viewUri, out _filterHandle);
@@ -129,6 +142,9 @@ namespace Tizen.Pims.Contacts
         /// <param name="propertyId">The property ID to add a condition</param>
         /// <param name="matchType">The match flag</param>
         /// <param name="matchValue">The match value</param>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
         public ContactsFilter(string viewUri, uint propertyId, bool matchValue)
         {
             int error = Interop.Filter.ContactsFilterCreate(viewUri, out _filterHandle);
@@ -163,7 +179,7 @@ namespace Tizen.Pims.Contacts
             /// <summary>
             /// Full string, case-insensitive
             /// </summary>
-            Fullstring,
+            FullString,
             /// <summary>
             /// Sub string, case-insensitive
             /// </summary>
@@ -171,11 +187,11 @@ namespace Tizen.Pims.Contacts
             /// <summary>
             /// Start with, case-insensitive
             /// </summary>
-            Startswith,
+            StartsWith,
             /// <summary>
             /// End with, case-insensitive
             /// </summary>
-            Endswith,
+            EndsWith,
             /// <summary>
             /// IS NOT NUL
             /// </summary>
@@ -237,13 +253,16 @@ namespace Tizen.Pims.Contacts
                 if ((int)ContactsError.None != error)
                 {
                     Log.Error(Globals.LogTag, "ContactsFilterDestroy Failed with error " + error);
-                    throw ContactsErrorFactory.CheckAndCreateException(error);
                 }
 
                 disposedValue = true;
             }
         }
 
+        /// <summary>
+        /// Releases all resources used by the ContactsFilter.
+        /// It should be called after finished using of the object.
+        /// </summary>
         public void Dispose()
         {
             Dispose(true);
@@ -257,6 +276,8 @@ namespace Tizen.Pims.Contacts
         /// <param name="propertyId">The property ID to add a condition</param>
         /// <param name="matchType">The match flag</param>
         /// <param name="matchValue">The match value</param>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public void AddCondition(LogicalOperator logicalOperator, uint propertyId, StringMatchType matchType, string matchValue)
         {
             int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator);
@@ -281,6 +302,8 @@ namespace Tizen.Pims.Contacts
         /// <param name="propertyId">The property ID to add a condition</param>
         /// <param name="matchType">The match flag</param>
         /// <param name="matchValue">The match value</param>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public void AddCondition(LogicalOperator logicalOperator, uint propertyId, IntegerMatchType matchType, int matchValue)
         {
             int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator);
@@ -305,6 +328,8 @@ namespace Tizen.Pims.Contacts
         /// <param name="propertyId">The property ID to add a condition</param>
         /// <param name="matchType">The match flag</param>
         /// <param name="matchValue">The match value</param>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public void AddCondition(LogicalOperator logicalOperator, uint propertyId, IntegerMatchType matchType, long matchValue)
         {
             int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator);
@@ -329,6 +354,8 @@ namespace Tizen.Pims.Contacts
         /// <param name="propertyId">The property ID to add a condition</param>
         /// <param name="matchType">The match flag</param>
         /// <param name="matchValue">The match value</param>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public void AddCondition(LogicalOperator logicalOperator, uint propertyId, IntegerMatchType matchType, double matchValue)
         {
             int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator);
@@ -353,6 +380,8 @@ namespace Tizen.Pims.Contacts
         /// <param name="propertyId">The property ID to add a condition</param>
         /// <param name="matchType">The match flag</param>
         /// <param name="matchValue">The match value</param>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public void AddCondition(LogicalOperator logicalOperator, uint propertyId, bool matchValue)
         {
             int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator);
@@ -375,6 +404,8 @@ namespace Tizen.Pims.Contacts
         /// </summary>
         /// <param name="logicalOperator">The operator type</param>
         /// <param name="filter">The child filter</param>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public void AddFilter(LogicalOperator logicalOperator, ContactsFilter filter)
         {
             int error = Interop.Filter.ContactsFilterAddOperator(_filterHandle, logicalOperator);
index a479168..d0965eb 100644 (file)
@@ -19,6 +19,7 @@ using System;
 namespace Tizen.Pims.Contacts
 {
     /// <summary>
+    /// A list of records with the same type
     /// </summary>
     public class ContactsList:IDisposable
     {
@@ -42,6 +43,8 @@ namespace Tizen.Pims.Contacts
         /// <summary>
         /// Creates a contacts record list.
         /// </summary>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
         public ContactsList()
         {
             int error = Interop.List.ContactsListCreate(out _listHandle);
@@ -70,7 +73,6 @@ namespace Tizen.Pims.Contacts
                 if ((int)ContactsError.None != error)
                 {
                     Log.Error(Globals.LogTag, "ContactsList Count Failed with error " + error);
-                    throw ContactsErrorFactory.CheckAndCreateException(error);
                 }
                 return count;
             }
@@ -87,7 +89,6 @@ namespace Tizen.Pims.Contacts
                 if ((int)ContactsError.None != error)
                 {
                     Log.Error(Globals.LogTag, "ContactsListDestroy Failed with error " + error);
-                    throw ContactsErrorFactory.CheckAndCreateException(error);
                 }
 
                 disposedValue = true;
@@ -95,6 +96,10 @@ namespace Tizen.Pims.Contacts
             }
         }
 
+        /// <summary>
+        /// Releases all resources used by the ContactsList.
+        /// It should be called after finished using of the object.
+        /// </summary>
         public void Dispose()
         {
             Dispose(true);
@@ -105,6 +110,8 @@ namespace Tizen.Pims.Contacts
         /// Adds a record to the contacts list.
         /// </summary>
         /// <param name="record">The record to add</param>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public void AddRecord(ContactsRecord record)
         {
             int error = Interop.List.ContactsListAdd(_listHandle, record._recordHandle);
@@ -120,7 +127,9 @@ namespace Tizen.Pims.Contacts
         /// <summary>
         /// Removes a record from the contacts list.
         /// </summary>
-        /// <param name="record">The record to remov</param>
+        /// <param name="record">The record to remove</param>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public void RemoveRecord(ContactsRecord record)
         {
             int error = Interop.List.ContactsListRemove(_listHandle, record._recordHandle);
@@ -155,7 +164,7 @@ namespace Tizen.Pims.Contacts
         /// Moves a contacts list to the previous position.
         /// </summary>
         /// <returns>
-        /// if cursor is moved to the first, it returns false.
+        /// When the cursor is already at the first position, it returns false.
         /// </returns>
         public bool MovePrevious()
         {
@@ -181,7 +190,7 @@ namespace Tizen.Pims.Contacts
         /// Moves a contacts list to the next position.
         /// </summary>
         /// <returns>
-        /// if cursor is moved to the end, it returns false.
+        /// When the cursor is already at the last position, it returns false.
         /// </returns>
         public bool MoveNext()
         {
index 248a76d..f4be713 100644 (file)
@@ -63,6 +63,7 @@ namespace Tizen.Pims.Contacts
         /// <summary>
         /// Creates a ContactsManager.
         /// </summary>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
         public ContactsManager()
         {
             int error = Interop.Contacts.Connect();
@@ -90,7 +91,6 @@ namespace Tizen.Pims.Contacts
                 if ((int)ContactsError.None != error)
                 {
                     Log.Error(Globals.LogTag, "Disconnect Failed with error " + error);
-                    throw ContactsErrorFactory.CheckAndCreateException(error);
                 }
 
                 disposedValue = true;
@@ -113,6 +113,7 @@ namespace Tizen.Pims.Contacts
         /// <summary>
         /// (event) NameDisplayOrderChanged is raised when changing setting value of contacts name display order
         /// </summary>
+        /// <privilege>http://tizen.org/privilege/contact.read</privilege>
         public event EventHandler<NameDisplayOrderChangedEventArgs> NameDisplayOrderChanged
         {
             add
@@ -162,6 +163,7 @@ namespace Tizen.Pims.Contacts
         /// <summary>
         /// (event) NameSortingOrderChanged is raised when changing setting value of contacts name sorting order
         /// </summary>
+        /// <privilege>http://tizen.org/privilege/contact.read</privilege>
         public event EventHandler<NameSortingOrderChangedEventArgs> NameSortingOrderChanged
         {
             add
@@ -222,6 +224,8 @@ namespace Tizen.Pims.Contacts
         /// <summary>
         /// A setting value of contacts name display order
         /// </summary>
+        /// <privilege>http://tizen.org/privilege/contact.read</privilege>
+        /// <privilege>http://tizen.org/privilege/contact.write</privilege>
         public ContactDisplayOrder NameDisplayOrder
         {
             get
@@ -247,6 +251,8 @@ namespace Tizen.Pims.Contacts
         /// <summary>
         /// A setting value of contacts name sorting order
         /// </summary>
+        /// <privilege>http://tizen.org/privilege/contact.read</privilege>
+        /// <privilege>http://tizen.org/privilege/contact.write</privilege>
         public ContactSortingOrder NameSortingOrder
         {
             get
index 99b544c..6754700 100644 (file)
@@ -20,7 +20,12 @@ using static Interop.Contacts;
 namespace Tizen.Pims.Contacts
 {
     /// <summary>
+    /// A query is used to retrieve data which satisfies given criteria
     /// </summary>
+    /// <remarks>
+    /// A query is used to retrieve person, group, speed dial, and log data which satisfies a given criteria, such as an integer property being greater than a given value, or a string property containing a given substring. 
+    /// A query needs a filter which can set the conditions for the search.
+    /// </remarks>
     public class ContactsQuery : IDisposable
     {
         internal IntPtr _queryHandle;
@@ -29,6 +34,9 @@ namespace Tizen.Pims.Contacts
         /// Creates a query.
         /// </summary>
         /// <param name="viewUri">The view URI of a query</param>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
         public ContactsQuery(string viewUri)
         {
             int error = Interop.Query.ContactsQueryCreate(viewUri, out _queryHandle);
@@ -59,13 +67,16 @@ namespace Tizen.Pims.Contacts
                 if ((int)ContactsError.None != error)
                 {
                     Log.Error(Globals.LogTag, "ContactsQueryDestroy Failed with error " + error);
-                    throw ContactsErrorFactory.CheckAndCreateException(error);
                 }
 
                 disposedValue = true;
             }
         }
 
+        /// <summary>
+        /// Releases all resources used by the ContactsQuery.
+        /// It should be called after finished using of the object.
+        /// </summary>
         public void Dispose()
         {
             Dispose(true);
@@ -76,6 +87,7 @@ namespace Tizen.Pims.Contacts
         /// Adds property IDs for projection.
         /// </summary>
         /// <param name="propertyIdArray">The property ID array </param>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public void SetProjection(uint[] propertyIdArray)
         {
             int error = Interop.Query.ContactsQuerySetProjection(_queryHandle, propertyIdArray, propertyIdArray.Length);
@@ -90,6 +102,7 @@ namespace Tizen.Pims.Contacts
         /// Sets the "distinct" option for projection.
         /// </summary>
         /// <param name="set">If true it is set, otherwise if false it is unset</param>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public void SetDistinct(bool set)
         {
             int error = Interop.Query.ContactsQuerySetDistinct(_queryHandle, set);
@@ -104,6 +117,7 @@ namespace Tizen.Pims.Contacts
         /// Sets the filter for a query.
         /// </summary>
         /// <param name="filter">The filter</param>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public void SetFilter(ContactsFilter filter)
         {
             int error = Interop.Query.ContactsQuerySetFilter(_queryHandle, filter._filterHandle);
@@ -119,6 +133,7 @@ namespace Tizen.Pims.Contacts
         /// </summary>
         /// <param name="propertyId">The property ID to sort</param>
         /// <param name="isAscending">If true it sorts in the ascending order, otherwise if false it sorts in the descending order</param>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public void SetSort(uint propertyId, bool isAscending)
         {
             int error = Interop.Query.ContactsQuerySetSort(_queryHandle, propertyId, isAscending);
index 038c8bd..dd8c592 100644 (file)
@@ -21,7 +21,13 @@ using System.Runtime.InteropServices;
 namespace Tizen.Pims.Contacts
 {
     /// <summary>
+    /// A record represents an actual record in the database
     /// </summary>
+    /// <remarks>
+    /// A record represents an actual record in the database, but you can also consider it a piece of information, such as an address, a phone number, or a group of contacts. 
+    /// A record can be a complex set of data, containing other data. For example, a contact record contains the address property, which is a reference to an address record. 
+    /// An address record belongs to a contact record, and its ContactId property is set to the identifier of the corresponding contact. In this case, the address is the child record of the contact and the contact is the parent record.
+    /// </remarks>
     public class ContactsRecord : IDisposable
     {
         private string _uri = null;
@@ -79,6 +85,9 @@ namespace Tizen.Pims.Contacts
         /// Creates a record.
         /// </summary>
         /// <param name="viewUri">The view URI</param>
+        /// <exception cref="NotSupportedException">Thrown when an invoked method is not supported</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
         public ContactsRecord(string viewUri)
         {
             int error = Interop.Record.Create(viewUri, out _recordHandle);
@@ -118,13 +127,16 @@ namespace Tizen.Pims.Contacts
                 if ((int)ContactsError.None != error)
                 {
                     Log.Error(Globals.LogTag, "Dispose Failed with error " + error);
-                    throw ContactsErrorFactory.CheckAndCreateException(error);
                 }
                 _disposedValue = true;
                 GC.RemoveMemoryPressure(_memoryPressure);
             }
         }
 
+        /// <summary>
+        /// Releases all resources used by the ContactsRecord.
+        /// It should be called after finished using of the object.
+        /// </summary>
         public void Dispose()
         {
             Dispose(true);
@@ -135,6 +147,7 @@ namespace Tizen.Pims.Contacts
         /// Makes a clone of a record.
         /// </summary>
         /// <returns>A cloned record</returns>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
         public ContactsRecord Clone()
         {
             IntPtr _clonedRecordHandle;
@@ -154,6 +167,7 @@ namespace Tizen.Pims.Contacts
         /// <returns>
         /// The value of the property corresponding to property id.
         /// </returns>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public T Get<T>(uint propertyId)
         {
             object parsedValue = null;
@@ -225,6 +239,7 @@ namespace Tizen.Pims.Contacts
         /// </summary>
         /// <param name="propertyId">The property ID</param>
         /// <param name="value">The value to set</param>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public void Set<T>(uint propertyId, T value)
         {
             if (typeof(T) == typeof(string))
@@ -289,6 +304,7 @@ namespace Tizen.Pims.Contacts
         /// </summary>
         /// <param name="propertyId">The property ID</param>
         /// <param name="childRecord">The child record to add to parent record</param>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public void AddChildRecord(uint propertyId, ContactsRecord childRecord)
         {
             int error = Interop.Record.AddChildRecord(_recordHandle, propertyId, childRecord._recordHandle);
@@ -305,6 +321,7 @@ namespace Tizen.Pims.Contacts
         /// </summary>
         /// <param name="propertyId">The property ID</param>
         /// <param name="childRecord">The child record to remove from parent record</param>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public void RemoveChildRecord(uint propertyId, ContactsRecord childRecord)
         {
             int error = Interop.Record.RemoveChildRecord(_recordHandle, propertyId, childRecord._recordHandle);
@@ -321,6 +338,7 @@ namespace Tizen.Pims.Contacts
         /// </summary>
         /// <param name="propertyId">The property ID</param>
         /// <returns>The number of child records corresponding to property ID</returns>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public int GetChildRecordCount(uint propertyId)
         {
             int count = 0;
@@ -339,6 +357,7 @@ namespace Tizen.Pims.Contacts
         /// <param name="propertyId">The property ID</param>
         /// <param name="index">The index of child record</param>
         /// <returns>The record </returns>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public ContactsRecord GetChildRecord(uint propertyId, int index)
         {
             IntPtr handle;
@@ -359,6 +378,7 @@ namespace Tizen.Pims.Contacts
         /// <returns>
         /// The record list
         /// </returns>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public ContactsList CloneChildRecordList(uint propertyId)
         {
             IntPtr listHandle;
index 8b610cb..c02cc4f 100644 (file)
@@ -22,7 +22,11 @@ namespace Tizen.Pims.Contacts
 {
     using static ContactsViews;
     /// <summary>
+    /// A class for parsing and making vCards.
     /// </summary>
+    /// <remarks>
+    /// It's based on the vCard v3.0 specification
+    /// </remarks>
     public static class ContactsVcard
     {
         public delegate bool ParseDelegate(ContactsRecord record);
@@ -34,6 +38,9 @@ namespace Tizen.Pims.Contacts
         /// <returns>
         /// The vCard stream.
         /// </returns>
+        /// <privilege>http://tizen.org/privilege/contact.read</privilege>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
         public static string Compose(ContactsRecord record)
         {
             int error = 0;
@@ -72,6 +79,8 @@ namespace Tizen.Pims.Contacts
         /// <returns>
         /// The contacts list
         /// </returns>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
         public static ContactsList Parse(string stream)
         {
             IntPtr listHandle;
@@ -91,6 +100,9 @@ namespace Tizen.Pims.Contacts
         /// </summary>
         /// <param name="path">The file path of vCard stream file</param>
         /// <param name="callback">The callback function to invoke</param>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when failed due to out of memory</exception>
         public static void ParseForEach(string path, ParseDelegate callback)
         {
             Interop.Vcard.ContactsVcardParseCallback cb = (IntPtr handle, IntPtr data) =>
index c9cbeb3..ea30499 100644 (file)
@@ -20,7 +20,7 @@ using System.Collections.Generic;
 namespace Tizen.Pims.Contacts
 {
     /// <summary>
-    /// This class provides information about views with properties. 
+    /// This class provides information about views with properties.
     /// </summary>
     /// <remarks>
     ///  A view is a class which describes properties of a record. A record can have basic properties of five types: integer, string, boolean, long, double.
@@ -390,7 +390,7 @@ namespace Tizen.Pims.Contacts
             Deleted,
         }
 
-        internal const uint AverageSizeOfRecord = 120; ///average size of person record
+        internal const uint AverageSizeOfRecord = 120;  /* average size of person record */
 
         public static class Addressbook
         {
index d05258e..4029e35 100644 (file)
@@ -18,14 +18,17 @@ using static Tizen.Pims.Contacts.ContactsDatabase;
 
 namespace Tizen.Pims.Contacts
 {
+    /// <summary>
+    /// Event arguments passed when contacts database status is changed
+    /// </summary>
     public class DBStatusChangedEventArgs
     {
-        internal DBStatusChangedEventArgs(DbStatus status)
+        internal DBStatusChangedEventArgs(DBStatus status)
         {
             this.Status = status;
         }
 
-        public DbStatus Status
+        public DBStatus Status
         {
             get;
             internal set;
old mode 100755 (executable)
new mode 100644 (file)
index 2612f75..71ce4d3
@@ -1,4 +1,4 @@
-/*
+/*
 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
 *
 * Licensed under the Apache License, Version 2.0 (the License);
@@ -16,6 +16,9 @@
 
 namespace Tizen.Pims.Contacts
 {
+    /// <summary>
+    /// Event arguments passed when setting value of contacts name display order is changed
+    /// </summary>
     public class NameDisplayOrderChangedEventArgs
     {
         internal NameDisplayOrderChangedEventArgs(ContactDisplayOrder displayOrder)
@@ -29,4 +32,4 @@ namespace Tizen.Pims.Contacts
             internal set;
         }
     }
-}
\ No newline at end of file
+}
old mode 100755 (executable)
new mode 100644 (file)
index cd60e90..1f9b663
@@ -1,4 +1,4 @@
-/*
+/*
 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
 *
 * Licensed under the Apache License, Version 2.0 (the License);
@@ -16,6 +16,9 @@
 
 namespace Tizen.Pims.Contacts
 {
+    /// <summary>
+    /// Event arguments passed when setting value of contacts name sorting order is changed
+    /// </summary>
     public class NameSortingOrderChangedEventArgs
     {
         internal NameSortingOrderChangedEventArgs(ContactSortingOrder SortingOrder)
@@ -29,4 +32,4 @@ namespace Tizen.Pims.Contacts
             internal set;
         }
     }
-}
\ No newline at end of file
+}