#include "mycgisession.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
Go to the source code of this file.
Classes | |
struct | CGISESSION_struct |
Defines | |
#define | SESSION_TIMEOUT 600 |
#define | SESSION_TABLE "cgi_session" |
#define | ERROR 1; |
#define | ENC_TYPE_NONE 0 |
#define | ENC_TYPE_BASE64 1 |
#define | MAX_TABLE_NAME 64 |
Functions | |
int | cgisession_init_mysql_connection (char *host, char *username, char *password, char *database, unsigned int port) |
int | cgisession_have_mysql_connection (MYSQL *m) |
int | cgisession_load (char *key) |
int | cgisession_save () |
int | cgisession_new () |
void | cgisession_free () |
int | cgisession_set_data (void *data, unsigned int size) |
void * | cgisession_get_data () |
char * | cgisession_get_key () |
void | cgisession_dump () |
int | cgisession_option_encoding (int enc) |
int | cgisession_option_timeout (unsigned int secs) |
int | cgisession_option_table (char *table_name) |
int | cgisession_update (char *key) |
|
Definition at line 37 of file mycgisession.c. Referenced by cgisession_option_encoding(). |
|
Definition at line 36 of file mycgisession.c. Referenced by cgisession_option_encoding(). |
|
Definition at line 34 of file mycgisession.c. |
|
Definition at line 39 of file mycgisession.c. |
|
Definition at line 32 of file mycgisession.c. |
|
Definition at line 31 of file mycgisession.c. |
|
prints the cgisession structure to stdout Definition at line 246 of file mycgisession.c. References CGISESSION_struct::data, CGISESSION_struct::encoding, CGISESSION_struct::key, CGISESSION_struct::size, CGISESSION_struct::stored, and CGISESSION_struct::timeout. |
|
Frees up data allocated for the session.. Definition at line 206 of file mycgisession.c. |
|
Get's the data for the cgi session.. Definition at line 230 of file mycgisession.c. References CGISESSION_struct::data. |
|
gets the key for the current cgisession Definition at line 238 of file mycgisession.c. References CGISESSION_struct::key. |
|
This overloaded function to use if you allready have a mysql connection you want to use Definition at line 103 of file mycgisession.c. |
|
Creates the connection to the mysql database. Must be called before any other function in this library can be called. Definition at line 77 of file mycgisession.c. |
|
If session_key is NULL, this will initiate a new session otherwise it updates the old session indicated by session_key. Calling this function will override values set by calls to the cgisession_option_* functions. If no session exist with the given key, then this function returns NULL. Otherwise it return the newly generated session_key. Definition at line 127 of file mycgisession.c. References cgisession_update(), and CGISESSION_struct::stored. |
|
Creates a new cgisession. This will not be reflected in the database before cgisession_save() has been called. return 0 on success. Definition at line 198 of file mycgisession.c. References CGISESSION_struct::key. |
|
Sets the encoding type Definition at line 264 of file mycgisession.c. References ENC_TYPE_BASE64, ENC_TYPE_NONE, and CGISESSION_struct::encoding. |
|
Sets the name of the cgi session table Definition at line 288 of file mycgisession.c. |
|
Setting this to zero means that the session will never timeout Definition at line 279 of file mycgisession.c. References CGISESSION_struct::encoding. |
|
Saves the cgi session to the database Definition at line 145 of file mycgisession.c. References CGISESSION_struct::key, CGISESSION_struct::size, CGISESSION_struct::stored, and CGISESSION_struct::timeout. |
|
Set's the data for the cgi session.. Definition at line 216 of file mycgisession.c. References CGISESSION_struct::data, and CGISESSION_struct::size. |
|
Rehashes session id Definition at line 362 of file mycgisession.c. References CGISESSION_struct::key. Referenced by cgisession_load(). |