summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEditor Lionbridge <TizenEditor.SEL@lionbridge.com>2017-08-11 19:48:26 +0530
committerEditor Lionbridge <TizenEditor.SEL@lionbridge.com>2017-08-11 19:48:26 +0530
commit237315332213a6a4ca6310a1b053816092f08e4d (patch)
tree75d8bd8f10ea386ab7cd67fabd92a0dd92cec303
parenta5a07ecfcc5315a16e7a61bc519f5ece67c9db5c (diff)
downloadsmartcard-tizen.tar.gz
smartcard-tizen.tar.bz2
smartcard-tizen.zip
Review smartcard API cs filestizen
Change-Id: I27ef501939825b532759f6413620e05b3732783f
-rw-r--r--Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardChannel.cs18
-rwxr-xr-xTizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardManager.cs94
-rw-r--r--Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardReader.cs12
-rw-r--r--Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardSession.cs28
4 files changed, 76 insertions, 76 deletions
diff --git a/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardChannel.cs b/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardChannel.cs
index 081823a..1119b1a 100644
--- a/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardChannel.cs
+++ b/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardChannel.cs
@@ -21,7 +21,7 @@ using System.Collections.Generic;
namespace Tizen.Network.Smartcard
{
/// <summary>
- /// A class for Smartcard channel informations. It allows applications to handle channel informations.
+ /// The class for Smartcard channel information. It allows applications to handle the channel information.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <privilege>http://tizen.org/privilege/secureelement</privilege>
@@ -143,8 +143,8 @@ namespace Tizen.Network.Smartcard
/// Closes the given channel to the Secure Element.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <exception cref="NotSupportedException">Thrown when Smartcard is not supported.</exception>
- /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the Smartcard is not supported.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to an invalid operation.</exception>
public void Close()
{
int ret = Interop.Smartcard.Channel.ChannelClose(_channelHandle);
@@ -160,7 +160,7 @@ namespace Tizen.Network.Smartcard
/// Gets the response to the select command.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <returns>Byte array to retrieve the SELECT response.</returns>
+ /// <returns>Byte array to retrieve the select response.</returns>
public byte[] GetSelectedResponse()
{
byte[] respList;
@@ -182,11 +182,11 @@ namespace Tizen.Network.Smartcard
}
/// <summary>
- /// Transmits an APDU command (as per ISO/IEC 7816-4) to the Secure Element.
+ /// Transmits the APDU command (as per ISO/IEC 7816-4) to the secure element.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>Byte array for the response APDU plus status words.</returns>
- /// <param name="cmd">Command APDU to be send to the secure element.</param>
+ /// <param name="cmd">Command APDU to be sent to the secure element.</param>
public byte[] Transmit(byte[] cmd)
{
byte[] atrList;
@@ -209,7 +209,7 @@ namespace Tizen.Network.Smartcard
}
/// <summary>
- /// Helper function to retrieves the response APDU of the previous transmit() call.
+ /// Helper function to retrieve the response APDU of the previous transmit() call.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>Byte array for the response APDU plus status words.</returns>
@@ -234,10 +234,10 @@ namespace Tizen.Network.Smartcard
}
/// <summary>
- /// Performs a selection of the next Applet on the given channel that matches to the partial Application ID(AID).
+ /// Performs a selection of the next applet on the given channel that matches to the partial application ID (AID).
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <returns>True or false depending whether another applet with the partial Application ID(AID).</returns>
+ /// <returns>True or false depending whether another applet with the partial application ID (AID).</returns>
public bool SelectNext()
{
bool selectNext;
diff --git a/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardManager.cs b/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardManager.cs
index a711be1..f08ced3 100755
--- a/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardManager.cs
+++ b/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardManager.cs
@@ -1,47 +1,47 @@
-/*
- * 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;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace Tizen.Network.Smartcard
-{
- /// <summary>
- /// A class for Smartcard management. It allows applications to use Smartcard service.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- /// <privilege>http://tizen.org/privilege/secureelement</privilege>
- static public class SmartcardManager
- {
- /// <summary>
- /// Gets the list of available Secure Element readers.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- /// <returns>List of SmartcardReader objects.</returns>
- static public IEnumerable<SmartcardReader> GetReaders()
- {
- try
- {
- return SmartcardManagerImpl.Instance.GetReaders();
- }
- catch (TypeInitializationException e)
- {
- throw e.InnerException;
- }
- }
- }
-}
+/*
+ * 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;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace Tizen.Network.Smartcard
+{
+ /// <summary>
+ /// The class for Smartcard management. It allows applications to use the Smartcard service.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ /// <privilege>http://tizen.org/privilege/secureelement</privilege>
+ static public class SmartcardManager
+ {
+ /// <summary>
+ /// Gets the list of available secure element readers.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ /// <returns>List of SmartcardReader objects.</returns>
+ static public IEnumerable<SmartcardReader> GetReaders()
+ {
+ try
+ {
+ return SmartcardManagerImpl.Instance.GetReaders();
+ }
+ catch (TypeInitializationException e)
+ {
+ throw e.InnerException;
+ }
+ }
+ }
+}
diff --git a/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardReader.cs b/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardReader.cs
index 2aa6f07..13e7c99 100644
--- a/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardReader.cs
+++ b/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardReader.cs
@@ -21,7 +21,7 @@ using System.Collections.Generic;
namespace Tizen.Network.Smartcard
{
/// <summary>
- /// A class for Smartcard reader informations. It allows applications to handle reader informations.
+ /// The class for Smartcard reader information. It allows applications to handle the reader information.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <privilege>http://tizen.org/privilege/secureelement</privilege>
@@ -33,7 +33,7 @@ namespace Tizen.Network.Smartcard
private List<SmartcardSession> _sessionList = new List<SmartcardSession>();
/// <summary>
- /// The name of reader.
+ /// The name of the reader.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public string Name
@@ -52,7 +52,7 @@ namespace Tizen.Network.Smartcard
}
/// <summary>
- /// The existence of secure element.
+ /// The existence of a secure element.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public bool IsSecureElementPresent
@@ -114,7 +114,7 @@ namespace Tizen.Network.Smartcard
}
/// <summary>
- /// Connects to a Secure Element in the given reader.
+ /// Connects to a secure element in the given reader.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <returns>The SmartcardSession object.</returns>
@@ -135,8 +135,8 @@ namespace Tizen.Network.Smartcard
/// Closes all the sessions opened on the given reader.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <exception cref="NotSupportedException">Thrown when Smartcard is not supported.</exception>
- /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the Smartcard is not supported.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to an invalid operation.</exception>
public void CloseSessions()
{
int ret = Interop.Smartcard.Reader.ReaderCloseSessions(_readerHandle);
diff --git a/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardSession.cs b/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardSession.cs
index 107181e..8ecc7aa 100644
--- a/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardSession.cs
+++ b/Tizen.Network.Smartcard/Tizen.Network.Smartcard/SmartcardSession.cs
@@ -21,7 +21,7 @@ using System.Collections.Generic;
namespace Tizen.Network.Smartcard
{
/// <summary>
- /// A class for Smartcard session informations. It allows applications to handle session informations.
+ /// The class for the Smartcard session information. It allows applications to handle the session information.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <privilege>http://tizen.org/privilege/secureelement</privilege>
@@ -60,7 +60,7 @@ namespace Tizen.Network.Smartcard
}
/// <summary>
- /// The Answer to Reset(ATR) of this Secure Element.
+ /// The Answer to Reset (ATR) of this secure element.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public byte[] Atr
@@ -151,10 +151,10 @@ namespace Tizen.Network.Smartcard
}
/// <summary>
- /// Closes the connection with the Secure Element.
+ /// Closes the connection with the secure element.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <exception cref="NotSupportedException">Thrown when Smartcard is not supported.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the Smartcard is not supported.</exception>
/// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public void Close()
{
@@ -171,8 +171,8 @@ namespace Tizen.Network.Smartcard
/// Closes any channel opened on the given session.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <exception cref="NotSupportedException">Thrown when Smartcard is not supported.</exception>
- /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the Smartcard is not supported.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to an invalid operation.</exception>
public void CloseChannels()
{
int ret = Interop.Smartcard.Session.SessionCloseChannels(_sessionHandle);
@@ -197,10 +197,10 @@ namespace Tizen.Network.Smartcard
/// Gets an access to the basic channel, as defined in the ISO/IEC 7816-4 specification (the one that has number 0).
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <returns>The SmartcardChannel object for basic channel.</returns>
- /// <param name="aid">Byte array containing the Application ID(AID) to be selected on the given channel.</param>
+ /// <returns>The SmartcardChannel object for the basic channel.</returns>
+ /// <param name="aid">The byte array containing the Application ID(AID) to be selected on the given channel.</param>
/// <param name="p2">P2 byte of the SELECT command if executed.</param>
- /// <exception cref="NotSupportedException">Thrown when Smartcard is not supported.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the Smartcard is not supported.</exception>
/// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
public SmartcardChannel OpenBasicChannel(byte[] aid, byte p2)
{
@@ -217,14 +217,14 @@ namespace Tizen.Network.Smartcard
}
/// <summary>
- /// Open a logical channel with the Secure Element, selecting the Applet represented by the given Application ID(AID).
+ /// Open a logical channel with the secure element, selecting the Applet represented by the given application ID (AID).
/// </summary>
/// <since_tizen> 3 </since_tizen>
- /// <returns>The SmartcardChannel object for logical channel.</returns>
- /// <param name="aid">Byte array containing the Application ID(AID) to be selected on the given channel.</param>
+ /// <returns>The SmartcardChannel object for the logical channel.</returns>
+ /// <param name="aid">The byte array containing the Application ID(AID) to be selected on the given channel.</param>
/// <param name="p2">P2 byte of the SELECT command if executed.</param>
- /// <exception cref="NotSupportedException">Thrown when Smartcard is not supported.</exception>
- /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the Smartcard is not supported.</exception>
+ /// <exception cref="InvalidOperationException">Thrown when the method failed due to an invalid operation.</exception>
public SmartcardChannel OpenLogicalChannel(byte[] aid, byte p2)
{
int ret = Interop.Smartcard.Session.SessionOpenLogicalChannel(_sessionHandle, aid, aid.Length, p2, out _logicalChannel);