Neonode zForce(TM) SDK
|
Go to the source code of this file.
Classes | |
struct | Transport |
Transport struct. This structure represents the base class of all Transport definitions. More... | |
Typedefs | |
typedef enum ReadWriteThreadStatus | ReadWriteThreadStatus |
typedef struct TransportEntry | TransportEntry |
typedef struct Transport | Transport |
Enumerations | |
enum | ReadWriteThreadStatus { ThreadIsNotRunning , ThreadIsInitializing , ThreadIsRunning , ThreadIsTerminating } |
Enum describing the current status of a Read or Write thread. More... | |
Functions | |
DLLEXTERNAL Transport * | Transport_GetInstance (Connection *connection, char *connectionString, char *dataFrameType) |
Transport factory function. More... | |
DLLEXTERNAL bool | Transport_AddTransport (TransportEntry *transportEntry) |
Add a new Transport to the list of those available. More... | |
DLLINTERNAL bool | Transport_Initialize (void) |
Initialize the Transport module. More... | |
DLLINTERNAL void | Transport_Uninitialize (void) |
Uninitialize the Transport module. More... | |
Transport Base class.
This module implements the Transport base class. Here we find all that is essential for a Transport.
typedef enum ReadWriteThreadStatus ReadWriteThreadStatus |
typedef struct TransportEntry TransportEntry |
DLLEXTERNAL bool Transport_AddTransport | ( | TransportEntry * | transportEntry | ) |
Add a new Transport to the list of those available.
This is the method used to find inform the zForce SDK of Transports which can be used for communication.
On failure, errno is set.
transportEntry | The description of the Transport to add. |
DLLEXTERNAL Transport* Transport_GetInstance | ( | Connection * | connection, |
char * | connectionString, | ||
char * | dataFrameType | ||
) |
Transport factory function.
This is the Transport class factory function. A new Transport structure is allocated and if this succeeds the fields of the structure are populated using the arguments passed to the constructor.
On failure, errno is set.
connection | A pointer to the Connection instance that will be used with this Transport. |
connectionString | A pointer to a NULL terminated char string holding a unique human readable identifer. The contents of the string are copied to the Transport structure. The length of the string as measured by strlen should be at most TRANSPORTPROTOCOL_MaxEntryNameLength chars. |
dataFrameType | An identifying string that determines the type of data frames this Transport should traffic in. |
DLLINTERNAL bool Transport_Initialize | ( | void | ) |
Initialize the Transport module.
Perform the initialization of the Transport module.
On failure, errno is set.
DLLINTERNAL void Transport_Uninitialize | ( | void | ) |