StreamLinkforC  7.0.3-308369
Publishing data to the Liberator

Data Structures

struct  sl_commandlistener
 Defines the interface that should be satisfied to receive information on publishing success and failure. More...
 

Typedefs

typedef struct sl_subscription_s sl_command
 Opaque handle that represents a (persistent) command.
 

Enumerations

Functions

void sl_cancel_persistence (streamlink *client, sl_command *sub)
 Cancel persistence for a command. More...
 
sl_commandsl_publish (streamlink *client, const char *subject, sl_fieldlist *fields, sl_commandlistener *listener, void *ctx)
 Publish information for a given subject. More...
 
sl_commandsl_publish_bytime (streamlink *client, const char *subject, time_t bytime, sl_fieldlist *fields, sl_commandlistener *listener, void *ctx)
 Publish information for a given subject. More...
 
sl_commandsl_publish_persist (streamlink *client, const char *subject, sl_command_persistence persist_mode, sl_fieldlist *fields, sl_commandlistener *listener, void *ctx)
 Publish information for a given subject. More...
 

Detailed Description

Enumeration Type Documentation

Enumeration that defines the persistence strategy.

Enumerator
sl_PERSISTENT_NONE 

No persistence

sl_PERSISTENT_BEFORE 

Persistent before requests

sl_PERSISTENT_AFTER 

Persistent after requests

sl_PERSISTENT_CANCEL 

Do not reissue after a reconnect

sl_PERSISTENT_TIMED 

Do not submit if after a time

Function Documentation

void sl_cancel_persistence ( streamlink client,
sl_command sub 
)

Cancel persistence for a command.

Parameters
client- The StreamLink client
sub- The subscription to unsubscribe from
sl_command* sl_publish ( streamlink client,
const char *  subject,
sl_fieldlist fields,
sl_commandlistener listener,
void *  ctx 
)

Publish information for a given subject.

Parameters
client- The StreamLink client
subject- The subject to publish information to
fields- A collection of field and value data to publish
listener- A listener which will receive success/failure messages for this publishing attemp
ctx- User callback context which will passed to the listener
Note
The library does not take ownership of the memory passed into this function, it is the callers responsibility to release the memory used by the fields parameter.
The library does not copy the contents of listener, thus it should not be modified or unexpected effects may occur.
See also
sl_fieldlist_new()
sl_fieldlist_delete()
sl_command* sl_publish_bytime ( streamlink client,
const char *  subject,
time_t  bytime,
sl_fieldlist fields,
sl_commandlistener listener,
void *  ctx 
)

Publish information for a given subject.

Parameters
client- The StreamLink client
subject- The subject to publish information to
bytime- The time by which the message should be published
fields- A collection of field and value data to publish
listener- A listener which will receive success/failure messages for this publishing attemp
ctx- User callback context which will passed to the listener

This method can be used to implement time sensitive contributions. If bytime has passed, the publish message won't be sent to the Liberator and a sl_ERROR_CANCELLED will passed to the supplied listener.

Note
The library does not take ownership of the memory passed into this function, it is the callers responsibility to release the memory used by the fields parameter.
The library does not copy the contents of listener, thus it should not be modified or unexpected effects may occur.
See also
sl_fieldlist_new()
sl_fieldlist_delete()
sl_command* sl_publish_persist ( streamlink client,
const char *  subject,
sl_command_persistence  persist_mode,
sl_fieldlist fields,
sl_commandlistener listener,
void *  ctx 
)

Publish information for a given subject.

Parameters
client- The StreamLink client
subject- The subject to publish information to
persist_mode- The persistence mode
fields- A collection of field and value data to publish
listener- A listener which will receive success/failure messages for this publishing attemp
ctx- User callback context which will passed to the listener

This function can be used to ensure that the publication takes place when StreamLink reconnects to the Liberator. Typical use cases might be to implement "On-Behalf-Of" behaviour.

Note
The library does not take ownership of the memory passed into this function, it is the callers responsibility to release the memory used by the fields parameter.
The library does not copy the contents of listener, thus it should not be modified or unexpected effects may occur.
See also
sl_fieldlist_new()
sl_fieldlist_delete()

Generated on Tue Oct 16 2018 12:25:43 for StreamLinkforC