Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

session.h

Go to the documentation of this file.
00001 
00002 #ifndef __AWHANDLER_WEBSMCP_SESSION__
00003 #define __AWHANDLER_WEBSMCP_SESSION__
00004 
00005 #include "pagelayout.h"
00006  
00008 typedef struct {
00009 
00010   /* session key */
00011   u_int32_t
00012    key;
00013 
00014   /* session key as SetCookie HTTP header */
00015   byte_t
00016    hdr[40];
00017 
00018   /* loginid of user (keep sure this is at least as large 
00019      as column in database) */
00020   byte_t
00021    loginid[16];
00022 
00023   /* ip of user at login time */
00024   aw_ip_addr_t
00025    clientip;
00026 
00027   /* last access time (last time get_session() was called) */
00028   aw_timestamp_t
00029    atime;
00030   
00031   /* non-zero if authenticated */
00032   u_int32_t
00033    authenticated;
00034 
00035   /* handler to user in model */
00036   const aw_model_userhandle_t
00037    *handle;
00038 
00039   /* the page layout and state */
00040   aw_websmcphandler_layout_t
00041    page_layout;
00042 
00043 } aw_websmcphandler_session_t;
00044 
00051 aw_websmcphandler_session_t *aw_websmcphandler_find_session(aw_websmcphandler_t *h, const byte_t *loginid);
00052 
00058 aw_websmcphandler_session_t *aw_websmcphandler_get_session(aw_wwwhandler_xtn_t *xtn);
00059 
00065 aw_websmcphandler_session_t *aw_websmcphandler_make_session(aw_wwwhandler_xtn_t *xtn);
00066 
00073 void aw_websmcphandler_close_session(aw_wwwhandler_xtn_t *xtn, 
00074                                      aw_websmcphandler_session_t *session,
00075                                      const byte_t *reason);
00076 
00085 aw_websmcphandler_session_t *aw_websmcphandler_authenticate_session(aw_wwwhandler_xtn_t *xtn, 
00086                                                                     aw_websmcphandler_session_t *session,
00087                                                                     const byte_t *loginid,
00088                                                                     const byte_t *chap);
00089 
00090 
00095 void aw_websmcphandler_timeout_session(aw_websmcphandler_t *h); 
00096 
00097 #endif
Aware 0.11.1 Copyright (C) 1998-2005 Russell Leighton (russ@elegant-software.com)