TIBCO eFTL™
|
This file defines the eFTL API. More...
Data Structures | |
struct | tibeftlOptions |
eFTL options. More... | |
struct | tibeftlSubscriptionOptions |
Subscription options. More... | |
Macros | |
#define | TIBEFTL_FIELD_NAME_DESTINATION "_dest" |
Message field name identifying the destination of a message. More... | |
#define | tibeftlOptionsDefault { 0, NULL, NULL, NULL, NULL, 10000, 5, 30000 } |
#define | tibeftlSubscriptionOptionsDefault { NULL, NULL } |
Error Codes | |
Error codes returned by eFTL. | |
#define | TIBEFTL_ERR_OK (0) |
No error has been reported. More... | |
#define | TIBEFTL_ERR_INVALID_ARG (1) |
Invalid argument. More... | |
#define | TIBEFTL_ERR_NO_MEMORY (2) |
Memory allocation failed. More... | |
#define | TIBEFTL_ERR_TIMEOUT (3) |
Request timeout. More... | |
#define | TIBEFTL_ERR_NOT_FOUND (4) |
Item not found. More... | |
#define | TIBEFTL_ERR_INVALID_TYPE (5) |
Item of wrong type. More... | |
#define | TIBEFTL_ERR_NOT_CONNECTED (8) |
Not connected. More... | |
#define | TIBEFTL_ERR_CONNECTION_LOST (9) |
Connection lost. More... | |
#define | TIBEFTL_ERR_CONNECT_FAILED (10) |
Connect failed. More... | |
#define | TIBEFTL_ERR_PUBLISH_FAILED (11) |
Publish failed. More... | |
#define | TIBEFTL_ERR_PUBLISH_NOT_AUTHORIZED (12) |
Publish failed, not authorized. More... | |
#define | TIBEFTL_ERR_SUBSCRIPTION_NOT_AUTHORIZED (13) |
Subscription failed, not authorized. More... | |
#define | TIBEFTL_ERR_SUBSCRIPTION_FAILED (21) |
Subscription failed. More... | |
#define | TIBEFTL_ERR_SUBSCRIPTION_INVALID (22) |
Subscription failed, invalid matcher or durable. More... | |
#define | TIBEFTL_ERR_GOING_AWAY (1001) |
Server is shutting down. More... | |
#define | TIBEFTL_ERR_MESSAGE_TOO_BIG (1009) |
Published message is too big. More... | |
#define | TIBEFTL_ERR_FORCE_CLOSE (4000) |
Server closed the connection. More... | |
#define | TIBEFTL_ERR_UNAVAILABLE (4001) |
Server is temporarily unavailable. More... | |
#define | TIBEFTL_ERR_AUTHENTICATION (4002) |
Authentication failed. More... | |
Typedefs | |
typedef struct tibeftlConnectionStruct * | tibeftlConnection |
eFTL connection. More... | |
typedef struct tibeftlErrStruct * | tibeftlErr |
eFTL error. More... | |
typedef void(* | tibeftlErrorCallback) (tibeftlConnection conn, tibeftlErr err, void *arg) |
Connection error callback. More... | |
typedef struct tibeftlMessageStruct * | tibeftlMessage |
eFTL message. More... | |
typedef void(* | tibeftlMessageCallback) (tibeftlConnection conn, tibeftlSubscription sub, int cnt, tibeftlMessage *msg, void *arg) |
Message callback. More... | |
typedef struct tibeftlSubscriptionStruct * | tibeftlSubscription |
eFTL subscription. More... | |
Functions | |
DLL_EXPORT tibeftlConnection | tibeftl_Connect (tibeftlErr err, const char *url, tibeftlOptions *opts, tibeftlErrorCallback errCb, void *errCbArg) |
Connect to the server. More... | |
DLL_EXPORT void | tibeftl_Disconnect (tibeftlErr err, tibeftlConnection conn) |
Disconnect from the server and free all resources associated with the connection. More... | |
DLL_EXPORT bool | tibeftl_IsConnected (tibeftlErr err, tibeftlConnection conn) |
Check whether or not there is a connection to the server. More... | |
DLL_EXPORT void | tibeftl_Publish (tibeftlErr err, tibeftlConnection conn, tibeftlMessage msg) |
Publish a message to all subscribing clients. More... | |
DLL_EXPORT void | tibeftl_Reconnect (tibeftlErr err, tibeftlConnection conn) |
Reconnect to the server. More... | |
DLL_EXPORT tibeftlSubscription | tibeftl_Subscribe (tibeftlErr err, tibeftlConnection conn, const char *matcher, const char *durable, tibeftlMessageCallback msgCb, void *msgCbArg) |
Subscribe to messages. More... | |
DLL_EXPORT tibeftlSubscription | tibeftl_SubscribeWithOptions (tibeftlErr err, tibeftlConnection conn, const char *matcher, const char *durable, tibeftlSubscriptionOptions *opts, tibeftlMessageCallback msgCb, void *msgCbArg) |
Subscribe to messages. More... | |
DLL_EXPORT void | tibeftl_Unsubscribe (tibeftlErr err, tibeftlConnection conn, tibeftlSubscription sub) |
Unsubscribe from messages and free all resources associated with the subscription. More... | |
DLL_EXPORT void | tibeftl_UnsubscribeAll (tibeftlErr err, tibeftlConnection conn) |
Unsubscribe from all messages and free all resources associated with all subscriptions. More... | |
DLL_EXPORT const char * | tibeftl_Version (void) |
Version string of the eFTL library. More... | |
DLL_EXPORT void | tibeftlErr_Clear (tibeftlErr err) |
Clear an error. More... | |
DLL_EXPORT tibeftlErr | tibeftlErr_Create (void) |
Create an error object. More... | |
DLL_EXPORT void | tibeftlErr_Destroy (tibeftlErr err) |
Destroy an error object. More... | |
DLL_EXPORT int | tibeftlErr_GetCode (tibeftlErr err) |
Get the error code. More... | |
DLL_EXPORT const char * | tibeftlErr_GetDescription (tibeftlErr err) |
Get the error description. More... | |
DLL_EXPORT bool | tibeftlErr_IsSet (tibeftlErr err) |
Check if an error has been set. More... | |
DLL_EXPORT void | tibeftlErr_Set (tibeftlErr err, int code, const char *desc) |
Set an error. More... | |
DLL_EXPORT void | tibeftlMessage_ClearAllFields (tibeftlErr err, tibeftlMessage msg) |
Clear all fields from a message. More... | |
DLL_EXPORT void | tibeftlMessage_ClearField (tibeftlErr err, tibeftlMessage msg, const char *field) |
Clear a field from a message. More... | |
DLL_EXPORT tibeftlMessage | tibeftlMessage_Create (tibeftlErr err) |
Create a message object. More... | |
DLL_EXPORT void | tibeftlMessage_Destroy (tibeftlErr err, tibeftlMessage msg) |
Destroy a message object. More... | |
DLL_EXPORT void * | tibeftlMessage_GetArray (tibeftlErr err, tibeftlMessage msg, tibeftlFieldType type, const char *field, int *size) |
Get an array field from a message. More... | |
DLL_EXPORT double | tibeftlMessage_GetDouble (tibeftlErr err, tibeftlMessage msg, const char *field) |
Get a double field from a message. More... | |
DLL_EXPORT tibeftlFieldType | tibeftlMessage_GetFieldType (tibeftlErr err, tibeftlMessage msg, const char *field) |
Get the type of a field in a message. More... | |
DLL_EXPORT int64_t | tibeftlMessage_GetLong (tibeftlErr err, tibeftlMessage msg, const char *field) |
Get a long field from a message. More... | |
DLL_EXPORT tibeftlMessage | tibeftlMessage_GetMessage (tibeftlErr err, tibeftlMessage msg, const char *field) |
Get a message field from a message. More... | |
DLL_EXPORT void * | tibeftlMessage_GetOpaque (tibeftlErr err, tibeftlMessage msg, const char *field, size_t *size) |
Get an opaque field from a message. More... | |
DLL_EXPORT const char * | tibeftlMessage_GetString (tibeftlErr err, tibeftlMessage msg, const char *field) |
Get a string field from a message. More... | |
DLL_EXPORT int64_t | tibeftlMessage_GetTime (tibeftlErr err, tibeftlMessage msg, const char *field) |
Get a time field from a message. More... | |
DLL_EXPORT bool | tibeftlMessage_IsFieldSet (tibeftlErr err, tibeftlMessage msg, const char *field) |
Check whether a field is set in a message. More... | |
DLL_EXPORT bool | tibeftlMessage_NextField (tibeftlErr err, tibeftlMessage msg, const char **field, tibeftlFieldType *type) |
Get the next field in a message. More... | |
DLL_EXPORT void | tibeftlMessage_SetArray (tibeftlErr err, tibeftlMessage msg, tibeftlFieldType type, const char *field, const void *const value, int size) |
Set an array field in a message. More... | |
DLL_EXPORT void | tibeftlMessage_SetDouble (tibeftlErr err, tibeftlMessage msg, const char *field, double value) |
Set a double field in a message. More... | |
DLL_EXPORT void | tibeftlMessage_SetLong (tibeftlErr err, tibeftlMessage msg, const char *field, int64_t value) |
Set a long field in a message. More... | |
DLL_EXPORT void | tibeftlMessage_SetMessage (tibeftlErr err, tibeftlMessage msg, const char *field, tibeftlMessage value) |
Set a message field in a message. More... | |
DLL_EXPORT void | tibeftlMessage_SetOpaque (tibeftlErr err, tibeftlMessage msg, const char *field, void *value, size_t size) |
Set an opaque field in a message. More... | |
DLL_EXPORT void | tibeftlMessage_SetString (tibeftlErr err, tibeftlMessage msg, const char *field, const char *value) |
Set a string field in a message. More... | |
DLL_EXPORT void | tibeftlMessage_SetTime (tibeftlErr err, tibeftlMessage msg, const char *field, int64_t value) |
Set a time field in a message. More... | |
DLL_EXPORT size_t | tibeftlMessage_ToString (tibeftlErr err, tibeftlMessage msg, char *buffer, size_t size) |
Get a printable string that describes the contents of a message. More... | |
This file defines the eFTL API.
#define TIBEFTL_ERR_AUTHENTICATION (4002) |
Authentication failed.
#define TIBEFTL_ERR_CONNECT_FAILED (10) |
Connect failed.
#define TIBEFTL_ERR_CONNECTION_LOST (9) |
Connection lost.
#define TIBEFTL_ERR_FORCE_CLOSE (4000) |
Server closed the connection.
#define TIBEFTL_ERR_GOING_AWAY (1001) |
Server is shutting down.
#define TIBEFTL_ERR_INVALID_ARG (1) |
Invalid argument.
#define TIBEFTL_ERR_INVALID_TYPE (5) |
Item of wrong type.
#define TIBEFTL_ERR_MESSAGE_TOO_BIG (1009) |
Published message is too big.
#define TIBEFTL_ERR_NO_MEMORY (2) |
Memory allocation failed.
#define TIBEFTL_ERR_NOT_CONNECTED (8) |
Not connected.
#define TIBEFTL_ERR_NOT_FOUND (4) |
Item not found.
#define TIBEFTL_ERR_OK (0) |
No error has been reported.
#define TIBEFTL_ERR_PUBLISH_FAILED (11) |
Publish failed.
#define TIBEFTL_ERR_PUBLISH_NOT_AUTHORIZED (12) |
Publish failed, not authorized.
#define TIBEFTL_ERR_SUBSCRIPTION_FAILED (21) |
Subscription failed.
#define TIBEFTL_ERR_SUBSCRIPTION_INVALID (22) |
Subscription failed, invalid matcher or durable.
#define TIBEFTL_ERR_SUBSCRIPTION_NOT_AUTHORIZED (13) |
Subscription failed, not authorized.
#define TIBEFTL_ERR_TIMEOUT (3) |
Request timeout.
#define TIBEFTL_ERR_UNAVAILABLE (4001) |
Server is temporarily unavailable.
#define TIBEFTL_FIELD_NAME_DESTINATION "_dest" |
Message field name identifying the destination of a message.
To publish a message on a specific destination include this message field using tibeftlMessage_SetString().
To subscribe to messages published on a specific destination, use a subscription matcher that includes this message field name in tibeftl_Subscribe().
#define tibeftlOptionsDefault { 0, NULL, NULL, NULL, NULL, 10000, 5, 30000 } |
#define tibeftlSubscriptionOptionsDefault { NULL, NULL } |
typedef struct tibeftlConnectionStruct* tibeftlConnection |
eFTL connection.
A tibeftlConnection object represents the connection to the server.
typedef struct tibeftlErrStruct* tibeftlErr |
eFTL error.
A tibeftlErr object is passed to function calls to capture information about failures.
typedef void(* tibeftlErrorCallback) (tibeftlConnection conn, tibeftlErr err, void *arg) |
Connection error callback.
A connection error callback is invoked whenever an error occurs on the connection. When the connection to the server is lost, tibeftl_Reconnect() can be called from within this callback to attempt a reconnect to the server.
conn | The connection on which the error occurred. |
err | The connection error. |
arg | The callback-specific argument. |
typedef struct tibeftlMessageStruct* tibeftlMessage |
eFTL message.
A tibeftlMessage object is used to send information between clients.
typedef void(* tibeftlMessageCallback) (tibeftlConnection conn, tibeftlSubscription sub, int cnt, tibeftlMessage *msg, void *arg) |
Message callback.
A message callback is invoked whenever messages are received that matche a subscription.
conn | The connection on which the message was received. |
sub | The subscription associated with the message. |
cnt | The number of received messages. |
msg | The array of received messages. |
arg | The callback-specific argument. |
typedef struct tibeftlSubscriptionStruct* tibeftlSubscription |
eFTL subscription.
A tibeftlSubscription object represents an interest in receiving messages with particular content.
enum tibeftlFieldType |
eFTL message field types.
DLL_EXPORT tibeftlConnection tibeftl_Connect | ( | tibeftlErr | err, |
const char * | url, | ||
tibeftlOptions * | opts, | ||
tibeftlErrorCallback | errCb, | ||
void * | errCbArg | ||
) |
Connect to the server.
Creates a connection to the server.
The server URL has the syntax:
ws://host
:port/channel wss://host
:port/channel
Optionally, the URL can contain the username, password, and/or client identifier:
ws://username
:password:port/channel?clientId=<identifier> wss://username
:password:port/channel?clientId=<identifier>
err | An eFTL error to capture information about failures. |
url | The URL of the server. |
opts | (optional) The options to use when creating the connection. |
errCb | (optional) The error callback to be invoked when connection errors occur. |
errCbArg | (optional) The error callback argument. |
DLL_EXPORT void tibeftl_Disconnect | ( | tibeftlErr | err, |
tibeftlConnection | conn | ||
) |
Disconnect from the server and free all resources associated with the connection.
err | An eFTL error to capture information about failures. |
conn | The connection object. |
DLL_EXPORT bool tibeftl_IsConnected | ( | tibeftlErr | err, |
tibeftlConnection | conn | ||
) |
Check whether or not there is a connection to the server.
err | An eFTL error to capture information about failures. |
conn | The connection object. |
true
if there is a connection to the server, false
otherwise. DLL_EXPORT void tibeftl_Publish | ( | tibeftlErr | err, |
tibeftlConnection | conn, | ||
tibeftlMessage | msg | ||
) |
Publish a message to all subscribing clients.
It is good practice to direct messages to specific destinations by adding a message string field with the name TIBEFTL_FIELD_NAME_DESTINATION.; for example:
err | An eFTL error to capture information about failures. |
conn | The connection object. |
msg | The message to publish. |
DLL_EXPORT void tibeftl_Reconnect | ( | tibeftlErr | err, |
tibeftlConnection | conn | ||
) |
Reconnect to the server.
Can be called from within the tibeftlErrorCallback.
All subscriptions are restored following a successful reconnect.
err | An eFTL error to capture information about failures. |
conn | The connection object. |
DLL_EXPORT tibeftlSubscription tibeftl_Subscribe | ( | tibeftlErr | err, |
tibeftlConnection | conn, | ||
const char * | matcher, | ||
const char * | durable, | ||
tibeftlMessageCallback | msgCb, | ||
void * | msgCbArg | ||
) |
Subscribe to messages.
A subscription can be narrowed by using a matcher that matches only those messages whose content is of interest.
It is good practice to subscribe to messages published to specific destinations by using the message field name TIBEFTL_FIELD_NAME_DESTINATION in the matcher; for example:
err | An eFTL error to capture information about failures. |
conn | The connection object. |
matcher | (optional) The matcher for selecting which messages to receive. |
durable | (optional) The name to use when creating durable subscriptions. |
msgCb | The message callback to be invoked when messages are received. |
msgCbArg | The message callback argument. |
DLL_EXPORT tibeftlSubscription tibeftl_SubscribeWithOptions | ( | tibeftlErr | err, |
tibeftlConnection | conn, | ||
const char * | matcher, | ||
const char * | durable, | ||
tibeftlSubscriptionOptions * | opts, | ||
tibeftlMessageCallback | msgCb, | ||
void * | msgCbArg | ||
) |
Subscribe to messages.
A subscription can be narrowed by using a matcher that matches only those messages whose content is of interest.
err | An eFTL error to capture information about failures. |
conn | The connection object. |
matcher | (optional) The matcher for selecting which messages to receive. |
durable | (optional) The name to use when creating durable subscriptions. |
msgCb | The message callback to be invoked when messages are received. |
msgCbArg | The message callback argument. |
DLL_EXPORT void tibeftl_Unsubscribe | ( | tibeftlErr | err, |
tibeftlConnection | conn, | ||
tibeftlSubscription | sub | ||
) |
Unsubscribe from messages and free all resources associated with the subscription.
err | An eFTL error to capture information about failures. |
conn | The connection object. |
sub | The subscription from which to unsubscribe. |
DLL_EXPORT void tibeftl_UnsubscribeAll | ( | tibeftlErr | err, |
tibeftlConnection | conn | ||
) |
Unsubscribe from all messages and free all resources associated with all subscriptions.
err | An eFTL error to capture information about failures. |
conn | The connection object. |
DLL_EXPORT const char* tibeftl_Version | ( | void | ) |
Version string of the eFTL library.
DLL_EXPORT void tibeftlErr_Clear | ( | tibeftlErr | err | ) |
Clear an error.
err | The error object. |
DLL_EXPORT tibeftlErr tibeftlErr_Create | ( | void | ) |
Create an error object.
DLL_EXPORT void tibeftlErr_Destroy | ( | tibeftlErr | err | ) |
Destroy an error object.
err | The error object. |
DLL_EXPORT int tibeftlErr_GetCode | ( | tibeftlErr | err | ) |
Get the error code.
err | The error object. |
DLL_EXPORT const char* tibeftlErr_GetDescription | ( | tibeftlErr | err | ) |
Get the error description.
err | The error object. |
DLL_EXPORT bool tibeftlErr_IsSet | ( | tibeftlErr | err | ) |
Check if an error has been set.
err | The error object. |
true
if the error is set, false
otherwise. DLL_EXPORT void tibeftlErr_Set | ( | tibeftlErr | err, |
int | code, | ||
const char * | desc | ||
) |
Set an error.
err | The error object. |
code | The error code. |
desc | The error description. |
DLL_EXPORT void tibeftlMessage_ClearAllFields | ( | tibeftlErr | err, |
tibeftlMessage | msg | ||
) |
Clear all fields from a message.
err | An eFTL error to capture information about failures. |
msg | The message object. |
DLL_EXPORT void tibeftlMessage_ClearField | ( | tibeftlErr | err, |
tibeftlMessage | msg, | ||
const char * | field | ||
) |
Clear a field from a message.
err | An eFTL error to capture information about failures. |
msg | The message object. |
field | The name of the field to clear. |
DLL_EXPORT tibeftlMessage tibeftlMessage_Create | ( | tibeftlErr | err | ) |
Create a message object.
err | An eFTL error to capture information about failures. |
DLL_EXPORT void tibeftlMessage_Destroy | ( | tibeftlErr | err, |
tibeftlMessage | msg | ||
) |
Destroy a message object.
err | An eFTL error to capture information about failures. |
msg | The message object. |
DLL_EXPORT void* tibeftlMessage_GetArray | ( | tibeftlErr | err, |
tibeftlMessage | msg, | ||
tibeftlFieldType | type, | ||
const char * | field, | ||
int * | size | ||
) |
Get an array field from a message.
The returned array is valid only for the lifetime of the message. The returned array must not be modified or freed.
err | An eFTL error to capture information about failures. |
msg | The message object. |
type | The field type to get. |
field | The name of the field to get. |
size | The number of elements in the array. |
DLL_EXPORT double tibeftlMessage_GetDouble | ( | tibeftlErr | err, |
tibeftlMessage | msg, | ||
const char * | field | ||
) |
Get a double field from a message.
err | An eFTL error to capture information about failures. |
msg | The message object. |
field | The name of the field to get. |
DLL_EXPORT tibeftlFieldType tibeftlMessage_GetFieldType | ( | tibeftlErr | err, |
tibeftlMessage | msg, | ||
const char * | field | ||
) |
Get the type of a field in a message.
err | An eFTL error to capture information about failures. |
msg | The message object. |
field | The field name. |
DLL_EXPORT int64_t tibeftlMessage_GetLong | ( | tibeftlErr | err, |
tibeftlMessage | msg, | ||
const char * | field | ||
) |
Get a long field from a message.
err | An eFTL error to capture information about failures. |
msg | The message object. |
field | The name of the field to get. |
DLL_EXPORT tibeftlMessage tibeftlMessage_GetMessage | ( | tibeftlErr | err, |
tibeftlMessage | msg, | ||
const char * | field | ||
) |
Get a message field from a message.
The returned message is valid only for the lifetime of the message. The returned message must not be modified or freed.
err | An eFTL error to capture information about failures. |
msg | The message object. |
field | The name of the field to get. |
DLL_EXPORT void* tibeftlMessage_GetOpaque | ( | tibeftlErr | err, |
tibeftlMessage | msg, | ||
const char * | field, | ||
size_t * | size | ||
) |
Get an opaque field from a message.
The returned opaque is valid only for the lifetime of the message. The returned opaque must not be modified or freed.
err | An eFTL error to capture information about failures. |
msg | The message object. |
field | The name of the field to get. |
size | The size of the field in bytes. |
DLL_EXPORT const char* tibeftlMessage_GetString | ( | tibeftlErr | err, |
tibeftlMessage | msg, | ||
const char * | field | ||
) |
Get a string field from a message.
The returned string is valid only for the lifetime of the message. The returned string must not be modified or freed.
err | An eFTL error to capture information about failures. |
msg | The message object. |
field | The name of the field to get. |
DLL_EXPORT int64_t tibeftlMessage_GetTime | ( | tibeftlErr | err, |
tibeftlMessage | msg, | ||
const char * | field | ||
) |
Get a time field from a message.
Time is the number of milliseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
err | An eFTL error to capture information about failures. |
msg | The message object. |
field | The name of the field to get. |
DLL_EXPORT bool tibeftlMessage_IsFieldSet | ( | tibeftlErr | err, |
tibeftlMessage | msg, | ||
const char * | field | ||
) |
Check whether a field is set in a message.
err | An eFTL error to capture information about failures. |
msg | The message object. |
field | The field name. |
true
if the field is set, false
otherwise. DLL_EXPORT bool tibeftlMessage_NextField | ( | tibeftlErr | err, |
tibeftlMessage | msg, | ||
const char ** | field, | ||
tibeftlFieldType * | type | ||
) |
Get the next field in a message.
Calling this function repeatedly will iterate over all of the fields in a message.
err | An eFTL error to capture information about failures. |
msg | The message object. |
field | The name of the next field. |
type | The type of the next field. |
true
if there are additional fields, false
if the current field is the last field. DLL_EXPORT void tibeftlMessage_SetArray | ( | tibeftlErr | err, |
tibeftlMessage | msg, | ||
tibeftlFieldType | type, | ||
const char * | field, | ||
const void *const | value, | ||
int | size | ||
) |
Set an array field in a message.
err | An eFTL error to capture information about failures. |
msg | The message object. |
type | The type of the field to set. |
field | The name of the field to set. |
value | The value of the field to set. |
size | The number of elements in the array. |
DLL_EXPORT void tibeftlMessage_SetDouble | ( | tibeftlErr | err, |
tibeftlMessage | msg, | ||
const char * | field, | ||
double | value | ||
) |
Set a double field in a message.
err | An eFTL error to capture information about failures. |
msg | The message object. |
field | The name of the field to set. |
value | The value of the field to set. |
DLL_EXPORT void tibeftlMessage_SetLong | ( | tibeftlErr | err, |
tibeftlMessage | msg, | ||
const char * | field, | ||
int64_t | value | ||
) |
Set a long field in a message.
err | An eFTL error to capture information about failures. |
msg | The message object. |
field | The name of the field to set. |
value | The value of the field to set. |
DLL_EXPORT void tibeftlMessage_SetMessage | ( | tibeftlErr | err, |
tibeftlMessage | msg, | ||
const char * | field, | ||
tibeftlMessage | value | ||
) |
Set a message field in a message.
err | An eFTL error to capture information about failures. |
msg | The message object. |
field | The name of the field to set. |
value | The value of the field to set. |
DLL_EXPORT void tibeftlMessage_SetOpaque | ( | tibeftlErr | err, |
tibeftlMessage | msg, | ||
const char * | field, | ||
void * | value, | ||
size_t | size | ||
) |
Set an opaque field in a message.
err | An eFTL error to capture information about failures. |
msg | The message object. |
field | The name of the field to set. |
value | The value of the field to set. |
size | The size of the field to set in bytes. |
DLL_EXPORT void tibeftlMessage_SetString | ( | tibeftlErr | err, |
tibeftlMessage | msg, | ||
const char * | field, | ||
const char * | value | ||
) |
Set a string field in a message.
err | An eFTL error to capture information about failures. |
msg | The message object. |
field | The name of the field to set. |
value | The value of the field to set. |
DLL_EXPORT void tibeftlMessage_SetTime | ( | tibeftlErr | err, |
tibeftlMessage | msg, | ||
const char * | field, | ||
int64_t | value | ||
) |
Set a time field in a message.
Time is the number of milliseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
err | An eFTL error to capture information about failures. |
msg | The message object. |
field | The name of the field to set. |
value | The value of the field to set. |
DLL_EXPORT size_t tibeftlMessage_ToString | ( | tibeftlErr | err, |
tibeftlMessage | msg, | ||
char * | buffer, | ||
size_t | size | ||
) |
Get a printable string that describes the contents of a message.
err | An eFTL error to capture information about failures. |
msg | The message object. |
buffer | (optional) The buffer into which the printable string is stored. |
size | The size of the buffer in bytes. |
NULL
character, in bytes.