libs-gsweb/GSWeb.framework/GSWContext.h

181 lines
5.8 KiB
C
Raw Normal View History

/* GSWContext.h - GSWeb: Class GSWContext
Copyright (C) 1999 Free Software Foundation, Inc.
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
Date: Jan 1999
This file is part of the GNUstep Web Library.
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
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
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$
#ifndef _GSWContext_h__
#define _GSWContext_h__
//====================================================================
@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;
2002-05-16 Manuel Guesdon <mguesdon@orange-concept.com> * GSWeb.framework/GSWTextField.m: o added warning in _isFormattedValueInComponent:equalToFormattedValue: o added warning in takeValuesFromRequest:inContext: * GSWeb.framework/GSWPopUpButton.m o added ElementID debugging methods o added DocStructure debugging features * GSWeb.framework/GSWSwitchComponent.m o added ElementID debugging methods o added DocStructure debugging features * GSWeb.framework/GSWRepetition.m o added ElementID debugging methods o added DocStructure debugging features o param names changes to conform to coding standards * GSWeb.framework/GSWComponentContent.m o added ElementID debugging methods o added DocStructure debugging features * GSWeb.framework/GSWComponentReference.m: o added ElementID debugging methods o added DocStructure debugging features o ivar names changes to conform to coding standards o logs * GSWeb.framework/GSWElement.m: o added ElementID debugging methods o added DocStructure debugging features o logs * GSWeb.framework/GSWElement.h o added ElementID debugging * GSWeb.framework/GSWForm.m: o added ElementID debugging o added DocStructure debugging features o logs * GSWeb.framework/GSWHTMLDynamicElement.m: o ivar names changes to conform to coding standards o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWConditional.m: o added ElementID debugging o added DocStructure debugging features o ivar names changes to conform to coding standards * GSWeb.framework/GSWConditional.h. o ivar names changes to conform to coding standards * GSWeb.framework/GSWRepetition.h. o param names changes to conform to coding standards * GSWeb.framework/GSWReset.m: o ivar names changes to conform to coding standards o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWReset.h. o ivar names changes to conform to coding standards * GSWeb.framework/GSWResponse.h/.m: o added DocStructure debugging features * GSWeb.framework/GSWContext.h/.m: o added DocStructure debugging features * GSWeb.framework/GSWSession.m: o added DocStructure debugging features * GSWeb.framework/GSWTemplateParserXML.m o logs * GSWeb.framework/GSWTemplateParser.m o logs * GSWeb.framework/GSWDisplayGroup.m: o corrected insertion bugs o added -insertAfterLastObject o added -selectFirst * GSWeb.framework/GSWDisplayGroup.h: o added -insertAfterLastObject o added -selectFirst * GSWeb.framework/GSWHTMLStaticElement.m o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWCheckBox.m o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWComponent.m o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWHTMLStaticGroup.m o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWTextField.m o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWString.m o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWSubmitButton.m o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWURLValuedElementData.m/.h: o added ElementID debugging o added DocStructure debugging features o ivar names changes to conform to coding standards * GSWeb.framework/GSWRadioButton.m o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWInput.m o added ElementID debugging o added DocStructure debugging features o logs * GSWeb.framework/GSWHyperlink.m o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWFileUpload.m o added ElementID debugging o added DocStructure debugging features git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@13661 72102866-910b-0410-8b05-ffd578937521
2002-05-16 18:01:40 +00:00
#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
NSMutableSet* _docStructureElements;
#endif
};
-(id)init;
-(void)dealloc;
+(GSWContext*)contextWithRequest:(GSWRequest*)request_;
-(id)copyWithZone:(NSZone*)zone_;
-(void)setInForm:(BOOL)_flag;
-(BOOL)isInForm;
2002-05-14 Manuel Guesdon <mguesdon@orange-concept.com> * GSWeb.framework/GSWSubmitButton.m: o corrected setActionInvoked into _setActionInvoked * GSWeb.framework/GSWGeometricRegion.h,.m: o ivar names changes to conform to coding standards o headers changed for gsdoc * GSWAssociation.h: o ivar names changes to conform to coding standards o headers changed for gsdoc * GSWAssociation.m: o ivar names changes to conform to coding standards o headers changed for gsdoc o logs * GSWForm.h,.m: o ivar names changes to conform to coding standards o headers changed for gsdoc * GSWContext.h: o Changed return type of -elementID and -senderID * GSWContext.m: o Changed return type of -elementID and -senderID * GSWDisplayGroup.m: o logs * GSWeb.framework/GSWPopUpButton.h,.m: o added count & index parameters (like GSWRepetition) * GSWTextField.m: o handling exception in takeValue * GSWText.m: o handling exception in takeValue * GSWInput.m: o corrected bug in akeValuesFromRequest:inContext: * GSWExtensionsGSW.framework: o added GSWFileUploadComponent * GSWExtensionsGSW.framework/GNUmakefile o added GSWFileUploadComponent * GSWComponent.h: o added -definitionName o ivar names changes to conform to coding standards o headers changed for gsdoc * GSWComponent.m: o added -definitionName o added exception handling for debugging purpose o ivar names changes to conform to coding standards o headers changed for gsdoc * GSWKeyValueAssociation.m: o logs * GSWConstantValueAssociation.m: o logs * GSWApplication.h: o added -saveResponsesPath * GSWApplication.m: o added -saveResponsesPath o added GSWOPT_SaveResponsesPath o added exception handling for debugging purpose * GSWConstants.h/.m: o added GSWOPT_SaveResponsesPath * GSWConfig.h: o added GSWOPTVALUE_SaveResponsesPath * GSWDefaultAdaptorThread.h: o add response saving * GSWDefaultAdaptorThread.m: o add response saving * GSWeb.framework/GSWResponse.m o added -appendDebugCommentContentString: git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@13651 72102866-910b-0410-8b05-ffd578937521
2002-05-14 11:28:50 +00:00
-(GSWElementIDString*)elementID;
-(GSWComponent*)component;
-(GSWComponent*)page;
-(GSWResponse*)response;
-(GSWRequest*)request;
-(GSWSession*)session;
-(BOOL)hasSession;
-(NSString*)senderID;
-(NSString*)contextID;
-(id)initWithRequest:(GSWRequest*)_request;
2002-05-16 Manuel Guesdon <mguesdon@orange-concept.com> * GSWeb.framework/GSWTextField.m: o added warning in _isFormattedValueInComponent:equalToFormattedValue: o added warning in takeValuesFromRequest:inContext: * GSWeb.framework/GSWPopUpButton.m o added ElementID debugging methods o added DocStructure debugging features * GSWeb.framework/GSWSwitchComponent.m o added ElementID debugging methods o added DocStructure debugging features * GSWeb.framework/GSWRepetition.m o added ElementID debugging methods o added DocStructure debugging features o param names changes to conform to coding standards * GSWeb.framework/GSWComponentContent.m o added ElementID debugging methods o added DocStructure debugging features * GSWeb.framework/GSWComponentReference.m: o added ElementID debugging methods o added DocStructure debugging features o ivar names changes to conform to coding standards o logs * GSWeb.framework/GSWElement.m: o added ElementID debugging methods o added DocStructure debugging features o logs * GSWeb.framework/GSWElement.h o added ElementID debugging * GSWeb.framework/GSWForm.m: o added ElementID debugging o added DocStructure debugging features o logs * GSWeb.framework/GSWHTMLDynamicElement.m: o ivar names changes to conform to coding standards o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWConditional.m: o added ElementID debugging o added DocStructure debugging features o ivar names changes to conform to coding standards * GSWeb.framework/GSWConditional.h. o ivar names changes to conform to coding standards * GSWeb.framework/GSWRepetition.h. o param names changes to conform to coding standards * GSWeb.framework/GSWReset.m: o ivar names changes to conform to coding standards o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWReset.h. o ivar names changes to conform to coding standards * GSWeb.framework/GSWResponse.h/.m: o added DocStructure debugging features * GSWeb.framework/GSWContext.h/.m: o added DocStructure debugging features * GSWeb.framework/GSWSession.m: o added DocStructure debugging features * GSWeb.framework/GSWTemplateParserXML.m o logs * GSWeb.framework/GSWTemplateParser.m o logs * GSWeb.framework/GSWDisplayGroup.m: o corrected insertion bugs o added -insertAfterLastObject o added -selectFirst * GSWeb.framework/GSWDisplayGroup.h: o added -insertAfterLastObject o added -selectFirst * GSWeb.framework/GSWHTMLStaticElement.m o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWCheckBox.m o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWComponent.m o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWHTMLStaticGroup.m o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWTextField.m o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWString.m o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWSubmitButton.m o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWURLValuedElementData.m/.h: o added ElementID debugging o added DocStructure debugging features o ivar names changes to conform to coding standards * GSWeb.framework/GSWRadioButton.m o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWInput.m o added ElementID debugging o added DocStructure debugging features o logs * GSWeb.framework/GSWHyperlink.m o added ElementID debugging o added DocStructure debugging features * GSWeb.framework/GSWFileUpload.m o added ElementID debugging o added DocStructure debugging features git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@13661 72102866-910b-0410-8b05-ffd578937521
2002-05-16 18:01:40 +00:00
#ifndef NDEBUG
-(void)incrementLoopLevel; //ForDebugging purpose: each repetition increment and next decrement it
-(void)decrementLoopLevel;
-(BOOL)isInLoop;
-(void)addToDocStructureElement:(id)element;
-(void)addDocStructureStep:(NSString*)stepLabel;
-(NSString*)docStructure;
#endif
@end
//====================================================================
@interface GSWContext (GSWURLGeneration)
-(GSWDynamicURLString*)directActionURLForActionNamed:(NSString*)actionName_
queryDictionary:(NSDictionary*)queryDictionary_;
-(GSWDynamicURLString*)componentActionURL;
-(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_;
@end
//====================================================================
@interface GSWContext (GSWContextA)
-(id)_initWithContextID:(unsigned int)context_ID;
@end
//====================================================================
@interface GSWContext (GSWContextB)
-(BOOL)_isMultipleSubmitForm;
-(void)_setIsMultipleSubmitForm:(BOOL)_flag;
-(BOOL)_wasActionInvoked;
-(void)_setActionInvoked:(BOOL)_flag;
-(BOOL)_wasFormSubmitted;
-(void)_setFormSubmitted:(BOOL)_flag;
-(void)_putAwakeComponentsToSleep;
-(void)_generateCompleteURLs;
-(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)_synchronizeForDistribution;
-(void)_incrementContextID;
-(GSWSession*)existingSession;
-(void)_setCurrentComponent:(GSWComponent*)_component;
-(void)_setPageReplaced:(BOOL)_flag;
-(BOOL)_pageReplaced;
-(void)_setPageChanged:(BOOL)_flag;
-(BOOL)_pageChanged;
-(void)_setRequestSessionID:(NSString*)_sessionID;
-(NSString*)_requestSessionID;
-(void)_takeAwakeComponentsFromArray:(id)_unknwon;
-(void)_takeAwakeComponent:(GSWComponent*)_component;
@end
//====================================================================
@interface GSWContext (GSWContextC)
-(void)deleteAllElementIDComponents;
-(void)deleteLastElementIDComponent;
-(void)incrementLastElementIDComponent;
-(void)appendElementIDComponent:(NSString*)string_;
-(void)appendZeroElementIDComponent;
@end
//====================================================================
@interface GSWContext (GSWContextD)
-(NSString*)url;
-(NSString*)urlSessionPrefix;
-(GSWApplication*)application;
-(void)setDistributionEnabled:(BOOL)flag_;
-(BOOL)isDistributionEnabled;
@end
//====================================================================
@interface GSWContext (GSWContextGSWeb)
-(BOOL)isValidate;
-(void)setValidate:(BOOL)isValidate_;
@end
#endif //_GSWContext_h__