GstRTSPToken

GstRTSPToken — Roles and permissions for a client

Functions

Types and Values

struct GstRTSPToken

Description

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)

Functions

gst_rtsp_token_new_empty ()

GstRTSPToken *
gst_rtsp_token_new_empty (void);

Create a new empty Authorization token.

Returns

a new empty authorization token.

[transfer full]


gst_rtsp_token_new ()

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().

Parameters

firstfield

the first fieldname

 

...

additional arguments

 

Returns

a new authorization token.

[transfer full]


gst_rtsp_token_new_valist ()

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().

Parameters

firstfield

the first fieldname

 

var_args

additional arguments

 

Returns

a new authorization token.

[transfer full]


gst_rtsp_token_ref ()

GstRTSPToken *
gst_rtsp_token_ref (GstRTSPToken *token);

Increase the refcount of this token.

Parameters

token

The token to refcount

 

Returns

token (for convenience when doing assignments).

[transfer full]


gst_rtsp_token_unref ()

void
gst_rtsp_token_unref (GstRTSPToken *token);

Decrease the refcount of an token, freeing it if the refcount reaches 0.

Parameters

token

the token to refcount.

[transfer full]

gst_rtsp_token_get_structure ()

const GstStructure *
gst_rtsp_token_get_structure (GstRTSPToken *token);

Access the structure of the token.

Parameters

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]


gst_rtsp_token_writable_structure ()

GstStructure *
gst_rtsp_token_writable_structure (GstRTSPToken *token);

Get a writable version of the structure.

Parameters

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. This function checks if token is writable and will never return NULL.

MT safe.

[transfer none]


gst_rtsp_token_get_string ()

const gchar *
gst_rtsp_token_get_string (GstRTSPToken *token,
                           const gchar *field);

Get the string value of field in token .

Parameters

token

a GstRTSPToken

 

field

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]


gst_rtsp_token_is_allowed ()

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.

Parameters

token

a GstRTSPToken

 

field

a field name

 

Returns

TRUE if token has a boolean field named field set to TRUE.

Types and Values

struct GstRTSPToken

struct GstRTSPToken {
  GstMiniObject mini_object;
};

An opaque object used for checking authorisations. It is generated after successful authentication.

See Also

GstRTSPClient, GstRTSPPermissions, GstRTSPAuth