Media Over QUIC (MoQ) stack. More...
#include <arpa/inet.h>#include "internal/moq.h"#include "internal/quic.h"#include "internal/connection.h"#include "internal/version.h"#include "imquic/debug.h"
Macros | |
| #define | IMQUIC_MOQ_LOG_VERB IMQUIC_LOG_HUGE |
| #define | IMQUIC_MOQ_LOG_HUGE IMQUIC_LOG_VERB |
| #define | IMQUIC_MOQ_CHECK_ERR(cond, error, code, res, reason) |
| #define | IMQUIC_MOQ_PARSE_NAMESPACES(tns_num, i, error_message, last) |
| #define | IMQUIC_MOQ_PARSE_TRACKNAME(error_message, last) |
| #define | IMQUIC_MOQ_ADD_NAMESPACES(request) |
| #define | IMQUIC_MOQ_ADD_TRACKNAME(request) |
Functions | |
| void | imquic_moq_init (void) |
| Initialize the native MoQ stack at startup. | |
| void | imquic_moq_deinit (void) |
| Uninitialize the native MoQ stack. | |
| void | imquic_moq_new_connection (imquic_connection *conn, void *user_data) |
| Callback the core invokes when a new QUIC connection using MoQ is available. | |
| void | imquic_moq_stream_incoming (imquic_connection *conn, uint64_t stream_id, uint8_t *bytes, uint64_t offset, uint64_t length, gboolean complete) |
Callback the core invokes when there's new incoming data on a STREAM. | |
| void | imquic_moq_datagram_incoming (imquic_connection *conn, uint8_t *bytes, uint64_t length) |
Callback the core invokes when there's new incoming data on a DATAGRAM. | |
| void | imquic_moq_connection_gone (imquic_connection *conn) |
| Callback the core invokes when an existing MoQ connection is not available anymore. | |
| const char * | imquic_moq_error_code_str (imquic_moq_error_code code) |
| Helper function to serialize to string the name of a imquic_moq_error_code value. | |
| const char * | imquic_moq_publish_namespace_error_code_str (imquic_moq_publish_namespace_error_code code) |
| Helper function to serialize to string the name of a imquic_moq_publish_namespace_error_code value. | |
| const char * | imquic_moq_pub_error_code_str (imquic_moq_pub_error_code code) |
| Helper function to serialize to string the name of a imquic_moq_pub_error_code value. | |
| const char * | imquic_moq_sub_error_code_str (imquic_moq_sub_error_code code) |
| Helper function to serialize to string the name of a imquic_moq_sub_error_code value. | |
| const char * | imquic_moq_subns_error_code_str (imquic_moq_subns_error_code code) |
| Helper function to serialize to string the name of a imquic_moq_subns_error_code value. | |
| const char * | imquic_moq_fetch_error_code_str (imquic_moq_fetch_error_code code) |
| Helper function to serialize to string the name of a imquic_moq_fetch_error_code value. | |
| const char * | imquic_moq_sub_done_code_str (imquic_moq_sub_done_code code) |
| Helper function to serialize to string the name of a imquic_moq_sub_done_code value. | |
| const char * | imquic_moq_message_type_str (imquic_moq_message_type type) |
| Helper function to serialize to string the name of a imquic_moq_message_type value. | |
| imquic_moq_datagram_message_type | imquic_moq_datagram_message_type_return (imquic_moq_version version, gboolean ext, gboolean eog, gboolean oid) |
Helper function to return the imquic_moq_datagram_message_type value for OBJECT_DATAGRAM out of the individual properties. | |
| void | imquic_moq_datagram_message_type_parse (imquic_moq_version version, imquic_moq_datagram_message_type type, gboolean *ext, gboolean *eog, gboolean *oid) |
Helper function to parse a imquic_moq_datagram_message_type value for OBJECT_DATAGRAM to the individual properties. | |
| const char * | imquic_moq_datagram_message_type_str (imquic_moq_datagram_message_type type, imquic_moq_version version) |
| Helper function to serialize to string the name of a imquic_moq_datagram_message_type value. | |
| imquic_moq_data_message_type | imquic_moq_data_message_type_from_subgroup_header (imquic_moq_version version, gboolean subgroup, gboolean sgid0, gboolean ext, gboolean eog) |
Helper function to return the imquic_moq_data_message_type value for SUBRGOUP_HEADER out of the individual properties. | |
| void | imquic_moq_data_message_type_to_subgroup_header (imquic_moq_version version, imquic_moq_data_message_type type, gboolean *subgroup, gboolean *sgid0, gboolean *ext, gboolean *eog) |
Helper function to parse a imquic_moq_data_message_type value for SUBRGOUP_HEADER to the individual properties. | |
| const char * | imquic_moq_data_message_type_str (imquic_moq_data_message_type type, imquic_moq_version version) |
| Helper function to serialize to string the name of a imquic_moq_data_message_type value. | |
| imquic_moq_delivery | imquic_moq_data_message_type_to_delivery (imquic_moq_data_message_type type, imquic_moq_version version) |
| Helper function to return the imquic_moq_delivery mode associated to a imquic_moq_data_message_type type. | |
| const char * | imquic_moq_setup_parameter_type_str (imquic_moq_setup_parameter_type type) |
| Helper function to serialize to string the name of a imquic_moq_setup_parameter_type value. | |
| const char * | imquic_moq_subscribe_parameter_type_str (imquic_moq_subscribe_parameter_type type, imquic_moq_version version) |
| Helper function to serialize to string the name of a imquic_moq_subscribe_parameter_type value. | |
| const char * | imquic_moq_role_type_str (imquic_moq_role_type type) |
| Helper function to serialize to string the name of a imquic_moq_role_type value. | |
| const char * | imquic_moq_filter_type_str (imquic_moq_filter_type type) |
| Helper function to serialize to string the name of a imquic_moq_filter_type value. | |
| const char * | imquic_moq_group_order_str (imquic_moq_group_order type) |
| Helper function to serialize to string the name of a imquic_moq_group_order value. | |
| const char * | imquic_moq_fetch_type_str (imquic_moq_fetch_type type) |
| Helper function to serialize to string the name of a imquic_moq_fetch_type value. | |
| const char * | imquic_moq_auth_token_alias_type_str (imquic_moq_auth_token_alias_type type) |
| Helper function to serialize to string the name of a imquic_moq_auth_token_alias_type property. | |
| size_t | imquic_moq_setup_parameters_serialize (imquic_moq_context *moq, imquic_moq_setup_parameters *parameters, uint8_t *bytes, size_t blen, uint8_t *params_num) |
| Helper to serialize a imquic_moq_setup_parameters set to a buffer. | |
| size_t | imquic_moq_subscribe_parameters_serialize (imquic_moq_context *moq, imquic_moq_subscribe_parameters *parameters, uint8_t *bytes, size_t blen, uint8_t *params_num) |
| Helper to serialize a imquic_moq_subscribe_parameters set to a buffer. | |
| gboolean | imquic_moq_buffer_resize (imquic_moq_buffer *buffer, uint64_t new_size) |
| Resize an existing buffer. | |
| void | imquic_moq_buffer_append (imquic_moq_buffer *buffer, uint8_t *bytes, uint64_t length) |
| Append data at the end of the buffer. | |
| void | imquic_moq_buffer_shift (imquic_moq_buffer *buffer, uint64_t length) |
| Move the data in the buffer back of a specific number of bytes. | |
| void | imquic_moq_buffer_destroy (imquic_moq_buffer *buffer) |
| Destroy an existing buffer. | |
| imquic_moq_subscription * | imquic_moq_subscription_create (uint64_t request_id, uint64_t track_alias) |
| Helper to create a new subscription instance. | |
| void | imquic_moq_subscription_destroy (imquic_moq_subscription *moq_sub) |
| Destroy an existing MoQ subscription. | |
| void | imquic_moq_stream_destroy (imquic_moq_stream *moq_stream) |
| Destroy an existing MoQ stream. | |
| int | imquic_moq_parse_message (imquic_moq_context *moq, uint64_t stream_id, uint8_t *bytes, size_t blen, gboolean complete, gboolean datagram) |
| Parse an incoming MoQ message. | |
| size_t | imquic_moq_parse_client_setup (imquic_moq_context *moq, uint8_t *bytes, size_t blen, gboolean legacy, uint8_t *error) |
Helper to parse a CLIENT_SETUP message. | |
| size_t | imquic_moq_parse_server_setup (imquic_moq_context *moq, uint8_t *bytes, size_t blen, gboolean legacy, uint8_t *error) |
Helper to parse a SERVER_SETUP message. | |
| size_t | imquic_moq_parse_max_request_id (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a MAX_REQUEST_ID message. | |
| size_t | imquic_moq_parse_requests_blocked (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a REQUESTS_BLOCKED message. | |
| size_t | imquic_moq_parse_publish_namespace (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a PUBLISH_NAMESPACE message. | |
| size_t | imquic_moq_parse_publish_namespace_ok (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a PUBLISH_NAMESPACE_OK message. | |
| size_t | imquic_moq_parse_publish_namespace_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a PUBLISH_NAMESPACE_ERROR message. | |
| size_t | imquic_moq_parse_publish_namespace_done (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a PUBLISH_NAMESPACE_DONE message. | |
| size_t | imquic_moq_parse_publish_namespace_cancel (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a PUBLISH_NAMESPACE_CANCEL message. | |
| size_t | imquic_moq_parse_publish (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a PUBLISH message. | |
| size_t | imquic_moq_parse_publish_ok (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a PUBLISH_OK message. | |
| size_t | imquic_moq_parse_publish_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a PUBLISH_ERROR message. | |
| size_t | imquic_moq_parse_subscribe (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SUBSCRIBE message. | |
| size_t | imquic_moq_parse_subscribe_update (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SUBSCRIBE_UPDATE message. | |
| size_t | imquic_moq_parse_subscribe_ok (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SUBSCRIBE_OK message. | |
| size_t | imquic_moq_parse_subscribe_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SUBSCRIBE_ERROR message. | |
| size_t | imquic_moq_parse_unsubscribe (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse an UNSUBSCRIBE message. | |
| size_t | imquic_moq_parse_publish_done (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a PUBLISH_DONE message. | |
| size_t | imquic_moq_parse_subscribe_namespace (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SUBSCRIBE_NAMESPACE message. | |
| size_t | imquic_moq_parse_subscribe_namespace_ok (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SUBSCRIBE_NAMESPACE_OK message. | |
| size_t | imquic_moq_parse_subscribe_namespace_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a SUBSCRIBE_NAMESPACE_ERROR message. | |
| size_t | imquic_moq_parse_unsubscribe_namespace (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse an UNSUBSCRIBE_NAMESPACE message. | |
| size_t | imquic_moq_parse_fetch (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a FETCH message. | |
| size_t | imquic_moq_parse_fetch_cancel (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a FETCH_CANCEL message. | |
| size_t | imquic_moq_parse_fetch_ok (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a FETCH_OK message. | |
| size_t | imquic_moq_parse_fetch_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a FETCH_ERROR message. | |
| size_t | imquic_moq_parse_track_status (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a TRACK_STATUS message. | |
| size_t | imquic_moq_parse_track_status_ok (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a TRACK_STATUS_OK message. | |
| size_t | imquic_moq_parse_track_status_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a TRACK_STATUS_ERROR message. | |
| size_t | imquic_moq_parse_object_datagram (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_datagram_message_type dtype, uint8_t *error) |
Helper to parse an OBJECT_DATAGRAM message. | |
| size_t | imquic_moq_parse_object_datagram_status (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_datagram_message_type dtype, uint8_t *error) |
Helper to parse an OBJECT_DATAGRAM_STATUS message. | |
| size_t | imquic_moq_parse_stream_header_track (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a STREAM_HEADER_TRACK message. | |
| int | imquic_moq_parse_stream_header_track_object (imquic_moq_context *moq, imquic_moq_stream *moq_stream, gboolean complete, uint8_t *error) |
Helper to parse a STREAM_HEADER_TRACK object. | |
| size_t | imquic_moq_parse_subgroup_header (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, imquic_moq_data_message_type dtype, uint8_t *error) |
Helper to parse a SUBGROUP_HEADER message. | |
| int | imquic_moq_parse_subgroup_header_object (imquic_moq_context *moq, imquic_moq_stream *moq_stream, gboolean complete, uint8_t *error) |
Helper to parse a SUBGROUP_HEADER object. | |
| size_t | imquic_moq_parse_fetch_header (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a FETCH_HEADER message. | |
| int | imquic_moq_parse_fetch_header_object (imquic_moq_context *moq, imquic_moq_stream *moq_stream, gboolean complete, uint8_t *error) |
Helper to parse a FETCH_HEADER object. | |
| size_t | imquic_moq_parse_goaway (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint8_t *error) |
Helper to parse a GOAWAY message. | |
| size_t | imquic_moq_add_control_message (imquic_moq_context *moq, imquic_moq_message_type type, uint8_t *bytes, size_t blen, size_t poffset, size_t plen, size_t *start) |
| Helper method to put a message header and a payload together. | |
| size_t | imquic_moq_add_client_setup (imquic_moq_context *moq, uint8_t *bytes, size_t blen, GList *supported_versions, imquic_moq_setup_parameters *parameters) |
Helper method to add a CLIENT_SETUP message to a buffer. | |
| size_t | imquic_moq_add_server_setup (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint32_t version, imquic_moq_setup_parameters *parameters) |
Helper method to add a SERVER_SETUP message to a buffer. | |
| size_t | imquic_moq_add_max_request_id (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t max_request_id) |
Helper method to add a MAX_REQUEST_ID message to a buffer. | |
| size_t | imquic_moq_add_requests_blocked (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t max_request_id) |
Helper method to add a REQUESTS_BLOCKED message to a buffer. | |
| size_t | imquic_moq_add_publish_namespace (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_namespace *track_namespace, imquic_moq_subscribe_parameters *parameters) |
Helper method to add a PUBLISH_NAMESPACE message to a buffer. | |
| size_t | imquic_moq_add_publish_namespace_ok (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_namespace *track_namespace) |
Helper method to add a PUBLISH_NAMESPACE_OK message to a buffer. | |
| size_t | imquic_moq_add_publish_namespace_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_namespace *track_namespace, imquic_moq_publish_namespace_error_code error, const char *reason) |
Helper method to add a PUBLISH_NAMESPACE_ERROR message to a buffer. | |
| size_t | imquic_moq_add_publish_namespace_done (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_namespace *track_namespace) |
Helper method to add a PUBLISH_NAMESPACE_DONE message to a buffer. | |
| size_t | imquic_moq_add_publish_namespace_cancel (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_namespace *track_namespace, imquic_moq_publish_namespace_error_code error, const char *reason) |
Helper method to add aN PUBLISH_NAMESPACE_CANCEL message to a buffer. | |
| size_t | imquic_moq_add_publish (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_namespace *track_namespace, imquic_moq_name *track_name, uint64_t track_alias, uint8_t group_order, gboolean content_exists, uint64_t largest_group_id, uint64_t largest_object_id, gboolean forward, imquic_moq_subscribe_parameters *parameters) |
Helper to add a PUBLISH message to a buffer. | |
| size_t | imquic_moq_add_publish_ok (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, gboolean forward, uint8_t priority, uint8_t group_order, imquic_moq_filter_type filter, uint64_t start_group, uint64_t start_object, uint64_t end_group, uint64_t end_object, imquic_moq_subscribe_parameters *parameters) |
Helper method to add a PUBLISH_OK message to a buffer. | |
| size_t | imquic_moq_add_publish_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_pub_error_code error, const char *reason) |
Helper method to add a PUBLISH_ERRROR message to a buffer. | |
| size_t | imquic_moq_add_subscribe (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, uint64_t track_alias, imquic_moq_namespace *track_namespace, imquic_moq_name *track_name, uint8_t priority, uint8_t group_order, gboolean forward, imquic_moq_filter_type filter, uint64_t start_group, uint64_t start_object, uint64_t end_group, uint64_t end_object, imquic_moq_subscribe_parameters *parameters) |
Helper to add a SUBSCRIBE message to a buffer. | |
| size_t | imquic_moq_add_subscribe_update (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, uint64_t sub_request_id, uint64_t start_group, uint64_t start_object, uint64_t end_group, uint64_t end_object, uint8_t priority, gboolean forward, imquic_moq_subscribe_parameters *parameters) |
Helper method to add a SUBSCRIBE_UPDATE message to a buffer. | |
| size_t | imquic_moq_add_subscribe_ok (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, uint64_t track_alias, uint64_t expires, imquic_moq_group_order group_order, gboolean content_exists, uint64_t largest_group_id, uint64_t largest_object_id, imquic_moq_subscribe_parameters *parameters) |
Helper method to add a SUBSCRIBE_OK message to a buffer. | |
| size_t | imquic_moq_add_subscribe_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_sub_error_code error, const char *reason, uint64_t track_alias) |
Helper method to add a SUBSCRIBE_ERRROR message to a buffer. | |
| size_t | imquic_moq_add_unsubscribe (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id) |
Helper method to add an UNSUBSCRIBE message to a buffer. | |
| size_t | imquic_moq_add_publish_done (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_sub_done_code status, uint64_t streams_count, const char *reason, gboolean content_exists, uint64_t final_group, uint64_t final_object) |
Helper method to add a PUBLISH_DONE message to a buffer. | |
| size_t | imquic_moq_add_subscribe_namespace (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_namespace *track_namespace, imquic_moq_subscribe_parameters *parameters) |
Helper to add a SUBSCRIBE_NAMESPACE message to a buffer. | |
| size_t | imquic_moq_add_subscribe_namespace_ok (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_namespace *track_namespace) |
Helper method to add a SUBSCRIBE_NAMESPACE_OK message to a buffer. | |
| size_t | imquic_moq_add_subscribe_namespace_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_namespace *track_namespace, imquic_moq_subns_error_code error, const char *reason) |
Helper method to add a SUBSCRIBE_NAMESPACE_ERRROR message to a buffer. | |
| size_t | imquic_moq_add_unsubscribe_namespace (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_namespace *track_namespace) |
Helper method to add an UNSUBSCRIBE_NAMESPACE message to a buffer. | |
| size_t | imquic_moq_add_fetch (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_fetch_type type, uint64_t request_id, uint64_t joining_request_id, uint64_t preceding_group_offset, imquic_moq_namespace *track_namespace, imquic_moq_name *track_name, uint8_t priority, imquic_moq_group_order group_order, imquic_moq_location_range *range, imquic_moq_subscribe_parameters *parameters) |
Helper to add a FETCH message to a buffer. | |
| size_t | imquic_moq_add_fetch_cancel (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id) |
Helper method to add an FETCH_CANCEL message to a buffer. | |
| size_t | imquic_moq_add_fetch_ok (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, uint8_t group_order, uint8_t end_of_track, uint64_t largest_group_id, uint64_t largest_object_id, imquic_moq_subscribe_parameters *parameters) |
Helper method to add a FETCH_OK message to a buffer. | |
| size_t | imquic_moq_add_fetch_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_fetch_error_code error, const char *reason) |
Helper method to add a FETCH_ERRROR message to a buffer. | |
| size_t | imquic_moq_add_track_status (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_namespace *track_namespace, imquic_moq_name *track_name, uint8_t priority, uint8_t group_order, gboolean forward, imquic_moq_filter_type filter, uint64_t start_group, uint64_t start_object, uint64_t end_group, uint64_t end_object, imquic_moq_subscribe_parameters *parameters) |
Helper to add a TRACK_STATUS message to a buffer. | |
| size_t | imquic_moq_add_track_status_ok (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, uint64_t track_alias, uint64_t expires, imquic_moq_group_order group_order, gboolean content_exists, uint64_t largest_group_id, uint64_t largest_object_id, imquic_moq_subscribe_parameters *parameters) |
Helper method to add a TRACK_STATUS_OK message to a buffer. | |
| size_t | imquic_moq_add_track_status_error (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, imquic_moq_sub_error_code error, const char *reason) |
Helper method to add a TRACK_STATUS_ERRROR message to a buffer. | |
| size_t | imquic_moq_add_object_datagram (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, uint64_t track_alias, uint64_t group_id, uint64_t object_id, uint64_t object_status, uint8_t priority, uint8_t *payload, size_t plen, size_t extensions_count, uint8_t *extensions, size_t elen) |
Helper to add an OBJECT_DATAGRAM message to a buffer. | |
| size_t | imquic_moq_add_object_datagram_status (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t track_alias, uint64_t group_id, uint64_t object_id, uint8_t priority, uint64_t object_status, uint8_t *extensions, size_t elen) |
Helper to add an OBJECT_DATAGRAM_STATUS message to a buffer. | |
| size_t | imquic_moq_add_stream_header_track (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id, uint64_t track_alias, uint8_t priority) |
Helper to add a STREAM_HEADER_TRACK message to a buffer (only before v06) | |
| size_t | imquic_moq_add_stream_header_track_object (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t group_id, uint64_t object_id, uint64_t object_status, uint8_t *payload, size_t plen) |
Helper to add an object to a buffer, formatted as expected for STREAM_HEADER_TRACK objects (so not all IDs) (only before v06) | |
| size_t | imquic_moq_add_subgroup_header (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint64_t request_id, uint64_t track_alias, uint64_t group_id, uint64_t subgroup_id, uint8_t priority) |
Helper to add a SUBGROUP_HEADER message to a buffer (only after v06) | |
| size_t | imquic_moq_add_subgroup_header_object (imquic_moq_context *moq, imquic_moq_stream *moq_stream, uint8_t *bytes, size_t blen, uint64_t object_id, uint64_t object_status, uint8_t *payload, size_t plen, size_t extensions_count, uint8_t *extensions, size_t elen) |
Helper to add an object to a buffer, formatted as expected for SUBGROUP_HEADER objects (so not all IDs) (only after v06) | |
| size_t | imquic_moq_add_fetch_header (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t request_id) |
Helper to add a FETCH_HEADER message to a buffer (only after v07) | |
| size_t | imquic_moq_add_fetch_header_object (imquic_moq_context *moq, uint8_t *bytes, size_t blen, uint64_t group_id, uint64_t subgroup_id, uint64_t object_id, uint8_t priority, uint64_t object_status, uint8_t *payload, size_t plen, size_t extensions_count, uint8_t *extensions, size_t elen) |
Helper to add an object to a buffer, formatted as expected for FETCH_HEADER objects (so not all IDs) (only before v06) | |
| size_t | imquic_moq_add_goaway (imquic_moq_context *moq, uint8_t *bytes, size_t blen, const char *new_session_uri) |
Helper method to add a GOAWAY message to a buffer. | |
| size_t | imquic_moq_add_object_extensions (imquic_moq_context *moq, uint8_t *bytes, size_t blen, size_t extensions_count, uint8_t *extensions, size_t elen) |
| Helper method to add object extensions to a buffer. | |
| size_t | imquic_moq_parameter_add_int (imquic_moq_context *moq, uint8_t *bytes, size_t blen, int param, uint64_t number) |
| Helper to add a MoQ (setup or subscribe) parameter with a numeric value to a buffer. | |
| size_t | imquic_moq_parameter_add_data (imquic_moq_context *moq, uint8_t *bytes, size_t blen, int param, uint8_t *buf, size_t buflen) |
| Helper to add a MoQ (setup or subscribe) parameter with generic data to a buffer. | |
| size_t | imquic_moq_parse_setup_parameter (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_setup_parameters *params, uint8_t *error) |
| Helper method to parse a MoQ setup parameter. | |
| size_t | imquic_moq_parse_subscribe_parameter (imquic_moq_context *moq, uint8_t *bytes, size_t blen, imquic_moq_subscribe_parameters *params, uint8_t *error) |
| Helper method to parse a MoQ subscribe parameter. | |
| int | imquic_moq_set_role (imquic_connection *conn, imquic_moq_role role) |
| Method to set the MoQ role on a connection. Must be done as soon as the connection is established, and before sending any MoQ message. A good place to do that is the callback fired when a new connection is available. | |
| imquic_moq_role | imquic_moq_get_role (imquic_connection *conn) |
| Helper function to get the MoQ role associated with a connection. | |
| int | imquic_moq_set_version (imquic_connection *conn, imquic_moq_version version) |
| Method to set the MoQ version on a connection. Must be done as soon as the connection is established, and before sending any MoQ message. A good place to do that is the callback fired when a new connection is available. | |
| imquic_moq_version | imquic_moq_get_version (imquic_connection *conn) |
| Helper function to get the MoQ version associated with a connection. | |
| int | imquic_moq_set_connection_auth (imquic_connection *conn, uint8_t *auth, size_t authlen) |
| Method to provide credentials, as a client, on a new connection. If credentials need to provided, this must be done as soon as the connection is established, and before sending any MoQ message. A good place to do that is the callback fired when a new connection is available. | |
| int | imquic_moq_set_max_request_id (imquic_connection *conn, uint64_t max_request_id) |
| Helper function to set the Maximum Request ID a subscriber can send. | |
| uint64_t | imquic_moq_get_next_request_id (imquic_connection *conn) |
| Helper function to get the next Request ID we can use. | |
| GList * | imquic_moq_parse_object_extensions (uint8_t *extensions, size_t elen) |
| Helper mode to parse an extensions buffer to a GList of imquic_moq_object_extension. | |
| size_t | imquic_moq_build_object_extensions (GList *extensions, uint8_t *bytes, size_t blen) |
| Helper mode to craft an extensions buffer out of a GList of imquic_moq_object_extension. | |
| int | imquic_moq_parse_auth_token (uint8_t *bytes, size_t blen, imquic_moq_auth_token *token) |
| Helper mode to parse an auth token buffer to a imquic_moq_auth_token instance. | |
| size_t | imquic_moq_build_auth_token (imquic_moq_auth_token *token, uint8_t *bytes, size_t blen) |
| Helper mode to craft an auth token buffer out of a imquic_moq_auth_token instance. | |
| int | imquic_moq_publish_namespace (imquic_connection *conn, uint64_t request_id, imquic_moq_namespace *tns, uint8_t *auth, size_t authlen) |
Function to send a PUBLISH_NAMESPACE request. | |
| int | imquic_moq_accept_publish_namespace (imquic_connection *conn, uint64_t request_id, imquic_moq_namespace *tns) |
Function to accept an incoming PUBLISH_NAMESPACE request. | |
| int | imquic_moq_reject_publish_namespace (imquic_connection *conn, uint64_t request_id, imquic_moq_namespace *tns, imquic_moq_publish_namespace_error_code error_code, const char *reason) |
Function to reject an incoming PUBLISH_NAMESPACE request. | |
| int | imquic_moq_publish_namespace_done (imquic_connection *conn, imquic_moq_namespace *tns) |
Function to send a PUBLISH_NAMESPACE_DONE request. | |
| int | imquic_moq_publish (imquic_connection *conn, uint64_t request_id, imquic_moq_namespace *tns, imquic_moq_name *tn, uint64_t track_alias, gboolean descending, imquic_moq_location *largest, gboolean forward, uint8_t *auth, size_t authlen) |
Function to send a PUBLISH request. | |
| int | imquic_moq_accept_publish (imquic_connection *conn, uint64_t request_id, gboolean forward, uint8_t priority, gboolean descending, imquic_moq_filter_type filter_type, imquic_moq_location *start_location, imquic_moq_location *end_location) |
Function to accept an incoming PUBLISH request. | |
| int | imquic_moq_reject_publish (imquic_connection *conn, uint64_t request_id, imquic_moq_pub_error_code error_code, const char *reason) |
Function to reject an incoming PUBLISH request. | |
| int | imquic_moq_subscribe (imquic_connection *conn, uint64_t request_id, uint64_t track_alias, imquic_moq_namespace *tns, imquic_moq_name *tn, uint8_t priority, gboolean descending, gboolean forward, imquic_moq_filter_type filter_type, imquic_moq_location *start_location, imquic_moq_location *end_location, uint8_t *auth, size_t authlen) |
Function to send a SUBSCRIBE request. | |
| int | imquic_moq_accept_subscribe (imquic_connection *conn, uint64_t request_id, uint64_t track_alias, uint64_t expires, gboolean descending, imquic_moq_location *largest) |
Function to accept an incoming SUBSCRIBE request. | |
| int | imquic_moq_reject_subscribe (imquic_connection *conn, uint64_t request_id, imquic_moq_sub_error_code error_code, const char *reason, uint64_t track_alias) |
Function to reject an incoming SUBSCRIBE request. | |
| int | imquic_moq_update_subscribe (imquic_connection *conn, uint64_t request_id, uint64_t sub_request_id, imquic_moq_location *start_location, uint64_t end_group, uint8_t priority, gboolean forward) |
Function to send a SUBSCRIBE_UPDATE request. | |
| int | imquic_moq_unsubscribe (imquic_connection *conn, uint64_t request_id) |
Function to send a UNSUBSCRIBE request. | |
| int | imquic_moq_publish_done (imquic_connection *conn, uint64_t request_id, imquic_moq_sub_done_code status_code, const char *reason) |
Function to send a PUBLISH_DONE request. | |
| int | imquic_moq_subscribe_namespace (imquic_connection *conn, uint64_t request_id, imquic_moq_namespace *tns, uint8_t *auth, size_t authlen) |
Function to send a SUBSCRIBE_NAMESPACE request. | |
| int | imquic_moq_accept_subscribe_namespace (imquic_connection *conn, uint64_t request_id, imquic_moq_namespace *tns) |
Function to accept an incoming SUBSCRIBE_NAMESPACE request. | |
| int | imquic_moq_reject_subscribe_namespace (imquic_connection *conn, uint64_t request_id, imquic_moq_namespace *tns, imquic_moq_subns_error_code error_code, const char *reason) |
Function to reject an incoming SUBSCRIBE_NAMESPACE request. | |
| int | imquic_moq_unsubscribe_namespace (imquic_connection *conn, imquic_moq_namespace *tns) |
Function to send a UNSUBSCRIBE_NAMESPACE request. | |
| int | imquic_moq_standalone_fetch (imquic_connection *conn, uint64_t request_id, imquic_moq_namespace *tns, imquic_moq_name *tn, gboolean descending, imquic_moq_location_range *range, uint8_t *auth, size_t authlen) |
Function to send a standalone FETCH request. | |
| int | imquic_moq_joining_fetch (imquic_connection *conn, uint64_t request_id, uint64_t joining_request_id, gboolean absolute, uint64_t joining_start, gboolean descending, uint8_t *auth, size_t authlen) |
Function to send a joining FETCH request. | |
| int | imquic_moq_accept_fetch (imquic_connection *conn, uint64_t request_id, gboolean descending, imquic_moq_location *largest) |
Function to accept an incoming FETCH request. | |
| int | imquic_moq_reject_fetch (imquic_connection *conn, uint64_t request_id, imquic_moq_fetch_error_code error_code, const char *reason) |
Function to reject an incoming FETCH request. | |
| int | imquic_moq_cancel_fetch (imquic_connection *conn, uint64_t request_id) |
Function to send a FETCH_CANCEL request. | |
| int | imquic_moq_track_status (imquic_connection *conn, uint64_t request_id, imquic_moq_namespace *tns, imquic_moq_name *tn, uint8_t priority, gboolean descending, gboolean forward, imquic_moq_filter_type filter_type, imquic_moq_location *start_location, imquic_moq_location *end_location, uint8_t *auth, size_t authlen) |
Function to send a TRACK_STATUS request. | |
| int | imquic_moq_accept_track_status (imquic_connection *conn, uint64_t request_id, uint64_t track_alias, uint64_t expires, gboolean descending, imquic_moq_location *largest) |
Function to accept an incoming TRACK_STATUS request. | |
| int | imquic_moq_reject_track_status (imquic_connection *conn, uint64_t request_id, imquic_moq_sub_error_code error_code, const char *reason) |
Function to reject an incoming TRACK_STATUS request. | |
| int | imquic_moq_requests_blocked (imquic_connection *conn) |
Function to send a REQUESTS_BLOCKED request. | |
| int | imquic_moq_goaway (imquic_connection *conn, const char *uri) |
Function to send a GOAWAY request. | |
| int | imquic_moq_send_object (imquic_connection *conn, imquic_moq_object *object) |
| Function to send a MoQ object. | |
| json_t * | imquic_qlog_moq_message_prepare (const char *type) |
| Helper to create a new QLOG MoQT message. | |
| void | imquic_qlog_moq_message_add_namespace (json_t *message, imquic_moq_namespace *track_namespace) |
| Helper to add a stringified namespace tuple array to a message. | |
| void | imquic_qlog_moq_message_add_track (json_t *message, imquic_moq_name *track_name) |
| Helper to add a stringified track name to a message. | |
| void | imquic_qlog_moq_message_add_setup_parameters (json_t *message, imquic_moq_setup_parameters *parameters, const char *name) |
| Helper to add a stringified array of setup parameters to a message. | |
| void | imquic_qlog_moq_message_add_subscribe_parameters (json_t *message, imquic_moq_subscribe_parameters *parameters, const char *name) |
| Helper to add a stringified array of subscribe parameters to a message. | |
| void | imquic_moq_qlog_control_message_created (imquic_qlog *qlog, uint64_t stream_id, size_t length, json_t *message) |
Add a control_message_created event. | |
| void | imquic_moq_qlog_control_message_parsed (imquic_qlog *qlog, uint64_t stream_id, size_t length, json_t *message) |
Add a control_message_parsed event. | |
| void | imquic_moq_qlog_stream_type_set (imquic_qlog *qlog, gboolean local, uint64_t stream_id, const char *type) |
Add a stream_type_set event. | |
| void | imquic_moq_qlog_object_datagram_created (imquic_qlog *qlog, imquic_moq_object *object) |
Add a object_datagram_created event. | |
| void | imquic_moq_qlog_object_datagram_parsed (imquic_qlog *qlog, imquic_moq_object *object) |
Add a object_datagram_parsed event. | |
| void | imquic_moq_qlog_object_datagram_status_created (imquic_qlog *qlog, imquic_moq_object *object) |
Add a object_datagram_status_created event. | |
| void | imquic_moq_qlog_object_datagram_status_parsed (imquic_qlog *qlog, imquic_moq_object *object) |
Add a object_datagram_status_parsed event. | |
| void | imquic_moq_qlog_subgroup_header_created (imquic_qlog *qlog, imquic_moq_stream *stream) |
Add a subgroup_header_created event. | |
| void | imquic_moq_qlog_subgroup_header_parsed (imquic_qlog *qlog, imquic_moq_stream *stream) |
Add a subgroup_header_parsed event. | |
| void | imquic_moq_qlog_subgroup_object_created (imquic_qlog *qlog, uint64_t stream_id, imquic_moq_object *object) |
Add a subgroup_object_created event. | |
| void | imquic_moq_qlog_subgroup_object_parsed (imquic_qlog *qlog, uint64_t stream_id, imquic_moq_object *object) |
Add a subgroup_object_parsed event. | |
| void | imquic_moq_qlog_fetch_header_created (imquic_qlog *qlog, imquic_moq_stream *stream) |
Add a fetch_header_created event. | |
| void | imquic_moq_qlog_fetch_header_parsed (imquic_qlog *qlog, imquic_moq_stream *stream) |
Add a fetch_header_parsed event. | |
| void | imquic_moq_qlog_fetch_object_created (imquic_qlog *qlog, uint64_t stream_id, imquic_moq_object *object) |
Add a fetch_object_created event. | |
| void | imquic_moq_qlog_fetch_object_parsed (imquic_qlog *qlog, uint64_t stream_id, imquic_moq_object *object) |
Add a fetch_object_parsed event. | |
Media Over QUIC (MoQ) stack.
Implementation of the Media Over QUIC (MoQ) stack as part of the library itself. At the time of writing, this implements (most of) versions from -06 to to -14 of the protocol.
| #define IMQUIC_MOQ_ADD_NAMESPACES | ( | request | ) |
| #define IMQUIC_MOQ_ADD_TRACKNAME | ( | request | ) |
| #define IMQUIC_MOQ_CHECK_ERR | ( | cond, | |
| error, | |||
| code, | |||
| res, | |||
| reason ) |
| #define IMQUIC_MOQ_LOG_HUGE IMQUIC_LOG_VERB |
| #define IMQUIC_MOQ_LOG_VERB IMQUIC_LOG_HUGE |
| #define IMQUIC_MOQ_PARSE_NAMESPACES | ( | tns_num, | |
| i, | |||
| error_message, | |||
| last ) |
| #define IMQUIC_MOQ_PARSE_TRACKNAME | ( | error_message, | |
| last ) |
| int imquic_moq_accept_fetch | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| gboolean | descending, | ||
| imquic_moq_location * | largest ) |
Function to accept an incoming FETCH request.
| conn | The imquic_connection to send the request on |
| request_id | The unique request_id value associated to the subscription to accept |
| descending | Whether objects will be delivered in descending group order |
| largest | The largest group/object IDs |
| int imquic_moq_accept_publish | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| gboolean | forward, | ||
| uint8_t | priority, | ||
| gboolean | descending, | ||
| imquic_moq_filter_type | filter_type, | ||
| imquic_moq_location * | start_location, | ||
| imquic_moq_location * | end_location ) |
Function to accept an incoming PUBLISH request.
| conn | The imquic_connection to send the request on |
| request_id | The unique request_id value associated to the subscription to accept |
| forward | Whether objects should be forwarded, when this subscription is accepted (ignored before v11) |
| priority | The publishr priority |
| descending | Whether objects should be fetched in descending order, per each group |
| filter_type | The subscription filter type |
| start_location | The group and object to start from (ignored if the filter is not AbsoluteStart or AbsoluteRange) |
| end_location | The group (and for v06/v07 the object) to end at (ignored if the filter is not AbsoluteRange) |
| int imquic_moq_accept_publish_namespace | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| imquic_moq_namespace * | tns ) |
Function to accept an incoming PUBLISH_NAMESPACE request.
| conn | The imquic_connection to send the request on |
| request_id | The request ID of the original PUBLISH_NAMESPACE request (only v11 and later) |
| tns | The imquic_moq_namespace namespace to accept (only before v11) |
| int imquic_moq_accept_subscribe | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| uint64_t | track_alias, | ||
| uint64_t | expires, | ||
| gboolean | descending, | ||
| imquic_moq_location * | largest ) |
Function to accept an incoming SUBSCRIBE request.
| conn | The imquic_connection to send the request on |
| request_id | The unique request_id value associated to the subscription to accept |
| track_alias | The unique track_alias value associated to the subscription to accept (ignored before v12) |
| expires | Value of expires to send back |
| descending | Whether objects will be delivered in descending group order |
| largest | The largest group/object IDs, in case content exists |
| int imquic_moq_accept_subscribe_namespace | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| imquic_moq_namespace * | tns ) |
Function to accept an incoming SUBSCRIBE_NAMESPACE request.
| conn | The imquic_connection to send the request on |
| request_id | The request ID of the original SUBSCRIBE_NAMESPACE request (only v11 and later) |
| tns | The imquic_moq_namespace namespace to accept notifications for (only before v11) |
| int imquic_moq_accept_track_status | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| uint64_t | track_alias, | ||
| uint64_t | expires, | ||
| gboolean | descending, | ||
| imquic_moq_location * | largest ) |
Function to accept an incoming TRACK_STATUS request.
TRACK_STATUS , support for this request is disabled in versions earlier than v13 | conn | The imquic_connection to send the request on |
| request_id | The unique request_id value associated to the subscription to accept |
| track_alias | The unique track_alias value associated to the subscription to accept |
| expires | Value of expires to send back |
| descending | Whether objects will be delivered in descending group order |
| largest | The largest group/object IDs, in case content exists |
| size_t imquic_moq_add_client_setup | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| GList * | supported_versions, | ||
| imquic_moq_setup_parameters * | parameters ) |
Helper method to add a CLIENT_SETUP message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| supported_versions | List of supported versions |
| parameters | The setup parameters to send |
| size_t imquic_moq_add_control_message | ( | imquic_moq_context * | moq, |
| imquic_moq_message_type | type, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| size_t | poffset, | ||
| size_t | plen, | ||
| size_t * | start ) |
Helper method to put a message header and a payload together.
| [in] | moq | The imquic_moq_context generating the message |
| [in] | type | The ID of the control message to send |
| [in] | bytes | The buffer to add the control message to |
| [in] | blen | The size of the buffer |
| [in] | poffset | Where in the provided buffer we already have the payload |
| [in] | plen | Size of the payload in the buffer |
| [out] | start | Where the final control message starts, in the buffer |
| size_t imquic_moq_add_fetch | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_fetch_type | type, | ||
| uint64_t | request_id, | ||
| uint64_t | joining_request_id, | ||
| uint64_t | preceding_group_offset, | ||
| imquic_moq_namespace * | track_namespace, | ||
| imquic_moq_name * | track_name, | ||
| uint8_t | priority, | ||
| imquic_moq_group_order | group_order, | ||
| imquic_moq_location_range * | range, | ||
| imquic_moq_subscribe_parameters * | parameters ) |
Helper to add a FETCH message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| type | The FETCH type |
| request_id | The request ID to put in the message |
| joining_request_id | The joining request ID to put in the message, if any |
| preceding_group_offset | The preceding group offset for joining fetches, if any |
| track_namespace | The namespace to put in the message |
| track_name | The track name to put in the message |
| priority | The fetchr priority to put in the message |
| group_order | The group order to put in the message |
| range | The Start/End Locations to put in the message |
| parameters | The parameters to add, if any |
| size_t imquic_moq_add_fetch_cancel | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id ) |
Helper method to add an FETCH_CANCEL message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| size_t imquic_moq_add_fetch_error | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_fetch_error_code | error, | ||
| const char * | reason ) |
Helper method to add a FETCH_ERRROR message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| error | Error code associated to the message |
| reason | Verbose description of the error, if any |
| size_t imquic_moq_add_fetch_header | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id ) |
Helper to add a FETCH_HEADER message to a buffer (only after v07)
STREAM and send the header: after that, imquic_moq_add_fetch_header_object is used to send all objects that belong to this track. | moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| size_t imquic_moq_add_fetch_header_object | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | group_id, | ||
| uint64_t | subgroup_id, | ||
| uint64_t | object_id, | ||
| uint8_t | priority, | ||
| uint64_t | object_status, | ||
| uint8_t * | payload, | ||
| size_t | plen, | ||
| size_t | extensions_count, | ||
| uint8_t * | extensions, | ||
| size_t | elen ) |
Helper to add an object to a buffer, formatted as expected for FETCH_HEADER objects (so not all IDs) (only before v06)
| moq | The imquic_moq_context generating the object |
| bytes | The buffer to add the object to |
| blen | The size of the buffer |
| group_id | The group ID |
| subgroup_id | The subgroup ID |
| object_id | The object ID |
| priority | The publisher priority to put in the message |
| object_status | The object status (only added if the payload length is 0) |
| payload | The buffer containing the payload of the object |
| plen | The size of the payload buffer |
| extensions_count | The number of object extensions, if any (only in v08, deprecated in v09) |
| extensions | The buffer containing the object extensions, if any (only since v08) |
| elen | The size of the object extensions buffer (only since v08) |
| size_t imquic_moq_add_fetch_ok | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| uint8_t | group_order, | ||
| uint8_t | end_of_track, | ||
| uint64_t | largest_group_id, | ||
| uint64_t | largest_object_id, | ||
| imquic_moq_subscribe_parameters * | parameters ) |
Helper method to add a FETCH_OK message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| group_order | The group order to put in the message |
| end_of_track | Whether all objects have been published |
| largest_group_id | Largest group ID to add to the message, if needed |
| largest_object_id | Largest object ID to add to the message, if needed |
| parameters | The parameters to add, if any |
| size_t imquic_moq_add_goaway | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| const char * | new_session_uri ) |
Helper method to add a GOAWAY message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| new_session_uri | New uri value to put in the message, if any |
| size_t imquic_moq_add_max_request_id | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | max_request_id ) |
Helper method to add a MAX_REQUEST_ID message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| max_request_id | Maximum request ID to put in the message |
| size_t imquic_moq_add_object_datagram | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| uint64_t | track_alias, | ||
| uint64_t | group_id, | ||
| uint64_t | object_id, | ||
| uint64_t | object_status, | ||
| uint8_t | priority, | ||
| uint8_t * | payload, | ||
| size_t | plen, | ||
| size_t | extensions_count, | ||
| uint8_t * | extensions, | ||
| size_t | elen ) |
Helper to add an OBJECT_DATAGRAM message to a buffer.
DATAGRAM support | moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| track_alias | The track alias to put in the message |
| group_id | The group ID to put in the message |
| object_id | The object ID to put in the message |
| object_status | The object status (only added if the payload length is 0) |
| priority | The publisher priority to put in the message |
| payload | The buffer containing the payload of the object |
| plen | The size of the payload buffer |
| extensions_count | The number of object extensions, if any (only in v08, deprecated in v09) |
| extensions | The buffer containing the object extensions, if any (only since v08) |
| elen | The size of the object extensions buffer (only since v08) |
| size_t imquic_moq_add_object_datagram_status | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | track_alias, | ||
| uint64_t | group_id, | ||
| uint64_t | object_id, | ||
| uint8_t | priority, | ||
| uint64_t | object_status, | ||
| uint8_t * | extensions, | ||
| size_t | elen ) |
Helper to add an OBJECT_DATAGRAM_STATUS message to a buffer.
DATAGRAM support | moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| track_alias | The track alias to put in the message |
| group_id | The group ID to put in the message |
| object_id | The object ID to put in the message |
| priority | The publisher priority to put in the message |
| object_status | The object status (only added if the payload length is 0) |
| extensions | The buffer containing the object extensions, if any (only since v09) |
| elen | The size of the object extensions buffer (only since v09) |
| size_t imquic_moq_add_object_extensions | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| size_t | extensions_count, | ||
| uint8_t * | extensions, | ||
| size_t | elen ) |
Helper method to add object extensions to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the extensions to |
| blen | The size of the buffer |
| extensions_count | The number of object extensions, if any (ignored after v08, since v09 deprecated it) |
| extensions | The buffer containing the object extensions, if any |
| elen | The size of the object extensions buffer |
| size_t imquic_moq_add_publish | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_namespace * | track_namespace, | ||
| imquic_moq_name * | track_name, | ||
| uint64_t | track_alias, | ||
| uint8_t | group_order, | ||
| gboolean | content_exists, | ||
| uint64_t | largest_group_id, | ||
| uint64_t | largest_object_id, | ||
| gboolean | forward, | ||
| imquic_moq_subscribe_parameters * | parameters ) |
Helper to add a PUBLISH message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| track_namespace | The namespace to put in the message |
| track_name | The track name to put in the message |
| track_alias | The track alias to put in the message |
| group_order | The group order to put in the message |
| content_exists | Whether the following two properties should be added to the message |
| largest_group_id | Largest group ID to add to the message, if needed |
| largest_object_id | Largest object ID to add to the message, if needed |
| forward | The forward value to put in the message |
| parameters | The parameters to add, if any |
| size_t imquic_moq_add_publish_done | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_sub_done_code | status, | ||
| uint64_t | streams_count, | ||
| const char * | reason, | ||
| gboolean | content_exists, | ||
| uint64_t | final_group, | ||
| uint64_t | final_object ) |
Helper method to add a PUBLISH_DONE message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| status | The status of the subscrption |
| streams_count | The streams count (only after v07) |
| reason | Verbose description of the status |
| content_exists | Whether the following two properties should be added to the message (only before v08) |
| final_group | Final group ID to add to the message, if needed (only before v08) |
| final_object | Final object ID to add to the message, if needed (only before v08) |
| size_t imquic_moq_add_publish_error | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_pub_error_code | error, | ||
| const char * | reason ) |
Helper method to add a PUBLISH_ERRROR message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| error | Error code associated to the message |
| reason | Verbose description of the error, if any |
| size_t imquic_moq_add_publish_namespace | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_namespace * | track_namespace, | ||
| imquic_moq_subscribe_parameters * | parameters ) |
Helper method to add a PUBLISH_NAMESPACE message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message (only v11 and later) |
| track_namespace | Namespace to publish_namespace |
| parameters | The parameters to add, if any |
| size_t imquic_moq_add_publish_namespace_cancel | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_namespace * | track_namespace, | ||
| imquic_moq_publish_namespace_error_code | error, | ||
| const char * | reason ) |
Helper method to add aN PUBLISH_NAMESPACE_CANCEL message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| track_namespace | Namespace for which to cancel the publish_namespacement |
| error | Error code associated to the message |
| reason | Verbose description of the error, if any |
| size_t imquic_moq_add_publish_namespace_done | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_namespace * | track_namespace ) |
Helper method to add a PUBLISH_NAMESPACE_DONE message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| track_namespace | Namespace to publish_namespace_done |
| size_t imquic_moq_add_publish_namespace_error | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_namespace * | track_namespace, | ||
| imquic_moq_publish_namespace_error_code | error, | ||
| const char * | reason ) |
Helper method to add a PUBLISH_NAMESPACE_ERROR message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message (only v11 and later) |
| track_namespace | Namespace for which the publish_namespacement caused an error (only before v11) |
| error | Error code associated to the message |
| reason | Verbose description of the error, if any |
| size_t imquic_moq_add_publish_namespace_ok | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_namespace * | track_namespace ) |
Helper method to add a PUBLISH_NAMESPACE_OK message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message (only v11 and later) |
| track_namespace | Namespace for which the publish_namespacement succeeded (only before v11) |
| size_t imquic_moq_add_publish_ok | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| gboolean | forward, | ||
| uint8_t | priority, | ||
| uint8_t | group_order, | ||
| imquic_moq_filter_type | filter, | ||
| uint64_t | start_group, | ||
| uint64_t | start_object, | ||
| uint64_t | end_group, | ||
| uint64_t | end_object, | ||
| imquic_moq_subscribe_parameters * | parameters ) |
Helper method to add a PUBLISH_OK message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| forward | The forward value to put in the message (only starting from v11) |
| priority | The subscriber priority to put in the message |
| group_order | The group order to put in the message |
| filter | The filter as a imquic_moq_filter_type value |
| start_group | The start group ID to put in the message |
| start_object | The start object ID to put in the message |
| end_group | The end group ID to put in the message |
| end_object | The end object ID to put in the message |
| parameters | The parameters to add, if any (only after v06) |
| size_t imquic_moq_add_requests_blocked | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | max_request_id ) |
Helper method to add a REQUESTS_BLOCKED message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| max_request_id | Maximum request ID to put in the message |
| size_t imquic_moq_add_server_setup | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint32_t | version, | ||
| imquic_moq_setup_parameters * | parameters ) |
Helper method to add a SERVER_SETUP message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| version | Negotiated version |
| parameters | The setup parameters to send |
| size_t imquic_moq_add_stream_header_track | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| uint64_t | track_alias, | ||
| uint8_t | priority ) |
Helper to add a STREAM_HEADER_TRACK message to a buffer (only before v06)
STREAM and send the header: after that, imquic_moq_add_stream_header_track_object is used to send all objects that belong to this track. | moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| track_alias | The track alias to put in the message |
| priority | The publisher priority to put in the message |
| size_t imquic_moq_add_stream_header_track_object | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | group_id, | ||
| uint64_t | object_id, | ||
| uint64_t | object_status, | ||
| uint8_t * | payload, | ||
| size_t | plen ) |
Helper to add an object to a buffer, formatted as expected for STREAM_HEADER_TRACK objects (so not all IDs) (only before v06)
| moq | The imquic_moq_context generating the object |
| bytes | The buffer to add the object to |
| blen | The size of the buffer |
| group_id | The group ID |
| object_id | The object ID |
| object_status | The object status (only added if the payload length is 0) |
| payload | The buffer containing the payload of the object |
| plen | The size of the payload buffer |
| size_t imquic_moq_add_subgroup_header | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| uint64_t | track_alias, | ||
| uint64_t | group_id, | ||
| uint64_t | subgroup_id, | ||
| uint8_t | priority ) |
Helper to add a SUBGROUP_HEADER message to a buffer (only after v06)
STREAM and send the header: after that, imquic_moq_add_stream_header_subgroup_object is used to send all objects that belong to this subgroup. | moq | The imquic_moq_context generating the message |
| moq_stream | The imquic_moq_context instance the object is for |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| track_alias | The track alias to put in the message |
| group_id | The group ID to put in the message |
| subgroup_id | The subgroup ID to put in the message |
| priority | The publisher priority to put in the message |
| size_t imquic_moq_add_subgroup_header_object | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | object_id, | ||
| uint64_t | object_status, | ||
| uint8_t * | payload, | ||
| size_t | plen, | ||
| size_t | extensions_count, | ||
| uint8_t * | extensions, | ||
| size_t | elen ) |
Helper to add an object to a buffer, formatted as expected for SUBGROUP_HEADER objects (so not all IDs) (only after v06)
| moq | The imquic_moq_context generating the object |
| moq_stream | The imquic_moq_context instance the object is for |
| bytes | The buffer to add the object to |
| blen | The size of the buffer |
| object_id | The object ID |
| object_status | The object status (only added if the payload length is 0) |
| payload | The buffer containing the payload of the object |
| plen | The size of the payload buffer |
| extensions_count | The number of object extensions, if any (only in v08, deprecated in v09) |
| extensions | The buffer containing the object extensions, if any (only since v08) |
| elen | The size of the object extensions buffer (only since v08) |
| size_t imquic_moq_add_subscribe | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| uint64_t | track_alias, | ||
| imquic_moq_namespace * | track_namespace, | ||
| imquic_moq_name * | track_name, | ||
| uint8_t | priority, | ||
| uint8_t | group_order, | ||
| gboolean | forward, | ||
| imquic_moq_filter_type | filter, | ||
| uint64_t | start_group, | ||
| uint64_t | start_object, | ||
| uint64_t | end_group, | ||
| uint64_t | end_object, | ||
| imquic_moq_subscribe_parameters * | parameters ) |
Helper to add a SUBSCRIBE message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| track_alias | The track alias to put in the message |
| track_namespace | The namespace to put in the message |
| track_name | The track name to put in the message |
| priority | The subscriber priority to put in the message |
| group_order | The group order to put in the message |
| forward | The forward value to put in the message (only starting from v11) |
| filter | The filter as a imquic_moq_filter_type value |
| start_group | The start group ID to put in the message |
| start_object | The start object ID to put in the message |
| end_group | The end group ID to put in the message |
| end_object | The end object ID to put in the message |
| parameters | The parameters to add, if any |
| size_t imquic_moq_add_subscribe_error | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_sub_error_code | error, | ||
| const char * | reason, | ||
| uint64_t | track_alias ) |
Helper method to add a SUBSCRIBE_ERRROR message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| error | Error code associated to the message |
| reason | Verbose description of the error, if any |
| track_alias | The track alias to put in the message (ignored after v12) |
| size_t imquic_moq_add_subscribe_namespace | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_namespace * | track_namespace, | ||
| imquic_moq_subscribe_parameters * | parameters ) |
Helper to add a SUBSCRIBE_NAMESPACE message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message (only v11 and later) |
| track_namespace | The namespace to put in the message |
| parameters | The parameters to add, if any |
| size_t imquic_moq_add_subscribe_namespace_error | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_namespace * | track_namespace, | ||
| imquic_moq_subns_error_code | error, | ||
| const char * | reason ) |
Helper method to add a SUBSCRIBE_NAMESPACE_ERRROR message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message (only v11 and later) |
| track_namespace | The namespace to put in the message (only before v11) |
| error | Error code associated to the message |
| reason | Verbose description of the error, if any |
| size_t imquic_moq_add_subscribe_namespace_ok | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_namespace * | track_namespace ) |
Helper method to add a SUBSCRIBE_NAMESPACE_OK message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message (only v11 and later) |
| track_namespace | The namespace to put in the message (only before v11) |
| size_t imquic_moq_add_subscribe_ok | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| uint64_t | track_alias, | ||
| uint64_t | expires, | ||
| imquic_moq_group_order | group_order, | ||
| gboolean | content_exists, | ||
| uint64_t | largest_group_id, | ||
| uint64_t | largest_object_id, | ||
| imquic_moq_subscribe_parameters * | parameters ) |
Helper method to add a SUBSCRIBE_OK message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| track_alias | The track alias to put in the message (ignored before v12) |
| expires | The expires value to put in the message |
| group_order | The group order to put in the message |
| content_exists | Whether the following two properties should be added to the message |
| largest_group_id | Largest group ID to add to the message, if needed |
| largest_object_id | Largest object ID to add to the message, if needed |
| parameters | The parameters to add, if any (only after v06) |
| size_t imquic_moq_add_subscribe_update | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| uint64_t | sub_request_id, | ||
| uint64_t | start_group, | ||
| uint64_t | start_object, | ||
| uint64_t | end_group, | ||
| uint64_t | end_object, | ||
| uint8_t | priority, | ||
| gboolean | forward, | ||
| imquic_moq_subscribe_parameters * | parameters ) |
Helper method to add a SUBSCRIBE_UPDATE message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| subrequest_id | The subscription request ID to put in the message (ignored before v14) |
| start_group | The start group ID to put in the message |
| start_object | The start object ID to put in the message |
| end_group | The end group ID to put in the message |
| end_object | The end object ID to put in the message |
| priority | The subscriber priority to put in the message |
| forward | The forward value to put in the message (only starting from v11) |
| parameters | The parameters to add, if any |
| size_t imquic_moq_add_track_status | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_namespace * | track_namespace, | ||
| imquic_moq_name * | track_name, | ||
| uint8_t | priority, | ||
| uint8_t | group_order, | ||
| gboolean | forward, | ||
| imquic_moq_filter_type | filter, | ||
| uint64_t | start_group, | ||
| uint64_t | start_object, | ||
| uint64_t | end_group, | ||
| uint64_t | end_object, | ||
| imquic_moq_subscribe_parameters * | parameters ) |
Helper to add a TRACK_STATUS message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| track_namespace | The namespace to put in the message |
| track_name | The track name to put in the message |
| priority | The track_statusr priority to put in the message |
| group_order | The group order to put in the message |
| forward | The forward value to put in the message |
| filter | The filter as a imquic_moq_filter_type value |
| start_group | The start group ID to put in the message |
| start_object | The start object ID to put in the message |
| end_group | The end group ID to put in the message |
| end_object | The end object ID to put in the message |
| parameters | The parameters to add, if any |
| size_t imquic_moq_add_track_status_error | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| imquic_moq_sub_error_code | error, | ||
| const char * | reason ) |
Helper method to add a TRACK_STATUS_ERRROR message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| error | Error code associated to the message |
| reason | Verbose description of the error, if any |
| size_t imquic_moq_add_track_status_ok | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id, | ||
| uint64_t | track_alias, | ||
| uint64_t | expires, | ||
| imquic_moq_group_order | group_order, | ||
| gboolean | content_exists, | ||
| uint64_t | largest_group_id, | ||
| uint64_t | largest_object_id, | ||
| imquic_moq_subscribe_parameters * | parameters ) |
Helper method to add a TRACK_STATUS_OK message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| track_alias | The track alias to put in the message |
| expires | The expires value to put in the message |
| group_order | The group order to put in the message |
| content_exists | Whether the following two properties should be added to the message |
| largest_group_id | Largest group ID to add to the message, if needed |
| largest_object_id | Largest object ID to add to the message, if needed |
| parameters | The parameters to add, if any (only after v06) |
| size_t imquic_moq_add_unsubscribe | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint64_t | request_id ) |
Helper method to add an UNSUBSCRIBE message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| request_id | The request ID to put in the message |
| size_t imquic_moq_add_unsubscribe_namespace | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_namespace * | track_namespace ) |
Helper method to add an UNSUBSCRIBE_NAMESPACE message to a buffer.
| moq | The imquic_moq_context generating the message |
| bytes | The buffer to add the message to |
| blen | The size of the buffer |
| track_namespace | The namespace to put in the message |
| const char * imquic_moq_auth_token_alias_type_str | ( | imquic_moq_auth_token_alias_type | type | ) |
Helper function to serialize to string the name of a imquic_moq_auth_token_alias_type property.
| type | The imquic_moq_auth_token_alias_type property |
| void imquic_moq_buffer_append | ( | imquic_moq_buffer * | buffer, |
| uint8_t * | bytes, | ||
| uint64_t | length ) |
Append data at the end of the buffer.
| buffer | Buffer to append the new data to |
| bytes | Data to append |
| length | Size of the data to append |
| void imquic_moq_buffer_destroy | ( | imquic_moq_buffer * | buffer | ) |
Destroy an existing buffer.
| buffer | Buffer to destroy |
| gboolean imquic_moq_buffer_resize | ( | imquic_moq_buffer * | buffer, |
| uint64_t | new_size ) |
Resize an existing buffer.
| buffer | Buffer to resize |
| new_size | New size of the buffer |
| void imquic_moq_buffer_shift | ( | imquic_moq_buffer * | buffer, |
| uint64_t | length ) |
Move the data in the buffer back of a specific number of bytes.
| buffer | Buffer to update |
| length | How many bytes back the buffer should be moved |
| size_t imquic_moq_build_auth_token | ( | imquic_moq_auth_token * | token, |
| uint8_t * | bytes, | ||
| size_t | blen ) |
Helper mode to craft an auth token buffer out of a imquic_moq_auth_token instance.
| [in] | token | The imquic_moq_auth_token instance to serialize |
| [out] | bytes | The buffer to write the auth token to |
| [in] | blen | The size of the buffer to write to |
| size_t imquic_moq_build_object_extensions | ( | GList * | extensions, |
| uint8_t * | bytes, | ||
| size_t | blen ) |
Helper mode to craft an extensions buffer out of a GList of imquic_moq_object_extension.
| [in] | extensions | The list of extensions to serialize |
| [out] | bytes | The buffer to write the extensions data to |
| [in] | blen | The size of the buffer to write to |
| int imquic_moq_cancel_fetch | ( | imquic_connection * | conn, |
| uint64_t | request_id ) |
Function to send a FETCH_CANCEL request.
| conn | The imquic_connection to send the request on |
| request_id | The unique request_id value associated to the subscription to cancel_fetch from |
| void imquic_moq_connection_gone | ( | imquic_connection * | conn | ) |
Callback the core invokes when an existing MoQ connection is not available anymore.
| conn | The imquic_connection instance that is now gone |
| imquic_moq_data_message_type imquic_moq_data_message_type_from_subgroup_header | ( | imquic_moq_version | version, |
| gboolean | subgroup, | ||
| gboolean | sgid0, | ||
| gboolean | ext, | ||
| gboolean | eog ) |
Helper function to return the imquic_moq_data_message_type value for SUBRGOUP_HEADER out of the individual properties.
| version | The version of the connection |
| subgroup | Whether the Subgroup ID field is present |
| sgid0 | Whether the default value of Subgroup ID is 0, in case the field is missing |
| ext | Whether there are extensions |
| eog | Whether there is an End of Group |
| const char * imquic_moq_data_message_type_str | ( | imquic_moq_data_message_type | type, |
| imquic_moq_version | version ) |
Helper function to serialize to string the name of a imquic_moq_data_message_type value.
| type | The imquic_data_moq_message_type value |
| version | The version of the connection |
| imquic_moq_delivery imquic_moq_data_message_type_to_delivery | ( | imquic_moq_data_message_type | type, |
| imquic_moq_version | version ) |
Helper function to return the imquic_moq_delivery mode associated to a imquic_moq_data_message_type type.
| type | The imquic_data_moq_message_type value |
| version | The version of the connection |
| void imquic_moq_data_message_type_to_subgroup_header | ( | imquic_moq_version | version, |
| imquic_moq_data_message_type | type, | ||
| gboolean * | subgroup, | ||
| gboolean * | sgid0, | ||
| gboolean * | ext, | ||
| gboolean * | eog ) |
Helper function to parse a imquic_moq_data_message_type value for SUBRGOUP_HEADER to the individual properties.
| [in] | version | The version of the connection |
| [in] | type | The imquic_moq_data_message_type instance to parse |
| [out] | subgroup | Output variable to write whether the Subgroup ID field is present |
| [out] | sgid0 | Output variable to write whether the default value of Subgroup ID is 0, in case the field is missing |
| [out] | ext | Output variable to write whether there are extensions |
| [out] | eog | Output variable to write whether there is an End of Group |
| void imquic_moq_datagram_incoming | ( | imquic_connection * | conn, |
| uint8_t * | bytes, | ||
| uint64_t | length ) |
Callback the core invokes when there's new incoming data on a DATAGRAM.
| conn | The imquic_connection instance for which new DATAGRAM data is available |
| bytes | The new data that is available |
| length | Size of the new data |
| void imquic_moq_datagram_message_type_parse | ( | imquic_moq_version | version, |
| imquic_moq_datagram_message_type | type, | ||
| gboolean * | ext, | ||
| gboolean * | eog, | ||
| gboolean * | oid ) |
Helper function to parse a imquic_moq_datagram_message_type value for OBJECT_DATAGRAM to the individual properties.
| [in] | version | The version of the connection |
| [in] | type | The imquic_moq_datagram_message_type instance to parse |
| [out] | ext | Output variable to write whether there are extensions |
| [out] | eog | Output variable to write whether there is an End of Group |
| [out] | oid | Output variable to write whether there is an Object ID (ignored before v14) |
| imquic_moq_datagram_message_type imquic_moq_datagram_message_type_return | ( | imquic_moq_version | version, |
| gboolean | ext, | ||
| gboolean | eog, | ||
| gboolean | oid ) |
Helper function to return the imquic_moq_datagram_message_type value for OBJECT_DATAGRAM out of the individual properties.
| version | The version of the connection |
| ext | Whether there are extensions |
| eog | Whether there is an End of Group |
| eog | Whether there is an Object ID (ignored before v14) |
| const char * imquic_moq_datagram_message_type_str | ( | imquic_moq_datagram_message_type | type, |
| imquic_moq_version | version ) |
Helper function to serialize to string the name of a imquic_moq_datagram_message_type value.
| type | The imquic_data_moq_message_type value |
| version | The version of the connection |
| void imquic_moq_deinit | ( | void | ) |
Uninitialize the native MoQ stack.
| const char * imquic_moq_error_code_str | ( | imquic_moq_error_code | code | ) |
Helper function to serialize to string the name of a imquic_moq_error_code value.
| code | The imquic_moq_error_code value |
| const char * imquic_moq_fetch_error_code_str | ( | imquic_moq_fetch_error_code | code | ) |
Helper function to serialize to string the name of a imquic_moq_fetch_error_code value.
| code | The imquic_moq_fetch_error_code value |
| const char * imquic_moq_fetch_type_str | ( | imquic_moq_fetch_type | type | ) |
Helper function to serialize to string the name of a imquic_moq_fetch_type value.
| type | The imquic_moq_fetch_type value |
| const char * imquic_moq_filter_type_str | ( | imquic_moq_filter_type | type | ) |
Helper function to serialize to string the name of a imquic_moq_filter_type value.
| type | The imquic_moq_filter_type value |
| uint64_t imquic_moq_get_next_request_id | ( | imquic_connection * | conn | ) |
Helper function to get the next Request ID we can use.
| conn | The imquic_connection to query |
| imquic_moq_role imquic_moq_get_role | ( | imquic_connection * | conn | ) |
Helper function to get the MoQ role associated with a connection.
| conn | The imquic_connection to query |
| imquic_moq_version imquic_moq_get_version | ( | imquic_connection * | conn | ) |
Helper function to get the MoQ version associated with a connection.
| conn | The imquic_connection to query |
| int imquic_moq_goaway | ( | imquic_connection * | conn, |
| const char * | uri ) |
Function to send a GOAWAY request.
| conn | The imquic_connection to send the request on |
| uri | Where the client can connect to continue the session |
| const char * imquic_moq_group_order_str | ( | imquic_moq_group_order | type | ) |
Helper function to serialize to string the name of a imquic_moq_group_order value.
| type | The imquic_moq_group_order value |
| void imquic_moq_init | ( | void | ) |
Initialize the native MoQ stack at startup.
| int imquic_moq_joining_fetch | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| uint64_t | joining_request_id, | ||
| gboolean | absolute, | ||
| uint64_t | joining_start, | ||
| gboolean | descending, | ||
| uint8_t * | auth, | ||
| size_t | authlen ) |
Function to send a joining FETCH request.
| conn | The imquic_connection to send the request on |
| request_id | A unique numeric identifier to associate to this subscription |
| joining_request_id | Existing subscription to join |
| absolute | Whether this is an absolute or relative joining FETCH |
| joining_start | How many groups to retrieve before the current one, for relative joins, or starting group ID for absolute joins |
| descending | Whether objects should be fetched in descending group order |
| auth | The authentication info, if any |
| authlen | The size of the authentication info, if any |
| const char * imquic_moq_message_type_str | ( | imquic_moq_message_type | type | ) |
Helper function to serialize to string the name of a imquic_moq_message_type value.
| type | The imquic_moq_message_type value |
| void imquic_moq_new_connection | ( | imquic_connection * | conn, |
| void * | user_data ) |
Callback the core invokes when a new QUIC connection using MoQ is available.
| conn | The imquic_connection instance that is now available |
| user_data | Optional user data the user/application may have associated to the endpoint this connection belongs to |
| size_t imquic_moq_parameter_add_data | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| int | param, | ||
| uint8_t * | buf, | ||
| size_t | buflen ) |
Helper to add a MoQ (setup or subscribe) parameter with generic data to a buffer.
| moq | The imquic_moq_context instance the parameter is for |
| bytes | Buffer to add the parameter to |
| blen | Size of the buffer |
| param | ID of the parameter to add |
| buf | The data acting as a value for the parameter to add |
| buflen | The size of the data value |
| size_t imquic_moq_parameter_add_int | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| int | param, | ||
| uint64_t | number ) |
Helper to add a MoQ (setup or subscribe) parameter with a numeric value to a buffer.
| moq | The imquic_moq_context instance the parameter is for |
| bytes | Buffer to add the parameter to |
| blen | Size of the buffer |
| param | ID of the parameter to add |
| number | The numeric value of the parameter to add |
| int imquic_moq_parse_auth_token | ( | uint8_t * | bytes, |
| size_t | blen, | ||
| imquic_moq_auth_token * | token ) |
Helper mode to parse an auth token buffer to a imquic_moq_auth_token instance.
value property will point to data in the original bytes buffer, which means that no allocation will be performed by this method. If you need to store the token value somewhere, it's up to you to copy it before bytes is invalidated by the application | [in] | bytes | The buffer containing the auth token data |
| [in] | blen | The size of the buffer containing the auth token data data |
| [out] | token | The imquic_moq_auth_token to put the parsed token info to |
| size_t imquic_moq_parse_client_setup | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| gboolean | legacy, | ||
| uint8_t * | error ) |
Helper to parse a CLIENT_SETUP message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [in] | legacy | Whether this is a legacy CLIENT_SETUP message (before v11) |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_fetch | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a FETCH message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_fetch_cancel | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a FETCH_CANCEL message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_fetch_error | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a FETCH_ERROR message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_fetch_header | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a FETCH_HEADER message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_context instance the object is from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| int imquic_moq_parse_fetch_header_object | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| gboolean | complete, | ||
| uint8_t * | error ) |
Helper to parse a FETCH_HEADER object.
| [in] | moq | The imquic_moq_context instance the object is for |
| [in] | moq_stream | The imquic_moq_context instance the object is from |
| [in] | complete | Whether this data marks the completion of the QUIC stream it came from |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_fetch_ok | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a FETCH_OK message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_goaway | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a GOAWAY message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_max_request_id | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a MAX_REQUEST_ID message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| int imquic_moq_parse_message | ( | imquic_moq_context * | moq, |
| uint64_t | stream_id, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| gboolean | complete, | ||
| gboolean | datagram ) |
Parse an incoming MoQ message.
STREAM data), we move back to the beginning of the buffer and return, waiting for more data to arrive. | moq | The imquic_moq_context instance the message is for |
| stream_id | The QUIC stream ID the message came from |
| bytes | The buffer containing the message to parse |
| blen | Size of the buffer to parse |
| complete | Whether this data marks the completion of the QUIC stream it came from |
| datagram | Whether this is not coming from a STREAM but a DATAGRAM |
| size_t imquic_moq_parse_object_datagram | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_datagram_message_type | dtype, | ||
| uint8_t * | error ) |
Helper to parse an OBJECT_DATAGRAM message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [in] | dtype | Type of OBJECT_DATAGRAM (only relevant starting from v11) |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_object_datagram_status | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_datagram_message_type | dtype, | ||
| uint8_t * | error ) |
Helper to parse an OBJECT_DATAGRAM_STATUS message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [in] | dtype | Type of OBJECT_DATAGRAM_STATUS (only relevant starting from v11) |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| GList * imquic_moq_parse_object_extensions | ( | uint8_t * | extensions, |
| size_t | elen ) |
Helper mode to parse an extensions buffer to a GList of imquic_moq_object_extension.
| extensions | The buffer containing the extensions data |
| elen | The size of the buffer containing the extensions data |
| size_t imquic_moq_parse_publish | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a PUBLISH message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_publish_done | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a PUBLISH_DONE message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_publish_error | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a PUBLISH_ERROR message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_publish_namespace | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a PUBLISH_NAMESPACE message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_publish_namespace_cancel | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a PUBLISH_NAMESPACE_CANCEL message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_publish_namespace_done | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a PUBLISH_NAMESPACE_DONE message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_publish_namespace_error | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a PUBLISH_NAMESPACE_ERROR message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_publish_namespace_ok | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a PUBLISH_NAMESPACE_OK message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_publish_ok | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a PUBLISH_OK message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_requests_blocked | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a REQUESTS_BLOCKED message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_server_setup | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| gboolean | legacy, | ||
| uint8_t * | error ) |
Helper to parse a SERVER_SETUP message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [in] | legacy | Whether this is a legacy SERVER_SETUP message (before v11) |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_setup_parameter | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_setup_parameters * | params, | ||
| uint8_t * | error ) |
Helper method to parse a MoQ setup parameter.
| [in] | moq | The imquic_moq_context instance to update with the new parameter |
| [in] | bytes | Buffer containing the parameter to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | params | imquic_moq_setup_parameters instance to put the parsed parameter in |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_stream_header_track | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a STREAM_HEADER_TRACK message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_context instance the object is from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| int imquic_moq_parse_stream_header_track_object | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| gboolean | complete, | ||
| uint8_t * | error ) |
Helper to parse a STREAM_HEADER_TRACK object.
| [in] | moq | The imquic_moq_context instance the object is for |
| [in] | moq_stream | The imquic_moq_context instance the object is from |
| [in] | complete | Whether this data marks the completion of the QUIC stream it came from |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_subgroup_header | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_data_message_type | dtype, | ||
| uint8_t * | error ) |
Helper to parse a SUBGROUP_HEADER message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | moq_stream | The imquic_moq_context instance the message came from |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [in] | dtype | Type of SUBGROUP_HEADER (only relevant starting from v11) |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| int imquic_moq_parse_subgroup_header_object | ( | imquic_moq_context * | moq, |
| imquic_moq_stream * | moq_stream, | ||
| gboolean | complete, | ||
| uint8_t * | error ) |
Helper to parse a SUBGROUP_HEADER object.
| [in] | moq | The imquic_moq_context instance the object is for |
| [in] | moq_stream | The imquic_moq_context instance the object is from |
| [in] | complete | Whether this data marks the completion of the QUIC stream it came from |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_subscribe | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a SUBSCRIBE message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_subscribe_error | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a SUBSCRIBE_ERROR message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_subscribe_namespace | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a SUBSCRIBE_NAMESPACE message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_subscribe_namespace_error | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a SUBSCRIBE_NAMESPACE_ERROR message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_subscribe_namespace_ok | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a SUBSCRIBE_NAMESPACE_OK message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_subscribe_ok | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a SUBSCRIBE_OK message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_subscribe_parameter | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| imquic_moq_subscribe_parameters * | params, | ||
| uint8_t * | error ) |
Helper method to parse a MoQ subscribe parameter.
| [in] | moq | The imquic_moq_context instance to update with the new parameter |
| [in] | bytes | Buffer containing the parameter to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | params | imquic_moq_subscribe_parameters instance to put the parsed parameter in |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_subscribe_update | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a SUBSCRIBE_UPDATE message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_track_status | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a TRACK_STATUS message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_track_status_error | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a TRACK_STATUS_ERROR message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_track_status_ok | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse a TRACK_STATUS_OK message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_unsubscribe | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse an UNSUBSCRIBE message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| size_t imquic_moq_parse_unsubscribe_namespace | ( | imquic_moq_context * | moq, |
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | error ) |
Helper to parse an UNSUBSCRIBE_NAMESPACE message.
| [in] | moq | The imquic_moq_context instance the message is for |
| [in] | bytes | The buffer containing the message to parse |
| [in] | blen | Size of the buffer to parse |
| [out] | error | In/out property, initialized to 0 and set to something else in case of parsing errors |
| const char * imquic_moq_pub_error_code_str | ( | imquic_moq_pub_error_code | code | ) |
Helper function to serialize to string the name of a imquic_moq_pub_error_code value.
| code | The imquic_moq_pub_error_code value |
| int imquic_moq_publish | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| imquic_moq_namespace * | tns, | ||
| imquic_moq_name * | tn, | ||
| uint64_t | track_alias, | ||
| gboolean | descending, | ||
| imquic_moq_location * | largest, | ||
| gboolean | forward, | ||
| uint8_t * | auth, | ||
| size_t | authlen ) |
Function to send a PUBLISH request.
| conn | The imquic_connection to send the request on |
| request_id | A unique request ID to associate to this subscription |
| tns | The imquic_moq_namespace namespace the track to publish to belongs to |
| tn | The imquic_moq_name track name to publish to |
| track_alias | A unique numeric identifier to associate to the track in this subscription |
| descending | Whether objects should be fetched in descending order, per each group |
| largest | The largest group/object IDs, in case content exists |
| forward | Whether objects should be forwarded, when this subscription is accepted (ignored before v11) |
| auth | The authentication info, if any |
| authlen | The size of the authentication info, if any |
| int imquic_moq_publish_done | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| imquic_moq_sub_done_code | status_code, | ||
| const char * | reason ) |
Function to send a PUBLISH_DONE request.
| conn | The imquic_connection to send the request on |
| request_id | The unique request_id value associated to the subscription that's now done |
| status_code | The status code |
| reason | A reason phrase, if needed |
| int imquic_moq_publish_namespace | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| imquic_moq_namespace * | tns, | ||
| uint8_t * | auth, | ||
| size_t | authlen ) |
Function to send a PUBLISH_NAMESPACE request.
| conn | The imquic_connection to send the request on |
| request_id | A unique request ID (only v11 and later) |
| tns | The imquic_moq_namespace namespace to publish_namespace |
| auth | The authentication info, if any |
| authlen | The size of the authentication info, if any |
| int imquic_moq_publish_namespace_done | ( | imquic_connection * | conn, |
| imquic_moq_namespace * | tns ) |
Function to send a PUBLISH_NAMESPACE_DONE request.
| conn | The imquic_connection to send the request on |
| tns | The imquic_moq_namespace namespace to publish_namespace_done |
| const char * imquic_moq_publish_namespace_error_code_str | ( | imquic_moq_publish_namespace_error_code | code | ) |
Helper function to serialize to string the name of a imquic_moq_publish_namespace_error_code value.
| code | The imquic_moq_publish_namespace_error_code value |
| void imquic_moq_qlog_control_message_created | ( | imquic_qlog * | qlog, |
| uint64_t | stream_id, | ||
| size_t | length, | ||
| json_t * | message ) |
Add a control_message_created event.
| qlog | The imquic_qlog instance to add the event to |
| stream_id | The Stream ID used for this message |
| length | The length of the message |
| message | The message content |
| void imquic_moq_qlog_control_message_parsed | ( | imquic_qlog * | qlog, |
| uint64_t | stream_id, | ||
| size_t | length, | ||
| json_t * | message ) |
Add a control_message_parsed event.
| qlog | The imquic_qlog instance to add the event to |
| stream_id | The Stream ID used for this message |
| length | The length of the message |
| message | The message content |
| void imquic_moq_qlog_fetch_header_created | ( | imquic_qlog * | qlog, |
| imquic_moq_stream * | stream ) |
Add a fetch_header_created event.
| qlog | The imquic_qlog instance to add the event to |
| stream | The stream used for this header |
| void imquic_moq_qlog_fetch_header_parsed | ( | imquic_qlog * | qlog, |
| imquic_moq_stream * | stream ) |
Add a fetch_header_parsed event.
| qlog | The imquic_qlog instance to add the event to |
| stream | The stream used for this header |
| void imquic_moq_qlog_fetch_object_created | ( | imquic_qlog * | qlog, |
| uint64_t | stream_id, | ||
| imquic_moq_object * | object ) |
Add a fetch_object_created event.
| qlog | The imquic_qlog instance to add the event to |
| stream_id | The Stream ID used for this object |
| object | The object instance |
| void imquic_moq_qlog_fetch_object_parsed | ( | imquic_qlog * | qlog, |
| uint64_t | stream_id, | ||
| imquic_moq_object * | object ) |
Add a fetch_object_parsed event.
| qlog | The imquic_qlog instance to add the event to |
| stream_id | The Stream ID used for this object |
| object | The object instance |
| void imquic_moq_qlog_object_datagram_created | ( | imquic_qlog * | qlog, |
| imquic_moq_object * | object ) |
Add a object_datagram_created event.
| qlog | The imquic_qlog instance to add the event to |
| object | The object instance |
| void imquic_moq_qlog_object_datagram_parsed | ( | imquic_qlog * | qlog, |
| imquic_moq_object * | object ) |
Add a object_datagram_parsed event.
| qlog | The imquic_qlog instance to add the event to |
| object | The object instance |
| void imquic_moq_qlog_object_datagram_status_created | ( | imquic_qlog * | qlog, |
| imquic_moq_object * | object ) |
Add a object_datagram_status_created event.
| qlog | The imquic_qlog instance to add the event to |
| object | The object instance |
| void imquic_moq_qlog_object_datagram_status_parsed | ( | imquic_qlog * | qlog, |
| imquic_moq_object * | object ) |
Add a object_datagram_status_parsed event.
| qlog | The imquic_qlog instance to add the event to |
| object | The object instance |
| void imquic_moq_qlog_stream_type_set | ( | imquic_qlog * | qlog, |
| gboolean | local, | ||
| uint64_t | stream_id, | ||
| const char * | type ) |
Add a stream_type_set event.
| qlog | The imquic_qlog instance to add the event to |
| local | Whether this is a local or remote stream |
| stream_id | The Stream ID used for this message |
| type | The stream type |
| void imquic_moq_qlog_subgroup_header_created | ( | imquic_qlog * | qlog, |
| imquic_moq_stream * | stream ) |
Add a subgroup_header_created event.
| qlog | The imquic_qlog instance to add the event to |
| stream | The stream used for this header |
| void imquic_moq_qlog_subgroup_header_parsed | ( | imquic_qlog * | qlog, |
| imquic_moq_stream * | stream ) |
Add a subgroup_header_parsed event.
| qlog | The imquic_qlog instance to add the event to |
| stream | The stream used for this header |
| void imquic_moq_qlog_subgroup_object_created | ( | imquic_qlog * | qlog, |
| uint64_t | stream_id, | ||
| imquic_moq_object * | object ) |
Add a subgroup_object_created event.
| qlog | The imquic_qlog instance to add the event to |
| stream_id | The Stream ID used for this object |
| object | The object instance |
| void imquic_moq_qlog_subgroup_object_parsed | ( | imquic_qlog * | qlog, |
| uint64_t | stream_id, | ||
| imquic_moq_object * | object ) |
Add a subgroup_object_parsed event.
| qlog | The imquic_qlog instance to add the event to |
| stream_id | The Stream ID used for this object |
| object | The object instance |
| int imquic_moq_reject_fetch | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| imquic_moq_fetch_error_code | error_code, | ||
| const char * | reason ) |
Function to reject an incoming FETCH request.
| conn | The imquic_connection to send the request on |
| request_id | The unique request_id value associated to the subscription to reject |
| error_code | The error code to send back |
| reason | A string representation of the error, if needed |
| int imquic_moq_reject_publish | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| imquic_moq_pub_error_code | error_code, | ||
| const char * | reason ) |
Function to reject an incoming PUBLISH request.
| conn | The imquic_connection to send the request on |
| request_id | The unique request_id value associated to the subscription to reject |
| error_code | The error code to send back |
| reason | A string representation of the error, if needed |
| int imquic_moq_reject_publish_namespace | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| imquic_moq_namespace * | tns, | ||
| imquic_moq_publish_namespace_error_code | error_code, | ||
| const char * | reason ) |
Function to reject an incoming PUBLISH_NAMESPACE request.
| conn | The imquic_connection to send the request on |
| request_id | The request ID of the original PUBLISH_NAMESPACE request (only v11 and later) |
| tns | The imquic_moq_namespace namespace to reject (only before v11) |
| error_code | The error code to send back |
| reason | A string representation of the error, if needed |
| int imquic_moq_reject_subscribe | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| imquic_moq_sub_error_code | error_code, | ||
| const char * | reason, | ||
| uint64_t | track_alias ) |
Function to reject an incoming SUBSCRIBE request.
| conn | The imquic_connection to send the request on |
| request_id | The unique request_id value associated to the subscription to reject |
| error_code | The error code to send back |
| reason | A string representation of the error, if needed |
| track_alias | The unique track_alias value associated to the subscription to reject |
| int imquic_moq_reject_subscribe_namespace | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| imquic_moq_namespace * | tns, | ||
| imquic_moq_subns_error_code | error_code, | ||
| const char * | reason ) |
Function to reject an incoming SUBSCRIBE_NAMESPACE request.
| conn | The imquic_connection to send the request on |
| request_id | The request ID of the original SUBSCRIBE_NAMESPACE request (only v11 and later) |
| tns | The imquic_moq_namespace namespace to reject notifications for (only before v11) |
| error_code | The error code to send back |
| reason | A string representation of the error, if needed |
| int imquic_moq_reject_track_status | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| imquic_moq_sub_error_code | error_code, | ||
| const char * | reason ) |
Function to reject an incoming TRACK_STATUS request.
TRACK_STATUS , support for this request is disabled in versions earlier than v13 | conn | The imquic_connection to send the request on |
| request_id | The unique request_id value associated to the subscription to reject |
| error_code | The error code to send back |
| reason | A string representation of the error, if needed |
| int imquic_moq_requests_blocked | ( | imquic_connection * | conn | ) |
Function to send a REQUESTS_BLOCKED request.
| conn | The imquic_connection to send the request on |
| const char * imquic_moq_role_type_str | ( | imquic_moq_role_type | type | ) |
Helper function to serialize to string the name of a imquic_moq_role_type value.
| type | The imquic_moq_role_type value |
| int imquic_moq_send_object | ( | imquic_connection * | conn, |
| imquic_moq_object * | object ) |
Function to send a MoQ object.
end_of_stream property to TRUE in the object. There's no need to do that when using OBJECT_STREAM or OBJECT_DATAGRAM . You can also close the stream when you don't have any object to send: just set the relevant properties (e.g., request_id, group_id and subgroup_id) without any payload, and the stack will find the right stream to close it. | conn | The imquic_connection to send the object on |
| object | The imquic_moq_object object to send, including all relevant identifiers and the payload |
| int imquic_moq_set_connection_auth | ( | imquic_connection * | conn, |
| uint8_t * | auth, | ||
| size_t | authlen ) |
Method to provide credentials, as a client, on a new connection. If credentials need to provided, this must be done as soon as the connection is established, and before sending any MoQ message. A good place to do that is the callback fired when a new connection is available.
| conn | The imquic_connection to set the version on |
| auth | The authentication info, if any |
| authlen | The size of the authentication info, if any |
| int imquic_moq_set_max_request_id | ( | imquic_connection * | conn, |
| uint64_t | max_request_id ) |
Helper function to set the Maximum Request ID a subscriber can send.
MAX_REQUEST_ID request. Notice that whatever is passed to the request will be decremented by 1, as per the specification, meaning you cannot pass 0 as a value here | conn | The imquic_connection to update |
| max_request_id | The Maximum Request ID to enforce |
| int imquic_moq_set_role | ( | imquic_connection * | conn, |
| imquic_moq_role | role ) |
Method to set the MoQ role on a connection. Must be done as soon as the connection is established, and before sending any MoQ message. A good place to do that is the callback fired when a new connection is available.
| conn | The imquic_connection to set the role on |
| role | The imquic_moq_role to take |
| int imquic_moq_set_version | ( | imquic_connection * | conn, |
| imquic_moq_version | version ) |
Method to set the MoQ version on a connection. Must be done as soon as the connection is established, and before sending any MoQ message. A good place to do that is the callback fired when a new connection is available.
| conn | The imquic_connection to set the version on |
| version | The imquic_moq_version to use/offer |
| const char * imquic_moq_setup_parameter_type_str | ( | imquic_moq_setup_parameter_type | type | ) |
Helper function to serialize to string the name of a imquic_moq_setup_parameter_type value.
| type | The imquic_moq_setup_parameter_type value |
| size_t imquic_moq_setup_parameters_serialize | ( | imquic_moq_context * | moq, |
| imquic_moq_setup_parameters * | parameters, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | params_num ) |
Helper to serialize a imquic_moq_setup_parameters set to a buffer.
| [in] | moq | The imquic_moq_context instance the parameter is for |
| [in] | parameters | The imquic_moq_setup_parameters to serialize |
| [out] | bytes | The buffer to add paramerers to |
| [in] | blen | The size of the buffer |
| [out] | params_num | The number of parameters added to the buffer |
| int imquic_moq_standalone_fetch | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| imquic_moq_namespace * | tns, | ||
| imquic_moq_name * | tn, | ||
| gboolean | descending, | ||
| imquic_moq_location_range * | range, | ||
| uint8_t * | auth, | ||
| size_t | authlen ) |
Function to send a standalone FETCH request.
| conn | The imquic_connection to send the request on |
| request_id | A unique numeric identifier to associate to this subscription |
| tns | The imquic_moq_namespace namespace the track to fetch to belongs to |
| tn | The imquic_moq_name track name to fetch to |
| descending | Whether objects should be fetched in descending group order |
| range | The range of groups/objects to fetch |
| auth | The authentication info, if any |
| authlen | The size of the authentication info, if any |
| void imquic_moq_stream_destroy | ( | imquic_moq_stream * | moq_stream | ) |
Destroy an existing MoQ stream.
| moq_stream | MoQ stream to destroy |
| void imquic_moq_stream_incoming | ( | imquic_connection * | conn, |
| uint64_t | stream_id, | ||
| uint8_t * | bytes, | ||
| uint64_t | offset, | ||
| uint64_t | length, | ||
| gboolean | complete ) |
Callback the core invokes when there's new incoming data on a STREAM.
| conn | The imquic_connection instance for which new STREAM data is available |
| stream_id | The QUIC Stream ID for which new data is available |
| bytes | The new data that is available |
| offset | The offset in the stream this new data should be put in |
| length | Size of the new data |
| complete | Whether this data marks the end of this STREAM |
| const char * imquic_moq_sub_done_code_str | ( | imquic_moq_sub_done_code | code | ) |
Helper function to serialize to string the name of a imquic_moq_sub_done_code value.
| code | The imquic_moq_sub_done_code value |
| const char * imquic_moq_sub_error_code_str | ( | imquic_moq_sub_error_code | code | ) |
Helper function to serialize to string the name of a imquic_moq_sub_error_code value.
| code | The imquic_moq_sub_error_code value |
| const char * imquic_moq_subns_error_code_str | ( | imquic_moq_subns_error_code | code | ) |
Helper function to serialize to string the name of a imquic_moq_subns_error_code value.
| code | The imquic_moq_subns_error_code value |
| int imquic_moq_subscribe | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| uint64_t | track_alias, | ||
| imquic_moq_namespace * | tns, | ||
| imquic_moq_name * | tn, | ||
| uint8_t | priority, | ||
| gboolean | descending, | ||
| gboolean | forward, | ||
| imquic_moq_filter_type | filter_type, | ||
| imquic_moq_location * | start_location, | ||
| imquic_moq_location * | end_location, | ||
| uint8_t * | auth, | ||
| size_t | authlen ) |
Function to send a SUBSCRIBE request.
| conn | The imquic_connection to send the request on |
| request_id | A unique request ID to associate to this subscription |
| track_alias | A unique numeric identifier to associate to the track in this subscription (ignored starting from v12) |
| tns | The imquic_moq_namespace namespace the track to subscribe to belongs to |
| tn | The imquic_moq_name track name to subscribe to |
| priority | The subscriber priority |
| descending | Whether objects should be fetched in descending order, per each group |
| forward | Whether objects should be forwarded, when this subscription is accepted (ignored before v11) |
| filter_type | The subscription filter type |
| start_location | The group and object to start from (ignored if the filter is not AbsoluteStart or AbsoluteRange) |
| end_location | The group (and for v06/v07 the object) to end at (ignored if the filter is not AbsoluteRange) |
| auth | The authentication info, if any |
| authlen | The size of the authentication info, if any |
| int imquic_moq_subscribe_namespace | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| imquic_moq_namespace * | tns, | ||
| uint8_t * | auth, | ||
| size_t | authlen ) |
Function to send a SUBSCRIBE_NAMESPACE request.
| conn | The imquic_connection to send the request on |
| request_id | A unique request ID (only v11 and later) |
| tns | The imquic_moq_namespace namespace the track to subscribe to belongs to |
| auth | The authentication info, if any |
| authlen | The size of the authentication info, if any |
| const char * imquic_moq_subscribe_parameter_type_str | ( | imquic_moq_subscribe_parameter_type | type, |
| imquic_moq_version | version ) |
Helper function to serialize to string the name of a imquic_moq_subscribe_parameter_type value.
| type | The imquic_moq_subscribe_parameter_type value |
| version | The version of the connection |
| size_t imquic_moq_subscribe_parameters_serialize | ( | imquic_moq_context * | moq, |
| imquic_moq_subscribe_parameters * | parameters, | ||
| uint8_t * | bytes, | ||
| size_t | blen, | ||
| uint8_t * | params_num ) |
Helper to serialize a imquic_moq_subscribe_parameters set to a buffer.
| [in] | moq | The imquic_moq_context instance the parameter is for |
| [in] | parameters | The imquic_moq_subscribe_parameters to serialize |
| [out] | bytes | The buffer to add paramerers to |
| [in] | blen | The size of the buffer |
| [out] | params_num | The number of parameters added to the buffer |
| imquic_moq_subscription * imquic_moq_subscription_create | ( | uint64_t | request_id, |
| uint64_t | track_alias ) |
Helper to create a new subscription instance.
| request_id | The request ID |
| track_alias | The track alias |
| void imquic_moq_subscription_destroy | ( | imquic_moq_subscription * | moq_sub | ) |
Destroy an existing MoQ subscription.
| moq_sub | MoQ subscription to destroy |
| int imquic_moq_track_status | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| imquic_moq_namespace * | tns, | ||
| imquic_moq_name * | tn, | ||
| uint8_t | priority, | ||
| gboolean | descending, | ||
| gboolean | forward, | ||
| imquic_moq_filter_type | filter_type, | ||
| imquic_moq_location * | start_location, | ||
| imquic_moq_location * | end_location, | ||
| uint8_t * | auth, | ||
| size_t | authlen ) |
Function to send a TRACK_STATUS request.
TRACK_STATUS , support for this request is disabled in versions earlier than v13 | conn | The imquic_connection to send the request on |
| request_id | A unique request ID to associate to this request |
| tns | The imquic_moq_namespace namespace the track to track_status to belongs to |
| tn | The imquic_moq_name track name to track_status to |
| priority | The track_statusr priority |
| descending | Whether objects should be fetched in descending order, per each group |
| forward | Whether objects should be forwarded (ignored) |
| filter_type | The subscription filter type |
| start_location | The group and object to start from |
| end_location | The group to end at |
| auth | The authentication info, if any |
| authlen | The size of the authentication info, if any |
| int imquic_moq_unsubscribe | ( | imquic_connection * | conn, |
| uint64_t | request_id ) |
Function to send a UNSUBSCRIBE request.
| conn | The imquic_connection to send the request on |
| request_id | The unique request_id value associated to the subscription to unsubscribe from |
| int imquic_moq_unsubscribe_namespace | ( | imquic_connection * | conn, |
| imquic_moq_namespace * | tns ) |
Function to send a UNSUBSCRIBE_NAMESPACE request.
| conn | The imquic_connection to send the request on |
| tns | The imquic_moq_namespace namespace to unsubscribe notifications from |
| int imquic_moq_update_subscribe | ( | imquic_connection * | conn, |
| uint64_t | request_id, | ||
| uint64_t | sub_request_id, | ||
| imquic_moq_location * | start_location, | ||
| uint64_t | end_group, | ||
| uint8_t | priority, | ||
| gboolean | forward ) |
Function to send a SUBSCRIBE_UPDATE request.
request_id will change depending on which version the connection is using | conn | The imquic_connection to send the request on |
| request_id | Unique request_id value (before v14, this is associated to the subscription to update) |
| sub_request_id | Unique request_id value associated to the subscription to update (ignored before v14) |
| start_location | The group and object to start from |
| end_group | The group to end at |
| priority | The subscriber priority |
| forward | Whether objects should be forwarded, when this subscription is updated (ignored before v11) |
| void imquic_qlog_moq_message_add_namespace | ( | json_t * | message, |
| imquic_moq_namespace * | track_namespace ) |
Helper to add a stringified namespace tuple array to a message.
track_namespace property | message | The message object to update |
| track_namespace | The namespace to serialize to an array |
| void imquic_qlog_moq_message_add_setup_parameters | ( | json_t * | message, |
| imquic_moq_setup_parameters * | parameters, | ||
| const char * | name ) |
Helper to add a stringified array of setup parameters to a message.
| message | The message object to update |
| parameters | The setup parameters to convert |
| name | The name the array should have in the message object |
| void imquic_qlog_moq_message_add_subscribe_parameters | ( | json_t * | message, |
| imquic_moq_subscribe_parameters * | parameters, | ||
| const char * | name ) |
Helper to add a stringified array of subscribe parameters to a message.
| message | The message object to update |
| parameters | The subscribe parameters to convert |
| name | The name the array should have in the message object |
| void imquic_qlog_moq_message_add_track | ( | json_t * | message, |
| imquic_moq_name * | track_name ) |
Helper to add a stringified track name to a message.
track_name property | message | The message object to update |
| track_name | The track name to add |
| json_t * imquic_qlog_moq_message_prepare | ( | const char * | type | ) |
Helper to create a new QLOG MoQT message.
type property | type | The name of the message |