Message
Object Hierarchy:
Description:
[ CCode ( copy_function = "g_boxed_copy" , free_function = "g_boxed_free" , lower_case_cprefix = "gst_rtsp_msg_" , type_id = "gst_rtsp_msg_get_type ()" ) ]
[ Compact ]
[ GIR ( name = "RTSPMessage" ) ]
public class Message
[ Compact ]
[ GIR ( name = "RTSPMessage" ) ]
public class Message
Provides methods for creating and parsing request, response and data messages.
Namespace: Gst.RTSP
Package: gstreamer-rtsp-1.0
Content:
Methods:
- public Result add_header (HeaderField field, string value)
Add a header with key
field
andvalue
to this. - public Result add_header_by_name (string header, string value)
Add a header with key
header
andvalue
to this. - public Result append_headers (StringBuilder str)
Append the currently configured headers in this to the StringBuilder
str
suitable for transmission. - public Result copy (out Message? copy)
Allocate a new copy of this and store the result in
copy
. - public Result dump ()
Dump the contents of this to stdout.
- public Result free ()
Free the memory used by this.
- public Result get_body (out unowned uint8[] data)
Get the body of this.
- public Result get_body_buffer (out unowned Buffer buffer)
Get the body of this.
- public Result get_header (HeaderField field, out unowned string? value, int indx)
Get the
indx
header value with keyfield
from this. - public Result get_header_by_name (string header, out unowned string? value, int index)
Get the
index
header value with keyheader
from this. - public MsgType get_type ()
Get the message type of this.
- public bool has_body_buffer ()
Checks if this has a body and the body is stored as Buffer.
- public Result init ()
Initialize this.
- public Result init_data (uint8 channel)
Initialize a new data Message for
channel
. - public Result init_request (Method method, string uri)
Initialize this as a request message with
method
anduri
. - public Result init_response (StatusCode code, string? reason, Message? request)
Initialize this with
code
andreason
. - public AuthCredential[] parse_auth_credentials (HeaderField field)
Parses the credentials given in a WWW-Authenticate or Authorization header.
- public Result parse_data (out uint8 channel)
Parse the data message this and store the channel in
channel
. - public Result parse_request (out Method method, out unowned string uri, out Version version)
Parse the request message this and store the values
method
,uri
andversion
. - public Result parse_response (out StatusCode code, out unowned string reason, out Version version)
Parse the response message this and store the values
code
,reason
andversion
. - public Result remove_header (HeaderField field, int indx)
Remove the
indx
header with keyfield
from this. - public Result remove_header_by_name (string header, int index)
Remove the
index
header with keyheader
from this. - public Result set_body (uint8[] data)
Set the body of this to a copy of
data
. - public Result set_body_buffer (Buffer buffer)
Set the body of this to
buffer
. - public Result steal_body (out uint8[] data)
Take the body of this and store it in
data
anddata.length
. - public Result steal_body_buffer (out Buffer buffer)
Take the body of this and store it in
buffer
. - public Result take_body (owned uint8[] data)
Set the body of this to
data
anddata.length
. - public Result take_body_buffer (owned Buffer buffer)
Set the body of this to
buffer
. - public Result take_header (HeaderField field, owned string value)
Add a header with key
field
andvalue
to this. - public Result take_header_by_name (string header, owned string value)
Add a header with key
header
andvalue
to this. - public Result unset ()
Unset the contents of this so that it becomes an uninitialized Message again.
Fields:
- public MsgType type
- public uint8 type_data_data_channel
- public Method type_data_request_method
- public unowned string type_data_request_uri
- public Version type_data_request_version
- public StatusCode type_data_response_code
- public unowned string type_data_response_reason
- public Version type_data_response_version