Modify API Reference
authorJeesun Kim <iamjs.kim@samsung.com>
Wed, 17 May 2017 05:33:33 +0000 (14:33 +0900)
committerJeesun Kim <iamjs.kim@samsung.com>
Tue, 27 Jun 2017 07:52:48 +0000 (16:52 +0900)
Change-Id: If1971439dc2cf742809cf2dfbe28a6b0df636e68

12 files changed:
src/Tizen.Pims.Calendar/Tizen.Pims.Calendar/CalendarDatabase.cs
src/Tizen.Pims.Calendar/Tizen.Pims.Calendar/CalendarErrorFactory.cs
src/Tizen.Pims.Calendar/Tizen.Pims.Calendar/CalendarFilter.cs
src/Tizen.Pims.Calendar/Tizen.Pims.Calendar/CalendarList.cs
src/Tizen.Pims.Calendar/Tizen.Pims.Calendar/CalendarManager.cs
src/Tizen.Pims.Calendar/Tizen.Pims.Calendar/CalendarQuery.cs
src/Tizen.Pims.Calendar/Tizen.Pims.Calendar/CalendarRecord.cs
src/Tizen.Pims.Calendar/Tizen.Pims.Calendar/CalendarReminder.cs
src/Tizen.Pims.Calendar/Tizen.Pims.Calendar/CalendarStructs.cs
src/Tizen.Pims.Calendar/Tizen.Pims.Calendar/CalendarVcalendar.cs
src/Tizen.Pims.Calendar/Tizen.Pims.Calendar/CalendarViews.cs
src/Tizen.Pims.Calendar/Tizen.Pims.Calendar/ReminderEventArgs.cs

index 3f1f6d5..2cbb6bf 100644 (file)
@@ -24,20 +24,28 @@ using System.Runtime.InteropServices;
 /// <remarks>
 /// The Calendar Service API provides functions and ienumerations used in the entire Content Service.
 /// The Information about calendar items i.e. book, event, todo, alarm, attendee and extended are managed in the database
