Release 4.0.0-preview1-00153
authorDotnetBuild <dotnetbuild.tizen@gmail.com>
Tue, 5 Sep 2017 15:00:29 +0000 (00:00 +0900)
committerDotnetBuild <dotnetbuild.tizen@gmail.com>
Tue, 5 Sep 2017 15:00:29 +0000 (00:00 +0900)
12 files changed:
packaging/csapi-tizenfx.spec
src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/Account.cs
src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountEnums.cs
src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountErrorFactory.cs
src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountProvider.cs
src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountService.cs
src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsDatabase.cs
src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/ContactsVcard.cs
src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/DBChangedEventArgs.cs [new file with mode: 0644]
src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/DBStatusChangedEventArgs.cs
src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/NameDisplayOrderChangedEventArgs.cs
src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/NameSortingOrderChangedEventArgs.cs

index cd71075..6cbd1ec 100644 (file)
@@ -10,7 +10,7 @@
 
 Name:       csapi-tizenfx
 Summary:    Assemblies of Tizen .NET
-Version:    4.0.0.151
+Version:    4.0.0.153
 Release:    1
 Group:      Development/Libraries
 License:    Apache-2.0
index 498bb84..b09639f 100644 (file)
@@ -27,6 +27,11 @@ namespace Tizen.Account.AccountManager
     {
         private readonly SafeAccountHandle _handle;
 
+       /// <summary>
+       /// Account constructor.
+       /// </summary>
+       /// <since_tizen> 4 </since_tizen>
+       /// <param name="handle"> The account handle.</param>
         public Account(SafeAccountHandle handle)
         {
             _handle = handle;
@@ -607,16 +612,11 @@ namespace Tizen.Account.AccountManager
             GC.SuppressFinalize(this);
         }
 
-        private void Dispose(bool disposing)
+        protected virtual void Dispose(bool disposing)
         {
             if (!disposing)
             {
-                //if (_handle != IntPtr.Zero)
-                //{
-                //    _handle = IntPtr.Zero;
-                //}
-                //_handle.Dispose();
-                GC.SuppressFinalize(this);
+                _handle.Dispose();
             }
         }
     }
index 68a7a65..53942e0 100644 (file)
@@ -96,7 +96,7 @@ namespace Tizen.Account.AccountManager
         Idle,
 
         /// <summary>
-        /// Acount sync supported and sync status is running.
+        /// Account sync supported and sync status is running.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         Running
index 51c31dd..f23c792 100644 (file)
@@ -20,7 +20,7 @@ using Tizen;
 namespace Tizen.Account.AccountManager
 {
     /// <summary>
-    /// Enumeration for the types of error occured, if any.
+    /// Enumeration for the types of error occurred, if any.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     public enum AccountError
@@ -45,7 +45,7 @@ namespace Tizen.Account.AccountManager
         /// Same user name exists in your application.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        Duplcated = -0x01000000 | 0x01,
+        Duplicated = -0x01000000 | 0x01,
         /// <summary>
         /// Empty data.
         /// </summary>
index ce34491..be9e077 100644 (file)
@@ -69,7 +69,7 @@ namespace Tizen.Account.AccountManager
         }
 
         /// <summary>
-        /// Serviceprovider ID of the account provider.
+        /// ServiceProvider ID of the account provider.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         public string ServiceProviderId
@@ -365,7 +365,7 @@ namespace Tizen.Account.AccountManager
             GC.SuppressFinalize(this);
         }
 
