20 #include <sys/types.h> 26 typedef unsigned char bool;
36 #define SL_EXPORT __declspec(dllimport) 103 sl_SOURCE_UNAVAILABLE
222 sl_subjecttype_UNKNOWN = 200,
223 sl_subjecttype_DIRECTORY = 220,
224 sl_subjecttype_PAGE = 221,
225 sl_subjecttype_RECORD = 222,
226 sl_subjecttype_NEWS = 223,
227 sl_subjecttype_STORY = 224,
228 sl_subjecttype_RECORD2 = 225,
229 sl_subjecttype_RECORD3 = 226,
230 sl_subjecttype_CHAT = 227,
231 sl_subjecttype_CONTAINER = 228,
232 sl_subjecttype_PERMISSION = 230
261 void (*clear)(
void *context);
265 void (*insert)(
void *context,
int index, sl_autoelem *elem);
271 void (*
remove)(
void *context,
int index, sl_autoelem *elem);
277 void (*move)(
void *context,
int from,
int to, sl_autoelem *elem);
591 void (*ok)(
streamlink *client,
void *ctx,
const char *subject);
604 #define SL_UNDEFINED_STATISTIC -1 614 uint64_t bytes_written;
615 uint64_t bytes_read_last;
639 void (*source_status)(
streamlink *client,
void *context,
const char *server_uri,
const char *sourcename,
sl_sourcestatus status);
640 void (*service_status)(
streamlink *client,
void *context,
const char *server_uri,
const char *servicename,
sl_servicestatus status);
722 SL_EXPORT
sl_credentialsprovider *sl_create_password_credentialsprovider(
const char *username,
const char *password);
723 SL_EXPORT
sl_credentialsprovider *sl_create_keymaster_credentialsprovider(
const char *keymaster_uri,
const char *streamlink_user,
const char *auth_user,
const char *auth_pass);
749 SL_EXPORT
const char *sl_get_reachability_address(
streamlink *client);
780 SL_EXPORT
const char *sl_fieldlist_find(
sl_fieldlist *list,
const char *name);
781 SL_EXPORT
char *sl_fieldlist_tostring(
sl_fieldlist *fieldlist,
char *buf,
size_t buflen);
796 SL_EXPORT
void sl_set_trust_manager(
streamlink *client,
int (*manager)(
void *ctx, SSL *ssl),
void *ctx);
798 SL_EXPORT
void sl_set_trust_manager(
streamlink *client,
int (*manager)(
void *ctx,
void *trust),
void *ctx);
805 SL_EXPORT
void sl_set_allocator(
void *(*malloc_func)(
size_t size),
void *(*realloc_func)(
void *orig,
size_t size),
void (*free_func)(
void *));
807 SL_EXPORT
void *
sl_realloc(
void *orig,
size_t size);
808 SL_EXPORT
void sl_free(
void *);
809 SL_EXPORT
char *
sl_strdup(
const char *orig);
810 SL_EXPORT
void *
sl_calloc(
size_t nmemb,
size_t size);
Represents a region of a page that has updated.
Definition: sl4c.h:386
sl_sourcestatus
Enumeration that defines the status of a source.
Definition: sl4c.h:101
sl_autoelem * added
Definition: sl4c.h:320
SL_EXPORT 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.
Definition: rttpclient.c:876
Event raised when a type 2 record updates.
Definition: sl4c.h:368
SL_EXPORT const char * sl_get_name(streamlink *client)
Get the name of the StreamLink instance.
Definition: rttpclient.c:1290
int noop_timeout
Definition: sl4c.h:658
int maxx
Definition: sl4c.h:396
sl_update_action action
Definition: sl4c.h:369
SL_EXPORT sl_configuration * sl_get_configuration(streamlink *client)
Get the configuration for the client.
Definition: rttpclient.c:1151
SL_EXPORT const char * sl_get_servicestatusstring(sl_servicestatus status)
Get the string representing the connection service status.
Definition: utils.c:317
Event that is raised when a permission subject updates.
Definition: sl4c.h:359
Event raised when a type 2 record updates.
Definition: sl4c.h:377
int x
Definition: sl4c.h:387
SL_EXPORT 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.
Definition: rttpclient.c:849
Event raised when a story subject updates.
Definition: sl4c.h:415
sl_subjecttype
Definition: sl4c.h:221
uint64_t bytes_written_last
Definition: sl4c.h:613
int read_timeout
Definition: sl4c.h:655
sl_subjecttype type
Definition: sl4c.h:245
sl_autoelem * removed
Definition: sl4c.h:353
SL_EXPORT void sl_cancel_persistence(streamlink *client, sl_command *sub)
Cancel persistence for a command.
Definition: rttpclient.c:791
SL_EXPORT 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.
Definition: rttpclient.c:1115
SL_EXPORT const char * sl_get_subjectstatusstring(sl_subjectstatus status)
Get the string representing the subject error code.
Definition: utils.c:454
sl_container_action_type
Enumeration that defines the type actions that can be applied to a container model.
Definition: sl4c.h:289
Event that is raised when the structure of a container changes.
Definition: sl4c.h:318
void * context
User context.
Definition: sl4c.h:718
int clock_offset
Definition: sl4c.h:619
Event that is raised when a directory subject changes.
Definition: sl4c.h:351
int maxy
Definition: sl4c.h:397
sl_loginfailed_reason
Enumeration defining the reasons why a login attempt may fail.
Definition: sl4c.h:159
sl_update_action action
Definition: sl4c.h:378
SL_EXPORT sl_fieldlist * sl_fieldlist_new(void)
Create a new and empty set of field/value pairs.
Definition: fieldlist.c:26
int to
Definition: sl4c.h:306
sl_container_action_type type
Definition: sl4c.h:303
char disable_polling
Definition: sl4c.h:669
sl_loglevel
Enumeration that represents the available logging levels.
Definition: sl4c.h:64
int noop_period
Definition: sl4c.h:657
Statistics available from the Library.
Definition: sl4c.h:610
SL_EXPORT void sl_set_reachability(streamlink *client, int reachable)
Set the reachability of a network service.
Definition: rttpclient.c:572
Defines the interface that should be satisfied to receive information on the state of the connection...
Definition: sl4c.h:630
char * text
Definition: sl4c.h:416
sl_fieldlist * fields
Definition: sl4c.h:362
SL_EXPORT sl_connectionstatus sl_get_connectionstatus(streamlink *client)
Get the connection status of Streamlink.
Definition: rttpclient.c:612
sl_autoelem * removed
Definition: sl4c.h:321
SL_EXPORT void sl_del_connection_listener(streamlink *client, sl_connectionlistener *listener)
Remove a connection listener.
Definition: rttpclient.c:630
SL_EXPORT void sl_fieldlist_add(sl_fieldlist *list, const char *name, const char *value)
Add a field/value pair to an existing fieldlist.
Definition: fieldlist.c:43
struct sl_s streamlink
Opaque handle that defines the StreamLink server connection.
Definition: sl4c.h:46
char * subject
Definition: sl4c.h:244
SL_EXPORT void sl_set_allocator(void *(*malloc_func)(size_t size), void *(*realloc_func)(void *orig, size_t size), void(*free_func)(void *))
Set the allocator that will be used by the library.
Definition: utils.c:96
Structure that represents a field/value pair.
Definition: sl4c.h:200
int heartbeat_interval
Definition: sl4c.h:666
SL_EXPORT void * sl_malloc(size_t size)
Allocate a chunk of memory.
Definition: utils.c:154
sl_autoelem * elem
Definition: sl4c.h:304
int size
Definition: sl4c.h:319
SL_EXPORT void sl_add_connection_listener(streamlink *client, sl_connectionlistener *listener, void *ctx)
Add a connection listener.
Definition: rttpclient.c:596
int num_segments
Definition: sl4c.h:398
SL_EXPORT void sl_disconnect(streamlink *client)
Disconnect the StreamLink instance to the server.
Definition: rttpclient.c:556
SL_EXPORT void * sl_calloc(size_t nmemb, size_t size)
Allocate and zero an array of elements.
Definition: utils.c:131
SL_EXPORT void sl_container_apply_to_model(sl_container_event *ev, sl_container_model *model, void *context)
Apply a container event to the supplied model.
Definition: submanager.c:1079
struct sl_subscription_parameters_s sl_subscription_parameters
Opaque structure that represents the parameters to a StreamLink subscription.
Definition: sl4c.h:444
sl_autoelem ** changed_order
Definition: sl4c.h:326
int from
Definition: sl4c.h:305
int sync_period
Definition: sl4c.h:663
sl_page_segment * page_segments
Definition: sl4c.h:399
SL_EXPORT const char * sl_get_logstring(sl_loglevel level)
Return a textual description for the given log level.
Definition: utils.c:212
int login_wait_time
Definition: sl4c.h:661
char * username
Definition: sl4c.h:682
char * storycode
Definition: sl4c.h:408
Structure that represents an array of fields.
Definition: sl4c.h:210
char * keyfield
Definition: sl4c.h:370
Structure that holds details of constituents.
Definition: sl4c.h:242
SL_EXPORT void sl_throttle_global(streamlink *client, sl_throttlecontrol command, sl_commandlistener *listener, void *ctx)
Request throttling (conflation) on all subjects.
Definition: rttpclient.c:996
int http_pad_length
Definition: sl4c.h:672
int changed_order_size
Definition: sl4c.h:325
Event raised when a chat subject updates.
Definition: sl4c.h:432
sl_container_action * actions
Definition: sl4c.h:328
char * value
Definition: sl4c.h:202
SL_EXPORT void sl_set_applicationid(streamlink *client, const char *applicationid)
Set the application identifier for the StreamLink instance.
Definition: rttpclient.c:535
sl_command_persistence
Enumeration that defines the persistence strategy.
Definition: sl4c.h:187
void(* sl_log_cb)(void *ctx, sl_loglevel level, const char *message)
Defines the log callback that you should implement to capture logging.
Definition: sl4c.h:742
int num_actions
Definition: sl4c.h:327
SL_EXPORT 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.
Definition: rttpclient.c:1056
Defines the interface that should be satisfied to receive information on publishing success and failu...
Definition: sl4c.h:584
int inactivity_timeout
Definition: sl4c.h:671
char * headline
Definition: sl4c.h:406
char * password
Definition: sl4c.h:683
void(* status)(streamlink *client, void *ctx, const char *subject, sl_subjectstatus status, sl_fieldlist *fields)
Invoked when the status of subject has changed.
Definition: sl4c.h:576
Defines the interface that should be satisfied to receive updates for subjects.
Definition: sl4c.h:452
SL_EXPORT sl_command * sl_publish(streamlink *client, const char *subject, sl_fieldlist *fields, sl_commandlistener *listener, void *ctx)
Publish information for a given subject.
Definition: rttpclient.c:822
int position
Definition: sl4c.h:246
Structure that defines the interface for sl_container_apply_to_model()
Definition: sl4c.h:260
int fields_alloc_size
Definition: sl4c.h:213
int lost_retry_connect_time
Definition: sl4c.h:659
Definition of the interface that StreamLink uses to obtain credentials information.
Definition: sl4c.h:695
SL_EXPORT void sl_free(void *)
Free the supplied memory block.
Definition: utils.c:195
SL_EXPORT void * sl_realloc(void *orig, size_t size)
Reallocate the supplied memory.
Definition: utils.c:176
char * name
Definition: sl4c.h:201
SL_EXPORT void sl_log(streamlink *client, sl_loglevel level, const char *fmt,...)
Log a message to the StreamLink logger.
Definition: utils.c:498
char * time
Definition: sl4c.h:435
sl_autoelem * next
Definition: sl4c.h:243
sl_fieldlist * fields
Definition: sl4c.h:409
SL_EXPORT 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 structure_only, bool keep_inaccessible)
Create a set of parameters for a container subscription.
Definition: rttpclient.c:1084
SL_EXPORT void sl_throttle_subject(streamlink *client, const char *subject, sl_throttlecontrol command, sl_commandlistener *listener, void *ctx)
Request throttling (conflation) on the specified subject.
Definition: rttpclient.c:969
void(* status)(streamlink *client, void *ctx, const char *server_uri, sl_connectionstatus status, intptr_t extra)
Invoked when the connection status changes.
Definition: sl4c.h:637
Configuration of timeouts for the library.
Definition: sl4c.h:653
SL_EXPORT char * sl_strdup(const char *orig)
Duplicate the supplied string.
Definition: utils.c:113
int connect_timeout
Definition: sl4c.h:654
Event raised when a news headline subject updates.
Definition: sl4c.h:405
SL_EXPORT const char * sl_get_subjecterrorstring(sl_subjecterror error)
Get the string representing the subject error code.
Definition: utils.c:392
SL_EXPORT void sl_create(streamlink *client, const char *subject, sl_subjecttype type, sl_commandlistener *listener, void *ctx)
Create the given subject on the liebrator.
Definition: rttpclient.c:942
Encapsulates the authentication information used to log in to a Liberator server. ...
Definition: sl4c.h:681
SL_EXPORT const char * sl_get_subjecttypestring(sl_subjecttype type)
Get the string representing the rttp object type.
Definition: utils.c:358
sl_connectionstatus
Enumeration that defines the state of a StreamLink connection.
Definition: sl4c.h:139
SL_EXPORT streamlink * sl_new(const char *uri, sl_credentialsprovider *credentials_provider)
Create a new Streamlink client object.
Definition: rttpclient.c:245
int y
Definition: sl4c.h:388
struct sl_subscription_s sl_command
Opaque handle that represents a (persistent) command.
Definition: sl4c.h:59
char * message
Definition: sl4c.h:436
sl_fieldlist * fields
Definition: sl4c.h:371
SL_EXPORT void sl_set_log_callback(streamlink *client, sl_log_cb callback, void *ctx)
Set the log callback function.
Definition: utils.c:571
int average_latency
Definition: sl4c.h:618
SL_EXPORT void sl_delete(streamlink *client, const char *subject, sl_commandlistener *listener, void *ctx)
Delete the given subject on the liebrator.
Definition: rttpclient.c:1026
SL_EXPORT const char * sl_get_sourcestatusstring(sl_sourcestatus status)
Get the string representing the connection source status.
Definition: utils.c:339
sl_update_action action
Definition: sl4c.h:360
void(* error)(streamlink *client, void *ctx, const char *subject, sl_subjecterror error, sl_error_reason reason)
Invoked when a command has not executed successfully.
Definition: sl4c.h:600
char * key
Definition: sl4c.h:361
sl_autoelem * added
Definition: sl4c.h:352
sl_throttlecontrol
Enumeration that defines the Throttle Controls that are available.
Definition: sl4c.h:174
int statistics_period
Definition: sl4c.h:660
sl_chat_update_type type
Definition: sl4c.h:433
int num
Definition: sl4c.h:211
sl_servicestatus
Enumeration that defines the status of a service.
Definition: sl4c.h:91
Event raised when a page updates.
Definition: sl4c.h:395
sl_autoelem ** order
Definition: sl4c.h:322
sl_subjectstatus
Enumeration that defines the status of a subject.
Definition: sl4c.h:80
int time_since_last_call
Definition: sl4c.h:612
SL_EXPORT void sl_unsubscribe(streamlink *client, sl_subscription *sub)
Unsubscribe a subject subscription.
Definition: rttpclient.c:770
SL_EXPORT void sl_snapshot(streamlink *client, const char *subject, sl_subscription_parameters *params, sl_subjectlistener *listener, void *ctx)
Snapshota subject.
Definition: rttpclient.c:690
sl_update_action
Enumeration that defines an action.
Definition: sl4c.h:341
sl_error_reason
Enumeration defining a reason explaining why an error has been raised.
Definition: sl4c.h:126
SL_EXPORT void sl_connect(streamlink *client)
Connect the StreamLink instance to the server.
Definition: rttpclient.c:454
int poll_interval
Definition: sl4c.h:668
char * user
Definition: sl4c.h:434
char accept_all_ssl_certificates
Definition: sl4c.h:670
SL_EXPORT sl_subscription * sl_subscribe(streamlink *client, const char *subject, sl_subscription_parameters *params, sl_subjectlistener *listener, void *ctx)
Subscribe to a subject.
Definition: rttpclient.c:656
sl_field * fields
Definition: sl4c.h:212
sl_subjecterror
Enumeration which represents the errors that can occur for a subject.
Definition: sl4c.h:110
sl_fieldlist * fields
Definition: sl4c.h:379
SL_EXPORT sl_subscription_parameters * sl_create_text_parameters(streamlink *client, const char *parameters)
Create a set of parameters for a subscription.
Definition: rttpclient.c:1134
SL_EXPORT int sl_get_serviceurl(streamlink *client, const char *service_name, sl_fieldlist *user_params, char **url_ptr, char **body_ptr)
Obtain a URL and HTTP post body for a service hosted on the Liberator.
Definition: rttpclient.c:1451
int write_timeout
Definition: sl4c.h:656
SL_EXPORT void sl_fieldlist_delete(sl_fieldlist *list)
Delete a set of field/value pairs.
Definition: fieldlist.c:77
SL_EXPORT void sl_dealloc(streamlink *client)
Release all resources associated with the StreamLink instance.
Definition: rttpclient.c:506
sl_chat_update_type
Enumeration that defines the chat message type that has been received.
Definition: sl4c.h:422
int latency
Definition: sl4c.h:617
char * value
Definition: sl4c.h:389
SL_EXPORT const char * sl_get_errorreasonstring(sl_error_reason status)
Get the string representing the subject error reason.
Definition: utils.c:426
SL_EXPORT int sl_subscription_setwindow(streamlink *client, sl_subscription *sub, sl_subscription_parameters *params)
Change the window size for a container subscription.
Definition: rttpclient.c:723
Structure that defines a container action.
Definition: sl4c.h:302
struct sl_subscription_s sl_subscription
Opaque handle that represents a subscription to a StreamLink subject.
Definition: sl4c.h:52
void(* error)(streamlink *client, void *ctx, const char *subject, sl_subjecterror error, sl_error_reason reason)
Invoked when an error is received for a subject.
Definition: sl4c.h:568
int noop_last_roundtrip
Definition: sl4c.h:611
char * date
Definition: sl4c.h:407