diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2009-09-04 15:24:05 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2009-09-04 15:24:05 +0200 |
commit | dea39103b369f0903be326c505d36a9d489a0c1e (patch) | |
tree | 97a114b3fe7667c07678abdf528530efae8bfea8 /common/eurephiadb_session_struct.h | |
parent | 856ecfcec0956d3269f2b119836ec31908d02836 (diff) | |
download | eurephia-dea39103b369f0903be326c505d36a9d489a0c1e.tar.gz eurephia-dea39103b369f0903be326c505d36a9d489a0c1e.tar.xz eurephia-dea39103b369f0903be326c505d36a9d489a0c1e.zip |
More comments in common/
Diffstat (limited to 'common/eurephiadb_session_struct.h')
-rw-r--r-- | common/eurephiadb_session_struct.h | 47 |
1 files changed, 31 insertions, 16 deletions
diff --git a/common/eurephiadb_session_struct.h b/common/eurephiadb_session_struct.h index 8cd9657..93ea5e9 100644 --- a/common/eurephiadb_session_struct.h +++ b/common/eurephiadb_session_struct.h @@ -19,29 +19,44 @@ * */ +/** + * @file eurephiadb_session_struct.h + * @author David Sommerseth <dazo@users.sourceforge.net> + * @date 2008-11-05 + * + * @brief Definition of eurephiaSESSION struct and other + * session oriented constants + * + */ + #ifndef EUREPHIADB_SESSION_STRUCT_H_ #define EUREPHIADB_SESSION_STRUCT_H_ -typedef enum { stAUTHENTICATION, stSESSION} sessionType; +/** + * Defines the different session types available + */ +typedef enum { stAUTHENTICATION, /**< A pure authentication session, should only be used during auth. */ + stSESSION /**< A user session, may contain variables related to users session */ +} sessionType; -#define SESSION_NEW 1 -#define SESSION_EXISTING 2 -#define SESSION_REGISTERED 3 -#define SESSION_LOGGEDOUT 4 +#define SESSION_NEW 1 /**< The session is newly created */ +#define SESSION_EXISTING 2 /**< The session is reloaded from a previously saved session */ +#define SESSION_REGISTERED 3 /**< The session is registered as logged in */ +#define SESSION_LOGGEDOUT 4 /**< The user logged out and the session is closed */ -#define SESSVAL_NEW 10 -#define SESSVAL_UPDATE 11 -#define SESSVAL_DELETE 12 +#define SESSVAL_NEW 10 /**< Save a new session value in the database */ +#define SESSVAL_UPDATE 11 /**< Update an existing session value in the database */ +#define SESSVAL_DELETE 12 /**< Delete a session value */ -// -// Struct which contains session unique data -// +/** + * Struct which contains session unique data + */ typedef struct { - char *sessionkey; - int sessionstatus; - sessionType type; - eurephiaVALUES *sessvals; + char *sessionkey; /**< A unique session key. */ + int sessionstatus; /**< Must be SESSION_NEW, SESSION_EXISTING, + * SESSION_REGISTERED or SESSION_LOGGEDOUT */ + sessionType type; /**< Must be stAUTHENTICATION or stSESSION */ + eurephiaVALUES *sessvals; /**< Values unique for this session only */ } eurephiaSESSION; - #endif /* !EUREPHIADB_SESSION_STRUCT_H_ */ |