From 57f9b3e0044d0357cd26301b6b7c8da1bca235f6 Mon Sep 17 00:00:00 2001 From: Jooseok Song Date: Mon, 3 Jul 2017 15:15:24 +0900 Subject: [PATCH] Add API Level Change-Id: I30d9d82cb8581d36d7cd27e100394fb9fd158db0 --- .../Interop/Interop.Account.cs | 2 ++ .../Interop/Interop.AccountProvider.cs | 2 ++ .../Interop/Interop.AccountService.cs | 2 ++ .../Interop/Interop.Libraries.cs | 2 ++ .../Tizen.Account.AccountManager/Account.cs | 25 ++++++++++++++++++++ .../Tizen.Account.AccountManager/AccountEnums.cs | 23 ++++++++++++++++++ .../AccountErrorFactory.cs | 20 ++++++++++++++++ .../AccountProvider.cs | 14 +++++++++++ .../Tizen.Account.AccountManager/AccountService.cs | 27 ++++++++++++++++++++++ .../AccountSubscriberEventArgs.cs | 3 +++ 10 files changed, 120 insertions(+) diff --git a/src/Tizen.Account.AccountManager/Interop/Interop.Account.cs b/src/Tizen.Account.AccountManager/Interop/Interop.Account.cs index f52da1c..9789044 100644 --- a/src/Tizen.Account.AccountManager/Interop/Interop.Account.cs +++ b/src/Tizen.Account.AccountManager/Interop/Interop.Account.cs @@ -20,11 +20,13 @@ using Tizen.Account.AccountManager; /// /// Interop for Account class APIs /// +/// 3 internal static partial class Interop { /// /// Interop for Account class APIs /// + /// 3 internal static partial class Account { [DllImport(Libraries.AccountSvc, EntryPoint = "account_create", CallingConvention = CallingConvention.Cdecl)] diff --git a/src/Tizen.Account.AccountManager/Interop/Interop.AccountProvider.cs b/src/Tizen.Account.AccountManager/Interop/Interop.AccountProvider.cs index 0af6c37..f201061 100644 --- a/src/Tizen.Account.AccountManager/Interop/Interop.AccountProvider.cs +++ b/src/Tizen.Account.AccountManager/Interop/Interop.AccountProvider.cs @@ -21,11 +21,13 @@ using Tizen.Account.AccountManager; /// /// Interop for AccountProvider class APIs /// +/// 3 internal static partial class Interop { /// /// Interop for AccountProvider class APIs /// + /// 3 internal static partial class AccountProvider { diff --git a/src/Tizen.Account.AccountManager/Interop/Interop.AccountService.cs b/src/Tizen.Account.AccountManager/Interop/Interop.AccountService.cs index d418f64..7bb1275 100644 --- a/src/Tizen.Account.AccountManager/Interop/Interop.AccountService.cs +++ b/src/Tizen.Account.AccountManager/Interop/Interop.AccountService.cs @@ -20,11 +20,13 @@ using System.Runtime.InteropServices; /// /// Interop for Account class APIs /// +/// 3 internal static partial class Interop { /// /// Interop for Account class APIs /// + /// 3 internal static partial class AccountService { [DllImport(Libraries.AccountSvc, EntryPoint = "account_update_to_db_by_id", CallingConvention = CallingConvention.Cdecl)] diff --git a/src/Tizen.Account.AccountManager/Interop/Interop.Libraries.cs b/src/Tizen.Account.AccountManager/Interop/Interop.Libraries.cs index f18aa0d..f1530bd 100644 --- a/src/Tizen.Account.AccountManager/Interop/Interop.Libraries.cs +++ b/src/Tizen.Account.AccountManager/Interop/Interop.Libraries.cs @@ -17,11 +17,13 @@ /// /// Interop for Library reference /// +/// 3 internal static partial class Interop { /// /// Interop for Library reference /// + /// 3 internal static partial class Libraries { public const string AccountSvc = "libaccounts-svc.so.0"; diff --git a/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/Account.cs b/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/Account.cs index ae1031c..df10a15 100644 --- a/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/Account.cs +++ b/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/Account.cs @@ -22,6 +22,7 @@ namespace Tizen.Account.AccountManager /// /// Represents the Account Information. /// + /// 3 public class Account : IDisposable { private IntPtr _handle = IntPtr.Zero; @@ -37,6 +38,7 @@ namespace Tizen.Account.AccountManager /// /// Creates a new Account instance. /// + /// 3 /// Account Instance. public static Account CreateAccount() { @@ -53,6 +55,7 @@ namespace Tizen.Account.AccountManager /// /// Id of the Account. /// + /// 3 /// Account Id shall be created only when account is added to the database. public int AccountId { @@ -72,6 +75,7 @@ namespace Tizen.Account.AccountManager /// /// UserName of the Account. /// + /// 3 /// User Name of the Account. public string UserName { @@ -100,6 +104,7 @@ namespace Tizen.Account.AccountManager /// /// Display Name of the Account. /// + /// 3 /// DisplayName of the Account. public string DisplayName { @@ -128,6 +133,7 @@ namespace Tizen.Account.AccountManager /// /// Icon path of the Account. /// + /// 3 /// Icon path of the Account. public string IconPath { @@ -156,6 +162,7 @@ namespace Tizen.Account.AccountManager /// /// Domain name of the Account. /// + /// 3 /// Domain name of the Account. public string DomainName { @@ -184,6 +191,7 @@ namespace Tizen.Account.AccountManager /// /// Email Id of the Account. /// + /// 3 /// Email Id of the Account. public string EmailId { @@ -212,6 +220,7 @@ namespace Tizen.Account.AccountManager /// /// Package Name of the Account. /// + /// 3 /// Package Name. public string PackageName { @@ -240,6 +249,7 @@ namespace Tizen.Account.AccountManager /// /// Access Token of the Account. /// + /// 3 /// Access Token. public string AccessToken { @@ -268,6 +278,7 @@ namespace Tizen.Account.AccountManager /// /// Authentication type of the Account. /// + /// 3 /// Authentication type. public AccountAuthType AuthType { @@ -296,6 +307,7 @@ namespace Tizen.Account.AccountManager /// /// Secrecy State of the Account. /// + /// 3 /// Secrecy State. public AccountSecrecyState SecrecyState { @@ -324,6 +336,7 @@ namespace Tizen.Account.AccountManager /// /// Sync State of the Account. /// + /// 3 /// Sync State. public AccountSyncState SyncState { @@ -352,6 +365,7 @@ namespace Tizen.Account.AccountManager /// /// Source of the Account . /// + /// 3 /// Account Source. public string Source { @@ -392,6 +406,7 @@ namespace Tizen.Account.AccountManager /// /// Sets the account capability. /// + /// 3 /// The Account capability type /// The Account capability state /// In case of invalid parameters @@ -406,6 +421,7 @@ namespace Tizen.Account.AccountManager /// /// Gets all the capabilities of an account. /// + /// 3 /// The capability type to get the capability value. /// The capability value (on/off) of the specified CapabilityState . /// In case of invalid parameters @@ -424,6 +440,7 @@ namespace Tizen.Account.AccountManager /// /// Gets all the capabilities of an account. /// + /// 3 /// List of Cpabailities as Dictionary public Dictionary GetAllCapabilities() { @@ -448,6 +465,7 @@ namespace Tizen.Account.AccountManager /// /// Sets the Custom Value to the Account. /// + /// 3 /// key to be added to the Account. /// value to be updated for respective key for the Account. /// In case of invalid parameters @@ -463,6 +481,7 @@ namespace Tizen.Account.AccountManager /// /// Gets the user specific custom text of an account key. /// + /// 3 /// The key to retrieve custom text . /// The text of the given key /// In case of invalid parameters @@ -482,6 +501,7 @@ namespace Tizen.Account.AccountManager /// /// Gets All the custome values. /// + /// 3 /// List of custom key, value pairs as Dictionary. public Dictionary GetAllCustomValues() { @@ -507,6 +527,7 @@ namespace Tizen.Account.AccountManager /// /// Sets the user text. /// + /// 3 /// The index of the user text (must be in range from 0 to 4) /// The text string to set as the user text /// In case of invalid parameters @@ -522,6 +543,7 @@ namespace Tizen.Account.AccountManager /// /// Gets the user text. /// + /// 3 /// The index of the user text (range: 0 ~ 4) /// The user text of the given key /// In case of invalid parameters @@ -541,6 +563,7 @@ namespace Tizen.Account.AccountManager /// /// Gets the user int value. /// + /// 3 /// The index of the user int (range: 0 ~ 4) /// The user int of the given key /// In case of invalid parameters @@ -559,6 +582,7 @@ namespace Tizen.Account.AccountManager /// /// Sets the user integer value. /// + /// 3 /// The index of the user integer (must be in range from 0 to 4) /// The integer to set as the user integer /// In case of invalid parameters @@ -574,6 +598,7 @@ namespace Tizen.Account.AccountManager /// /// Overloaded Dispose API for destroying the Account Handle. /// + /// 3 public void Dispose() { Dispose(true); diff --git a/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountEnums.cs b/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountEnums.cs index 045cac7..b55a458 100644 --- a/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountEnums.cs +++ b/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountEnums.cs @@ -19,21 +19,25 @@ namespace Tizen.Account.AccountManager /// /// Enumeration for the state of capability /// + /// 3 public enum CapabilityState { /// /// Account capability is invalid /// + /// 3 InvalidState, /// /// Account capability is disabled /// + /// 3 Disabled, /// /// Account capability is enabled /// + /// 3 Enabled } @@ -45,79 +49,94 @@ namespace Tizen.Account.AccountManager /// /// Account secrecy is invalid /// + /// 3 InvalidState, /// /// Account is not visible /// + /// 3 Invisible, /// /// Account is visible /// + /// 3 Visible } /// /// Enumeration for the account sync status. /// + /// 3 public enum AccountSyncState { /// /// Account sync is invalid /// + /// 3 InvalidState, /// /// Account sync not supported /// + /// 3 NotSupported, /// /// Account sync supported but all synchronization functionalities are off /// + /// 3 Off, /// /// Account sync support and sync status is idle /// + /// 3 Idle, /// /// Account sync support and sync status is running /// + /// 3 Running } /// /// Enumeration for the account auth type. /// + /// 3 public enum AccountAuthType { /// /// Auth type is invalid /// + /// 3 Invalid, /// /// XAuth type /// + /// 3 XAuth, /// /// OAuth type /// + /// 3 OAuth, /// /// Client-Login type /// + /// 3 ClientLogin } /// /// Account information change notification type /// + /// 3 /// /// When the account database is changed, You can distinguish one event type from the other which are set for subscribing notification. /// @@ -126,18 +145,22 @@ namespace Tizen.Account.AccountManager /// /// The insert notification type. /// + /// 3 Insert, /// /// The delete notification type. /// + /// 3 Delete, /// /// The update notification type. /// + /// 3 Update, /// /// The sync update notification type. /// + /// 3 syncUpdate } } diff --git a/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountErrorFactory.cs b/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountErrorFactory.cs index 13cd203..48f9164 100644 --- a/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountErrorFactory.cs +++ b/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountErrorFactory.cs @@ -22,84 +22,104 @@ namespace Tizen.Account.AccountManager /// /// Enum to give the type of error occured, if any. /// + /// 3 public enum AccountError { //TIZEN_ERROR_ACCOUNT = -0x01000000 /// /// Successful. /// + /// 3 None = Tizen.Internals.Errors.ErrorCode.None, /// /// Invalid parameter. /// + /// 3 InvalidParameter = Tizen.Internals.Errors.ErrorCode.InvalidParameter, /// /// Out of memory. /// + /// 3 OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory, /// /// Same user name exists in your application /// + /// 3 Duplcated = -0x01000000 | 0x01, /// /// Empty Data /// + /// 3 NoData = Tizen.Internals.Errors.ErrorCode.NoData, /// /// elated record does not exist /// + /// 3 RecordNotFound = -0x01000000 | 0x03, /// /// Invalid Operation. /// + /// 3 InvalidOperation = Tizen.Internals.Errors.ErrorCode.InvalidOperation, /// /// DB operation failed. /// + /// 3 DBFailed = -0x01000000 | 0x04, /// /// DB is not connected. /// + /// 3 DBNotOpened = -0x01000000 | 0x05, /// /// DB query syntax error /// + /// 3 QuerySyntaxError = -0x01000000 | 0x06, /// /// Iterator has reached the end /// + /// 3 IteratorEnd = -0x01000000 | 0x07, /// /// Notification failed /// + /// 3 NotificationFailed = -0x01000000 | 0x08, /// /// Permission denied. /// + /// 3 PermissionDenied = Tizen.Internals.Errors.ErrorCode.PermissionDenied, /// /// XML parse failed /// + /// 3 XMLParseFailed = -0x01000000 | 0x0a, /// /// XML File not found /// + /// 3 XMLFileNotFound = -0x01000000 | 0x0b, /// /// Subscription failed /// + /// 3 EventSubscriptionFailed = -0x01000000 | 0x0c, /// /// Account provider is not registered /// + /// 3 ProviderNotRegistered = -0x01000000 | 0x0d, /// /// Multiple accounts are not supported. /// + /// 3 MultipleNotAllowed = -0x01000000 | 0x0e, /// /// SQLite busy handler expired /// + /// 3 DBBusy = -0x01000000 | 0x10 }; diff --git a/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountProvider.cs b/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountProvider.cs index 8aa882f..606a286 100644 --- a/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountProvider.cs +++ b/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountProvider.cs @@ -23,6 +23,7 @@ namespace Tizen.Account.AccountManager /// /// Account Id. /// + /// 3 public class AccountProvider : IDisposable { internal IntPtr _handle; @@ -51,6 +52,7 @@ namespace Tizen.Account.AccountManager /// /// Account Id. /// + /// 3 public string AppId { get @@ -69,6 +71,7 @@ namespace Tizen.Account.AccountManager /// /// Serviceprovider Id of the account provider. /// + /// 3 public string ServiceProviderId { get @@ -87,6 +90,7 @@ namespace Tizen.Account.AccountManager /// /// Icon path of an account provider. /// + /// 3 public string IconPath { get @@ -105,6 +109,7 @@ namespace Tizen.Account.AccountManager /// /// Small icon path of an account provider. /// + /// 3 public string SmallIconPath { get @@ -123,6 +128,7 @@ namespace Tizen.Account.AccountManager /// /// Flag for account provider If supports multiple accounts. /// + /// 3 public bool MultipleAccountSupport { get @@ -141,6 +147,7 @@ namespace Tizen.Account.AccountManager /// /// Retrieves all the capability information of the account provider. /// + /// 3 /// http://tizen.org/privilege/account.read /// /// list of capability information. @@ -169,6 +176,7 @@ namespace Tizen.Account.AccountManager /// /// Gets the specific label information detail of an account provider. /// + /// 3 /// /// The locale is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code. /// For example, "ko_KR" or "ko-kr" for Korean, "en_US" or "en-us" for American English. @@ -192,6 +200,7 @@ namespace Tizen.Account.AccountManager /// /// Gets the specific label information detail of an account provider. /// + /// 3 /// /// The application ID to search /// @@ -222,6 +231,7 @@ namespace Tizen.Account.AccountManager /// /// Gets the label information detail of an account provider. /// + /// 3 /// All the labels information for the given account provider. /// http://tizen.org/privilege/account.read /// In case of any DB error @@ -248,6 +258,7 @@ namespace Tizen.Account.AccountManager /// /// Checks whether the given appId exists in the account provider DB. /// + /// 3 /// The application ID to check. /// returns true If App is supported /// http://tizen.org/privilege/account.read @@ -274,6 +285,7 @@ namespace Tizen.Account.AccountManager /// /// Checks whether the given application ID supports the capability. /// + /// 3 /// The application Id /// The capability information /// @@ -303,6 +315,7 @@ namespace Tizen.Account.AccountManager /// /// Retrieves capability information with application ID. /// + /// 3 /// application Id /// Capability information list for the given appId. /// http://tizen.org/privilege/account.read @@ -331,6 +344,7 @@ namespace Tizen.Account.AccountManager /// /// Overloaded Dispose API for destroying the AccountProvider Handle. /// + /// 3 public void Dispose() { Dispose(true); diff --git a/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountService.cs b/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountService.cs index 55d0080..fc7cbd4 100644 --- a/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountService.cs +++ b/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountService.cs @@ -32,57 +32,68 @@ namespace Tizen.Account.AccountManager /// Read an account or account provider with some filter /// /// + /// 3 public static class AccountService { /// /// This is contact capability string. /// + /// 3 public static readonly string ContactCapability = "http://tizen.org/account/capability/contact"; /// /// This is calendar capability string. /// + /// 3 public static readonly string CalendarCapability = "http://tizen.org/account/capability/calendar"; /// /// This is email capability string. /// + /// 3 public static readonly string EmailCapability = "http://tizen.org/account/capability/email"; /// /// This is photo capability string. /// + /// 3 public static readonly string PhotoCapability = "http://tizen.org/account/capability/photo"; /// /// This is video capability string. /// + /// 3 public static readonly string VideoCapability = "http://tizen.org/account/capability/video"; /// /// This is music capability string. /// + /// 3 public static readonly string MusicCapability = "http://tizen.org/account/capability/music"; /// /// This is document capability string. /// + /// 3 public static readonly string DocumentCapability = "http://tizen.org/account/capability/document"; /// /// This is message capability string. /// + /// 3 public static readonly string MessageCapability = "http://tizen.org/account/capability/message"; /// /// This is game capability string. /// + /// 3 public static readonly string GameCapability = "http://tizen.org/account/capability/game"; /// /// Retrieves all accounts details from the account database. /// + /// 3 /// List of Accounts /// http://tizen.org/privilege/account.read /// In case of any DB error. @@ -117,6 +128,7 @@ namespace Tizen.Account.AccountManager /// /// Retrieve an account with the account ID. /// + /// 3 /// The account Id to be searched. /// Account instance with reference to the given id. /// http://tizen.org/privilege/account.read @@ -140,6 +152,7 @@ namespace Tizen.Account.AccountManager /// /// Retrieves all AccountProviders details from the account database. /// + /// 3 /// List of AccountProviders /// http://tizen.org/privilege/account.read /// In case of any DB error @@ -175,6 +188,7 @@ namespace Tizen.Account.AccountManager /// /// Retrieves the account provider information with application Id. /// + /// 3 /// Application Id. /// The AccountProvider instance associated with the given application Id. /// http://tizen.org/privilege/account.read @@ -198,6 +212,7 @@ namespace Tizen.Account.AccountManager /// /// Retrieves all the account providers information with feature. /// + /// 3 /// The capability value to search for account providers. /// Retrieves AccountProviders information with the capability name. /// http://tizen.org/privilege/account.read @@ -234,6 +249,7 @@ namespace Tizen.Account.AccountManager /// /// Inserts into the Database with the new account Infomration. /// + /// 3 /// New Account instance to be added. /// http://tizen.org/privilege/account.read /// http://tizen.org/privilege/account.write @@ -261,6 +277,7 @@ namespace Tizen.Account.AccountManager /// /// Updates the account details to the account database. /// + /// 3 /// account instance to be updated. /// http://tizen.org/privilege/account.read /// http://tizen.org/privilege/account.write @@ -285,6 +302,7 @@ namespace Tizen.Account.AccountManager /// /// Deletes the account information from the Database. /// + /// 3 /// Account instance to be deleted from the database. /// http://tizen.org/privilege/account.read /// http://tizen.org/privilege/account.write @@ -308,6 +326,7 @@ namespace Tizen.Account.AccountManager /// /// Deletes an account from the account database by user name. /// + /// 3 /// The user name of the account to delete. /// The package name of the account to delete. /// http://tizen.org/privilege/account.read @@ -327,6 +346,7 @@ namespace Tizen.Account.AccountManager /// /// Deletes an account from the account database by package name. /// + /// 3 /// The package name of the account to delete. /// http://tizen.org/privilege/account.read /// http://tizen.org/privilege/account.write @@ -346,6 +366,7 @@ namespace Tizen.Account.AccountManager /// /// Retrieves all accounts with the given user name. /// + /// 3 /// The user name to search . /// Accounts list matched with the user name /// http://tizen.org/privilege/account.read @@ -382,6 +403,7 @@ namespace Tizen.Account.AccountManager /// /// Retrieves all accounts with the given package name. /// + /// 3 /// The package name to Search /// Accounts list matched with the package name /// http://tizen.org/privilege/account.read @@ -418,6 +440,7 @@ namespace Tizen.Account.AccountManager /// /// Retrieves all accounts with the given cpability type. /// + /// 3 /// Capability type /// Accounts list matched with the capability type /// http://tizen.org/privilege/account.read @@ -454,6 +477,7 @@ namespace Tizen.Account.AccountManager /// /// Retrieves all capabilities with the given account /// + /// 3 /// account instance /// Capabilities list as Dictionary of Capability type and State. /// http://tizen.org/privilege/account.read @@ -481,6 +505,7 @@ namespace Tizen.Account.AccountManager /// /// Gets the count of accounts in the account database. /// + /// 3 /// The number of accounts in the database /// http://tizen.org/privilege/account.read /// In case of any DB error @@ -500,6 +525,7 @@ namespace Tizen.Account.AccountManager /// /// Updates the sync status of the given account. /// + /// 3 /// Account for which sync status needs to be updated /// Sync State /// http://tizen.org/privilege/account.read @@ -529,6 +555,7 @@ namespace Tizen.Account.AccountManager /// /// ContentUpdated event is triggered when the media item info from DB changes. /// + /// 3 /// /// ContentUpdate event is triggered if the MediaInformaion updated/deleted or new Inforamtion is Inserted. /// diff --git a/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountSubscriberEventArgs.cs b/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountSubscriberEventArgs.cs index 84ee0da..153c427 100644 --- a/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountSubscriberEventArgs.cs +++ b/src/Tizen.Account.AccountManager/Tizen.Account.AccountManager/AccountSubscriberEventArgs.cs @@ -21,6 +21,7 @@ namespace Tizen.Account.AccountManager /// /// Event arguments passed when Event is triggered to notify that account is updated/removed from the account database. /// + /// 3 public class AccountSubscriberEventArgs : EventArgs { private const string NotiInsert = "insert"; @@ -52,6 +53,7 @@ namespace Tizen.Account.AccountManager /// /// The account event type /// + /// 3 public AccountNotificationType EventType { get; @@ -61,6 +63,7 @@ namespace Tizen.Account.AccountManager /// /// The account ID to update /// + /// 3 public int AccountId { get; -- 2.7.4