gsasl  2.2.1
Functions
property.c File Reference
#include <config.h>
#include "internal.h"

Go to the source code of this file.

Functions

void gsasl_property_free (Gsasl_session *sctx, Gsasl_property prop)
 
int gsasl_property_set (Gsasl_session *sctx, Gsasl_property prop, const char *data)
 
int gsasl_property_set_raw (Gsasl_session *sctx, Gsasl_property prop, const char *data, size_t len)
 
const char * gsasl_property_fast (Gsasl_session *sctx, Gsasl_property prop)
 
const char * gsasl_property_get (Gsasl_session *sctx, Gsasl_property prop)
 

Function Documentation

◆ gsasl_property_fast()

const char* gsasl_property_fast ( Gsasl_session sctx,
Gsasl_property  prop 
)

gsasl_property_fast:

Parameters
sctxsession handle.
propenumerated value of Gsasl_property type, indicating the type of data in @data.

Retrieve the data stored in the session handle for given property @prop.

The pointer is to live data, and must not be deallocated or modified in any way.

This function will not invoke the application callback.

Return value: Return property value, if known, or NULL if no value known.

Since: 0.2.0

Definition at line 262 of file property.c.

◆ gsasl_property_free()

void gsasl_property_free ( Gsasl_session sctx,
Gsasl_property  prop 
)

gsasl_property_free:

Parameters
sctxsession handle.
propenumerated value of Gsasl_property type to clear

Deallocate associated data with property @prop in session handle. After this call, gsasl_property_fast(@sctx, @prop) will always return NULL.

Since: 2.0.0

Definition at line 159 of file property.c.

◆ gsasl_property_get()

const char* gsasl_property_get ( Gsasl_session sctx,
Gsasl_property  prop 
)

gsasl_property_get:

Parameters
sctxsession handle.
propenumerated value of Gsasl_property type, indicating the type of data in @data.

Retrieve the data stored in the session handle for given property @prop, possibly invoking the application callback to get the value.

The pointer is to live data, and must not be deallocated or modified in any way.

This function will invoke the application callback, using gsasl_callback(), when a property value is not known.

Return value: Return data for property, or NULL if no value known.

Since: 0.2.0

Definition at line 292 of file property.c.

◆ gsasl_property_set()

int gsasl_property_set ( Gsasl_session sctx,
Gsasl_property  prop,
const char *  data 
)

gsasl_property_set:

Parameters
sctxsession handle.
propenumerated value of Gsasl_property type, indicating the type of data in @data.
datazero terminated character string to store.

Make a copy of @data and store it in the session handle for the indicated property @prop.

You can immediately deallocate @data after calling this function, without affecting the data stored in the session handle.

Return value: GSASL_OK iff successful, otherwise GSASL_MALLOC_ERROR.

Since: 0.2.0

Definition at line 189 of file property.c.

◆ gsasl_property_set_raw()

int gsasl_property_set_raw ( Gsasl_session sctx,
Gsasl_property  prop,
const char *  data,
size_t  len 
)

gsasl_property_set_raw:

Parameters
sctxsession handle.
propenumerated value of Gsasl_property type, indicating the type of data in @data.
datacharacter string to store.
lenlength of character string to store.

Make a copy of @len sized @data and store a zero terminated version of it in the session handle for the indicated property @prop.

You can immediately deallocate @data after calling this function, without affecting the data stored in the session handle.

Except for the length indicator, this function is identical to gsasl_property_set.

Return value: GSASL_OK iff successful, otherwise GSASL_MALLOC_ERROR.

Since: 0.2.0

Definition at line 218 of file property.c.