From: Hyihong Chae Date: Tue, 4 Jul 2017 11:08:35 +0000 (+0900) Subject: added throw exception comments X-Git-Tag: submit/trunk/20170823.075128~93^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7dd90d93bce1f346517e78ee3e72b835c881a16f;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git added throw exception comments Change-Id: I50c7cd78bddd3b811c0903a3932e0cfbc97cfc9f Signed-off-by: HyiHong Chae --- diff --git a/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcCardEmulationAdapter.cs b/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcCardEmulationAdapter.cs index 06ef7cb..d74be00 100755 --- a/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcCardEmulationAdapter.cs +++ b/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcCardEmulationAdapter.cs @@ -165,6 +165,8 @@ namespace Tizen.Network.Nfc /// Enable card emulation mode. /// /// 3 + /// Thrown when Nfc is not supported. + /// Thrown when the method failed due to invalid operation. public void EnableCardEmulation() { int ret = Interop.Nfc.CardEmulation.EnableCardEmulation(); @@ -179,6 +181,8 @@ namespace Tizen.Network.Nfc /// Disable card emulation mode. /// /// 3 + /// Thrown when Nfc is not supported. + /// Thrown when the method failed due to invalid operation. public void DisableCardEmulation() { int ret = Interop.Nfc.CardEmulation.DisableCardEmulatiion(); @@ -210,6 +214,8 @@ namespace Tizen.Network.Nfc /// Give the priority to the foreground application when dispatching transaction event. /// /// 3 + /// Thrown when Nfc is not supported. + /// Thrown when the method failed due to invalid operation. public void EnableTransactionForegroundDispatch() { int ret = Interop.Nfc.EnableTransactionForegroundDispatch(); @@ -224,6 +230,8 @@ namespace Tizen.Network.Nfc /// Disable foreground dispatch for "EVT_TRANSACTION" to the givin application. /// /// 3 + /// Thrown when Nfc is not supported. + /// Thrown when the method failed due to invalid operation. public void DisableTransactionForegroundDispatch() { int ret = Interop.Nfc.DisableTransactionForegroundDispatch(); @@ -241,6 +249,9 @@ namespace Tizen.Network.Nfc /// 'True' when application is currently the activated handler, otherwise 'False'. /// The type of Secure Element. /// Application Id, specified in ISO/IEC 7816-4. + /// Thrown when Nfc is not supported. + /// Thrown when method is failed due to an invalid parameter. + /// Thrown when the method failed due to invalid operation. public bool IsActivatedHandlerForAid(NfcSecureElementType seType, string aid) { bool isActivatedHandle = false; @@ -261,6 +272,9 @@ namespace Tizen.Network.Nfc /// 'True' when application is currently the activated handler, otherwise 'False'. /// The type of Secure Element. /// Enumeration value of category. + /// Thrown when Nfc is not supported. + /// Thrown when method is failed due to an invalid parameter. + /// Thrown when the method failed due to invalid operation. public bool IsActivatedHandlerForCategory(NfcSecureElementType seType, NfcCardEmulationCategoryType category) { bool isActivatedHandle = false; @@ -281,6 +295,9 @@ namespace Tizen.Network.Nfc /// The type of Secure Element. /// Enumeration value of category. /// Application Id, specified in ISO/IEC 7816-4. + /// Thrown when Nfc is not supported. + /// Thrown when method is failed due to an invalid parameter. + /// Thrown when the method failed due to invalid operation. public void RegisterAid(NfcSecureElementType seType, NfcCardEmulationCategoryType category, string aid) { int ret = Interop.Nfc.CardEmulation.RegisterAid((int)seType, (int)category, aid); @@ -298,6 +315,9 @@ namespace Tizen.Network.Nfc /// The type of Secure Element. /// Enumeration value of category. /// Application Id, specified in ISO/IEC 7816-4. + /// Thrown when Nfc is not supported. + /// Thrown when method is failed due to an invalid parameter. + /// Thrown when the method failed due to invalid operation. public void UnregisterAid(NfcSecureElementType seType, NfcCardEmulationCategoryType category, string aid) { int ret = Interop.Nfc.CardEmulation.UnregisterAid((int)seType, (int)category, aid); @@ -312,6 +332,8 @@ namespace Tizen.Network.Nfc /// Sets the application as a preferred handler. /// /// 3 + /// Thrown when Nfc is not supported. + /// Thrown when the method failed due to invalid operation. public void SetPreferredApplication() { int ret = Interop.Nfc.CardEmulation.SetPreferredHandler(); @@ -326,6 +348,8 @@ namespace Tizen.Network.Nfc /// Unsets the application as a preferred handler. /// /// 3 + /// Thrown when Nfc is not supported. + /// Thrown when the method failed due to invalid operation. public void UnsetPreferredApplication() { int ret = Interop.Nfc.CardEmulation.UnsetPreferredHandler(); @@ -343,6 +367,9 @@ namespace Tizen.Network.Nfc /// List of NfcRegisteredAidInformation objects. /// The type of Secure Element. /// Enumeration value of category. + /// Thrown when Nfc is not supported. + /// Thrown when method is failed due to an invalid parameter. + /// Thrown when the method failed due to invalid operation. public IEnumerable GetRegisteredAidInformation(NfcSecureElementType seType, NfcCardEmulationCategoryType category) { List infoList = new List(); diff --git a/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcNdefMessage.cs b/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcNdefMessage.cs index eedbecd..80d1574 100755 --- a/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcNdefMessage.cs +++ b/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcNdefMessage.cs @@ -52,6 +52,8 @@ namespace Tizen.Network.Nfc /// Creates a object for the access point. /// /// 3 + /// Thrown when Nfc is not supported. + /// Thrown when the method failed due to invalid operation. public NfcNdefMessage() { int ret = Interop.Nfc.NdefMessage.Create(out _messageHandle); diff --git a/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcNdefRecord.cs b/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcNdefRecord.cs index 00b06e1..6387c79 100755 --- a/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcNdefRecord.cs +++ b/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcNdefRecord.cs @@ -209,6 +209,9 @@ namespace Tizen.Network.Nfc /// The record ID. /// The payload of this record. /// The byte size of payload. + /// Thrown when Nfc is not supported. + /// Thrown when method is failed due to an invalid parameter. + /// Thrown when the method failed due to invalid operation. public NfcNdefRecord(NfcRecordTypeNameFormat format, byte[] type, byte[] id, byte[] payload, uint paloadLength) { int ret = Interop.Nfc.NdefRecord.Create(out _recordHandle, (int)format, type, type.Length, id, id.Length, payload, paloadLength); @@ -227,6 +230,9 @@ namespace Tizen.Network.Nfc /// The encoded text. /// The language code string value followed by IANA[RFC 3066] (ex: en-US, ko-KR). /// The encoding type. + /// Thrown when Nfc is not supported. + /// Thrown when method is failed due to an invalid parameter. + /// Thrown when the method failed due to invalid operation. public NfcNdefRecord(string text, string languageCode, NfcEncodeType encode) { int ret = Interop.Nfc.NdefRecord.CreateText(out _recordHandle, text, languageCode, (int)encode); @@ -243,6 +249,9 @@ namespace Tizen.Network.Nfc /// /// 3 /// The URI string that will be stored in the payload. + /// Thrown when Nfc is not supported. + /// Thrown when method is failed due to an invalid parameter. + /// Thrown when the method failed due to invalid operation. public NfcNdefRecord(string uri) { int ret = Interop.Nfc.NdefRecord.CreateUri(out _recordHandle, uri); @@ -261,6 +270,9 @@ namespace Tizen.Network.Nfc /// The mime type [RFC 2046] (ex. text/plain, image/jpeg ) This value is stored in type field. /// The data in form of bytes array. /// The size of data. + /// Thrown when Nfc is not supported. + /// Thrown when method is failed due to an invalid parameter. + /// Thrown when the method failed due to invalid operation. public NfcNdefRecord(string mimeType, byte[] data, uint dataSize) { int ret = Interop.Nfc.NdefRecord.CreateMime(out _recordHandle, mimeType, data, dataSize); diff --git a/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcP2p.cs b/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcP2p.cs index a11e859..a1a5308 100755 --- a/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcP2p.cs +++ b/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcP2p.cs @@ -91,6 +91,9 @@ namespace Tizen.Network.Nfc /// /// 3 /// NfcNdefMessage object. + /// Thrown when Nfc is not supported. + /// Thrown when method is failed due to an invalid parameter. + /// Thrown when the method failed due to invalid operation. public Task SendNdefMessageAsync(NfcNdefMessage ndefMessage) { var task = new TaskCompletionSource(); diff --git a/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcP2pAdapter.cs b/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcP2pAdapter.cs index 4b254b1..ac3c693 100755 --- a/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcP2pAdapter.cs +++ b/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcP2pAdapter.cs @@ -85,6 +85,8 @@ namespace Tizen.Network.Nfc /// /// 3 /// NfcP2p object. + /// Thrown when Nfc is not supported. + /// Thrown when the method failed due to invalid operation. public NfcP2p GetConnectedTarget() { IntPtr targetHandle = IntPtr.Zero; diff --git a/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcSecureElement.cs b/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcSecureElement.cs index c412417..e882ba7 100644 --- a/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcSecureElement.cs +++ b/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcSecureElement.cs @@ -64,6 +64,9 @@ namespace Tizen.Network.Nfc /// 3 /// The bytes array of response data. /// The size of response bytes array. + /// Thrown when Nfc is not supported. + /// Thrown when method is failed due to an invalid parameter. + /// Thrown when the method failed due to invalid operation. public void HceSendApduResponse(byte[] response, uint responseLength) { int ret = Interop.Nfc.CardEmulation.HceSendApduRespondse(_secureElementHandle, response, responseLength); diff --git a/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcTag.cs b/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcTag.cs index 567f52d..7643171 100755 --- a/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcTag.cs +++ b/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcTag.cs @@ -137,6 +137,8 @@ namespace Tizen.Network.Nfc /// /// 3 /// List of NfcTagInformation objects. + /// Thrown when Nfc is not supported. + /// Thrown when the method failed due to invalid operation. public IEnumerable ForeachInformation() { List infoList = new List(); @@ -170,10 +172,13 @@ namespace Tizen.Network.Nfc /// /// 3 /// The binary data for parameter or additional commands. + /// Thrown when Nfc is not supported. + /// Thrown when method is failed due to an invalid parameter. + /// Thrown when the method failed due to invalid operation. public Task TransceiveAsync(byte[] buffer) { var task = new TaskCompletionSource(); - + byte[] resultBuffer = null; Interop.Nfc.TagTransceiveCompletedCallback callback = (int result, IntPtr resultData, int dataSize, IntPtr userData) => { @@ -200,6 +205,8 @@ namespace Tizen.Network.Nfc /// Reads NDEF formatted data from NFC tag. /// /// 3 + /// Thrown when Nfc is not supported. + /// Thrown when the method failed due to invalid operation. public Task ReadNdefMessageAsync() { var task = new TaskCompletionSource(); @@ -232,6 +239,9 @@ namespace Tizen.Network.Nfc /// /// 3 /// The NfcNdefMessage object. + /// Thrown when Nfc is not supported. + /// Thrown when method is failed due to an invalid parameter. + /// Thrown when the method failed due to invalid operation. public Task WriteNdefMessageAsync(NfcNdefMessage ndefMessage) { var task = new TaskCompletionSource(); @@ -257,6 +267,9 @@ namespace Tizen.Network.Nfc /// /// 3 /// The key value that may need to format the tag. + /// Thrown when Nfc is not supported. + /// Thrown when method is failed due to an invalid parameter. + /// Thrown when the method failed due to invalid operation. public Task FormatNdefMessageAsync(byte[] keyValue) { var task = new TaskCompletionSource(); diff --git a/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcTagAdapter.cs b/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcTagAdapter.cs index 5c6d8a9..61c6c1b 100755 --- a/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcTagAdapter.cs +++ b/src/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcTagAdapter.cs @@ -85,6 +85,8 @@ namespace Tizen.Network.Nfc /// /// 3 /// NfcTag object. + /// Thrown when Nfc is not supported. + /// Thrown when the method failed due to invalid operation. public NfcTag GetConnectedTag() { IntPtr tagHandle = IntPtr.Zero;