Tizen Native API  9.0
SE Service

The SE Service API provides functions to service framework.

Required Header

#include <smartcard.h>

Related Features

This API is related with the following features:

  • http://tizen.org/feature/network.secure_element
  • http://tizen.org/feature/network.secure_element.ese
  • http://tizen.org/feature/network.secure_element.uicc
  • http://tizen.org/feature/network.secure_element.usb
    It is recommended to design feature related codes in your application for reliability.

You can check if a device 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.

Functions

int smartcard_initialize (void)
 Initializes smartcard service.
int smartcard_deinitialize (void)
 Deinitializes smartcard service.
int smartcard_get_version (char **version)
 Gets the version of SIMAlliance OpenMobileAPI specification.
int smartcard_get_readers (int **readers, int *length)
 Gets the list of available Secure Element readers.

Enumeration Type Documentation

Error codes reported by the smartcard API.

Since :
2.3.1
Enumerator:
SMARTCARD_ERROR_NONE 

Successful

SMARTCARD_ERROR_GENERAL 

Smartcard error class A general error occurred

SMARTCARD_ERROR_IO_ERROR 

I/O error

SMARTCARD_ERROR_NO_SUCH_ELEMENT 

Smartcard error class No such element error

SMARTCARD_ERROR_ILLEGAL_STATE 

Smartcard error class Illegal state of execution error

SMARTCARD_ERROR_INVALID_PARAMETER 

Invalid function parameter

SMARTCARD_ERROR_ILLEGAL_REFERENCE 

Smartcard error class Illegal reference

SMARTCARD_ERROR_OPERATION_NOT_SUPPORTED 

Smartcard error class Operation not supported from SE

SMARTCARD_ERROR_PERMISSION_DENIED 

Permission denied

SMARTCARD_ERROR_CHANNEL_NOT_AVAILABLE 

Smartcard error class No channel available

SMARTCARD_ERROR_NOT_INITIALIZED 

Smartcard error class Smartcard service not initialized

SMARTCARD_ERROR_NOT_SUPPORTED 

Not supported

SMARTCARD_ERROR_OUT_OF_MEMORY 

Out of memory


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_NOT_SUPPORTEDNot supported
SMARTCARD_ERROR_PERMISSION_DENIEDPermission denied
SMARTCARD_ERROR_GENERALA general error occurred
SMARTCARD_ERROR_NOT_INITIALIZEDSmartcard service not initialized
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_NOT_SUPPORTEDNot supported
SMARTCARD_ERROR_INVALID_PARAMETERInvalid function parameter
SMARTCARD_ERROR_GENERALA general error occurred
SMARTCARD_ERROR_NOT_INITIALIZEDSmartcard service not initialized
int smartcard_get_version ( char **  version)

Gets the version of SIMAlliance OpenMobileAPI specification.

Since :
3.0
Remarks:
The version must be released using free().
Parameters:
[out]versionThe version of SIMAlliance OpenMobileAPI specification
Returns:
0 on success, otherwise a negative error value.
Return values:
SMARTCARD_ERROR_NONESuccessful
SMARTCARD_ERROR_NOT_SUPPORTEDNot supported
SMARTCARD_ERROR_INVALID_PARAMETERInvalid function parameter
SMARTCARD_ERROR_NOT_INITIALIZEDSmartcard service not initialized
SMARTCARD_ERROR_OUT_OF_MEMORYOut of memory
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_NOT_SUPPORTEDNot supported
SMARTCARD_ERROR_PERMISSION_DENIEDPermission denied
SMARTCARD_ERROR_GENERALA general error occurred
See also:
smartcard_deinitialize()