Tizen Native API
SE Service

Functions

int smartcard_initialize (void)
 Initializes smartcard service.
int smartcard_deinitialize (void)
 Deinitializes smartcard service.
int smartcard_get_readers (int **readers, int *length)
 Gets the list of available Secure Element readers.

The SE Service API provides functions to service framework.

Required Header

#include <smartcard.h>

Related Features

This API is related with the following features:

You can check if a devrice supports the related features for this API by using System Information, thereby controlling the procedure of your application.

To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.

More details on featuring your application can be found from Feature Element.


Enumeration Type Documentation

Error codes reported by the smartcard API.

Since :
2.3.1
Enumerator:
SMARTCARD_ERROR_NONE 

Successful

SMARTCARD_ERROR_GENERAL 

A general error occurred

SMARTCARD_ERROR_IO_ERROR 

I/O error

SMARTCARD_ERROR_NO_SUCH_ELEMENT 

No such element error

SMARTCARD_ERROR_ILLEGAL_STATE 

Illegal state of execution error

SMARTCARD_ERROR_INVALID_PARAMETER 

Invalid function parameter

SMARTCARD_ERROR_ILLEGAL_REFERENCE 

Illegal reference

SMARTCARD_ERROR_OPERATION_NOT_SUPPORTED 

Operation not supported from SE

SMARTCARD_ERROR_PERMISSION_DENIED 

Permission denied

SMARTCARD_ERROR_CHANNEL_NOT_AVAILABLE 

No channel available

SMARTCARD_ERROR_NOT_INITIALIZED 

Smartcard service not initialized

SMARTCARD_ERROR_NOT_SUPPORTED 

Not supported


Function Documentation

int smartcard_deinitialize ( void  )

Deinitializes smartcard service.

Releases all the resource of the smartcard service

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/secureelement
Returns:
0 on success, otherwise a negative error value.
Return values:
SMARTCARD_ERROR_NONESuccessful
SMARTCARD_ERROR_GENERALA general error occurred
SMARTCARD_ERROR_NOT_INITIALIZEDSmartcard service not initialized
SMARTCARD_ERROR_NOT_SUPPORTEDNot supported
SMARTCARD_ERROR_PERMISSION_DENIEDPermission denied
See also:
smartcard_initialize()
int smartcard_get_readers ( int **  readers,
int *  length 
)

Gets the list of available Secure Element readers.

Since :
2.3.1
Remarks:
readers must be released using free().
Parameters:
[out]readersList of readers
[out]lengthThe number of readers
Returns:
0 on success, otherwise a negative error value.
Return values:
SMARTCARD_ERROR_NONESuccessful
SMARTCARD_ERROR_GENERALA general error occurred
SMARTCARD_ERROR_INVALID_PARAMETERInvalid function parameter
SMARTCARD_ERROR_NOT_INITIALIZEDSmartcard service not initialized
SMARTCARD_ERROR_NOT_SUPPORTEDNot supported
int smartcard_initialize ( void  )

Initializes smartcard service.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/secureelement
Remarks:
This function must be called before proceeding any other smartcard function
Returns:
0 on success, otherwise a negative error value.
Return values:
SMARTCARD_ERROR_NONESuccessful
SMARTCARD_ERROR_GENERALA general error occurred
SMARTCARD_ERROR_NOT_SUPPORTEDNot supported
SMARTCARD_ERROR_PERMISSION_DENIEDPermission denied
See also:
smartcard_deinitialize()