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
{
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;
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();
}
}
}
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
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
/// Same user name exists in your application.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- Duplcated = -0x01000000 | 0x01,
+ Duplicated = -0x01000000 | 0x01,
/// <summary>
/// Empty data.
/// </summary>
}
/// <summary>
- /// Serviceprovider ID of the account provider.
+ /// ServiceProvider ID of the account provider.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public string ServiceProviderId
GC.SuppressFinalize(this);
}
- private void Dispose(bool disposing)
+ protected virtual void Dispose(bool disposing)
{
if (!disposing)
{
/// <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>
/// </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>
/// </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>
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.
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;
/// 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);
}
}
- _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)
{
/// 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>
--- /dev/null
+/*
+* 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;
+ }
+ }
+}
{
internal DBStatusChangedEventArgs(DBStatus status)
{
- this.Status = status;
+ Status = status;
}
/// <summary>
{
internal NameDisplayOrderChangedEventArgs(ContactDisplayOrder displayOrder)
{
- this.NameDisplayOrder = displayOrder;
+ NameDisplayOrder = displayOrder;
}
/// <summary>
{
internal NameSortingOrderChangedEventArgs(ContactSortingOrder SortingOrder)
{
- this.NameSortingOrder = SortingOrder;
+ NameSortingOrder = SortingOrder;
}
/// <summary>