mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-04-22 23:11:15 +00:00
2002-07-28 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWJavaScript.h/.m: o implementation * GSWeb.framework/GSWClientSideScript.h/.m: o implementation * GSWeb.framework/GSWVBScript.h/.m: o implementation * TODO: o updated * GSWeb.framework/GSWConstants.h/.m: o added language__Key * GSWeb.framework/GSWRadioButton.m: o logs o bug fix for checked case * GSWeb.framework/GSWDirectAction.m: o added -existingSessionWithSessionID: * GSWeb.framework/PageDef.g o Handle function references (@ in values) * GSWeb.framework/GSWPageDefLexer.h/.m: o re-generated after PageDef.g change * GSWeb.framework/GSWPageDefParserTokenTypes.h o re-generated after PageDef.g change * GSWeb.framework/GSWPageDefParser.h/.m: o re-generated after PageDef.g change * GSWeb.framework/GSWPageDefParserTokenTypes.txt o re-generated after PageDef.g change * GSWeb.framework/GSWContext.m/.h: o ivar names changes to conform to coding standards * GSWeb.framework/GSWDirectAction.m/.h: o ivar names changes to conform to coding standards * GSWeb.framework/GSWResponse.m/.h: o ivar names changes to conform to coding standards * GSWeb.framework/GSWCookie.m/.h: o ivar names changes to conform to coding standards * GSWeb.framework/GSWNestedList.m/.h: o ivar names changes to conform to coding standards * GSWeb.framework/GSWSessionTimeOut.m/.h: o ivar names changes to conform to coding standards * GSWeb.framework/GSWSessionStore.m/.h: o ivar names changes to conform to coding standards * GSWeb.framework/GSWServerSessionStore.m/.h: o ivar names changes to conform to coding standards * GSWeb.framework/GSWTransactionRecord.m/.h: o ivar names changes to conform to coding standards * GSWeb.framework/GSWSession.m/.h: o ivar names changes to conform to coding standards * GSWeb.framework/GSWRequest.m/.h: o ivar names changes to conform to coding standards * GSWeb.framework/GSWToggle.m/.h: o ivar names changes to conform to coding standards * GSWeb.framework/GSWHTMLComment.m/.h: o ivar names changes to conform to coding standards * GSWeb.framework/GSWHTMLBareString.m/.h: o ivar names changes to conform to coding standards * GSWeb.framework/GSWMailDelivery.m/.h: o ivar names changes to conform to coding standards git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@14202 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a58dc81c3d
commit
77c59f11c8
54 changed files with 4548 additions and 3799 deletions
57
ChangeLog
57
ChangeLog
|
@ -1,3 +1,60 @@
|
|||
2002-07-28 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
* GSWeb.framework/GSWJavaScript.h/.m:
|
||||
o implementation
|
||||
* GSWeb.framework/GSWClientSideScript.h/.m:
|
||||
o implementation
|
||||
* GSWeb.framework/GSWVBScript.h/.m:
|
||||
o implementation
|
||||
* TODO:
|
||||
o updated
|
||||
* GSWeb.framework/GSWConstants.h/.m:
|
||||
o added language__Key
|
||||
* GSWeb.framework/GSWRadioButton.m:
|
||||
o logs
|
||||
o bug fix for checked case
|
||||
* GSWeb.framework/GSWDirectAction.m:
|
||||
o added -existingSessionWithSessionID:
|
||||
* GSWeb.framework/PageDef.g
|
||||
o Handle function references (@ in values)
|
||||
* GSWeb.framework/GSWPageDefLexer.h/.m:
|
||||
o re-generated after PageDef.g change
|
||||
* GSWeb.framework/GSWPageDefParserTokenTypes.h
|
||||
o re-generated after PageDef.g change
|
||||
* GSWeb.framework/GSWPageDefParser.h/.m:
|
||||
o re-generated after PageDef.g change
|
||||
* GSWeb.framework/GSWPageDefParserTokenTypes.txt
|
||||
o re-generated after PageDef.g change
|
||||
* GSWeb.framework/GSWContext.m/.h:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWeb.framework/GSWDirectAction.m/.h:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWeb.framework/GSWResponse.m/.h:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWeb.framework/GSWCookie.m/.h:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWeb.framework/GSWNestedList.m/.h:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWeb.framework/GSWSessionTimeOut.m/.h:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWeb.framework/GSWSessionStore.m/.h:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWeb.framework/GSWServerSessionStore.m/.h:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWeb.framework/GSWTransactionRecord.m/.h:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWeb.framework/GSWSession.m/.h:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWeb.framework/GSWRequest.m/.h:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWeb.framework/GSWToggle.m/.h:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWeb.framework/GSWHTMLComment.m/.h:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWeb.framework/GSWHTMLBareString.m/.h:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWeb.framework/GSWMailDelivery.m/.h:
|
||||
o ivar names changes to conform to coding standards
|
||||
|
||||
2002-07-04 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
* GSWeb.framework/GSWDefaultAdaptorThread.m
|
||||
o trace request uri
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWApplet.m - GSWeb: Class GSWApplet
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWApplet.m - <title>GSWeb: Class GSWApplet</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
static char rcsId[] = "$Id$";
|
||||
|
||||
|
@ -28,9 +34,9 @@ static char rcsId[] = "$Id$";
|
|||
//====================================================================
|
||||
@implementation GSWApplet
|
||||
|
||||
-(id)initWithName:(NSString*)name_
|
||||
associations:(NSDictionary*)associations_
|
||||
contentElements:(NSArray*)elements_
|
||||
-(id)initWithName:(NSString*)aName
|
||||
associations:(NSDictionary*)associations
|
||||
contentElements:(NSArray*)elements
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
|
@ -44,8 +50,8 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
-(BOOL)appendStringAtRight:(id)_unkwnon
|
||||
withMapping:(char*)_mapping
|
||||
-(BOOL)appendStringAtRight:(id)unkwnon
|
||||
withMapping:(char*)mapping
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return NO;
|
||||
|
@ -53,11 +59,11 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
-(id) paramWithName:(id)name_
|
||||
value:(id)value_
|
||||
target:(id)target_
|
||||
key:(id)key_
|
||||
treatNilValueAsGSWNull:(BOOL)treatNilValueAsGSWNull_
|
||||
-(id) paramWithName:(id)name
|
||||
value:(id)value
|
||||
target:(id)target
|
||||
key:(id)key
|
||||
treatNilValueAsGSWNull:(BOOL)treatNilValueAsGSWNull
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
|
@ -79,7 +85,7 @@ static char rcsId[] = "$Id$";
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)setContextID:(id)contextID_
|
||||
-(void)setContextID:(id)contextID
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
@ -93,7 +99,7 @@ static char rcsId[] = "$Id$";
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)setURL:(id)url_
|
||||
-(void)setURL:(id)url
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
@ -106,7 +112,7 @@ static char rcsId[] = "$Id$";
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)setElementID:(NSString*)elementID_
|
||||
-(void)setElementID:(NSString*)elementID
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
@ -116,16 +122,16 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
//====================================================================
|
||||
@implementation GSWApplet (GSWAppletA)
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)aRequest
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
|
@ -133,61 +139,61 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)aRequest
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)appendGSWebObjectsAssociationsToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)appendGSWebObjectsAssociationsToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_computeAgcArchiveStringInContext:(GSWContext*)context_
|
||||
-(void)_computeAgcArchiveStringInContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)_agcArchiveURLsListInContext:(GSWContext*)context_
|
||||
-(id)_agcArchiveURLsListInContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)_archiveURLsListInContext:(GSWContext*)context_
|
||||
-(id)_archiveURLsListInContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)_agcArchiveNamesListInContext:(GSWContext*)context_
|
||||
-(id)_agcArchiveNamesListInContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)_archiveNamesListInContext:(GSWContext*)context_
|
||||
-(id)_archiveNamesListInContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_deallocForComponent:(id)component_
|
||||
-(void)_deallocForComponent:(id)aComponent
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_awakeForComponent:(id)component_
|
||||
-(void)_awakeForComponent:(id)aComponent
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
|
|
@ -4178,8 +4178,12 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
//--------------------------------------------------------------------
|
||||
+(NSBundle*)mainBundle
|
||||
{
|
||||
NSBundle* mainBundle=nil;
|
||||
// LOGClassFnNotImplemented(); //TODOFN
|
||||
return [NSBundle mainBundle];
|
||||
mainBundle=[NSBundle mainBundle];
|
||||
NSDebugMLog(@"[mainBundle bundlePath]:%@",[mainBundle bundlePath]);
|
||||
return mainBundle;
|
||||
|
||||
/*
|
||||
_flags=unsigned int UINT:104005633
|
||||
_infoDictionary=id object:11365312 Description:{
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWClientSideScript.m - GSWeb: Class GSWClientSideScript
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWClientSideScript.m - <title>GSWeb: Class GSWClientSideScript</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: May 1999
|
||||
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
static char rcsId[] = "$Id$";
|
||||
|
||||
|
@ -28,18 +34,53 @@ static char rcsId[] = "$Id$";
|
|||
//====================================================================
|
||||
@implementation GSWClientSideScript
|
||||
|
||||
-(id)initWithName:(NSString*)name_
|
||||
associations:(NSDictionary*)associations_
|
||||
template:(GSWElement*)templateElement_
|
||||
-(id)initWithName:(NSString*)aName
|
||||
associations:(NSDictionary*)associations
|
||||
template:(GSWElement*)templateElement
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
NSMutableDictionary* tmpAssociations=[NSMutableDictionary dictionaryWithDictionary:associations];
|
||||
LOGObjectFnStartC("GSWClientSideScript");
|
||||
NSDebugMLLog(@"gswdync",@"aName=%@ associations:%@ templateElement=%@",aName,associations,templateElement);
|
||||
[tmpAssociations removeObjectForKey:scriptFile__Key];
|
||||
[tmpAssociations removeObjectForKey:scriptString__Key];
|
||||
[tmpAssociations removeObjectForKey:scriptSource__Key];
|
||||
[tmpAssociations removeObjectForKey:hideInComment__Key];
|
||||
[tmpAssociations removeObjectForKey:language__Key];
|
||||
_otherAttributes=[NSDictionary dictionaryWithDictionary:tmpAssociations];
|
||||
RETAIN(_otherAttributes);
|
||||
if ((self=[super initWithName:aName
|
||||
associations:nil
|
||||
template:templateElement]))
|
||||
{
|
||||
_scriptFile = [[associations objectForKey:scriptFile__Key
|
||||
withDefaultObject:[_scriptFile autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWClientSideScript: scriptFile=%@",_scriptFile);
|
||||
_scriptString = [[associations objectForKey:scriptString__Key
|
||||
withDefaultObject:[_scriptString autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWClientSideScript: scriptString=%@",_scriptString);
|
||||
_scriptSource = [[associations objectForKey:scriptSource__Key
|
||||
withDefaultObject:[_scriptSource autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWClientSideScript: scriptSource=%@",_scriptSource);
|
||||
_hideInComment = [[associations objectForKey:hideInComment__Key
|
||||
withDefaultObject:[_hideInComment autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWClientSideScript: hideInComment=%@",_hideInComment);
|
||||
_language = [[associations objectForKey:language__Key
|
||||
withDefaultObject:[_language autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWClientSideScript: language=%@",_language);
|
||||
};
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
DESTROY(_scriptFile);
|
||||
DESTROY(_scriptString);
|
||||
DESTROY(_scriptSource);
|
||||
DESTROY(_hideInComment);
|
||||
DESTROY(_language);
|
||||
DESTROY(_otherAttributes);
|
||||
[super dealloc];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -48,10 +89,119 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
//====================================================================
|
||||
@implementation GSWClientSideScript (GSWClientSideScriptA)
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
GSWComponent* component=nil;
|
||||
BOOL hideInCommentValue=NO;
|
||||
id languageValue=nil;
|
||||
id scriptValue=nil;
|
||||
LOGObjectFnStartC("GSWClientSideScript");
|
||||
GSWStartElement(aContext);
|
||||
GSWSaveAppendToResponseElementID(aContext);
|
||||
component=[aContext component];
|
||||
[super appendToResponse:aResponse
|
||||
inContext:aContext];
|
||||
//hideInCommentValue=[_hideInComment valueInComponent:component];
|
||||
hideInCommentValue=[self evaluateCondition:_hideInComment
|
||||
inContext:aContext];
|
||||
[aResponse _appendContentAsciiString:@"<SCRIPT language="];
|
||||
languageValue=[_language valueInComponent:component];
|
||||
|
||||
[aResponse appendContentHTMLAttributeValue:languageValue];
|
||||
if ([_otherAttributes count]>0)
|
||||
{
|
||||
NSEnumerator* enumerator = [_otherAttributes keyEnumerator];
|
||||
id key;
|
||||
id value;
|
||||
while ((key = [enumerator nextObject]))
|
||||
{
|
||||
value=[_otherAttributes objectForKey:key];
|
||||
[aResponse appendContentCharacter:' '];
|
||||
[aResponse appendContentString:key];
|
||||
if (value)
|
||||
{
|
||||
[aResponse appendContentCharacter:'='];
|
||||
[aResponse appendContentHTMLAttributeValue:value];
|
||||
};
|
||||
};
|
||||
};
|
||||
if (_scriptSource)
|
||||
{
|
||||
scriptValue=[_scriptSource valueInComponent:component];
|
||||
if (scriptValue)
|
||||
{
|
||||
[aResponse appendContentString:@" src=\""];
|
||||
[aResponse appendContentString:scriptValue];
|
||||
[aResponse appendContentCharacter:'"'];
|
||||
};
|
||||
}
|
||||
[aResponse appendContentCharacter:'>'];
|
||||
if (_scriptString || _scriptFile)
|
||||
{
|
||||
[aResponse appendContentCharacter:'\n'];
|
||||
if (hideInCommentValue)
|
||||
[aResponse _appendContentAsciiString:@"<!-- GNUstepWeb ClientScript\n"];
|
||||
|
||||
if (_scriptString)
|
||||
{
|
||||
scriptValue=[_scriptString valueInComponent:component];
|
||||
if (scriptValue)
|
||||
[aResponse appendContentString:scriptValue];
|
||||
else
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
}
|
||||
else if (_scriptFile)
|
||||
{
|
||||
NSString* scriptFileName=[_scriptFile valueInComponent:component];
|
||||
if (scriptFileName)
|
||||
{
|
||||
GSWResourceManager* resourceManager=nil;
|
||||
NSString* path=nil;
|
||||
resourceManager=[GSWApp resourceManager];
|
||||
path=[resourceManager pathForResourceNamed:scriptFileName
|
||||
ofType:nil
|
||||
languages:[aContext languages]];
|
||||
if (path)
|
||||
{
|
||||
NSString* scriptValue=nil;
|
||||
scriptValue=[NSString stringWithContentsOfFile:path];
|
||||
if (scriptValue)
|
||||
{
|
||||
[aResponse appendContentString:scriptValue];
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NSException* exception=nil;
|
||||
exception=[NSException exceptionWithName:NSInvalidArgumentException
|
||||
reason:[NSString stringWithFormat:
|
||||
@"Can't find script file '%@'",
|
||||
scriptFileName]
|
||||
userInfo:nil];
|
||||
LOGException(@"GSWClientSideScript exception=%@",exception);
|
||||
[exception raise];
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
};
|
||||
|
||||
[aResponse appendContentCharacter:'\n'];
|
||||
if (hideInCommentValue)
|
||||
[aResponse _appendContentAsciiString:@"//-->\n"];
|
||||
};
|
||||
[aResponse _appendContentAsciiString:@"</SCRIPT>"];
|
||||
GSWStopElement(aContext);
|
||||
LOGObjectFnStopC("GSWClientSideScript");
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
@ -30,29 +30,29 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithName:(NSString*)name_
|
||||
path:(NSString*)path_
|
||||
baseURL:(NSString*)baseURL_
|
||||
frameworkName:(NSString*)frameworkName_
|
||||
path:(NSString*)path_
|
||||
baseURL:(NSString*)baseURL_
|
||||
frameworkName:(NSString*)frameworkName_
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if ((self=[super init]))
|
||||
{
|
||||
NSDebugMLLog(@"gswcomponents",@"name_=%@ frameworkName_=%@",name_,frameworkName_);
|
||||
ASSIGN(name,name_);
|
||||
bundle=[[GSWBundle alloc] initWithPath:path_
|
||||
baseURL:baseURL_
|
||||
inFrameworkNamed:frameworkName_];
|
||||
observers=nil;
|
||||
ASSIGN(frameworkName,frameworkName_);
|
||||
NSDebugMLLog(@"gswcomponents",@"frameworkName=%@",frameworkName);
|
||||
ASSIGN(templateName,name_);//TODOV
|
||||
NSDebugMLLog(@"gswcomponents",@"templateName=%@",templateName);
|
||||
componentClass=Nil;
|
||||
isScriptedClass=NO;
|
||||
isCachingEnabled=NO;
|
||||
isAwake=NO;
|
||||
[self setCachingEnabled:[GSWApplication isCachingEnabled]];
|
||||
};
|
||||
{
|
||||
NSDebugMLLog(@"gswcomponents",@"name_=%@ frameworkName_=%@",name_,frameworkName_);
|
||||
ASSIGN(name,name_);
|
||||
bundle=[[GSWBundle alloc] initWithPath:path_
|
||||
baseURL:baseURL_
|
||||
inFrameworkNamed:frameworkName_];
|
||||
observers=nil;
|
||||
ASSIGN(frameworkName,frameworkName_);
|
||||
NSDebugMLLog(@"gswcomponents",@"frameworkName=%@",frameworkName);
|
||||
ASSIGN(templateName,name_);//TODOV
|
||||
NSDebugMLLog(@"gswcomponents",@"templateName=%@",templateName);
|
||||
componentClass=Nil;
|
||||
isScriptedClass=NO;
|
||||
isCachingEnabled=NO;
|
||||
isAwake=NO;
|
||||
[self setCachingEnabled:[GSWApplication isCachingEnabled]];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
|
|
@ -285,6 +285,7 @@ extern id selectedValue__Key;
|
|||
extern id noSelectionString__Key;
|
||||
extern id displayString__Key;
|
||||
extern id filePath__Key;
|
||||
extern id language__Key;
|
||||
|
||||
//GSWeb Additions
|
||||
extern id redirectURL__Key;
|
||||
|
|
|
@ -291,6 +291,7 @@ id selectedValue__Key = @"selectedValue";
|
|||
id noSelectionString__Key = @"noSelectionString";
|
||||
id displayString__Key = @"displayString";
|
||||
id filePath__Key = @"filePath";
|
||||
id language__Key= @"language";
|
||||
|
||||
//GSWeb additions
|
||||
id redirectURL__Key = @"redirectURL";
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWContext.h - GSWeb: Class GSWContext
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWContext.h - <title>GSWeb: Class GSWContext</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -31,29 +37,29 @@
|
|||
@interface GSWContext : NSObject <NSCopying>
|
||||
{
|
||||
@private
|
||||
unsigned contextID;
|
||||
NSString* senderID;
|
||||
NSString* requestSessionID;
|
||||
GSWElementIDString* elementID;
|
||||
GSWSession* session;
|
||||
GSWRequest* request;
|
||||
GSWResponse* response;
|
||||
GSWElement* pageElement;
|
||||
GSWComponent* pageComponent;
|
||||
GSWComponent* currentComponent;
|
||||
GSWDynamicURLString* url;
|
||||
NSMutableArray* awakePageComponents;
|
||||
int urlApplicationNumber;
|
||||
int isClientComponentRequest;
|
||||
BOOL distributionEnabled;
|
||||
BOOL pageChanged;
|
||||
BOOL pageReplaced;
|
||||
BOOL generateCompleteURLs;
|
||||
BOOL isInForm;
|
||||
BOOL actionInvoked;
|
||||
BOOL formSubmitted;
|
||||
BOOL isMultipleSubmitForm;
|
||||
BOOL isValidate;
|
||||
unsigned _contextID;
|
||||
NSString* _senderID;
|
||||
NSString* _requestSessionID;
|
||||
GSWElementIDString* _elementID;
|
||||
GSWSession* _session;
|
||||
GSWRequest* _request;
|
||||
GSWResponse* _response;
|
||||
GSWElement* _pageElement;
|
||||
GSWComponent* _pageComponent;
|
||||
GSWComponent* _currentComponent;
|
||||
GSWDynamicURLString* _url;
|
||||
NSMutableArray* _awakePageComponents;
|
||||
int _urlApplicationNumber;
|
||||
int _isClientComponentRequest;
|
||||
BOOL _distributionEnabled;
|
||||
BOOL _pageChanged;
|
||||
BOOL _pageReplaced;
|
||||
BOOL _generateCompleteURLs;
|
||||
BOOL _isInForm;
|
||||
BOOL _actionInvoked;
|
||||
BOOL _formSubmitted;
|
||||
BOOL _isMultipleSubmitForm;
|
||||
BOOL _isValidate;
|
||||
#ifndef NDEBUG
|
||||
int _loopLevel; //ForDebugging purpose: each repetition increment and next decrement it
|
||||
NSMutableString* _docStructure; //ForDebugging purpose: array of all objects if the document during appendResponse, takeValues, invokeAction
|
||||
|
@ -63,11 +69,11 @@
|
|||
|
||||
-(id)init;
|
||||
-(void)dealloc;
|
||||
+(GSWContext*)contextWithRequest:(GSWRequest*)request_;
|
||||
+(GSWContext*)contextWithRequest:(GSWRequest*)aRequest;
|
||||
|
||||
-(id)copyWithZone:(NSZone*)zone_;
|
||||
-(id)copyWithZone:(NSZone*)zone;
|
||||
|
||||
-(void)setInForm:(BOOL)_flag;
|
||||
-(void)setInForm:(BOOL)flag;
|
||||
-(BOOL)isInForm;
|
||||
-(GSWElementIDString*)elementID;
|
||||
-(GSWComponent*)component;
|
||||
|
@ -78,7 +84,7 @@
|
|||
-(BOOL)hasSession;
|
||||
-(NSString*)senderID;
|
||||
-(NSString*)contextID;
|
||||
-(id)initWithRequest:(GSWRequest*)_request;
|
||||
-(id)initWithRequest:(GSWRequest*)aRequest;
|
||||
|
||||
#ifndef NDEBUG
|
||||
-(void)incrementLoopLevel; //ForDebugging purpose: each repetition increment and next decrement it
|
||||
|
@ -92,62 +98,62 @@
|
|||
|
||||
//====================================================================
|
||||
@interface GSWContext (GSWURLGeneration)
|
||||
-(GSWDynamicURLString*)directActionURLForActionNamed:(NSString*)actionName_
|
||||
queryDictionary:(NSDictionary*)queryDictionary_;
|
||||
-(GSWDynamicURLString*)directActionURLForActionNamed:(NSString*)actionName
|
||||
queryDictionary:(NSDictionary*)queryDictionary;
|
||||
-(GSWDynamicURLString*)componentActionURL;
|
||||
-(GSWDynamicURLString*)urlWithRequestHandlerKey:(NSString*)requestHandlerKey_
|
||||
path:(NSString*)requestHandlerPath_
|
||||
queryString:(NSString*)queryString_;
|
||||
-(GSWDynamicURLString*)urlWithRequestHandlerKey:(NSString*)requestHandlerKey
|
||||
path:(NSString*)requestHandlerPath
|
||||
queryString:(NSString*)queryString;
|
||||
//NDFN
|
||||
-(GSWDynamicURLString*)completeURLWithRequestHandlerKey:(NSString*)requestHandlerKey_
|
||||
path:(NSString*)requestHandlerPath_
|
||||
queryString:(NSString*)queryString_;
|
||||
-(GSWDynamicURLString*)completeURLWithRequestHandlerKey:(NSString*)requestHandlerKey_
|
||||
path:(NSString*)requestHandlerPath_
|
||||
queryString:(NSString*)queryString_
|
||||
isSecure:(BOOL)isSecure_
|
||||
port:(int)port_;
|
||||
-(GSWDynamicURLString*)completeURLWithRequestHandlerKey:(NSString*)requestHandlerKey
|
||||
path:(NSString*)requestHandlerPath
|
||||
queryString:(NSString*)queryString;
|
||||
-(GSWDynamicURLString*)completeURLWithRequestHandlerKey:(NSString*)requestHandlerKey
|
||||
path:(NSString*)requestHandlerPath
|
||||
queryString:(NSString*)queryString
|
||||
isSecure:(BOOL)isSecure
|
||||
port:(int)port;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWContext (GSWContextA)
|
||||
-(id)_initWithContextID:(unsigned int)context_ID;
|
||||
-(id)_initWithContextID:(unsigned int)contextID;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWContext (GSWContextB)
|
||||
-(BOOL)_isMultipleSubmitForm;
|
||||
-(void)_setIsMultipleSubmitForm:(BOOL)_flag;
|
||||
-(void)_setIsMultipleSubmitForm:(BOOL)flag;
|
||||
-(BOOL)_wasActionInvoked;
|
||||
-(void)_setActionInvoked:(BOOL)_flag;
|
||||
-(void)_setActionInvoked:(BOOL)flag;
|
||||
-(BOOL)_wasFormSubmitted;
|
||||
-(void)_setFormSubmitted:(BOOL)_flag;
|
||||
-(void)_setFormSubmitted:(BOOL)flag;
|
||||
-(void)_putAwakeComponentsToSleep;
|
||||
-(void)_generateCompleteURLs;
|
||||
-(GSWDynamicURLString*)_directActionURLForActionNamed:(NSString*)_actionName
|
||||
queryDictionary:(NSDictionary*)_dict
|
||||
url:(id)_url;
|
||||
-(GSWDynamicURLString*)_directActionURLForActionNamed:(NSString*)actionName
|
||||
queryDictionary:(NSDictionary*)dict
|
||||
url:(id)url;
|
||||
-(NSArray*)languages;
|
||||
-(GSWComponent*)_pageComponent;
|
||||
-(GSWElement*)_pageElement;
|
||||
-(void)_setPageElement:(GSWElement*)_element;
|
||||
-(void)_setPageComponent:(GSWComponent*)_component;
|
||||
-(void)_setResponse:(GSWResponse*)response_;
|
||||
-(void)_setRequest:(GSWRequest*)_request;
|
||||
-(void)_setSession:(GSWSession*)_session;
|
||||
-(void)_setSenderID:(NSString*)_senderID;
|
||||
-(void)_setPageElement:(GSWElement*)element;
|
||||
-(void)_setPageComponent:(GSWComponent*)component;
|
||||
-(void)_setResponse:(GSWResponse*)aResponse;
|
||||
-(void)_setRequest:(GSWRequest*)aRequest;
|
||||
-(void)_setSession:(GSWSession*)aSession;
|
||||
-(void)_setSenderID:(NSString*)aSenderID;
|
||||
-(void)_synchronizeForDistribution;
|
||||
-(void)_incrementContextID;
|
||||
-(GSWSession*)existingSession;
|
||||
-(void)_setCurrentComponent:(GSWComponent*)_component;
|
||||
-(void)_setPageReplaced:(BOOL)_flag;
|
||||
-(void)_setCurrentComponent:(GSWComponent*)aComponent;
|
||||
-(void)_setPageReplaced:(BOOL)flag;
|
||||
-(BOOL)_pageReplaced;
|
||||
-(void)_setPageChanged:(BOOL)_flag;
|
||||
-(void)_setPageChanged:(BOOL)flag;
|
||||
-(BOOL)_pageChanged;
|
||||
-(void)_setRequestSessionID:(NSString*)_sessionID;
|
||||
-(void)_setRequestSessionID:(NSString*)sessionID;
|
||||
-(NSString*)_requestSessionID;
|
||||
-(void)_takeAwakeComponentsFromArray:(id)_unknwon;
|
||||
-(void)_takeAwakeComponent:(GSWComponent*)_component;
|
||||
-(void)_takeAwakeComponentsFromArray:(id)unknwon;
|
||||
-(void)_takeAwakeComponent:(GSWComponent*)aComponent;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -156,7 +162,7 @@
|
|||
-(void)deleteAllElementIDComponents;
|
||||
-(void)deleteLastElementIDComponent;
|
||||
-(void)incrementLastElementIDComponent;
|
||||
-(void)appendElementIDComponent:(NSString*)string_;
|
||||
-(void)appendElementIDComponent:(NSString*)string;
|
||||
-(void)appendZeroElementIDComponent;
|
||||
@end
|
||||
|
||||
|
@ -165,14 +171,14 @@
|
|||
-(NSString*)url;
|
||||
-(NSString*)urlSessionPrefix;
|
||||
-(GSWApplication*)application;
|
||||
-(void)setDistributionEnabled:(BOOL)flag_;
|
||||
-(void)setDistributionEnabled:(BOOL)flag;
|
||||
-(BOOL)isDistributionEnabled;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWContext (GSWContextGSWeb)
|
||||
-(BOOL)isValidate;
|
||||
-(void)setValidate:(BOOL)isValidate_;
|
||||
-(void)setValidate:(BOOL)isValidate;
|
||||
@end
|
||||
|
||||
#endif //_GSWContext_h__
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,11 +1,16 @@
|
|||
/* GSWCookie.h - GSWeb: Class GSWCookie
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWCookie.h - <title>GSWeb: Class GSWResponse</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Feb 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Feb 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -31,41 +37,41 @@
|
|||
@interface GSWCookie : NSObject
|
||||
{
|
||||
@private
|
||||
NSString* name;
|
||||
NSString* value;
|
||||
NSString* domain;
|
||||
NSString* path;
|
||||
NSDate* expires;
|
||||
BOOL isSecure;
|
||||
NSString* _name;
|
||||
NSString* _value;
|
||||
NSString* _domain;
|
||||
NSString* _path;
|
||||
NSDate* _expires;
|
||||
BOOL _isSecure;
|
||||
};
|
||||
|
||||
+(GSWCookie*)cookieWithName:(NSString*)name_
|
||||
value:(NSString*)value_;
|
||||
+(GSWCookie*)cookieWithName:(NSString*)name_
|
||||
value:(NSString*)value_
|
||||
path:(NSString*)path_
|
||||
domain:(NSString*)domain_
|
||||
expires:(NSDate*)expireDate_
|
||||
isSecure:(BOOL)isSecure_;
|
||||
-(id)initWithName:(NSString*)name_
|
||||
value:(NSString*)value_
|
||||
path:(NSString*)path_
|
||||
domain:(NSString*)domain_
|
||||
expires:(NSDate*)expireDate_
|
||||
isSecure:(BOOL)isSecure_;
|
||||
+(GSWCookie*)cookieWithName:(NSString*)aName
|
||||
value:(NSString*)aValue;
|
||||
+(GSWCookie*)cookieWithName:(NSString*)aName
|
||||
value:(NSString*)aValue
|
||||
path:(NSString*)aPath
|
||||
domain:(NSString*)aDomain
|
||||
expires:(NSDate*)anExpireDate
|
||||
isSecure:(BOOL)isSecureFlag;
|
||||
-(id)initWithName:(NSString*)aName
|
||||
value:(NSString*)aValue
|
||||
path:(NSString*)aPath
|
||||
domain:(NSString*)aDomain
|
||||
expires:(NSDate*)anExpireDate
|
||||
isSecure:(BOOL)isSecureFlag;
|
||||
-(NSString*)description;
|
||||
-(NSString*)name;
|
||||
-(void)setName:(NSString*)name_;
|
||||
-(void)setName:(NSString*)aName;
|
||||
-(NSString*)value;
|
||||
-(void)setValue:(NSString*)value_;
|
||||
-(void)setValue:(NSString*)aValue;
|
||||
-(NSString*)domain;
|
||||
-(void)setDomain:(NSString*)domain_;
|
||||
-(void)setDomain:(NSString*)aDomain;
|
||||
-(NSString*)path;
|
||||
-(void)setPath:(NSString*)path_;
|
||||
-(void)setPath:(NSString*)aPath;
|
||||
-(NSDate*)expires;
|
||||
-(void)setExpires:(NSDate*)expireDate_;
|
||||
-(void)setExpires:(NSDate*)anExpireDate;
|
||||
-(BOOL)isSecure;
|
||||
-(void)setIsSecure:(BOOL)isSecure_;
|
||||
-(void)setIsSecure:(BOOL)isSecureFlag;
|
||||
-(NSString*)headerString;
|
||||
-(NSString*)headerKey;
|
||||
-(NSString*)headerValue;
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWCookie.m - GSWeb: Class GSWCookie
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWCookie.m - <title>GSWeb: Class GSWResponse</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Feb 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Feb 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
static char rcsId[] = "$Id$";
|
||||
|
||||
|
@ -30,33 +36,33 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// cookieWithName:value:
|
||||
+(GSWCookie*)cookieWithName:(NSString*)name_
|
||||
value:(NSString*)value_
|
||||
+(GSWCookie*)cookieWithName:(NSString*)aName
|
||||
value:(NSString*)aValue
|
||||
{
|
||||
return [GSWCookie cookieWithName:name_
|
||||
value:value_
|
||||
path:nil
|
||||
domain:nil
|
||||
expires:nil
|
||||
isSecure:NO];
|
||||
return [GSWCookie cookieWithName:aName
|
||||
value:aValue
|
||||
path:nil
|
||||
domain:nil
|
||||
expires:nil
|
||||
isSecure:NO];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// cookieWithName:value:path:domain:expires:isSecure:
|
||||
+(GSWCookie*)cookieWithName:(NSString*)name_
|
||||
value:(NSString*)value_
|
||||
path:(NSString*)path_
|
||||
domain:(NSString*)domain_
|
||||
expires:(NSDate*)expireDate_
|
||||
isSecure:(BOOL)isSecure_
|
||||
+(GSWCookie*)cookieWithName:(NSString*)aName
|
||||
value:(NSString*)aValue
|
||||
path:(NSString*)aPath
|
||||
domain:(NSString*)aDomain
|
||||
expires:(NSDate*)anExpireDate
|
||||
isSecure:(BOOL)isSecureFlag
|
||||
{
|
||||
return [[[GSWCookie alloc] initWithName:name_
|
||||
value:value_
|
||||
path:path_
|
||||
domain:domain_
|
||||
expires:expireDate_
|
||||
isSecure:isSecure_]
|
||||
autorelease];
|
||||
return [[[GSWCookie alloc] initWithName:aName
|
||||
value:aValue
|
||||
path:aPath
|
||||
domain:aDomain
|
||||
expires:anExpireDate
|
||||
isSecure:isSecureFlag]
|
||||
autorelease];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -64,36 +70,36 @@ static char rcsId[] = "$Id$";
|
|||
-(id)init
|
||||
{
|
||||
if ((self=[super init]))
|
||||
{
|
||||
};
|
||||
{
|
||||
};
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// initWithName:value:path:domain:expires:isSecure:
|
||||
-(id)initWithName:(NSString*)name_
|
||||
value:(NSString*)value_
|
||||
path:(NSString*)path_
|
||||
domain:(NSString*)domain_
|
||||
expires:(NSDate*)expireDate_
|
||||
isSecure:(BOOL)isSecure_
|
||||
-(id)initWithName:(NSString*)aName
|
||||
value:(NSString*)aValue
|
||||
path:(NSString*)aPath
|
||||
domain:(NSString*)aDomain
|
||||
expires:(NSDate*)anExpireDate
|
||||
isSecure:(BOOL)isSecureFlag
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if ((self=[self init]))
|
||||
{
|
||||
NSDebugMLLog(@"low",@"name_:%@",name_);
|
||||
NSDebugMLLog(@"low",@"value_:%@",value_);
|
||||
NSDebugMLLog(@"low",@"path_:%@",path_);
|
||||
NSDebugMLLog(@"low",@"domain_:%@",domain_);
|
||||
NSDebugMLLog(@"low",@"expireDate_:%@",expireDate_);
|
||||
NSDebugMLLog(@"low",@"isSecure:%d",isSecure);
|
||||
[self setName:name_];
|
||||
[self setValue:value_];
|
||||
[self setPath:path_];
|
||||
[self setDomain:domain_];
|
||||
[self setExpires:expireDate_];
|
||||
[self setIsSecure:isSecure_];
|
||||
};
|
||||
{
|
||||
NSDebugMLLog(@"low",@"aName:%@",aName);
|
||||
NSDebugMLLog(@"low",@"aValue:%@",aValue);
|
||||
NSDebugMLLog(@"low",@"aPath:%@",aPath);
|
||||
NSDebugMLLog(@"low",@"aDomain:%@",aDomain);
|
||||
NSDebugMLLog(@"low",@"anExpireDate:%@",anExpireDate);
|
||||
NSDebugMLLog(@"low",@"isSecure:%d",isSecureFlag);
|
||||
[self setName:aName];
|
||||
[self setValue:aValue];
|
||||
[self setPath:aPath];
|
||||
[self setDomain:aDomain];
|
||||
[self setExpires:anExpireDate];
|
||||
[self setIsSecure:isSecureFlag];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
@ -101,11 +107,11 @@ static char rcsId[] = "$Id$";
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
DESTROY(name);
|
||||
DESTROY(value);
|
||||
DESTROY(domain);
|
||||
DESTROY(path);
|
||||
DESTROY(expires);
|
||||
DESTROY(_name);
|
||||
DESTROY(_value);
|
||||
DESTROY(_domain);
|
||||
DESTROY(_path);
|
||||
DESTROY(_expires);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -113,34 +119,34 @@ static char rcsId[] = "$Id$";
|
|||
-(NSString*)description
|
||||
{
|
||||
return [NSString stringWithFormat:@"name=%@; value=%@; expires=%@; path=%@; domain=%@; %@",
|
||||
name,
|
||||
value,
|
||||
[expires htmlDescription],
|
||||
path,
|
||||
domain,
|
||||
(isSecure ? @"secure;" : @"")];
|
||||
_name,
|
||||
_value,
|
||||
[_expires htmlDescription],
|
||||
_path,
|
||||
_domain,
|
||||
(_isSecure ? @"secure;" : @"")];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)name { return name; };
|
||||
-(void)setName:(NSString*)name_ { ASSIGNCOPY(name,name_); };
|
||||
-(NSString*)value { return value; };
|
||||
-(void)setValue:(NSString*)value_ { ASSIGNCOPY(value,value_); };
|
||||
-(NSString*)domain { return domain; };
|
||||
-(void)setDomain:(NSString*)domain_ { ASSIGNCOPY(domain,domain_); };
|
||||
-(NSString*)path { return path; };
|
||||
-(void)setPath:(NSString*)path_ { ASSIGNCOPY(path,path_); };
|
||||
-(NSDate*)expires { return expires; };
|
||||
-(void)setExpires:(NSDate*)expireDate_ { ASSIGNCOPY(expires,expireDate_); };
|
||||
-(BOOL)isSecure { return isSecure; };
|
||||
-(void)setIsSecure:(BOOL)isSecure_ { isSecure=isSecure_; };
|
||||
-(NSString*)name { return _name; };
|
||||
-(void)setName:(NSString*)aName { ASSIGNCOPY(_name,aName); };
|
||||
-(NSString*)value { return _value; };
|
||||
-(void)setValue:(NSString*)aValue { ASSIGNCOPY(_value,aValue); };
|
||||
-(NSString*)domain { return _domain; };
|
||||
-(void)setDomain:(NSString*)aDomain { ASSIGNCOPY(_domain,aDomain); };
|
||||
-(NSString*)path { return _path; };
|
||||
-(void)setPath:(NSString*)aPath { ASSIGNCOPY(_path,aPath); };
|
||||
-(NSDate*)expires { return _expires; };
|
||||
-(void)setExpires:(NSDate*)anExpireDate { ASSIGNCOPY(_expires,anExpireDate); };
|
||||
-(BOOL)isSecure { return _isSecure; };
|
||||
-(void)setIsSecure:(BOOL)isSecureFlag { _isSecure=isSecureFlag; };
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)headerString
|
||||
{
|
||||
return [NSString stringWithFormat:@"%@: %@",
|
||||
[self headerKey],
|
||||
[self headerValue]];
|
||||
[self headerKey],
|
||||
[self headerValue]];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -152,42 +158,42 @@ static char rcsId[] = "$Id$";
|
|||
//--------------------------------------------------------------------
|
||||
-(NSString*)headerValue
|
||||
{
|
||||
NSString* _header=nil;
|
||||
NSString* _domainString=nil;
|
||||
NSString* _pathString=nil;
|
||||
NSDate* _expires=nil;
|
||||
NSString* header=nil;
|
||||
NSString* domainString=nil;
|
||||
NSString* pathString=nil;
|
||||
NSDate* expires=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"low",@"name:%@",name);
|
||||
NSDebugMLLog(@"low",@"value:%@",value);
|
||||
NSDebugMLLog(@"low",@"path:%@",path);
|
||||
NSDebugMLLog(@"low",@"domain:%@",domain);
|
||||
NSDebugMLLog(@"low",@"name:%@",_name);
|
||||
NSDebugMLLog(@"low",@"value:%@",_value);
|
||||
NSDebugMLLog(@"low",@"path:%@",_path);
|
||||
NSDebugMLLog(@"low",@"domain:%@",_domain);
|
||||
NSDebugMLLog(@"low",@"expires:%@",_expires);
|
||||
NSDebugMLLog(@"low",@"isSecure:%d",_isSecure);
|
||||
if (_domain)
|
||||
domainString=[NSString stringWithFormat:@" domain=%@;",_domain];
|
||||
else
|
||||
domainString=@"";
|
||||
if (_path)
|
||||
pathString=[NSString stringWithFormat:@" path=%@;",_path];
|
||||
else
|
||||
pathString=@"/";
|
||||
if (_expires)
|
||||
expires=_expires;
|
||||
else
|
||||
expires=[NSDate dateWithTimeIntervalSinceNow:24L*60L*60L*365L];//1 Year
|
||||
NSDebugMLLog(@"low",@"pathString:%@",pathString);
|
||||
NSDebugMLLog(@"low",@"domainString:%@",domainString);
|
||||
NSDebugMLLog(@"low",@"expires:%@",expires);
|
||||
NSDebugMLLog(@"low",@"isSecure:%d",isSecure);
|
||||
if (domain)
|
||||
_domainString=[NSString stringWithFormat:@" domain=%@;",domain];
|
||||
else
|
||||
_domainString=@"";
|
||||
if (path)
|
||||
_pathString=[NSString stringWithFormat:@" path=%@;",path];
|
||||
else
|
||||
_pathString=@"/";
|
||||
if (expires)
|
||||
_expires=expires;
|
||||
else
|
||||
_expires=[NSDate dateWithTimeIntervalSinceNow:24L*60L*60L*365L];//1 Year
|
||||
NSDebugMLLog(@"low",@"_pathString:%@",_pathString);
|
||||
NSDebugMLLog(@"low",@"_domainString:%@",_domainString);
|
||||
NSDebugMLLog(@"low",@"_expires:%@",_expires);
|
||||
_header=[NSString stringWithFormat:@"%@=%@; expires=%@;%@%@%@",
|
||||
name,
|
||||
(value ? value : @""),
|
||||
[_expires htmlDescription],
|
||||
_pathString,
|
||||
_domainString,
|
||||
(isSecure ? @" secure;" : @"")];
|
||||
NSDebugMLLog(@"low",@"_header=%@",_header);
|
||||
header=[NSString stringWithFormat:@"%@=%@; expires=%@;%@%@%@",
|
||||
_name,
|
||||
(_value ? _value : @""),
|
||||
[expires htmlDescription],
|
||||
pathString,
|
||||
domainString,
|
||||
(_isSecure ? @" secure;" : @"")];
|
||||
NSDebugMLLog(@"low",@"header=%@",header);
|
||||
LOGObjectFnStop();
|
||||
return _header;
|
||||
return header;
|
||||
};
|
||||
|
||||
@end
|
||||
|
|
|
@ -504,7 +504,9 @@ static char rcsId[] = "$Id$";
|
|||
//--------------------------------------------------------------------
|
||||
+(id)bundleWithPath:(NSString*)path_
|
||||
{
|
||||
id _bundle=[[[GSWDeployedBundle alloc]initWithPath:path_]autorelease];
|
||||
id _bundle=nil;
|
||||
NSDebugMLLog(@"bundles",@"path_=%@",path_);
|
||||
_bundle=[[[GSWDeployedBundle alloc]initWithPath:path_]autorelease];
|
||||
return _bundle;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWDirectAction.h - GSWeb: Class GSWDirectAction
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWDirectAction.h - <title>GSWeb: Class GSWDirectAction</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Feb 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -31,19 +37,20 @@
|
|||
@interface GSWDirectAction : NSObject
|
||||
{
|
||||
@private
|
||||
GSWContext* context;
|
||||
GSWContext* _context;
|
||||
};
|
||||
-(void)dealloc;
|
||||
-(id)initWithRequest:(GSWRequest*)request_;
|
||||
-(id)initWithRequest:(GSWRequest*)aRequest;
|
||||
-(GSWRequest*)request;
|
||||
-(GSWSession*)existingSession;
|
||||
-(GSWSession*)existingSessionWithSessionID:(NSString*)aSessionID;
|
||||
-(GSWSession*)session;
|
||||
-(GSWApplication*)application;//NDFN
|
||||
-(GSWComponent*)pageWithName:(NSString*)pageName_;
|
||||
-(id <GSWActionResults>)performActionNamed:(NSString*)actionName_;
|
||||
-(GSWComponent*)pageWithName:(NSString*)pageName;
|
||||
-(id <GSWActionResults>)performActionNamed:(NSString*)actionName;
|
||||
-(id)defaultAction;
|
||||
-(id)existingSession;
|
||||
-(void)_initializeRequestSessionIDInContext:(GSWContext*)context_;
|
||||
-(void)_initializeRequestSessionIDInContext:(GSWContext*)aContext;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
|
@ -53,19 +60,19 @@
|
|||
@end
|
||||
//====================================================================
|
||||
@interface GSWDirectAction (GSWTakeValuesConvenience)
|
||||
-(void)takeFormValueArraysForKeyArray:(NSArray*)keys_;
|
||||
-(void)takeFormValuesForKeyArray:(NSArray*)keys_;
|
||||
-(void)takeFormValueArraysForKeys:(NSString*)firstKey_, ...;
|
||||
-(void)takeFormValuesForKeys:(NSString*)firstKey_, ...;
|
||||
-(void)takeFormValueArraysForKeyArray:(NSArray*)keys;
|
||||
-(void)takeFormValuesForKeyArray:(NSArray*)keys;
|
||||
-(void)takeFormValueArraysForKeys:(NSString*)firstKey,...;
|
||||
-(void)takeFormValuesForKeys:(NSString*)firstKey,...;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWDirectAction (GSWDebugging)
|
||||
-(void)logWithString:(NSString*)string_;
|
||||
-(void)logWithFormat:(NSString*)format_,...;
|
||||
+(void)logWithFormat:(NSString*)format_,...;
|
||||
-(void)_debugWithString:(NSString*)string_;
|
||||
-(void)debugWithFormat:(NSString*)format_,...;
|
||||
-(void)logWithString:(NSString*)string;
|
||||
-(void)logWithFormat:(NSString*)format,...;
|
||||
+(void)logWithFormat:(NSString*)format,...;
|
||||
-(void)_debugWithString:(NSString*)string;
|
||||
-(void)debugWithFormat:(NSString*)format,...;
|
||||
@end
|
||||
|
||||
#endif //_GSWDirectAction_h__
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWDirectAction.m - GSWeb: Class GSWDirectAction
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWDirectAction.m - <title>GSWeb: Class GSWDirectAction</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Feb 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
static char rcsId[] = "$Id$";
|
||||
|
||||
|
@ -29,15 +35,15 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWDirectAction
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithRequest:(GSWRequest*)request_
|
||||
-(id)initWithRequest:(GSWRequest*)aRequest
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if ((self=[super init]))
|
||||
{
|
||||
context=[GSWContext contextWithRequest:request_];
|
||||
[GSWApp _setContext:context]; //NDFN
|
||||
[self _initializeRequestSessionIDInContext:context];
|
||||
};
|
||||
{
|
||||
_context=[GSWContext contextWithRequest:aRequest];
|
||||
[GSWApp _setContext:_context]; //NDFN
|
||||
[self _initializeRequestSessionIDInContext:_context];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
@ -45,95 +51,130 @@ static char rcsId[] = "$Id$";
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
DESTROY(context);
|
||||
DESTROY(_context);
|
||||
[super dealloc];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWRequest*)request
|
||||
{
|
||||
return [context request];
|
||||
return [_context request];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWSession*)existingSession
|
||||
{
|
||||
//OK
|
||||
GSWSession* _session=nil;
|
||||
BOOL _hasSession=NO;
|
||||
GSWSession* session=nil;
|
||||
BOOL hasSession=NO;
|
||||
LOGObjectFnStart();
|
||||
_hasSession=[context hasSession];
|
||||
if (_hasSession)
|
||||
_session=[context existingSession];
|
||||
if (!_session)
|
||||
{
|
||||
NSString* _sessionID=nil;
|
||||
_sessionID=[[self request] sessionID];
|
||||
if (_sessionID)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
NSDebugMLLog(@"requests",@"_sessionID=%@",_sessionID);
|
||||
_session=[GSWApp restoreSessionWithID:_sessionID
|
||||
inContext:context];
|
||||
//No Exception if session can't be restored !
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"in session create/restore");
|
||||
LOGException(@"exception=%@",localException);
|
||||
//No Exception if session can't be restored !
|
||||
_session=nil;
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
};
|
||||
hasSession=[_context hasSession];
|
||||
if (hasSession)
|
||||
session=[_context existingSession];
|
||||
if (!session)
|
||||
{
|
||||
NSString* sessionID=nil;
|
||||
sessionID=[[self request] sessionID];
|
||||
if (sessionID)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
NSDebugMLLog(@"requests",@"sessionID=%@",sessionID);
|
||||
session=[GSWApp restoreSessionWithID:sessionID
|
||||
inContext:_context];
|
||||
//No Exception if session can't be restored !
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"in session create/restore");
|
||||
LOGException(@"exception=%@",localException);
|
||||
//No Exception if session can't be restored !
|
||||
session=nil;
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return _session;
|
||||
return session;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWSession*)existingSessionWithSessionID:(NSString*)aSessionID
|
||||
{
|
||||
//OK
|
||||
GSWSession* session=nil;
|
||||
BOOL hasSession=NO;
|
||||
LOGObjectFnStart();
|
||||
hasSession=[_context hasSession];
|
||||
if (hasSession)
|
||||
session=[_context existingSession];
|
||||
if (!session)
|
||||
{
|
||||
if (aSessionID)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
NSDebugMLLog(@"requests",@"aSessionID=%@",aSessionID);
|
||||
session=[GSWApp restoreSessionWithID:aSessionID
|
||||
inContext:_context];
|
||||
//No Exception if session can't be restored !
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"in session create/restore");
|
||||
LOGException(@"exception=%@",localException);
|
||||
//No Exception if session can't be restored !
|
||||
session=nil;
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return session;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWSession*)session
|
||||
{
|
||||
BOOL _hasSession=NO;
|
||||
GSWSession* _session=nil;
|
||||
BOOL hasSession=NO;
|
||||
GSWSession* session=nil;
|
||||
LOGObjectFnStart();
|
||||
_hasSession=[context hasSession];
|
||||
if (_hasSession)
|
||||
_session=[context existingSession];
|
||||
if (!_session)
|
||||
{
|
||||
NSString* _sessionID=nil;
|
||||
_sessionID=[[self request] sessionID];
|
||||
if (_sessionID)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
_session=[GSWApp restoreSessionWithID:_sessionID
|
||||
inContext:context];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"in session create/restore");
|
||||
LOGException(@"exception=%@",localException);
|
||||
[localException raise];
|
||||
};
|
||||
NS_ENDHANDLER;
|
||||
if (!_session)
|
||||
{
|
||||
ExceptionRaise(@"GSWDirectAction",
|
||||
@"Unable to restore sessionID %@.",
|
||||
_sessionID);
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
// No Session ID: Create a new Session
|
||||
_session=[context session];
|
||||
};
|
||||
};
|
||||
hasSession=[_context hasSession];
|
||||
if (hasSession)
|
||||
session=[_context existingSession];
|
||||
if (!session)
|
||||
{
|
||||
NSString* sessionID=nil;
|
||||
sessionID=[[self request] sessionID];
|
||||
if (sessionID)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
session=[GSWApp restoreSessionWithID:sessionID
|
||||
inContext:_context];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"in session create/restore");
|
||||
LOGException(@"exception=%@",localException);
|
||||
[localException raise];
|
||||
};
|
||||
NS_ENDHANDLER;
|
||||
if (!session)
|
||||
{
|
||||
ExceptionRaise(@"GSWDirectAction",
|
||||
@"Unable to restore sessionID %@.",
|
||||
sessionID);
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
// No Session ID: Create a new Session
|
||||
session=[_context session];
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return _session;
|
||||
return session;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -145,68 +186,68 @@ static char rcsId[] = "$Id$";
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWComponent*)pageWithName:(NSString*)pageName_
|
||||
-(GSWComponent*)pageWithName:(NSString*)pageName
|
||||
{
|
||||
//OK
|
||||
GSWComponent* _component=nil;
|
||||
GSWComponent* component=nil;
|
||||
LOGObjectFnStart();
|
||||
NS_DURING
|
||||
{
|
||||
_component=[[GSWApplication application]pageWithName:pageName_
|
||||
inContext:context];
|
||||
}
|
||||
{
|
||||
component=[[GSWApplication application]pageWithName:pageName
|
||||
inContext:_context];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"%@ (%@)",
|
||||
localException,
|
||||
[localException reason]);
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"In pageWithName:inContext:");
|
||||
[localException raise];
|
||||
};
|
||||
{
|
||||
LOGException(@"%@ (%@)",
|
||||
localException,
|
||||
[localException reason]);
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"In pageWithName:inContext:");
|
||||
[localException raise];
|
||||
};
|
||||
NS_ENDHANDLER;
|
||||
LOGObjectFnStop();
|
||||
return _component;
|
||||
return component;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id <GSWActionResults>)performActionNamed:(NSString*)actionName_
|
||||
-(id <GSWActionResults>)performActionNamed:(NSString*)actionName
|
||||
{
|
||||
//OK
|
||||
id<GSWActionResults> _actionResult=nil;
|
||||
NSString* _actionSelName=nil;
|
||||
SEL _actionSel=NULL;
|
||||
id<GSWActionResults> actionResult=nil;
|
||||
NSString* actionSelName=nil;
|
||||
SEL actionSel=NULL;
|
||||
LOGObjectFnStart();
|
||||
_actionSelName=[NSString stringWithFormat:@"%@Action",actionName_];
|
||||
NSDebugMLLog(@"requests",@"_actionSelName=%@",_actionSelName);
|
||||
_actionSel=NSSelectorFromString(_actionSelName);
|
||||
NSDebugMLLog(@"requests",@"_actionSel=%p",(void*)_actionSel);
|
||||
if (_actionSel)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
_actionResult=[self performSelector:_actionSel];
|
||||
NSDebugMLLog(@"requests",
|
||||
@"_actionResult=%@ class=%@",
|
||||
_actionResult,
|
||||
[_actionResult class]);
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"%@ (%@)",
|
||||
localException,
|
||||
[localException reason]);
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"In performSelector:");
|
||||
[localException raise];
|
||||
};
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
actionSelName=[NSString stringWithFormat:@"%@Action",actionName];
|
||||
NSDebugMLLog(@"requests",@"actionSelName=%@",actionSelName);
|
||||
actionSel=NSSelectorFromString(actionSelName);
|
||||
NSDebugMLLog(@"requests",@"actionSel=%p",(void*)actionSel);
|
||||
if (actionSel)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
actionResult=[self performSelector:actionSel];
|
||||
NSDebugMLLog(@"requests",
|
||||
@"_actionResult=%@ class=%@",
|
||||
actionResult,
|
||||
[actionResult class]);
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"%@ (%@)",
|
||||
localException,
|
||||
[localException reason]);
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"In performSelector:");
|
||||
[localException raise];
|
||||
};
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGError(@"No selector for: %@",_actionSelName);//TODO
|
||||
_actionResult=[self defaultAction];//No ??
|
||||
};
|
||||
{
|
||||
LOGError(@"No selector for: %@",actionSelName);//TODO
|
||||
actionResult=[self defaultAction];//No ??
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return _actionResult;
|
||||
return actionResult;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -218,22 +259,22 @@ static char rcsId[] = "$Id$";
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_initializeRequestSessionIDInContext:(GSWContext*)_context
|
||||
-(void)_initializeRequestSessionIDInContext:(GSWContext*)aContext
|
||||
{
|
||||
//OK
|
||||
GSWRequest* _request=nil;
|
||||
NSString* _gswsid=nil;
|
||||
GSWRequest* request=nil;
|
||||
NSString* gswsid=nil;
|
||||
LOGObjectFnStart();
|
||||
_request=[_context request];
|
||||
_gswsid=[_request formValueForKey:GSWKey_SessionID[GSWebNamingConv]];
|
||||
if (!_gswsid)
|
||||
{
|
||||
_gswsid=[_request cookieValueForKey:GSWKey_SessionID[GSWebNamingConv]];
|
||||
};
|
||||
if (_gswsid)
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
request=[aContext request];
|
||||
gswsid=[request formValueForKey:GSWKey_SessionID[GSWebNamingConv]];
|
||||
if (!gswsid)
|
||||
{
|
||||
gswsid=[request cookieValueForKey:GSWKey_SessionID[GSWebNamingConv]];
|
||||
};
|
||||
if (gswsid)
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
|
@ -244,7 +285,7 @@ static char rcsId[] = "$Id$";
|
|||
-(GSWContext*)_context
|
||||
{
|
||||
//OK
|
||||
return context;
|
||||
return _context;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -259,25 +300,25 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWDirectAction (GSWTakeValuesConvenience)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)takeFormValueArraysForKeyArray:(NSArray*)keyArray_
|
||||
-(void)takeFormValueArraysForKeyArray:(NSArray*)keyArray
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)takeFormValuesForKeyArray:(NSArray*)keyArray_
|
||||
-(void)takeFormValuesForKeyArray:(NSArray*)keyArray
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)takeFormValueArraysForKeys:(NSString*)firstKey_, ...
|
||||
-(void)takeFormValueArraysForKeys:(NSString*)firstKey,...
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)takeFormValuesForKeys:(NSString*)firstKey_, ...
|
||||
-(void)takeFormValuesForKeys:(NSString*)firstKey,...
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
@ -288,31 +329,31 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWDirectAction (GSWDebugging)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)logWithString:(NSString*)_string
|
||||
-(void)logWithString:(NSString*)string
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)logWithFormat:(NSString*)format_,...
|
||||
-(void)logWithFormat:(NSString*)format,...
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(void)logWithFormat:(NSString*)format_,...
|
||||
+(void)logWithFormat:(NSString*)format,...
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_debugWithString:(NSString*)_string
|
||||
-(void)_debugWithString:(NSString*)string
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)debugWithFormat:(NSString*)format_,...
|
||||
-(void)debugWithFormat:(NSString*)format,...
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWHTMLBareString.h - GSWeb: Class GSWHTMLBareString
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWHTMLBareString.h - <title>GSWeb: Class GSWHTMLBareString</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Jan 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -29,25 +35,25 @@
|
|||
//====================================================================
|
||||
@interface GSWHTMLBareString: GSWElement
|
||||
{
|
||||
NSString* string;
|
||||
NSData* data;
|
||||
NSStringEncoding encoding;
|
||||
NSString* _string;
|
||||
NSData* _data;
|
||||
NSStringEncoding _encoding;
|
||||
};
|
||||
|
||||
-(id)initWithString:(NSString*)_string;
|
||||
-(id)initWithString:(NSString*)aString;
|
||||
-(void)dealloc;
|
||||
-(NSString*)description;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWHTMLBareString (GSWHTMLBareStringA)
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWHTMLBareString (GSWHTMLBareStringB)
|
||||
+(id)elementWithString:(NSString*)_string;
|
||||
+(id)elementWithString:(NSString*)aString;
|
||||
@end
|
||||
|
||||
#endif //_GSWHTMLBareString_h__
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWHTMLBareString.m - GSWeb: Class GSWHTMLBareString
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWHTMLBareString.m - <title>GSWeb: Class GSWHTMLBareString</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Jan 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
static char rcsId[] = "$Id$";
|
||||
|
||||
|
@ -32,27 +38,27 @@ static char rcsId[] = "$Id$";
|
|||
-(id)init
|
||||
{
|
||||
if ((self=[super init]))
|
||||
{
|
||||
encoding=NSISOLatin1StringEncoding;
|
||||
};
|
||||
{
|
||||
_encoding=NSISOLatin1StringEncoding;
|
||||
};
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithString:(NSString*)_string
|
||||
-(id)initWithString:(NSString*)aString
|
||||
{
|
||||
if ((self=[self init]))
|
||||
{
|
||||
ASSIGN(string,_string);
|
||||
};
|
||||
{
|
||||
ASSIGN(_string,aString);
|
||||
};
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
DESTROY(string);
|
||||
DESTROY(data);
|
||||
DESTROY(_string);
|
||||
DESTROY(_data);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -60,9 +66,9 @@ static char rcsId[] = "$Id$";
|
|||
-(NSString*)description
|
||||
{
|
||||
return [NSString stringWithFormat:@"<%s %p - String:[%s]>",
|
||||
object_get_class_name(self),
|
||||
(void*)self,
|
||||
[string lossyCString]];
|
||||
object_get_class_name(self),
|
||||
(void*)self,
|
||||
[_string lossyCString]];
|
||||
};
|
||||
|
||||
@end
|
||||
|
@ -71,14 +77,14 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWHTMLBareString (GSWHTMLBareStringA)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
GSWSaveAppendToResponseElementID(context_);//Debug Only
|
||||
[response_ appendContentString:string];
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[aContext elementID]);
|
||||
GSWSaveAppendToResponseElementID(aContext);//Debug Only
|
||||
[aResponse appendContentString:_string];
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[aContext elementID]);
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
|
@ -88,8 +94,8 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWHTMLBareString (GSWHTMLBareStringB)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(id)elementWithString:(NSString*)_string
|
||||
+(id)elementWithString:(NSString*)aString
|
||||
{
|
||||
return [[[GSWHTMLBareString alloc]initWithString:_string] autorelease];
|
||||
return [[[GSWHTMLBareString alloc]initWithString:aString] autorelease];
|
||||
};
|
||||
@end
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWHTMLComment.h - GSWeb: Class GSWHTMLComment
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWHTMLComment.h - <title>GSWeb: Class GSWRequest</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Jan 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -29,25 +35,25 @@
|
|||
//====================================================================
|
||||
@interface GSWHTMLComment: GSWElement
|
||||
{
|
||||
NSString* string;
|
||||
NSData* data;
|
||||
NSStringEncoding encoding;
|
||||
NSString* _string;
|
||||
NSData* _data;
|
||||
NSStringEncoding _encoding;
|
||||
};
|
||||
|
||||
-(id)initWithString:(NSString*)_string;
|
||||
-(id)initWithString:(NSString*)aString;
|
||||
-(void)dealloc;
|
||||
-(NSString*)description;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWHTMLComment (GSWHTMLCommentA)
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWHTMLComment (GSWHTMLCommentB)
|
||||
+(id)elementWithString:(NSString*)_string;
|
||||
+(id)elementWithString:(NSString*)aString;
|
||||
@end
|
||||
|
||||
#endif //_GSWHTMLComment_h__
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWHTMLComment.m - GSWeb: Class GSWHTMLComment
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWHTMLComment.m - <title>GSWeb: Class GSWRequest</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Sept 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Sept 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
static char rcsId[] = "$Id$";
|
||||
|
||||
|
@ -32,27 +38,27 @@ static char rcsId[] = "$Id$";
|
|||
-(id)init
|
||||
{
|
||||
if ((self=[super init]))
|
||||
{
|
||||
encoding=NSISOLatin1StringEncoding;
|
||||
};
|
||||
{
|
||||
_encoding=NSISOLatin1StringEncoding;
|
||||
};
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithString:(NSString*)_string
|
||||
-(id)initWithString:(NSString*)aString
|
||||
{
|
||||
if ((self=[self init]))
|
||||
{
|
||||
ASSIGN(string,_string);
|
||||
};
|
||||
{
|
||||
ASSIGN(_string,aString);
|
||||
};
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
DESTROY(string);
|
||||
DESTROY(data);
|
||||
DESTROY(_string);
|
||||
DESTROY(_data);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -60,9 +66,9 @@ static char rcsId[] = "$Id$";
|
|||
-(NSString*)description
|
||||
{
|
||||
return [NSString stringWithFormat:@"<%s %p - String:[%@]>",
|
||||
object_get_class_name(self),
|
||||
(void*)self,
|
||||
string];
|
||||
object_get_class_name(self),
|
||||
(void*)self,
|
||||
_string];
|
||||
};
|
||||
|
||||
@end
|
||||
|
@ -71,15 +77,15 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWHTMLComment (GSWHTMLCommentA)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
[response_ _appendContentAsciiString:@"<!--"];
|
||||
[response_ _appendContentAsciiString:string];
|
||||
[response_ _appendContentAsciiString:@"-->"];
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[aContext elementID]);
|
||||
[aResponse _appendContentAsciiString:@"<!--"];
|
||||
[aResponse _appendContentAsciiString:_string];
|
||||
[aResponse _appendContentAsciiString:@"-->"];
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[aContext elementID]);
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
|
@ -89,8 +95,8 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWHTMLComment (GSWHTMLCommentB)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(id)elementWithString:(NSString*)_string
|
||||
+(id)elementWithString:(NSString*)aString
|
||||
{
|
||||
return [[[GSWHTMLComment alloc]initWithString:_string] autorelease];
|
||||
return [[[GSWHTMLComment alloc]initWithString:aString] autorelease];
|
||||
};
|
||||
@end
|
||||
|
|
|
@ -148,6 +148,7 @@ static char rcsId[] = "$Id$";
|
|||
removeFrom:tmpOtherAssociations];
|
||||
if ([tmpPageSetVarAssociations count]>0)
|
||||
_pageSetVarAssociations=[tmpPageSetVarAssociations retain];
|
||||
NSDebugMLLog(@"gswdync",@"_pageSetVarAssociations=%@",_pageSetVarAssociations);
|
||||
|
||||
_pageSetVarAssociationsDynamic=[[anAssociationsDict objectForKey:pageSetVars__Key
|
||||
withDefaultObject:[_pageSetVarAssociationsDynamic autorelease]] retain];
|
||||
|
@ -158,6 +159,7 @@ static char rcsId[] = "$Id$";
|
|||
if ([tmpOtherAssociations count]>0)
|
||||
_otherAssociations=[[NSDictionary dictionaryWithDictionary:tmpOtherAssociations] retain];
|
||||
|
||||
NSDebugMLLog(@"gswdync",@"_otherAssociations=%@",_otherAssociations);
|
||||
//TODO NSDictionary* otherQueryAssociations;
|
||||
|
||||
if ((self=[super initWithName:aName
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
|
@ -37,8 +37,23 @@ static char rcsId[] = "$Id$";
|
|||
associations:(NSDictionary*)associations
|
||||
template:(GSWElement*)templateElement
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
GSWAssociation* languageAssociation=nil;
|
||||
NSMutableDictionary* tmpAssociations=[NSMutableDictionary dictionaryWithDictionary:associations];
|
||||
LOGObjectFnStartC("GSWJavaScript");
|
||||
NSDebugMLLog(@"gswdync",@"aName=%@ associations:%@ templateElement=%@",aName,associations,templateElement);
|
||||
if (![tmpAssociations objectForKey:language__Key])
|
||||
{
|
||||
// Create and set the language (Javascript)
|
||||
languageAssociation=[GSWConstantValueAssociation associationWithValue:@"JavaScript"];
|
||||
[tmpAssociations setObject:languageAssociation
|
||||
forKey:language__Key];
|
||||
};
|
||||
if ((self=[super initWithName:aName
|
||||
associations:tmpAssociations
|
||||
template:templateElement]))
|
||||
{
|
||||
};
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWMailDelivery.h - GSWeb: Class GSWMailDelivery
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWMailDelivery.h - <title>GSWeb: Class GSWMailDelivery</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Feb 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Feb 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -33,37 +39,39 @@
|
|||
};
|
||||
|
||||
+(GSWMailDelivery*)sharedInstance;
|
||||
-(NSString*)composeEmailFrom:(NSString*)sender_
|
||||
to:(NSArray*)to_
|
||||
cc:(NSArray*)cc_
|
||||
subject:(NSString*)subject_
|
||||
plainText:(NSString*)plainTextMessage_
|
||||
send:(BOOL)sendNow_;
|
||||
-(NSString*)composeEmailFrom:(NSString*)sender_
|
||||
to:(NSArray*)to_
|
||||
cc:(NSArray*)cc_
|
||||
subject:(NSString*)subject_
|
||||
component:(GSWComponent*)component_
|
||||
send:(BOOL)sendNow_;
|
||||
-(NSString*)composeEmailFrom:(NSString*)sender
|
||||
to:(NSArray*)to
|
||||
cc:(NSArray*)cc
|
||||
subject:(NSString*)subject
|
||||
plainText:(NSString*)plainTextMessage
|
||||
send:(BOOL)sendNow;
|
||||
|
||||
-(NSString*)composeEmailFrom:(NSString*)sender
|
||||
to:(NSArray*)to
|
||||
cc:(NSArray*)cc
|
||||
subject:(NSString*)subject
|
||||
component:(GSWComponent*)component
|
||||
send:(BOOL)sendNow;
|
||||
//NDFN
|
||||
-(NSString*)composeEmailFrom:(NSString*)sender_
|
||||
to:(NSArray*)to_
|
||||
cc:(NSArray*)cc_
|
||||
bcc:(NSArray*)bcc_
|
||||
subject:(NSString*)subject_
|
||||
plainText:(NSString*)plainTextMessage_
|
||||
send:(BOOL)sendNow_;
|
||||
-(NSString*)composeEmailFrom:(NSString*)sender
|
||||
to:(NSArray*)to
|
||||
cc:(NSArray*)cc
|
||||
bcc:(NSArray*)bcc
|
||||
subject:(NSString*)subject
|
||||
plainText:(NSString*)plainTextMessage
|
||||
send:(BOOL)sendNow;
|
||||
//NDFN
|
||||
-(NSString*)composeEmailFrom:(NSString*)sender_
|
||||
to:(NSArray*)to_
|
||||
cc:(NSArray*)cc_
|
||||
bcc:(NSArray*)bcc_
|
||||
subject:(NSString*)subject_
|
||||
component:(GSWComponent*)component_
|
||||
send:(BOOL)sendNow_;
|
||||
-(void)sendEmail:(NSString*)emailString_;
|
||||
-(void)_invokeGSWSendMailAt:(id)at_
|
||||
withEmail:(id)email_;
|
||||
-(NSString*)composeEmailFrom:(NSString*)sender
|
||||
to:(NSArray*)to
|
||||
cc:(NSArray*)cc
|
||||
bcc:(NSArray*)bcc
|
||||
subject:(NSString*)subject
|
||||
component:(GSWComponent*)component
|
||||
send:(BOOL)sendNow;
|
||||
|
||||
-(void)sendEmail:(NSString*)emailString;
|
||||
-(void)_invokeGSWSendMailAt:(id)at
|
||||
withEmail:(id)email;
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWMailDelivery.m - GSWeb: Class GSWMailDelivery
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWMailDelivery.m - <title>GSWeb: Class GSWMailDelivery</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Feb 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Feb 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
static char rcsId[] = "$Id$";
|
||||
|
||||
|
@ -41,117 +47,117 @@ static GSWMailDelivery *sharedInstance;
|
|||
return sharedInstance;
|
||||
};
|
||||
|
||||
-(NSString*)composeEmailFrom:(NSString*)sender_
|
||||
to:(NSArray*)to_
|
||||
cc:(NSArray*)cc_
|
||||
subject:(NSString*)subject_
|
||||
plainText:(NSString*)plainTextMessage_
|
||||
send:(BOOL)sendNow_
|
||||
-(NSString*)composeEmailFrom:(NSString*)sender
|
||||
to:(NSArray*)to
|
||||
cc:(NSArray*)cc
|
||||
subject:(NSString*)subject
|
||||
plainText:(NSString*)plainTextMessage
|
||||
send:(BOOL)sendNow
|
||||
{
|
||||
NSDebugMLog(@"sender_=%@",sender_);
|
||||
NSDebugMLog(@"to_=%@",to_);
|
||||
NSDebugMLog(@"cc_=%@",cc_);
|
||||
NSDebugMLog(@"subject_=%@",subject_);
|
||||
NSDebugMLog(@"plainTextMessage_=%@",plainTextMessage_);
|
||||
NSDebugMLog(@"sendNow_=%d",(int)sendNow_);
|
||||
return [self composeEmailFrom:sender_
|
||||
to:to_
|
||||
cc:cc_
|
||||
bcc:nil
|
||||
subject:subject_
|
||||
plainText:plainTextMessage_
|
||||
send:sendNow_];
|
||||
NSDebugMLog(@"sender=%@",sender);
|
||||
NSDebugMLog(@"to=%@",to);
|
||||
NSDebugMLog(@"cc=%@",cc);
|
||||
NSDebugMLog(@"subject=%@",subject);
|
||||
NSDebugMLog(@"plainTextMessage=%@",plainTextMessage);
|
||||
NSDebugMLog(@"sendNow=%d",(int)sendNow);
|
||||
return [self composeEmailFrom:sender
|
||||
to:to
|
||||
cc:cc
|
||||
bcc:nil
|
||||
subject:subject
|
||||
plainText:plainTextMessage
|
||||
send:sendNow];
|
||||
};
|
||||
|
||||
-(NSString*)composeEmailFrom:(NSString*)sender_
|
||||
to:(NSArray*)to_
|
||||
cc:(NSArray*)cc_
|
||||
subject:(NSString*)subject_
|
||||
component:(GSWComponent*)component_
|
||||
send:(BOOL)sendNow_
|
||||
-(NSString*)composeEmailFrom:(NSString*)sender
|
||||
to:(NSArray*)to
|
||||
cc:(NSArray*)cc
|
||||
subject:(NSString*)subject
|
||||
component:(GSWComponent*)component
|
||||
send:(BOOL)sendNow
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//NDFN
|
||||
-(NSString*)composeEmailFrom:(NSString*)sender_
|
||||
to:(NSArray*)to_
|
||||
cc:(NSArray*)cc_
|
||||
bcc:(NSArray*)bcc_
|
||||
subject:(NSString*)subject_
|
||||
plainText:(NSString*)plainTextMessage_
|
||||
send:(BOOL)sendNow_
|
||||
-(NSString*)composeEmailFrom:(NSString*)sender
|
||||
to:(NSArray*)to
|
||||
cc:(NSArray*)cc
|
||||
bcc:(NSArray*)bcc
|
||||
subject:(NSString*)subject
|
||||
plainText:(NSString*)plainTextMessage
|
||||
send:(BOOL)sendNow
|
||||
{
|
||||
NSString* _msg=nil;
|
||||
NSMutableString* _to=nil;
|
||||
NSString* messageString=nil;
|
||||
NSMutableString* toString=nil;
|
||||
int i=0;
|
||||
int _count=0;
|
||||
int count=0;
|
||||
|
||||
_count=[to_ count];
|
||||
NSDebugMLog(@"sender_=%@",sender_);
|
||||
NSDebugMLog(@"to_=%@",to_);
|
||||
NSDebugMLog(@"cc_=%@",cc_);
|
||||
NSDebugMLog(@"bcc_=%@",bcc_);
|
||||
NSDebugMLog(@"subject_=%@",subject_);
|
||||
NSDebugMLog(@"plainTextMessage_=%@",plainTextMessage_);
|
||||
NSDebugMLog(@"sendNow_=%d",(int)sendNow_);
|
||||
count=[to count];
|
||||
NSDebugMLog(@"sender=%@",sender);
|
||||
NSDebugMLog(@"to=%@",to);
|
||||
NSDebugMLog(@"cc=%@",cc);
|
||||
NSDebugMLog(@"bcc=%@",bcc);
|
||||
NSDebugMLog(@"subject=%@",subject);
|
||||
NSDebugMLog(@"plainTextMessage=%@",plainTextMessage);
|
||||
NSDebugMLog(@"sendNow=%d",(int)sendNow);
|
||||
|
||||
for(i=0;i<_count;i++)
|
||||
{
|
||||
if (!_to)
|
||||
_to=(NSMutableString*)[NSMutableString stringWithFormat:@"%@",[to_ objectAtIndex:i]];
|
||||
else
|
||||
[_to appendFormat:@", %@",[to_ objectAtIndex:i]];
|
||||
};
|
||||
NSDebugMLog(@"_to=%@",_to);
|
||||
_msg=[NSString stringWithFormat:@"From: %@\nTo: %@\n",sender_,_to];
|
||||
NSDebugMLog(@"_msg=%@",_msg);
|
||||
_count=[cc_ count];
|
||||
if (_count)
|
||||
{
|
||||
NSMutableString* _cc=nil;
|
||||
for(i=0;i<_count;i++)
|
||||
{
|
||||
if (!_cc)
|
||||
_cc=(NSMutableString*)[NSMutableString stringWithFormat:@"%@",[cc_ objectAtIndex:i]];
|
||||
else
|
||||
[_cc appendFormat:@", %@",[cc_ objectAtIndex:i]];
|
||||
};
|
||||
NSDebugMLog(@"_cc=%@",_cc);
|
||||
_msg=[_msg stringByAppendingFormat:@"Cc: %@\n",_cc];
|
||||
NSDebugMLog(@"_msg=%@",_msg);
|
||||
};
|
||||
_count=[bcc_ count];
|
||||
if (_count)
|
||||
{
|
||||
NSMutableString* _bcc=nil;
|
||||
for(i=0;i<_count;i++)
|
||||
{
|
||||
if (!_bcc)
|
||||
_bcc=(NSMutableString*)[NSMutableString stringWithFormat:@"%@",[bcc_ objectAtIndex:i]];
|
||||
else
|
||||
[_bcc appendFormat:@", %@",[bcc_ objectAtIndex:i]];
|
||||
};
|
||||
NSDebugMLog(@"_bcc=%@",_bcc);
|
||||
_msg=[_msg stringByAppendingFormat:@"Bcc: %@\n",_bcc];
|
||||
NSDebugMLog(@"_msg=%@",_msg);
|
||||
};
|
||||
_msg=[_msg stringByAppendingFormat:@"Subject: %@\n\n%@",subject_,plainTextMessage_];
|
||||
NSDebugMLog(@"_msg=%@",_msg);
|
||||
if (sendNow_)
|
||||
[self sendEmail:_msg];
|
||||
return _msg;
|
||||
for(i=0;i<count;i++)
|
||||
{
|
||||
if (!toString)
|
||||
toString=(NSMutableString*)[NSMutableString stringWithFormat:@"%@",[to objectAtIndex:i]];
|
||||
else
|
||||
[toString appendFormat:@", %@",[to objectAtIndex:i]];
|
||||
};
|
||||
NSDebugMLog(@"toString=%@",toString);
|
||||
messageString=[NSString stringWithFormat:@"From: %@\nTo: %@\n",sender,toString];
|
||||
NSDebugMLog(@"messageString=%@",messageString);
|
||||
count=[cc count];
|
||||
if (count)
|
||||
{
|
||||
NSMutableString* ccString=nil;
|
||||
for(i=0;i<count;i++)
|
||||
{
|
||||
if (!ccString)
|
||||
ccString=(NSMutableString*)[NSMutableString stringWithFormat:@"%@",[cc objectAtIndex:i]];
|
||||
else
|
||||
[ccString appendFormat:@", %@",[cc objectAtIndex:i]];
|
||||
};
|
||||
NSDebugMLog(@"ccString=%@",ccString);
|
||||
messageString=[messageString stringByAppendingFormat:@"Cc: %@\n",ccString];
|
||||
NSDebugMLog(@"messageString=%@",messageString);
|
||||
};
|
||||
count=[bcc count];
|
||||
if (count)
|
||||
{
|
||||
NSMutableString* bccString=nil;
|
||||
for(i=0;i<count;i++)
|
||||
{
|
||||
if (!bccString)
|
||||
bccString=(NSMutableString*)[NSMutableString stringWithFormat:@"%@",[bcc objectAtIndex:i]];
|
||||
else
|
||||
[bccString appendFormat:@", %@",[bcc objectAtIndex:i]];
|
||||
};
|
||||
NSDebugMLog(@"bccString=%@",bccString);
|
||||
messageString=[messageString stringByAppendingFormat:@"Bcc: %@\n",bccString];
|
||||
NSDebugMLog(@"messageString=%@",messageString);
|
||||
};
|
||||
messageString=[messageString stringByAppendingFormat:@"Subject: %@\n\n%@",subject,plainTextMessage];
|
||||
NSDebugMLog(@"messageString=%@",messageString);
|
||||
if (sendNow)
|
||||
[self sendEmail:messageString];
|
||||
return messageString;
|
||||
};
|
||||
|
||||
//NDFN
|
||||
-(NSString*)composeEmailFrom:(NSString*)sender_
|
||||
to:(NSArray*)to_
|
||||
cc:(NSArray*)cc_
|
||||
bcc:(NSArray*)bcc_
|
||||
subject:(NSString*)subject_
|
||||
component:(GSWComponent*)component_
|
||||
send:(BOOL)sendNow_
|
||||
-(NSString*)composeEmailFrom:(NSString*)sender
|
||||
to:(NSArray*)to
|
||||
cc:(NSArray*)cc
|
||||
bcc:(NSArray*)bcc
|
||||
subject:(NSString*)subject
|
||||
component:(GSWComponent*)component
|
||||
send:(BOOL)sendNow
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
|
@ -165,7 +171,10 @@ static GSWMailDelivery *sharedInstance;
|
|||
NSDebugMLog(@"emailString_=%@",emailString_);
|
||||
|
||||
if(pipe(files))
|
||||
[NSException raise:NSInternalInconsistencyException format:@"%@ -- %@ 0x%x: cannot create pipe", NSStringFromSelector(_cmd), NSStringFromClass([self class]), self];
|
||||
[NSException raise:NSInternalInconsistencyException format:@"%@ -- %@ 0x%x: cannot create pipe",
|
||||
NSStringFromSelector(_cmd),
|
||||
NSStringFromClass([self class]),
|
||||
self];
|
||||
|
||||
switch(pid = fork())
|
||||
{
|
||||
|
@ -182,7 +191,10 @@ static GSWMailDelivery *sharedInstance;
|
|||
case -1:
|
||||
close(files[0]);
|
||||
close(files[1]);
|
||||
[NSException raise:NSInternalInconsistencyException format:@"%@ -- %@ 0x%x: cannot fork process", NSStringFromSelector(_cmd), NSStringFromClass([self class]), self];
|
||||
[NSException raise:NSInternalInconsistencyException format:@"%@ -- %@ 0x%x: cannot fork process",
|
||||
NSStringFromSelector(_cmd),
|
||||
NSStringFromClass([self class]),
|
||||
self];
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -195,8 +207,8 @@ static GSWMailDelivery *sharedInstance;
|
|||
}
|
||||
};
|
||||
|
||||
-(void)_invokeGSWSendMailAt:(id)at_
|
||||
withEmail:(id)email_
|
||||
-(void)_invokeGSWSendMailAt:(id)at
|
||||
withEmail:(id)email
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWNestedList.h - GSWeb: Class GSWNestedList
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWNestedList.h - <title>GSWeb: Class GSWNestedList</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -30,42 +36,42 @@
|
|||
//====================================================================
|
||||
@interface GSWNestedList: GSWDynamicElement
|
||||
{
|
||||
GSWAssociation* list;
|
||||
GSWAssociation* item;
|
||||
GSWAssociation* displayString;
|
||||
GSWAssociation* sublist;
|
||||
GSWAssociation* action;
|
||||
GSWAssociation* selection;
|
||||
GSWAssociation* index;
|
||||
GSWAssociation* level;
|
||||
GSWAssociation* isOrdered;
|
||||
GSWAssociation* prefix;
|
||||
GSWAssociation* suffix;
|
||||
BOOL defaultEscapeHTML;
|
||||
GSWAssociation* _list;
|
||||
GSWAssociation* _item;
|
||||
GSWAssociation* _displayString;
|
||||
GSWAssociation* _sublist;
|
||||
GSWAssociation* _action;
|
||||
GSWAssociation* _selection;
|
||||
GSWAssociation* _index;
|
||||
GSWAssociation* _level;
|
||||
GSWAssociation* _isOrdered;
|
||||
GSWAssociation* _prefix;
|
||||
GSWAssociation* _suffix;
|
||||
BOOL _defaultEscapeHTML;
|
||||
};
|
||||
|
||||
-(void)dealloc;
|
||||
|
||||
-(id)initWithName:(NSString*)name_
|
||||
associations:(NSDictionary*)associations_
|
||||
template:(GSWElement*)templateElement_;
|
||||
-(id)initWithName:(NSString*)aName
|
||||
associations:(NSDictionary*)associations
|
||||
template:(GSWElement*)templateElement;
|
||||
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)_appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
orderedList:(id)orderedList_
|
||||
level:(int)level_;
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext;
|
||||
-(void)_appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext
|
||||
orderedList:(id)orderedList
|
||||
level:(int)level;
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)aRequest
|
||||
inContext:(GSWContext*)aContext;
|
||||
|
||||
-(id)objectAtIndexPath:(id)indexPath_
|
||||
inList:(id)list_
|
||||
inComponent:(id)component_;
|
||||
-(id)_objectAtIndexPath:(id)indexPath_
|
||||
inList:(id)list_
|
||||
currentIndex:(unsigned int)index_
|
||||
inComponent:(id)component_;
|
||||
-(id)objectAtIndexPath:(id)indexPath
|
||||
inList:(id)list
|
||||
inComponent:(id)component;
|
||||
-(id)_objectAtIndexPath:(id)indexPath
|
||||
inList:(id)list
|
||||
currentIndex:(unsigned int)index
|
||||
inComponent:(id)component;
|
||||
@end
|
||||
|
||||
#endif //_GSWNestedList_h__
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWNestedList.m - GSWeb: Class GSWNestedList
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWNestedList.m - <title>GSWeb: Class GSWNestedList</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
static char rcsId[] = "$Id$";
|
||||
|
||||
|
@ -35,9 +41,9 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
-(id)initWithName:(NSString*)name_
|
||||
associations:(NSDictionary*)associations_
|
||||
template:(GSWElement*)templateElement_
|
||||
-(id)initWithName:(NSString*)aName
|
||||
associations:(NSDictionary*)associations
|
||||
template:(GSWElement*)templateElement
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
|
@ -45,24 +51,24 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
orderedList:(id)orderedList_
|
||||
level:(int)level_
|
||||
-(void)_appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext
|
||||
orderedList:(id)orderedList
|
||||
level:(int)level
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)aRequest
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
|
@ -70,19 +76,19 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
-(id)objectAtIndexPath:(id)indexPath_
|
||||
inList:(id)list_
|
||||
inComponent:(id)component_
|
||||
-(id)objectAtIndexPath:(id)indexPath
|
||||
inList:(id)list
|
||||
inComponent:(id)component
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)_objectAtIndexPath:(id)indexPath_
|
||||
inList:(id)list_
|
||||
currentIndex:(unsigned int)index_
|
||||
inComponent:(id)component_
|
||||
-(id)_objectAtIndexPath:(id)indexPath
|
||||
inList:(id)list
|
||||
currentIndex:(unsigned int)index
|
||||
inComponent:(id)component
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Terence Parr, MageLang Institute
|
||||
* with John Lilley, Empathy Software
|
||||
* and Manuel Guesdon, Software Builders
|
||||
* ANTLR Version 2.7.1; 1996,1997,1998,1999,2000
|
||||
* ANTLR Version 2.5.0; 1996,1997,1998,1999
|
||||
*/
|
||||
|
||||
|
||||
|
@ -19,7 +19,6 @@
|
|||
#include "gsantlr/ANTLRCharBuffer.h"
|
||||
#include "gsantlr/ANTLRBitSet.h"
|
||||
#include "gsantlr/ANTLRCharScanner.h"
|
||||
|
||||
@interface GSWPageDefLexer : ANTLRCharScanner
|
||||
{
|
||||
};
|
||||
|
@ -37,6 +36,8 @@
|
|||
/*public: */-(void) mPIDENTWithCreateToken:(BOOL)_createToken ;
|
||||
/*public: */-(void) mPOINTWithCreateToken:(BOOL)_createToken ;
|
||||
/*public: */-(void) mSTRINGWithCreateToken:(BOOL)_createToken ;
|
||||
/*public: */-(void) mIDENTREFWithCreateToken:(BOOL)_createToken ;
|
||||
/*public: */-(void) mPIDENTREFWithCreateToken:(BOOL)_createToken ;
|
||||
/*public: */-(void) mYESWithCreateToken:(BOOL)_createToken ;
|
||||
/*public: */-(void) mNOWithCreateToken:(BOOL)_createToken ;
|
||||
/*public: */-(void) mLCURLYWithCreateToken:(BOOL)_createToken ;
|
||||
|
@ -71,5 +72,9 @@ extern CONST unsigned long GSWPageDefLexer___tokenSet_5_data_[];
|
|||
extern ANTLRBitSet* GSWPageDefLexer___tokenSet_5;
|
||||
extern CONST unsigned long GSWPageDefLexer___tokenSet_6_data_[];
|
||||
extern ANTLRBitSet* GSWPageDefLexer___tokenSet_6;
|
||||
extern CONST unsigned long GSWPageDefLexer___tokenSet_7_data_[];
|
||||
extern ANTLRBitSet* GSWPageDefLexer___tokenSet_7;
|
||||
extern CONST unsigned long GSWPageDefLexer___tokenSet_8_data_[];
|
||||
extern ANTLRBitSet* GSWPageDefLexer___tokenSet_8;
|
||||
|
||||
#endif /*INC_GSWPageDefLexer_h_*/
|
||||
|
|
|
@ -4,17 +4,16 @@
|
|||
* Terence Parr, MageLang Institute
|
||||
* with John Lilley, Empathy Software
|
||||
* and Manuel Guesdon, Software Builders
|
||||
* ANTLR Version 2.7.1; 1996,1997,1998,1999,2000
|
||||
* ANTLR Version 2.5.0; 1996,1997,1998,1999
|
||||
*/
|
||||
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
|
||||
|
||||
#include "gsantlr/ANTLRCommon.h"
|
||||
#include "gsantlr/ANTLRException.h"
|
||||
#include "GSWPageDefLexer.h"
|
||||
#include "GSWPageDefTokenTypes.h"
|
||||
#include "GSWPageDefParserTokenTypes.h"
|
||||
|
||||
|
||||
@implementation GSWPageDefLexer
|
||||
|
@ -50,12 +49,12 @@
|
|||
|
||||
-(ANTLRDefToken) nextToken
|
||||
{
|
||||
ANTLRDefToken theRetToken=nil;
|
||||
ANTLRDefToken _rettoken=nil;
|
||||
BOOL end=NO;
|
||||
//LOGObjectFnStart();
|
||||
for (;!end;)
|
||||
{
|
||||
ANTLRDefToken theRetToken;
|
||||
ANTLRDefToken _rettoken;
|
||||
ANTLRTokenType _ttype = ANTLRToken_INVALID_TYPE;
|
||||
[self resetText];
|
||||
NS_DURING // for error handling
|
||||
|
@ -65,55 +64,55 @@
|
|||
case ((unichar)('"')): case ((unichar)('\'')):
|
||||
{
|
||||
[self mSTRINGWithCreateToken:YES];
|
||||
theRetToken=_returnToken;
|
||||
_rettoken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)('{')):
|
||||
{
|
||||
[self mLCURLYWithCreateToken:YES];
|
||||
theRetToken=_returnToken;
|
||||
_rettoken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)('}')):
|
||||
{
|
||||
[self mRCURLYWithCreateToken:YES];
|
||||
theRetToken=_returnToken;
|
||||
_rettoken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)(';')):
|
||||
{
|
||||
[self mSEMIWithCreateToken:YES];
|
||||
theRetToken=_returnToken;
|
||||
_rettoken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)('^')):
|
||||
{
|
||||
[self mCIRCWithCreateToken:YES];
|
||||
theRetToken=_returnToken;
|
||||
_rettoken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)('~')):
|
||||
{
|
||||
[self mTILDEWithCreateToken:YES];
|
||||
theRetToken=_returnToken;
|
||||
_rettoken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)(':')):
|
||||
{
|
||||
[self mCOLUMNWithCreateToken:YES];
|
||||
theRetToken=_returnToken;
|
||||
_rettoken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)('=')):
|
||||
{
|
||||
[self mASSIGNWithCreateToken:YES];
|
||||
theRetToken=_returnToken;
|
||||
_rettoken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)('\t')): case ((unichar)('\n')): case ((unichar)('\r')): case ((unichar)(' ')):
|
||||
{
|
||||
[self mWSWithCreateToken:YES];
|
||||
theRetToken=_returnToken;
|
||||
_rettoken=_returnToken;
|
||||
break;
|
||||
}
|
||||
case ((unichar)('0')): case ((unichar)('1')): case ((unichar)('2')): case ((unichar)('3')):
|
||||
|
@ -121,54 +120,64 @@
|
|||
case ((unichar)('8')): case ((unichar)('9')):
|
||||
{
|
||||
[self mINTWithCreateToken:YES];
|
||||
theRetToken=_returnToken;
|
||||
_rettoken=_returnToken;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
if (([self LA:1]==((unichar)('Y'))) && ([self LA:2]==((unichar)('E'))) && ([self LA:3]==((unichar)('S'))))
|
||||
{
|
||||
[self mYESWithCreateToken:YES];
|
||||
theRetToken=_returnToken;
|
||||
_rettoken=_returnToken;
|
||||
}
|
||||
else if (([self LA:1]==((unichar)('/'))) && ([self LA:2]==((unichar)('/'))))
|
||||
{
|
||||
[self mSL_COMMENTWithCreateToken:YES];
|
||||
theRetToken=_returnToken;
|
||||
_rettoken=_returnToken;
|
||||
}
|
||||
else if (([self LA:1]==((unichar)('/'))) && ([self LA:2]==((unichar)('*'))))
|
||||
{
|
||||
[self mML_COMMENTWithCreateToken:YES];
|
||||
theRetToken=_returnToken;
|
||||
_rettoken=_returnToken;
|
||||
}
|
||||
else if (([self LA:1]==((unichar)('#'))) && ([self LA:2]==((unichar)('i'))))
|
||||
{
|
||||
[self mINCLUDEWithCreateToken:YES];
|
||||
theRetToken=_returnToken;
|
||||
_rettoken=_returnToken;
|
||||
}
|
||||
else if (([self LA:1]==((unichar)('.'))) && ([GSWPageDefLexer___tokenSet_0 isMember:[self LA:2]]))
|
||||
{
|
||||
[self mPIDENTWithCreateToken:YES];
|
||||
theRetToken=_returnToken;
|
||||
_rettoken=_returnToken;
|
||||
}
|
||||
else if (([self LA:1]==((unichar)('.'))) && ([GSWPageDefLexer___tokenSet_1 isMember:[self LA:2]]))
|
||||
{
|
||||
[self mPIDENTREFWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
}
|
||||
else if (([self LA:1]==((unichar)('N'))) && ([self LA:2]==((unichar)('O'))))
|
||||
{
|
||||
[self mNOWithCreateToken:YES];
|
||||
theRetToken=_returnToken;
|
||||
_rettoken=_returnToken;
|
||||
}
|
||||
else if (([self LA:1]==((unichar)('#'))) && ([GSWPageDefLexer___tokenSet_1 isMember:[self LA:2]]))
|
||||
else if (([self LA:1]==((unichar)('#'))) && ([GSWPageDefLexer___tokenSet_2 isMember:[self LA:2]]))
|
||||
{
|
||||
[self mHEXNUMWithCreateToken:YES];
|
||||
theRetToken=_returnToken;
|
||||
_rettoken=_returnToken;
|
||||
}
|
||||
else if (([GSWPageDefLexer___tokenSet_2 isMember:[self LA:1]]))
|
||||
else if (([GSWPageDefLexer___tokenSet_3 isMember:[self LA:1]]))
|
||||
{
|
||||
[self mIDENTWithCreateToken:YES];
|
||||
theRetToken=_returnToken;
|
||||
_rettoken=_returnToken;
|
||||
}
|
||||
else if (([self LA:1]==((unichar)('.'))))
|
||||
{
|
||||
[self mPOINTWithCreateToken:YES];
|
||||
theRetToken=_returnToken;
|
||||
_rettoken=_returnToken;
|
||||
}
|
||||
else if (([GSWPageDefLexer___tokenSet_4 isMember:[self LA:1]]))
|
||||
{
|
||||
[self mIDENTREFWithCreateToken:YES];
|
||||
_rettoken=_returnToken;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -199,7 +208,7 @@
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_SL_COMMENT;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_SL_COMMENT;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -207,10 +216,10 @@ int _begin=[text length];
|
|||
{
|
||||
do
|
||||
{
|
||||
if (([GSWPageDefLexer___tokenSet_3 isMember:[self LA:1]]))
|
||||
if (([GSWPageDefLexer___tokenSet_5 isMember:[self LA:1]]))
|
||||
{
|
||||
{
|
||||
[self matchCharSet:GSWPageDefLexer___tokenSet_3];
|
||||
[self matchCharSet:GSWPageDefLexer___tokenSet_5];
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -264,7 +273,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_ML_COMMENT;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_ML_COMMENT;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -345,7 +354,7 @@ int _begin=[text length];
|
|||
case ((unichar)(0xfe)): case ((unichar)(0xff)):
|
||||
{
|
||||
{
|
||||
[self matchCharSet:GSWPageDefLexer___tokenSet_4];
|
||||
[self matchCharSet:GSWPageDefLexer___tokenSet_6];
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -388,7 +397,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_INCLUDE;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_INCLUDE;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -406,7 +415,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_IDENT;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_IDENT;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -497,7 +506,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_LETTER;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_LETTER;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -543,7 +552,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_DIGIT;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_DIGIT;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -561,7 +570,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_PIDENT;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_PIDENT;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -612,7 +621,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_POINT;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_POINT;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -630,7 +639,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_STRING;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_STRING;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -714,17 +723,17 @@ int _begin=[text length];
|
|||
case ((unichar)(0xfd)): case ((unichar)(0xfe)): case ((unichar)(0xff)):
|
||||
{
|
||||
{
|
||||
[self matchCharSet:GSWPageDefLexer___tokenSet_5];
|
||||
[self matchCharSet:GSWPageDefLexer___tokenSet_7];
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
goto _loop60;
|
||||
goto _loop66;
|
||||
}
|
||||
}
|
||||
} while (YES);
|
||||
_loop60:;
|
||||
_loop66:;
|
||||
}
|
||||
[self matchCharacter:'\''];
|
||||
break;
|
||||
|
@ -807,17 +816,17 @@ int _begin=[text length];
|
|||
case ((unichar)(0xfd)): case ((unichar)(0xfe)): case ((unichar)(0xff)):
|
||||
{
|
||||
{
|
||||
[self matchCharSet:GSWPageDefLexer___tokenSet_6];
|
||||
[self matchCharSet:GSWPageDefLexer___tokenSet_8];
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
goto _loop63;
|
||||
goto _loop69;
|
||||
}
|
||||
}
|
||||
} while (YES);
|
||||
_loop63:;
|
||||
_loop69:;
|
||||
}
|
||||
[self matchCharacter:'"'];
|
||||
break;
|
||||
|
@ -836,11 +845,158 @@ int _begin=[text length];
|
|||
//LOGObjectFnStop();
|
||||
}
|
||||
|
||||
-(void) mIDENTREFWithCreateToken:(BOOL)_createToken
|
||||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_IDENTREF;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
{
|
||||
switch ( [self LA:1])
|
||||
{
|
||||
case ((unichar)('A')): case ((unichar)('B')): case ((unichar)('C')): case ((unichar)('D')):
|
||||
case ((unichar)('E')): case ((unichar)('F')): case ((unichar)('G')): case ((unichar)('H')):
|
||||
case ((unichar)('I')): case ((unichar)('J')): case ((unichar)('K')): case ((unichar)('L')):
|
||||
case ((unichar)('M')): case ((unichar)('N')): case ((unichar)('O')): case ((unichar)('P')):
|
||||
case ((unichar)('Q')): case ((unichar)('R')): case ((unichar)('S')): case ((unichar)('T')):
|
||||
case ((unichar)('U')): case ((unichar)('V')): case ((unichar)('W')): case ((unichar)('X')):
|
||||
case ((unichar)('Y')): case ((unichar)('Z')): case ((unichar)('a')): case ((unichar)('b')):
|
||||
case ((unichar)('c')): case ((unichar)('d')): case ((unichar)('e')): case ((unichar)('f')):
|
||||
case ((unichar)('g')): case ((unichar)('h')): case ((unichar)('i')): case ((unichar)('j')):
|
||||
case ((unichar)('k')): case ((unichar)('l')): case ((unichar)('m')): case ((unichar)('n')):
|
||||
case ((unichar)('o')): case ((unichar)('p')): case ((unichar)('q')): case ((unichar)('r')):
|
||||
case ((unichar)('s')): case ((unichar)('t')): case ((unichar)('u')): case ((unichar)('v')):
|
||||
case ((unichar)('w')): case ((unichar)('x')): case ((unichar)('y')): case ((unichar)('z')):
|
||||
{
|
||||
[self mLETTERWithCreateToken:NO];
|
||||
break;
|
||||
}
|
||||
case ((unichar)('_')):
|
||||
{
|
||||
[self matchCharacter:'_'];
|
||||
break;
|
||||
}
|
||||
case ((unichar)('@')):
|
||||
{
|
||||
[self matchCharacter:'@'];
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
do
|
||||
{
|
||||
switch ( [self LA:1])
|
||||
{
|
||||
case ((unichar)('A')): case ((unichar)('B')): case ((unichar)('C')): case ((unichar)('D')):
|
||||
case ((unichar)('E')): case ((unichar)('F')): case ((unichar)('G')): case ((unichar)('H')):
|
||||
case ((unichar)('I')): case ((unichar)('J')): case ((unichar)('K')): case ((unichar)('L')):
|
||||
case ((unichar)('M')): case ((unichar)('N')): case ((unichar)('O')): case ((unichar)('P')):
|
||||
case ((unichar)('Q')): case ((unichar)('R')): case ((unichar)('S')): case ((unichar)('T')):
|
||||
case ((unichar)('U')): case ((unichar)('V')): case ((unichar)('W')): case ((unichar)('X')):
|
||||
case ((unichar)('Y')): case ((unichar)('Z')): case ((unichar)('a')): case ((unichar)('b')):
|
||||
case ((unichar)('c')): case ((unichar)('d')): case ((unichar)('e')): case ((unichar)('f')):
|
||||
case ((unichar)('g')): case ((unichar)('h')): case ((unichar)('i')): case ((unichar)('j')):
|
||||
case ((unichar)('k')): case ((unichar)('l')): case ((unichar)('m')): case ((unichar)('n')):
|
||||
case ((unichar)('o')): case ((unichar)('p')): case ((unichar)('q')): case ((unichar)('r')):
|
||||
case ((unichar)('s')): case ((unichar)('t')): case ((unichar)('u')): case ((unichar)('v')):
|
||||
case ((unichar)('w')): case ((unichar)('x')): case ((unichar)('y')): case ((unichar)('z')):
|
||||
{
|
||||
[self mLETTERWithCreateToken:NO];
|
||||
break;
|
||||
}
|
||||
case ((unichar)('_')):
|
||||
{
|
||||
[self matchCharacter:'_'];
|
||||
break;
|
||||
}
|
||||
case ((unichar)('0')): case ((unichar)('1')): case ((unichar)('2')): case ((unichar)('3')):
|
||||
case ((unichar)('4')): case ((unichar)('5')): case ((unichar)('6')): case ((unichar)('7')):
|
||||
case ((unichar)('8')): case ((unichar)('9')):
|
||||
{
|
||||
[self mDIGITWithCreateToken:NO];
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
goto _loop49;
|
||||
}
|
||||
}
|
||||
} while (YES);
|
||||
_loop49:;
|
||||
}
|
||||
_ttype = [self testLiteralsTable:_ttype];
|
||||
if ( _createToken && _token==0 )
|
||||
{
|
||||
_token = [self makeToken:_ttype];
|
||||
[_token setText:[text substringFromIndex:_begin]];
|
||||
}
|
||||
ASSIGN(_returnToken,_token);
|
||||
//LOGObjectFnStop();
|
||||
}
|
||||
|
||||
-(void) mPIDENTREFWithCreateToken:(BOOL)_createToken
|
||||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_PIDENTREF;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
[self mPOINTWithCreateToken:NO];
|
||||
{
|
||||
switch ( [self LA:1])
|
||||
{
|
||||
case ((unichar)('@')): case ((unichar)('A')): case ((unichar)('B')): case ((unichar)('C')):
|
||||
case ((unichar)('D')): case ((unichar)('E')): case ((unichar)('F')): case ((unichar)('G')):
|
||||
case ((unichar)('H')): case ((unichar)('I')): case ((unichar)('J')): case ((unichar)('K')):
|
||||
case ((unichar)('L')): case ((unichar)('M')): case ((unichar)('N')): case ((unichar)('O')):
|
||||
case ((unichar)('P')): case ((unichar)('Q')): case ((unichar)('R')): case ((unichar)('S')):
|
||||
case ((unichar)('T')): case ((unichar)('U')): case ((unichar)('V')): case ((unichar)('W')):
|
||||
case ((unichar)('X')): case ((unichar)('Y')): case ((unichar)('Z')): case ((unichar)('_')):
|
||||
case ((unichar)('a')): case ((unichar)('b')): case ((unichar)('c')): case ((unichar)('d')):
|
||||
case ((unichar)('e')): case ((unichar)('f')): case ((unichar)('g')): case ((unichar)('h')):
|
||||
case ((unichar)('i')): case ((unichar)('j')): case ((unichar)('k')): case ((unichar)('l')):
|
||||
case ((unichar)('m')): case ((unichar)('n')): case ((unichar)('o')): case ((unichar)('p')):
|
||||
case ((unichar)('q')): case ((unichar)('r')): case ((unichar)('s')): case ((unichar)('t')):
|
||||
case ((unichar)('u')): case ((unichar)('v')): case ((unichar)('w')): case ((unichar)('x')):
|
||||
case ((unichar)('y')): case ((unichar)('z')):
|
||||
{
|
||||
[self mIDENTREFWithCreateToken:NO];
|
||||
break;
|
||||
}
|
||||
case ((unichar)('"')): case ((unichar)('\'')):
|
||||
{
|
||||
[self mSTRINGWithCreateToken:NO];
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];
|
||||
}
|
||||
}
|
||||
}
|
||||
_ttype = [self testLiteralsTable:_ttype];
|
||||
if ( _createToken && _token==0 )
|
||||
{
|
||||
_token = [self makeToken:_ttype];
|
||||
[_token setText:[text substringFromIndex:_begin]];
|
||||
}
|
||||
ASSIGN(_returnToken,_token);
|
||||
//LOGObjectFnStop();
|
||||
}
|
||||
|
||||
-(void) mYESWithCreateToken:(BOOL)_createToken
|
||||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_YES;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_YES;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -859,7 +1015,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_NO;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_NO;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -878,7 +1034,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_LCURLY;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_LCURLY;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -896,7 +1052,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_RCURLY;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_RCURLY;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -914,7 +1070,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_SEMI;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_SEMI;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -932,7 +1088,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_CIRC;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_CIRC;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -950,7 +1106,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_TILDE;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_TILDE;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -968,7 +1124,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_COLUMN;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_COLUMN;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -986,7 +1142,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_ASSIGN;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_ASSIGN;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -1004,7 +1160,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_WS;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_WS;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -1058,7 +1214,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_ESC;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_ESC;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -1109,7 +1265,7 @@ int _begin=[text length];
|
|||
case ((unichar)('u')):
|
||||
{
|
||||
{
|
||||
int _cnt72=0;
|
||||
int _cnt78=0;
|
||||
do
|
||||
{
|
||||
if (([self LA:1]==((unichar)('u'))))
|
||||
|
@ -1118,12 +1274,12 @@ int _begin=[text length];
|
|||
}
|
||||
else
|
||||
{
|
||||
if ( _cnt72>=1 ) { goto _loop72; } else {[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];}
|
||||
if ( _cnt78>=1 ) { goto _loop78; } else {[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];}
|
||||
}
|
||||
|
||||
_cnt72++;
|
||||
_cnt78++;
|
||||
} while (YES);
|
||||
_loop72:;
|
||||
_loop78:;
|
||||
}
|
||||
[self mHEXDIGITWithCreateToken:NO];
|
||||
[self mHEXDIGITWithCreateToken:NO];
|
||||
|
@ -1210,12 +1366,12 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_INT;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_INT;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
{
|
||||
int _cnt67=0;
|
||||
int _cnt73=0;
|
||||
do
|
||||
{
|
||||
if ((([self LA:1] >= ((unichar)('0')) && [self LA:1] <= ((unichar)('9')))))
|
||||
|
@ -1224,12 +1380,12 @@ int _begin=[text length];
|
|||
}
|
||||
else
|
||||
{
|
||||
if ( _cnt67>=1 ) { goto _loop67; } else {[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];}
|
||||
if ( _cnt73>=1 ) { goto _loop73; } else {[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];}
|
||||
}
|
||||
|
||||
_cnt67++;
|
||||
_cnt73++;
|
||||
} while (YES);
|
||||
_loop67:;
|
||||
_loop73:;
|
||||
}
|
||||
if ( _createToken && _token==0 )
|
||||
{
|
||||
|
@ -1244,7 +1400,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_HEXNUM;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_HEXNUM;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -1263,26 +1419,26 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_HEXINT;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_HEXINT;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
{
|
||||
int _cnt82=0;
|
||||
int _cnt88=0;
|
||||
do
|
||||
{
|
||||
if (([GSWPageDefLexer___tokenSet_1 isMember:[self LA:1]]))
|
||||
if (([GSWPageDefLexer___tokenSet_2 isMember:[self LA:1]]))
|
||||
{
|
||||
[self mHEXDIGITWithCreateToken:NO];
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( _cnt82>=1 ) { goto _loop82; } else {[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];}
|
||||
if ( _cnt88>=1 ) { goto _loop88; } else {[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];}
|
||||
}
|
||||
|
||||
_cnt82++;
|
||||
_cnt88++;
|
||||
} while (YES);
|
||||
_loop82:;
|
||||
_loop88:;
|
||||
}
|
||||
if ( _createToken && _token==0 )
|
||||
{
|
||||
|
@ -1297,7 +1453,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_HEXDIGIT;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_HEXDIGIT;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -1342,7 +1498,7 @@ int _begin=[text length];
|
|||
{
|
||||
ANTLRDefToken _token=nil;
|
||||
int _begin=[text length];
|
||||
ANTLRTokenType _ttype = GSWPageDefTokenType_LCLETTER;
|
||||
ANTLRTokenType _ttype = GSWPageDefParserTokenType_LCLETTER;
|
||||
int _saveIndex;
|
||||
|
||||
//LOGObjectFnStart();
|
||||
|
@ -1359,18 +1515,22 @@ int _begin=[text length];
|
|||
|
||||
CONST unsigned long GSWPageDefLexer___tokenSet_0_data_[] = { 0UL, 132UL, 2281701374UL, 134217726UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
|
||||
static ANTLRBitSet* GSWPageDefLexer___tokenSet_0=nil;
|
||||
CONST unsigned long GSWPageDefLexer___tokenSet_1_data_[] = { 0UL, 67043328UL, 126UL, 126UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
|
||||
CONST unsigned long GSWPageDefLexer___tokenSet_1_data_[] = { 0UL, 132UL, 2281701375UL, 134217726UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
|
||||
static ANTLRBitSet* GSWPageDefLexer___tokenSet_1=nil;
|
||||
CONST unsigned long GSWPageDefLexer___tokenSet_2_data_[] = { 0UL, 0UL, 2281701374UL, 134217726UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
|
||||
CONST unsigned long GSWPageDefLexer___tokenSet_2_data_[] = { 0UL, 67043328UL, 126UL, 126UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
|
||||
static ANTLRBitSet* GSWPageDefLexer___tokenSet_2=nil;
|
||||
CONST unsigned long GSWPageDefLexer___tokenSet_3_data_[] = { 4294958072UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
|
||||
CONST unsigned long GSWPageDefLexer___tokenSet_3_data_[] = { 0UL, 0UL, 2281701374UL, 134217726UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
|
||||
static ANTLRBitSet* GSWPageDefLexer___tokenSet_3=nil;
|
||||
CONST unsigned long GSWPageDefLexer___tokenSet_4_data_[] = { 4294958072UL, 4294966271UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
|
||||
CONST unsigned long GSWPageDefLexer___tokenSet_4_data_[] = { 0UL, 0UL, 2281701375UL, 134217726UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
|
||||
static ANTLRBitSet* GSWPageDefLexer___tokenSet_4=nil;
|
||||
CONST unsigned long GSWPageDefLexer___tokenSet_5_data_[] = { 4294967288UL, 4294967167UL, 4026531839UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
|
||||
CONST unsigned long GSWPageDefLexer___tokenSet_5_data_[] = { 4294958072UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
|
||||
static ANTLRBitSet* GSWPageDefLexer___tokenSet_5=nil;
|
||||
CONST unsigned long GSWPageDefLexer___tokenSet_6_data_[] = { 4294967288UL, 4294967291UL, 4026531839UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
|
||||
CONST unsigned long GSWPageDefLexer___tokenSet_6_data_[] = { 4294958072UL, 4294966271UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
|
||||
static ANTLRBitSet* GSWPageDefLexer___tokenSet_6=nil;
|
||||
CONST unsigned long GSWPageDefLexer___tokenSet_7_data_[] = { 4294967288UL, 4294967167UL, 4026531839UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
|
||||
static ANTLRBitSet* GSWPageDefLexer___tokenSet_7=nil;
|
||||
CONST unsigned long GSWPageDefLexer___tokenSet_8_data_[] = { 4294967288UL, 4294967291UL, 4026531839UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
|
||||
static ANTLRBitSet* GSWPageDefLexer___tokenSet_8=nil;
|
||||
+(void)initialize
|
||||
{
|
||||
if (!GSWPageDefLexer___tokenSet_0)
|
||||
|
@ -1380,13 +1540,17 @@ static ANTLRBitSet* GSWPageDefLexer___tokenSet_6=nil;
|
|||
if (!GSWPageDefLexer___tokenSet_2)
|
||||
GSWPageDefLexer___tokenSet_2=[[ANTLRBitSet bitSetWithULongBits:GSWPageDefLexer___tokenSet_2_data_ length:20] retain];
|
||||
if (!GSWPageDefLexer___tokenSet_3)
|
||||
GSWPageDefLexer___tokenSet_3=[[ANTLRBitSet bitSetWithULongBits:GSWPageDefLexer___tokenSet_3_data_ length:32] retain];
|
||||
GSWPageDefLexer___tokenSet_3=[[ANTLRBitSet bitSetWithULongBits:GSWPageDefLexer___tokenSet_3_data_ length:20] retain];
|
||||
if (!GSWPageDefLexer___tokenSet_4)
|
||||
GSWPageDefLexer___tokenSet_4=[[ANTLRBitSet bitSetWithULongBits:GSWPageDefLexer___tokenSet_4_data_ length:32] retain];
|
||||
GSWPageDefLexer___tokenSet_4=[[ANTLRBitSet bitSetWithULongBits:GSWPageDefLexer___tokenSet_4_data_ length:20] retain];
|
||||
if (!GSWPageDefLexer___tokenSet_5)
|
||||
GSWPageDefLexer___tokenSet_5=[[ANTLRBitSet bitSetWithULongBits:GSWPageDefLexer___tokenSet_5_data_ length:32] retain];
|
||||
if (!GSWPageDefLexer___tokenSet_6)
|
||||
GSWPageDefLexer___tokenSet_6=[[ANTLRBitSet bitSetWithULongBits:GSWPageDefLexer___tokenSet_6_data_ length:32] retain];
|
||||
if (!GSWPageDefLexer___tokenSet_7)
|
||||
GSWPageDefLexer___tokenSet_7=[[ANTLRBitSet bitSetWithULongBits:GSWPageDefLexer___tokenSet_7_data_ length:32] retain];
|
||||
if (!GSWPageDefLexer___tokenSet_8)
|
||||
GSWPageDefLexer___tokenSet_8=[[ANTLRBitSet bitSetWithULongBits:GSWPageDefLexer___tokenSet_8_data_ length:32] retain];
|
||||
}
|
||||
+(void)dealloc
|
||||
{
|
||||
|
@ -1397,6 +1561,8 @@ static ANTLRBitSet* GSWPageDefLexer___tokenSet_6=nil;
|
|||
DESTROY(GSWPageDefLexer___tokenSet_4);
|
||||
DESTROY(GSWPageDefLexer___tokenSet_5);
|
||||
DESTROY(GSWPageDefLexer___tokenSet_6);
|
||||
DESTROY(GSWPageDefLexer___tokenSet_7);
|
||||
DESTROY(GSWPageDefLexer___tokenSet_8);
|
||||
[[self superclass] dealloc];
|
||||
}
|
||||
@end
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Terence Parr, MageLang Institute
|
||||
* with John Lilley, Empathy Software
|
||||
* and Manuel Guesdon, Software Builders
|
||||
* ANTLR Version 2.7.1; 1996,1997,1998,1999,2000
|
||||
* ANTLR Version 2.5.0; 1996,1997,1998,1999
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -4,16 +4,15 @@
|
|||
* Terence Parr, MageLang Institute
|
||||
* with John Lilley, Empathy Software
|
||||
* and Manuel Guesdon, Software Builders
|
||||
* ANTLR Version 2.7.1; 1996,1997,1998,1999,2000
|
||||
* ANTLR Version 2.5.0; 1996,1997,1998,1999
|
||||
*/
|
||||
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
|
||||
|
||||
#include "gsantlr/ANTLRCommon.h"
|
||||
#include "GSWPageDefParser.h"
|
||||
#include "GSWPageDefTokenTypes.h"
|
||||
#include "GSWPageDefParserTokenTypes.h"
|
||||
#include "gsantlr/ANTLRNoViableAltException.h"
|
||||
#include "gsantlr/ANTLRBitSet.h"
|
||||
#include "gsantlr/ANTLRAST.h"
|
||||
|
@ -79,7 +78,7 @@
|
|||
{
|
||||
switch ( [self LA:1])
|
||||
{
|
||||
case GSWPageDefTokenType_IDENT:
|
||||
case GSWPageDefParserTokenType_IDENT:
|
||||
{
|
||||
{
|
||||
[self object];
|
||||
|
@ -88,7 +87,7 @@
|
|||
}
|
||||
break;
|
||||
}
|
||||
case GSWPageDefTokenType_INCLUDE:
|
||||
case GSWPageDefParserTokenType_INCLUDE:
|
||||
{
|
||||
{
|
||||
[self include];
|
||||
|
@ -135,14 +134,14 @@
|
|||
objectId_AST = [astFactory create:objectId];
|
||||
[astFactory makeASTRoot:objectId_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_IDENT];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_IDENT];
|
||||
currentElement=[[GSWPageDefElement new] autorelease]; [currentElement setElementName:[objectId_AST text]];
|
||||
{
|
||||
ANTLRDefAST tmp1_AST = ANTLRnullAST;
|
||||
tmp1_AST = [astFactory create:[self LT:1]];
|
||||
[astFactory makeASTRoot:tmp1_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_COLUMN];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_COLUMN];
|
||||
{
|
||||
[self definition];
|
||||
[astFactory addASTChild:returnAST in:currentAST];
|
||||
|
@ -178,18 +177,18 @@
|
|||
tmp2_AST = [astFactory create:[self LT:1]];
|
||||
[astFactory addASTChild:tmp2_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_INCLUDE];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_INCLUDE];
|
||||
{
|
||||
do
|
||||
{
|
||||
if (([self LA:1]==GSWPageDefTokenType_WS))
|
||||
if (([self LA:1]==GSWPageDefParserTokenType_WS))
|
||||
{
|
||||
{
|
||||
ANTLRDefAST tmp3_AST = ANTLRnullAST;
|
||||
tmp3_AST = [astFactory create:[self LT:1]];
|
||||
[astFactory addASTChild:tmp3_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_WS];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_WS];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -205,7 +204,7 @@
|
|||
includeObj_AST = [astFactory create:includeObj];
|
||||
[astFactory addASTChild:includeObj_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_STRING];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_STRING];
|
||||
[includes addObject:[self unescapedString:[[[includeObj text] stringWithoutPrefix:@"\""] stringWithoutSuffix:@"\""]]];
|
||||
include_AST = [currentAST root];
|
||||
}
|
||||
|
@ -239,11 +238,11 @@
|
|||
tmp4_AST = [astFactory create:[self LT:1]];
|
||||
[astFactory makeASTRoot:tmp4_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_LCURLY];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_LCURLY];
|
||||
{
|
||||
do
|
||||
{
|
||||
if (([self LA:1]==GSWPageDefTokenType_IDENT))
|
||||
if (([self LA:1]==GSWPageDefParserTokenType_IDENT))
|
||||
{
|
||||
[self member];
|
||||
[astFactory addASTChild:returnAST in:currentAST];
|
||||
|
@ -261,23 +260,23 @@
|
|||
ANTLRDefAST tmp5_AST = ANTLRnullAST;
|
||||
tmp5_AST = [astFactory create:[self LT:1]];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_RCURLY];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_RCURLY];
|
||||
{
|
||||
switch ( [self LA:1])
|
||||
{
|
||||
case GSWPageDefTokenType_SEMI:
|
||||
case GSWPageDefParserTokenType_SEMI:
|
||||
{
|
||||
{
|
||||
ANTLRDefAST tmp6_AST = ANTLRnullAST;
|
||||
tmp6_AST = [astFactory create:[self LT:1]];
|
||||
[astFactory addASTChild:tmp6_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_SEMI];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_SEMI];
|
||||
break;
|
||||
}
|
||||
case ANTLRToken_EOF_TYPE:
|
||||
case GSWPageDefTokenType_INCLUDE:
|
||||
case GSWPageDefTokenType_IDENT:
|
||||
case GSWPageDefParserTokenType_INCLUDE:
|
||||
case GSWPageDefParserTokenType_IDENT:
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -317,7 +316,7 @@
|
|||
objectClass_AST = [astFactory create:objectClass];
|
||||
[astFactory addASTChild:objectClass_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_IDENT];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_IDENT];
|
||||
[currentElement setClassName:[objectClass text]];
|
||||
classname_AST = [currentAST root];
|
||||
}
|
||||
|
@ -349,14 +348,14 @@
|
|||
memberName_AST = [astFactory create:memberName];
|
||||
[astFactory makeASTRoot:memberName_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_IDENT];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_IDENT];
|
||||
ASSIGN(currentMemberName,[memberName text]);
|
||||
{
|
||||
ANTLRDefAST tmp7_AST = ANTLRnullAST;
|
||||
tmp7_AST = [astFactory create:[self LT:1]];
|
||||
[astFactory addASTChild:tmp7_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_ASSIGN];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_ASSIGN];
|
||||
{
|
||||
[self mvalue];
|
||||
[astFactory addASTChild:returnAST in:currentAST];
|
||||
|
@ -364,14 +363,14 @@
|
|||
{
|
||||
do
|
||||
{
|
||||
if (([self LA:1]==GSWPageDefTokenType_SEMI))
|
||||
if (([self LA:1]==GSWPageDefParserTokenType_SEMI))
|
||||
{
|
||||
{
|
||||
ANTLRDefAST tmp8_AST = ANTLRnullAST;
|
||||
tmp8_AST = [astFactory create:[self LT:1]];
|
||||
[astFactory addASTChild:tmp8_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_SEMI];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_SEMI];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -414,9 +413,10 @@
|
|||
{
|
||||
switch ( [self LA:1])
|
||||
{
|
||||
case GSWPageDefTokenType_IDENT:
|
||||
case GSWPageDefTokenType_CIRC:
|
||||
case GSWPageDefTokenType_TILDE:
|
||||
case GSWPageDefParserTokenType_IDENT:
|
||||
case GSWPageDefParserTokenType_CIRC:
|
||||
case GSWPageDefParserTokenType_TILDE:
|
||||
case GSWPageDefParserTokenType_IDENTREF:
|
||||
{
|
||||
[self idref];
|
||||
assocKeyPath_AST = returnAST;
|
||||
|
@ -425,62 +425,62 @@
|
|||
ASSIGN(currentAssociation,assoc); };
|
||||
break;
|
||||
}
|
||||
case GSWPageDefTokenType_INT:
|
||||
case GSWPageDefParserTokenType_INT:
|
||||
{
|
||||
assocConstantInt = [self LT:1];
|
||||
{
|
||||
assocConstantInt_AST = [astFactory create:assocConstantInt];
|
||||
[astFactory addASTChild:assocConstantInt_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_INT];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_INT];
|
||||
{ GSWAssociation* assoc=[GSWAssociation associationWithValue:[NSNumber valueFromString:[assocConstantInt text]]];
|
||||
ASSIGN(currentAssociation,assoc); };
|
||||
break;
|
||||
}
|
||||
case GSWPageDefTokenType_YES:
|
||||
case GSWPageDefParserTokenType_YES:
|
||||
{
|
||||
{
|
||||
ANTLRDefAST tmp9_AST = ANTLRnullAST;
|
||||
tmp9_AST = [astFactory create:[self LT:1]];
|
||||
[astFactory addASTChild:tmp9_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_YES];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_YES];
|
||||
{ GSWAssociation* assoc=[GSWAssociation associationWithValue:[NSNumber numberWithBool:YES]];
|
||||
ASSIGN(currentAssociation,assoc); };
|
||||
break;
|
||||
}
|
||||
case GSWPageDefTokenType_NO:
|
||||
case GSWPageDefParserTokenType_NO:
|
||||
{
|
||||
{
|
||||
ANTLRDefAST tmp10_AST = ANTLRnullAST;
|
||||
tmp10_AST = [astFactory create:[self LT:1]];
|
||||
[astFactory addASTChild:tmp10_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_NO];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_NO];
|
||||
{ GSWAssociation* assoc=[GSWAssociation associationWithValue:[NSNumber numberWithBool:NO]];
|
||||
ASSIGN(currentAssociation,assoc); };
|
||||
break;
|
||||
}
|
||||
case GSWPageDefTokenType_STRING:
|
||||
case GSWPageDefParserTokenType_STRING:
|
||||
{
|
||||
assocConstantString = [self LT:1];
|
||||
{
|
||||
assocConstantString_AST = [astFactory create:assocConstantString];
|
||||
[astFactory addASTChild:assocConstantString_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_STRING];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_STRING];
|
||||
{ GSWAssociation* assoc=[GSWAssociation associationWithValue:[self unescapedString:[[[assocConstantString text] stringWithoutPrefix:@"\""] stringWithoutSuffix:@"\""]]];
|
||||
ASSIGN(currentAssociation,assoc); };
|
||||
break;
|
||||
}
|
||||
case GSWPageDefTokenType_HEXNUM:
|
||||
case GSWPageDefParserTokenType_HEXNUM:
|
||||
{
|
||||
assocConstantHexNum = [self LT:1];
|
||||
{
|
||||
assocConstantHexNum_AST = [astFactory create:assocConstantHexNum];
|
||||
[astFactory addASTChild:assocConstantHexNum_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_HEXNUM];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_HEXNUM];
|
||||
{ GSWAssociation* assoc=[GSWAssociation associationWithValue:[NSNumber valueFromString:[assocConstantHexNum text]]];
|
||||
ASSIGN(currentAssociation,assoc); };
|
||||
break;
|
||||
|
@ -517,27 +517,28 @@
|
|||
{
|
||||
switch ( [self LA:1])
|
||||
{
|
||||
case GSWPageDefTokenType_CIRC:
|
||||
case GSWPageDefParserTokenType_CIRC:
|
||||
{
|
||||
{
|
||||
ANTLRDefAST tmp11_AST = ANTLRnullAST;
|
||||
tmp11_AST = [astFactory create:[self LT:1]];
|
||||
[astFactory addASTChild:tmp11_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_CIRC];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_CIRC];
|
||||
break;
|
||||
}
|
||||
case GSWPageDefTokenType_TILDE:
|
||||
case GSWPageDefParserTokenType_TILDE:
|
||||
{
|
||||
{
|
||||
ANTLRDefAST tmp12_AST = ANTLRnullAST;
|
||||
tmp12_AST = [astFactory create:[self LT:1]];
|
||||
[astFactory addASTChild:tmp12_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_TILDE];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_TILDE];
|
||||
break;
|
||||
}
|
||||
case GSWPageDefTokenType_IDENT:
|
||||
case GSWPageDefParserTokenType_IDENT:
|
||||
case GSWPageDefParserTokenType_IDENTREF:
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -548,30 +549,64 @@
|
|||
}
|
||||
}
|
||||
{
|
||||
switch ( [self LA:1])
|
||||
{
|
||||
ANTLRDefAST tmp13_AST = ANTLRnullAST;
|
||||
tmp13_AST = [astFactory create:[self LT:1]];
|
||||
[astFactory addASTChild:tmp13_AST in:currentAST];
|
||||
case GSWPageDefParserTokenType_IDENT:
|
||||
{
|
||||
{
|
||||
ANTLRDefAST tmp13_AST = ANTLRnullAST;
|
||||
tmp13_AST = [astFactory create:[self LT:1]];
|
||||
[astFactory addASTChild:tmp13_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefParserTokenType_IDENT];
|
||||
break;
|
||||
}
|
||||
case GSWPageDefParserTokenType_IDENTREF:
|
||||
{
|
||||
{
|
||||
ANTLRDefAST tmp14_AST = ANTLRnullAST;
|
||||
tmp14_AST = [astFactory create:[self LT:1]];
|
||||
[astFactory addASTChild:tmp14_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefParserTokenType_IDENTREF];
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
[ANTLRNoViableAltException raiseWithToken:[self LT:1]];
|
||||
}
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_IDENT];
|
||||
}
|
||||
{
|
||||
do
|
||||
{
|
||||
if (([self LA:1]==GSWPageDefTokenType_PIDENT))
|
||||
switch ( [self LA:1])
|
||||
{
|
||||
case GSWPageDefParserTokenType_PIDENT:
|
||||
{
|
||||
{
|
||||
ANTLRDefAST tmp14_AST = ANTLRnullAST;
|
||||
tmp14_AST = [astFactory create:[self LT:1]];
|
||||
[astFactory addASTChild:tmp14_AST in:currentAST];
|
||||
ANTLRDefAST tmp15_AST = ANTLRnullAST;
|
||||
tmp15_AST = [astFactory create:[self LT:1]];
|
||||
[astFactory addASTChild:tmp15_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefTokenType_PIDENT];
|
||||
[self matchTokenType:GSWPageDefParserTokenType_PIDENT];
|
||||
break;
|
||||
}
|
||||
else
|
||||
case GSWPageDefParserTokenType_PIDENTREF:
|
||||
{
|
||||
{
|
||||
ANTLRDefAST tmp16_AST = ANTLRnullAST;
|
||||
tmp16_AST = [astFactory create:[self LT:1]];
|
||||
[astFactory addASTChild:tmp16_AST in:currentAST];
|
||||
}
|
||||
[self matchTokenType:GSWPageDefParserTokenType_PIDENTREF];
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
goto _loop28;
|
||||
}
|
||||
|
||||
}
|
||||
} while (YES);
|
||||
_loop28:;
|
||||
}
|
||||
|
@ -608,7 +643,9 @@ static CONST NSString* GSWPageDefParser___tokenNames[] = {
|
|||
@"HEXNUM",
|
||||
@"CIRC",
|
||||
@"TILDE",
|
||||
@"IDENTREF",
|
||||
@"PIDENT",
|
||||
@"PIDENTREF",
|
||||
@"SL_COMMENT",
|
||||
@"ML_COMMENT",
|
||||
@"POINT",
|
||||
|
|
|
@ -41,10 +41,11 @@ static char rcsId[] = "$Id$";
|
|||
-(id)initWithPath:(NSString*)path_
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"path_=%@",path_);
|
||||
if ((self=[super initWithPath:path_]))
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return nil;
|
||||
};
|
||||
|
|
|
@ -152,12 +152,16 @@ static char rcsId[] = "$Id$";
|
|||
name=[self nameInContext:context];
|
||||
NSDebugMLLog(@"gswdync",@"name=%@",name);
|
||||
formValue=[request formValueForKey:name];
|
||||
NSDebugMLLog(@"gswdync",@"formValue=%@",formValue);
|
||||
valueValue=[_value valueInComponent:component];
|
||||
NSDebugMLLog(@"gswdync",@"valueValue=%@",valueValue);
|
||||
//TODO if checked !
|
||||
isEqual=SBIsValueEqual(formValue,valueValue);
|
||||
NSDebugMLLog(@"gswdync",@"isEqual=%s",(isEqual ? "YES" : "NO"));
|
||||
if (isEqual)
|
||||
{
|
||||
checkChecked=YES;
|
||||
NSDebugMLLog(@"gswdync",@"_selection=%@",_selection);
|
||||
if (_selection)
|
||||
{
|
||||
if (!WOStrictFlag)
|
||||
|
@ -178,11 +182,18 @@ static char rcsId[] = "$Id$";
|
|||
[_selection setValue:valueValue
|
||||
inComponent:component];
|
||||
};
|
||||
}
|
||||
else if (_checked)
|
||||
{
|
||||
if ([formValue caseInsensitiveCompare:@"on"]==NSOrderedSame
|
||||
|| [formValue caseInsensitiveCompare:@"yes"]==NSOrderedSame)
|
||||
checkChecked=YES;
|
||||
};
|
||||
if (_checked)
|
||||
{
|
||||
id checkedValue=[NSNumber numberWithBool:checkChecked];
|
||||
NSDebugMLLog(@"gswdync",@"checkedValue=%@",checkedValue);
|
||||
NSDebugMLLog(@"gswdync",@"_checked=%@",_checked);
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
NS_DURING
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWRequest.h - GSWeb: Class GSWRequest
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWRequest.h - <title>GSWeb: Class GSWRequest</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Jan 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -31,40 +37,40 @@
|
|||
@interface GSWRequest : NSObject <NSCopying>
|
||||
{
|
||||
@private
|
||||
NSString* method;
|
||||
GSWDynamicURLString* uri;
|
||||
NSString* httpVersion;
|
||||
NSDictionary* headers;
|
||||
NSData* content;
|
||||
NSDictionary* userInfo;
|
||||
NSStringEncoding defaultFormValueEncoding;
|
||||
NSStringEncoding formValueEncoding;
|
||||
NSDictionary* formValues;
|
||||
NSDictionary* cookie;
|
||||
NSString* applicationURLPrefix;
|
||||
NSArray* requestHandlerPathArray;
|
||||
NSArray* browserLanguages;
|
||||
int requestType;
|
||||
BOOL isUsingWebServer;
|
||||
BOOL formValueEncodingDetectionEnabled;
|
||||
int applicationNumber;
|
||||
NSString* _method;
|
||||
GSWDynamicURLString* _uri;
|
||||
NSString* _httpVersion;
|
||||
NSDictionary* _headers;
|
||||
NSData* _content;
|
||||
NSDictionary* _userInfo;
|
||||
NSStringEncoding _defaultFormValueEncoding;
|
||||
NSStringEncoding _formValueEncoding;
|
||||
NSDictionary* _formValues;
|
||||
NSDictionary* _cookie;
|
||||
NSString* _applicationURLPrefix;
|
||||
NSArray* _requestHandlerPathArray;
|
||||
NSArray* _browserLanguages;
|
||||
int _requestType;
|
||||
BOOL _isUsingWebServer;
|
||||
BOOL _formValueEncodingDetectionEnabled;
|
||||
int _applicationNumber;
|
||||
};
|
||||
|
||||
-(id)initWithMethod:(NSString*)method_
|
||||
uri:(NSString*)url_
|
||||
httpVersion:(NSString*)httpVersion_
|
||||
headers:(NSDictionary*)headers_
|
||||
content:(NSData*)content_
|
||||
userInfo:(NSDictionary*)userInfo_;
|
||||
-(id)initWithMethod:(NSString*)aMethod
|
||||
uri:(NSString*)anURL
|
||||
httpVersion:(NSString*)aVersion
|
||||
headers:(NSDictionary*)headers
|
||||
content:(NSData*)content
|
||||
userInfo:(NSDictionary*)userInfo;
|
||||
|
||||
-(void)dealloc;
|
||||
-(id)copyWithZone:(NSZone*)zone_;
|
||||
-(id)copyWithZone:(NSZone*)zone;
|
||||
|
||||
-(NSData*)content;
|
||||
-(NSDictionary*)headers;
|
||||
-(NSString*)headerForKey:(NSString*)key_;
|
||||
-(NSString*)headerForKey:(NSString*)key;
|
||||
-(NSArray*)headerKeys;
|
||||
-(NSArray*)headersForKey:(NSString*)key_;
|
||||
-(NSArray*)headersForKey:(NSString*)key;
|
||||
-(NSString*)httpVersion;
|
||||
-(NSString*)method;
|
||||
-(NSArray*)browserLanguages;
|
||||
|
@ -84,16 +90,16 @@
|
|||
//====================================================================
|
||||
@interface GSWRequest (GSWFormValueReporting)
|
||||
|
||||
-(void)setDefaultFormValueEncoding:(NSStringEncoding)encoding_;
|
||||
-(void)setDefaultFormValueEncoding:(NSStringEncoding)encoding;
|
||||
-(NSStringEncoding)defaultFormValueEncoding;
|
||||
|
||||
-(void)setFormValueEncodingDetectionEnabled:(BOOL)flag_;
|
||||
-(void)setFormValueEncodingDetectionEnabled:(BOOL)flag;
|
||||
-(BOOL)isFormValueEncodingDetectionEnabled;
|
||||
|
||||
-(NSStringEncoding)formValueEncoding;
|
||||
-(NSArray*)formValueKeys;
|
||||
-(NSArray*)formValuesForKey:(NSString*)key_;
|
||||
-(id)formValueForKey:(NSString*)key_; // return id because GSWFileUpload
|
||||
-(NSArray*)formValuesForKey:(NSString*)key;
|
||||
-(id)formValueForKey:(NSString*)key; // return id because GSWFileUpload
|
||||
|
||||
-(NSDictionary*)formValues;
|
||||
@end
|
||||
|
@ -108,8 +114,8 @@
|
|||
//NDFN
|
||||
-(void)setCookieFromHeaders;
|
||||
|
||||
-(NSArray*)cookieValuesForKey:(NSString*)key_;
|
||||
-(NSString*)cookieValueForKey:(NSString*)key_;
|
||||
-(NSArray*)cookieValuesForKey:(NSString*)key;
|
||||
-(NSString*)cookieValueForKey:(NSString*)key;
|
||||
-(NSDictionary*)cookieValues;
|
||||
|
||||
-(NSDictionary*)_initCookieDictionary;
|
||||
|
@ -129,9 +135,9 @@
|
|||
@end
|
||||
//====================================================================
|
||||
@interface GSWRequest (GSWRequestB)
|
||||
-(NSDictionary*)_extractValuesFromFormData:(NSData*)_formData
|
||||
withEncoding:(NSStringEncoding)_encoding;
|
||||
-(NSStringEncoding)_formValueEncodingFromFormData:(NSData*)_formData;
|
||||
-(NSDictionary*)_extractValuesFromFormData:(NSData*)formData
|
||||
withEncoding:(NSStringEncoding)encoding;
|
||||
-(NSStringEncoding)_formValueEncodingFromFormData:(NSData*)formData;
|
||||
-(NSData*)_formData;
|
||||
-(NSString*)_contentType;
|
||||
-(NSString*)_urlQueryString;
|
||||
|
@ -147,14 +153,14 @@
|
|||
-(BOOL)_isSessionIDinRequest;
|
||||
-(BOOL)_isSessionIDinCookies;
|
||||
-(BOOL)_isSessionIDinFormValues;
|
||||
-(id)_completeURLWithRequestHandlerKey:(NSString*)_key
|
||||
path:(NSString*)_path
|
||||
queryString:(NSString*)_queryString
|
||||
isSecure:(BOOL)_isSecure
|
||||
port:(int)_port;
|
||||
-(GSWDynamicURLString*)_urlWithRequestHandlerKey:(NSString*)_key
|
||||
path:(NSString*)_path
|
||||
queryString:(NSString*)_queryString;
|
||||
-(id)_completeURLWithRequestHandlerKey:(NSString*)key
|
||||
path:(NSString*)path
|
||||
queryString:(NSString*)queryString
|
||||
isSecure:(BOOL)isSecure
|
||||
port:(int)port;
|
||||
-(GSWDynamicURLString*)_urlWithRequestHandlerKey:(NSString*)key
|
||||
path:(NSString*)path
|
||||
queryString:(NSString*)queryString;
|
||||
-(GSWDynamicURLString*)_applicationURLPrefix;
|
||||
-(NSDictionary*)_formValues;
|
||||
-(void)_getFormValuesFromURLEncoding;
|
||||
|
@ -164,26 +170,26 @@
|
|||
//====================================================================
|
||||
@interface GSWRequest (GSWRequestH)
|
||||
-(void)_getFormValuesFromMultipartFormData;
|
||||
-(NSArray*)_decodeMultipartBody:(NSData*)_body
|
||||
boundary:(NSString*)_boundary;
|
||||
-(NSArray*)_parseData:(NSData*)_data;
|
||||
-(NSDictionary*)_parseOneHeader:(NSString*)_header;
|
||||
-(NSArray*)_decodeMultipartBody:(NSData*)body
|
||||
boundary:(NSString*)boundary;
|
||||
-(NSArray*)_parseData:(NSData*)data;
|
||||
-(NSDictionary*)_parseOneHeader:(NSString*)header;
|
||||
@end
|
||||
//====================================================================
|
||||
@interface GSWRequest (GSWRequestI)
|
||||
-(id)nonNilFormValueForKey:(NSString*)_key;
|
||||
-(id)nonNilFormValueForKey:(NSString*)key;
|
||||
@end
|
||||
//====================================================================
|
||||
@interface GSWRequest (GSWRequestJ)
|
||||
-(id)dictionaryWithKeys:(id)_unknown;
|
||||
-(id)dictionaryWithKeys:(id)unknown;
|
||||
-(NSString*)selectedButtonName;
|
||||
-(id)valueFromImageMapNamed:(NSString*)_name;
|
||||
-(id)valueFromImageMapNamed:(NSString*)_name
|
||||
inFramework:(NSString*)_framework;
|
||||
-(id)valueFromImageMap:(id)_unknown;
|
||||
-(id)valueFromImageMapNamed:(NSString*)aName;
|
||||
-(id)valueFromImageMapNamed:(NSString*)aName
|
||||
inFramework:(NSString*)aFramework;
|
||||
-(id)valueFromImageMap:(id)unknown;
|
||||
-(id)yCoord;
|
||||
-(id)xCoord;
|
||||
-(id)formKeyWithSuffix:(NSString*)_suffix;
|
||||
-(id)formKeyWithSuffix:(NSString*)suffix;
|
||||
@end
|
||||
//====================================================================
|
||||
@interface GSWRequest (GSWRequestK)
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -60,6 +60,7 @@ NSString* localNotFoundMarker=@"NOTFOUND";
|
|||
//NSDebugMLLog(@"resmanager",@"mainBundle:%@",mainBundle);
|
||||
bundlePath=[mainBundle bundlePath];
|
||||
//NSDebugMLLog(@"resmanager",@"bundlePath:%@",bundlePath);
|
||||
printf("bundlePath:%s",[bundlePath lossyCString]);
|
||||
deployedBundle=[GSWDeployedBundle bundleWithPath:bundlePath];
|
||||
//NSDebugMLLog(@"resmanager",@"deployedBundle:%@",deployedBundle);
|
||||
|
||||
|
@ -1594,6 +1595,7 @@ NSString* localNotFoundMarker=@"NOTFOUND";
|
|||
NSDebugMLLog(@"resmanager",@"wrapperName=%@",wrapperName);
|
||||
baseURL=[applicationBaseURL stringByAppendingFormat:@"/%@",wrapperName];
|
||||
NSDebugMLLog(@"resmanager",@"baseURL=%@",baseURL);
|
||||
NSDebugMLLog(@"resmanager",@"[globalAppProjectBundle bundlePath]=%@",[globalAppProjectBundle bundlePath]);
|
||||
globalAppGSWBundle=[[GSWBundle alloc]initWithPath:[globalAppProjectBundle bundlePath]
|
||||
baseURL:baseURL];
|
||||
NSDebugMLLog(@"resmanager",@"globalAppGSWBundle=%@",globalAppGSWBundle);
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/** GSWResponse.h - GSWeb: Class GSWResponse
|
||||
/** GSWResponse.h - <title>GSWeb: Class GSWResponse</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,6 +24,7 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
</license>
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
@ -35,17 +41,17 @@
|
|||
@interface GSWResponse : NSObject <NSCopying>
|
||||
{
|
||||
@private
|
||||
NSString* httpVersion;
|
||||
unsigned int status;
|
||||
NSMutableDictionary* headers;
|
||||
NSMutableArray* contentFaults;
|
||||
NSMutableData* contentData;
|
||||
NSStringEncoding contentEncoding;
|
||||
NSDictionary* userInfo;
|
||||
NSMutableArray* cookies;
|
||||
BOOL isClientCachingDisabled;
|
||||
BOOL contentFaultsHaveBeenResolved;
|
||||
BOOL isFinalizeInContextHasBeenCalled;
|
||||
NSString* _httpVersion;
|
||||
unsigned int _status;
|
||||
NSMutableDictionary* _headers;
|
||||
NSMutableArray* _contentFaults;
|
||||
NSMutableData* _contentData;
|
||||
NSStringEncoding _contentEncoding;
|
||||
NSDictionary* _userInfo;
|
||||
NSMutableArray* _cookies;
|
||||
BOOL _isClientCachingDisabled;
|
||||
BOOL _contentFaultsHaveBeenResolved;
|
||||
BOOL _isFinalizeInContextHasBeenCalled;
|
||||
};
|
||||
|
||||
-(id)init;
|
||||
|
@ -59,9 +65,9 @@
|
|||
-(NSString*)httpVersion;
|
||||
-(void)setContent:(NSData*)someData;
|
||||
-(void)setHeader:(NSString*)header
|
||||
forKey:(NSString*)key;
|
||||
forKey:(NSString*)key;
|
||||
-(void)setHeaders:(NSArray*)headerList
|
||||
forKey:(NSString*)key;
|
||||
forKey:(NSString*)key;
|
||||
-(void)setHeaders:(NSDictionary*)headerList;
|
||||
-(NSMutableDictionary*)headers;
|
||||
-(void)setHTTPVersion:(NSString*)version;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,11 +1,16 @@
|
|||
/* GSWServerSessionStore.h - GSWeb: Class GSWServerSessionStore
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWServerSessionStore.h - <title>GSWeb: Class GSWServerSessionStore</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Mar 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Mar 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,9 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
// $Id$
|
||||
</license>
|
||||
**/
|
||||
|
||||
#ifndef _GSWServerSessionStore_h__
|
||||
#define _GSWServerSessionStore_h__
|
||||
|
@ -30,23 +34,23 @@
|
|||
//====================================================================
|
||||
@interface GSWServerSessionStore : GSWSessionStore
|
||||
{
|
||||
NSMutableDictionary* sessions;
|
||||
GSWSessionTimeOutManager* timeOut_manager;
|
||||
NSMutableDictionary* _sessions;
|
||||
GSWSessionTimeOutManager* _timeOutManager;
|
||||
};
|
||||
|
||||
-(id)init;
|
||||
-(void)dealloc;
|
||||
-(id)description;
|
||||
-(void)saveSessionForContext:(GSWContext*)context_;
|
||||
-(GSWSession*)restoreSessionWithID:(NSString*)_sessionID
|
||||
request:(GSWRequest*)request_;
|
||||
-(GSWSession*)removeSessionWithID:(NSString*)_sessionID;
|
||||
-(void)saveSessionForContext:(GSWContext*)aContext;
|
||||
-(GSWSession*)restoreSessionWithID:(NSString*)aSessionID
|
||||
request:(GSWRequest*)aRequest;
|
||||
-(GSWSession*)removeSessionWithID:(NSString*)aSessionID;
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWServerSessionStore (GSWServerSessionStoreInfo)
|
||||
-(BOOL)containsSessionID:(NSString*)sessionID_;
|
||||
-(BOOL)containsSessionID:(NSString*)aSessionID;
|
||||
-(NSArray *)allSessionIDs;
|
||||
@end
|
||||
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWServerSessionStore.m - GSWeb: Class GSWServerSessionStore
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWServerSessionStore.m - <title>GSWeb: Class GSWServerSessionStore</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Mar 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Mar 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
static char rcsId[] = "$Id$";
|
||||
|
||||
|
@ -32,13 +38,13 @@ static char rcsId[] = "$Id$";
|
|||
//OK
|
||||
LOGObjectFnStart();
|
||||
if ((self=[super init]))
|
||||
{
|
||||
timeOut_manager=[GSWSessionTimeOutManager new];
|
||||
sessions=[NSMutableDictionary new];
|
||||
[timeOut_manager setCallBack:@selector(removeSessionWithID:)
|
||||
target:self];
|
||||
[timeOut_manager startHandleTimerRefusingSessions];
|
||||
};
|
||||
{
|
||||
_timeOutManager=[GSWSessionTimeOutManager new];
|
||||
_sessions=[NSMutableDictionary new];
|
||||
[_timeOutManager setCallBack:@selector(removeSessionWithID:)
|
||||
target:self];
|
||||
[_timeOutManager startHandleTimerRefusingSessions];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
@ -46,8 +52,8 @@ static char rcsId[] = "$Id$";
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
DESTROY(sessions);
|
||||
DESTROY(timeOut_manager);
|
||||
DESTROY(_sessions);
|
||||
DESTROY(_timeOutManager);
|
||||
[super dealloc];
|
||||
};
|
||||
|
||||
|
@ -55,98 +61,96 @@ static char rcsId[] = "$Id$";
|
|||
-(id)description
|
||||
{
|
||||
return [NSString stringWithFormat:@"<%s: %p sessions=%@ manager=%@>",
|
||||
object_get_class_name(self),
|
||||
(void*)self,
|
||||
sessions,
|
||||
timeOut_manager];
|
||||
object_get_class_name(self),
|
||||
(void*)self,
|
||||
_sessions,
|
||||
_timeOutManager];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)saveSessionForContext:(GSWContext*)context_
|
||||
-(void)saveSessionForContext:(GSWContext*)aContext
|
||||
{
|
||||
//OK
|
||||
GSWSession* _session=nil;
|
||||
NSString* _sessionID=nil;
|
||||
NSTimeInterval _sessionTimeOut=0;
|
||||
BOOL _sessionIsTerminating=NO;
|
||||
GSWSession* session=nil;
|
||||
NSString* sessionID=nil;
|
||||
NSTimeInterval sessionTimeOut=0;
|
||||
BOOL sessionIsTerminating=NO;
|
||||
LOGObjectFnStart();
|
||||
_session=[context_ existingSession];
|
||||
NSAssert(_session,@"No session!");
|
||||
NSDebugMLLog(@"sessions",@"_session=%@",_session);
|
||||
_sessionIsTerminating=[_session isTerminating]; //TODO
|
||||
[_session setDistributionEnabled:NO];
|
||||
_sessionID=[_session sessionID];
|
||||
NSAssert(_sessionID,@"No _sessionID!");
|
||||
NSDebugMLLog(@"sessions",@"_sessionID=%@",_sessionID);
|
||||
_sessionTimeOut=[_session timeOut];
|
||||
[sessions setObject:_session
|
||||
forKey:_sessionID];
|
||||
NSDebugMLLog(@"sessions",@"_session=%@",_session);
|
||||
NSDebugMLLog(@"sessions",@"_sessionTimeOut=%ld",(long)_sessionTimeOut);
|
||||
[timeOut_manager updateTimeOutForSessionWithID:_sessionID
|
||||
timeOut:_sessionTimeOut];
|
||||
session=[aContext existingSession];
|
||||
NSAssert(session,@"No session!");
|
||||
NSDebugMLLog(@"sessions",@"session=%@",session);
|
||||
sessionIsTerminating=[session isTerminating]; //TODO
|
||||
[session setDistributionEnabled:NO];
|
||||
sessionID=[session sessionID];
|
||||
NSAssert(sessionID,@"No _sessionID!");
|
||||
NSDebugMLLog(@"sessions",@"_sessionID=%@",sessionID);
|
||||
sessionTimeOut=[session timeOut];
|
||||
[_sessions setObject:session
|
||||
forKey:sessionID];
|
||||
NSDebugMLLog(@"sessions",@"session=%@",session);
|
||||
NSDebugMLLog(@"sessions",@"sessionTimeOut=%ld",(long)sessionTimeOut);
|
||||
[_timeOutManager updateTimeOutForSessionWithID:sessionID
|
||||
timeOut:sessionTimeOut];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)restoreSessionWithID:(NSString*)_sessionID
|
||||
request:(GSWRequest*)request_
|
||||
-(id)restoreSessionWithID:(NSString*)aSessionID
|
||||
request:(GSWRequest*)aRequest
|
||||
{
|
||||
GSWSession* _session=nil;
|
||||
GSWSession* session=nil;
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"sessions",@"_sessionID=%@",_sessionID);
|
||||
NSDebugMLLog(@"sessions",@"sessions=%@",sessions);
|
||||
_session=[sessions objectForKey:_sessionID];
|
||||
NSDebugMLLog(@"sessions",@"_session=%@",_session);
|
||||
NSDebugMLLog(@"sessions",@"aSessionID=%@",aSessionID);
|
||||
NSDebugMLLog(@"sessions",@"sessions=%@",_sessions);
|
||||
session=[_sessions objectForKey:aSessionID];
|
||||
NSDebugMLLog(@"sessions",@"session=%@",session);
|
||||
LOGObjectFnStop();
|
||||
return _session;
|
||||
return session;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWSession*)removeSessionWithID:(NSString*)_sessionID
|
||||
-(GSWSession*)removeSessionWithID:(NSString*)aSessionID
|
||||
{
|
||||
//OK
|
||||
GSWSession* _session=nil;
|
||||
BOOL _isSessionIDCheckedOut=NO;
|
||||
GSWSession* session=nil;
|
||||
BOOL isSessionIDCheckedOut=NO;
|
||||
LOGObjectFnStart();
|
||||
_isSessionIDCheckedOut=[self _isSessionIDCheckedOut:_sessionID];
|
||||
if (_isSessionIDCheckedOut)
|
||||
{
|
||||
return nil;//Used Session
|
||||
}
|
||||
isSessionIDCheckedOut=[self _isSessionIDCheckedOut:aSessionID];
|
||||
if (isSessionIDCheckedOut)
|
||||
{
|
||||
return nil;//Used Session
|
||||
}
|
||||
else
|
||||
{
|
||||
_session=[sessions objectForKey:_sessionID];
|
||||
NSDebugMLLog(@"sessions",@"_session=%@",_session);
|
||||
[_session retain]; //to avoid discarding it now
|
||||
[_session autorelease]; //discard it 'later'
|
||||
[sessions removeObjectForKey:_sessionID];
|
||||
};
|
||||
{
|
||||
session=[_sessions objectForKey:aSessionID];
|
||||
NSDebugMLLog(@"sessions",@"session=%@",session);
|
||||
[session retain]; //to avoid discarding it now
|
||||
[session autorelease]; //discard it 'later'
|
||||
[_sessions removeObjectForKey:aSessionID];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return _session;
|
||||
return session;
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWServerSessionStore (GSWServerSessionStoreInfo)
|
||||
-(BOOL)containsSessionID:(NSString*)sessionID_
|
||||
-(BOOL)containsSessionID:(NSString*)aSessionID
|
||||
{
|
||||
BOOL contain = NO;
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
if([sessions objectForKey:sessionID_])
|
||||
{
|
||||
contain = YES;
|
||||
}
|
||||
if([_sessions objectForKey:aSessionID])
|
||||
contain = YES;
|
||||
LOGObjectFnStop();
|
||||
return contain;
|
||||
};
|
||||
|
||||
-(NSArray *)allSessionIDs
|
||||
{
|
||||
return [sessions allKeys];
|
||||
return [_sessions allKeys];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWSession.h - GSWeb: Class GSWSession
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWSession.h - <title>GSWeb: Class GSWSession</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Jan 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -29,28 +35,28 @@
|
|||
@interface GSWSession : NSObject <NSCoding,NSCopying>
|
||||
{
|
||||
@private
|
||||
NSString* sessionID;
|
||||
NSAutoreleasePool* autoreleasePool;
|
||||
NSTimeInterval timeOut;
|
||||
NSMutableArray* contextArrayStack;
|
||||
NSMutableDictionary* contextRecords;
|
||||
EOEditingContext* editingContext;
|
||||
NSArray* languages;
|
||||
NSMutableDictionary* componentState;
|
||||
NSDate* birthDate;
|
||||
NSMutableArray* statistics;
|
||||
NSMutableString* formattedStatistics;
|
||||
GSWContext* currentContext;
|
||||
NSMutableDictionary* permanentPageCache;
|
||||
NSMutableArray* permanentContextIDArray;
|
||||
int contextCounter;
|
||||
int requestCounter;
|
||||
BOOL isAllowedToViewStatistics;
|
||||
BOOL isTerminating;
|
||||
BOOL isDistributionEnabled;
|
||||
BOOL storesIDsInCookies;
|
||||
BOOL storesIDsInURLs;
|
||||
BOOL hasSessionLockedEditingContext;
|
||||
NSString* _sessionID;
|
||||
NSAutoreleasePool* _autoreleasePool;
|
||||
NSTimeInterval _timeOut;
|
||||
NSMutableArray* _contextArrayStack;
|
||||
NSMutableDictionary* _contextRecords;
|
||||
EOEditingContext* _editingContext;
|
||||
NSArray* _languages;
|
||||
NSMutableDictionary* _componentState;
|
||||
NSDate* _birthDate;
|
||||
NSMutableArray* _statistics;
|
||||
NSMutableString* _formattedStatistics;
|
||||
GSWContext* _currentContext;
|
||||
NSMutableDictionary* _permanentPageCache;
|
||||
NSMutableArray* _permanentContextIDArray;
|
||||
int _contextCounter;
|
||||
int _requestCounter;
|
||||
BOOL _isAllowedToViewStatistics;
|
||||
BOOL _isTerminating;
|
||||
BOOL _isDistributionEnabled;
|
||||
BOOL _storesIDsInCookies;
|
||||
BOOL _storesIDsInURLs;
|
||||
BOOL _hasSessionLockedEditingContext;
|
||||
};
|
||||
|
||||
|
||||
|
@ -60,12 +66,12 @@
|
|||
|
||||
-(NSString*)domainForIDCookies;
|
||||
-(BOOL)storesIDsInURLs;
|
||||
-(void)setStoresIDsInURLs:(BOOL)flag_;
|
||||
-(void)setStoresIDsInURLs:(BOOL)flag;
|
||||
-(NSDate*)expirationDateForIDCookies;
|
||||
-(BOOL)storesIDsInCookies;
|
||||
-(void)setStoresIDsInCookies:(BOOL)flag_;
|
||||
-(void)setStoresIDsInCookies:(BOOL)flag;
|
||||
-(BOOL)isDistributionEnabled;
|
||||
-(void)setDistributionEnabled:(BOOL)flag_;
|
||||
-(void)setDistributionEnabled:(BOOL)flag;
|
||||
-(NSString*)sessionID;
|
||||
-(NSString*)description;
|
||||
|
||||
|
@ -74,7 +80,7 @@
|
|||
|
||||
//====================================================================
|
||||
@interface GSWSession (GSWSessionA)
|
||||
-(id)_initWithSessionID:(NSString*)_sessionID;
|
||||
-(id)_initWithSessionID:(NSString*)aSessionID;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -91,32 +97,32 @@
|
|||
//====================================================================
|
||||
@interface GSWSession (GSWSessionDebugging)
|
||||
|
||||
-(void)debugWithFormat:(NSString*)format_, ...;
|
||||
-(void)debugWithFormat:(NSString*)format,...;
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWSession (GSWSessionD)
|
||||
|
||||
-(void)_debugWithString:(NSString*)_string;
|
||||
-(void)_debugWithString:(NSString*)string;
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWSession (GSWPageManagement)
|
||||
|
||||
-(void)savePage:(GSWComponent*)page_;
|
||||
-(GSWComponent*)restorePageForContextID:(NSString*)contextID_;
|
||||
-(void)savePage:(GSWComponent*)page;
|
||||
-(GSWComponent*)restorePageForContextID:(NSString*)aContextID;
|
||||
-(uint)permanentPageCacheSize;
|
||||
-(void)savePageInPermanentCache:(GSWComponent*)page_;
|
||||
-(void)savePageInPermanentCache:(GSWComponent*)page;
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWSession (GSWSessionF)
|
||||
|
||||
-(void)clearCookieFromResponse:(GSWResponse*)response_;
|
||||
-(void)appendCookieToResponse:(GSWResponse*)response_;
|
||||
-(void)clearCookieFromResponse:(GSWResponse*)aResponse;
|
||||
-(void)appendCookieToResponse:(GSWResponse*)aResponse;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -125,32 +131,32 @@
|
|||
|
||||
-(void)_releaseAutoreleasePool;
|
||||
-(void)_createAutoreleasePool;
|
||||
-(GSWComponent*)_permanentPageWithContextID:(NSString*)contextID_;
|
||||
-(GSWComponent*)_permanentPageWithContextID:(NSString*)aContextID;
|
||||
-(NSMutableDictionary*)_permanentPageCache;
|
||||
-(GSWContext*)_contextIDMatchingContextID:(NSString*)contextID_
|
||||
requestSenderID:(NSString*)_senderID;
|
||||
-(GSWContext*)_contextIDMatchingContextID:(NSString*)aContextID
|
||||
requestSenderID:(NSString*)aSenderID;
|
||||
-(void)_rearrangeContextArrayStack;
|
||||
-(NSArray*)_contextArrayForContextID:(NSString*)contextID_
|
||||
stackIndex:(unsigned int*)pStackIndex_
|
||||
contextArrayIndex:(unsigned int*)pContextArrayIndex_;
|
||||
-(void)_replacePage:(GSWComponent*)_page;
|
||||
-(void)_savePage:(GSWComponent*)_page
|
||||
forChange:(BOOL)_forChange;
|
||||
-(NSArray*)_contextArrayForContextID:(NSString*)aContextID
|
||||
stackIndex:(unsigned int*)pStackIndex
|
||||
contextArrayIndex:(unsigned int*)pContextArrayIndex;
|
||||
-(void)_replacePage:(GSWComponent*)page;
|
||||
-(void)_savePage:(GSWComponent*)page
|
||||
forChange:(BOOL)forChange;
|
||||
-(uint)pageCacheSize;
|
||||
-(void)_saveCurrentPage;
|
||||
-(int)_requestCounter;
|
||||
-(void)_contextDidIncrementContextID;
|
||||
-(int)_contextCounter;
|
||||
-(void)_setContext:(GSWContext*)context_;
|
||||
-(void)sleepInContext:(GSWContext*)context_;
|
||||
-(void)awakeInContext:(GSWContext*)context_;
|
||||
-(void)_setContext:(GSWContext*)aContext;
|
||||
-(void)sleepInContext:(GSWContext*)aContext;
|
||||
-(void)awakeInContext:(GSWContext*)aContext;
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWSession (GSWLocalization)
|
||||
|
||||
-(void)setLanguages:(NSArray*)languages_;
|
||||
-(void)setLanguages:(NSArray*)languages;
|
||||
-(NSArray*)languages;
|
||||
|
||||
@end
|
||||
|
@ -159,10 +165,10 @@
|
|||
@interface GSWSession (GSWComponentStateManagement)
|
||||
|
||||
-(void)setObject:(id)object
|
||||
forKey:(NSString*)key_;
|
||||
forKey:(NSString*)key;
|
||||
|
||||
-(id)objectForKey:(NSString*)key_;
|
||||
-(void)removeObjectForKey:(NSString*)key_;
|
||||
-(id)objectForKey:(NSString*)key;
|
||||
-(void)removeObjectForKey:(NSString*)key;
|
||||
-(NSMutableDictionary*)componentState;//NDFN
|
||||
@end
|
||||
|
||||
|
@ -179,14 +185,14 @@
|
|||
|
||||
-(GSWContext*)context;
|
||||
-(void)awake;
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext *)context_;
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)aRequest
|
||||
inContext:(GSWContext*)aContext;
|
||||
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)aRequest
|
||||
inContext:(GSWContext*)aContext;
|
||||
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext;
|
||||
|
||||
-(void)sleep;
|
||||
|
||||
|
@ -225,7 +231,7 @@
|
|||
|
||||
//====================================================================
|
||||
@interface GSWSession (GSWSessionClassA)
|
||||
+(void)__setContextCounterIncrementingEnabled:(BOOL)flag_;
|
||||
+(void)__setContextCounterIncrementingEnabled:(BOOL)flag;
|
||||
+(int)__counterIncrementingEnabledFlag;
|
||||
|
||||
@end
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,11 +1,16 @@
|
|||
/* GSWSessionStore.h - GSWeb: Class GSWSessionStore
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWSessionStore.m - <title>GSWeb: Class GSWSessionStore</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Jan 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -29,10 +35,10 @@
|
|||
|
||||
@interface GSWSessionStore : NSObject <NSLocking>
|
||||
{
|
||||
NSMutableSet* usedIDs;
|
||||
NSRecursiveLock* lock;
|
||||
NSMutableSet* _usedIDs;
|
||||
NSRecursiveLock* _lock;
|
||||
#ifndef NDEBUG
|
||||
int lockn;
|
||||
int _lockn;
|
||||
#endif
|
||||
//TODO void* sessionCheckedInCondition;
|
||||
};
|
||||
|
@ -40,18 +46,18 @@
|
|||
-(void)dealloc;
|
||||
-(id)init;
|
||||
|
||||
-(GSWSession*)restoreSessionWithID:(NSString*)sessionID_
|
||||
request:(GSWRequest*)request_;
|
||||
-(void)saveSessionForContext:(GSWContext*)context_;
|
||||
-(GSWSession*)checkOutSessionWithID:(NSString*)sessionID_
|
||||
request:(GSWRequest*)request_;
|
||||
-(void)checkInSessionForContext:(GSWContext*)context_;
|
||||
-(GSWSession*)restoreSessionWithID:(NSString*)aSessionID
|
||||
request:(GSWRequest*)aRequest;
|
||||
-(void)saveSessionForContext:(GSWContext*)aContext;
|
||||
-(GSWSession*)checkOutSessionWithID:(NSString*)aSessionID
|
||||
request:(GSWRequest*)aRequest;
|
||||
-(void)checkInSessionForContext:(GSWContext*)aContext;
|
||||
|
||||
-(void)_checkInSessionForContext:(GSWContext*)context_;
|
||||
-(GSWSession*)_checkOutSessionWithID:(NSString*)sessionID_
|
||||
request:(GSWRequest*)request_;
|
||||
-(void)_checkinSessionID:(NSString*)sessionID_;
|
||||
-(void)_checkoutSessionID:(NSString*)sessionID_;
|
||||
-(void)_checkInSessionForContext:(GSWContext*)aContext;
|
||||
-(GSWSession*)_checkOutSessionWithID:(NSString*)aSessionID
|
||||
request:(GSWRequest*)aRequest;
|
||||
-(void)_checkinSessionID:(NSString*)aSessionID;
|
||||
-(void)_checkoutSessionID:(NSString*)aSessionID;
|
||||
-(void)unlock;
|
||||
-(BOOL)tryLock;
|
||||
-(void)lock;
|
||||
|
@ -65,19 +71,19 @@
|
|||
|
||||
//====================================================================
|
||||
@interface GSWSessionStore (GSWSessionStoreOldFn)
|
||||
+(GSWSessionStore*)cookieSessionStoreWithDistributionDomain:(NSString*)domain_
|
||||
secure:(BOOL)flag_;
|
||||
+(GSWSessionStore*)cookieSessionStoreWithDistributionDomain:(NSString*)aDomain
|
||||
secure:(BOOL)flag;
|
||||
+(GSWSessionStore*)pageSessionStore;
|
||||
+(GSWSessionStore*)serverSessionStore;
|
||||
|
||||
-(GSWSession*)restoreSession;
|
||||
-(void)saveSession:(GSWSession*)session_;
|
||||
-(void)saveSession:(GSWSession*)session;
|
||||
@end
|
||||
*/
|
||||
|
||||
//====================================================================
|
||||
@interface GSWSessionStore (GSWSessionStoreA)
|
||||
-(BOOL)_isSessionIDCheckedOut:(NSString*)sessionID_;
|
||||
-(BOOL)_isSessionIDCheckedOut:(NSString*)aSessionID;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWSessionStore.m - GSWeb: Class GSWSessionStore
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWSessionStore.m - <title>GSWeb: Class GSWSessionStore</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Jan 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
static char rcsId[] = "$Id$";
|
||||
|
||||
|
@ -34,11 +40,11 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
LOGObjectFnStart();
|
||||
if ((self=[super init]))
|
||||
{
|
||||
usedIDs=[NSMutableSet new];
|
||||
lock=[NSRecursiveLock new];
|
||||
[self _validateAPI];
|
||||
};
|
||||
{
|
||||
_usedIDs=[NSMutableSet new];
|
||||
_lock=[NSRecursiveLock new];
|
||||
[self _validateAPI];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
@ -48,214 +54,219 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
GSWLogC("Dealloc GSWSessionStore");
|
||||
GSWLogC("Dealloc GSWSessionStore: usedIDs");
|
||||
DESTROY(usedIDs);
|
||||
DESTROY(_usedIDs);
|
||||
GSWLogC("Dealloc GSWSessionStore: lock");
|
||||
DESTROY(lock);
|
||||
DESTROY(_lock);
|
||||
GSWLogC("Dealloc GSWSessionStore Super");
|
||||
[super dealloc];
|
||||
GSWLogC("End Dealloc GSWSessionStore");
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWSession*)restoreSessionWithID:(NSString*)sessionID_
|
||||
request:(GSWRequest*)request_
|
||||
-(GSWSession*)restoreSessionWithID:(NSString*)aSessionID
|
||||
request:(GSWRequest*)aRequest
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)saveSessionForContext:(GSWContext*)context_
|
||||
-(void)saveSessionForContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWSession*)checkOutSessionWithID:(NSString*)sessionID_
|
||||
request:(GSWRequest*)request_
|
||||
-(GSWSession*)checkOutSessionWithID:(NSString*)aSessionID
|
||||
request:(GSWRequest*)aRequest
|
||||
{
|
||||
GSWSession* _session=nil;
|
||||
BOOL _sessionUsed=YES;
|
||||
GSWSession* session=nil;
|
||||
BOOL sessionUsed=YES;
|
||||
NSDate* limit=[NSDate dateWithTimeIntervalSinceNow:60];
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"sessions",@"sessionID_=%@",sessionID_);
|
||||
NSDebugMLLog(@"sessions",@"usedIDs=%@",usedIDs);
|
||||
NSDebugMLLog(@"sessions",@"aSessionID=%@",aSessionID);
|
||||
NSDebugMLLog(@"sessions",@"usedIDs=%@",_usedIDs);
|
||||
NSDebugMLLog(@"sessions",@"self=%@",self);
|
||||
NSDebugMLLog(@"sessions",@"[NSDate date]=%@",[NSDate date]);
|
||||
NSDebugMLLog(@"sessions",@"limit=%@",limit);
|
||||
NSDebugMLLog(@"sessions",@"[[NSDate date]compare:limit]==NSOrderedAscending=%d",(int)([[NSDate date]compare:limit]==NSOrderedAscending));
|
||||
NSDebugMLLog(@"sessions",@"[[NSDate date]compare:limit]==NSOrderedAscending=%d",
|
||||
(int)([[NSDate date]compare:limit]==NSOrderedAscending));
|
||||
|
||||
|
||||
while(!_session && _sessionUsed && [[NSDate date]compare:limit]==NSOrderedAscending)
|
||||
{
|
||||
BOOL _tmpUsed=NO;
|
||||
if ([self tryLock])
|
||||
{
|
||||
_tmpUsed=[usedIDs containsObject:sessionID_];
|
||||
if (_tmpUsed)
|
||||
[self unlock];
|
||||
else
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
_session=[self _checkOutSessionWithID:sessionID_
|
||||
request:request_];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"sessions",@"Can't checkOutSessionID=%@",sessionID_);
|
||||
if ([[localException name]isEqualToString:@"GSWSessionStoreException"])
|
||||
_sessionUsed=YES;
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
_sessionUsed=NO;
|
||||
NSDebugMLLog(@"sessions",@"_session=%@",_session);
|
||||
};
|
||||
};
|
||||
};
|
||||
NSDebugMLLog(@"sessions",@"_session=%@",_session);
|
||||
while(!session && sessionUsed && [[NSDate date]compare:limit]==NSOrderedAscending)
|
||||
{
|
||||
BOOL tmpUsed=NO;
|
||||
if ([self tryLock])
|
||||
{
|
||||
tmpUsed=[_usedIDs containsObject:aSessionID];
|
||||
if (tmpUsed)
|
||||
[self unlock];
|
||||
else
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
session=[self _checkOutSessionWithID:aSessionID
|
||||
request:aRequest];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"sessions",@"Can't checkOutSessionID=%@",aSessionID);
|
||||
if ([[localException name]isEqualToString:@"GSWSessionStoreException"])
|
||||
sessionUsed=YES;
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
sessionUsed=NO;
|
||||
NSDebugMLLog(@"sessions",@"session=%@",session);
|
||||
};
|
||||
};
|
||||
};
|
||||
NSDebugMLLog(@"sessions",@"session=%@",session);
|
||||
LOGObjectFnStop();
|
||||
return _session;
|
||||
return session;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)checkInSessionForContext:(GSWContext*)context_
|
||||
-(void)checkInSessionForContext:(GSWContext*)aContext
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
if ([self tryLock])
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
[self _checkInSessionForContext:context_];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"In _checkInSessionForContext:");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
};
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
[self _checkInSessionForContext:aContext];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"In _checkInSessionForContext:");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_checkInSessionForContext:(GSWContext*)context_
|
||||
-(void)_checkInSessionForContext:(GSWContext*)aContext
|
||||
{
|
||||
//OK
|
||||
NSString* _sessionID=nil;
|
||||
GSWSession* _session=nil;
|
||||
NSString* sessionID=nil;
|
||||
GSWSession* session=nil;
|
||||
LOGObjectFnStart();
|
||||
_session=[context_ existingSession];
|
||||
GSWLogAssertGood(_session);
|
||||
NSDebugMLLog(@"sessions",@"_session=%@",_session);
|
||||
session=[aContext existingSession];
|
||||
GSWLogAssertGood(session);
|
||||
NSDebugMLLog(@"sessions",@"session=%@",session);
|
||||
NS_DURING
|
||||
{
|
||||
[self saveSessionForContext:context_];
|
||||
}
|
||||
{
|
||||
[self saveSessionForContext:aContext];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"In saveSessionForContext:");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
}
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"In saveSessionForContext:");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
GSWLogAssertGood(_session);
|
||||
NSDebugMLLog(@"sessions",@"_session=%@",_session);
|
||||
GSWLogAssertGood(session);
|
||||
NSDebugMLLog(@"sessions",@"session=%@",session);
|
||||
NS_DURING
|
||||
{
|
||||
[_session _releaseAutoreleasePool];
|
||||
}
|
||||
{
|
||||
[session _releaseAutoreleasePool];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"In [_session _releaseAutoreleasePool]");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
}
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"In [_session _releaseAutoreleasePool]");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
GSWLogAssertGood(_session);
|
||||
NSDebugMLLog(@"sessions",@"_session=%@",_session);
|
||||
_sessionID=[_session sessionID];
|
||||
GSWLogAssertGood(_session);
|
||||
NSDebugMLLog(@"sessions",@"_sessionID=%@",_sessionID);
|
||||
GSWLogAssertGood(session);
|
||||
NSDebugMLLog(@"sessions",@"session=%@",session);
|
||||
sessionID=[session sessionID];
|
||||
GSWLogAssertGood(session);
|
||||
NSDebugMLLog(@"sessions",@"sessionID=%@",sessionID);
|
||||
NS_DURING
|
||||
{
|
||||
[self _checkinSessionID:_sessionID];
|
||||
}
|
||||
{
|
||||
[self _checkinSessionID:sessionID];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"In _checkinSessionID");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
}
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"In _checkinSessionID");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWSession*)_checkOutSessionWithID:(NSString*)sessionID_
|
||||
request:(GSWRequest*)request_
|
||||
-(GSWSession*)_checkOutSessionWithID:(NSString*)aSessionID
|
||||
request:(GSWRequest*)aRequest
|
||||
{
|
||||
GSWSession* _session=nil;
|
||||
GSWSession* session=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"sessions",@"sessionID_=%@",sessionID_);
|
||||
NSDebugMLLog(@"sessions",@"aSessionID=%@",aSessionID);
|
||||
NSDebugMLLog(@"sessions",@"self=%@",self);
|
||||
//OK
|
||||
NSDebugMLog0(@"starting:_checkoutSessionID");
|
||||
[self _checkoutSessionID:sessionID_];
|
||||
[self _checkoutSessionID:aSessionID];
|
||||
NSDebugMLog0(@"end of:_checkoutSessionID");
|
||||
NSDebugMLog0(@"starting:restoreSessionWithID");
|
||||
_session=[self restoreSessionWithID:sessionID_
|
||||
request:request_];
|
||||
session=[self restoreSessionWithID:aSessionID
|
||||
request:aRequest];
|
||||
NSDebugMLog0(@"end of:restoreSessionWithID");
|
||||
if (_session)
|
||||
[_session _createAutoreleasePool];
|
||||
if (session)
|
||||
[session _createAutoreleasePool];
|
||||
else
|
||||
[self _checkinSessionID:sessionID_];
|
||||
NSDebugMLLog(@"sessions",@"_session=%@",_session);
|
||||
[self checkinSessionID:aSessionID];
|
||||
NSDebugMLLog(@"sessions",@"session=%@",session);
|
||||
LOGObjectFnStop();
|
||||
return _session;
|
||||
return session;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_checkinSessionID:(NSString*)sessionID_
|
||||
-(void)_checkinSessionID:(NSString*)aSessionID
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
//OK
|
||||
/* if (![usedIDs containsObject:sessionID_])
|
||||
{
|
||||
NSDebugMLLog(@"sessions",@"SessionID=%@ not is use",sessionID_);
|
||||
}
|
||||
else
|
||||
{*/
|
||||
[usedIDs removeObject:sessionID_];
|
||||
// };
|
||||
/* if (![usedIDs containsObject:aSessionID])
|
||||
{
|
||||
NSDebugMLLog(@"sessions",@"SessionID=%@ not is use",aSessionID);
|
||||
}
|
||||
else
|
||||
{*/
|
||||
[_usedIDs removeObject:aSessionID];
|
||||
// };
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_checkoutSessionID:(NSString*)sessionID_
|
||||
-(void)_checkoutSessionID:(NSString*)aSessionID
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
if ([usedIDs containsObject:sessionID_])
|
||||
{
|
||||
NSDebugMLLog(@"sessions",@"SessionID=%@ already in use",sessionID_);
|
||||
LOGException0(@"NSGenericException session used");
|
||||
[NSException raise:@"GSWSessionStoreException"
|
||||
format:@"Session %@ used",
|
||||
sessionID_];
|
||||
}
|
||||
if ([_usedIDs containsObject:aSessionID])
|
||||
{
|
||||
NSDebugMLLog(@"sessions",@"SessionID=%@ already in use",aSessionID);
|
||||
LOGException0(@"NSGenericException session used");
|
||||
[NSException raise:@"GSWSessionStoreException"
|
||||
format:@"Session %@ used",
|
||||
aSessionID];
|
||||
}
|
||||
else
|
||||
{
|
||||
[usedIDs addObject:sessionID_];
|
||||
};
|
||||
{
|
||||
[_usedIDs addObject:aSessionID];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
|
@ -263,12 +274,12 @@ static char rcsId[] = "$Id$";
|
|||
-(void)unlock
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"sessions",@"lockn=%d",lockn);
|
||||
TmpUnlock(lock);
|
||||
NSDebugMLLog(@"sessions",@"lockn=%d",_lockn);
|
||||
TmpUnlock(_lock);
|
||||
#ifndef NDEBUG
|
||||
lockn--;
|
||||
_lockn--;
|
||||
#endif
|
||||
NSDebugMLLog(@"sessions",@"lockn=%d",lockn);
|
||||
NSDebugMLLog(@"sessions",@"lockn=%d",_lockn);
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
|
@ -277,13 +288,13 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
BOOL locked=NO;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"sessions",@"lockn=%d",lockn);
|
||||
locked=TmpTryLockBeforeDate(lock,[NSDate dateWithTimeIntervalSinceNow:GSLOCK_DELAY_S]);
|
||||
NSDebugMLLog(@"sessions",@"lockn=%d",_lockn);
|
||||
locked=TmpTryLockBeforeDate(_lock,[NSDate dateWithTimeIntervalSinceNow:GSLOCK_DELAY_S]);
|
||||
#ifndef NDEBUG
|
||||
if (locked)
|
||||
lockn++;
|
||||
_lockn++;
|
||||
#endif
|
||||
NSDebugMLLog(@"sessions",@"lockn=%d",lockn);
|
||||
NSDebugMLLog(@"sessions",@"lockn=%d",_lockn);
|
||||
LOGObjectFnStop();
|
||||
return locked;
|
||||
};
|
||||
|
@ -292,12 +303,12 @@ static char rcsId[] = "$Id$";
|
|||
-(void)lock
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"sessions",@"lockn=%d",lockn);
|
||||
TmpLockBeforeDate(lock,[NSDate dateWithTimeIntervalSinceNow:GSLOCK_DELAY_S]);
|
||||
NSDebugMLLog(@"sessions",@"lockn=%d",_lockn);
|
||||
TmpLockBeforeDate(_lock,[NSDate dateWithTimeIntervalSinceNow:GSLOCK_DELAY_S]);
|
||||
#ifndef NDEBUG
|
||||
lockn++;
|
||||
_lockn++;
|
||||
#endif
|
||||
NSDebugMLLog(@"sessions",@"lockn=%d",lockn);
|
||||
NSDebugMLLog(@"sessions",@"lockn=%d",_lockn);
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
|
@ -356,7 +367,7 @@ static char rcsId[] = "$Id$";
|
|||
//--------------------------------------------------------------------
|
||||
// saveSession:
|
||||
|
||||
-(void)saveSession:(GSWSession*)session_
|
||||
-(void)saveSession:(GSWSession*)session
|
||||
{
|
||||
//Does Nothing
|
||||
};
|
||||
|
@ -365,14 +376,14 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
//====================================================================
|
||||
@implementation GSWSessionStore (GSWSessionStoreA)
|
||||
-(BOOL)_isSessionIDCheckedOut:(NSString*)sessionID_
|
||||
-(BOOL)_isSessionIDCheckedOut:(NSString*)aSessionID
|
||||
{
|
||||
//OK
|
||||
BOOL _checkedOut=NO;
|
||||
BOOL checkedOut=NO;
|
||||
LOGObjectFnStart();
|
||||
_checkedOut=[usedIDs containsObject:sessionID_];
|
||||
checkedOut=[_usedIDs containsObject:aSessionID];
|
||||
LOGObjectFnStop();
|
||||
return _checkedOut;
|
||||
return checkedOut;
|
||||
};
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWSessionTimeOut.h - GSWeb: Class GSWSessionTimeOut
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWSessionTimeOut.h - <title>GSWeb: Class GSWSessionTimeOut</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Mar 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Mar 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -30,24 +36,24 @@
|
|||
//====================================================================
|
||||
@interface GSWSessionTimeOut : NSObject
|
||||
{
|
||||
NSString* sessionID;
|
||||
NSTimeInterval lastAccessTime;
|
||||
NSTimeInterval timeOut;
|
||||
NSString* _sessionID;
|
||||
NSTimeInterval _lastAccessTime;
|
||||
NSTimeInterval _timeOut;
|
||||
};
|
||||
|
||||
-(void)dealloc;
|
||||
-(id)initWithSessionID:(NSString*)sessionID_
|
||||
lastAccessTime:(NSTimeInterval)lastAccessTime_
|
||||
sessionTimeOut:(NSTimeInterval)timeOut;
|
||||
+(id)timeOutWithSessionID:(NSString*)sessionID_
|
||||
lastAccessTime:(NSTimeInterval)lastAccessTime_
|
||||
sessionTimeOut:(NSTimeInterval)timeOut;
|
||||
-(id)initWithSessionID:(NSString*)aSessionID
|
||||
lastAccessTime:(NSTimeInterval)aTime
|
||||
sessionTimeOut:(NSTimeInterval)aTimeOutInterval;
|
||||
+(id)timeOutWithSessionID:(NSString*)aSessionID
|
||||
lastAccessTime:(NSTimeInterval)aTime
|
||||
sessionTimeOut:(NSTimeInterval)aTimeOutInterval;
|
||||
-(NSString*)description;
|
||||
-(NSComparisonResult)compareTimeOutDate:(GSWSessionTimeOut*)timeOutObject_;
|
||||
-(NSComparisonResult)compareTimeOutDate:(GSWSessionTimeOut*)timeOutObject;
|
||||
-(NSTimeInterval)sessionTimeOut;
|
||||
-(void)setSessionTimeOut:(NSTimeInterval)timeOut_;
|
||||
-(void)setSessionTimeOut:(NSTimeInterval)aTimeOutInterval;
|
||||
-(NSString*)sessionID;
|
||||
-(void)setLastAccessTime:(NSTimeInterval)lastAccessTime_;
|
||||
-(void)setLastAccessTime:(NSTimeInterval)aTime;
|
||||
-(NSTimeInterval)lastAccessTime;
|
||||
-(NSTimeInterval)timeOutTime;
|
||||
@end
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWSessionTimeOut.m - GSWeb: Class GSWSessionTimeOut
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWSessionTimeOut.m - <title>GSWeb: Class GSWSessionTimeOut</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Mar 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Mar 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
static char rcsId[] = "$Id$";
|
||||
|
||||
|
@ -30,38 +36,38 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWSessionTimeOut
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithSessionID:(NSString*)sessionID_
|
||||
lastAccessTime:(NSTimeInterval)lastAccessTime_
|
||||
sessionTimeOut:(NSTimeInterval)timeOut_
|
||||
-(id)initWithSessionID:(NSString*)aSessionID
|
||||
lastAccessTime:(NSTimeInterval)aTime
|
||||
sessionTimeOut:(NSTimeInterval)aTimeOutInterval
|
||||
{
|
||||
if ((self=[super init]))
|
||||
{
|
||||
ASSIGN(sessionID,sessionID_);
|
||||
lastAccessTime=lastAccessTime_;
|
||||
timeOut=timeOut_;
|
||||
};
|
||||
{
|
||||
ASSIGN(_sessionID,aSessionID);
|
||||
_lastAccessTime=aTime;
|
||||
_timeOut=aTimeOutInterval;
|
||||
};
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(id)timeOutWithSessionID:(NSString*)sessionID_
|
||||
lastAccessTime:(NSTimeInterval)lastAccessTime_
|
||||
sessionTimeOut:(NSTimeInterval)timeOut_
|
||||
+(id)timeOutWithSessionID:(NSString*)aSessionID
|
||||
lastAccessTime:(NSTimeInterval)aTime
|
||||
sessionTimeOut:(NSTimeInterval)aTimeOutInterval
|
||||
{
|
||||
return [[[self alloc]initWithSessionID:sessionID_
|
||||
lastAccessTime:lastAccessTime_
|
||||
sessionTimeOut:timeOut_]autorelease];
|
||||
return [[[self alloc]initWithSessionID:aSessionID
|
||||
lastAccessTime:aTime
|
||||
sessionTimeOut:aTimeOutInterval]autorelease];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
NSDebugFLog0(@"Dealloc GSWSessionTimeOut");
|
||||
if (sessionID)
|
||||
{
|
||||
NSDebugFLog(@"sessionIDCount=%u",[sessionID retainCount]);
|
||||
};
|
||||
DESTROY(sessionID);
|
||||
if (_sessionID)
|
||||
{
|
||||
NSDebugFLog(@"sessionIDCount=%u",[_sessionID retainCount]);
|
||||
};
|
||||
DESTROY(_sessionID);
|
||||
[super dealloc];
|
||||
};
|
||||
|
||||
|
@ -70,64 +76,64 @@ static char rcsId[] = "$Id$";
|
|||
-(NSString*)description
|
||||
{
|
||||
return [NSString stringWithFormat:@"<%s %p - sessionID=%@ timeOutTime=%f lastAccessTime=%f timeOut=%ld",
|
||||
object_get_class_name(self),
|
||||
(void*)self,
|
||||
sessionID,
|
||||
[self timeOutTime],
|
||||
lastAccessTime,
|
||||
(long)timeOut];
|
||||
object_get_class_name(self),
|
||||
(void*)self,
|
||||
_sessionID,
|
||||
[self timeOutTime],
|
||||
_lastAccessTime,
|
||||
(long)_timeOut];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSComparisonResult)compareTimeOutDate:(GSWSessionTimeOut*)timeOutObject_
|
||||
-(NSComparisonResult)compareTimeOutDate:(GSWSessionTimeOut*)timeOutObject
|
||||
{
|
||||
if (timeOutObject_)
|
||||
{
|
||||
if ([self timeOutTime]<[timeOutObject_ timeOutTime])
|
||||
return NSOrderedAscending;
|
||||
else if ([self timeOutTime]==[timeOutObject_ timeOutTime])
|
||||
return NSOrderedSame;
|
||||
else
|
||||
return NSOrderedDescending;
|
||||
}
|
||||
if (timeOutObject)
|
||||
{
|
||||
if ([self timeOutTime]<[timeOutObject timeOutTime])
|
||||
return NSOrderedAscending;
|
||||
else if ([self timeOutTime]==[timeOutObject timeOutTime])
|
||||
return NSOrderedSame;
|
||||
else
|
||||
return NSOrderedDescending;
|
||||
}
|
||||
else
|
||||
return NSOrderedDescending;
|
||||
return NSOrderedDescending;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSTimeInterval)sessionTimeOut
|
||||
{
|
||||
return timeOut;
|
||||
return _timeOut;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)setSessionTimeOut:(NSTimeInterval)timeOut_
|
||||
-(void)setSessionTimeOut:(NSTimeInterval)aTimeOutInterval
|
||||
{
|
||||
timeOut=timeOut_;
|
||||
_timeOut=aTimeOutInterval;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)sessionID
|
||||
{
|
||||
return sessionID;
|
||||
return _sessionID;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)setLastAccessTime:(NSTimeInterval)lastAccessTime_
|
||||
-(void)setLastAccessTime:(NSTimeInterval)aTime
|
||||
{
|
||||
lastAccessTime=lastAccessTime_;
|
||||
_lastAccessTime=aTime;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSTimeInterval)lastAccessTime
|
||||
{
|
||||
return lastAccessTime;
|
||||
return _lastAccessTime;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSTimeInterval)timeOutTime
|
||||
{
|
||||
return lastAccessTime+timeOut;
|
||||
return _lastAccessTime+_timeOut;
|
||||
};
|
||||
|
||||
@end
|
||||
|
|
|
@ -606,11 +606,11 @@ static NSString* TabsForLevel(int level)
|
|||
if ([node type]==XML_ELEMENT_NODE)
|
||||
{
|
||||
NSString* nodeName=[node name];
|
||||
//NSDebugMLLog(@"GSWTemplateParser",@"node name=%@",nodeName);
|
||||
/*NSDebugMLLog(@"GSWTemplateParser",@"_isHTMLTag=%s _isBodyTag=%s",
|
||||
/* NSDebugMLLog(@"GSWTemplateParser",@"node name=%@",nodeName);
|
||||
NSDebugMLLog(@"GSWTemplateParser",@"_isHTMLTag=%s _isBodyTag=%s",
|
||||
(_isHTMLTag ? "YES" : "NO"),
|
||||
(_isBodyTag ? "YES" : "NO"));
|
||||
*/
|
||||
*/
|
||||
/*
|
||||
NSLog(@"while1 node=%p %@ [Type:%@] [%@] ##%s##\n",
|
||||
node,
|
||||
|
@ -622,7 +622,7 @@ static NSString* TabsForLevel(int level)
|
|||
if ((!_isHTMLTag && [nodeName caseInsensitiveCompare:@"html"]==NSOrderedSame)
|
||||
|| (!_isBodyTag && [nodeName caseInsensitiveCompare:@"body"]==NSOrderedSame))
|
||||
{
|
||||
//NSDebugMLLog(@"GSWTemplateParser",@"==> Children");
|
||||
// NSDebugMLLog(@"GSWTemplateParser",@"==> Children");
|
||||
node=[node firstChild];
|
||||
cont=YES;
|
||||
};
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWToggle.h - GSWeb: Class GSWToggle
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWToggle.h - <title>GSWeb: Class GSWToggle</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Jan 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -29,27 +35,27 @@
|
|||
|
||||
@interface GSWToggle: GSWDynamicElement
|
||||
{
|
||||
GSWAssociation* action;
|
||||
GSWAssociation* actionYes;
|
||||
GSWAssociation* actionNo;
|
||||
GSWAssociation* condition;
|
||||
GSWAssociation* disabled;
|
||||
NSDictionary* otherAssociations;
|
||||
GSWElement* children;
|
||||
GSWAssociation* _action;
|
||||
GSWAssociation* _actionYes;
|
||||
GSWAssociation* _actionNo;
|
||||
GSWAssociation* _condition;
|
||||
GSWAssociation* _disabled;
|
||||
NSDictionary* _otherAssociations;
|
||||
GSWElement* _children;
|
||||
};
|
||||
|
||||
-(id)initWithName:(NSString*)name_
|
||||
associations:(NSDictionary*)associations_
|
||||
template:(GSWElement*)templateElement_;
|
||||
-(id)initWithName:(NSString*)aName
|
||||
associations:(NSDictionary*)associations
|
||||
template:(GSWElement*)templateElement;
|
||||
-(void)dealloc;
|
||||
-(NSString*)description;
|
||||
@end
|
||||
|
||||
@interface GSWToggle (GSWToggleA)
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext;
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)aRequest
|
||||
inContext:(GSWContext*)aContext;
|
||||
@end
|
||||
|
||||
#endif //_GSWToggle_h__
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWToggle.m - GSWeb: Class GSWToggle
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWToggle.m - <title>GSWeb: Class GSWToggle</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Jan 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
static char rcsId[] = "$Id$";
|
||||
|
||||
|
@ -29,48 +35,48 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWToggle
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithName:(NSString*)name_
|
||||
associations:(NSDictionary*)someAssociations
|
||||
template:(GSWElement*)templateElement_
|
||||
-(id)initWithName:(NSString*)aName
|
||||
associations:(NSDictionary*)someAssociations
|
||||
template:(GSWElement*)templateElement
|
||||
{
|
||||
//OK
|
||||
NSMutableDictionary* _otherAssociations=nil;
|
||||
NSMutableDictionary* otherAssociations=nil;
|
||||
LOGObjectFnStart();
|
||||
ASSIGN(children,templateElement_);
|
||||
action = [[someAssociations objectForKey:action__Key
|
||||
withDefaultObject:[action autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"action=%@",action);
|
||||
ASSIGN(_children,templateElement);
|
||||
_action = [[someAssociations objectForKey:action__Key
|
||||
withDefaultObject:[_action autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"_action=%@",_action);
|
||||
|
||||
actionYes = [[someAssociations objectForKey:actionYes__Key
|
||||
withDefaultObject:[actionYes autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"actionYes=%@",actionYes);
|
||||
_actionYes = [[someAssociations objectForKey:actionYes__Key
|
||||
withDefaultObject:[_actionYes autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"_actionYes=%@",_actionYes);
|
||||
|
||||
actionNo = [[someAssociations objectForKey:actionNo__Key
|
||||
withDefaultObject:[actionNo autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"actionNo=%@",actionNo);
|
||||
_actionNo = [[someAssociations objectForKey:actionNo__Key
|
||||
withDefaultObject:[_actionNo autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"_actionNo=%@",_actionNo);
|
||||
|
||||
condition = [[someAssociations objectForKey:condition__Key
|
||||
withDefaultObject:[condition autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"condition=%@",condition);
|
||||
_condition = [[someAssociations objectForKey:condition__Key
|
||||
withDefaultObject:[_condition autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"_condition=%@",_condition);
|
||||
|
||||
disabled = [[someAssociations objectForKey:disabled__Key
|
||||
withDefaultObject:[disabled autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"disabled=%@",disabled);
|
||||
_disabled = [[someAssociations objectForKey:disabled__Key
|
||||
withDefaultObject:[_disabled autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"_disabled=%@",_disabled);
|
||||
|
||||
_otherAssociations=[NSMutableDictionary dictionaryWithDictionary:someAssociations];
|
||||
[_otherAssociations removeObjectForKey:action__Key];
|
||||
[_otherAssociations removeObjectForKey:actionYes__Key];
|
||||
[_otherAssociations removeObjectForKey:actionNo__Key];
|
||||
[_otherAssociations removeObjectForKey:condition__Key];
|
||||
[_otherAssociations removeObjectForKey:disabled__Key];
|
||||
if ([_otherAssociations count]>0)
|
||||
otherAssociations=[[NSDictionary dictionaryWithDictionary:_otherAssociations] retain];
|
||||
otherAssociations=[NSMutableDictionary dictionaryWithDictionary:someAssociations];
|
||||
[otherAssociations removeObjectForKey:action__Key];
|
||||
[otherAssociations removeObjectForKey:actionYes__Key];
|
||||
[otherAssociations removeObjectForKey:actionNo__Key];
|
||||
[otherAssociations removeObjectForKey:condition__Key];
|
||||
[otherAssociations removeObjectForKey:disabled__Key];
|
||||
if ([otherAssociations count]>0)
|
||||
_otherAssociations=[[NSDictionary dictionaryWithDictionary:otherAssociations] retain];
|
||||
|
||||
if ((self=[super initWithName:name_
|
||||
associations:nil
|
||||
template:nil]))
|
||||
{
|
||||
};
|
||||
if ((self=[super initWithName:aName
|
||||
associations:nil
|
||||
template:nil]))
|
||||
{
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
@ -78,13 +84,13 @@ static char rcsId[] = "$Id$";
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
DESTROY(action);
|
||||
DESTROY(actionYes);
|
||||
DESTROY(actionNo);
|
||||
DESTROY(condition);
|
||||
DESTROY(disabled);
|
||||
DESTROY(otherAssociations);
|
||||
DESTROY(children);
|
||||
DESTROY(_action);
|
||||
DESTROY(_actionYes);
|
||||
DESTROY(_actionNo);
|
||||
DESTROY(_condition);
|
||||
DESTROY(_disabled);
|
||||
DESTROY(_otherAssociations);
|
||||
DESTROY(_children);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -92,8 +98,8 @@ static char rcsId[] = "$Id$";
|
|||
-(NSString*)description
|
||||
{
|
||||
return [NSString stringWithFormat:@"<%s %p>",
|
||||
object_get_class_name(self),
|
||||
(void*)self];
|
||||
object_get_class_name(self),
|
||||
(void*)self];
|
||||
};
|
||||
|
||||
@end
|
||||
|
@ -102,106 +108,107 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWToggle (GSWToggleA)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
//OK (condition/action/directActionName)
|
||||
GSWComponent* _component=[context_ component];
|
||||
BOOL _disabled=NO;
|
||||
GSWComponent* component=[aContext component];
|
||||
BOOL disabled=NO;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"gswdync",@"_elementID=%@",[context_ elementID]);
|
||||
if (disabled)
|
||||
_disabled=[self evaluateCondition:disabled
|
||||
inContext:context_];
|
||||
if (!_disabled)
|
||||
{
|
||||
NSString* _url=nil;
|
||||
[response_ _appendContentAsciiString:@"<A "];
|
||||
[response_ _appendContentAsciiString:@"href"];
|
||||
[response_ appendContentCharacter:'='];
|
||||
[response_ appendContentCharacter:'"'];
|
||||
_url=(NSString*)[context_ componentActionURL];
|
||||
NSDebugMLLog(@"gswdync",@"_url=%@",_url);
|
||||
[response_ appendContentString:_url];
|
||||
[response_ appendContentCharacter:'"'];
|
||||
NSDebugMLLog(@"gswdync",@"otherAssociations=%@",otherAssociations);
|
||||
if (otherAssociations)
|
||||
{
|
||||
NSEnumerator *enumerator = [otherAssociations keyEnumerator];
|
||||
id _key=nil;
|
||||
id _oaValue=nil;
|
||||
while ((_key = [enumerator nextObject]))
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"_key=%@",_key);
|
||||
_oaValue=[[otherAssociations objectForKey:_key] valueInComponent:_component];
|
||||
NSDebugMLLog(@"gswdync",@"_oaValue=%@",_oaValue);
|
||||
[response_ appendContentCharacter:' '];
|
||||
[response_ _appendContentAsciiString:_key];
|
||||
[response_ appendContentCharacter:'='];
|
||||
[response_ appendContentCharacter:'"'];
|
||||
[response_ appendContentHTMLString:_oaValue];
|
||||
[response_ appendContentCharacter:'"'];
|
||||
};
|
||||
};
|
||||
[response_ appendContentCharacter:'>'];
|
||||
};
|
||||
[children appendToResponse:response_
|
||||
inContext:context_];
|
||||
if (!_disabled)//??
|
||||
{
|
||||
[response_ _appendContentAsciiString:@"</a>"];
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"_senderID=%@",[context_ senderID]);
|
||||
NSDebugMLLog(@"gswdync",@"elementID=%@",[aContext elementID]);
|
||||
if (_disabled)
|
||||
disabled=[self evaluateCondition:_disabled
|
||||
inContext:aContext];
|
||||
if (!disabled)
|
||||
{
|
||||
NSString* url=nil;
|
||||
[aResponse _appendContentAsciiString:@"<A "];
|
||||
[aResponse _appendContentAsciiString:@"href"];
|
||||
[aResponse appendContentCharacter:'='];
|
||||
[aResponse appendContentCharacter:'"'];
|
||||
url=(NSString*)[aContext componentActionURL];
|
||||
NSDebugMLLog(@"gswdync",@"url=%@",url);
|
||||
[aResponse appendContentString:url];
|
||||
[aResponse appendContentCharacter:'"'];
|
||||
NSDebugMLLog(@"gswdync",@"_otherAssociations=%@",_otherAssociations);
|
||||
if (_otherAssociations)
|
||||
{
|
||||
NSEnumerator *enumerator = [_otherAssociations keyEnumerator];
|
||||
id key=nil;
|
||||
id oaValue=nil;
|
||||
while ((key = [enumerator nextObject]))
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"key=%@",key);
|
||||
oaValue=[[_otherAssociations objectForKey:key]
|
||||
valueInComponent:component];
|
||||
NSDebugMLLog(@"gswdync",@"oaValue=%@",oaValue);
|
||||
[aResponse appendContentCharacter:' '];
|
||||
[aResponse _appendContentAsciiString:key];
|
||||
[aResponse appendContentCharacter:'='];
|
||||
[aResponse appendContentCharacter:'"'];
|
||||
[aResponse appendContentHTMLString:oaValue];
|
||||
[aResponse appendContentCharacter:'"'];
|
||||
};
|
||||
};
|
||||
[aResponse appendContentCharacter:'>'];
|
||||
};
|
||||
[_children appendToResponse:aResponse
|
||||
inContext:aContext];
|
||||
if (!disabled)//??
|
||||
{
|
||||
[aResponse _appendContentAsciiString:@"</a>"];
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"senderID=%@",[aContext senderID]);
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)aRequest
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
//OK
|
||||
GSWElement* _element=nil;
|
||||
NSString* _senderID=nil;
|
||||
NSString* _elementID=nil;
|
||||
GSWElement* element=nil;
|
||||
NSString* senderID=nil;
|
||||
NSString* elementID=nil;
|
||||
LOGObjectFnStart();
|
||||
_senderID=[context_ senderID];
|
||||
NSDebugMLLog(@"gswdync",@"_senderID=%@",_senderID);
|
||||
_elementID=[context_ elementID];
|
||||
NSDebugMLLog(@"gswdync",@"_elementID=%@",_elementID);
|
||||
if ([_elementID isEqualToString:_senderID])
|
||||
{
|
||||
GSWComponent* _component=[context_ component];
|
||||
BOOL _conditionValue=[self evaluateCondition:condition
|
||||
inContext:context_];
|
||||
_conditionValue=!_conditionValue;
|
||||
if (action)
|
||||
[action setValue:[NSNumber numberWithBool:_conditionValue]
|
||||
inComponent:_component];
|
||||
else
|
||||
{
|
||||
if (actionYes && _conditionValue)
|
||||
[actionYes valueInComponent:_component];
|
||||
else if (actionNo && !_conditionValue)
|
||||
[actionNo valueInComponent:_component];
|
||||
else
|
||||
{
|
||||
//TODO ERROR
|
||||
};
|
||||
};
|
||||
//TODOV
|
||||
if (!_element)
|
||||
_element=[context_ page];
|
||||
}
|
||||
senderID=[aContext senderID];
|
||||
NSDebugMLLog(@"gswdync",@"senderID=%@",senderID);
|
||||
elementID=[aContext elementID];
|
||||
NSDebugMLLog(@"gswdync",@"elementID=%@",elementID);
|
||||
if ([elementID isEqualToString:senderID])
|
||||
{
|
||||
GSWComponent* component=[aContext component];
|
||||
BOOL conditionValue=[self evaluateCondition:_condition
|
||||
inContext:aContext];
|
||||
conditionValue=!conditionValue;
|
||||
if (_action)
|
||||
[_action setValue:[NSNumber numberWithBool:conditionValue]
|
||||
inComponent:component];
|
||||
else
|
||||
{
|
||||
if (_actionYes && conditionValue)
|
||||
[_actionYes valueInComponent:component];
|
||||
else if (_actionNo && !conditionValue)
|
||||
[_actionNo valueInComponent:component];
|
||||
else
|
||||
{
|
||||
//TODO ERROR
|
||||
};
|
||||
};
|
||||
//TODOV
|
||||
if (!element)
|
||||
element=[aContext page];
|
||||
}
|
||||
else
|
||||
{
|
||||
_element=[children invokeActionForRequest:request_
|
||||
inContext:context_];
|
||||
NSDebugMLLog(@"gswdync",@"_element=%@",_element);
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"_senderID=%@",[context_ senderID]);
|
||||
NSDebugMLLog(@"gswdync",@"_elementID=%@",[context_ elementID]);
|
||||
{
|
||||
element=[_children invokeActionForRequest:aRequest
|
||||
inContext:aContext];
|
||||
NSDebugMLLog(@"gswdync",@"element=%@",element);
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"senderID=%@",[aContext senderID]);
|
||||
NSDebugMLLog(@"gswdync",@"elementID=%@",[aContext elementID]);
|
||||
LOGObjectFnStop();
|
||||
return _element;
|
||||
return element;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWTransactionRecord.h - GSWeb: Class GSWTransactionRecord
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWTransactionRecord.h - <title>GSWeb: Class GSWTransactionRecord</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Apr 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Apr 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -30,21 +36,21 @@
|
|||
//====================================================================
|
||||
@interface GSWTransactionRecord : NSObject
|
||||
{
|
||||
GSWComponent* responsePage;
|
||||
NSString* requestSignature;
|
||||
GSWComponent* _responsePage;
|
||||
NSString* _requestSignature;
|
||||
};
|
||||
|
||||
-(id)initWithResponsePage:(GSWComponent*)responsePage_
|
||||
context:(GSWContext*)context_;
|
||||
-(id)initWithResponsePage:(GSWComponent*)aResponsePage
|
||||
context:(GSWContext*)aContext;
|
||||
-(void)dealloc;
|
||||
|
||||
-(id)initWithCoder:(NSCoder*)code_;
|
||||
-(void)encodeWithCoder:(NSCoder*)code_;
|
||||
-(id)initWithCoder:(NSCoder*)code;
|
||||
-(void)encodeWithCoder:(NSCoder*)code;
|
||||
|
||||
-(NSString*)description;
|
||||
-(BOOL)isMatchingContextID:(NSString*)contextID_
|
||||
requestSenderID:(NSString*)requestSenderID;
|
||||
-(void)setResponsePage:(GSWComponent*)responsePage_;
|
||||
-(BOOL)isMatchingContextID:(NSString*)aContextID
|
||||
requestSenderID:(NSString*)aRequestSenderID;
|
||||
-(void)setResponsePage:(GSWComponent*)aResponsePage;
|
||||
-(GSWComponent*)responsePage;
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWTransactionRecord.m - GSWeb: Class GSWTransactionRecord
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWTransactionRecord.m - <title>GSWeb: Class GSWTransactionRecord</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Date: Apr 1999
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Apr 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
static char rcsId[] = "$Id$";
|
||||
|
||||
|
@ -29,24 +35,24 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWTransactionRecord
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithResponsePage:(GSWComponent*)responsePage_
|
||||
context:(GSWContext*)context_
|
||||
-(id)initWithResponsePage:(GSWComponent*)aResponsePage
|
||||
context:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if ((self=[super init]))
|
||||
{
|
||||
NSString* _contextID=nil;
|
||||
NSString* _senderID=nil;
|
||||
NSString* _requestSignature=nil;
|
||||
[self setResponsePage:responsePage_];
|
||||
NSDebugMLLog(@"low",@"responsePage=%@",responsePage);
|
||||
_contextID=[context_ contextID];//Really from here ?
|
||||
NSDebugMLLog(@"low",@"_contextID=%@",_contextID);
|
||||
_senderID=[context_ senderID];
|
||||
NSDebugMLLog(@"low",@"_senderID=%@",_senderID);
|
||||
_requestSignature=[NSString stringWithFormat:@"%@.%@",_contextID,_senderID];
|
||||
ASSIGN(requestSignature,_requestSignature);
|
||||
};
|
||||
{
|
||||
NSString* contextID=nil;
|
||||
NSString* senderID=nil;
|
||||
NSString* requestSignature=nil;
|
||||
[self setResponsePage:aResponsePage];
|
||||
NSDebugMLLog(@"low",@"responsePage=%@",_responsePage);
|
||||
contextID=[aContext contextID];//Really from here ?
|
||||
NSDebugMLLog(@"low",@"contextID=%@",contextID);
|
||||
senderID=[aContext senderID];
|
||||
NSDebugMLLog(@"low",@"senderID=%@",senderID);
|
||||
requestSignature=[NSString stringWithFormat:@"%@.%@",contextID,senderID];
|
||||
ASSIGN(_requestSignature,requestSignature);
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
@ -56,32 +62,32 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
GSWLogC("Dealloc GSWTransactionRecord");
|
||||
GSWLogC("Dealloc GSWTransactionRecord: responsePage");
|
||||
DESTROY(responsePage);
|
||||
DESTROY(_responsePage);
|
||||
GSWLogC("Dealloc GSWTransactionRecord: requestSignature");
|
||||
DESTROY(requestSignature);
|
||||
DESTROY(_requestSignature);
|
||||
GSWLogC("Dealloc GSWTransactionRecord super");
|
||||
[super dealloc];
|
||||
GSWLogC("End Dealloc GSWTransactionRecord");
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithCoder:(NSCoder*)coder_
|
||||
-(id)initWithCoder:(NSCoder*)coder
|
||||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
[coder_ decodeValueOfObjCType:@encode(id)
|
||||
at:&responsePage];
|
||||
[coder_ decodeValueOfObjCType:@encode(id)
|
||||
at:&requestSignature];
|
||||
};
|
||||
{
|
||||
[coder decodeValueOfObjCType:@encode(id)
|
||||
at:&_responsePage];
|
||||
[coder decodeValueOfObjCType:@encode(id)
|
||||
at:&_requestSignature];
|
||||
};
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)encodeWithCoder:(NSCoder*)coder_
|
||||
-(void)encodeWithCoder:(NSCoder*)coder
|
||||
{
|
||||
[coder_ encodeObject:responsePage];
|
||||
[coder_ encodeObject:requestSignature];
|
||||
[coder encodeObject:_responsePage];
|
||||
[coder encodeObject:_requestSignature];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -90,32 +96,32 @@ static char rcsId[] = "$Id$";
|
|||
return [NSString stringWithFormat:@"<%s %p - responsePage Name=%@ requestSignature=%@>",
|
||||
object_get_class_name(self),
|
||||
(void*)self,
|
||||
[responsePage name],
|
||||
requestSignature];
|
||||
[_responsePage name],
|
||||
_requestSignature];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)isMatchingContextID:(NSString*)contextID_
|
||||
requestSenderID:(NSString*)requestSenderID_
|
||||
-(BOOL)isMatchingContextID:(NSString*)aContextID
|
||||
requestSenderID:(NSString*)aRequestSenderID
|
||||
{
|
||||
//OK?
|
||||
BOOL _matching=NO;
|
||||
NSString* _testSignature=[NSString stringWithFormat:@"%@.%@",contextID_,requestSenderID_];
|
||||
_matching=[_testSignature isEqualToString:requestSignature];
|
||||
return _matching;
|
||||
BOOL matching=NO;
|
||||
NSString* testSignature=[NSString stringWithFormat:@"%@.%@",aContextID,aRequestSenderID];
|
||||
matching=[testSignature isEqualToString:_requestSignature];
|
||||
return matching;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)setResponsePage:(GSWComponent*)responsePage_
|
||||
-(void)setResponsePage:(GSWComponent*)aResponsePage
|
||||
{
|
||||
ASSIGN(responsePage,responsePage_);
|
||||
ASSIGN(_responsePage,aResponsePage);
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWComponent*)responsePage
|
||||
{
|
||||
GSWLogAssertGood(self);
|
||||
return responsePage;
|
||||
return _responsePage;
|
||||
};
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWVBScript.h - GSWeb: Class GSWVBScript
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWVBScript.h - <title>GSWeb: Class GSWVBScript</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
#ifndef _GSWVBScript_h__
|
||||
#define _GSWVBScript_h__
|
||||
|
@ -29,10 +35,9 @@
|
|||
//OK
|
||||
//====================================================================
|
||||
@interface GSWVBScript: GSWClientSideScript
|
||||
|
||||
-(id)initWithName:(NSString*)name_
|
||||
associations:(NSDictionary*)associations_
|
||||
template:(GSWElement*)templateElement_;
|
||||
-(id)initWithName:(NSString*)aName
|
||||
associations:(NSDictionary*)associations
|
||||
template:(GSWElement*)templateElement;
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWVBScript.m - GSWeb: Class GSWVBScript
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWVBScript.m - <title>GSWeb: Class GSWVBScript</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
|
@ -19,7 +24,8 @@
|
|||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
static char rcsId[] = "$Id$";
|
||||
|
||||
|
@ -28,14 +34,28 @@ static char rcsId[] = "$Id$";
|
|||
//====================================================================
|
||||
@implementation GSWVBScript
|
||||
|
||||
-(id)initWithName:(NSString*)name_
|
||||
associations:(NSDictionary*)associations_
|
||||
template:(GSWElement*)templateElement_
|
||||
-(id)initWithName:(NSString*)aName
|
||||
associations:(NSDictionary*)associations
|
||||
template:(GSWElement*)templateElement
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
GSWAssociation* languageAssociation=nil;
|
||||
NSMutableDictionary* tmpAssociations=[NSMutableDictionary dictionaryWithDictionary:associations];
|
||||
LOGObjectFnStartC("GSWVBScript");
|
||||
NSDebugMLLog(@"gswdync",@"aName=%@ associations:%@ templateElement=%@",aName,associations,templateElement);
|
||||
if (![tmpAssociations objectForKey:language__Key])
|
||||
{
|
||||
// Create and set the language (Javascript)
|
||||
languageAssociation=[GSWConstantValueAssociation associationWithValue:@"VBScript"]; //???
|
||||
[tmpAssociations setObject:languageAssociation
|
||||
forKey:language__Key];
|
||||
};
|
||||
if ((self=[super initWithName:aName
|
||||
associations:tmpAssociations
|
||||
template:templateElement]))
|
||||
{
|
||||
};
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
|
|
|
@ -10,7 +10,7 @@ options {
|
|||
|
||||
class GSWPageDefParser extends Parser;
|
||||
options {
|
||||
exportVocab=GSWPageDef;
|
||||
/*exportVocab=GSWPageDef;*/
|
||||
buildAST=true;
|
||||
k = 4;
|
||||
}
|
||||
|
@ -95,13 +95,13 @@ mvalue:
|
|||
;
|
||||
|
||||
idref:
|
||||
(CIRC | TILDE)? (IDENT) (PIDENT)*
|
||||
(CIRC | TILDE)? (IDENT | IDENTREF ) (PIDENT | PIDENTREF)*
|
||||
;
|
||||
|
||||
class GSWPageDefLexer extends Lexer;
|
||||
options {
|
||||
k = 4;
|
||||
exportVocab=GSWPageDef;
|
||||
/*exportVocab=GSWPageDef;*/
|
||||
charVocabulary = '\3'..'\377';
|
||||
caseSensitive=true;
|
||||
filter=UNDEFINED_TOKEN;
|
||||
|
@ -155,6 +155,16 @@ PIDENT
|
|||
: POINT (IDENT | STRING)
|
||||
;
|
||||
|
||||
IDENTREF
|
||||
options { testLiterals = true; }
|
||||
: (LETTER|'_'|'@') (LETTER|'_'|DIGIT)*
|
||||
;
|
||||
|
||||
PIDENTREF
|
||||
options { testLiterals = true; }
|
||||
: POINT (IDENTREF | STRING)
|
||||
;
|
||||
|
||||
YES
|
||||
options { testLiterals = true; }
|
||||
: "YES"
|
||||
|
|
13
TODO
13
TODO
|
@ -74,6 +74,9 @@ information, not that there is nothing to do !
|
|||
invokeActionForRequest
|
||||
appendToResponse
|
||||
|
||||
* GSWClientSideScript.m
|
||||
OK. Verify
|
||||
|
||||
* GSWComponent.m
|
||||
|
||||
* GSWComponentContent.m
|
||||
|
@ -150,10 +153,7 @@ information, not that there is nothing to do !
|
|||
appendToResponse
|
||||
|
||||
* GSWJavaScript.m
|
||||
TODO:
|
||||
takeValuesFromRequest
|
||||
invokeActionForRequest
|
||||
appendToResponse
|
||||
OK. Verify
|
||||
|
||||
* GSWKeyValueAssociation
|
||||
|
||||
|
@ -243,10 +243,7 @@ information, not that there is nothing to do !
|
|||
* GSWTransactionRecord
|
||||
|
||||
* GSWVBScript.m
|
||||
TODO:
|
||||
takeValuesFromRequest
|
||||
invokeActionForRequest
|
||||
appendToResponse
|
||||
OK. Verify
|
||||
|
||||
* GSWPageDefElement.m
|
||||
OK. Finished
|
||||
|
|
Loading…
Reference in a new issue