View Source

[modwtcl]
apreq.h
dist/
libapreq1/
mod_wtcl.c
mod_wtcl.h
setupExclude.txt
util/
win.def
win.mak
wt1.1/
WtAppTable.c
WtAppTable.h
WtBasicCmds.c
WtBasicCmds.h
WtClientRequest.c
WtClientRequest.h
WtCollection.c
WtCollection.h
WtCollectionCmds.c
WtCollectionCmds.h
WtContext.c
WtContext.h
WtContextEvents.c
WtContextEvents.h
WtCookie.c
WtCookie.h
WtDbSession.c
WtDbSession.h
WtExecute.c
WtExecute.h
WtHtmlEntities.c
WtHtmlEntities.h
WtInitCmds.c
WtInitCmds.h
WtMtTable.c
WtMtTable.h
WtMultiTable.c
WtMultiTable.h
WtOS.h
WtProcSession.c
WtProcSession.h
WtResponse.c
WtResponse.h
WtServerCmds.c
WtServerCmds.h
WtSession.c
WtSession.h
WtSettings.c
WtSettings.h
WtTable.c
WtTable.h
WtTableCmds.c
WtTableCmds.h
WtTableUtil.c
WtTableUtil.h
WtUpload.c
WtUpload.h
WtUtil.c
WtUtil.h
WtWebErrors.c
WtWebErrors.h
WtWindows.h
File: / archive / modwtcl / WtSession.h

Lines Size Modified Created Owner MIME Types
106 4,197 2010/05/08 18:46:41 2011/06/13 15:35:15 BUILTIN\Administrators text/x-chdr

0001
/*
0002
 * Copyright 2001 Alexander Boverman and the original authors.
0003
 * 
0004
 * Licensed under the Apache License, Version 2.0 (the "License");
0005
 * you may not use this file except in compliance with the License.
0006
 * You may obtain a copy of the License at
0007
 * 
0008
 *      http://www.apache.org/licenses/LICENSE-2.0
0009
 * 
0010
 * Unless required by applicable law or agreed to in writing, software
0011
 * distributed under the License is distributed on an "AS IS" BASIS,
0012
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013
 * See the License for the specific language governing permissions and
0014
 * limitations under the License.
0015
 */
0016
0017
#ifndef _WT_SESSION_H
0018
#define _WT_SESSION_H
0019
0020
#include <tcl.h>
0021
0022
typedef enum WtSessionStatusT
0023
{
0024
  WT_SESSION_STATUS_NEW,
0025
  WT_SESSION_STATUS_ACTIVE,
0026
  WT_SESSION_STATUS_EXPIRED,
0027
  WT_SESSION_STATUS_INVALID
0028
} WtSessionStatus;
0029
0030
typedef struct WtSessionT
0031
{
0032
  int isInitialized;
0033
  Tcl_Obj *clientValue;
0034
  Tcl_Obj *clientId;
0035
  time_t clientTimeStamp;
0036
  Tcl_Obj *cookieName;
0037
  Tcl_Obj *cookie;
0038
  Tcl_Obj *cookieSendMode;
0039
  int autoSweep;
0040
  int maxIdleTime;
0041
  double sweepFrequency;
0042
  Tcl_Obj *handler;
0043
  Tcl_Obj *handlerType;
0044
  int handlerLoaded;
0045
  Tcl_Obj *dbSession;
0046
  Tcl_Obj *procSession;
0047
} WtSession;
0048
0049
void WtInitSession(WtSession *s);
0050
void WtDeleteSession(WtSession *s);
0051
Tcl_Obj *WtGetInitialSessionId(WtSession *s, int *isAutoIdPtr,
0052
  Tcl_Interp *interp);
0053
Tcl_Obj *WtGetClientSessionId(WtSession *s, Tcl_Interp *interp);
0054
Tcl_Obj *WtGenerateSessionId(WtSession *s, Tcl_Interp *interp);
0055
void WtSessionAddEnvironment(Tcl_Obj *str);
0056
Tcl_Obj *WtGetSessionCookie(WtSession *s, Tcl_Interp *interp);
0057
int WtSetSessionCookieName(WtSession *s, Tcl_Obj *name, Tcl_Interp *interp);
0058
int WtSetSessionCookie(WtSession *s, Tcl_Obj *id, Tcl_Interp *interp,
0059
  time_t timeStamp);
