Standards
Standards / Extensions |
C or C++ |
Dependencies |
|
both |
|
Format
#include <sys/_Elmarm4.h>
arm_error_t arm_init_application(
/* [in] */ arm_string_t application_name,
/* [in] */ arm_string_t application_group_name,
/* [in] */ arm_string_t application_instance_name,
/* [in] */ arm_int32_t flags,
/* [in] */ arm_buffer4_t *buffer4,
/* [in/out] */ arm_appl_id_t *application_id
);
General description
Use arm_init_application()
to define an application. This function must be called before any
other ARM API calls. Typically it should be called during the application's
initialization.
If an application exists as multiple processes,
it must call arm_init_application() in each process. This is necessary
for eWLM to understand how each process contributes to the application.
Multiple applications can register from within one process. This is
useful if external functions are packaged in the same process.
arm_init_application()
is the ARM 4.0 equivalent of ARM 2.0's arm_init function.
- application_name
- The name used generically to identify the application. The maximum
length is 128 characters including the null string terminator.
- application_group_name
- The name of a group of application instances to which this instance
belongs. The maximum length is 256 characters including the null string
terminator. If no value is desired, a null pointer should be passed.
- application_instance_name
- The name of this instance of the application. The maximum length
is 256 characters including the null string terminator. If no value
is desired, a null pointer should be passed.
- flags
- One flag is defined. ARM_INIT_FLAG_ID_INPUT indicates whether
the application id is an input (flag is one) or an output (flag is
zero). See the application id parameter below. All other flag bits
are reserved and must be zero.
- buffer4
- A pointer to a buffer that identifies one or more sub-buffers
containing additional data. Currently no sub-buffers are defined for
this function so a null pointer should be passed. If a buffer is passed,
eWLM ignores it.
- application_id
- A pointer to a 64-bit area handle that identifies the application.
The application can define its own handle and pass it as input or
it can have eWLM generate a handle and return it. The choice is indicated
by the flag ARM_INIT_FLAG_ID_INPUT. The handle must be passed to arm_init_transaction_type()
and arm_end_application(). The handle is defined only within the caller's
process.
Returned value
On success, arm_init_application
returns ARM_RC_SUCCESS. On failure, the errno and return code are
set to indicate the error. See
Return code for
the list of all possible return codes. On failure, the application_id
is set to a dummy value which can be used for later calls to other
interfaces. Those interfaces will recognize that the application_id
contains a dummy value and return without performing any action.
- Error Code
- Description
- EFAULT
- A parameter of this service contained an address that was not
accessible to the caller.
- EINVAL
- A parameter of this service contained a value that was not valid.
- EMVSARMERROR
- An ARM error occurred. Refer to the return code for the specific
error.
- EPERM
- The caller does not have the appropriate privileges. The return
code is set to ARM_RC_AUTH_ERROR.
- EMVSSAF2ERR
- An error occurred in the security product.