Main Page | Class List | File List | Class Members | File Members

mycgisession.h File Reference

#include <mysql/mysql.h>
#include <stdlib.h>

Go to the source code of this file.

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


Function Documentation

void cgisession_dump (   ) 
 

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.

void cgisession_free (   ) 
 

Frees up data allocated for the session..

Definition at line 206 of file mycgisession.c.

void* cgisession_get_data (   ) 
 

Get's the data for the cgi session..

Definition at line 230 of file mycgisession.c.

References CGISESSION_struct::data.

char* cgisession_get_key (   ) 
 

gets the key for the current cgisession

Definition at line 238 of file mycgisession.c.

References CGISESSION_struct::key.

int cgisession_have_mysql_connection (  MYSQL *  m  ) 
 

This overloaded function to use if you allready have a mysql connection you want to use

Definition at line 103 of file mycgisession.c.

int cgisession_init_mysql_connection (  char *  host,
char *  username,
char *  password,
char *  database,
unsigned int  port
) 
 

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.

int cgisession_load (  char *  key  ) 
 

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.

int cgisession_new (   ) 
 

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.

int cgisession_save (   ) 
 

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.

int cgisession_set_data (  void *  data,
unsigned int  size
) 
 

Set's the data for the cgi session..

Definition at line 216 of file mycgisession.c.

References CGISESSION_struct::data, and CGISESSION_struct::size.


Generated on Tue Feb 15 13:35:47 2005 for MyCGISession by  doxygen 1.3.9.1