-        private void Dispose(bool disposing)
+        protected virtual void Dispose(bool disposing)
         {
             if (!disposing)
             {
index d335a8e..8ebab51 100644 (file)
@@ -200,7 +200,7 @@ namespace Tizen.Account.AccountManager
         /// <returns>The AccountProvider instance associated with the given application ID.</returns>
         /// <privilege>http://tizen.org/privilege/account.read</privilege>
         /// <feature>http://tizen.org/feature/account</feature>
-        /// <exception cref="InvalidOperationException">In case of any DB error or record not found for given appid.</exception>
+        /// <exception cref="InvalidOperationException">In case of any DB error or record not found for given appId.</exception>
         /// <exception cref="ArgumentException"> In case of an invalid parameter.</exception>
         /// <exception cref="UnauthorizedAccessException"> In case of privilege not defined.</exception>
         /// <exception cref="NotSupportedException">The required feature is not supported.</exception>
@@ -262,6 +262,7 @@ namespace Tizen.Account.AccountManager
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <param name="account">New Account instance to be added.</param>
+        /// <returns>The account ID of the account instance.</returns>
         /// <privilege>http://tizen.org/privilege/account.read</privilege>
         /// <privilege>http://tizen.org/privilege/account.write </privilege>
         /// <feature>http://tizen.org/feature/account</feature>
@@ -590,9 +591,9 @@ namespace Tizen.Account.AccountManager
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <remarks>
-        /// ContentUpdate event is triggered if the MediaInformaion updated/deleted or new information is inserted.
+        /// ContentUpdate event is triggered if the MediaInformation updated/deleted or new information is inserted.
         /// </remarks>
-        /// <param name="sender"></param>
+        /// <param name="sender">An object that contains information about sender</param>
         /// <param name="e">A ContentUpdatedEventArgs object that contains information about the update operation.</param>
         /// <privilege>http://tizen.org/privilege/account.read</privilege>
         /// <feature>http://tizen.org/feature/account</feature>
index c868c56..c1a4043 100644 (file)
@@ -21,15 +21,6 @@ using System.Runtime.InteropServices;
 
 namespace Tizen.Pims.Contacts
 {
-    /// <summary>
-    /// Delegate 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>
-    public delegate void ContactsDBChanged(string uri);
 
     /// <summary>
     /// ContactsDatabase provides methods to manage contacts information from/to the database.
@@ -42,7 +33,7 @@ namespace Tizen.Pims.Contacts
         private Object thisLock = new Object();
         private Interop.Database.ContactsDBStatusChangedCallback _contactsDBStatusChangedCallback;
         private EventHandler<DBStatusChangedEventArgs> _dbStatusChanged;
-        private Dictionary<string, ContactsDBChanged> _delegateMap = new Dictionary<string, ContactsDBChanged>();
+        private Dictionary<string, EventHandler<DBChangedEventArgs>> _delegateMap = new Dictionary<string, EventHandler<DBChangedEventArgs>>();
         private Dictionary<string, Interop.Database.ContactsDBChangedCallback> _callbackMap = new Dictionary<string, Interop.Database.ContactsDBChangedCallback>();
         private Interop.Database.ContactsDBChangedCallback _dbChangedDelegate;
 
@@ -721,15 +712,16 @@ namespace Tizen.Pims.Contacts
         /// Registers a callback function to be invoked when a record changes.
         /// </summary>
         /// <param name="viewUri">The view URI of records whose changes are monitored</param>
-        /// <param name="callback">The callback function to register</param>
+        /// <param name="DBChanged">The EventHandler to register</param>
         [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
-        public void AddDBChangedDelegate(string viewUri, ContactsDBChanged callback)
+        public void AddDBChangedDelegate(string viewUri, EventHandler<DBChangedEventArgs> DBChanged)
         {
             if (_callbackMap[viewUri] == null)
             {
                 _callbackMap[viewUri] = (string uri, IntPtr userData) =>
                 {
-                    _delegateMap[uri](uri);
+                    DBChangedEventArgs args = new DBChangedEventArgs(uri);
+                    _delegateMap[uri]?.Invoke(this, args);
                 };
 
                 int error = Interop.Database.AddChangedCb(viewUri, _callbackMap[viewUri], IntPtr.Zero);
@@ -740,18 +732,18 @@ namespace Tizen.Pims.Contacts
                 }
             }
 
-            _delegateMap[viewUri] += callback;
+            _delegateMap[viewUri] += DBChanged;
         }
 
         /// <summary>
         /// Deregisters a callback function.
         /// </summary>
         /// <param name="viewUri">The view URI of records whose changes are monitored</param>
-        /// <param name="callback">The callback function to register</param>
+        /// <param name="DBChanged">The EventHandler to deregister</param>
         [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings")]
-        public void RemoveDBChangedDelegate(string viewUri, ContactsDBChanged callback)
+        public void RemoveDBChangedDelegate(string viewUri, EventHandler<DBChangedEventArgs> DBChanged)
         {
-            _delegateMap[viewUri] -= callback;
+            _delegateMap[viewUri] -= DBChanged;
 
             if (_delegateMap[viewUri] == null)
             {
index 3273a9d..8a7b7c0 100644 (file)
@@ -24,7 +24,7 @@ namespace Tizen.Pims.Contacts
     /// Delegate for getting a record parsed from a vCard file
     /// </summary>
     /// <param name="record">The contacts record</param>
-    /// <returns></returns>
+    /// <returns> true to continue with the next iteration of the loop, otherwise false to break out of the loop</returns>
     public delegate bool ParseCallback(ContactsRecord record);
 
     /// <summary>
diff --git a/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/DBChangedEventArgs.cs b/src/Tizen.Pims.Contacts/Tizen.Pims.Contacts/DBChangedEventArgs.cs
new file mode 100644 (file)
index 0000000..591c4a0
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+using System;
+
+namespace Tizen.Pims.Contacts
+{
+    /// <summary>
+    /// Event arguments passed when contacts database is changed
+    /// </summary>
+    public class DBChangedEventArgs : EventArgs
+    {
+        internal DBChangedEventArgs(string viewUri)
+        {
+            ViewUri = viewUri;
+        }
+
+        /// <summary>
+        /// The contacts view URI changed.
+        /// </summary>
+        public string ViewUri
+        {
+            get;
+            internal set;
+        }
+    }
+}
index 0257c18..ca1a79b 100644 (file)
@@ -26,7 +26,7 @@ namespace Tizen.Pims.Contacts
     {
         internal DBStatusChangedEventArgs(DBStatus status)
         {
-            this.Status = status;
+            Status = status;
         }
 
         /// <summary>
index 8e5dc3d..228318c 100644 (file)
@@ -25,7 +25,7 @@ namespace Tizen.Pims.Contacts
     {
         internal NameDisplayOrderChangedEventArgs(ContactDisplayOrder displayOrder)
         {
-            this.NameDisplayOrder = displayOrder;
+            NameDisplayOrder = displayOrder;
         }
 
         /// <summary>
index e365204..152ef0b 100644 (file)
@@ -25,7 +25,7 @@ namespace Tizen.Pims.Contacts
     {
         internal NameSortingOrderChangedEventArgs(ContactSortingOrder SortingOrder)
         {
-            this.NameSortingOrder = SortingOrder;
+            NameSortingOrder = SortingOrder;
         }
 
         /// <summary>