StreamLinkforC
7.0.3-308369
|
Data Structures | |
struct | sl_autoelem_s |
Structure that holds details of constituents. More... | |
struct | sl_container_model |
Structure that defines the interface for sl_container_apply_to_model() More... | |
struct | sl_container_action |
Structure that defines a container action. More... | |
struct | sl_container_event |
Event that is raised when the structure of a container changes. More... | |
struct | sl_directory_event |
Event that is raised when a directory subject changes. More... | |
struct | sl_permission_event |
Event that is raised when a permission subject updates. More... | |
struct | sl_record2_event |
Event raised when a type 2 record updates. More... | |
struct | sl_record3_event |
Event raised when a type 2 record updates. More... | |
struct | sl_page_segment |
Represents a region of a page that has updated. More... | |
struct | sl_page_event |
Event raised when a page updates. More... | |
struct | sl_news_event |
Event raised when a news headline subject updates. More... | |
struct | sl_story_event |
Event raised when a story subject updates. More... | |
struct | sl_chat_event |
Event raised when a chat subject updates. More... | |
struct | sl_subjectlistener |
Defines the interface that should be satisfied to receive updates for subjects. More... | |
Typedefs | |
typedef struct sl_subscription_s | sl_subscription |
Opaque handle that represents a subscription to a StreamLink subject. | |
typedef struct sl_subscription_parameters_s | sl_subscription_parameters |
Opaque structure that represents the parameters to a StreamLink subscription. | |
Enumerations |
Functions | |
sl_subscription * | sl_subscribe (streamlink *client, const char *subject, sl_subscription_parameters *params, sl_subjectlistener *listener, void *ctx) |
Subscribe to a subject. More... | |
void | sl_snapshot (streamlink *client, const char *subject, sl_subscription_parameters *params, sl_subjectlistener *listener, void *ctx) |
Snapshota subject. More... | |
int | sl_subscription_setwindow (streamlink *client, sl_subscription *sub, sl_subscription_parameters *params) |
Change the window size for a container subscription. More... | |
void | sl_unsubscribe (streamlink *client, sl_subscription *sub) |
Unsubscribe a subject subscription. More... | |
sl_subscription_parameters * | sl_create_container_parameters (streamlink *client, int window_start, int window_size, sl_subscription_parameters *constituent_parameters) |
Create a set of parameters for a container subscription. More... | |
sl_subscription_parameters * | sl_create_extended_container_parameters (streamlink *client, int window_start, int window_size, sl_subscription_parameters *constituent_parameters, const char *where, const char *sort, const char *groupby, bool structureonly, bool keep_inaccessible) |
Create a set of parameters for a container subscription. More... | |
sl_subscription_parameters * | sl_create_record_parameters (streamlink *client, char is_image_filter, const char *filter, int num_fields, const char **fields) |
Create a set of parameters for a record subscription. More... | |
sl_subscription_parameters * | sl_create_text_parameters (streamlink *client, const char *parameters) |
Create a set of parameters for a subscription. More... | |
void | sl_container_apply_to_model (sl_container_event *ev, sl_container_model *model, void *context) |
Apply a container event to the supplied model. More... | |
enum sl_chat_update_type |
Enumeration that defines the chat message type that has been received.
enum sl_error_reason |
Enumeration defining a reason explaining why an error has been raised.
enum sl_subjecterror |
Enumeration which represents the errors that can occur for a subject.
enum sl_subjecttype |
Enumeration defining the subject types
void sl_container_apply_to_model | ( | sl_container_event * | ev, |
sl_container_model * | model, | ||
void * | context | ||
) |
Apply a container event to the supplied model.
ev | - The container event to apply |
model | - The container model to apply the event to |
context | - A callback context |
sl_subscription_parameters* sl_create_container_parameters | ( | streamlink * | client, |
int | window_start, | ||
int | window_size, | ||
sl_subscription_parameters * | constituent_parameters | ||
) |
Create a set of parameters for a container subscription.
client | - The client. |
window_start | - Start of the window (-1 for not specified). |
window_size | - Size of the window onto the container (-1 for not specified). |
constituent_parameters | - A set of parameters to be applied to the constituents of the container. |
The following example code creates a set of container parameters that request a window of elements 0 - 10 and request the Bid and Ask fields from the elements.
sl_subscription_parameters* sl_create_extended_container_parameters | ( | streamlink * | client, |
int | window_start, | ||
int | window_size, | ||
sl_subscription_parameters * | constituent_parameters, | ||
const char * | where, | ||
const char * | sort, | ||
const char * | groupby, | ||
bool | structureonly, | ||
bool | keep_inaccessible | ||
) |
Create a set of parameters for a container subscription.
client | - The client. |
window_start | - Start of the window (-1 for not specified). |
window_size | - Size of the window onto the container (-1 for not specified). |
constituent_parameters | - A set of parameters to be applied to the constituents of the container. |
where | - Refiner filter parameters (can be NULL) |
sort | - Refiner sort parameters (can be NULL) |
groupby | - Refiner groupby parameters (can be NULL) |
structureonly | - Only subscribe to the container structure, not the constituents |
keep_inaccessible | - Set true to not remove non-permissioned/unavailable subjects from the structure of the container |
sl_subscription_parameters* sl_create_record_parameters | ( | streamlink * | client, |
char | is_image_filter, | ||
const char * | filter, | ||
int | num_fields, | ||
const char ** | fields | ||
) |
Create a set of parameters for a record subscription.
client | - The client |
is_image_filter | - Set if the filter represents an image filter. |
filter | - Any record filter to be applied |
num_fields | - Number of fields supplied |
fields | - An array of field names |
The following example code creates a set of record parameters that requests the Bid and Ask fields.
char *fields[] = { "Bid", "Ask" }; params = sl_create_record_parameters(client, 2, fields);
sl_subscription_parameters* sl_create_text_parameters | ( | streamlink * | client, |
const char * | parameters | ||
) |
Create a set of parameters for a subscription.
client | - The client |
parameters | - The RTTP encoded set of parameters |
void sl_snapshot | ( | streamlink * | client, |
const char * | subject, | ||
sl_subscription_parameters * | params, | ||
sl_subjectlistener * | listener, | ||
void * | ctx | ||
) |
Snapshota subject.
client | - The connection on which to subscribe to the subject. |
subject | - The subject to subscribe to. |
params | - Any subscription parameters (can be NULL) |
listener | - The subject listener which will receive update. |
ctx | - User callback context which will passed to the listener. |
sl_subscription* sl_subscribe | ( | streamlink * | client, |
const char * | subject, | ||
sl_subscription_parameters * | params, | ||
sl_subjectlistener * | listener, | ||
void * | ctx | ||
) |
Subscribe to a subject.
client | - The connection on which to subscribe to the subject. |
subject | - The subject to subscribe to. |
params | - Any subscription parameters (can be NULL) |
listener | - The subject listener which will receive update. |
ctx | - User callback context which will passed to the listener. |
int sl_subscription_setwindow | ( | streamlink * | client, |
sl_subscription * | sub, | ||
sl_subscription_parameters * | params | ||
) |
Change the window size for a container subscription.
client | - The StreamLink client |
sub | - The subscription to change |
params | - The new parameters for the subscription |
0 | - Change was applied to a container subscription |
-1 | - Change was not applied to a container subscription |
-2 | - Container was not requested with container parameters intiially |
void sl_unsubscribe | ( | streamlink * | client, |
sl_subscription * | sub | ||
) |
Unsubscribe a subject subscription.
client | - The StreamLink client |
sub | - The subscription to unsubscribe from |
Unsubscribing to a subscription will prevent updates being received for the subject