This is the main class that is used in order to communicate with Intel(R) DAL via DAL Host Interface service (JHI) More...
Public Member Functions |
|
void | CloseSession (JhiSession Session) |
Close an applet session More... | |
void | CreateSession (string AppId, JHI_SESSION_FLAGS flags, byte[] initBuffer, out JhiSession Session) |
Create a session of an installed applet. More... | |
void | GetAppletProperty (string AppId, string Property, out string Value) |
Get a property value of an installed applet More... | |
void | GetSessionInfo (JhiSession Session, out JHI_SESSION_INFO SessionInfo) |
Get information of a given session More... | |
void | GetSessionsCount (string AppId, out UInt32 SessionsCount) |
Get the number of existing sessions of an applet More... | |
void | GetVersionInfo (out JHI_VERSION_INFO VersionInfo) |
This function is used in order to retrieve global information of JHI such as JHI versions and the FW versions, see the JHI_VERSION_INFO for the specific info retuned. More... | |
void | Install (string AppId, string srcFile) |
Install Applet into the Intel(R) DAL More... | |
void | RegisterEvents (JhiSession Session, Intel.Dal.JHI_CallbackFunction CallbackFunction) |
Registers registration of one callback function to receive events from a given session More... | |
void | SendAndRecv2 (JhiSession Session, Int32 nCommandId, byte[] InBuf, ref byte[] OutBuf, out Int32 ResponseCode) |
send and receive data from the application to an applet session More... | |
void | Uninstall (string AppId) |
Uninstall applet from the Intel(R) DAL More... | |
void | UnRegisterEvents (JhiSession Session) |
Remove registration of events from a given session More... | |
Static Public Member Functions |
|
static Byte | MajorAppletVer (UInt32 num) |
Extract Applet Major Version from a VM integer representation (num) More... | |
static UInt32 | MakeAppletVersion (UInt32 maj, UInt32 min) |
While applet version is represented in a Major.Minor format (i.e. More... | |
static Byte | MinorAppletVer (UInt32 num) |
Extract Applet Minor Version from a VM integer representation (num) More... | |
Public Attributes |
|
const int | JHI_BUFFER_MAX = 2097152 |
Buffer size limitation in JHI requests is 2MB, JHI will not accept any buffer with greater size. More... | |
Properties |
|
static bool |
DisableDllValidation [get, set] |
This flags is used in order to disable JHI.DLL signature validation. More... | |
static Jhi |
Instance [get] |
An instance of the JHI singelton class. More... | |
Detailed Description
This is the main class that is used in order to communicate with Intel(R) DAL via DAL Host Interface service (JHI)
Member Function Documentation
void Intel.Dal.Jhi.CloseSession | ( | JhiSession | Session) |
Close an applet session
- Parameters
-
Session Session Handle
- Exceptions
-
System.ArgumentNullException Thrown when passed a null to one of the method arguments JhiException Thrown when the operation failed. The specific error resides within the class JhiRet member
Possible error codes | Description |
---|---|
JHI_ERROR_CODE.JHI_INTERNAL_ERROR | Returned if the calling functions return an internal error |
JHI_ERROR_CODE.JHI_SERVICE_UNAVAILABLE | Returned when there is no connection to the JHI service |
JHI_ERROR_CODE.JHI_INVALID_SESSION_HANDLE | The session handle is not valid |
void Intel.Dal.Jhi.CreateSession | ( | string | AppId, |
JHI_SESSION_FLAGS | flags, | ||
byte[] | initBuffer, | ||
out JhiSession | Session | ||
) |
Create a session of an installed applet.
a session handle is retuned by SessionHandle.
- Parameters
-
AppId Applet ID Session Session Handle initBuffer Initialization data passed to the applet onInit function flags session flags used for creation
- Exceptions
-
System.ArgumentNullException Thrown when passed a null to one of the method arguments JhiException Thrown when the operation failed. The specific error resides within the class JhiRet member
Possible error codes | Description |
---|---|
JHI_ERROR_CODE.JHI_INVALID_APPLET_GUID | The applet id is invalid |
JHI_ERROR_CODE.JHI_INTERNAL_ERROR | Returned if the calling functions return an internal error |
JHI_ERROR_CODE.JHI_SERVICE_UNAVAILABLE | Returned when there is no connection to the JHI service |
JHI_ERROR_CODE.JHI_APPLET_FATAL | Returned when the applet session has crashed |
JHI_ERROR_CODE.JHI_INVALID_BUFFER_SIZE | Used a initBuffer that is larger than Jhi.JHI_BUFFER_MAX |
JHI_ERROR_CODE.JHI_APPLET_NOT_INSTALLED | The applet is not installed |
JHI_ERROR_CODE.JHI_MAX_SESSIONS_REACHED | Reached the limit of sessions in FW |
JHI_ERROR_CODE.JHI_SHARED_SESSION_NOT_SUPPORTED | the applet does not support shared sessions |
JHI_ERROR_CODE.JHI_MAX_SHARED_SESSION_REACHED | Reached the limit of handles to the shared session |
void Intel.Dal.Jhi.GetAppletProperty | ( | string | AppId, |
string | Property, | ||
out string | Value | ||
) |
Get a property value of an installed applet
- Parameters
-
AppId The applet uuid Property the property name, wich can be one of the following strings:
Possible applet properties |
---|
applet.name |
applet.vendor |
applet.description |
applet.version |
security.version |
applet.flash.quota |
applet.debug.enable |
applet.shared.session.support |
applet.platform |
- Parameters
-
Value the output value
- Exceptions
-
System.ArgumentNullException Thrown when passed a null to one of the method arguments JhiException Thrown when the operation failed. The specific error resides within the class JhiRet member
Possible error codes | Description |
---|---|
JHI_ERROR_CODE.JHI_INTERNAL_ERROR | Returned if the calling functions return an internal error |
JHI_ERROR_CODE.JHI_SERVICE_UNAVAILABLE | Returned when there is no connection to the JHI service |
JHI_ERROR_CODE.JHI_APPLET_NOT_INSTALLED | The applet is not installed |
JHI_ERROR_CODE.JHI_APPLET_PROPERTY_NOT_SUPPORTED | The property requested is not supported |
JHI_ERROR_CODE.JHI_INVALID_APPLET_GUID | The applet id is invalid |
void Intel.Dal.Jhi.GetSessionInfo | ( | JhiSession | Session, |
out JHI_SESSION_INFO | SessionInfo | ||
) |
Get information of a given session
- Parameters
-
Session Session Handle SessionInfo The session info
- Exceptions
-
System.ArgumentNullException Thrown when passed a null to one of the method arguments JhiException Thrown when the operation failed. The specific error resides within the class JhiRet member
Possible error codes | Description |
---|---|
JHI_ERROR_CODE.JHI_INTERNAL_ERROR | Returned if the calling functions return an internal error |
JHI_ERROR_CODE.JHI_SERVICE_UNAVAILABLE | Returned when there is no connection to the JHI service |
JHI_ERROR_CODE.JHI_INVALID_SESSION_HANDLE | The session handle is not valid |
void Intel.Dal.Jhi.GetSessionsCount | ( | string | AppId, |
out UInt32 | SessionsCount | ||
) |
Get the number of existing sessions of an applet
- Parameters
-
AppId Applet ID SessionsCount The number of sessions
- Exceptions
-
System.ArgumentNullException Thrown when passed a null to one of the method arguments JhiException Thrown when the operation failed. The specific error resides within the class JhiRet member
Possible error codes | Description |
---|---|
JHI_ERROR_CODE.JHI_INTERNAL_ERROR | Returned if the calling functions return an internal error |
JHI_ERROR_CODE.JHI_SERVICE_UNAVAILABLE | Returned when there is no connection to the JHI service |
JHI_ERROR_CODE.JHI_INVALID_APPLET_GUID | The applet id is invalid |
JHI_ERROR_CODE.JHI_APPLET_NOT_INSTALLED | The applet is not installed and does not exist in JHI repository |
void Intel.Dal.Jhi.GetVersionInfo | ( | out JHI_VERSION_INFO | VersionInfo) |
This function is used in order to retrieve global information of JHI such as JHI versions and the FW versions, see the JHI_VERSION_INFO for the specific info retuned.
- Parameters
-
VersionInfo a struct that holds the versions.
- Exceptions
-
JhiException Thrown when the operation failed. The specific error resides within the class JhiRet member
Possible error codes | Description |
---|---|
JHI_ERROR_CODE.JHI_INTERNAL_ERROR | Returned if the calling functions return an internal error |
JHI_ERROR_CODE.JHI_SERVICE_UNAVAILABLE | Returned when there is no connection to the JHI service |
void Intel.Dal.Jhi.Install | ( | string | AppId, |
string | srcFile | ||
) |
Install Applet into the Intel(R) DAL
- Parameters
-
AppId Applet ID srcFile Applet filename Path
- Exceptions
-
System.ArgumentNullException Thrown when passed a null to one of the method arguments JhiException Thrown when the operation failed. The specific error resides within the class JhiRet member
Possible error codes | Description |
---|---|
JHI_ERROR_CODE.JHI_INTERNAL_ERROR | Returned if the calling functions return an internal error |
JHI_ERROR_CODE.JHI_SERVICE_UNAVAILABLE | Returned when there is no connection to the JHI service |
JHI_ERROR_CODE.JHI_FILE_ERROR_COPY | Failed to copy the DALP file to the repository |
JHI_ERROR_CODE.JHI_FILE_NOT_FOUND | The DALP file does not exist |
JHI_ERROR_CODE.JHI_READ_FROM_FILE_FAILED | Failed to open the DALP file for read |
JHI_ERROR_CODE.JHI_INVALID_PACKAGE_FORMAT | The DALP file has invalid format |
JHI_ERROR_CODE.JHI_INSTALL_FAILED | no compatible applet was found in the DALP file |
JHI_ERROR_CODE.JHI_MAX_INSTALLED_APPLETS_REACHED | exceeded max applets allowed |
JHI_ERROR_CODE.JHI_INSTALL_FAILURE_SESSIONS_EXISTS | cannot install while there are active sessions |
JHI_ERROR_CODE.JHI_INVALID_FILE_EXTENSION | Applet files must end with .dalp extension |
JHI_ERROR_CODE.JHI_INVALID_INSTALL_FILE | The applet file path is invalid |
JHI_ERROR_CODE.JHI_INVALID_APPLET_GUID | The applet id is invalid |
|
static |
Extract Applet Major Version from a VM integer representation (num)
- Parameters
-
num applet version in VM integer representation
- Returns
- Applet Major Version
|
static |
While applet version is represented in a Major.Minor format (i.e.
1.0) the VM repersntation of an applet version (that can be obtained using JHI_GetAppletProperty) is as an integer that combine both major and minor version. in order to perform the transition between to two representation we offer the following macros: This function create a VM Applet Version (32bit) from a Major.Minor formatBits: 00-07 - Major 08-15 - Minor 15-31 – Reserved (All Zero)
- Parameters
-
maj Applet Major Version min Applet Minor Version
- Returns
- the applet version in VM format (integer)
|
static |
Extract Applet Minor Version from a VM integer representation (num)
- Parameters
-
num applet version in VM integer representation
- Returns
- Applet Minor Version
void Intel.Dal.Jhi.RegisterEvents | ( | JhiSession | Session, |
Intel.Dal.JHI_CallbackFunction | CallbackFunction | ||
) |
Registers registration of one callback function to receive events from a given session
- Parameters
-
Session Session Handle CallbackFunction The Callback function
- Exceptions
-
System.ArgumentNullException Thrown when passed a null to one of the method arguments JhiException Thrown when the operation failed. The specific error resides within the class JhiRet member
Possible error codes | Description |
---|---|
JHI_ERROR_CODE.JHI_INTERNAL_ERROR | Returned if the calling functions return an internal error |
JHI_ERROR_CODE.JHI_SERVICE_UNAVAILABLE | Returned when there is no connection to the JHI service |
JHI_ERROR_CODE.JHI_SESSION_ALREADY_REGSITERED | The session is already registered for events |
JHI_ERROR_CODE.JHI_INVALID_SESSION_HANDLE | The session handle is not valid |
JHI_ERROR_CODE.JHI_EVENTS_NOT_SUPPORTED | Events are not supported for this type of session |
void Intel.Dal.Jhi.SendAndRecv2 | ( | JhiSession | Session, |
Int32 | nCommandId, | ||
byte[] | InBuf, | ||
ref byte[] | OutBuf, | ||
out Int32 | ResponseCode | ||
) |
send and receive data from the application to an applet session
- Parameters
-
Session Session Handle nCommandId Command ID to send the data to InBuf Input Data OutBuf Output Data ResponseCode an error code that is returned from the applet
- Exceptions
-
System.ArgumentNullException Thrown when passed a null to the Session argument JhiInsufficientBufferException Thrown when OutBuf is too short to contain the response. The required size reside within the class Required_size member JhiException Thrown when the operation failed. The specific error resides within the class JhiRet member
Possible error codes | Description |
---|---|
JHI_ERROR_CODE.JHI_INTERNAL_ERROR | Returned if the calling functions return an internal error |
JHI_ERROR_CODE.JHI_SERVICE_UNAVAILABLE | Returned when there is no connection to the JHI service |
JHI_ERROR_CODE.JHI_INVALID_SESSION_HANDLE | The session handle is not valid |
JHI_ERROR_CODE.JHI_APPLET_FATAL | Returned when the applet session has crashed |
JHI_ERROR_CODE.JHI_INVALID_BUFFER_SIZE | Used a buffer that is larger than Jhi.JHI_BUFFER_MAX |
void Intel.Dal.Jhi.Uninstall | ( | string | AppId) |
Uninstall applet from the Intel(R) DAL
- Parameters
-
AppId Applet ID
- Exceptions
-
System.ArgumentNullException Thrown when passed a null to one of the method arguments JhiException Thrown when the operation failed. The specific error resides within the class JhiRet member
Possible error codes | Description |
---|---|
JHI_ERROR_CODE.JHI_INVALID_APPLET_GUID | The applet id is invalid |
JHI_ERROR_CODE.JHI_INTERNAL_ERROR | Returned if the calling functions return an internal error |
JHI_ERROR_CODE.JHI_SERVICE_UNAVAILABLE | Returned when there is no connection to the JHI service |
JHI_ERROR_CODE.JHI_UNINSTALL_FAILURE_SESSIONS_EXISTS | Cannot uninstall applet while sessions exists |
JHI_ERROR_CODE.JHI_DELETE_FROM_REPOSITORY_FAILURE | Failed to remove the applet file form the repository |
JHI_ERROR_CODE.JHI_APPLET_NOT_INSTALLED | The applet is not installed |
void Intel.Dal.Jhi.UnRegisterEvents | ( | JhiSession | Session) |
Remove registration of events from a given session
- Parameters
-
Session Session Handle
- Exceptions
-
System.ArgumentNullException Thrown when passed a null to one of the method arguments JhiException Thrown when the operation failed. The specific error resides within the class JhiRet member
Possible error codes | Description |
---|---|
JHI_ERROR_CODE.JHI_INTERNAL_ERROR | Returned if the calling functions return an internal error |
JHI_ERROR_CODE.JHI_SERVICE_UNAVAILABLE | Returned when there is no connection to the JHI service |
JHI_ERROR_CODE.JHI_SESSION_NOT_REGISTERED | The session wasn’t registered for events |
JHI_ERROR_CODE.JHI_INVALID_SESSION_HANDLE | The session handle is not valid |
Member Data Documentation
const int Intel.Dal.Jhi.JHI_BUFFER_MAX = 2097152 |
Buffer size limitation in JHI requests is 2MB, JHI will not accept any buffer with greater size.
Note that this size limitiation does not mark the maximum buffer size an applet can recieve, applet max buffer size changes from one applet to another.
This applies for all JHI API function that use buffers such as: Jhi.SendAndRecv2, Jhi.CreateSession.
Property Documentation
|
staticgetset |
This flags is used in order to disable JHI.DLL signature validation.
Warning: Production applications should not use this flag and leave it as is. Disabling JHI.DLL signature validation will result with a security hole since the JhiSharp might load a malicious DLL.
|
staticget |
An instance of the JHI singelton class.
The first call to this member will invoke JHI initialization, in case of error JhiException is thrown.
- Exceptions
-
JhiException Thrown when JHI initialization failed. The specific error resides within the class JhiRet member
Possible error codes | Description |
---|---|
JHI_ERROR_CODE.JHI_INTERNAL_ERROR | Returned if the calling functions return an internal error |
JHI_ERROR_CODE.JHI_SERVICE_UNAVAILABLE | Returned when there is no connection to the JHI service |
JHI_ERROR_CODE.JHI_ERROR_REGISTRY | JHI failed to read/write form the registry |
JHI_ERROR_CODE.JHI_ERROR_REPOSITORY_NOT_FOUND | The applets repository directory wasn’t found |
JHI_ERROR_CODE.JHI_SPOOLER_NOT_FOUND | The spooler applet file wasn’t found |
JHI_ERROR_CODE.JHI_INVALID_SPOOLER | Cannot download spooler / create an instance of the spooler |