-/// and operations that involve database requires an active connection with the calendar contact service.
+/// and operations that involve database requires an active connection with the calendar service.
 /// </remarks>
 
 namespace Tizen.Pims.Calendar
 {
     /// <summary>
-    /// CalendarDatabase class is the interface class for managing the record from/to the database.
-    /// This class allows usre to access/create/update db operations for media content.
+    /// CalendarDatabase provides methods to manage calendar information from/to the database.
     /// </summary>
+    /// <remarks>
+    /// This class allows usre to access/create/update db operations for calendar information.
+    /// </remarks>
     public class CalendarDatabase
     {
         /// <summary>
+        /// Delegete for detecting the calendar database changes.
         /// </summary>
         /// <param name="uri">The record 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 CalendarDBChangedDelegate(string uri);
 
         private Object thisLock = new Object();
@@ -47,7 +55,7 @@ namespace Tizen.Pims.Calendar
 
         internal CalendarDatabase()
         {
-
+            ///To be created in CalendarManager only
         }
 
         /// <summary>
@@ -68,8 +76,13 @@ namespace Tizen.Pims.Calendar
         }
 
         /// <summary>
-        /// The calendar database version on the current connection.
+        /// Gets last successful changed calendar database version on the current connection.
         /// </summary>
+        /// <returns>The last successful changed calendar database version on the current connection</returns>
+        /// <privilege>http://tizen.org/privilege/calendar.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 LastChangeVersion
         {
             get
@@ -88,9 +101,13 @@ namespace Tizen.Pims.Calendar
         /// Inserts a record into the calendar database.
         /// </summary>
         /// <param name="record">The record to be inserted</param>
-        /// <returns>
-        /// The record id
-        /// </returns>
+        /// <returns>The ID of inserted record</returns>
+        /// <privilege>http://tizen.org/privilege/calendar.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(CalendarRecord record)
         {
             int id = -1;
@@ -109,16 +126,27 @@ namespace Tizen.Pims.Calendar
         /// <param name="viewUri">The view URI of a record</param>
         /// <param name="recordId">The record ID</param>
         /// <returns>
-        /// CalendarRecord instance.
+        /// The record associated with the record ID
         /// </returns>
+        /// <privilege>http://tizen.org/privilege/calendar.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 CalendarRecord Get(string viewUri, int recordId)
         {
             IntPtr handle;
             int error = Interop.Calendar.Database.Get(viewUri, recordId, out handle);
             if (CalendarError.None != (CalendarError)error)
             {
-                Log.Error(Globals.LogTag, "Get Failed with error " + error);
-                throw CalendarErrorFactory.GetException(error);
+                               if (CalendarError.DBNotFound == (CalendarError)error)
+                               {
+                                       Log.Error(Globals.LogTag, "No data" + error);
+                                       return null;
+                               }
+                               Log.Error(Globals.LogTag, "Get Failed with error " + error);
+                               throw CalendarErrorFactory.GetException(error);
             }
             return new CalendarRecord(handle);
         }
@@ -127,6 +155,12 @@ namespace Tizen.Pims.Calendar
         /// Updates a record in the calendar database.
         /// </summary>
         /// <param name="record">The record to be updated</param>
+        /// <privilege>http://tizen.org/privilege/calendar.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(CalendarRecord record)
         {
             int error = Interop.Calendar.Database.Update(record._recordHandle);
@@ -142,6 +176,12 @@ namespace Tizen.Pims.Calendar
         /// </summary>
         /// <param name="viewUri">The view URI of a record</param>
         /// <param name="recordId">The record ID to be deleted</param>
+        /// <privilege>http://tizen.org/privilege/calendar.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.Calendar.Database.Delete(viewUri, recordId);
@@ -157,6 +197,12 @@ namespace Tizen.Pims.Calendar
         /// </summary>
         /// <param name="record">The record to be replaced</param>
         /// <param name="id">the record id</param>
+        /// <privilege>http://tizen.org/privilege/calendar.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(CalendarRecord record, int id)
         {
             int error = Interop.Calendar.Database.Replace(record._recordHandle, id);
@@ -174,8 +220,14 @@ namespace Tizen.Pims.Calendar
         /// <param name="offset">The index from which results are received</param>
         /// <param name="limit">The maximum number of results(value 0 is used for all records)</param>
         /// <returns>
-        /// CalendarList
+        /// The record list
         /// </returns>
+        /// <privilege>http://tizen.org/privilege/calendar.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 CalendarList GetAll(string viewUri, int offset, int limit)
         {
             IntPtr handle;
@@ -197,6 +249,12 @@ namespace Tizen.Pims.Calendar
         /// <returns>
         /// CalendarList
         /// </returns>
+        /// <privilege>http://tizen.org/privilege/calendar.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 CalendarList GetRecordsWithQuery(CalendarQuery query, int offset, int limit)
         {
             IntPtr handle;
@@ -216,6 +274,12 @@ namespace Tizen.Pims.Calendar
         /// <returns>
         /// The inserted record id array
         /// </returns>
+        /// <privilege>http://tizen.org/privilege/calendar.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(CalendarList list)
         {
             IntPtr ids;
@@ -236,6 +300,12 @@ namespace Tizen.Pims.Calendar
         /// Updates multiple records into the calendar database as a batch operation.
         /// </summary>
         /// <param name="list">The record list</param>
+        /// <privilege>http://tizen.org/privilege/calendar.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(CalendarList list)
         {
             int error = Interop.Calendar.Database.UpdateRecords(list._listHandle);
@@ -251,6 +321,12 @@ namespace Tizen.Pims.Calendar
         /// </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/calendar.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.Calendar.Database.DeleteRecords(viewUri, idArray, idArray.Length);
@@ -265,6 +341,12 @@ namespace Tizen.Pims.Calendar
         /// Deletes multiple records with related child records from the calendar database as a batch operation.
         /// </summary>
         /// <param name="list">The record list</param>
+        /// <privilege>http://tizen.org/privilege/calendar.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(CalendarList list)
         {
             CalendarRecord record = null;
@@ -307,6 +389,12 @@ namespace Tizen.Pims.Calendar
         /// </summary>
         /// <param name="list">The record list</param>
         /// <param name="idArray">The record IDs</param>
+        /// <privilege>http://tizen.org/privilege/calendar.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(CalendarList list, int[] idArray)
         {
             int error = Interop.Calendar.Database.ReplaceRecords(list._listHandle, idArray, idArray.Length);
@@ -325,8 +413,14 @@ namespace Tizen.Pims.Calendar
         /// <param name="calendarDBVersion">The calendar database version</param>
         /// <param name="currentDBVersion"The current calendar database versio></param>
         /// <returns>
-        /// CalendarList
+        /// The record list
         /// </returns>
+        /// <privilege>http://tizen.org/privilege/calendar.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 CalendarList GetChangesByVersion(string viewUri, int BookId, int calendarDBVersion, out int currentDBVersion)
         {
             IntPtr recordList;
@@ -344,8 +438,9 @@ namespace Tizen.Pims.Calendar
         /// </summary>
         /// <param name="viewUri">The view URI to get records from</param>
         /// <returns>
-        /// The count
+        /// The count of records
         /// </returns>
+        /// <privilege>http://tizen.org/privilege/calendar.read</privilege>
         public int GetCount(string viewUri)
         {
             int count = -1;
@@ -363,8 +458,9 @@ namespace Tizen.Pims.Calendar
         /// </summary>
         /// <param name="query">The query used for filtering the results</param>
         /// <returns>
-        /// The count
+        /// The count of records
         /// </returns>
+        /// <privilege>http://tizen.org/privilege/calendar.read</privilege>
         public int GetCount(CalendarQuery query)
         {
             int count = -1;
@@ -382,6 +478,7 @@ namespace Tizen.Pims.Calendar
         /// </summary>
         /// <param name="viewUri">The view URI of the record to subscribe for change notifications</param>
         /// <param name="callback">The callback function to register</param>
+        /// <privilege>http://tizen.org/privilege/calendar.read</privilege>
         public void AddDBChangedDelegate(string viewUri, CalendarDBChangedDelegate callback)
         {
             Log.Debug(Globals.LogTag, "AddDBChangedDelegate");
@@ -405,6 +502,7 @@ namespace Tizen.Pims.Calendar
         /// </summary>
         /// <param name="viewUri">The view URI of the record to subscribe for change notifications</param>
         /// <param name="callback">The callback function to register</param>
+        /// <privilege>http://tizen.org/privilege/calendar.read</privilege>
         public void RemoveDBChangedDelegate(string viewUri, CalendarDBChangedDelegate callback)
         {
             Log.Debug(Globals.LogTag, "RemoveDBChangedDelegate");
@@ -424,6 +522,12 @@ namespace Tizen.Pims.Calendar
         /// </summary>
         /// <param name="baseId">The base record ID</param>
         /// <param name="recordId">The record ID to link to</param>
+        /// <privilege>http://tizen.org/privilege/calendar.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 LinkRecord(int baseId, int recordId)
         {
             Log.Debug(Globals.LogTag, "LinkRecord");
@@ -439,6 +543,12 @@ namespace Tizen.Pims.Calendar
         /// Unlink a record from base record.
         /// </summary>
         /// <param name="recordId">The record ID to unlink</param>
+        /// <privilege>http://tizen.org/privilege/calendar.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 UnlinkRecord(int recordId)
         {
             Log.Debug(Globals.LogTag, "UnlinkRecord");
index b2e4703..6918f88 100644 (file)
@@ -22,24 +22,25 @@ namespace Tizen.Pims.Calendar
     internal enum CalendarError
     {
         None = Tizen.Internals.Errors.ErrorCode.None,                           /**< Successful */
-        OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory,             /**< Out of Memory */
-        InvalidParameter = Tizen.Internals.Errors.ErrorCode.InvalidParameter,   /**< Invalid parameter */
-        FileNoSpace = Tizen.Internals.Errors.ErrorCode.FileNoSpaceOnDevice,     /** <FS Full*/
-        PermissionDenied = Tizen.Internals.Errors.ErrorCode.PermissionDenied,   /**< Permission denied */
-        NotSupported = Tizen.Internals.Errors.ErrorCode.NotSupported,           /**< Not supported */
-        NoData = Tizen.Internals.Errors.ErrorCode.NoData,                       /**< Requested data does not exist */
-        DBLocked = Globals.ErrorCalendar | 0x81,                                        /**< Database table locked or file locked */
-        ErrorDB = Globals.ErrorCalendar | 0x9F,                                         /**< Unknown DB error */
-        IPCNotAvailable = Globals.ErrorCalendar | 0xB1,                                 /**< IPC server is not available */
-        ErrorIPC = Globals.ErrorCalendar | 0xBF,                                        /**< Unknown IPC error */
-        ErrorSystem = Globals.ErrorCalendar | 0xEF,                                     /**< Internal system module error */
-        ErrorInternal = Globals.ErrorCalendar | 0xFF,                                   /**< Implementation Error Temporary Use */
+        OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory,             /**< Out of Memory (-12) */
+        InvalidParameter = Tizen.Internals.Errors.ErrorCode.InvalidParameter,   /**< Invalid parameter (-22) */
+        FileNoSpace = Tizen.Internals.Errors.ErrorCode.FileNoSpaceOnDevice,     /** <FS Full (-28) */
+        PermissionDenied = Tizen.Internals.Errors.ErrorCode.PermissionDenied,   /**< Permission denied (-13) */
+        NotSupported = Tizen.Internals.Errors.ErrorCode.NotSupported,           /**< Not supported (-1073741822) */
+        NoData = Tizen.Internals.Errors.ErrorCode.NoData,                       /**< Requested data does not exist (-61) */
+        DBLocked = Globals.ErrorCalendar | 0x81,                                /**< Database table locked or file locked (-33619839) */
+        ErrorDB = Globals.ErrorCalendar | 0x9F,                                 /**< Unknown DB error (-33619809) */
+        IPCNotAvailable = Globals.ErrorCalendar | 0xB1,                         /**< IPC server is not available (-33619791) */
+        ErrorIPC = Globals.ErrorCalendar | 0xBF,                                /**< Unknown IPC error (-33619777) */
+        ErrorSystem = Globals.ErrorCalendar | 0xEF,                             /**< Internal system module error (-33619729) */
+        ErrorInternal = Globals.ErrorCalendar | 0x04,                           /**< Implementation Error Temporary Use (-33619713) */
+        DBNotFound = Globals.ErrorCalendar | 0x05,                              /**< No data in DB (-33554427) */
     };
 
     internal static class Globals
     {
         internal const string LogTag = "Tizen.Pims.Calendar";
-        internal const int ErrorCalendar = -0x02010000;
+        internal const int ErrorCalendar = -0x02000000;
     }
 
     internal static class CalendarErrorFactory
index 516d366..b267f14 100644 (file)
 using System;
 using System.Collections.Generic;
 
-/// <summary>
-/// </summary>
-/// <remarks>
-/// </remarks>
 namespace Tizen.Pims.Calendar
 {
     /// <summary>
+    /// A filter includes the conditions for the search.
     /// </summary>
     public class CalendarFilter:IDisposable
     {
         internal IntPtr _filterHandle;
 
         /// <summary>
-        /// Creates a filter with string type.
+        /// Creates a filter with a condition for a string type.
         /// </summary>
         /// <param name="viewUri">The view URI of a filter</param>
         /// <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 CalendarFilter(string viewUri, uint propertyId, StringMatchType matchType, string matchValue)
         {
             int error = 0;
@@ -55,12 +55,15 @@ namespace Tizen.Pims.Calendar
         }
 
         /// <summary>
-        /// Creates a filter with integer type.
+        /// Creates a filter with a condition for an integer type.
         /// </summary>
         /// <param name="viewUri">The view URI of a filter</param>
         /// <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 CalendarFilter(string viewUri, uint propertyId, IntegerMatchType matchType, int matchValue)
         {
             int error = 0;
@@ -80,12 +83,15 @@ namespace Tizen.Pims.Calendar
         }
 
         /// <summary>
-        /// Creates a filter with long type.
+        /// Creates a filter with a condition for long type.
         /// </summary>
         /// <param name="viewUri">The view URI of a filter</param>
         /// <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 CalendarFilter(string viewUri, uint propertyId, IntegerMatchType matchType, long matchValue)
         {
             int error = 0;
@@ -105,12 +111,15 @@ namespace Tizen.Pims.Calendar
         }
 
         /// <summary>
-        /// Creates a filter with double type.
+        /// Creates a filter with a condition for double type.
         /// </summary>
         /// <param name="viewUri">The view URI of a filter</param>
         /// <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 CalendarFilter(string viewUri, uint propertyId, IntegerMatchType matchType, double matchValue)
         {
             int error = 0;
@@ -130,12 +139,15 @@ namespace Tizen.Pims.Calendar
         }
 
         /// <summary>
-        /// Creates a filter with CalendarTime type.
+        /// Creates a filter with a condition for CalendarTime type.
         /// </summary>
         /// <param name="viewUri">The view URI of a filter</param>
         /// <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 CalendarFilter(string viewUri, uint propertyId, IntegerMatchType matchType, CalendarTime matchValue)
         {
             int error = 0;
@@ -263,6 +275,10 @@ namespace Tizen.Pims.Calendar
             }
         }
 
+        /// <summary>
+        /// Releases all resources used by the CalendarFilter.
+        /// It should be called after finished using of the object.
+        /// </summary>
         public void Dispose()
         {
             Dispose(true);
@@ -270,12 +286,14 @@ namespace Tizen.Pims.Calendar
 #endregion
 
         /// <summary>
-        /// Adds a condition for the string type property.
+        /// Adds a condition for the string type.
         /// </summary>
         /// <param name="logicalOperator">The operator type</param>
         /// <param name="propertyId">The property ID to add a condition</param>
         /// <param name="matchType">The match flag</param>
         /// <param name="matchValue">The match valu</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.Calendar.Filter.AddOperator(_filterHandle, logicalOperator);
@@ -294,12 +312,14 @@ namespace Tizen.Pims.Calendar
         }
 
         /// <summary>
-        /// Adds a condition for the integer type property.
+        /// Adds a condition for the integer type.
         /// </summary>
         /// <param name="logicalOperator">The operator type</param>
         /// <param name="propertyId">The property ID to add a condition</param>
         /// <param name="matchType">The match flag</param>
         /// <param name="matchValue">The match valu</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.Calendar.Filter.AddOperator(_filterHandle, logicalOperator);
@@ -318,12 +338,14 @@ namespace Tizen.Pims.Calendar
         }
 
         /// <summary>
-        /// Adds a condition for the long type property.
+        /// Adds a condition for the long type.
         /// </summary>
         /// <param name="logicalOperator">The operator type</param>
         /// <param name="propertyId">The property ID to add a condition</param>
         /// <param name="matchType">The match flag</param>
         /// <param name="matchValue">The match valu</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.Calendar.Filter.AddOperator(_filterHandle, logicalOperator);
@@ -342,12 +364,14 @@ namespace Tizen.Pims.Calendar
         }
 
         /// <summary>
-        /// Adds a condition for the double type property.
+        /// Adds a condition for the double type.
         /// </summary>
         /// <param name="logicalOperator">The operator type</param>
         /// <param name="propertyId">The property ID to add a condition</param>
         /// <param name="matchType">The match flag</param>
         /// <param name="matchValue">The match valu</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.Calendar.Filter.AddOperator(_filterHandle, logicalOperator);
@@ -366,12 +390,14 @@ namespace Tizen.Pims.Calendar
         }
 
         /// <summary>
-        /// Adds a condition for the CalendarTime type property.
+        /// Adds a condition for the CalendarTime type.
         /// </summary>
         /// <param name="logicalOperator">The operator type</param>
         /// <param name="propertyId">The property ID to add a condition</param>
         /// <param name="matchType">The match flag</param>
         /// <param name="matchValue">The match valu</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, CalendarTime matchValue)
         {
             int error = Interop.Calendar.Filter.AddOperator(_filterHandle, logicalOperator);
@@ -395,6 +421,8 @@ namespace Tizen.Pims.Calendar
         /// </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, CalendarFilter filter)
         {
             int error = Interop.Calendar.Filter.AddOperator(_filterHandle, logicalOperator);
index 875d643..fdcf2a9 100644 (file)
@@ -18,13 +18,10 @@ using System;
 using System.Collections;
 using System.Collections.Generic;
 
-/// <summary>
-/// </summary>
-/// <remarks>
-/// </remarks>
 namespace Tizen.Pims.Calendar
 {
     /// <summary>
+    /// A list of records with the same type.
     /// </summary>
     public class CalendarList:IDisposable
     {
@@ -43,6 +40,8 @@ namespace Tizen.Pims.Calendar
         /// <summary>
         /// Creates a calendar 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 CalendarList()
         {
             int error = Interop.Calendar.List.Create(out _listHandle);
@@ -100,6 +99,10 @@ namespace Tizen.Pims.Calendar
             }
         }
 
+        /// <summary>
+        /// Releases all resources used by the CalendarList.
+        /// It should be called after finished using of the object.
+        /// </summary>
         public void Dispose()
         {
             Dispose(true);
@@ -110,6 +113,8 @@ namespace Tizen.Pims.Calendar
         /// Adds a record to the calendar list.
         /// </summary>
         /// <param name="record">The record to be added</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(CalendarRecord record)
         {
             int error = Interop.Calendar.List.Add(_listHandle, record._recordHandle);
@@ -127,6 +132,8 @@ namespace Tizen.Pims.Calendar
         /// Removes a record from the calendar list.
         /// </summary>
         /// <param name="record">The record to be removed</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(CalendarRecord record)
         {
             int error = Interop.Calendar.List.Remove(_listHandle, record._recordHandle);
@@ -144,7 +151,7 @@ namespace Tizen.Pims.Calendar
         /// Retrieves a record from the calendar list.
         /// </summary>
         /// <returns>
-        /// CalendarRecord
+        /// calendar record
         /// </returns>
         public CalendarRecord GetCurrentRecord()
         {
@@ -168,7 +175,9 @@ namespace Tizen.Pims.Calendar
         {
             int error = Interop.Calendar.List.Prev(_listHandle);
             if (CalendarError.None == (CalendarError)error)
+            {
                 return true;
+            }
             else if (this.Count > 0 && CalendarError.NoData == (CalendarError)error)
             {
                 Log.Debug(Globals.LogTag, "Nodata MovePrevious " + error);
@@ -191,7 +200,9 @@ namespace Tizen.Pims.Calendar
         {
             int error = Interop.Calendar.List.Next(_listHandle);
             if (CalendarError.None == (CalendarError)error)
+            {
                 return true;
+            }
             else if (this.Count > 0 && CalendarError.NoData == (CalendarError)error)
             {
                 Log.Debug(Globals.LogTag, "Nodata MoveNext" + error);
index f2cbdfb..af6ef04 100644 (file)
@@ -18,13 +18,10 @@ using System;
 using System.Collections.Generic;
 using static Interop.Calendar.Service;
 
-/// <summary>
-/// </summary>
-/// <remarks>
-/// </remarks>
 namespace Tizen.Pims.Calendar
 {
     /// <summary>
+    /// A class for managing calendar information. It allows applications to use calendar service.
     /// </summary>
     public class CalendarManager : IDisposable
     {
@@ -33,6 +30,7 @@ namespace Tizen.Pims.Calendar
         /// <summary>
         /// Create a manager.
         /// </summary>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
         public CalendarManager()
         {
             int error = Interop.Calendar.Service.Connect();
@@ -50,7 +48,8 @@ namespace Tizen.Pims.Calendar
         }
 
 #region IDisposable Support
-        private bool disposedValue = false; // To detect redundant calls
+        /// To detect redundant calls
+        private bool disposedValue = false;
 
         protected virtual void Dispose(bool disposing)
         {
@@ -68,6 +67,10 @@ namespace Tizen.Pims.Calendar
             }
         }
 
+        /// <summary>
+        /// Releases all resources used by the CalendarManager.
+        /// It should be called after finished using of the object.
+        /// </summary>
         public void Dispose()
         {
             Dispose(true);
index ddd9c02..941699a 100644 (file)
 using System;
 using static Interop.Calendar.Query;
 
-/// <summary>
-/// </summary>
-/// <remarks>
-/// </remarks>
 namespace Tizen.Pims.Calendar
 {
-    /// <summary>
+    /// A query is used to retrieve data which satisfies given criteria.
     /// </summary>
+    /// <remarks>
+    /// A query is used to retrieve calendar 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 CalendarQuery : IDisposable
     {
         internal IntPtr _queryHandle;
@@ -33,6 +35,9 @@ namespace Tizen.Pims.Calendar
         /// 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 CalendarQuery(string viewUri)
         {
             int error = Interop.Calendar.Query.Create(viewUri, out _queryHandle);
@@ -72,6 +77,10 @@ namespace Tizen.Pims.Calendar
             }
         }
 
+        /// <summary>
+        /// Releases all resources used by the CalendarQuery.
+        /// It should be called after finished using of the object.
+        /// </summary>
         public void Dispose()
         {
             Dispose(true);
@@ -82,6 +91,7 @@ namespace Tizen.Pims.Calendar
         /// 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.Calendar.Query.SetProjection(_queryHandle, propertyIdArray, propertyIdArray.Length);
@@ -96,6 +106,7 @@ namespace Tizen.Pims.Calendar
         /// 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.Calendar.Query.SetDistinct(_queryHandle, set);
@@ -110,6 +121,7 @@ namespace Tizen.Pims.Calendar
         /// 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(CalendarFilter filter)
         {
             int error = Interop.Calendar.Query.SetFilter(_queryHandle, filter._filterHandle);
@@ -125,6 +137,7 @@ namespace Tizen.Pims.Calendar
         /// </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.Calendar.Query.SetSort(_queryHandle, propertyId, isAscending);
index 9c31306..a6b25d0 100644 (file)
@@ -18,14 +18,20 @@ using System;
 using System.Collections.Generic;
 using System.Runtime.InteropServices;
 
-/// <summary>
-/// </summary>
-/// <remarks>
-/// </remarks>
 namespace Tizen.Pims.Calendar
 {
     /// <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 alarm, attendee and extended.
+    /// A record can be a complex set of data, containing other data.
+    /// For example, a calendar record contains the alarm property, which is a reference to an alarm record.
+    /// An alarm record could belong to a event record,
+    /// and its alarm id property is set to the identifier of the corresponding event.
+    /// In this case, the alarm is the child record of the event and the event is the parent record.
+    /// </remarks>
     public class CalendarRecord : IDisposable
     {
         internal string _uri;
@@ -85,6 +91,9 @@ namespace Tizen.Pims.Calendar
         /// 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 CalendarRecord(string viewUri)
         {
             int error = 0;
@@ -104,7 +113,8 @@ namespace Tizen.Pims.Calendar
         }
 
 #region IDisposable Support
-        internal bool _disposedValue = false; // To detect redundant calls
+        /// To detect redundant calls
+        internal bool _disposedValue = false;
 
         protected virtual void Dispose(bool disposing)
         {
@@ -123,6 +133,10 @@ namespace Tizen.Pims.Calendar
             }
         }
 
+        /// <summary>
+        /// Releases all resources used by the CalendarRecord.
+        /// It should be called after finished using of the object.
+        /// </summary>
         public void Dispose()
         {
             Dispose(true);
@@ -167,6 +181,10 @@ namespace Tizen.Pims.Calendar
         /// <summary>
         /// 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 CalendarRecord Clone()
         {
             IntPtr _clonedRecordHandle;
@@ -195,8 +213,9 @@ namespace Tizen.Pims.Calendar
         /// </summary>
         /// <param name="propertyId">The property ID</param>
         /// <returns>
-        /// The value of record which property id is matched.
+        /// 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;
@@ -265,10 +284,11 @@ namespace Tizen.Pims.Calendar
         }
 
         /// <summary>
-        /// Sets a object to a record.
+        /// Sets a value of the property to a record.
         /// </summary>
         /// <param name="propertyId">The property ID</param>
         /// <param name="value">value</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))
@@ -334,6 +354,7 @@ namespace Tizen.Pims.Calendar
         /// </summary>
         /// <param name="propertyId">The property ID</param>
         /// <param name="childRecord">The child record</param>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public void AddChildRecord(uint propertyId, CalendarRecord childRecord)
         {
             int error = Interop.Calendar.Record.AddChildRecord(_recordHandle, propertyId, childRecord._recordHandle);
@@ -350,6 +371,7 @@ namespace Tizen.Pims.Calendar
         /// </summary>
         /// <param name="propertyId">The property ID</param>
         /// <param name="childRecord">The child record</param>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public void RemoveChildRecord(uint propertyId, CalendarRecord childRecord)
         {
             int error = Interop.Calendar.Record.RemoveChildRecord(_recordHandle, propertyId, childRecord._recordHandle);
@@ -362,12 +384,13 @@ namespace Tizen.Pims.Calendar
         }
 
         /// <summary>
-        /// Get a child record count.
+        /// Gets a child record from the parent record
         /// </summary>
         /// <param name="propertyId">The property ID</param>
         /// <returns>
-        /// Count
+        /// 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;
@@ -381,13 +404,14 @@ namespace Tizen.Pims.Calendar
         }
 
         /// <summary>
-        /// Get a child record with index.
+        /// Gets a child record from the parent record
         /// </summary>
         /// <param name="propertyId">The property ID</param>
         /// <param name="index">The child record index</param>
         /// <returns>
-        /// CalendarRecord
+        /// The record
         /// </returns>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public CalendarRecord GetChildRecord(uint propertyId, int index)
         {
             IntPtr handle;
@@ -402,12 +426,13 @@ namespace Tizen.Pims.Calendar
         }
 
         /// <summary>
-        /// Makes a clone of a given record's child record list.
+        /// Clones a child record list corresponding to property ID
         /// </summary>
         /// <param name="propertyId">The property ID</param>
         /// <returns>
-        /// CalendarList
+        /// the record list
         /// </returns>
+        /// <exception cref="ArgumentException">Thrown when one of the arguments provided to a method is not valid</exception>
         public CalendarList CloneChildRecordList(uint propertyId)
         {
             IntPtr listHandle;
index 3de7e19..f1193ef 100644 (file)
 using System;
 using static Interop.Calendar.Reminder;
 
-/// <summary>
-/// </summary>
-/// <remarks>
-/// </remarks>
 namespace Tizen.Pims.Calendar
 {
     /// <summary>
+    /// A class for reminder for event.
     /// </summary>
+    /// <remarks>
+    /// The client who wants to be alerted at specific time should register MIME("application/x-tizen.calendar.reminder") type in manifest.xml file.
+    /// </remarks>
     public class CalendarReminder : IDisposable
     {
 #region IDisposable Support
@@ -42,6 +42,10 @@ namespace Tizen.Pims.Calendar
             }
         }
 
+        /// <summary>
+        /// Releases all resources used by the CalendarReminder.
+        /// It should be called after finished using of the object.
+        /// </summary>
         public void Dispose()
         {
             Dispose(true);
@@ -85,12 +89,12 @@ namespace Tizen.Pims.Calendar
                 if (s_reminderAlerted == null)
                 {
                     /// _reminderAlertedCallback is removed by .Net Core
-                    ///                                int error = Interop.Calendar.Reminder.Remove(_reminderAlertedCallback, IntPtr.Zero);
-                    ///                                if (CalendarError.None != (CalendarError)error)
-                    ///                                {
-                    ///                                        Log.Error(Globals.LogTag, "Remove reminder Failed with error " + error);
-                    ///                                        throw CalendarErrorFactory.GetException(error);
-                    ///                                }
+                    int error = Interop.Calendar.Reminder.Remove(_reminderAlertedCallback, IntPtr.Zero);
+                    if (CalendarError.None != (CalendarError)error)
+                    {
+                        Log.Error(Globals.LogTag, "Remove reminder Failed with error " + error);
+                        throw CalendarErrorFactory.GetException(error);
+                    }
                 }
             }
         }
index f3d9821..3ac883c 100644 (file)
 using System;
 using System.Runtime.InteropServices;
 
-/// <summary>
-/// </summary>
-/// <remarks>
-/// </remarks>
 namespace Tizen.Pims.Calendar
 {
     /// <summary>
+    /// A class for time to set, get or calcurate.
     /// </summary>
     public class CalendarTime : IComparable<CalendarTime>
     {
@@ -65,6 +62,8 @@ namespace Tizen.Pims.Calendar
         /// <param name="hour">hour</param>
         /// <param name="minute">minute</param>
         /// <param name="second">second</param>
+        /// <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 CalendarTime(int year, int month, int day, int hour, int minute, int second)
         {
             _type = (int)Type.Local;
@@ -94,10 +93,15 @@ namespace Tizen.Pims.Calendar
         /// <returns>
         /// A 32-bit signed integer that indicates the relative order of the objects being compared.
         /// </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 int CompareTo(CalendarTime t)
         {
             if (_type != t._type)
-                throw new NotImplementedException("Not to compare with different type");
+            {
+                Log.Error(Globals.LogTag, "Not to compare with different type");
+                throw CalendarErrorFactory.GetException((int)CalendarError.InvalidParameter);
+            }
 
             if (_type == (int)Type.Utc)
                 return UtcTime.CompareTo(t.UtcTime);
index 9b40aeb..1a7a3a8 100644 (file)
@@ -18,14 +18,14 @@ using System;
 using System.Collections.Generic;
 using System.Threading.Tasks;
 
-/// <summary>
-/// </summary>
-/// <remarks>
-/// </remarks>
 namespace Tizen.Pims.Calendar
 {
     /// <summary>
+    /// A class for parsing and composing vCalendar.
     /// </summary>
+    /// <remarks>
+    /// It's based on the vCalendar v2.0 specification
+    /// </remarks>
     public class CalendarVcalendar
     {
         internal CalendarVcalendar()
@@ -41,6 +41,8 @@ namespace Tizen.Pims.Calendar
         /// <returns>
         /// The composed stream.
         /// </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 string Compose(CalendarList list)
         {
             string stream;
@@ -58,8 +60,10 @@ namespace Tizen.Pims.Calendar
         /// </summary>
         /// <param name="stream">The vcalendar stream</param>
         /// <returns>
-        /// List of records
+        /// the record 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 CalendarList Parse(string stream)
         {
             int error = 0;
@@ -77,7 +81,10 @@ namespace Tizen.Pims.Calendar
         /// Parse vcalendar file with foreach
         /// </summary>
         /// <param name="path">The file path of the vCalendar stream file</param>
-        /// <param name="callback"></param>
+        /// <param name="callback">he 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)
         {
             int error = 0;
index 49a85f4..b4ddd17 100644 (file)
@@ -18,14 +18,15 @@ using System;
 using System.Collections;
 using System.Collections.Generic;
 
-/// <summary>
-/// </summary>
-/// <remarks>
-/// </remarks>
 namespace Tizen.Pims.Calendar
 {
     /// <summary>
+    /// 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, long, double, CalendarTime.
+    /// </remarks>
     public static class CalendarViews
     {
         /// data type mask 0x0FF00000
@@ -330,16 +331,11 @@ namespace Tizen.Pims.Calendar
             ExtendedValue        = (ViewExtended|DataTypeString) + 4,
         }
 
-        internal const uint AverageSizeOfRecord = 56; ///average size
+        ///average size
+        internal const uint AverageSizeOfRecord = 56;
 
-        /// <summary>
-        /// </summary>
-        public class Book
+        public static class Book
         {
-            internal Book()
-            {
-            }
-
             /// <summary>
             /// Identifier of this calendar book view
             /// </summary>
@@ -406,14 +402,8 @@ namespace Tizen.Pims.Calendar
             public const uint Mode        = (uint)PropertyIds.BookMode;
         }
 
-        /// <summary>
-        /// </summary>
-        public class Event
+        public static class Event
         {
-            internal Event()
-            {
-            }
-
             /// <summary>
             /// Identifier of this event view
             /// </summary>
@@ -656,15 +646,8 @@ namespace Tizen.Pims.Calendar
             public const uint LinkBaseId         = (uint)PropertyIds.EventLinkBaseId;
         }
 
-        /// <summary>
-        /// </summary>
-        /// <param name=""></param>
-        public class Todo
+        public static class Todo
         {
-            internal Todo()
-            {
-            }
-
             /// <summary>
             /// Identifier of this todo view
             /// </summary>
@@ -863,15 +846,8 @@ namespace Tizen.Pims.Calendar
             public const uint IsAllday          = (uint)PropertyIds.TodoIsAllday;
         }
 
-        /// <summary>
-        /// </summary>
-        /// <param name=""></param>
-        public class Timezone
+        public static class Timezone
         {
-            internal Timezone()
-            {
-            }
-
             /// <summary>
             /// Identifier of this timezone view
             /// </summary>
@@ -938,14 +914,8 @@ namespace Tizen.Pims.Calendar
             public const uint CalendarId                  = (uint)PropertyIds.TimezoneCalendarId;
         }
 
-        /// <summary>
-        /// </summary>
-        public class Attendee
+        public static class Attendee
         {
-            internal Attendee()
-            {
-            }
-
             /// <summary>
             /// Identifier of this calendar attendee view
             /// </summary>
@@ -1008,14 +978,8 @@ namespace Tizen.Pims.Calendar
             public const uint ParentId     = (uint)PropertyIds.AttendeeParentId;
         }
 
-        /// <summary>
-        /// </summary>
-        public class Alarm
+        public static class Alarm
         {
-            internal Alarm()
-            {
-            }
-
             /// <summary>
             /// Identifier of this calendar alarm view
             /// </summary>
@@ -1054,14 +1018,8 @@ namespace Tizen.Pims.Calendar
             public const uint AlarmTime   = (uint)PropertyIds.AlarmAlarm;
         }
 
-        /// <summary>
-        /// </summary>
-        public class InstanceUtimeBook
+        public static class InstanceUtimeBook
         {
-            internal InstanceUtimeBook()
-            {
-            }
-
             /// <summary>
             /// Identifier of this instance utime book
             /// </summary>
@@ -1140,14 +1098,8 @@ namespace Tizen.Pims.Calendar
             public const uint SyncData1        = (uint)PropertyIds.InstanceUtimeBookSyncData1;
         }
 
-        /// <summary>
-        /// </summary>
-        public class InstanceLocaltimeBook
+        public static class InstanceLocaltimeBook
         {
-            internal InstanceLocaltimeBook()
-            {
-            }
-
             /// <summary>
             /// Uri
             /// </summary>
@@ -1230,15 +1182,8 @@ namespace Tizen.Pims.Calendar
             public const uint IsAllday         = (uint)PropertyIds.InstanceLocaltimeBookIsAllday;
         }
 
-        /// <summary>
-        /// </summary>
-        /// <param name=""></param>
-        public class InstanceUtimeBookExtended
+        public static class InstanceUtimeBookExtended
         {
-            internal InstanceUtimeBookExtended()
-            {
-            }
-
             /// <summary>
             /// Uri
             /// </summary>
@@ -1341,15 +1286,8 @@ namespace Tizen.Pims.Calendar
             public const uint SyncData4         = (uint)PropertyIds.InstanceUtimeBookExtendedSyncData4;
         }
 
-        /// <summary>
-        /// </summary>
-        /// <param name=""></param>
-        public class InstanceLocaltimeBookExtended
+        public static class InstanceLocaltimeBookExtended
         {
-            internal InstanceLocaltimeBookExtended()
-            {
-            }
-
             /// <summary>
             /// Uri
             /// </summary>
@@ -1454,14 +1392,8 @@ namespace Tizen.Pims.Calendar
             public const uint IsAllday         = (uint)PropertyIds.InstanceLocaltimeBookExtendedIsAllday;
         }
 
-        /// <summary>
-        /// </summary>
-        public class UpdatedInfo
+        public static class UpdatedInfo
         {
-            internal UpdatedInfo()
-            {
-            }
-
             /// <summary>
             /// Identifier of this updatedInfo view
             /// </summary>
@@ -1484,14 +1416,8 @@ namespace Tizen.Pims.Calendar
             public const uint Version    = (uint)PropertyIds.UpdateInfoVersion;
         }
 
-        /// <summary>
-        /// </summary>
-        public class Extended
+        public static class Extended
         {
-            internal Extended()
-            {
-            }
-
             /// <summary>
             /// Identifier of this extended_property view
             /// </summary>
index 11bb9d4..5d4cd07 100644 (file)
 using System;
 using System.Collections.Generic;
 
-/// <summary>
-/// </summary>
-/// <remarks>
-/// </remarks>
 namespace Tizen.Pims.Calendar
 {
     /// <summary>