Update of /cvsroot/mod-c/ehtml/include
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv13627/include
Modified Files:
ehtml.h
Log Message:
* EHTML_* macros are now negative values (suitable for storing in errno).
* Session api is now in Session.h
* Prepared ehtml_random() for random number generation.
Index: ehtml.h
===================================================================
RCS file: /cvsroot/mod-c/ehtml/include/ehtml.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** ehtml.h 2 Mar 2006 23:02:53 -0000 1.18
--- ehtml.h 8 Sep 2006 14:26:32 -0000 1.19
***************
*** 27,45 ****
/**
! * Standard OK return code.
! */
! #define EHTML_OK 0
! /**
! * Standard ERROR return code.
! */
! #define EHTML_ERR 1
! /**
! * Return value that session drivers return if a session has timed out.
! */
! #define EHTML_SESSION_TIMEOUT 2
! /**
! * Invalid call.
*/
! #define EHTML_INVALID_CALL 3
/**
--- 27,40 ----
/**
! * Status codes:
! *
! * If possitive, it is a valid errno error.
! * Otherwise, it is an adhoc error code (see below).
*/
! #define EHTML_OK 0 /** Everything went ok */
! #define EHTML_ERR -1 /** Unspecified error */
! #define EHTML_TIMEOUT -2 /** Operation time out */
! #define EHTML_INVALID_CALL -3 /** Invalid call */
! #define EHTML_INVALID_CALL -3 /** Invalid call */
/**
***************
*** 160,213 ****
/**
- * The main structure for the session API.
- */
- struct ses_api_t
- {
- /**
- * The arguments for the session driver. These are provided by the user
- * in 'httpd.conf' or '.htaccess' files.
- * This one contains data as parsed by the driver itself.
- */
- void* arguments;
- /**
- * This member is meant for the driver to pass additional information to
- * itself.
- */
- void* dr_data;
- /**
- * This function is always called first (before any actual session
- * operation is invoked).
- * <p>This function is intended for drivers that support persistent
- * connections.</p>
- */
- int (*InitConnection) (PerSessionData*, request_context*, void **);
- /**
- * This function must be called last.
- */
- int (*EndConnection) (PerSessionData*, request_context*, void *);
- /**
- * This function creates a new session.
- */
- int (*RegisterID) (PerSessionData*, request_context*, void *);
- /**
- * This function closes an existing session.
- */
- int (*UnregisterID) (PerSessionData*, request_context*, void *);
- /**
- * This function sets the duration of an existing session.
- */
- int (*SetDuration) (PerSessionData*, request_context*, void *);
- /**
- * This function fetches data from the session manager if the session with
- * the ID given in the <code>PerSessionData</code> actually exists.
- */
- int (*GetSessionData) (PerSessionData*, request_context*, void *);
- /**
- * Sets the data of an existing session.
- */
- int (*SetSessionData) (PerSessionData*, request_context*, void *);
- };
-
- /**
* The main entry function of an EHTML file. This function is called upon a
* request for the EHTML file.
--- 155,158 ----
***************
*** 215,217 ****
--- 160,165 ----
typedef int (*ehtml_run_func) ( request_context* );
+ //@TODO: we can write a better random number generator.
+ #define ehtml_random() random()
+
#endif /*_EHTML_H_*/
|