summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyihong Chae <hh.chae@samsung.com>2017-07-04 11:08:35 (GMT)
committerHyihong Chae <hh.chae@samsung.com>2017-07-04 11:15:00 (GMT)
commitaebfa1916f349ddac5fdf568aac4d90b3e950425 (patch)
tree17b904300e18bb0f64a0b4e21645c59cd702d501
parent2d9cf77811cc4d8c8b364a37524d031aca783d3f (diff)
downloadnfc-accepted/tizen_4.0_unified.zip
nfc-accepted/tizen_4.0_unified.tar.gz
nfc-accepted/tizen_4.0_unified.tar.bz2
Change-Id: I50c7cd78bddd3b811c0903a3932e0cfbc97cfc9f Signed-off-by: HyiHong Chae <hh.chae@samsung.com>
-rwxr-xr-xTizen.Network.Nfc/Tizen.Network.Nfc/NfcCardEmulationAdapter.cs27
-rwxr-xr-xTizen.Network.Nfc/Tizen.Network.Nfc/NfcNdefMessage.cs2
-rwxr-xr-xTizen.Network.Nfc/Tizen.Network.Nfc/NfcNdefRecord.cs12
-rwxr-xr-xTizen.Network.Nfc/Tizen.Network.Nfc/NfcP2p.cs3
-rwxr-xr-xTizen.Network.Nfc/Tizen.Network.Nfc/NfcP2pAdapter.cs2
-rw-r--r--Tizen.Network.Nfc/Tizen.Network.Nfc/NfcSecureElement.cs3
-rwxr-xr-xTizen.Network.Nfc/Tizen.Network.Nfc/NfcTag.cs15
-rwxr-xr-xTizen.Network.Nfc/Tizen.Network.Nfc/NfcTagAdapter.cs2
8 files changed, 65 insertions, 1 deletions
diff --git a/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcCardEmulationAdapter.cs b/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcCardEmulationAdapter.cs
index 06ef7cb..d74be00 100755
--- a/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcCardEmulationAdapter.cs
+++ b/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcCardEmulationAdapter.cs
@@ -165,6 +165,8 @@ namespace Tizen.Network.Nfc
/// Enable card emulation mode.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public void EnableCardEmulation()
{
int ret = Interop.Nfc.CardEmulation.EnableCardEmulation();
@@ -179,6 +181,8 @@ namespace Tizen.Network.Nfc
/// Disable card emulation mode.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
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.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
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.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public void DisableTransactionForegroundDispatch()
{
int ret = Interop.Nfc.DisableTransactionForegroundDispatch();
@@ -241,6 +249,9 @@ namespace Tizen.Network.Nfc
/// <returns>'True' when application is currently the activated handler, otherwise 'False'.</returns>
/// <param name="seType">The type of Secure Element.</param>
/// <param name="aid">Application Id, specified in ISO/IEC 7816-4.</param>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public bool IsActivatedHandlerForAid(NfcSecureElementType seType, string aid)
{
bool isActivatedHandle = false;
@@ -261,6 +272,9 @@ namespace Tizen.Network.Nfc
/// <returns>'True' when application is currently the activated handler, otherwise 'False'.</returns>
/// <param name="seType">The type of Secure Element.</param>
/// <param name="category">Enumeration value of category.</param>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public bool IsActivatedHandlerForCategory(NfcSecureElementType seType, NfcCardEmulationCategoryType category)
{
bool isActivatedHandle = false;
@@ -281,6 +295,9 @@ namespace Tizen.Network.Nfc
/// <param name="seType">The type of Secure Element.</param>
/// <param name="category">Enumeration value of category.</param>
/// <param name="aid">Application Id, specified in ISO/IEC 7816-4.</param>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
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
/// <param name="seType">The type of Secure Element.</param>
/// <param name="category">Enumeration value of category.</param>
/// <param name="aid">Application Id, specified in ISO/IEC 7816-4.</param>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
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.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public void SetPreferredApplication()
{
int ret = Interop.Nfc.CardEmulation.SetPreferredHandler();
@@ -326,6 +348,8 @@ namespace Tizen.Network.Nfc
/// Unsets the application as a preferred handler.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public void UnsetPreferredApplication()
{
int ret = Interop.Nfc.CardEmulation.UnsetPreferredHandler();
@@ -343,6 +367,9 @@ namespace Tizen.Network.Nfc
/// <returns>List of NfcRegisteredAidInformation objects.</returns>
/// <param name="seType">The type of Secure Element.</param>
/// <param name="category">Enumeration value of category.</param>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public IEnumerable<NfcRegisteredAidInformation> GetRegisteredAidInformation(NfcSecureElementType seType, NfcCardEmulationCategoryType category)
{
List<NfcRegisteredAidInformation> infoList = new List<NfcRegisteredAidInformation>();
diff --git a/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcNdefMessage.cs b/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcNdefMessage.cs
index eedbecd..80d1574 100755
--- a/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcNdefMessage.cs
+++ b/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcNdefMessage.cs
@@ -52,6 +52,8 @@ namespace Tizen.Network.Nfc
/// Creates a object for the access point.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public NfcNdefMessage()
{
int ret = Interop.Nfc.NdefMessage.Create(out _messageHandle);
diff --git a/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcNdefRecord.cs b/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcNdefRecord.cs
index 00b06e1..6387c79 100755
--- a/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcNdefRecord.cs
+++ b/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcNdefRecord.cs
@@ -209,6 +209,9 @@ namespace Tizen.Network.Nfc
/// <param name="id">The record ID.</param>
/// <param name="payload">The payload of this record.</param>
/// <param name="paloadLength">The byte size of payload.</param>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
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
/// <param name="text">The encoded text.</param>
/// <param name="languageCode">The language code string value followed by IANA[RFC 3066] (ex: en-US, ko-KR).</param>
/// <param name="encode">The encoding type.</param>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
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
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <param name="uri">The URI string that will be stored in the payload.</param>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public NfcNdefRecord(string uri)
{
int ret = Interop.Nfc.NdefRecord.CreateUri(out _recordHandle, uri);
@@ -261,6 +270,9 @@ namespace Tizen.Network.Nfc
/// <param name="mimeType">The mime type [RFC 2046] (ex. text/plain, image/jpeg ) This value is stored in type field.</param>
/// <param name="data">The data in form of bytes array.</param>
/// <param name="dataSize">The size of data.</param>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public NfcNdefRecord(string mimeType, byte[] data, uint dataSize)
{
int ret = Interop.Nfc.NdefRecord.CreateMime(out _recordHandle, mimeType, data, dataSize);
diff --git a/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcP2p.cs b/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcP2p.cs
index a11e859..a1a5308 100755
--- a/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcP2p.cs
+++ b/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcP2p.cs
@@ -91,6 +91,9 @@ namespace Tizen.Network.Nfc
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <param name="ndefMessage">NfcNdefMessage object.</param>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public Task<NfcError> SendNdefMessageAsync(NfcNdefMessage ndefMessage)
{
var task = new TaskCompletionSource<NfcError>();
diff --git a/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcP2pAdapter.cs b/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcP2pAdapter.cs
index 4b254b1..ac3c693 100755
--- a/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcP2pAdapter.cs
+++ b/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcP2pAdapter.cs
@@ -85,6 +85,8 @@ namespace Tizen.Network.Nfc
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>NfcP2p object.</returns>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public NfcP2p GetConnectedTarget()
{
IntPtr targetHandle = IntPtr.Zero;
diff --git a/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcSecureElement.cs b/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcSecureElement.cs
index c412417..e882ba7 100644
--- a/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcSecureElement.cs
+++ b/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcSecureElement.cs
@@ -64,6 +64,9 @@ namespace Tizen.Network.Nfc
/// <since_tizen> 3 </since_tizen>
/// <param name="response">The bytes array of response data.</param>
/// <param name="responseLength">The size of response bytes array.</param>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public void HceSendApduResponse(byte[] response, uint responseLength)
{
int ret = Interop.Nfc.CardEmulation.HceSendApduRespondse(_secureElementHandle, response, responseLength);
diff --git a/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcTag.cs b/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcTag.cs
index 567f52d..7643171 100755
--- a/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcTag.cs
+++ b/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcTag.cs
@@ -137,6 +137,8 @@ namespace Tizen.Network.Nfc
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>List of NfcTagInformation objects.</returns>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public IEnumerable<NfcTagInformation> ForeachInformation()
{
List<NfcTagInformation> infoList = new List<NfcTagInformation>();
@@ -170,10 +172,13 @@ namespace Tizen.Network.Nfc
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <param name="buffer">The binary data for parameter or additional commands.</param>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public Task<byte[]> TransceiveAsync(byte[] buffer)
{
var task = new TaskCompletionSource<byte[]>();
-
+
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.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public Task<NfcNdefMessage> ReadNdefMessageAsync()
{
var task = new TaskCompletionSource<NfcNdefMessage>();
@@ -232,6 +239,9 @@ namespace Tizen.Network.Nfc
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <param name="ndefMessage">The NfcNdefMessage object.</param>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public Task<NfcError> WriteNdefMessageAsync(NfcNdefMessage ndefMessage)
{
var task = new TaskCompletionSource<NfcError>();
@@ -257,6 +267,9 @@ namespace Tizen.Network.Nfc
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <param name="keyValue">The key value that may need to format the tag.</param>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public Task<NfcError> FormatNdefMessageAsync(byte[] keyValue)
{
var task = new TaskCompletionSource<NfcError>();
diff --git a/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcTagAdapter.cs b/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcTagAdapter.cs
index 5c6d8a9..61c6c1b 100755
--- a/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcTagAdapter.cs
+++ b/Tizen.Network.Nfc/Tizen.Network.Nfc/NfcTagAdapter.cs
@@ -85,6 +85,8 @@ namespace Tizen.Network.Nfc
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>NfcTag object.</returns>
+ /// <exception cref="NotSupportedException">Thrown when Nfc is not supported.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public NfcTag GetConnectedTag()
{
IntPtr tagHandle = IntPtr.Zero;