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>
/// 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);
/// 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;
}
/// <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;
}
/// <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>
}
/// <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;
-/*\r
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the License);\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an AS IS BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Threading.Tasks;\r
-\r
-namespace Tizen.Network.Smartcard\r
-{\r
- /// <summary>\r
- /// A class for Smartcard management. It allows applications to use Smartcard service.\r
- /// </summary>\r
- /// <since_tizen> 3 </since_tizen>\r
- /// <privilege>http://tizen.org/privilege/secureelement</privilege>\r
- static public class SmartcardManager\r
- {\r
- /// <summary>\r
- /// Gets the list of available Secure Element readers.\r
- /// </summary>\r
- /// <since_tizen> 3 </since_tizen>\r
- /// <returns>List of SmartcardReader objects.</returns>\r
- static public IEnumerable<SmartcardReader> GetReaders()\r
- {\r
- try\r
- {\r
- return SmartcardManagerImpl.Instance.GetReaders();\r
- }\r
- catch (TypeInitializationException e)\r
- {\r
- throw e.InnerException;\r
- }\r
- }\r
- }\r
-}\r
+/*
+ * 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;
+ }
+ }
+ }
+}
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>
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
}
/// <summary>
- /// The existence of secure element.
+ /// The existence of a secure element.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public bool IsSecureElementPresent
}
/// <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>
/// 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);
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>
}
/// <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
}
/// <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()
{
/// 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);
/// 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)
{
}
/// <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);