![]() |
![]() |
![]() |
GStreamer RTSP Server Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
struct GstRTSPToken; GstRTSPToken * gst_rtsp_token_new_empty (void
); GstRTSPToken * gst_rtsp_token_new (const gchar *firstfield
,...
); GstRTSPToken * gst_rtsp_token_new_valist (const gchar *firstfield
,va_list var_args
); GstRTSPToken * gst_rtsp_token_ref (GstRTSPToken *token
); void gst_rtsp_token_unref (GstRTSPToken *token
); const GstStructure * gst_rtsp_token_get_structure (GstRTSPToken *token
); GstStructure * gst_rtsp_token_writable_structure (GstRTSPToken *token
); const gchar * gst_rtsp_token_get_string (GstRTSPToken *token
,const gchar *field
); gboolean gst_rtsp_token_is_allowed (GstRTSPToken *token
,const gchar *field
);
A GstRTSPToken contains the permissions and roles of the user performing the current request. A token is usually created when a user is authenticated by the GstRTSPAuth object and is then placed as the current token for the current request.
GstRTSPAuth can use the token and its contents to check authorization for various operations by comparing the token to the GstRTSPPermissions of the object.
The accepted values of the token are entirely defined by the GstRTSPAuth object that implements the security policy.
Last reviewed on 2013-07-15 (1.0.0)
struct GstRTSPToken { GstMiniObject mini_object; };
An opaque object used for checking authorisations. It is generated after successful authentication.
GstRTSPToken * gst_rtsp_token_new_empty (void
);
Create a new empty Authorization token.
Returns : |
a new empty authorization token. [transfer full] |
GstRTSPToken * gst_rtsp_token_new (const gchar *firstfield
,...
);
Create a new Authorization token with the given fieldnames and values.
Arguments are given similar to gst_structure_new()
.
|
the first fieldname |
|
additional arguments |
Returns : |
a new authorization token. [transfer full] |
GstRTSPToken * gst_rtsp_token_new_valist (const gchar *firstfield
,va_list var_args
);
Create a new Authorization token with the given fieldnames and values.
Arguments are given similar to gst_structure_new_valist()
.
|
the first fieldname |
|
additional arguments |
Returns : |
a new authorization token. [transfer full] |
GstRTSPToken * gst_rtsp_token_ref (GstRTSPToken *token
);
Increase the refcount of this token.
|
The token to refcount |
Returns : |
token (for convenience when doing assignments). [transfer full]
|
void gst_rtsp_token_unref (GstRTSPToken *token
);
Decrease the refcount of an token, freeing it if the refcount reaches 0.
|
the token to refcount. [transfer full] |
const GstStructure * gst_rtsp_token_get_structure (GstRTSPToken *token
);
Access the structure of the token.
|
The GstRTSPToken. |
Returns : |
The structure of the token. The structure is still owned by the token, which means that you should not free it and that the pointer becomes invalid when you free the token. MT safe. [transfer none] |
GstStructure * gst_rtsp_token_writable_structure (GstRTSPToken *token
);
Get a writable version of the structure.
|
The GstRTSPToken. |
Returns : |
The structure of the token. The structure is still
owned by the token, which means that you should not free it and that the
pointer becomes invalid when you free the token. This function checks if
token is writable and will never return NULL .
MT safe. [transfer none]
|
const gchar * gst_rtsp_token_get_string (GstRTSPToken *token
,const gchar *field
);
Get the string value of field
in token
.
|
a GstRTSPToken |
|
a field name |
Returns : |
the string value of field in
token or NULL when field is not defined in token . The string
becomes invalid when you free token . [transfer none][nullable]
|
gboolean gst_rtsp_token_is_allowed (GstRTSPToken *token
,const gchar *field
);
Check if token
has a boolean field
and if it is set to TRUE
.
|
a GstRTSPToken |
|
a field name |
Returns : |
TRUE if token has a boolean field named field set to TRUE . |