0060
int WtSetSessionHandler(WtSession *s, Tcl_Obj *handler, Tcl_Interp *interp);
0061
int WtLoadSessionHandler(WtSession *s, Tcl_Interp *interp);
0062
int WtUnloadSessionHandler(WtSession *s, Tcl_Interp *interp);
0063
int WtShouldSweepSessions(WtSession *s, Tcl_Interp *interp);
0064
int WtSessionEndRequest(WtSession *s, Tcl_Interp *interp);
0065
int WtUnloadSession(WtSession *s, Tcl_Interp *interp);
0066
int WtSessionCmd(ClientData clientData, Tcl_Interp *interp,
0067
  int objc, Tcl_Obj *const objv[]);
0068
int WtSessionClientIdCmd(ClientData clientData, Tcl_Interp *interp,
0069
  WtSession *s, int objc, Tcl_Obj *const objv[]);
0070
int WtSessionNewIdCmd(ClientData clientData, Tcl_Interp *interp,
0071
  WtSession *s, int objc, Tcl_Obj *const objv[]);
0072
int WtSessionCookieNameCmd(ClientData clientData, Tcl_Interp *interp,
0073
  WtSession *s, int objc, Tcl_Obj *const objv[]);
0074
int WtSessionCookieCmd(ClientData clientData, Tcl_Interp *interp,
0075
  WtSession *s, int objc, Tcl_Obj *const objv[]);
0076
int WtSessionCookieSendModeCmd(ClientData clientData, Tcl_Interp *interp,
0077
  WtSession *s, int objc, Tcl_Obj *const objv[]);
0078
int WtSessionMaxIdleTimeCmd(ClientData clientData, Tcl_Interp *interp,
0079
  WtSession *s, int objc, Tcl_Obj *const objv[]);
0080
int WtSessionSweepFrequencyCmd(ClientData clientData, Tcl_Interp *interp,
0081
  WtSession *s, int objc, Tcl_Obj *const objv[]);
0082
int WtSessionHandlerCmd(ClientData clientData, Tcl_Interp *interp,
0083
  WtSession *s, int objc, Tcl_Obj *const objv[]);
0084
int WtSessionHandlerTypeCmd(ClientData clientData, Tcl_Interp *interp,
0085
  WtSession *s, int objc, Tcl_Obj *const objv[]);
0086
WtSession *WtGetAssocSession(Tcl_Interp *interp);
0087
void WtInitSessionCommands(Tcl_Interp *interp);
0088
int WtSessionHandler(WtSession *s, Tcl_Obj *handler,
0089
  Tcl_Obj *method, Tcl_Interp *interp, int objc,
0090
  Tcl_Obj *const objv[]);
0091
WtSession *WtGetAssocSession(Tcl_Interp *interp);
0092
int WtSessionCmd(ClientData clientData, Tcl_Interp *interp,
0093
  int objc, Tcl_Obj *const objv[]);
0094
int WtSessionHandlerStr(WtSession *s, Tcl_Obj *handler,
0095
  const char *methodStr, Tcl_Interp *interp, int objc,
0096
  Tcl_Obj *const objv[]);
0097
int WtSessionHandlerInternal(WtSession *s,
0098
  Tcl_Obj *handler, Tcl_Obj *method, Tcl_Interp *interp,
0099
  int objc, Tcl_Obj *const objv[]);
0100
int WtPrepareSessionHandler(WtSession *s, Tcl_Obj *method,
0101
  Tcl_Interp *interp);
0102
void WtSessionCmdUsage(Tcl_Interp *interp, Tcl_Obj *cmd);
0103
0104
extern const char *wtSessionStatusNames[];
0105
0106
#endif /* !_WT_SESSION_H */