StreamLinkforC
7.0.3-308369
|
Typedefs | |
typedef void(* | sl_log_cb) (void *ctx, sl_loglevel level, const char *message) |
Defines the log callback that you should implement to capture logging. More... | |
Enumerations |
Functions | |
const char * | sl_get_name (streamlink *client) |
Get the name of the StreamLink instance. More... | |
const char * | sl_get_logstring (sl_loglevel level) |
Return a textual description for the given log level. More... | |
const char * | sl_get_servicestatusstring (sl_servicestatus status) |
Get the string representing the connection service status. More... | |
const char * | sl_get_sourcestatusstring (sl_sourcestatus status) |
Get the string representing the connection source status. More... | |
const char * | sl_get_subjecttypestring (sl_subjecttype type) |
Get the string representing the rttp object type. More... | |
const char * | sl_get_subjecterrorstring (sl_subjecterror error) |
Get the string representing the subject error code. More... | |
const char * | sl_get_errorreasonstring (sl_error_reason reason) |
Get the string representing the subject error reason. More... | |
const char * | sl_get_subjectstatusstring (sl_subjectstatus status) |
Get the string representing the subject error code. More... | |
void | sl_log (streamlink *client, sl_loglevel level, const char *fmt,...) |
Log a message to the StreamLink logger. More... | |
void | sl_set_log_callback (streamlink *client, sl_log_cb callback, void *ctx) |
Set the log callback function. More... | |
typedef void(* sl_log_cb) (void *ctx, sl_loglevel level, const char *message) |
Defines the log callback that you should implement to capture logging.
ctx | - The context the callback was registered with |
level | - The level that the message should be logged at |
message | - The message that should be logged |
Your logger callback should be registered with sl_set_log_callback()
enum sl_loglevel |
Enumeration that represents the available logging levels.
const char* sl_get_errorreasonstring | ( | sl_error_reason | reason | ) |
Get the string representing the subject error reason.
error | - The subject error reason |
- | A string reperesenting the subject error reason |
const char* sl_get_logstring | ( | sl_loglevel | level | ) |
Return a textual description for the given log level.
level | - Log level |
const char* sl_get_name | ( | streamlink * | client | ) |
Get the name of the StreamLink instance.
This function can be useful for logging purposes
const char* sl_get_servicestatusstring | ( | sl_servicestatus | status | ) |
Get the string representing the connection service status.
status | - Status |
- | A string reperesenting the connection service status |
const char* sl_get_sourcestatusstring | ( | sl_sourcestatus | status | ) |
Get the string representing the connection source status.
status | - Status |
- | A string reperesenting the connection source status |
const char* sl_get_subjecterrorstring | ( | sl_subjecterror | error | ) |
Get the string representing the subject error code.
error | - The subject error code |
- | A string reperesenting the subject error code |
const char* sl_get_subjectstatusstring | ( | sl_subjectstatus | status | ) |
Get the string representing the subject error code.
status | - The subject status code |
- | A string reperesenting the subject status code |
const char* sl_get_subjecttypestring | ( | sl_subjecttype | type | ) |
Get the string representing the rttp object type.
type | - The rttp object type value |
- | A string reperesenting the rttp object type |
void sl_log | ( | streamlink * | client, |
sl_loglevel | level, | ||
const char * | fmt, | ||
... | |||
) |
Log a message to the StreamLink logger.
client | - The StreamLink client |
level | - Log level |
fmt | - printf() style format |
void sl_set_log_callback | ( | streamlink * | client, |
sl_log_cb | callback, | ||
void * | ctx | ||
) |
Set the log callback function.
client | - The StreamLink client |
callback | - Callback function |
ctx | - Callback context |
The callback function will be invoked for each log message that should be logged.