2012-10-15 15:21 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/hbformat/hbfmtcls.prg
* new TOFIX:
"end class" is converted to "end CLASS" instead of "END CLASS"
* contrib/gtwvg/3state.prg
* contrib/gtwvg/activex.prg
* contrib/gtwvg/bitmap.prg
* contrib/gtwvg/checkbox.prg
* contrib/gtwvg/class.prg
* contrib/gtwvg/combobox.prg
* contrib/gtwvg/crt.prg
* contrib/gtwvg/dataref.prg
* contrib/gtwvg/dialog.prg
* contrib/gtwvg/drawarea.prg
* contrib/gtwvg/htmlview.prg
* contrib/gtwvg/listbox.prg
* contrib/gtwvg/menubar.prg
* contrib/gtwvg/mle.prg
* contrib/gtwvg/parthdlr.prg
* contrib/gtwvg/pushbut.prg
* contrib/gtwvg/radiobut.prg
* contrib/gtwvg/scrollbr.prg
* contrib/gtwvg/sle.prg
* contrib/gtwvg/statbar.prg
* contrib/gtwvg/static.prg
* contrib/gtwvg/syswnd.prg
* contrib/gtwvg/tabpage.prg
* contrib/gtwvg/toolbar.prg
* contrib/gtwvg/treeview.prg
* contrib/gtwvg/wnd.prg
* contrib/hbgd/gdbarcod.prg
* contrib/hbgd/gdchart.prg
* contrib/hbgd/gdimage.prg
* contrib/hbtip/client.prg
* contrib/hbtip/url.prg
* contrib/xhb/hblog.prg
* contrib/xhb/hblognet.prg
* contrib/xhb/hjwindow.prg
* contrib/xhb/htjlist.prg
* contrib/xhb/htmutil.prg
* contrib/xhb/tcgi.prg
* contrib/xhb/tfile.prg
* contrib/xhb/trpc.prg
* contrib/xhb/trpccli.prg
* contrib/xhb/ttable.prg
* contrib/xhb/txml.prg
* contrib/xhb/xhbtedit.prg
* doc/clipper.txt
* doc/en/command.txt
* doc/en/objfunc.txt
* extras/gtwvw/tests/drawimg.prg
* extras/gtwvw/tests/wvwmouse.prg
* extras/hbdoc/genbase.prg
* extras/hbdoc/genhtml.prg
* extras/hbdoc/gentxt.prg
* extras/hbdoc/tmplates.prg
* extras/httpsrv/cookie.prg
* extras/httpsrv/modules/tableservletdb.prg
* extras/httpsrv/session.prg
* tests/testdecl.prg
* changed code to use Class(y) OOP syntax
DATA -> VAR, CLASSDATA -> CLASS VAR, CLASS -> CREATE CLASS
(except ENDCLASS -> END CLASS, because hbformat doesn't
recognize it yet)
This commit is contained in:
@@ -60,15 +60,15 @@ RETURN uhttpd_Cookie():New( cDomain, cPath, nExpireDays, nExpireSecs )
|
||||
CLASS uhttpd_Cookie
|
||||
|
||||
// Data for cookies
|
||||
DATA aCookies INIT {} // Using an array to mantain order
|
||||
DATA cDomain
|
||||
DATA cPath INIT "/"
|
||||
DATA cExpire
|
||||
DATA lSecure INIT .F.
|
||||
DATA lHttpOnly
|
||||
DATA nExpireDays INIT 0
|
||||
DATA nExpireSecs INIT 7200 // 1 hour - TODO set environment constant
|
||||
DATA lCookiesSent INIT .F.
|
||||
VAR aCookies INIT {} // Using an array to mantain order
|
||||
VAR cDomain
|
||||
VAR cPath INIT "/"
|
||||
VAR cExpire
|
||||
VAR lSecure INIT .F.
|
||||
VAR lHttpOnly
|
||||
VAR nExpireDays INIT 0
|
||||
VAR nExpireSecs INIT 7200 // 1 hour - TODO set environment constant
|
||||
VAR lCookiesSent INIT .F.
|
||||
|
||||
METHOD SetCookie()
|
||||
METHOD DeleteCookie()
|
||||
|
||||
@@ -128,7 +128,7 @@ FUNCTION HRBMAIN()
|
||||
|
||||
CLASS TableManager
|
||||
|
||||
CLASSVAR ROWS_PER_PAGE INIT 23
|
||||
CLASS VAR ROWS_PER_PAGE INIT 23
|
||||
|
||||
VAR aData INIT {}
|
||||
|
||||
|
||||
@@ -104,40 +104,40 @@ CLASS uhttpd_Session
|
||||
|
||||
HIDDEN:
|
||||
|
||||
DATA oCookie
|
||||
DATA cSID
|
||||
DATA cSavePath INIT "/tmp"
|
||||
DATA cName // INIT "SESSIONID"
|
||||
DATA lAuto_Start INIT .F. // .F. = no autostart
|
||||
DATA nGc_Probability INIT 33 // Every 1/3 of checks i'll lunch Session GC
|
||||
DATA nGc_MaxLifeTime INIT 1440 // seconds - Number of seconds after gc can delete a session
|
||||
// DATA cSerialize_Handler INIT "HBHTMLLIB"
|
||||
DATA nCookie_LifeTime INIT 3600 //0 // Number of seconds to keep cookie, 0 = until browser is closed
|
||||
DATA cCookie_Path INIT "/"
|
||||
DATA cCookie_Domain
|
||||
DATA lCookie_Secure INIT .F.
|
||||
DATA lUse_Cookies INIT .T. // .T. = Use cookies to store session id on client side
|
||||
DATA lUse_Only_Cookies INIT .F.
|
||||
DATA cReferrer_Check // If is set check if referrer is equal to, if it isn't block
|
||||
// DATA cEntropy_File
|
||||
// DATA nEntropy_Lenght
|
||||
DATA cCache_Limiter INIT "nocache" // Possible values are: none, nocache, private, private_no_expire, public
|
||||
DATA nCache_Expire INIT 180 // in minutes, not checked if cCache_Limiter == none or nocache
|
||||
DATA lUse_Trans_SID INIT .F. // .F. = no SID appended to URL
|
||||
VAR oCookie
|
||||
VAR cSID
|
||||
VAR cSavePath INIT "/tmp"
|
||||
VAR cName // INIT "SESSIONID"
|
||||
VAR lAuto_Start INIT .F. // .F. = no autostart
|
||||
VAR nGc_Probability INIT 33 // Every 1/3 of checks i'll lunch Session GC
|
||||
VAR nGc_MaxLifeTime INIT 1440 // seconds - Number of seconds after gc can delete a session
|
||||
// VAR cSerialize_Handler INIT "HBHTMLLIB"
|
||||
VAR nCookie_LifeTime INIT 3600 //0 // Number of seconds to keep cookie, 0 = until browser is closed
|
||||
VAR cCookie_Path INIT "/"
|
||||
VAR cCookie_Domain
|
||||
VAR lCookie_Secure INIT .F.
|
||||
VAR lUse_Cookies INIT .T. // .T. = Use cookies to store session id on client side
|
||||
VAR lUse_Only_Cookies INIT .F.
|
||||
VAR cReferrer_Check // If is set check if referrer is equal to, if it isn't block
|
||||
// VAR cEntropy_File
|
||||
// VAR nEntropy_Lenght
|
||||
VAR cCache_Limiter INIT "nocache" // Possible values are: none, nocache, private, private_no_expire, public
|
||||
VAR nCache_Expire INIT 180 // in minutes, not checked if cCache_Limiter == none or nocache
|
||||
VAR lUse_Trans_SID INIT .F. // .F. = no SID appended to URL
|
||||
|
||||
// Session Storage code blocks
|
||||
DATA bOpen //INIT {| cPath, cName | ::SessionOpen( cPath, cName ) }
|
||||
DATA bClose //INIT {|| ::SessionClose() }
|
||||
DATA bRead //INIT {| cID | ::SessionRead( cID ) }
|
||||
DATA bWrite //INIT {| cID, cData | ::SessionWrite( cID, cData ) }
|
||||
DATA bDestroy //INIT {| cID | ::SessionDestroy( cID ) }
|
||||
DATA bGC //INIT {| nMaxLifeTime | ::SessionGC( nMaxLifeTime ) }
|
||||
DATA nFileRetry INIT 10 // How many time try to open / write / delete file in case of error
|
||||
DATA nFileWait INIT 500 // How many milliseconds have to wait before retry
|
||||
VAR bOpen //INIT {| cPath, cName | ::SessionOpen( cPath, cName ) }
|
||||
VAR bClose //INIT {|| ::SessionClose() }
|
||||
VAR bRead //INIT {| cID | ::SessionRead( cID ) }
|
||||
VAR bWrite //INIT {| cID, cData | ::SessionWrite( cID, cData ) }
|
||||
VAR bDestroy //INIT {| cID | ::SessionDestroy( cID ) }
|
||||
VAR bGC //INIT {| nMaxLifeTime | ::SessionGC( nMaxLifeTime ) }
|
||||
VAR nFileRetry INIT 10 // How many time try to open / write / delete file in case of error
|
||||
VAR nFileWait INIT 500 // How many milliseconds have to wait before retry
|
||||
|
||||
DATA nActiveSessions INIT 0
|
||||
VAR nActiveSessions INIT 0
|
||||
|
||||
DATA lSessionActive INIT .F.
|
||||
VAR lSessionActive INIT .F.
|
||||
|
||||
METHOD GenerateSID()
|
||||
METHOD CheckSID()
|
||||
|
||||
Reference in New Issue
Block a user