StreamLinkforC  7.0.3-308369
sl4c.h
1 /*
2  *
3  * Copyright CAPLIN Systems Ltd 2000-2010
4  *
5  *
6  * $Author: dominic $
7  * $DateTime: 2018/10/16 11:00:22 $
8  * $Change: 312033 $
9  * $Id: //CDev/V-7_0/streamlink/streamlink/include/sl4c.h#3 $
10  *
11  *
12  */
13 
14 
15 #ifndef STREAMLINK_H
16 #define STREAMLINK_H
17 
18 
19 #include <inttypes.h>
20 #include <sys/types.h>
21 #include <stdarg.h>
22 
23 #ifndef WIN32
24 #include <stdbool.h>
25 #else
26 typedef unsigned char bool;
27 #define false 0
28 #define true 1
29 #endif
30 
31 
32 #ifndef WIN32
33 #define SL_EXPORT
34 #else
35 #ifndef SL_EXPORT
36 #define SL_EXPORT __declspec(dllimport)
37 #endif
38 #endif
39 
40 
46 typedef struct sl_s streamlink;
52 typedef struct sl_subscription_s sl_subscription;
53 
59 typedef struct sl_subscription_s sl_command;
60 
64 typedef enum {
74 } sl_loglevel;
75 
80 typedef enum {
86 
87 
91 typedef enum {
92  sl_SERVICE_OK,
93  sl_SERVICE_LIMITED,
94  sl_SERVICE_DOWN
96 
97 
101 typedef enum {
102  sl_SOURCE_AVAILABLE,
103  sl_SOURCE_UNAVAILABLE
105 
106 
110 typedef enum {
120  sl_ERROR_EXPIRED,
122 
126 typedef enum {
135 
139 typedef enum {
155 
159 typedef enum {
169 
170 
174 typedef enum {
183 
187 typedef enum {
194 
200 typedef struct {
201  char *name;
202  char *value;
203 } sl_field;
204 
210 typedef struct {
211  int num;
215  /* TODO: Add in fields for SYNC offset/latency */
216 } sl_fieldlist;
217 
221 typedef enum {
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
234 
235 typedef struct sl_autoelem_s sl_autoelem;
236 
243  sl_autoelem *next;
244  char *subject;
246  int position;
248 #ifdef BUILD_API
249  /* Private below here - TODO: Sort this out properly */
250  int object_number;
251  UT_hash_handle hh;
252 #endif
253 };
254 
260 typedef struct {
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);
285 
289 typedef enum {
290  ACTION_CLEAR,
291  ACTION_INSERT,
292  ACTION_REMOVE,
293  ACTION_MOVE
295 
302 typedef struct {
304  sl_autoelem *elem;
305  int from;
306  int to;
308 
309 
310 
311 
312 
318 typedef struct {
319  int size;
320  sl_autoelem *added;
321  sl_autoelem *removed;
322  sl_autoelem **order;
326  sl_autoelem **changed_order;
329 #ifdef BUILD_API
330  int ctrstart;
331  int ctrend;
332 #endif
334 
335 SL_EXPORT void sl_container_apply_to_model(sl_container_event *ev, sl_container_model *model, void *context);
336 
337 
341 typedef enum {
342  action_UPDATE,
343  action_DELETE,
344  action_CLEAR
346 
347 
351 typedef struct {
352  sl_autoelem *added;
353  sl_autoelem *removed;
355 
359 typedef struct {
361  char *key;
364 
368 typedef struct {
370  char *keyfield;
373 
377 typedef struct {
381 
382 
386 typedef struct {
387  int x;
388  int y;
389  char *value;
391 
395 typedef struct {
396  int maxx;
397  int maxy;
400 } sl_page_event;
401 
405 typedef struct {
406  char *headline;
407  char *date;
408  char *storycode;
410 } sl_news_event;
411 
415 typedef struct {
416  char *text;
418 
422 typedef enum {
428 
432 typedef struct {
434  char *user;
435  char *time;
436  char *message;
437 } sl_chat_event;
438 
439 
440 
444 typedef struct sl_subscription_parameters_s sl_subscription_parameters;
445 
446 
452 typedef struct {
461  void (*record_updated)(streamlink *client, void *ctx, const char *subject, sl_fieldlist *fields, char isimage);
462 
463 
472  void (*record_type2_updated)(streamlink *client, void *ctx, const char *subject, sl_record2_event *event, char isimage);
473 
482  void (*record_type3_updated)(streamlink *client, void *ctx, const char *subject, sl_record3_event *event, char isimage);
483 
484 
493  void (*page_updated)(streamlink *client, void *ctx, const char *subject, sl_page_event *event, char isimage);
494 
503  void (*news_updated)(streamlink *client, void *ctx, const char *subject, sl_news_event *event, char isimage);
504 
513  void (*story_updated)(streamlink *client, void *ctx, const char *subject, sl_story_event *event, char isimage);
514 
515 
524  void (*permission_updated)(streamlink *client, void *ctx, const char *subject, sl_permission_event *event, char isimage);
525 
534  void (*container_updated)(streamlink *client, void *ctx, const char *subject, sl_container_event *event, char isimage);
535 
544  void (*directory_updated)(streamlink *client, void *ctx, const char *subject, sl_directory_event *event, char isimage);
545 
546 
555  void (*chat_updated)(streamlink *client, void *ctx, const char *subject, sl_chat_event *event, char isimage);
556 
568  void (*error)(streamlink *client, void *ctx, const char *subject, sl_subjecterror error, sl_error_reason reason);
576  void (*status)(streamlink *client, void *ctx, const char *subject, sl_subjectstatus status, sl_fieldlist *fields);
578 
584 typedef struct {
591  void (*ok)(streamlink *client, void *ctx, const char *subject);
600  void (*error)(streamlink *client, void *ctx, const char *subject, sl_subjecterror error, sl_error_reason reason);
602 
603 
604 #define SL_UNDEFINED_STATISTIC -1
605 
610 typedef struct {
614  uint64_t bytes_written;
615  uint64_t bytes_read_last;
616  uint64_t bytes_read;
617  int latency;
620 } sl_statistics;
621 
622 
623 
624 
630 typedef struct {
637  void (*status)(streamlink *client, void *ctx, const char *server_uri, sl_connectionstatus status, intptr_t extra);
638 
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);
641 
642  void (*statistics)(streamlink *client, void *context, sl_statistics *statistics);
644 
645 
653 typedef struct {
664  int sync_timeout;
665 
674 
675 
676 
681 typedef struct {
682  char *username;
683  char *password;
685 
686 
688 
700  void (*dealloc)(sl_credentialsprovider *provider);
701 
709  sl_credentials *(*get_credentials)(streamlink *client, sl_credentialsprovider *provider);
715  void (*free_credentials)(sl_credentialsprovider *provider, sl_credentials *credentials);
718  void *context;
719 };
720 
721 
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);
724 
725 
726 
727 SL_EXPORT sl_subscription_parameters *sl_create_container_parameters(streamlink *client, int window_start, int window_size, sl_subscription_parameters *constituent_parameters);
728 SL_EXPORT sl_subscription_parameters *sl_create_record_parameters(streamlink *client, char is_image_filter, const char *filter, int num_fields, const char **fields);
729 SL_EXPORT sl_subscription_parameters *sl_create_text_parameters(streamlink *client, const char *parameters);
730 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);
731 
732 
742 typedef void (*sl_log_cb)(void *ctx, sl_loglevel level, const char *message);
743 
744 
745 
746 SL_EXPORT streamlink *sl_new(const char *uri, sl_credentialsprovider *credentials_provider);
747 SL_EXPORT void sl_config_defaults(sl_configuration *config);
749 SL_EXPORT const char *sl_get_reachability_address(streamlink *client);
750 SL_EXPORT void sl_set_applicationid(streamlink *client, const char *applicationid);
751 SL_EXPORT void sl_dealloc(streamlink *client);
752 SL_EXPORT void sl_connect(streamlink *client);
753 SL_EXPORT void sl_set_reachability(streamlink *client, int reachable);
754 SL_EXPORT void sl_add_connection_listener(streamlink *client, sl_connectionlistener *listener, void *ctx);
755 SL_EXPORT void sl_del_connection_listener(streamlink *client, sl_connectionlistener *listener);
756 SL_EXPORT void sl_disconnect(streamlink *client);
757 SL_EXPORT void sl_snapshot(streamlink *client, const char *subject, sl_subscription_parameters *params, sl_subjectlistener *listener, void *ctx);
758 SL_EXPORT sl_subscription *sl_subscribe(streamlink *client, const char *subject, sl_subscription_parameters *params, sl_subjectlistener *listener, void *ctx);
759 SL_EXPORT void sl_unsubscribe(streamlink *client, sl_subscription *sub);
761 SL_EXPORT sl_command *sl_publish(streamlink *client,const char *subject, sl_fieldlist *fields, sl_commandlistener *listener, void *ctx);
762 SL_EXPORT sl_command *sl_publish_bytime(streamlink *client,const char *subject, time_t bytime, sl_fieldlist *fields, sl_commandlistener *listener, void *ctx);
763 SL_EXPORT void sl_create(streamlink *client, const char *subject, sl_subjecttype type, sl_commandlistener *listener, void *ctx);
764 SL_EXPORT void sl_delete(streamlink *client, const char *subject, sl_commandlistener *listener, void *ctx);
765 SL_EXPORT void sl_throttle_subject(streamlink *client, const char *subject, sl_throttlecontrol command, sl_commandlistener *listener, void *ctx);
766 SL_EXPORT void sl_throttle_global(streamlink *client, sl_throttlecontrol command, sl_commandlistener *listener, void *ctx);
767 
768 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);
769 SL_EXPORT void sl_cancel_persistence(streamlink *client, sl_command *sub);
770 SL_EXPORT const char *sl_get_name(streamlink *client);
771 SL_EXPORT int sl_get_serviceurl(streamlink *client, const char *service_name, sl_fieldlist *user_params, char **url_ptr, char **body_ptr);
772 
773 
775 
776 
777 SL_EXPORT sl_fieldlist *sl_fieldlist_new(void);
778 SL_EXPORT void sl_fieldlist_add(sl_fieldlist *list, const char *name, const char *value);
779 SL_EXPORT void sl_fieldlist_delete(sl_fieldlist *list);
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);
782 
783 
784 SL_EXPORT const char *sl_get_connectionstatusstring(sl_connectionstatus status);
785 SL_EXPORT const char *sl_get_logstring(sl_loglevel level);
786 
787 SL_EXPORT const char *sl_get_servicestatusstring(sl_servicestatus status);
788 SL_EXPORT const char *sl_get_sourcestatusstring(sl_sourcestatus status);
789 SL_EXPORT const char *sl_get_subjecttypestring(sl_subjecttype type);
790 SL_EXPORT const char *sl_get_subjecterrorstring(sl_subjecterror error);
791 SL_EXPORT const char *sl_get_subjectstatusstring(sl_subjectstatus status);
792 SL_EXPORT const char *sl_get_loginfailedstring(sl_loginfailed_reason status);
793 SL_EXPORT const char *sl_get_errorreasonstring(sl_error_reason status);
794 
795 #ifdef HAVE_OPENSSL
796 SL_EXPORT void sl_set_trust_manager(streamlink *client, int (*manager)(void *ctx, SSL *ssl), void *ctx);
797 #else
798 SL_EXPORT void sl_set_trust_manager(streamlink *client, int (*manager)(void *ctx, void *trust), void *ctx);
799 #endif
800 
801 
802 SL_EXPORT void sl_log(streamlink *client, sl_loglevel level, const char *fmt, ...);
803 SL_EXPORT void sl_set_log_callback(streamlink *client, sl_log_cb callback, void *ctx);
804 
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 *));
806 SL_EXPORT void *sl_malloc(size_t size);
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);
811 
812 
813 
814 
815 #endif
Definition: sl4c.h:66
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
Definition: sl4c.h:111
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
Definition: sl4c.h:147
Event raised when a type 2 record updates.
Definition: sl4c.h:368
Definition: sl4c.h:70
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
Definition: sl4c.h:144
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
Definition: sl4c.h:165
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
Definition: sl4c.h:175
sl_container_action_type
Enumeration that defines the type actions that can be applied to a container model.
Definition: sl4c.h:289
Definition: sl4c.h:117
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
Definition: sl4c.h:166
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
Definition: sl4c.h:425
sl_container_action_type type
Definition: sl4c.h:303
Definition: sl4c.h:177
Definition: sl4c.h:162
Definition: sl4c.h:148
Definition: sl4c.h:65
char disable_polling
Definition: sl4c.h:669
Definition: sl4c.h:178
sl_loglevel
Enumeration that represents the available logging levels.
Definition: sl4c.h:64
int noop_period
Definition: sl4c.h:657
Definition: sl4c.h:118
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
Definition: sl4c.h:152
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
Definition: sl4c.h:426
Definition: sl4c.h:424
int heartbeat_interval
Definition: sl4c.h:666
SL_EXPORT void * sl_malloc(size_t size)
Allocate a chunk of memory.
Definition: utils.c:154
Definition: sl4c.h:142
Definition: sl4c.h:150
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
Definition: sl4c.h:132
sl_page_segment * page_segments
Definition: sl4c.h:399
Definition: sl4c.h:115
Definition: sl4c.h:112
SL_EXPORT const char * sl_get_logstring(sl_loglevel level)
Return a textual description for the given log level.
Definition: utils.c:212
Definition: sl4c.h:140
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
Definition: sl4c.h:68
Definition: sl4c.h:127
Definition: sl4c.h:423
Definition: sl4c.h:164
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
Definition: sl4c.h:119
Definition: sl4c.h:73
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
Definition: sl4c.h:189
Definition: sl4c.h:82
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
Definition: sl4c.h:113
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
Definition: sl4c.h:181
Definition: sl4c.h:67
Definition: sl4c.h:188
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
Definition: sl4c.h:143
Definition: sl4c.h:128
Definition: sl4c.h:149
SL_EXPORT void * sl_realloc(void *orig, size_t size)
Reallocate the supplied memory.
Definition: utils.c:176
char * name
Definition: sl4c.h:201
Definition: sl4c.h:145
Definition: sl4c.h:176
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
Definition: sl4c.h:190
Encapsulates the authentication information used to log in to a Liberator server. ...
Definition: sl4c.h:681
Definition: sl4c.h:83
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
Definition: sl4c.h:141
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
Definition: sl4c.h:84
SL_EXPORT void sl_set_log_callback(streamlink *client, sl_log_cb callback, void *ctx)
Set the log callback function.
Definition: utils.c:571
Definition: sl4c.h:192
Definition: sl4c.h:161
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
Definition: sl4c.h:180
Definition: sl4c.h:131
SL_EXPORT const char * sl_get_sourcestatusstring(sl_sourcestatus status)
Get the string representing the connection source status.
Definition: utils.c:339
Definition: sl4c.h:179
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
Definition: sl4c.h:163
Definition: sl4c.h:72
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
Definition: sl4c.h:69
sl_servicestatus
Enumeration that defines the status of a service.
Definition: sl4c.h:91
Definition: sl4c.h:129
Event raised when a page updates.
Definition: sl4c.h:395
sl_autoelem ** order
Definition: sl4c.h:322
Definition: sl4c.h:191
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
Definition: sl4c.h:167
sl_error_reason
Enumeration defining a reason explaining why an error has been raised.
Definition: sl4c.h:126
Definition: sl4c.h:114
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
Definition: sl4c.h:151
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
Definition: sl4c.h:81
sl_field * fields
Definition: sl4c.h:212
sl_subjecterror
Enumeration which represents the errors that can occur for a subject.
Definition: sl4c.h:110
Definition: sl4c.h:116
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
Definition: sl4c.h:160
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
Definition: sl4c.h:133
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
Definition: sl4c.h:130
Definition: sl4c.h:71
int noop_last_roundtrip
Definition: sl4c.h:611
char * date
Definition: sl4c.h:407

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