Application and session functions
Defines |
#define | rxv_spin_app_sget(ctx, key) rxv_spin_string(rxv_spin_app_get((ctx),(key))) |
#define | rxv_spin_app_sset(ctx, key, val) rxv_spin_app_set((ctx),(key),rxv_spin_datum(rxv_spin_pool(ctx),(val),NULL)) |
#define | rxv_spin_ses_sget(ctx, key) rxv_spin_string(rxv_spin_ses_get((ctx),(key))) |
#define | rxv_spin_ses_sset(ctx, key, val) rxv_spin_ses_set((ctx),(key),rxv_spin_datum(rxv_spin_pool(ctx),(val),NULL)) |
Functions |
rxv_spin_data_t * | rxv_spin_app_get (rxv_spin_ctx_t *ctx, const char *key) |
rxv_spin_data_t * | rxv_spin_app_set (rxv_spin_ctx_t *ctx, const char *key, rxv_spin_data_t *val) |
apr_status_t | rxv_spin_app_del (rxv_spin_ctx_t *ctx, const char *key) |
rxv_spin_data_t * | rxv_spin_ses_get (rxv_spin_ctx_t *ctx, const char *key) |
rxv_spin_data_t * | rxv_spin_ses_set (rxv_spin_ctx_t *ctx, const char *key, rxv_spin_data_t *val) |
apr_status_t | rxv_spin_ses_del (rxv_spin_ctx_t *ctx, const char *key) |
void | rxv_spin_ses_kill (rxv_spin_ctx_t *ctx) |
char * | rxv_spin_ses_id (rxv_spin_ctx_t *ctx) |
int | rxv_spin_ses_valid (rxv_spin_ctx_t *ctx) |
apr_time_t | rxv_spin_ses_atime (rxv_spin_ctx_t *ctx) |
Detailed Description
Application and session functions (mod_spin API)
Define Documentation
#define rxv_spin_app_sget |
( |
ctx, |
|
|
key |
|
) |
rxv_spin_string(rxv_spin_app_get((ctx),(key))) |
get a string from application instead of single
#define rxv_spin_app_sset |
( |
ctx, |
|
|
key, |
|
|
val |
|
) |
rxv_spin_app_set((ctx),(key),rxv_spin_datum(rxv_spin_pool(ctx),(val),NULL)) |
set string into application instead of single
#define rxv_spin_ses_sget |
( |
ctx, |
|
|
key |
|
) |
rxv_spin_string(rxv_spin_ses_get((ctx),(key))) |
get a string from session instead of single
#define rxv_spin_ses_sset |
( |
ctx, |
|
|
key, |
|
|
val |
|
) |
rxv_spin_ses_set((ctx),(key),rxv_spin_datum(rxv_spin_pool(ctx),(val),NULL)) |
set string into application instead of single
Function Documentation
Retrieve a value from the application store.
- Parameters:
-
| ctx | Context |
| key | Unique key by which this value is identified |
- Returns:
- pointer to the value, NULL on error
- Example:
-
Put value in the application store.
- Parameters:
-
| ctx | Context |
| key | Unique key by which this value is identified |
| val | Value to be placed in the store (single) |
- Returns:
- pointer to the value, NULL on error
- Example:
-
- Warning:
- The data set into the application store has to have at least the lifetime of the request. Anything less and the pool used to hold the data may get cleaned before the bucket holding the value gets created. In most cases, this will result in a segfault.
apr_status_t rxv_spin_app_del |
( |
rxv_spin_ctx_t * |
ctx, |
|
|
const char * |
key | |
|
) |
| | |
Delete a record in the application store.
- Parameters:
-
| ctx | Context |
| key | Unique key by which record is identified |
- Returns:
- APR_SUCCESS on success, otherwise an error
- Example:
-
Retrieve a value from the session store.
- Parameters:
-
| ctx | Context |
| key | Unique key by which this value is identified |
- Returns:
- pointer to the value, NULL on error
- Example:
-
Put value in the session store.
- Parameters:
-
| ctx | Context |
| key | Unique key by which this value is identified |
| val | Value to be placed in the store (single) |
- Returns:
- pointer to the value, NULL on error
- Example:
-
- Warning:
- The data set into the session store has to have at least the lifetime of the request. Anything less and the pool used to hold the data may get cleaned before the bucket holding the value gets created. In most cases, this will result in a segfault.
apr_status_t rxv_spin_ses_del |
( |
rxv_spin_ctx_t * |
ctx, |
|
|
const char * |
key | |
|
) |
| | |
Delete a record in the session store.
- Parameters:
-
| ctx | Context |
| key | Unique key by which record is identified |
- Returns:
- APR_SUCCESS on success, otherwise an error
- Example:
-
Kill the session
- Parameters:
-
- Example:
-
Get session id
- Parameters:
-
- Returns:
- Session id or NULL if no session support exists
- Example:
-
Find out if the session is valid.
- Parameters:
-
- Returns:
- 1 if valid, otherwise 0
- Example:
-
Last access time for the session.
- Parameters:
-
- Returns:
- Access time, 0 if session has been killed or on error
- Example:
-