mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-04-23 15:33:43 +00:00
2002-03-07 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWAdaptor.h/.m: o added -isMultiThreadEnabled o method parameters names changes to conform to coding standards * GSWeb.framework/GSWResponse.h: o method parameters names changes to conform to coding standards o added missing method declarations * GSWeb.framework/GSWTemplateParserXML.m: o remove some 'error' messages from xml parser * GSWExtensions.framework/Makefile.preamble: o various changes (debug flags,...) * GSWExtensionsGSW.framework/Makefile.preamble: o various changes (debug flags,...) * GSWeb.framework/Makefile.preamble: o various changes (debug flags,libwrap,...) * GSWeb.framework/GSWDebug.h: o debug flags changes * GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd: o change .gif to .mng * GSWExtensions.framework/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.gswd: o change .gif to .mng * GSWExtensions.framework/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.gswd: o change .gif to .mng * GSWeb.framework/GSWConfig.h: added GSWOPTVALUE_AdaptorHost * GSWeb.framework/GSWConstants.h/.m: added GSWOPT_AdaptorHost * GSWeb.framework/GSWApplication.m: added GSWOPT_AdaptorHost default value * GSWeb.framework/GSWDefaultAdaptor.h/.m: o adding connection refuse feature o added ivar adaptorHost o added host and port in "Waiting for connections" message o ivar names changes to conform to coding standards * GSWeb.framework/GSWDefaultAdaptorThread.m: o adding connection refuse feature o ivar names changes to conform to coding standards * GSWeb.framework/GSWComponent.m: o logs * GSWeb.framework/GSWDeployedBundle.m: o Search WebServer resources in Resources/WebServer/ instead of WebServerResources * GSWeb.framework/GSWProjectBundle.m o bug fix for wonames * GSWExtensions.framework/GSWDictionaryRepetition.h/m: o ivar names changes to conform to coding standards * GSWExtensions.framework/GSWCollapsibleComponentContent.h/.m: o ivar names changes to conform to coding standards * GSWExtensions.framework/GSWExceptionPage.h/.m: o ivar names changes to conform to coding standards * GSWExtensions.framework/GSWIFrame.m: o ivar names changes to conform to coding standards * GSWExtensions.framework/GSWMetaRefresh.m: o ivar names changes to conform to coding standards * GSWExtensions.framework/GSWPageRestorationErrorPage.h/.m: o ivar names changes to conform to coding standards * GSWExtensions.framework/GSWRedirect.h/.m: o ivar names changes to conform to coding standards * GSWExtensions.framework/GSWSessionRestorationErrorPage.h/.m: o ivar names changes to conform to coding standards * GSWExtensions.framework/GSWSessionCreationErrorPage.h/.m: o ivar names changes to conform to coding standards * GSWExtensions.framework/GSWStatsPage.h/.m: o ivar names changes to conform to coding standards * GSWExtensionsGSW.framework/GSWFileUploadFormComponent.h/.m: o ivar names changes to conform to coding standards * GSWExtensionsGSW.framework/GSWSimpleFormComponent.h/.m: o ivar names changes to conform to coding standards * GSWExtensionsGSW.framework/GSWTabComponent.m: o ivar names changes to conform to coding standards * GSWExtensionsGSW.framework/GSWValidationFailureComponent.h/.m: o ivar names changes to conform to coding standards git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@13029 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
196bfbf7e1
commit
a34ef71f50
63 changed files with 3013 additions and 1708 deletions
70
ChangeLog
70
ChangeLog
|
@ -1,3 +1,73 @@
|
|||
2002-03-07 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
|
||||
* GSWeb.framework/GSWAdaptor.h/.m:
|
||||
o added -isMultiThreadEnabled
|
||||
o method parameters names changes to conform to coding standards
|
||||
* GSWeb.framework/GSWResponse.h:
|
||||
o method parameters names changes to conform to coding standards
|
||||
o added missing method declarations
|
||||
* GSWeb.framework/GSWTemplateParserXML.m:
|
||||
o remove some 'error' messages from xml parser
|
||||
* GSWExtensions.framework/Makefile.preamble:
|
||||
o various changes (debug flags,...)
|
||||
* GSWExtensionsGSW.framework/Makefile.preamble:
|
||||
o various changes (debug flags,...)
|
||||
* GSWeb.framework/Makefile.preamble:
|
||||
o various changes (debug flags,libwrap,...)
|
||||
* GSWeb.framework/GSWDebug.h:
|
||||
o debug flags changes
|
||||
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
|
||||
o change .gif to .mng
|
||||
* GSWExtensions.framework/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.gswd:
|
||||
o change .gif to .mng
|
||||
* GSWExtensions.framework/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.gswd:
|
||||
o change .gif to .mng
|
||||
* GSWeb.framework/GSWConfig.h: added GSWOPTVALUE_AdaptorHost
|
||||
* GSWeb.framework/GSWConstants.h/.m: added GSWOPT_AdaptorHost
|
||||
* GSWeb.framework/GSWApplication.m: added GSWOPT_AdaptorHost default value
|
||||
* GSWeb.framework/GSWDefaultAdaptor.h/.m:
|
||||
o adding connection refuse feature
|
||||
o added ivar adaptorHost
|
||||
o added host and port in "Waiting for connections" message
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWeb.framework/GSWDefaultAdaptorThread.m:
|
||||
o adding connection refuse feature
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWeb.framework/GSWComponent.m:
|
||||
o logs
|
||||
* GSWeb.framework/GSWDeployedBundle.m:
|
||||
o Search WebServer resources in Resources/WebServer/ instead of WebServerResources
|
||||
* GSWeb.framework/GSWProjectBundle.m
|
||||
o bug fix for wonames
|
||||
* GSWExtensions.framework/GSWDictionaryRepetition.h/m:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWExtensions.framework/GSWCollapsibleComponentContent.h/.m:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWExtensions.framework/GSWExceptionPage.h/.m:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWExtensions.framework/GSWIFrame.m:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWExtensions.framework/GSWMetaRefresh.m:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWExtensions.framework/GSWPageRestorationErrorPage.h/.m:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWExtensions.framework/GSWRedirect.h/.m:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWExtensions.framework/GSWSessionRestorationErrorPage.h/.m:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWExtensions.framework/GSWSessionCreationErrorPage.h/.m:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWExtensions.framework/GSWStatsPage.h/.m:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWExtensionsGSW.framework/GSWFileUploadFormComponent.h/.m:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWExtensionsGSW.framework/GSWSimpleFormComponent.h/.m:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWExtensionsGSW.framework/GSWTabComponent.m:
|
||||
o ivar names changes to conform to coding standards
|
||||
* GSWExtensionsGSW.framework/GSWValidationFailureComponent.h/.m:
|
||||
o ivar names changes to conform to coding standards
|
||||
|
||||
2002-02-22 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* GSWExtensions.framework/WebServerResources/error.gif: Change to
|
||||
|
|
|
@ -141,8 +141,26 @@ GSWStatsPage.h
|
|||
#GSWBatchNavigationBar.h
|
||||
|
||||
SRCS = $(LIBRARY_NAME:=.m)
|
||||
|
||||
HDRS = $(LIBRARY_NAME:=.h)
|
||||
GSWExtensions_AUTOGSDOC_HEADERS = $(GSWExtensions_HEADER_FILES)
|
||||
GSWExtensions_AUTOGSDOC_SOURCE = $(GSWExtensions_OBJC_FILES)
|
||||
DOCUMENT_NAME = GSWExtensions
|
||||
GSWExtensions_HEADER_FILES_DIR = $(HEADER_DIR)
|
||||
GSWExtensions_AGSDOC_FILES = gswextensions.gsdoc $(GSWExtensions_AUTOGSDOC_HEADERS)
|
||||
#$(GSWExtensions_AUTOGSDOC_SOURCE)
|
||||
GSWExtensions_AGSDOC_FLAGS = \
|
||||
-Declared Foundation \
|
||||
-Standards YES \
|
||||
-SystemProjects System \
|
||||
-Project gswextensions \
|
||||
-WordMap '{\
|
||||
FOUNDATION_EXPORT=extern;FOUNDATION_STATIC_INLINE="";\
|
||||
GS_GEOM_SCOPE=extern;GS_GEOM_ATTR="";\
|
||||
GS_EXPORT=extern;GS_DECLARE="";\
|
||||
GS_RANGE_SCOPE=extern;GS_RANGE_ATTR="";\
|
||||
GS_ZONE_SCOPE=extern;GS_ZONE_ATTR="";\
|
||||
}' -Up gswextensions
|
||||
|
||||
|
||||
#DIST_FILES = $(SRCS) $(HDRS) GNUmakefile Makefile.postamble Makefile.preamble
|
||||
|
||||
|
@ -152,6 +170,9 @@ HDRS = $(LIBRARY_NAME:=.h)
|
|||
-include GNUmakefile.local
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/framework.make
|
||||
ifeq ($(doc),yes)
|
||||
include $(GNUSTEP_MAKEFILES)/documentation.make
|
||||
endif
|
||||
|
||||
-include Makefile.postamble
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GSWCollapsibleComponentContent.h - GSWeb: Class GSWCollapsibleComponentContent
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Apr 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -28,12 +28,12 @@
|
|||
//==============================================================================
|
||||
@interface GSWCollapsibleComponentContent: GSWComponent
|
||||
{
|
||||
BOOL isVisibleConditionPassed;
|
||||
BOOL isVisible;
|
||||
NSString* openedImageFileName;
|
||||
NSString* closedImageFileName;
|
||||
NSString* openedHelpString;
|
||||
NSString* closedHelpString;
|
||||
BOOL _isVisibleConditionPassed;
|
||||
BOOL _isVisible;
|
||||
NSString* _openedImageFileName;
|
||||
NSString* _closedImageFileName;
|
||||
NSString* _openedHelpString;
|
||||
NSString* _closedHelpString;
|
||||
};
|
||||
|
||||
-(void)awake;
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWCollapsibleComponentContent.m - GSWeb: Class GSWCollapsibleComponentContent
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWCollapsibleComponentContent.m - <title>GSWeb: Class GSWCollapsibleComponentContent</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: Apr 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
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 +25,11 @@
|
|||
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$";
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
#include "GSWCollapsibleComponentContent.h"
|
||||
|
||||
|
@ -40,10 +50,10 @@
|
|||
{
|
||||
GSWLogC("Dealloc GSWCollopsibleComponent");
|
||||
GSWLogC("Dealloc GSWCollopsibleComponent Super");
|
||||
DESTROY(openedImageFileName);
|
||||
DESTROY(closedImageFileName);
|
||||
DESTROY(openedHelpString);
|
||||
DESTROY(closedHelpString);
|
||||
DESTROY(_openedImageFileName);
|
||||
DESTROY(_closedImageFileName);
|
||||
DESTROY(_openedHelpString);
|
||||
DESTROY(_closedHelpString);
|
||||
[super dealloc];
|
||||
GSWLogC("End Dealloc GSWCollopsibleComponent");
|
||||
};
|
||||
|
@ -56,26 +66,26 @@
|
|||
-(BOOL)isVisible
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLog(@"isVisibleConditionPassed=%s",(isVisibleConditionPassed ? "YES" : "NO"));
|
||||
if (!isVisibleConditionPassed)
|
||||
NSDebugMLog(@"_isVisibleConditionPassed=%s",(_isVisibleConditionPassed ? "YES" : "NO"));
|
||||
if (!_isVisibleConditionPassed)
|
||||
{
|
||||
isVisible=boolValueFor([self valueForBinding:@"condition"]);
|
||||
isVisibleConditionPassed=YES;
|
||||
_isVisible=boolValueFor([self valueForBinding:@"condition"]);
|
||||
_isVisibleConditionPassed=YES;
|
||||
};
|
||||
NSDebugMLog(@"isVisible=%s",(isVisible ? "YES" : "NO"));
|
||||
NSDebugMLog(@"_isVisible=%s",(_isVisible ? "YES" : "NO"));
|
||||
LOGObjectFnStop();
|
||||
return isVisible;
|
||||
return _isVisible;
|
||||
};
|
||||
|
||||
-(GSWComponent*)toggleVisibilityAction
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLog(@"isVisible=%s",(isVisible ? "YES" : "NO"));
|
||||
isVisible = ![self isVisible];
|
||||
NSDebugMLog(@"isVisible=%s",(isVisible ? "YES" : "NO"));
|
||||
NSDebugMLog(@"_isVisible=%s",(_isVisible ? "YES" : "NO"));
|
||||
_isVisible = ![self isVisible];
|
||||
NSDebugMLog(@"_isVisible=%s",(_isVisible ? "YES" : "NO"));
|
||||
if ([self hasBinding:@"visibility"])
|
||||
{
|
||||
[self setValue:[NSNumber numberWithBool:isVisible]
|
||||
[self setValue:[NSNumber numberWithBool:_isVisible]
|
||||
forBinding:@"visibility"];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
|
@ -88,30 +98,30 @@
|
|||
LOGObjectFnStart();
|
||||
if ([self isVisible])
|
||||
{
|
||||
if (!openedImageFileName)
|
||||
if (!_openedImageFileName)
|
||||
{
|
||||
if ([self hasBinding:@"openedImageFileName"])
|
||||
ASSIGN(openedImageFileName,[self valueForBinding:@"openedImageFileName"]);
|
||||
ASSIGN(_openedImageFileName,[self valueForBinding:@"openedImageFileName"]);
|
||||
else if ([self hasBinding:@"helpString"])
|
||||
ASSIGN(openedImageFileName,[self valueForBinding:@"helpString"]);
|
||||
ASSIGN(_openedImageFileName,[self valueForBinding:@"helpString"]);
|
||||
else
|
||||
ASSIGN(openedImageFileName,@"DownTriangle.png");
|
||||
ASSIGN(_openedImageFileName,@"DownTriangle.png");
|
||||
};
|
||||
_image=openedImageFileName;
|
||||
_image=_openedImageFileName;
|
||||
}
|
||||
else
|
||||
{
|
||||
NSDebugMLog(@"closedImageFileName=%@",closedImageFileName);
|
||||
if (!closedImageFileName)
|
||||
NSDebugMLog(@"_closedImageFileName=%@",_closedImageFileName);
|
||||
if (!_closedImageFileName)
|
||||
{
|
||||
if ([self hasBinding:@"closedImageFileName"])
|
||||
ASSIGN(closedImageFileName,[self valueForBinding:@"closedImageFileName"]);
|
||||
ASSIGN(_closedImageFileName,[self valueForBinding:@"closedImageFileName"]);
|
||||
else if ([self hasBinding:@"helpString"])
|
||||
ASSIGN(closedImageFileName,[self valueForBinding:@"helpString"]);
|
||||
ASSIGN(_closedImageFileName,[self valueForBinding:@"helpString"]);
|
||||
else
|
||||
ASSIGN(closedImageFileName,@"RightTriangle.png");
|
||||
ASSIGN(_closedImageFileName,@"RightTriangle.png");
|
||||
};
|
||||
_image=closedImageFileName;
|
||||
_image=_closedImageFileName;
|
||||
};
|
||||
NSDebugMLog(@"_image=%@",_image);
|
||||
LOGObjectFnStop();
|
||||
|
@ -147,29 +157,29 @@
|
|||
LOGObjectFnStart();
|
||||
if ([self isVisible])
|
||||
{
|
||||
if (!openedHelpString)
|
||||
if (!_openedHelpString)
|
||||
{
|
||||
if ([self hasBinding:@"openedHelpString"])
|
||||
ASSIGN(openedHelpString,[self valueForBinding:@"openedHelpString"]);
|
||||
ASSIGN(_openedHelpString,[self valueForBinding:@"openedHelpString"]);
|
||||
else if ([self hasBinding:@"helpString"])
|
||||
ASSIGN(openedHelpString,[self valueForBinding:@"helpString"]);
|
||||
ASSIGN(_openedHelpString,[self valueForBinding:@"helpString"]);
|
||||
else
|
||||
ASSIGN(openedHelpString,@"Click to collapse");
|
||||
ASSIGN(_openedHelpString,@"Click to collapse");
|
||||
};
|
||||
_helpString=openedHelpString;
|
||||
_helpString=_openedHelpString;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!closedHelpString)
|
||||
if (!_closedHelpString)
|
||||
{
|
||||
if ([self hasBinding:@"closedHelpString"])
|
||||
ASSIGN(closedHelpString,[self valueForBinding:@"closedHelpString"]);
|
||||
ASSIGN(_closedHelpString,[self valueForBinding:@"closedHelpString"]);
|
||||
else if ([self hasBinding:@"helpString"])
|
||||
ASSIGN(closedHelpString,[self valueForBinding:@"helpString"]);
|
||||
ASSIGN(_closedHelpString,[self valueForBinding:@"helpString"]);
|
||||
else
|
||||
ASSIGN(closedHelpString,@"Click to expand");
|
||||
ASSIGN(_closedHelpString,@"Click to expand");
|
||||
};
|
||||
_helpString=closedHelpString;
|
||||
_helpString=_closedHelpString;
|
||||
};
|
||||
NSDebugMLog(@"_helpString=%@",_helpString);
|
||||
LOGObjectFnStop();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GSWDictionaryRepetition.h - GSWeb: Class GSWDictionaryRepetition
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Apr 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -28,8 +28,8 @@
|
|||
//====================================================================
|
||||
@interface GSWDictionaryRepetition: GSWComponent
|
||||
{
|
||||
NSArray* keyList;
|
||||
NSDictionary* dictionary;
|
||||
NSArray* _keyList;
|
||||
NSDictionary* _dictionary;
|
||||
};
|
||||
|
||||
-(id)init;
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWDictionaryRepetition.m - GSWeb: Class GSWDictionaryRepetition
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWDictionaryRepetition.m - <title>GSWeb: Class GSWDictionaryRepetition</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: Apr 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
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 +25,11 @@
|
|||
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$";
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
#include "GSWDictionaryRepetition.h"
|
||||
|
||||
|
@ -43,8 +53,8 @@
|
|||
|
||||
-(void)dealloc
|
||||
{
|
||||
DESTROY(keyList);
|
||||
DESTROY(dictionary);
|
||||
DESTROY(_keyList);
|
||||
DESTROY(_dictionary);
|
||||
[super dealloc];
|
||||
};
|
||||
|
||||
|
@ -55,20 +65,20 @@
|
|||
|
||||
-(NSDictionary*)dictionary
|
||||
{
|
||||
if (!dictionary)
|
||||
if (!_dictionary)
|
||||
{
|
||||
ASSIGN(dictionary,[self valueForBinding:@"dictionary"]);
|
||||
ASSIGN(_dictionary,[self valueForBinding:@"dictionary"]);
|
||||
};
|
||||
return dictionary;
|
||||
return _dictionary;
|
||||
};
|
||||
|
||||
-(NSArray*)keyList
|
||||
{
|
||||
if (!keyList)
|
||||
if (!_keyList)
|
||||
{
|
||||
ASSIGN(keyList,[[self dictionary] allKeys]);
|
||||
ASSIGN(_keyList,[[self dictionary] allKeys]);
|
||||
};
|
||||
return keyList;
|
||||
return _keyList;
|
||||
};
|
||||
|
||||
-(id)currentKey
|
||||
|
@ -76,12 +86,15 @@
|
|||
return nil;
|
||||
};
|
||||
|
||||
-(void)setCurrentKey:(id)key_
|
||||
-(void)setCurrentKey:(id)key
|
||||
{
|
||||
id _value = [[self dictionary] objectForKey:key_];
|
||||
[self setValue:key_
|
||||
id value = nil;
|
||||
NSDebugMLLog(@"gswdync",@"key=%@",key);
|
||||
value=[[self dictionary] objectForKey:key];
|
||||
NSDebugMLLog(@"gswdync",@"value=%@",value);
|
||||
[self setValue:key
|
||||
forBinding:@"key"];
|
||||
[self setValue:_value
|
||||
[self setValue:value
|
||||
forBinding:@"item"];
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
ExclamationImage: GSWImage
|
||||
{
|
||||
filename = "exclamation.gif";
|
||||
filename = "exclamation.png";
|
||||
framework = "GSWExtensions";
|
||||
border = 0;
|
||||
}
|
||||
|
|
|
@ -18,26 +18,26 @@
|
|||
<hr>
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td align="RIGHT" Valign="TOP">
|
||||
<td align="RIGHT" Valign="MIDDLE">
|
||||
<b>Application:</b>
|
||||
</td>
|
||||
<td align="LEFT" Valign="TOP">
|
||||
<td align="LEFT" Valign="MIDDLE">
|
||||
<PRE><gsweb name="ApplicationNameString"></gsweb></PRE>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="RIGHT" Valign="TOP">
|
||||
<td align="RIGHT" Valign="MIDDLE">
|
||||
<b>Error:</b>
|
||||
</td>
|
||||
<td align="LEFT" Valign="TOP">
|
||||
<td align="LEFT" Valign="MIDDLE">
|
||||
<PRE><gsweb name="ExceptionNameString"></gsweb></PRE>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="RIGHT" Valign="TOP">
|
||||
<td align="RIGHT" Valign="MIDDLE">
|
||||
<b>Reason:</b>
|
||||
</td>
|
||||
<td align="LEFT" Valign="TOP">
|
||||
<td align="LEFT" Valign="MIDDLE">
|
||||
<gsweb name="ReasonRepetition">
|
||||
<PRE><gsweb name="ReasonString"></gsweb></PRE><br>
|
||||
</gsweb>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GSWExceptionPage.h - GSWeb: Class GSWExceptionPage
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Apr 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -28,20 +28,20 @@
|
|||
//==============================================================================
|
||||
@interface GSWExceptionPage: GSWComponent
|
||||
{
|
||||
NSString* tmpReason;
|
||||
NSString* _tmpReason;
|
||||
|
||||
NSString* tmpUserInfoKey;
|
||||
NSString* tmpUserInfoValue;
|
||||
NSString* _tmpUserInfoKey;
|
||||
NSString* _tmpUserInfoValue;
|
||||
|
||||
NSException* exception;
|
||||
NSArray* reasons;
|
||||
NSException* _exception;
|
||||
NSArray* _reasons;
|
||||
};
|
||||
|
||||
-(void)dealloc;
|
||||
-(NSArray*)getReasons;
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)setException:(NSException*)exception_;
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)context;
|
||||
-(void)setException:(NSException*)exception;
|
||||
@end
|
||||
|
||||
#endif // _GSWExceptionPage_h__
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWExceptionPage.m - GSWeb: Class GSWExceptionPage
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWExceptionPage.m - <title>GSWeb: Class GSWExceptionPage</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: Apr 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
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 +25,11 @@
|
|||
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$";
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
#include "GSWExceptionPage.h"
|
||||
|
||||
|
@ -29,9 +39,9 @@
|
|||
-(void)dealloc
|
||||
{
|
||||
GSWLogC("Dealloc GSWExceptionPage\n");
|
||||
DESTROY(exception);
|
||||
DESTROY(_exception);
|
||||
GSWLogC("Dealloc GSWExceptionPage reasons\n");
|
||||
DESTROY(reasons);
|
||||
DESTROY(_reasons);
|
||||
GSWLogC("Dealloc GSWExceptionPage super\n");
|
||||
[super dealloc];
|
||||
GSWLogC("Dealloc GSWExceptionPage end\n");
|
||||
|
@ -49,32 +59,32 @@
|
|||
|
||||
-(NSArray*)getReasons
|
||||
{
|
||||
if (!reasons)
|
||||
if (!_reasons)
|
||||
{
|
||||
ASSIGN(reasons,[[exception reason] componentsSeparatedByString:@"\n"]);
|
||||
ASSIGN(_reasons,[[_exception reason] componentsSeparatedByString:@"\n"]);
|
||||
};
|
||||
return reasons;
|
||||
return _reasons;
|
||||
};
|
||||
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
[super appendToResponse:response_
|
||||
inContext:context_];
|
||||
[response_ disableClientCaching];
|
||||
[super appendToResponse:response
|
||||
inContext:aContext];
|
||||
[response disableClientCaching];
|
||||
};
|
||||
|
||||
-(void)setException:(NSException*)exception_
|
||||
-(void)setException:(NSException*)exception
|
||||
{
|
||||
ASSIGN(exception,exception_);
|
||||
ASSIGN(_exception,exception);
|
||||
};
|
||||
|
||||
-(id)getTmpUserInfoValue
|
||||
{
|
||||
//If array, print it nicely
|
||||
if ([tmpUserInfoValue isKindOfClass:[NSArray class]])
|
||||
return [tmpUserInfoValue componentsJoinedByString:@"\n"];
|
||||
if ([_tmpUserInfoValue isKindOfClass:[NSArray class]])
|
||||
return [(NSArray*)_tmpUserInfoValue componentsJoinedByString:@"\n"];
|
||||
else
|
||||
return tmpUserInfoValue;
|
||||
return _tmpUserInfoValue;
|
||||
}
|
||||
@end
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWIFrame.m - GSWeb: Class GSWIFrame
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWIFrame.m - <title>GSWeb: Class GSWIFrame</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: Apr 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
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 +25,11 @@
|
|||
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$";
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
#include "GSWIFrame.h"
|
||||
|
||||
|
@ -33,25 +43,25 @@
|
|||
|
||||
-(NSString*)srcUrl
|
||||
{
|
||||
NSString* _src=nil;
|
||||
NSString* src=nil;
|
||||
if ([self hasBinding:@"src"])
|
||||
_src=[self valueForBinding:@"src"];
|
||||
src=[self valueForBinding:@"src"];
|
||||
else if ([self hasBinding:@"pageName"] || [self hasBinding:@"value"])
|
||||
_src=[[self context]componentActionURL];
|
||||
return _src;
|
||||
src=[[self context]componentActionURL];
|
||||
return src;
|
||||
};
|
||||
|
||||
-(GSWElement*)getFrameContent
|
||||
{
|
||||
GSWElement* _element=nil;
|
||||
GSWElement* element=nil;
|
||||
if ([self hasBinding:@"pageName"])
|
||||
{
|
||||
NSString* _pageName = [self valueForBinding:@"pageName"];
|
||||
_element=[self pageWithName:_pageName];
|
||||
{
|
||||
NSString* pageName = [self valueForBinding:@"pageName"];
|
||||
element=[self pageWithName:pageName];
|
||||
}
|
||||
else
|
||||
_element = [self valueForBinding:@"value"];
|
||||
return _element;
|
||||
element = [self valueForBinding:@"value"];
|
||||
return element;
|
||||
};
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWMetaRefresh.m - GSWeb: Class GSWMetaRefresh
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWMetaRefresh.m - <title>GSWeb: Class GSWMetaRefresh</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: Apr 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
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 +25,11 @@
|
|||
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$";
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
#include "GSWMetaRefresh.h"
|
||||
|
||||
|
@ -32,24 +42,24 @@
|
|||
|
||||
-(NSString*)contentString
|
||||
{
|
||||
NSNumber* _seconds = [self valueForBinding:@"seconds"];
|
||||
NSString* _contentString = [NSString stringWithFormat:@"%@;url=%@",
|
||||
[_seconds description],
|
||||
[[self context]componentActionURL]];
|
||||
return _contentString;
|
||||
NSNumber* seconds = [self valueForBinding:@"seconds"];
|
||||
NSString* contentString = [NSString stringWithFormat:@"%@;url=%@",
|
||||
[seconds description],
|
||||
[[self context]componentActionURL]];
|
||||
return contentString;
|
||||
};
|
||||
|
||||
-(GSWComponent*)invokeAction
|
||||
{
|
||||
GSWComponent* _component = nil;
|
||||
GSWComponent* component = nil;
|
||||
if ([self hasBinding:@"pageName"])
|
||||
{
|
||||
NSString* _pageName = [self valueForBinding:@"pageName"];
|
||||
_component = [self pageWithName:_pageName];
|
||||
{
|
||||
NSString* pageName = [self valueForBinding:@"pageName"];
|
||||
component = [self pageWithName:pageName];
|
||||
}
|
||||
else
|
||||
_component = [self valueForBinding:@"action"];
|
||||
return _component;
|
||||
component = [self valueForBinding:@"action"];
|
||||
return component;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
ExclamationImage: GSWImage
|
||||
{
|
||||
filename = "exclamation.gif";
|
||||
filename = "exclamation.mng";
|
||||
framework = "GSWExtensions";
|
||||
border = 0;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GSWPageRestorationErrorPage.h - GSWeb: Class GSWPageRestorationErrorPage
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Apr 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -27,8 +27,8 @@
|
|||
|
||||
//==============================================================================
|
||||
@interface GSWPageRestorationErrorPage: GSWComponent
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)aContext;
|
||||
@end
|
||||
|
||||
#endif // _GSWPageRestorationErrorPage_h__
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWPageRestorationErrorPage.m - GSWeb: Class GSWPageRestorationErrorPage
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWPageRestorationErrorPage.m - <title>GSWeb: Class GSWPageRestorationErrorPage</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: Apr 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
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 +25,11 @@
|
|||
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$";
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
#include "GSWPageRestorationErrorPage.h"
|
||||
|
||||
|
@ -36,12 +46,12 @@
|
|||
[super sleep];
|
||||
};
|
||||
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
[super appendToResponse:response_
|
||||
inContext:context_];
|
||||
[response_ disableClientCaching];
|
||||
[super appendToResponse:response
|
||||
inContext:aContext];
|
||||
[response disableClientCaching];
|
||||
};
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GSWRedirect.h - GSWeb: Class GSWRedirect
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Apr 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -28,18 +28,18 @@
|
|||
//==============================================================================
|
||||
@interface GSWRedirect : GSWComponent
|
||||
{
|
||||
NSString* url;
|
||||
BOOL permanent;
|
||||
NSString* _url;
|
||||
BOOL _permanent;
|
||||
};
|
||||
|
||||
-(void)awake;
|
||||
-(void)sleep;
|
||||
-(void)dealloc;
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)setURL:(NSString*)url_;
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)aContext;
|
||||
-(void)setURL:(NSString*)url;
|
||||
-(NSString*)url;
|
||||
-(void)setPermanent:(BOOL)permanent_;
|
||||
-(void)setPermanent:(BOOL)permanent;
|
||||
-(BOOL)permanent;
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWRedirect.m - GSWeb: Class GSWRedirect
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWRedirect.m - <title>GSWeb: Class GSWRedirect</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: Apr 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
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 +25,10 @@
|
|||
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$";
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
#include "GSWRedirect.h"
|
||||
|
@ -39,40 +48,40 @@
|
|||
|
||||
-(void)dealloc
|
||||
{
|
||||
DESTROY(url);
|
||||
DESTROY(_url);
|
||||
[super dealloc];
|
||||
};
|
||||
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
// [response_ appendContentHTMLAttributeValue:url];
|
||||
[response_ setHeader:url
|
||||
forKey:@"location"];
|
||||
if (permanent)
|
||||
[response_ setStatus:301];
|
||||
[response setHeader:_url
|
||||
forKey:@"location"];
|
||||
if (_permanent)
|
||||
[response setStatus:301];
|
||||
else
|
||||
[response_ setStatus:302];
|
||||
[response setStatus:302];
|
||||
};
|
||||
|
||||
-(void)setURL:(NSString*)url_
|
||||
-(void)setURL:(NSString*)url
|
||||
{
|
||||
ASSIGN(url,url_);
|
||||
ASSIGN(_url,url);
|
||||
};
|
||||
|
||||
-(NSString*)url
|
||||
{
|
||||
return url;
|
||||
return _url;
|
||||
};
|
||||
|
||||
-(void)setPermanent:(BOOL)permanent_
|
||||
-(void)setPermanent:(BOOL)permanent
|
||||
{
|
||||
permanent = permanent_;
|
||||
_permanent = permanent;
|
||||
};
|
||||
|
||||
-(BOOL)permanent
|
||||
{
|
||||
return permanent;
|
||||
return _permanent;
|
||||
};
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
ExclamationImage: GSWImage
|
||||
{
|
||||
filename = "exclamation.gif";
|
||||
filename = "exclamation.mng";
|
||||
framework = "GSWExtensions";
|
||||
border = 0;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GSWSessionCreationErrorPage.h - GSWeb: Class GSWSessionCreationErrorPage
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Apr 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -27,8 +27,8 @@
|
|||
|
||||
//==============================================================================
|
||||
@interface GSWSessionCreationErrorPage: GSWComponent
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)aContext;
|
||||
@end
|
||||
|
||||
#endif // _GSWSessionCreationErrorPage_h__
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWSessionCreationErrorPage.m - GSWeb: Class GSWSessionCreationErrorPage
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWSessionCreationErrorPage.m - <title>GSWeb: Class GSWSessionCreationErrorPage</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: Apr 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
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 +25,11 @@
|
|||
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$";
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
#include "GSWSessionCreationErrorPage.h"
|
||||
|
||||
|
@ -36,12 +46,12 @@
|
|||
[super sleep];
|
||||
};
|
||||
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
[super appendToResponse:response_
|
||||
inContext:context_];
|
||||
[response_ disableClientCaching];
|
||||
[super appendToResponse:response
|
||||
inContext:aContext];
|
||||
[response disableClientCaching];
|
||||
};
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GSWSessionRestorationErrorPage.h - GSWeb: Class GSWSessionRestorationErrorPage
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Apr 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -28,7 +28,7 @@
|
|||
//====================================================================
|
||||
@interface GSWSessionRestorationErrorPage : GSWComponent
|
||||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext;
|
||||
inContext:(GSWContext*)aContext;
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWSessionRestorationErrorPage.m - GSWeb: Class GSWSessionRestorationErrorPage
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWSessionRestorationErrorPage.m - <title>GSWeb: Class GSWSessionRestorationErrorPage</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
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
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 +25,11 @@
|
|||
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$";
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
#include "GSWSessionRestorationErrorPage.h"
|
||||
|
||||
|
@ -27,10 +37,10 @@
|
|||
@implementation GSWSessionRestorationErrorPage
|
||||
|
||||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
[super appendToResponse:aResponse
|
||||
inContext:aContext];
|
||||
inContext:aContext];
|
||||
[aResponse disableClientCaching];
|
||||
};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GSWStatsPage.h - GSWeb: Class GSWStatsPage
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Apr 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -28,23 +28,23 @@
|
|||
//==============================================================================
|
||||
@interface GSWStatsPage: GSWComponent
|
||||
{
|
||||
NSString* tmpKey;
|
||||
NSString* tmpItem;
|
||||
NSString* _tmpKey;
|
||||
NSString* _tmpItem;
|
||||
|
||||
NSDictionary* detailsDict;
|
||||
NSDictionary* pagesDict;
|
||||
NSDictionary* directActionsDict;
|
||||
NSDictionary* sessionMemoryDict;
|
||||
NSDictionary* transactions;
|
||||
NSDictionary* statsDict;
|
||||
NSDictionary* memoryDict;
|
||||
NSArray* sessionStats;
|
||||
NSMutableDictionary* sessionsDict;
|
||||
NSNumber* maxPageCount;
|
||||
NSNumber* maxActionCount;
|
||||
NSDate* maxSessionsDate;
|
||||
NSString* userName;
|
||||
NSString* password;
|
||||
NSDictionary* _detailsDict;
|
||||
NSDictionary* _pagesDict;
|
||||
NSDictionary* _directActionsDict;
|
||||
NSDictionary* _sessionMemoryDict;
|
||||
NSDictionary* _transactions;
|
||||
NSDictionary* _statsDict;
|
||||
NSDictionary* _memoryDict;
|
||||
NSArray* _sessionStats;
|
||||
NSMutableDictionary* _sessionsDict;
|
||||
NSNumber* _maxPageCount;
|
||||
NSNumber* _maxActionCount;
|
||||
NSDate* _maxSessionsDate;
|
||||
NSString* _userName;
|
||||
NSString* _password;
|
||||
};
|
||||
|
||||
-(id)submit;
|
||||
|
@ -53,7 +53,7 @@
|
|||
-(NSNumber*)_maxServedForDictionary:(NSDictionary*)aDictionary;
|
||||
-(id)_initIvars;
|
||||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext;
|
||||
inContext:(GSWContext*)aContext;
|
||||
-(void)setDetailPercent:(NSNumber*)aValue;
|
||||
-(NSNumber*)detailPercent;
|
||||
-(id)runningTime;
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWStatsPage.m - GSWeb: Class GSWStatsPage
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWStatsPage.m - <title>GSWeb: Class GSWStatsPage</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: Apr 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
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 +25,11 @@
|
|||
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$";
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
#include "GSWStatsPage.h"
|
||||
|
||||
|
@ -27,11 +37,11 @@
|
|||
@implementation GSWStatsPage
|
||||
-(id)submit
|
||||
{
|
||||
GSWStatisticsStore* _statisticsStore = [[self application] statisticsStore];
|
||||
if (_statisticsStore)
|
||||
{
|
||||
//[_statisticsStore validateLogin:password];
|
||||
[[self session] _allowToViewStatistics];
|
||||
GSWStatisticsStore* statisticsStore = [[self application] statisticsStore];
|
||||
if (statisticsStore)
|
||||
{
|
||||
//[_statisticsStore validateLogin:password];
|
||||
[[self session] _allowToViewStatistics];
|
||||
};
|
||||
return self;
|
||||
};
|
||||
|
@ -64,88 +74,88 @@
|
|||
|
||||
*/
|
||||
NSLog(@"detailsDict");
|
||||
NSLog([detailsDict description]);
|
||||
NSLog([_detailsDict description]);
|
||||
NSLog(@"pagesDict");
|
||||
NSLog([pagesDict description]);
|
||||
NSLog([_pagesDict description]);
|
||||
NSLog(@"directActionsDict");
|
||||
NSLog([directActionsDict description]);
|
||||
NSLog([_directActionsDict description]);
|
||||
NSLog(@"sessionMemoryDict");
|
||||
NSLog([sessionMemoryDict description]);
|
||||
NSLog([_sessionMemoryDict description]);
|
||||
|
||||
NSLog(@"transactions");
|
||||
/*NSLog(transactions);
|
||||
/*NSLog(_transactions);
|
||||
NSLog(@"statsDict");
|
||||
NSLog(statsDict);
|
||||
NSLog(_statsDict);
|
||||
NSLog(@"memoryDict");
|
||||
NSLog(memoryDict);
|
||||
NSLog(_memoryDict);
|
||||
NSLog(@"sessionStats");
|
||||
NSLog(sessionStats);
|
||||
NSLog(_sessionStats);
|
||||
NSLog(@"sessionsDict");
|
||||
NSLog(sessionsDict);
|
||||
NSLog(_sessionsDict);
|
||||
*/
|
||||
}
|
||||
|
||||
-(id)instance
|
||||
{
|
||||
id _instance=nil;
|
||||
NSArray* _commandLineArguments = [[NSProcessInfo processInfo] arguments];
|
||||
id instance=nil;
|
||||
NSArray* commandLineArguments = [[NSProcessInfo processInfo] arguments];
|
||||
unsigned int i=0;
|
||||
i = [_commandLineArguments indexOfObject:@"-n"];
|
||||
if (i!=NSNotFound && ([_commandLineArguments count] > i + 1))
|
||||
_instance=[_commandLineArguments objectAtIndex:i+1];
|
||||
return _instance;
|
||||
i = [commandLineArguments indexOfObject:@"-n"];
|
||||
if (i!=NSNotFound && ([commandLineArguments count] > i + 1))
|
||||
instance=[commandLineArguments objectAtIndex:i+1];
|
||||
return instance;
|
||||
};
|
||||
|
||||
-(NSNumber*)_maxServedForDictionary:(NSDictionary*)aDictionary
|
||||
{
|
||||
int _maxServedCount = 0;
|
||||
int _tmpCount=0;
|
||||
NSDictionary* _page = nil;
|
||||
NSEnumerator* _enum = [aDictionary objectEnumerator];
|
||||
while ((_page = [_enum nextObject]))
|
||||
{
|
||||
_tmpCount = [[_page objectForKey:@"Served"] intValue];
|
||||
_maxServedCount = max(_maxServedCount,_tmpCount);
|
||||
int maxServedCount = 0;
|
||||
int tmpCount=0;
|
||||
NSDictionary* page = nil;
|
||||
NSEnumerator* anEnum = [aDictionary objectEnumerator];
|
||||
while ((page = [anEnum nextObject]))
|
||||
{
|
||||
tmpCount = [[page objectForKey:@"Served"] intValue];
|
||||
maxServedCount = max(maxServedCount,tmpCount);
|
||||
};
|
||||
return [NSNumber numberWithInt:_maxServedCount];
|
||||
return [NSNumber numberWithInt:maxServedCount];
|
||||
};
|
||||
|
||||
-(id)_initIvars
|
||||
{
|
||||
id currentCount=nil;
|
||||
statsDict = [[self application] statistics];
|
||||
pagesDict = [statsDict objectForKey:@"Pages"];
|
||||
directActionsDict = [statsDict objectForKey:@"DirectActions"];
|
||||
detailsDict = [statsDict objectForKey:@"Details"];
|
||||
transactions = [statsDict objectForKey:@"Transactions"];
|
||||
memoryDict = [statsDict objectForKey:@"Memory"];
|
||||
sessionsDict = [[[NSMutableDictionary alloc] initWithDictionary:
|
||||
[statsDict objectForKey:@"Sessions"]]
|
||||
_statsDict = [[self application] statistics];
|
||||
_pagesDict = [_statsDict objectForKey:@"Pages"];
|
||||
_directActionsDict = [_statsDict objectForKey:@"DirectActions"];
|
||||
_detailsDict = [_statsDict objectForKey:@"Details"];
|
||||
_transactions = [_statsDict objectForKey:@"Transactions"];
|
||||
_memoryDict = [_statsDict objectForKey:@"Memory"];
|
||||
_sessionsDict = [[[NSMutableDictionary alloc] initWithDictionary:
|
||||
[_statsDict objectForKey:@"Sessions"]]
|
||||
autorelease];
|
||||
sessionMemoryDict = [sessionsDict objectForKey:@"Avg. Memory Per Session"];
|
||||
[sessionsDict removeObjectForKey:@"Avg. Memory Per Session"];
|
||||
_sessionMemoryDict = [_sessionsDict objectForKey:@"Avg. Memory Per Session"];
|
||||
[_sessionsDict removeObjectForKey:@"Avg. Memory Per Session"];
|
||||
|
||||
sessionStats = [sessionsDict objectForKey:@"Last Session's Statistics"];
|
||||
[sessionsDict removeObjectForKey:@"Last Session's Statistics"];
|
||||
_sessionStats = [_sessionsDict objectForKey:@"Last Session's Statistics"];
|
||||
[_sessionsDict removeObjectForKey:@"Last Session's Statistics"];
|
||||
|
||||
maxSessionsDate = [sessionsDict objectForKey:@"Peak Active Sessions Date"];
|
||||
[sessionsDict removeObjectForKey:@"Peak Active Sessions Date"];
|
||||
_maxSessionsDate = [_sessionsDict objectForKey:@"Peak Active Sessions Date"];
|
||||
[_sessionsDict removeObjectForKey:@"Peak Active Sessions Date"];
|
||||
|
||||
maxPageCount = 0;
|
||||
maxActionCount = 0;
|
||||
_maxPageCount = 0;
|
||||
_maxActionCount = 0;
|
||||
|
||||
maxPageCount = [self _maxServedForDictionary:pagesDict];
|
||||
maxActionCount = [self _maxServedForDictionary:directActionsDict];
|
||||
_maxPageCount = [self _maxServedForDictionary:_pagesDict];
|
||||
_maxActionCount = [self _maxServedForDictionary:_directActionsDict];
|
||||
return nil; //??? //TODO
|
||||
};
|
||||
|
||||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
// ** This should probably be somewhere else.
|
||||
[self _initIvars];
|
||||
[super appendToResponse:aResponse
|
||||
inContext:aContext];
|
||||
inContext:aContext];
|
||||
};
|
||||
|
||||
|
||||
|
@ -155,24 +165,24 @@ NSLog(sessionsDict);
|
|||
|
||||
-(NSNumber*)detailPercent
|
||||
{
|
||||
int _detailPercent=0;
|
||||
id aTransactionsCount = [transactions objectForKey:@"Transactions"];
|
||||
int detailPercent=0;
|
||||
id aTransactionsCount = [_transactions objectForKey:@"Transactions"];
|
||||
int aDetailCount = [[self detailCount] intValue];
|
||||
if (aTransactionsCount > 0)
|
||||
_detailPercent=(aDetailCount / [aTransactionsCount intValue]) * 100;
|
||||
return [NSNumber numberWithInt:_detailPercent];
|
||||
detailPercent=(aDetailCount / [aTransactionsCount intValue]) * 100;
|
||||
return [NSNumber numberWithInt:detailPercent];
|
||||
};
|
||||
|
||||
-(id)runningTime
|
||||
{
|
||||
NSTimeInterval aRunningTime = (-1.0 * [[statsDict objectForKey:@"StartedAt"] timeIntervalSinceNow]);
|
||||
NSTimeInterval aRunningTime = (-1.0 * [[_statsDict objectForKey:@"StartedAt"] timeIntervalSinceNow]);
|
||||
NSString* aRunningTimeString = [GSWStatisticsStore timeIntervalDescription:aRunningTime];
|
||||
return aRunningTimeString;
|
||||
}
|
||||
|
||||
-(id)detailCount
|
||||
{
|
||||
return [detailsDict objectForKey:tmpKey];
|
||||
return [_detailsDict objectForKey:_tmpKey];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
# 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
|
||||
#
|
||||
# This file is part of the GNUstep Web Library.
|
||||
|
@ -37,9 +37,21 @@ ADDITIONAL_CPPFLAGS =
|
|||
|
||||
# Additional flags to pass to the Objective-C compiler
|
||||
ifeq ($(GDL2), yes)
|
||||
ADDITIONAL_OBJCFLAGS = -DUSE_BUILTIN -DGDL2
|
||||
ADDITIONAL_OBJCFLAGS := $(ADDITIONAL_OBJCFLAGS) -DUSE_BUILTIN -DGDL2
|
||||
else
|
||||
ADDITIONAL_OBJCFLAGS = -DUSE_BUILTIN
|
||||
ADDITIONAL_OBJCFLAGS := $(ADDITIONAL_OBJCFLAGS) -DUSE_BUILTIN
|
||||
endif
|
||||
|
||||
ifeq ($(GSWDEBUG_MEM), yes)
|
||||
ADDITIONAL_OBJCFLAGS := $(ADDITIONAL_OBJCFLAGS) -DGSWDEBUG_MEM
|
||||
endif
|
||||
|
||||
ifeq ($(GSWDEBUG_LOCK), yes)
|
||||
ADDITIONAL_OBJCFLAGS := $(ADDITIONAL_OBJCFLAGS) -DGSWDEBUG_LOCK
|
||||
endif
|
||||
|
||||
ifeq ($(GSWDEBUG_DEEP), yes)
|
||||
ADDITIONAL_OBJCFLAGS := $(ADDITIONAL_OBJCFLAGS) -DGSWDEBUG_DEEP
|
||||
endif
|
||||
|
||||
# Additional flags to pass to the C compiler
|
||||
|
|
18
GSWExtensions.framework/gswextensions.gsdoc
Normal file
18
GSWExtensions.framework/gswextensions.gsdoc
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.7//EN" "http://www.gnustep.org/gsdoc-0_6_7.xml">
|
||||
<gsdoc base="index">
|
||||
<head>
|
||||
<title>GNUstepWeb Extensions</title>
|
||||
<author name="Manuel Guesdon">
|
||||
<email address="mguesdon@orange-concept.com"/>
|
||||
<url url="http://www.gnustep.org/developers/whoiswho.html"/></author>
|
||||
</head>
|
||||
<body>
|
||||
<chapter>
|
||||
<heading>GNUstepWeb Extensions</heading>
|
||||
</chapter>
|
||||
<back>
|
||||
<index scope="project" type="title" />
|
||||
</back>
|
||||
</body>
|
||||
</gsdoc>
|
|
@ -80,8 +80,25 @@ GSWValidationFailureComponent.h \
|
|||
GSWFileUploadFormComponent.h
|
||||
|
||||
SRCS = $(LIBRARY_NAME:=.m)
|
||||
|
||||
HDRS = $(LIBRARY_NAME:=.h)
|
||||
GSWExtensionsGSW_AUTOGSDOC_HEADERS = $(GSWExtensionsGSW_HEADER_FILES)
|
||||
GSWExtensionsGSW_AUTOGSDOC_SOURCE = $(GSWExtensionsGSW_OBJC_FILES)
|
||||
DOCUMENT_NAME = GSWExtensionsGSW
|
||||
GSWExtensionsGSW_HEADER_FILES_DIR = $(HEADER_DIR)
|
||||
GSWExtensionsGSW_AGSDOC_FILES = gswextensionsgsw.gsdoc $(GSWExtensionsGSW_AUTOGSDOC_HEADERS)
|
||||
#$(GSWExtensionsGSW_AUTOGSDOC_SOURCE)
|
||||
GSWExtensionsGSW_AGSDOC_FLAGS = \
|
||||
-Declared Foundation \
|
||||
-Standards YES \
|
||||
-SystemProjects System \
|
||||
-Project gswextensionsgsw \
|
||||
-WordMap '{\
|
||||
FOUNDATION_EXPORT=extern;FOUNDATION_STATIC_INLINE="";\
|
||||
GS_GEOM_SCOPE=extern;GS_GEOM_ATTR="";\
|
||||
GS_EXPORT=extern;GS_DECLARE="";\
|
||||
GS_RANGE_SCOPE=extern;GS_RANGE_ATTR="";\
|
||||
GS_ZONE_SCOPE=extern;GS_ZONE_ATTR="";\
|
||||
}' -Up gswextensionsgsw
|
||||
|
||||
#DIST_FILES = $(SRCS) $(HDRS) GNUmakefile Makefile.postamble Makefile.preamble
|
||||
|
||||
|
@ -90,5 +107,8 @@ HDRS = $(LIBRARY_NAME:=.h)
|
|||
-include GNUmakefile.local
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/framework.make
|
||||
ifeq ($(doc),yes)
|
||||
include $(GNUSTEP_MAKEFILES)/documentation.make
|
||||
endif
|
||||
|
||||
-include Makefile.postamble
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GSWFileUploadFormComponent.h - GSWeb: Class GSWFileUploadFormComponent
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Dec 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -26,7 +26,7 @@
|
|||
//====================================================================
|
||||
@interface GSWFileUploadFormComponent : GSWComponent
|
||||
{
|
||||
NSMutableDictionary* fileInfo;
|
||||
NSMutableDictionary* _fileInfo;
|
||||
};
|
||||
-(id)init;
|
||||
-(void)dealloc;
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWFileUploadFormComponent.m - GSWeb: Class GSWFileUploadFormComponent
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWFileUploadFormComponent.m - <title>GSWeb: Class GSWFileUploadFormComponent</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: Dec 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
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 +25,11 @@
|
|||
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$";
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
#include "GSWFileUploadFormComponent.h"
|
||||
//====================================================================
|
||||
|
@ -55,7 +65,7 @@
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
DESTROY(fileInfo);
|
||||
DESTROY(_fileInfo);
|
||||
[super dealloc];
|
||||
};
|
||||
|
||||
|
@ -69,17 +79,17 @@
|
|||
-(NSMutableDictionary*)fileInfo
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if (!fileInfo)
|
||||
if (!_fileInfo)
|
||||
{
|
||||
if ([self hasBinding:@"fileInfo"])
|
||||
{
|
||||
fileInfo=[[self valueForBinding:@"fileInfo"] mutableCopy];
|
||||
if (!fileInfo)
|
||||
fileInfo=[NSMutableDictionary new];
|
||||
_fileInfo=[[self valueForBinding:@"fileInfo"] mutableCopy];
|
||||
if (!_fileInfo)
|
||||
_fileInfo=[NSMutableDictionary new];
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return fileInfo;
|
||||
return _fileInfo;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -119,13 +129,13 @@
|
|||
{
|
||||
GSWComponent* _returnPage=nil;
|
||||
LOGObjectFnStart();
|
||||
[self setValue:fileInfo
|
||||
[self setValue:_fileInfo
|
||||
forBinding:@"fileInfo"];
|
||||
if ([self hasBinding:@"action"])
|
||||
{
|
||||
_returnPage=[self valueForBinding:@"action"];
|
||||
};
|
||||
DESTROY(fileInfo);
|
||||
DESTROY(_fileInfo);
|
||||
LOGObjectFnStop();
|
||||
return _returnPage;
|
||||
};
|
||||
|
@ -135,14 +145,14 @@
|
|||
{
|
||||
GSWComponent* _returnPage=nil;
|
||||
LOGObjectFnStart();
|
||||
[fileInfo removeObjectForKey:@"data"];
|
||||
[self setValue:fileInfo
|
||||
forBinding:@"fileInfo"];
|
||||
[_fileInfo removeObjectForKey:@"data"];
|
||||
[self setValue:_fileInfo
|
||||
forBinding:@"fileInfo"];
|
||||
if ([self hasBinding:@"action"])
|
||||
{
|
||||
_returnPage=[self valueForBinding:@"action"];
|
||||
};
|
||||
DESTROY(fileInfo);
|
||||
{
|
||||
_returnPage=[self valueForBinding:@"action"];
|
||||
};
|
||||
DESTROY(_fileInfo);
|
||||
LOGObjectFnStop();
|
||||
return _returnPage;
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GSWSimpleFormComponent.h - GSWeb: Class GSWSimpleFormComponent
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Sept 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -26,7 +26,7 @@
|
|||
//====================================================================
|
||||
@interface GSWSimpleFormComponent : GSWComponent
|
||||
{
|
||||
NSString* tmpErrorMessage;
|
||||
NSString* _tmpErrorMessage;
|
||||
};
|
||||
-(id)init;
|
||||
-(void)dealloc;
|
||||
|
@ -36,21 +36,21 @@
|
|||
-(BOOL)isErrorMessage;
|
||||
-(GSWComponent*)sendAction;
|
||||
-(GSWComponent*)sendFields:(id)fields
|
||||
withFieldsDscription:(NSDictionary*)fieldsDscription_
|
||||
byMailTo:(NSString*)to_
|
||||
from:(NSString*)from_
|
||||
withSubject:(NSString*)subject_
|
||||
messagePrefix:(NSString*)messagePrefix_
|
||||
messageSuffix:(NSString*)messageSuffix_
|
||||
sentPageName:(NSString*)sentPageName_;
|
||||
withFieldsDscription:(NSDictionary*)fieldsDscription
|
||||
byMailTo:(NSString*)to
|
||||
from:(NSString*)from
|
||||
withSubject:(NSString*)subject
|
||||
messagePrefix:(NSString*)messagePrefix
|
||||
messageSuffix:(NSString*)messageSuffix
|
||||
sentPageName:(NSString*)sentPageName;
|
||||
-(GSWComponent*)sendFields:(id)fields
|
||||
withFieldsDscription:(NSDictionary*)fieldsDscription_
|
||||
byMailTo:(NSString*)to_
|
||||
from:(NSString*)from_
|
||||
withSubject:(NSString*)subject_
|
||||
messagePrefix:(NSString*)messagePrefix_
|
||||
messageSuffix:(NSString*)messageSuffix_
|
||||
sentPageName:(NSString*)sentPageName_;
|
||||
withFieldsDscription:(NSDictionary*)fieldsDscription
|
||||
byMailTo:(NSString*)to
|
||||
from:(NSString*)from
|
||||
withSubject:(NSString*)subject
|
||||
messagePrefix:(NSString*)messagePrefix
|
||||
messageSuffix:(NSString*)messageSuffix
|
||||
sentPageName:(NSString*)sentPageName;
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWSimpleFormComponent.m - GSWeb: Class GSWSimpleFormComponent
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWSimpleFormComponent.m - <title>GSWeb: Class GSWSimpleFormComponent</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: Sept 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
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 +25,11 @@
|
|||
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$";
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
#include "GSWSimpleFormComponent.h"
|
||||
//====================================================================
|
||||
|
@ -41,7 +51,7 @@
|
|||
{
|
||||
LOGObjectFnStart();
|
||||
[super awake];
|
||||
tmpErrorMessage=nil;
|
||||
_tmpErrorMessage=nil;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
|
@ -49,7 +59,7 @@
|
|||
-(void)sleep
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
tmpErrorMessage=nil;
|
||||
_tmpErrorMessage=nil;
|
||||
[super sleep];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
@ -68,45 +78,45 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)validateFormFields:(id)fields
|
||||
withFieldsDscription:(NSDictionary*)fieldsDscription_
|
||||
errorMessagePrefix:(NSString*)errorMessagePrefix_
|
||||
errorMessageSuffix:(NSString*)errorMessageSuffix_
|
||||
withFieldsDscription:(NSDictionary*)fieldsDscription
|
||||
errorMessagePrefix:(NSString*)errorMessagePrefix
|
||||
errorMessageSuffix:(NSString*)errorMessageSuffix
|
||||
{
|
||||
NSEnumerator* _enum=nil;
|
||||
NSMutableString* _missingFields=nil;
|
||||
id _key=nil;
|
||||
NSString* _dscrValue=nil;
|
||||
NSString* _value=nil;
|
||||
NSEnumerator* anEnum=nil;
|
||||
NSMutableString* missingFields=nil;
|
||||
id key=nil;
|
||||
NSString* dscrValue=nil;
|
||||
NSString* value=nil;
|
||||
LOGObjectFnStart();
|
||||
_enum=[fieldsDscription_ keyEnumerator];
|
||||
while((_key=[_enum nextObject]))
|
||||
{
|
||||
_dscrValue=[fieldsDscription_ objectForKey:_key];
|
||||
_value=[fields objectForKey:_key];
|
||||
if (!_value || [_value length]==0)
|
||||
{
|
||||
if (_missingFields)
|
||||
[_missingFields appendFormat:@", %@",_dscrValue];
|
||||
else
|
||||
_missingFields=(NSMutableString*)[NSMutableString stringWithFormat:@"%@",_dscrValue];
|
||||
};
|
||||
};
|
||||
if (_missingFields)
|
||||
{
|
||||
tmpErrorMessage=[NSString stringWithFormat:@"%@ %@ %@",
|
||||
(errorMessagePrefix_ ? errorMessagePrefix_ : @""),
|
||||
_missingFields,
|
||||
(errorMessageSuffix_ ? errorMessageSuffix_ : @"")];
|
||||
NSDebugMLog(@"tmpErrorMessage=%@",tmpErrorMessage);
|
||||
};
|
||||
anEnum=[fieldsDscription keyEnumerator];
|
||||
while((key=[anEnum nextObject]))
|
||||
{
|
||||
dscrValue=[fieldsDscription objectForKey:key];
|
||||
value=[fields objectForKey:key];
|
||||
if (!value || [value length]==0)
|
||||
{
|
||||
if (missingFields)
|
||||
[missingFields appendFormat:@", %@",dscrValue];
|
||||
else
|
||||
missingFields=(NSMutableString*)[NSMutableString stringWithFormat:@"%@",dscrValue];
|
||||
};
|
||||
};
|
||||
if (missingFields)
|
||||
{
|
||||
_tmpErrorMessage=[NSString stringWithFormat:@"%@ %@ %@",
|
||||
(errorMessagePrefix ? errorMessagePrefix : @""),
|
||||
missingFields,
|
||||
(errorMessageSuffix ? errorMessageSuffix : @"")];
|
||||
NSDebugMLog(@"_tmpErrorMessage=%@",_tmpErrorMessage);
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return !_missingFields;
|
||||
return !missingFields;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)isErrorMessage
|
||||
{
|
||||
return [tmpErrorMessage length]>0;
|
||||
return [_tmpErrorMessage length]>0;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -117,54 +127,54 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWComponent*)sendFields:(id)fields
|
||||
withFieldsDscription:(NSDictionary*)fieldsDscription_
|
||||
byMailTo:(NSString*)to_
|
||||
from:(NSString*)from_
|
||||
withSubject:(NSString*)subject_
|
||||
messagePrefix:(NSString*)messagePrefix_
|
||||
messageSuffix:(NSString*)messageSuffix_
|
||||
sentPageName:(NSString*)sentPageName_
|
||||
withFieldsDscription:(NSDictionary*)fieldsDscription
|
||||
byMailTo:(NSString*)to
|
||||
from:(NSString*)from
|
||||
withSubject:(NSString*)subject
|
||||
messagePrefix:(NSString*)messagePrefix
|
||||
messageSuffix:(NSString*)messageSuffix
|
||||
sentPageName:(NSString*)sentPageName
|
||||
{
|
||||
NSEnumerator* _enum=nil;
|
||||
GSWComponent* _page=nil;
|
||||
NSMutableString* _mailText=[NSMutableString string];
|
||||
id _key=nil;
|
||||
NSString* _dscrValue=nil;
|
||||
NSString* _value=nil;
|
||||
NSString* _msg=nil;
|
||||
NSEnumerator* anEnum=nil;
|
||||
GSWComponent* page=nil;
|
||||
NSMutableString* mailText=[NSMutableString string];
|
||||
id key=nil;
|
||||
NSString* dscrValue=nil;
|
||||
NSString* value=nil;
|
||||
NSString* msg=nil;
|
||||
LOGObjectFnStart();
|
||||
_enum=[fieldsDscription_ keyEnumerator];
|
||||
while((_key=[_enum nextObject]))
|
||||
{
|
||||
_dscrValue=[fieldsDscription_ objectForKey:_key];
|
||||
_value=[fields objectForKey:_key];
|
||||
[_mailText appendFormat:@"%@:\t%@\n",_dscrValue,_value];
|
||||
};
|
||||
NSDebugMLog(@"to_=%@",to_);
|
||||
NSDebugMLog(@"from_=%@",from_);
|
||||
if (from_ && to_)
|
||||
{
|
||||
NSString* _text=[NSString stringWithFormat:@"%@%@%@",
|
||||
(messagePrefix_ ? messagePrefix_ : @""),
|
||||
_mailText,
|
||||
(messageSuffix_ ? messageSuffix_ : @"")];
|
||||
NSDebugMLog(@"_text=%@",_text);
|
||||
_msg=[[GSWMailDelivery sharedInstance] composeEmailFrom:from_
|
||||
to:[NSArray arrayWithObject:to_]
|
||||
cc:nil
|
||||
subject:subject_
|
||||
plainText:_text
|
||||
send:YES];
|
||||
NSDebugMLog(@"_msg=%@",_msg);
|
||||
}
|
||||
anEnum=[fieldsDscription keyEnumerator];
|
||||
while((key=[anEnum nextObject]))
|
||||
{
|
||||
dscrValue=[fieldsDscription objectForKey:key];
|
||||
value=[fields objectForKey:key];
|
||||
[mailText appendFormat:@"%@:\t%@\n",dscrValue,value];
|
||||
};
|
||||
NSDebugMLog(@"to=%@",to);
|
||||
NSDebugMLog(@"from=%@",from);
|
||||
if (from && to)
|
||||
{
|
||||
NSString* text=[NSString stringWithFormat:@"%@%@%@",
|
||||
(messagePrefix ? messagePrefix : @""),
|
||||
mailText,
|
||||
(messageSuffix ? messageSuffix : @"")];
|
||||
NSDebugMLog(@"text=%@",text);
|
||||
msg=[[GSWMailDelivery sharedInstance] composeEmailFrom:from
|
||||
to:[NSArray arrayWithObject:to]
|
||||
cc:nil
|
||||
subject:subject
|
||||
plainText:text
|
||||
send:YES];
|
||||
NSDebugMLog(@"msg=%@",msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO
|
||||
LOGError(@"No From or To address (from_=%@ , to_=%@)",from_,to_);
|
||||
};
|
||||
_page=[self pageWithName:sentPageName_];
|
||||
{
|
||||
//TODO
|
||||
LOGError(@"No From or To address (from=%@ , to=%@)",from,to);
|
||||
};
|
||||
page=[self pageWithName:sentPageName];
|
||||
LOGObjectFnStop();
|
||||
return _page;
|
||||
return page;
|
||||
};
|
||||
@end
|
||||
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWTabComponent.m - GSWeb: Class GSWTabComponent
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWTabComponent.m - <title>GSWeb: Class GSWTabComponent</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: Apr 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
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 +25,11 @@
|
|||
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$";
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
#include "GSWTabComponent.h"
|
||||
//====================================================================
|
||||
|
@ -61,115 +71,115 @@
|
|||
|
||||
-(NSString*)tabLeftBorderImage
|
||||
{
|
||||
NSString* _image=nil;
|
||||
BOOL _isSelected=NO;
|
||||
NSString* image=nil;
|
||||
BOOL isSelected=NO;
|
||||
LOGObjectFnStart();
|
||||
_isSelected=boolValueFor([self valueForBinding:@"isCurrentTabSelected"]);
|
||||
if (_isSelected)
|
||||
{
|
||||
if ([self hasBinding:@"tabLeftBorderSelectedImage"])
|
||||
_image=[self valueForBinding:@"tabLeftBorderSelectedImage"];
|
||||
else if ([self hasBinding:@"tabLeftBorderImage"])
|
||||
_image=[self valueForBinding:@"tabLeftBorderImage"];
|
||||
else
|
||||
_image = @"tabLeftBorderSelected.gif";
|
||||
}
|
||||
isSelected=boolValueFor([self valueForBinding:@"isCurrentTabSelected"]);
|
||||
if (isSelected)
|
||||
{
|
||||
if ([self hasBinding:@"tabLeftBorderSelectedImage"])
|
||||
image=[self valueForBinding:@"tabLeftBorderSelectedImage"];
|
||||
else if ([self hasBinding:@"tabLeftBorderImage"])
|
||||
image=[self valueForBinding:@"tabLeftBorderImage"];
|
||||
else
|
||||
image = @"tabLeftBorderSelected.gif";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([self hasBinding:@"tabLeftBorderNotSelectedImage"])
|
||||
_image=[self valueForBinding:@"tabLeftBorderNotSelectedImage"];
|
||||
else if ([self hasBinding:@"tabLeftBorderImage"])
|
||||
_image=[self valueForBinding:@"tabLeftBorderImage"];
|
||||
else
|
||||
_image = @"tabLeftBorderNotSelected.gif";
|
||||
};
|
||||
NSDebugMLog(@"_image=%@",_image);
|
||||
return _image;
|
||||
{
|
||||
if ([self hasBinding:@"tabLeftBorderNotSelectedImage"])
|
||||
image=[self valueForBinding:@"tabLeftBorderNotSelectedImage"];
|
||||
else if ([self hasBinding:@"tabLeftBorderImage"])
|
||||
image=[self valueForBinding:@"tabLeftBorderImage"];
|
||||
else
|
||||
image = @"tabLeftBorderNotSelected.gif";
|
||||
};
|
||||
NSDebugMLog(@"image=%@",image);
|
||||
return image;
|
||||
};
|
||||
|
||||
-(NSString*)tabRightBorderImage
|
||||
{
|
||||
NSString* _image=nil;
|
||||
BOOL _isSelected=NO;
|
||||
NSString* image=nil;
|
||||
BOOL isSelected=NO;
|
||||
LOGObjectFnStart();
|
||||
_isSelected=boolValueFor([self valueForBinding:@"isCurrentTabSelected"]);
|
||||
if (_isSelected)
|
||||
{
|
||||
if ([self hasBinding:@"tabRightBorderSelectedImage"])
|
||||
_image=[self valueForBinding:@"tabRightBorderSelectedImage"];
|
||||
else if ([self hasBinding:@"tabRightBorderImage"])
|
||||
_image=[self valueForBinding:@"tabRightBorderImage"];
|
||||
else
|
||||
_image = @"tabRightBorderSelected.gif";
|
||||
}
|
||||
isSelected=boolValueFor([self valueForBinding:@"isCurrentTabSelected"]);
|
||||
if (isSelected)
|
||||
{
|
||||
if ([self hasBinding:@"tabRightBorderSelectedImage"])
|
||||
image=[self valueForBinding:@"tabRightBorderSelectedImage"];
|
||||
else if ([self hasBinding:@"tabRightBorderImage"])
|
||||
image=[self valueForBinding:@"tabRightBorderImage"];
|
||||
else
|
||||
image = @"tabRightBorderSelected.gif";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([self hasBinding:@"tabRightBorderNotSelectedImage"])
|
||||
_image=[self valueForBinding:@"tabRightBorderNotSelectedImage"];
|
||||
else if ([self hasBinding:@"tabRightBorderImage"])
|
||||
_image=[self valueForBinding:@"tabRightBorderImage"];
|
||||
else
|
||||
_image = @"tabRightBorderNotSelected.gif";
|
||||
};
|
||||
NSDebugMLog(@"_image=%@",_image);
|
||||
return _image;
|
||||
{
|
||||
if ([self hasBinding:@"tabRightBorderNotSelectedImage"])
|
||||
image=[self valueForBinding:@"tabRightBorderNotSelectedImage"];
|
||||
else if ([self hasBinding:@"tabRightBorderImage"])
|
||||
image=[self valueForBinding:@"tabRightBorderImage"];
|
||||
else
|
||||
image = @"tabRightBorderNotSelected.gif";
|
||||
};
|
||||
NSDebugMLog(@"image=%@",image);
|
||||
return image;
|
||||
};
|
||||
-(NSString*)tabImage
|
||||
{
|
||||
NSString* _image=nil;
|
||||
BOOL _isSelected=NO;
|
||||
NSString* image=nil;
|
||||
BOOL isSelected=NO;
|
||||
LOGObjectFnStart();
|
||||
_isSelected=boolValueFor([self valueForBinding:@"isCurrentTabSelected"]);
|
||||
if (_isSelected)
|
||||
{
|
||||
if ([self hasBinding:@"tabSelectedImage"])
|
||||
_image=[self valueForBinding:@"tabSelectedImage"];
|
||||
else if ([self hasBinding:@"tabImage"])
|
||||
_image=[self valueForBinding:@"tabImage"];
|
||||
}
|
||||
isSelected=boolValueFor([self valueForBinding:@"isCurrentTabSelected"]);
|
||||
if (isSelected)
|
||||
{
|
||||
if ([self hasBinding:@"tabSelectedImage"])
|
||||
image=[self valueForBinding:@"tabSelectedImage"];
|
||||
else if ([self hasBinding:@"tabImage"])
|
||||
image=[self valueForBinding:@"tabImage"];
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([self hasBinding:@"tabNotSelectedImage"])
|
||||
_image=[self valueForBinding:@"tabNotSelectedImage"];
|
||||
else if ([self hasBinding:@"tabImage"])
|
||||
_image=[self valueForBinding:@"tabImage"];
|
||||
};
|
||||
NSDebugMLog(@"_image=%@",_image);
|
||||
return _image;
|
||||
{
|
||||
if ([self hasBinding:@"tabNotSelectedImage"])
|
||||
image=[self valueForBinding:@"tabNotSelectedImage"];
|
||||
else if ([self hasBinding:@"tabImage"])
|
||||
image=[self valueForBinding:@"tabImage"];
|
||||
};
|
||||
NSDebugMLog(@"image=%@",image);
|
||||
return image;
|
||||
};
|
||||
|
||||
-(NSString*)tabText
|
||||
{
|
||||
NSString* _text=nil;
|
||||
BOOL _isSelected=NO;
|
||||
NSString* text=nil;
|
||||
BOOL isSelected=NO;
|
||||
LOGObjectFnStart();
|
||||
_isSelected=boolValueFor([self valueForBinding:@"isCurrentTabSelected"]);
|
||||
if (_isSelected)
|
||||
{
|
||||
if ([self hasBinding:@"tabSelectedText"])
|
||||
_text=[self valueForBinding:@"tabSelectedText"];
|
||||
else if ([self hasBinding:@"tabText"])
|
||||
_text=[self valueForBinding:@"tabText"];
|
||||
}
|
||||
isSelected=boolValueFor([self valueForBinding:@"isCurrentTabSelected"]);
|
||||
if (isSelected)
|
||||
{
|
||||
if ([self hasBinding:@"tabSelectedText"])
|
||||
text=[self valueForBinding:@"tabSelectedText"];
|
||||
else if ([self hasBinding:@"tabText"])
|
||||
text=[self valueForBinding:@"tabText"];
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([self hasBinding:@"tabNotSelectedText"])
|
||||
_text=[self valueForBinding:@"tabNotSelectedText"];
|
||||
else if ([self hasBinding:@"tabText"])
|
||||
_text=[self valueForBinding:@"tabText"];
|
||||
};
|
||||
NSDebugMLog(@"_text=%@",_text);
|
||||
{
|
||||
if ([self hasBinding:@"tabNotSelectedText"])
|
||||
text=[self valueForBinding:@"tabNotSelectedText"];
|
||||
else if ([self hasBinding:@"tabText"])
|
||||
text=[self valueForBinding:@"tabText"];
|
||||
};
|
||||
NSDebugMLog(@"text=%@",text);
|
||||
LOGObjectFnStop();
|
||||
return _text;
|
||||
return text;
|
||||
};
|
||||
|
||||
-(GSWComponent*)selectCurrentTab
|
||||
{
|
||||
GSWComponent* _page=nil;
|
||||
GSWComponent* page=nil;
|
||||
LOGObjectFnStart();
|
||||
_page=[self valueForBinding:@"selectCurrentTab"];
|
||||
page=[self valueForBinding:@"selectCurrentTab"];
|
||||
LOGObjectFnStop();
|
||||
return _page;
|
||||
return page;
|
||||
};
|
||||
@end
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GSWValidationFailureComponent.h - GSWeb: Class GSWValidationFailureComponent
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Sept 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -26,8 +26,8 @@
|
|||
//====================================================================
|
||||
@interface GSWValidationFailureComponent : GSWComponent
|
||||
{
|
||||
NSArray* tmpAllValidationFailureMessagesArray;
|
||||
NSString* tmpValidationFailureMessage;
|
||||
NSArray* _tmpAllValidationFailureMessagesArray;
|
||||
NSString* _tmpValidationFailureMessage;
|
||||
};
|
||||
|
||||
-(BOOL)synchronizesVariablesWithBindings;
|
||||
|
@ -35,8 +35,8 @@
|
|||
-(id)init;
|
||||
-(void)awake;
|
||||
-(void)sleep;
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)context;
|
||||
-(BOOL)isValidationFailure;
|
||||
-(NSArray*)allValidationFailureMessagesArray;
|
||||
@end
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWValidationFailureComponent.m - GSWeb: Class GSWValidationFailureComponent
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWValidationFailureComponent.m - <title>GSWeb: Class GSWValidationFailureComponent</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: Sept 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
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 +25,11 @@
|
|||
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$";
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
#include "GSWValidationFailureComponent.h"
|
||||
//====================================================================
|
||||
|
@ -35,64 +45,70 @@
|
|||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)awake
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[super awake];
|
||||
tmpValidationFailureMessage=nil;
|
||||
tmpAllValidationFailureMessagesArray=nil;
|
||||
_tmpValidationFailureMessage=nil;
|
||||
_tmpAllValidationFailureMessagesArray=nil;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)sleep
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
tmpValidationFailureMessage=nil;
|
||||
tmpAllValidationFailureMessagesArray=nil;
|
||||
_tmpValidationFailureMessage=nil;
|
||||
_tmpAllValidationFailureMessagesArray=nil;
|
||||
[super sleep];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
[super dealloc];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)synchronizesVariablesWithBindings
|
||||
{
|
||||
return NO;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
tmpValidationFailureMessage=nil;
|
||||
tmpAllValidationFailureMessagesArray=nil;
|
||||
[super appendToResponse:response_
|
||||
inContext:context_];
|
||||
_tmpValidationFailureMessage=nil;
|
||||
_tmpAllValidationFailureMessagesArray=nil;
|
||||
[super appendToResponse:response
|
||||
inContext:aContext];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)isValidationFailure
|
||||
{
|
||||
return [[self allValidationFailureMessagesArray] count]>0;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSArray*)allValidationFailureMessagesArray
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if (!tmpAllValidationFailureMessagesArray)
|
||||
{
|
||||
NSArray* _allValidationFailureMessagesArray=[[self parent]allValidationFailureMessages];
|
||||
NSDebugMLog(@"_allValidationFailureMessagesArray=%@",_allValidationFailureMessagesArray);
|
||||
tmpAllValidationFailureMessagesArray=_allValidationFailureMessagesArray;
|
||||
NSDebugMLog(@"tmpAllValidationFailureMessagesArray=%@",tmpAllValidationFailureMessagesArray);
|
||||
};
|
||||
NSDebugMLog(@"tmpAllValidationFailureMessagesArray=%@",tmpAllValidationFailureMessagesArray);
|
||||
if (!_tmpAllValidationFailureMessagesArray)
|
||||
{
|
||||
NSArray* allValidationFailureMessagesArray=[[self parent]allValidationFailureMessages];
|
||||
NSDebugMLog(@"allValidationFailureMessagesArray=%@",allValidationFailureMessagesArray);
|
||||
_tmpAllValidationFailureMessagesArray=allValidationFailureMessagesArray;
|
||||
NSDebugMLog(@"_tmpAllValidationFailureMessagesArray=%@",_tmpAllValidationFailureMessagesArray);
|
||||
};
|
||||
NSDebugMLog(@"_tmpAllValidationFailureMessagesArray=%@",_tmpAllValidationFailureMessagesArray);
|
||||
LOGObjectFnStop();
|
||||
return tmpAllValidationFailureMessagesArray;
|
||||
return _tmpAllValidationFailureMessagesArray;
|
||||
};
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
# 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
|
||||
#
|
||||
# This file is part of the GNUstep Web Library.
|
||||
|
@ -37,9 +37,21 @@ ADDITIONAL_CPPFLAGS =
|
|||
|
||||
# Additional flags to pass to the Objective-C compiler
|
||||
ifeq ($(GDL2), yes)
|
||||
ADDITIONAL_OBJCFLAGS = -DUSE_BUILTIN -DGDL2
|
||||
ADDITIONAL_OBJCFLAGS := $(ADDITIONAL_OBJCFLAGS) -DUSE_BUILTIN -DGDL2
|
||||
else
|
||||
ADDITIONAL_OBJCFLAGS = -DUSE_BUILTIN
|
||||
ADDITIONAL_OBJCFLAGS := $(ADDITIONAL_OBJCFLAGS) -DUSE_BUILTIN
|
||||
endif
|
||||
|
||||
ifeq ($(GSWDEBUG_MEM), yes)
|
||||
ADDITIONAL_OBJCFLAGS := $(ADDITIONAL_OBJCFLAGS) -DGSWDEBUG_MEM
|
||||
endif
|
||||
|
||||
ifeq ($(GSWDEBUG_LOCK), yes)
|
||||
ADDITIONAL_OBJCFLAGS := $(ADDITIONAL_OBJCFLAGS) -DGSWDEBUG_LOCK
|
||||
endif
|
||||
|
||||
ifeq ($(GSWDEBUG_DEEP), yes)
|
||||
ADDITIONAL_OBJCFLAGS := $(ADDITIONAL_OBJCFLAGS) -DGSWDEBUG_DEEP
|
||||
endif
|
||||
|
||||
# Additional flags to pass to the C compiler
|
||||
|
|
18
GSWExtensionsGSW.framework/gswextensionsgsw.gsdoc
Normal file
18
GSWExtensionsGSW.framework/gswextensionsgsw.gsdoc
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.7//EN" "http://www.gnustep.org/gsdoc-0_6_7.xml">
|
||||
<gsdoc base="index">
|
||||
<head>
|
||||
<title>GNUstepWeb Extensions GSW</title>
|
||||
<author name="Manuel Guesdon">
|
||||
<email address="mguesdon@orange-concept.com"/>
|
||||
<url url="http://www.gnustep.org/developers/whoiswho.html"/></author>
|
||||
</head>
|
||||
<body>
|
||||
<chapter>
|
||||
<heading>GNUstepWeb Extensions GSW</heading>
|
||||
</chapter>
|
||||
<back>
|
||||
<index scope="project" type="title" />
|
||||
</back>
|
||||
</body>
|
||||
</gsdoc>
|
|
@ -301,6 +301,24 @@ GSWWOCompatibility.h
|
|||
|
||||
SRCS = $(LIBRARY_NAME:=.m)
|
||||
HDRS = $(LIBRARY_NAME:=.h)
|
||||
GSWeb_AUTOGSDOC_HEADERS = $(GSWeb_HEADER_FILES)
|
||||
GSWeb_AUTOGSDOC_SOURCE = $(GSWeb_OBJC_FILES)
|
||||
DOCUMENT_NAME = GSWeb
|
||||
GSWeb_HEADER_FILES_DIR = $(HEADER_DIR)
|
||||
GSWeb_AGSDOC_FILES = gsweb.gsdoc $(GSWeb_AUTOGSDOC_HEADERS)
|
||||
#$(GSWeb_AUTOGSDOC_SOURCE)
|
||||
GSWeb_AGSDOC_FLAGS = \
|
||||
-Declared Foundation \
|
||||
-Standards YES \
|
||||
-SystemProjects System \
|
||||
-Project gsweb \
|
||||
-WordMap '{\
|
||||
FOUNDATION_EXPORT=extern;FOUNDATION_STATIC_INLINE="";\
|
||||
GS_GEOM_SCOPE=extern;GS_GEOM_ATTR="";\
|
||||
GS_EXPORT=extern;GS_DECLARE="";\
|
||||
GS_RANGE_SCOPE=extern;GS_RANGE_ATTR="";\
|
||||
GS_ZONE_SCOPE=extern;GS_ZONE_ATTR="";\
|
||||
}' -Up gsweb
|
||||
|
||||
|
||||
-include Makefile.preamble
|
||||
|
@ -308,5 +326,9 @@ HDRS = $(LIBRARY_NAME:=.h)
|
|||
-include GNUmakefile.local
|
||||
|
||||
include $(GNUSTEP_MAKEFILES)/framework.make
|
||||
# Only build the doc if doc=yes was passed on the command line
|
||||
ifeq ($(doc),yes)
|
||||
include $(GNUSTEP_MAKEFILES)/documentation.make
|
||||
endif
|
||||
|
||||
-include Makefile.postamble
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GSWAdaptor.h - GSWeb: Class GSWAdaptor
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
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
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -31,8 +31,8 @@
|
|||
// GSWAdaptor
|
||||
|
||||
@interface GSWAdaptor: NSObject
|
||||
-(id)initWithName:(NSString*)name_
|
||||
arguments:(NSDictionary*)arguments;
|
||||
-(id)initWithName:(NSString*)name
|
||||
arguments:(NSDictionary*)arguments;
|
||||
-(void)registerForEvents;
|
||||
-(void)unregisterForEvents;
|
||||
-(void)runOnce;
|
||||
|
@ -40,13 +40,14 @@
|
|||
-(BOOL)dispatchesRequestsConcurrently;
|
||||
-(int)port;
|
||||
-(id)workerThreadCount;
|
||||
-(void)adaptorThreadExited:(GSWDefaultAdaptorThread*)adaptorThread_;
|
||||
-(void)adaptorThreadExited:(GSWDefaultAdaptorThread*)adaptorThread;
|
||||
-(BOOL)isMultiThreadEnabled;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWAdaptor (GSWAdaptorOldFn)
|
||||
-(void) registerPort:(int)_port
|
||||
forApplicationNamed:(NSString*)_applicationName;
|
||||
-(void) registerPort:(int)port
|
||||
forApplicationNamed:(NSString*)applicationName;
|
||||
@end
|
||||
|
||||
#endif //_GSWAdaptor_h__
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GSWAdaptor.m - GSWeb: Class GSWAdaptor
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
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
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -32,8 +32,8 @@ static char rcsId[] = "$Id$";
|
|||
//--------------------------------------------------------------------
|
||||
// initWithName:arguments:application:
|
||||
|
||||
-(id)initWithName:(NSString*)name_
|
||||
arguments:(NSDictionary*)arguments_
|
||||
-(id)initWithName:(NSString*)name
|
||||
arguments:(NSDictionary*)arguments
|
||||
{
|
||||
NSDebugMLog(@"Init");
|
||||
self=[super init];
|
||||
|
@ -96,19 +96,26 @@ static char rcsId[] = "$Id$";
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)adaptorThreadExited:(GSWDefaultAdaptorThread*)adaptorThread_
|
||||
-(void)adaptorThreadExited:(GSWDefaultAdaptorThread*)adaptorThread
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)isMultiThreadEnabled
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
return NO;
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWAdaptor (GSWAdaptorOldFn)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void) registerPort:(int)_port
|
||||
forApplicationNamed:(NSString*)_applicationName
|
||||
-(void) registerPort:(int)port
|
||||
forApplicationNamed:(NSString*)applicationName
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
/* GSWApplication.m - GSWeb: Class GSWApplication
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWApplication.m - <title>GSWeb: Class GSWApplication</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 +23,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$";
|
||||
|
||||
|
@ -252,11 +257,23 @@ int GSWApplicationMainReal(NSString* _applicationClassName,
|
|||
NSDebugFLog(@"GSWOPTVALUE_SMTPHost -> %@",GSWOPTVALUE_SMTPHost);
|
||||
NSDebugFLog(@"GSWOPT_SMTPHost -> %@",GSWOPT_SMTPHost[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_SessionTimeOut -> %@",GSWOPTVALUE_SessionTimeOut);
|
||||
NSDebugFLog(@"GSWOPT_SessionTimeOut -> %@",GSWOPT_SessionTimeOut[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_WorkerThreadCount -> %@",GSWOPTVALUE_WorkerThreadCount);
|
||||
NSDebugFLog(@"GSWOPT_WorkerThreadCount -> %@",GSWOPT_WorkerThreadCount[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_MultiThreadEnabled -> %@",GSWOPTVALUE_MultiThreadEnabled);
|
||||
NSDebugFLog(@"GSWOPT_MultiThreadEnabled -> %@",GSWOPT_MultiThreadEnabled);
|
||||
NSDebugFLog(@"GSWOPT_SessionTimeOut -> %@",
|
||||
GSWOPT_SessionTimeOut[GSWebNamingConv]);
|
||||
|
||||
NSDebugFLog(@"GSWOPTVALUE_WorkerThreadCount -> %@",
|
||||
GSWOPTVALUE_WorkerThreadCount);
|
||||
NSDebugFLog(@"GSWOPT_WorkerThreadCount -> %@",
|
||||
GSWOPT_WorkerThreadCount[GSWebNamingConv]);
|
||||
|
||||
NSDebugFLog(@"GSWOPTVALUE_MultiThreadEnabled -> %@",
|
||||
GSWOPTVALUE_MultiThreadEnabled);
|
||||
NSDebugFLog(@"GSWOPT_MultiThreadEnabled -> %@",
|
||||
GSWOPT_MultiThreadEnabled);
|
||||
|
||||
NSDebugFLog(@"GSWOPT_AdaptorHost -> %@",
|
||||
GSWOPT_AdaptorHost[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_AdaptorHost -> %@",
|
||||
GSWOPTVALUE_AdaptorHost);
|
||||
|
||||
_defaultsOptions =
|
||||
[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
|
@ -285,6 +302,7 @@ int GSWApplicationMainReal(NSString* _applicationClassName,
|
|||
GSWOPTVALUE_SessionTimeOut, GSWOPT_SessionTimeOut[GSWebNamingConv],
|
||||
GSWOPTVALUE_WorkerThreadCount, GSWOPT_WorkerThreadCount[GSWebNamingConv],
|
||||
GSWOPTVALUE_MultiThreadEnabled, GSWOPT_MultiThreadEnabled,
|
||||
GSWOPTVALUE_AdaptorHost, GSWOPT_AdaptorHost[GSWebNamingConv],
|
||||
nil, nil];
|
||||
NSDebugFLog(@"_globalAppDefaultOptions=%@",globalAppDefaultOptions);
|
||||
globalAppDefaultOptions=[NSDictionary dictionaryWithDictionary:globalAppDefaultOptions
|
||||
|
@ -521,7 +539,7 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
GSWLogC("Dealloc GSWApplication");
|
||||
GSWLogMemC("Dealloc GSWApplication");
|
||||
DESTROY(adaptors);
|
||||
DESTROY(sessionStore);
|
||||
DESTROY(componentDefinitionCache);
|
||||
|
@ -534,11 +552,11 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
DESTROY(instanceNumber);
|
||||
DESTROY(requestHandlers);
|
||||
DESTROY(defaultRequestHandler);
|
||||
GSWLogC("Dealloc GSWApplication: selfLock");
|
||||
GSWLogMemC("Dealloc GSWApplication: selfLock");
|
||||
DESTROY(selfLock);
|
||||
GSWLogC("Dealloc GSWApplication: globalLock");
|
||||
GSWLogMemC("Dealloc GSWApplication: globalLock");
|
||||
DESTROY(globalLock);
|
||||
GSWLogC("Dealloc GSWApplication: globalAutoreleasePool");
|
||||
GSWLogMemC("Dealloc GSWApplication: globalAutoreleasePool");
|
||||
DESTROY(globalAutoreleasePool);
|
||||
DESTROY(currentRunLoop);
|
||||
DESTROY(runLoopDate);
|
||||
|
@ -548,9 +566,9 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
if (GSWApp == self)
|
||||
GSWApp = nil;
|
||||
|
||||
GSWLogC("Dealloc GSWApplication Super");
|
||||
GSWLogMemC("Dealloc GSWApplication Super");
|
||||
[super dealloc];
|
||||
GSWLogC("End Dealloc GSWApplication");
|
||||
GSWLogMemC("End Dealloc GSWApplication");
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -635,10 +653,10 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
*/
|
||||
NS_DURING
|
||||
{
|
||||
printf("GLOBALLOCK lock ThreadID=%p\n",(void*)objc_thread_id());
|
||||
NSDebugLockMLog(@"GLOBALLOCK lock ThreadID=%p\n",(void*)objc_thread_id());
|
||||
//TODO-NOW TmpLockBeforeDate(globalLock,[NSDate dateWithTimeIntervalSinceNow:GSLOCK_DELAY_S]);
|
||||
[globalLock lock];
|
||||
printf("GLOBALLOCK locked ThreadID=%p\n",(void*)objc_thread_id());
|
||||
NSDebugLockMLog(@"GLOBALLOCK locked ThreadID=%p\n",(void*)objc_thread_id());
|
||||
#ifndef NDEBUG
|
||||
globalLockn++;
|
||||
globalLock_thread_id=objc_thread_id();
|
||||
|
@ -651,7 +669,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"globalLock tmplockBeforeDate");
|
||||
printf("%@ (%@)",localException,[localException reason]);
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
};
|
||||
|
@ -681,9 +698,9 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
NSDebugMLLog0(@"application",@"PROBLEM: owner!=thread id");
|
||||
};
|
||||
};
|
||||
printf("GLOBALLOCK unlock ThreadID=%p\n",(void*)objc_thread_id());
|
||||
NSDebugLockMLog(@"GLOBALLOCK unlock ThreadID=%p\n",(void*)objc_thread_id());
|
||||
TmpUnlock(globalLock);
|
||||
printf("GLOBALLOCK unlocked ThreadID=%p\n",(void*)objc_thread_id());
|
||||
NSDebugLockMLog(@"GLOBALLOCK unlocked ThreadID=%p\n",(void*)objc_thread_id());
|
||||
#ifndef NDEBUG
|
||||
globalLockn--;
|
||||
if (globalLockn==0)
|
||||
|
@ -696,7 +713,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
printf("%@ (%@)",localException,[localException reason]);
|
||||
NSDebugMLLog(@"application",@"globalLockn=%d globalLock_thread_id=%p objc_thread_id()=%p",
|
||||
globalLockn,
|
||||
(void*)globalLock_thread_id,
|
||||
|
@ -779,33 +795,32 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
};
|
||||
*/
|
||||
NS_DURING
|
||||
{
|
||||
printf("SELFLOCK unlock ThreadID=%p\n",(void*)objc_thread_id());
|
||||
// TmpUnlock(selfLock);
|
||||
[selfLock unlock];//NEW
|
||||
printf("SELFLOCK unlocked ThreadID=%p\n",(void*)objc_thread_id());
|
||||
{
|
||||
NSDebugLockMLog(@"SELFLOCK unlock ThreadID=%p\n",(void*)objc_thread_id());
|
||||
// TmpUnlock(selfLock);
|
||||
[selfLock unlock];//NEW
|
||||
NSDebugLockMLog(@"SELFLOCK unlocked ThreadID=%p\n",(void*)objc_thread_id());
|
||||
#ifndef NDEBUG
|
||||
selfLockn--;
|
||||
if (selfLockn==0)
|
||||
selfLock_thread_id=NULL;
|
||||
selfLockn--;
|
||||
if (selfLockn==0)
|
||||
selfLock_thread_id=NULL;
|
||||
#endif
|
||||
/* NSDebugMLLog(@"application",@"selfLockn=%d selfLock_thread_id=%p objc_thread_id()=%p",
|
||||
selfLockn,
|
||||
(void*)selfLock_thread_id,
|
||||
(void*)objc_thread_id());
|
||||
*/
|
||||
}
|
||||
/* NSDebugMLLog(@"application",@"selfLockn=%d selfLock_thread_id=%p objc_thread_id()=%p",
|
||||
selfLockn,
|
||||
(void*)selfLock_thread_id,
|
||||
(void*)objc_thread_id());
|
||||
*/
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
printf("%@ (%@)",localException,[localException reason]);
|
||||
NSDebugMLLog(@"application",@"selfLockn=%d selfLock_thread_id=%p objc_thread_id()=%p",
|
||||
selfLockn,
|
||||
(void*)selfLock_thread_id,
|
||||
(void*)objc_thread_id());
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"selfLock tmpunlock");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
};
|
||||
{
|
||||
NSDebugMLLog(@"application",@"selfLockn=%d selfLock_thread_id=%p objc_thread_id()=%p",
|
||||
selfLockn,
|
||||
(void*)selfLock_thread_id,
|
||||
(void*)objc_thread_id());
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"selfLock tmpunlock");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
};
|
||||
NS_ENDHANDLER;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
@ -4364,19 +4379,23 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
//--------------------------------------------------------------------
|
||||
//NDFN
|
||||
-(NSDictionary*)stringsTableNamed:(NSString*)tableName_
|
||||
inFramework:(NSString*)frameworkName_
|
||||
languages:(NSArray*)languages_
|
||||
inFramework:(NSString*)frameworkName_
|
||||
languages:(NSArray*)languages_
|
||||
{
|
||||
return [[self resourceManager]stringsTableNamed:tableName_
|
||||
inFramework:frameworkName_
|
||||
languages:languages_];
|
||||
NSDictionary* st=nil;
|
||||
LOGObjectFnStart();
|
||||
st=[[self resourceManager]stringsTableNamed:tableName_
|
||||
inFramework:frameworkName_
|
||||
languages:languages_];
|
||||
LOGObjectFnStop();
|
||||
return st;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//NDFN
|
||||
-(NSArray*)stringsTableArrayNamed:(NSString*)tableName_
|
||||
inFramework:(NSString*)frameworkName_
|
||||
languages:(NSArray*)languages_
|
||||
inFramework:(NSString*)frameworkName_
|
||||
languages:(NSArray*)languages_
|
||||
{
|
||||
return [[self resourceManager]stringsTableArrayNamed:tableName_
|
||||
inFramework:frameworkName_
|
||||
|
@ -4596,3 +4615,4 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
|
||||
@end
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GSWAssociation.h - GSWeb: Class GSWAssociation
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
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
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -23,6 +23,33 @@
|
|||
|
||||
// $Id$
|
||||
|
||||
/**
|
||||
The WOAssociation class is a class for objects which represents values of GNUstepWeb attributes specified in declaration files (.gswd).
|
||||
|
||||
WOAssociation object get or set value according to values key. For exemple:
|
||||
|
||||
MyString1: GSWString
|
||||
{
|
||||
value = "aLabel";
|
||||
};
|
||||
|
||||
MyString2: GSWString
|
||||
{
|
||||
value = label;
|
||||
};
|
||||
|
||||
MyString3: GSWString
|
||||
{
|
||||
value = myMember.label;
|
||||
};
|
||||
|
||||
|
||||
At runtime, the GNUstepWeb parser scans an HTML template (.html) and it's declarations (.gswd) and creates 3 dynamic element objects of type GSWString.
|
||||
In the case value= "label", the string value will be a constant string "aLabel".
|
||||
In the case value = label, the value came from method "label" or member "label" of the component (by valueForKey: mechanism).
|
||||
In the case value = myMember.label, value came from method "label" or member "label" of the object returned by calling valueForKey:@"myMember" on the component.
|
||||
**/
|
||||
|
||||
#ifndef _GSWAssociation_h__
|
||||
#define _GSWAssociation_h__
|
||||
|
||||
|
|
|
@ -607,7 +607,28 @@ static NSMutableArray* associationsLogsHandlerClasses=nil;
|
|||
LOGClassFnStart();
|
||||
NSDebugMLLog(@"associations",@"GSWAssociation: keyPath_=%@ object_=%p",keyPath_,(void*)object_);
|
||||
if (keyPath_ && object_ && object_!=EONullNull)
|
||||
{
|
||||
{
|
||||
#if GDL2
|
||||
NS_DURING
|
||||
{
|
||||
retValue=[object_ valueForKeyPath:keyPath_];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSLog(@"Attempt to get %@ -%@ raised an exception (%@)",
|
||||
[object_ class],
|
||||
keyPath_,
|
||||
localException);
|
||||
localException = [localException exceptionByAddingToUserInfoKey:@"Invalid Ivars/Methods"
|
||||
format:@"-[%@ %@]",
|
||||
[object_ class],
|
||||
keyPath_];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
if (retValue==EONullNull)
|
||||
retValue=nil;
|
||||
#else
|
||||
NSMutableArray* keys=[[keyPath_ componentsSeparatedByString:@"."] mutableCopy];
|
||||
id _part=nil;
|
||||
Class _handlerClass=Nil;
|
||||
|
@ -621,6 +642,25 @@ static NSMutableArray* associationsLogsHandlerClasses=nil;
|
|||
NSDebugMLLog(@"associations",@"object_get_class_name(retValue object)=%s", object_get_class_name(retValue));
|
||||
}
|
||||
NSDebugMLLog(@"associations",@"_part=%@",_part);
|
||||
NSDebugMLLog(@"associations",@"_part class=%@",NSStringFromClass([_part class]));
|
||||
if ([_part hasPrefix:@"\""])
|
||||
{
|
||||
_part=[_part stringWithoutPrefix:@"\""];
|
||||
while([keys count]>0)
|
||||
{
|
||||
id tmpPart=[keys objectAtIndex:0];
|
||||
[keys removeObjectAtIndex:0];
|
||||
if ([tmpPart hasSuffix:@"\""])
|
||||
{
|
||||
tmpPart=[tmpPart stringWithoutSuffix:@"\""];
|
||||
_part=[_part stringByAppendingFormat:@".%@",tmpPart];
|
||||
break;
|
||||
}
|
||||
else
|
||||
_part=[_part stringByAppendingFormat:@".%@",tmpPart];
|
||||
}
|
||||
}
|
||||
NSDebugMLLog(@"associations",@"_part=%@",_part);
|
||||
_handlerClass=[associationsHandlerClasses objectForKey:_part];
|
||||
NSDebugMLLog(@"associations",@"_handlerClass=%@",_handlerClass);
|
||||
if (_handlerClass)
|
||||
|
@ -685,12 +725,16 @@ static NSMutableArray* associationsLogsHandlerClasses=nil;
|
|||
if (retValue==EONullNull)
|
||||
retValue=nil;
|
||||
};
|
||||
#endif
|
||||
};
|
||||
if (retValue) {
|
||||
NSDebugMLLog(@"associations",@"retValue=%@",retValue);
|
||||
} else {
|
||||
NSDebugMLLog(@"associations",@"retValue=nil");
|
||||
}
|
||||
if (retValue)
|
||||
{
|
||||
NSDebugMLLog(@"associations",@"retValue=%@",retValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
NSDebugMLLog(@"associations",@"retValue=nil");
|
||||
}
|
||||
LOGClassFnStop();
|
||||
return retValue;
|
||||
};
|
||||
|
@ -705,9 +749,14 @@ if (retValue) {
|
|||
NSDebugMLLog(@"associations",@"value_ class:%@",[value_ class]);
|
||||
NSDebugMLLog(@"associations",@"value_ String class:%@",NSStringFromClass([value_ class]));
|
||||
NSDebugMLLog(@"associations",@"object_ String class:%@",NSStringFromClass([object_ class]));
|
||||
NSDebugMLLog(@"associations",@"GSWAssociation: keyPath_:%@",keyPath_);
|
||||
if (keyPath_)
|
||||
{
|
||||
NSMutableArray* keys=[[keyPath_ componentsSeparatedByString:@"."] mutableCopy];
|
||||
{
|
||||
#if GDL2
|
||||
[object_ takeValue:value_
|
||||
forKeyPath:keyPath_];
|
||||
#else
|
||||
NSMutableArray* keys=[[keyPath_ componentsSeparatedByString:@"."] mutableCopy];
|
||||
id _part=nil;
|
||||
id _object=object_;
|
||||
Class _handlerClass=Nil;
|
||||
|
@ -718,6 +767,25 @@ if (retValue) {
|
|||
[keys removeObjectAtIndex:0];
|
||||
NSDebugMLLog(@"associations",@"_part=%@",_part);
|
||||
NSDebugMLLog(@"associations",@"_part class=%@",NSStringFromClass([_part class]));
|
||||
if ([_part hasPrefix:@"\""])
|
||||
{
|
||||
_part=[_part stringWithoutPrefix:@"\""];
|
||||
while([keys count]>0)
|
||||
{
|
||||
id tmpPart=[keys objectAtIndex:0];
|
||||
[keys removeObjectAtIndex:0];
|
||||
if ([tmpPart hasSuffix:@"\""])
|
||||
{
|
||||
tmpPart=[tmpPart stringWithoutSuffix:@"\""];
|
||||
_part=[_part stringByAppendingFormat:@".%@",tmpPart];
|
||||
break;
|
||||
}
|
||||
else
|
||||
_part=[_part stringByAppendingFormat:@".%@",tmpPart];
|
||||
}
|
||||
}
|
||||
NSDebugMLLog(@"associations",@"_part=%@",_part);
|
||||
|
||||
_handlerClass=[associationsHandlerClasses objectForKey:_part];
|
||||
NSDebugMLLog(@"associations",@"_handlerClass=%@",_handlerClass);
|
||||
if (_handlerClass)
|
||||
|
@ -759,8 +827,8 @@ if (retValue) {
|
|||
else
|
||||
{
|
||||
GSWLogAssertGood(_object);
|
||||
/* //MGNEW [_object setIVarNamed:_part
|
||||
withValue:value_];*/
|
||||
//MGNEW [_object setIVarNamed:_part
|
||||
// withValue:value_];
|
||||
[_object takeValue:value_
|
||||
forKey:_part];//MGNEW
|
||||
#ifdef GDL2
|
||||
|
@ -790,6 +858,7 @@ if (retValue) {
|
|||
};
|
||||
};
|
||||
};
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWComponent.m - GSWeb: Class GSWComponent
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWComponent.m - <title>GSWeb: Class GSWComponent</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
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
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 +25,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$";
|
||||
|
||||
|
@ -53,6 +60,7 @@ static char rcsId[] = "$Id$";
|
|||
[self setCachingEnabled:[GSWApp isCachingEnabled]];
|
||||
[componentDefinition _finishInitializingComponent:self];
|
||||
isSynchronized=[self synchronizesVariablesWithBindings];
|
||||
NSDebugMLLog(@"gswcomponents",@"isSynchronized=%s",(isSynchronized ? "YES" : "NO"));
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
|
@ -354,6 +362,9 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
-(void)synchronizeComponentToParent
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLog(@"Name=%@ - isSynchronized=%s",
|
||||
[self definitionName],(isSynchronized ? "YES" : "NO"));
|
||||
if (isSynchronized)
|
||||
{
|
||||
int i=0;
|
||||
|
@ -383,12 +394,16 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
};
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)synchronizeParentToComponent
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLog(@"Name=%@ - isSynchronized=%s",
|
||||
[self definitionName],(isSynchronized ? "YES" : "NO"));
|
||||
if (isSynchronized)
|
||||
{
|
||||
//Synchro Component->SubComponent
|
||||
|
@ -398,7 +413,7 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
id _value=nil;
|
||||
id _logValue=[self valueForBinding:@"GSWDebug"];
|
||||
BOOL _log=boolValueWithDefaultFor(_logValue,NO);
|
||||
NSDebugMLog(@"Nme=%@ - Synchro Component->SubComponent",
|
||||
NSDebugMLog(@"Name=%@ - Synchro Component->SubComponent",
|
||||
[self definitionName]);
|
||||
for(i=0;i<[associationsKeys count];i++)
|
||||
{
|
||||
|
@ -419,6 +434,7 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
};
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -872,9 +888,12 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
-(BOOL)synchronizesVariablesWithBindings
|
||||
{
|
||||
//OK
|
||||
NSDictionary* _userDictionary=[self userDictionary];
|
||||
id _synchronizesVariablesWithBindingsValue=[_userDictionary objectForKey:@"synchronizesVariablesWithBindings"];
|
||||
NSDictionary* _userDictionary=nil;
|
||||
id _synchronizesVariablesWithBindingsValue=nil;
|
||||
BOOL _synchronizesVariablesWithBindings=YES;
|
||||
LOGObjectFnStart();
|
||||
_userDictionary=[self userDictionary];
|
||||
_synchronizesVariablesWithBindingsValue=[_userDictionary objectForKey:@"synchronizesVariablesWithBindings"];
|
||||
NSDebugMLLog(@"gswcomponents",@"defName=%@ - userDictionary _synchronizesVariablesWithBindingsValue=%@",
|
||||
[self definitionName],
|
||||
_synchronizesVariablesWithBindingsValue);
|
||||
|
@ -885,6 +904,7 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
NSDebugMLLog(@"gswcomponents",@"userDictionary _synchronizesVariablesWithBindings=%s",
|
||||
(_synchronizesVariablesWithBindings ? "YES" : "NO"));
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return _synchronizesVariablesWithBindings ;
|
||||
};
|
||||
|
||||
|
@ -1538,8 +1558,8 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
*/
|
||||
LOGObjectFnStart();
|
||||
_stringsTable=[GSWApp stringsTableNamed:name_
|
||||
inFramework:[self frameworkName]
|
||||
languages:[self languages]];
|
||||
inFramework:[self frameworkName]
|
||||
languages:[self languages]];
|
||||
LOGObjectFnStop();
|
||||
return _stringsTable;
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* config.h - config
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWConfig.h - config
|
||||
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
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -19,7 +19,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.
|
||||
*/
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -52,5 +52,6 @@
|
|||
#define GSWOPTVALUE_SessionTimeOut @"3600"
|
||||
#define GSWOPTVALUE_WorkerThreadCount @"8"
|
||||
#define GSWOPTVALUE_MultiThreadEnabled @"YES"
|
||||
#define GSWOPTVALUE_AdaptorHost @""
|
||||
|
||||
#endif // _GSWebConfig_h__
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* constants.h - constants
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/* GSWConstants.h - constants
|
||||
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
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -178,6 +178,7 @@ extern NSString* GSWOPT_WorkerThreadCount[2];
|
|||
extern NSString* GSWOPT_ProjectSearchPath;
|
||||
extern NSString* GSWOPT_MultiThreadEnabled;
|
||||
extern NSString* GSWOPT_DebugSetConfigFilePath;
|
||||
extern NSString* GSWOPT_AdaptorHost[2];
|
||||
|
||||
|
||||
//====================================================================
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* constants.m - constants
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWConstants.m - <title>constants</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
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
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 +25,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$";
|
||||
|
||||
|
@ -177,6 +184,7 @@ NSString* GSWOPT_WorkerThreadCount[2]={ @"GSWWorkerThreadCount", @"WOWorkerThrea
|
|||
NSString* GSWOPT_ProjectSearchPath=@"NSProjectSearchPath";
|
||||
NSString* GSWOPT_MultiThreadEnabled=@"GSWMTEnabled";
|
||||
NSString* GSWOPT_DebugSetConfigFilePath=@"GSWDebugSetConfigFilePath";
|
||||
NSString* GSWOPT_AdaptorHost[2]={ @"GSWAdaptorHost", @"WOAdaptorHost" };
|
||||
|
||||
//====================================================================
|
||||
// Cache Marker
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* debug.h - debug
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** debug.h - debug
|
||||
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
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -19,7 +19,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.
|
||||
*/
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -35,13 +35,38 @@ extern void GSWLogAssertGood_(CONST char* file,int line,NSObject* object);
|
|||
#define GSWLogC(cString); GSWLogC_(__FILE__,__LINE__,cString);
|
||||
#define GSWLogDumpObject(object,deep); GSWLogDumpObject_(__FILE__,__LINE__,object,deep);
|
||||
#define GSWLogAssertGood(object); GSWLogAssertGood_(__FILE__,__LINE__,object);
|
||||
|
||||
//Log Memory Alloc/Dealloc
|
||||
#ifdef GSWDEBUG_MEM
|
||||
#define GSWLogMemC(cString); GSWLogC_(__FILE__,__LINE__,cString);
|
||||
#else
|
||||
#define GSWLogMemC(cString);
|
||||
#endif
|
||||
|
||||
//Log Locks
|
||||
#ifdef GSWDEBUG_LOCK
|
||||
#define GSWLogLockC(cString); GSWLogC_(__FILE__,__LINE__,cString);
|
||||
#else
|
||||
#define GSWLogLockC(cString);
|
||||
#endif
|
||||
|
||||
//Log Locks
|
||||
#ifdef GSWDEBUG_DEEP
|
||||
#define GSWLogDeepC(cString); GSWLogC_(__FILE__,__LINE__,cString);
|
||||
#else
|
||||
#define GSWLogDeepC(cString);
|
||||
#endif
|
||||
|
||||
#else
|
||||
#define GSWLogC(cString);
|
||||
#define GSWLogDumpObject(object,deep);
|
||||
#define GSWLogAssertGood(object);
|
||||
#define GSWLogMemC(cString);
|
||||
#define GSWLogLockC(cString);
|
||||
#define GSWLogDeepC(cString);
|
||||
#endif
|
||||
|
||||
|
||||
// Normal Debug
|
||||
#ifdef DEBUG
|
||||
#define LOGClassFnStart() \
|
||||
do { if (GSDebugSet(@"GSWebFn") == YES) { \
|
||||
|
@ -83,7 +108,6 @@ extern void GSWLogAssertGood_(CONST char* file,int line,NSObject* object);
|
|||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,@"FNSTOP %s"); \
|
||||
NSLog(fmt,comment); }} while (0)
|
||||
|
||||
|
||||
#define LOGObjectFnStart() \
|
||||
do { if (GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg(self, _cmd, __FILE__, __LINE__,@"FNSTART"); \
|
||||
|
@ -243,4 +267,437 @@ extern void GSWLogAssertGood_(CONST char* file,int line,NSObject* object);
|
|||
#define NSDebugMLLogCond(cond, level, format, args...) {}
|
||||
#define NSDebugMLogCond(cond, format, args...) {}
|
||||
#endif
|
||||
|
||||
//Deep Debug
|
||||
#if defined(DEBUG) && defined(GSWDEBUG_DEEP)
|
||||
#define LOGDEEPClassFnStart() \
|
||||
do { if (GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,@"FNSTART"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGDEEPClassFnStop() \
|
||||
do { if (GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__,__FILE__, __LINE__,@"FNSTOP"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGDEEPClassFnStartC(comment) \
|
||||
do { if (GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,@"FNSTART %s"); \
|
||||
NSLog(fmt,comment); }} while (0)
|
||||
|
||||
#define LOGDEEPClassFnStopC(comment) \
|
||||
do { if (GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,@"FNSTOP %s"); \
|
||||
NSLog(fmt,comment); }} while (0)
|
||||
|
||||
#define LOGDEEPClassFnStartCond(cond) \
|
||||
do { if (cond && GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,@"FNSTART"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGDEEPClassFnStopCond(cond) \
|
||||
do { if (cond && GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,@"FNSTOP"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGDEEPClassFnStartCondC(cond,comment) \
|
||||
do { if (cond && GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,@"FNSTART %s"); \
|
||||
NSLog(fmt,comment); }} while (0)
|
||||
|
||||
#define LOGDEEPClassFnStopCondC(cond,comment) \
|
||||
do { if (cond && GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,@"FNSTOP %s"); \
|
||||
NSLog(fmt,comment); }} while (0)
|
||||
|
||||
#define LOGDEEPObjectFnStart() \
|
||||
do { if (GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg(self, _cmd, __FILE__, __LINE__,@"FNSTART"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGDEEPObjectFnStop() \
|
||||
do { if (GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg(self, _cmd, __FILE__, __LINE__,@"FNSTOP"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGDEEPObjectFnStartC(comment) \
|
||||
do { if (GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg(self, _cmd, __FILE__, __LINE__,@"FNSTART %s"); \
|
||||
NSLog(fmt,comment); }} while (0)
|
||||
|
||||
#define LOGDEEPObjectFnStopC(comment) \
|
||||
do { if (GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg(self, _cmd, __FILE__, __LINE__,@"FNSTOP %s"); \
|
||||
NSLog(fmt,comment); }} while (0)
|
||||
|
||||
#define LOGDEEPObjectFnStartCond(cond) \
|
||||
do { if (cond && GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg(self, _cmd, __FILE__, __LINE__,@"FNSTART"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGDEEPObjectFnStopCond(cond) \
|
||||
do { if (cond && GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg(self, _cmd, __FILE__, __LINE__,@"FNSTOP"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGDEEPObjectFnStartCondC(cond,comment) \
|
||||
do { if (cond && GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg(self, _cmd, __FILE__, __LINE__,@"FNSTART %s"); \
|
||||
NSLog(fmt,comment); }} while (0)
|
||||
|
||||
#define LOGDEEPObjectFnStopCondC(cond,comment) \
|
||||
do { if (cond && GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg(self, _cmd, __FILE__, __LINE__,@"FNSTOP %s"); \
|
||||
NSLog(fmt,comment); }} while (0)
|
||||
|
||||
#define LOGDEEPObjectFnNotImplemented() \
|
||||
do { if (GSDebugSet(@"dflt") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg(self, _cmd, __FILE__, __LINE__,@"NOT IMPLEMENTED"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGDEEPClassFnNotImplemented() \
|
||||
do { if (GSDebugSet(@"dflt") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,@"NOT IMPLEMENTED"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGDEEPClassFnNotImplemented() \
|
||||
do { if (GSDebugSet(@"dflt") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,@"NOT IMPLEMENTED"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGDEEPSeriousError(format, args...) \
|
||||
do { if (GSDebugSet(@"seriousError") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,format); \
|
||||
NSString *fmt2 = [NSString stringWithFormat:@"*SERIOUS ERROR*: %@",fmt]; \
|
||||
NSLog(fmt2, ## args); }} while (0)
|
||||
|
||||
#define LOGDEEPSeriousError0(format) \
|
||||
do { if (GSDebugSet(@"seriousError") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,format); \
|
||||
NSString *fmt2 = [NSString stringWithFormat:@"*SERIOUS ERROR*: %@",fmt]; \
|
||||
NSLog(@"%@",fmt2); }} while (0)
|
||||
|
||||
#define LOGDEEPException(format, args...) \
|
||||
do { if (GSDebugSet(@"exception") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,format); \
|
||||
NSString *fmt2 = [NSString stringWithFormat:@"*EXCEPTION*: %@",fmt]; \
|
||||
NSLog(fmt2, ## args); }} while (0)
|
||||
|
||||
#define LOGDEEPException0(format) \
|
||||
do { if (GSDebugSet(@"exception") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,format); \
|
||||
NSString *fmt2 = [NSString stringWithFormat:@"*EXCEPTION*: %@",fmt]; \
|
||||
NSLog(@"%@",fmt2); }} while (0)
|
||||
|
||||
#define LOGDEEPError(format, args...) \
|
||||
do { if (GSDebugSet(@"error") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,format); \
|
||||
NSString *fmt2 = [NSString stringWithFormat:@"*ERROR*: %@",fmt]; \
|
||||
NSLog(fmt2, ## args);}} while (0)
|
||||
|
||||
#define LOGDEEPError0(format) \
|
||||
do { if (GSDebugSet(@"error") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,format); \
|
||||
NSString *fmt2 = [NSString stringWithFormat:@"*ERROR*: %@",fmt]; \
|
||||
NSLog(@"%@",fmt2); }} while (0)
|
||||
|
||||
#define NSDebugDeepMLLogCond(cond, level, format, args...) \
|
||||
do { if (cond && GSDebugSet(level) == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg( \
|
||||
self, _cmd, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt, ## args); }} while (0)
|
||||
|
||||
#define NSDebugDeepMLog(format, args...) \
|
||||
do { if (GSDebugSet(@"dflt") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg( \
|
||||
self, _cmd, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt, ## args); }} while (0)
|
||||
|
||||
#define NSDebugDeepMLLog(level, format, args...) \
|
||||
do { if (GSDebugSet(level) == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg( \
|
||||
self, _cmd, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt, ## args); }} while (0)
|
||||
|
||||
#define NSDebugDeepMLogCond(cond, format, args...) \
|
||||
do { if (cond && GSDebugSet(@"dflt") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg( \
|
||||
self, _cmd, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt, ## args); }} while (0)
|
||||
|
||||
#define NSDebugDeepMLog0(format) \
|
||||
do { if (GSDebugSet(@"dflt") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg( \
|
||||
self, _cmd, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define NSDebugDeepMLLog0(level,format) \
|
||||
do { if (GSDebugSet(level) == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg( \
|
||||
self, _cmd, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define NSDebugDeepFLog0(format) \
|
||||
do { if (GSDebugSet(@"dflt") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg( \
|
||||
__PRETTY_FUNCTION__, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define NSDebugDeepFLLog0(level,format) \
|
||||
do { if (GSDebugSet(level) == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg( \
|
||||
__PRETTY_FUNCTION__, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#else
|
||||
#define LOGDEEPClassFnStart() {}
|
||||
#define LOGDEEPClassFnStop() {}
|
||||
#define LOGDEEPClassFnStartC(comment) {}
|
||||
#define LOGDEEPClassFnStopC(comment) {}
|
||||
#define LOGDEEPClassFnStartCond(cond) {}
|
||||
#define LOGDEEPClassFnStopCond(cond) {}
|
||||
#define LOGDEEPClassFnStartCondC(cond,comment) {}
|
||||
#define LOGDEEPClassFnStopCondC(cond,comment) {}
|
||||
#define LOGDEEPClassFnNotImplemented() {}
|
||||
#define LOGDEEPObjectFnStart() {}
|
||||
#define LOGDEEPObjectFnStop() {}
|
||||
#define LOGDEEPObjectFnStartC(comment) {}
|
||||
#define LOGDEEPObjectFnStopC(comment) {}
|
||||
#define LOGDEEPObjectFnStartCond(cond) {}
|
||||
#define LOGDEEPObjectFnStopCond(cond) {}
|
||||
#define LOGDEEPObjectFnStartCondC(cond,comment) {}
|
||||
#define LOGDEEPObjectFnStopCondC(cond,comment) {}
|
||||
#define LOGDEEPObjectFnNotImplemented() {}
|
||||
#define LOGDEEPSeriousError(format, args...) {}
|
||||
#define LOGDEEPSeriousError0(format) {}
|
||||
#define LOGDEEPError(format, args...) {}
|
||||
#define LOGDEEPError0(format) {}
|
||||
#define LOGDEEPException(format, args...) {}
|
||||
#define LOGDEEPException0(format) {}
|
||||
#define NSDebugDeepMLLog(format, args...) {}
|
||||
#define NSDebugDeepMLog(format, args...) {}
|
||||
#define NSDebugDeepMLog0(format) {}
|
||||
#define NSDebugDeepMLLog0(level,format) {}
|
||||
#define NSDebugDeepFLog0(format) {}
|
||||
#define NSDebugDeepFLLog0(level,format) {}
|
||||
#define NSDebugDeepMLLogCond(cond, level, format, args...) {}
|
||||
#define NSDebugDeepMLogCond(cond, format, args...) {}
|
||||
#endif
|
||||
|
||||
//Lock Debug
|
||||
#if defined(DEBUG) && (defined(GSWDEBUG_DEEP) || defined (GSWDEBUG_LOCK))
|
||||
#define LOGLOCKClassFnStart() \
|
||||
do { if (GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,@"FNSTART"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGLOCKClassFnStop() \
|
||||
do { if (GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__,__FILE__, __LINE__,@"FNSTOP"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGLOCKClassFnStartC(comment) \
|
||||
do { if (GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,@"FNSTART %s"); \
|
||||
NSLog(fmt,comment); }} while (0)
|
||||
|
||||
#define LOGLOCKClassFnStopC(comment) \
|
||||
do { if (GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,@"FNSTOP %s"); \
|
||||
NSLog(fmt,comment); }} while (0)
|
||||
|
||||
#define LOGLOCKClassFnStartCond(cond) \
|
||||
do { if (cond && GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,@"FNSTART"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGLOCKClassFnStopCond(cond) \
|
||||
do { if (cond && GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,@"FNSTOP"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGLOCKClassFnStartCondC(cond,comment) \
|
||||
do { if (cond && GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,@"FNSTART %s"); \
|
||||
NSLog(fmt,comment); }} while (0)
|
||||
|
||||
#define LOGLOCKClassFnStopCondC(cond,comment) \
|
||||
do { if (cond && GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,@"FNSTOP %s"); \
|
||||
NSLog(fmt,comment); }} while (0)
|
||||
|
||||
#define LOGLOCKObjectFnStart() \
|
||||
do { if (GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg(self, _cmd, __FILE__, __LINE__,@"FNSTART"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGLOCKObjectFnStop() \
|
||||
do { if (GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg(self, _cmd, __FILE__, __LINE__,@"FNSTOP"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGLOCKObjectFnStartC(comment) \
|
||||
do { if (GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg(self, _cmd, __FILE__, __LINE__,@"FNSTART %s"); \
|
||||
NSLog(fmt,comment); }} while (0)
|
||||
|
||||
#define LOGLOCKObjectFnStopC(comment) \
|
||||
do { if (GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg(self, _cmd, __FILE__, __LINE__,@"FNSTOP %s"); \
|
||||
NSLog(fmt,comment); }} while (0)
|
||||
|
||||
#define LOGLOCKObjectFnStartCond(cond) \
|
||||
do { if (cond && GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg(self, _cmd, __FILE__, __LINE__,@"FNSTART"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGLOCKObjectFnStopCond(cond) \
|
||||
do { if (cond && GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg(self, _cmd, __FILE__, __LINE__,@"FNSTOP"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGLOCKObjectFnStartCondC(cond,comment) \
|
||||
do { if (cond && GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg(self, _cmd, __FILE__, __LINE__,@"FNSTART %s"); \
|
||||
NSLog(fmt,comment); }} while (0)
|
||||
|
||||
#define LOGLOCKObjectFnStopCondC(cond,comment) \
|
||||
do { if (cond && GSDebugSet(@"GSWebFn") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg(self, _cmd, __FILE__, __LINE__,@"FNSTOP %s"); \
|
||||
NSLog(fmt,comment); }} while (0)
|
||||
|
||||
#define LOGLOCKObjectFnNotImplemented() \
|
||||
do { if (GSDebugSet(@"dflt") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg(self, _cmd, __FILE__, __LINE__,@"NOT IMPLEMENTED"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGLOCKClassFnNotImplemented() \
|
||||
do { if (GSDebugSet(@"dflt") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,@"NOT IMPLEMENTED"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGLOCKClassFnNotImplemented() \
|
||||
do { if (GSDebugSet(@"dflt") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,@"NOT IMPLEMENTED"); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define LOGLOCKSeriousError(format, args...) \
|
||||
do { if (GSDebugSet(@"seriousError") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,format); \
|
||||
NSString *fmt2 = [NSString stringWithFormat:@"*SERIOUS ERROR*: %@",fmt]; \
|
||||
NSLog(fmt2, ## args); }} while (0)
|
||||
|
||||
#define LOGLOCKSeriousError0(format) \
|
||||
do { if (GSDebugSet(@"seriousError") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,format); \
|
||||
NSString *fmt2 = [NSString stringWithFormat:@"*SERIOUS ERROR*: %@",fmt]; \
|
||||
NSLog(@"%@",fmt2); }} while (0)
|
||||
|
||||
#define LOGLOCKException(format, args...) \
|
||||
do { if (GSDebugSet(@"exception") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,format); \
|
||||
NSString *fmt2 = [NSString stringWithFormat:@"*EXCEPTION*: %@",fmt]; \
|
||||
NSLog(fmt2, ## args); }} while (0)
|
||||
|
||||
#define LOGLOCKException0(format) \
|
||||
do { if (GSDebugSet(@"exception") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,format); \
|
||||
NSString *fmt2 = [NSString stringWithFormat:@"*EXCEPTION*: %@",fmt]; \
|
||||
NSLog(@"%@",fmt2); }} while (0)
|
||||
|
||||
#define LOGLOCKError(format, args...) \
|
||||
do { if (GSDebugSet(@"error") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,format); \
|
||||
NSString *fmt2 = [NSString stringWithFormat:@"*ERROR*: %@",fmt]; \
|
||||
NSLog(fmt2, ## args);}} while (0)
|
||||
|
||||
#define LOGLOCKError0(format) \
|
||||
do { if (GSDebugSet(@"error") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg(__PRETTY_FUNCTION__, __FILE__, __LINE__,format); \
|
||||
NSString *fmt2 = [NSString stringWithFormat:@"*ERROR*: %@",fmt]; \
|
||||
NSLog(@"%@",fmt2); }} while (0)
|
||||
|
||||
#define NSDebugLockMLLogCond(cond, level, format, args...) \
|
||||
do { if (cond && GSDebugSet(level) == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg( \
|
||||
self, _cmd, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt, ## args); }} while (0)
|
||||
|
||||
#define NSDebugLockMLLog(level, format, args...) \
|
||||
do { if (GSDebugSet(level) == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg( \
|
||||
self, _cmd, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt, ## args); }} while (0)
|
||||
|
||||
#define NSDebugLockMLogCond(cond, format, args...) \
|
||||
do { if (cond && GSDebugSet(@"dflt") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg( \
|
||||
self, _cmd, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt, ## args); }} while (0)
|
||||
|
||||
#define NSDebugLockMLog(format, args...) \
|
||||
do { if (GSDebugSet(@"dflt") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg( \
|
||||
self, _cmd, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt, ## args); }} while (0)
|
||||
|
||||
#define NSDebugLockMLog0(format) \
|
||||
do { if (GSDebugSet(@"dflt") == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg( \
|
||||
self, _cmd, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define NSDebugLockMLLog0(level,format) \
|
||||
do { if (GSDebugSet(level) == YES) { \
|
||||
NSString *fmt = GSDebugMethodMsg( \
|
||||
self, _cmd, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define NSDebugLockFLog0(format) \
|
||||
do { if (GSDebugSet(@"dflt") == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg( \
|
||||
__PRETTY_FUNCTION__, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#define NSDebugLockFLLog0(level,format) \
|
||||
do { if (GSDebugSet(level) == YES) { \
|
||||
NSString *fmt = GSDebugFunctionMsg( \
|
||||
__PRETTY_FUNCTION__, __FILE__, __LINE__, format); \
|
||||
NSLog(fmt); }} while (0)
|
||||
|
||||
#else
|
||||
#define LOGLOCKClassFnStart() {}
|
||||
#define LOGLOCKClassFnStop() {}
|
||||
#define LOGLOCKClassFnStartC(comment) {}
|
||||
#define LOGLOCKClassFnStopC(comment) {}
|
||||
#define LOGLOCKClassFnStartCond(cond) {}
|
||||
#define LOGLOCKClassFnStopCond(cond) {}
|
||||
#define LOGLOCKClassFnStartCondC(cond,comment) {}
|
||||
#define LOGLOCKClassFnStopCondC(cond,comment) {}
|
||||
#define LOGLOCKClassFnNotImplemented() {}
|
||||
#define LOGLOCKObjectFnStart() {}
|
||||
#define LOGLOCKObjectFnStop() {}
|
||||
#define LOGLOCKObjectFnStartC(comment) {}
|
||||
#define LOGLOCKObjectFnStopC(comment) {}
|
||||
#define LOGLOCKObjectFnStartCond(cond) {}
|
||||
#define LOGLOCKObjectFnStopCond(cond) {}
|
||||
#define LOGLOCKObjectFnStartCondC(cond,comment) {}
|
||||
#define LOGLOCKObjectFnStopCondC(cond,comment) {}
|
||||
#define LOGLOCKObjectFnNotImplemented() {}
|
||||
#define LOGLOCKSeriousError(format, args...) {}
|
||||
#define LOGLOCKSeriousError0(format) {}
|
||||
#define LOGLOCKError(format, args...) {}
|
||||
#define LOGLOCKError0(format) {}
|
||||
#define LOGLOCKException(format, args...) {}
|
||||
#define LOGLOCKException0(format) {}
|
||||
#define NSDebugLockMLLog(format, args...) {}
|
||||
#define NSDebugLockMLog(format, args...) {}
|
||||
#define NSDebugLockMLog0(format) {}
|
||||
#define NSDebugLockMLLog0(level,format) {}
|
||||
#define NSDebugLockFLog0(format) {}
|
||||
#define NSDebugLockFLLog0(level,format) {}
|
||||
#define NSDebugLockMLLogCond(cond, level, format, args...) {}
|
||||
#define NSDebugLockMLogCond(cond, format, args...) {}
|
||||
#endif
|
||||
|
||||
#endif // _GSWebDebug_h__
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/* GSWDefaultAdaptor.h - GSWeb: Class GSWDefaultAdaptor
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWDefaultAdaptor.h - GSWeb: Class GSWDefaultAdaptor
|
||||
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
|
||||
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
|
@ -19,7 +19,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.
|
||||
*/
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -32,42 +32,45 @@ extern int iBlock;
|
|||
|
||||
@interface GSWDefaultAdaptor: GSWAdaptor
|
||||
{
|
||||
int port;
|
||||
NSString* host;
|
||||
int instance;
|
||||
int queueSize;
|
||||
int workerThreadCount;
|
||||
BOOL isMultiThreadEnabled;
|
||||
NSFileHandle* fileHandle;
|
||||
NSMutableArray* waitingThreads;
|
||||
NSMutableArray* threads;
|
||||
NSLock* selfLock;
|
||||
BOOL blocked;
|
||||
};
|
||||
int _port;
|
||||
NSString* _host;
|
||||
NSString* _adaptorHost;
|
||||
int _instance;
|
||||
int _queueSize;
|
||||
int _workerThreadCount;
|
||||
BOOL _isMultiThreadEnabled;
|
||||
NSFileHandle* _fileHandle;
|
||||
NSMutableArray* _waitingThreads;
|
||||
NSMutableArray* _threads;
|
||||
NSLock* _selfLock;
|
||||
BOOL _blocked;
|
||||
}
|
||||
|
||||
-(void)dealloc;
|
||||
-(id)initWithName:(NSString*)name_
|
||||
arguments:(NSDictionary*)arguments;
|
||||
-(id)initWithName:(NSString*)name
|
||||
arguments:(NSDictionary*)arguments;
|
||||
|
||||
-(void)registerForEvents;
|
||||
-(void)unregisterForEvents;
|
||||
|
||||
-(void)logWithFormat:(NSString*)_format,...;
|
||||
+(void)logWithFormat:(NSString*)_format,...;
|
||||
-(void)logWithFormat:(NSString*)format,...;
|
||||
+(void)logWithFormat:(NSString*)format,...;
|
||||
|
||||
-(void)runOnce;
|
||||
-(BOOL)doesBusyRunOnce;
|
||||
-(BOOL)dispatchesRequestsConcurrently;
|
||||
-(int)port;
|
||||
-(NSString*)host;
|
||||
-(void)adaptorThreadExited:(GSWDefaultAdaptorThread*)adaptorThread_;
|
||||
-(void)adaptorThreadExited:(GSWDefaultAdaptorThread*)adaptorThread;
|
||||
-(BOOL)tryLock;
|
||||
-(void)unlock;
|
||||
|
||||
-(void)setWorkerThreadCount:(id)workerThreadCount_;
|
||||
-(void)setWorkerThreadCount:(id)workerThreadCount;
|
||||
-(id)workerThreadCount;
|
||||
-(void)setListenQueueSize:(id)listenQueueSize_;
|
||||
-(void)setListenQueueSize:(id)listenQueueSize;
|
||||
-(BOOL)isMultiThreadEnabled;
|
||||
-(BOOL)isConnectionAllowedWithHandle:(NSFileHandle*)handle
|
||||
returnedMessage:(NSString**)retMessage;
|
||||
|
||||
@end
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
|||
/* GSWDefaultAdaptorThread.h - GSWeb: Class GSWDefaultAdaptorThread
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWDefaultAdaptorThread.h - GSWeb: Class GSWDefaultAdaptorThread
|
||||
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
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -19,7 +19,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.
|
||||
*/
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -30,46 +30,55 @@
|
|||
//==============================================================================
|
||||
@interface GSWDefaultAdaptorThread: NSObject
|
||||
{
|
||||
GSWApplication* application;
|
||||
GSWAdaptor* adaptor;
|
||||
NSFileHandle* stream;
|
||||
NSAutoreleasePool* pool;
|
||||
BOOL keepAlive;
|
||||
NSRunLoop* currentRunLoop;
|
||||
NSDate* runLoopDate;
|
||||
BOOL isMultiThread;
|
||||
NSDate* creationDate;
|
||||
NSDate* runDate;
|
||||
NSDate* dispatchRequestDate;
|
||||
NSDate* sendResponseDate;
|
||||
int requestNamingConv;//GSWNAMES_INDEX or WONAMES_INDEX
|
||||
GSWApplication* _application;
|
||||
GSWAdaptor* _adaptor;
|
||||
NSFileHandle* _stream;
|
||||
NSAutoreleasePool* _pool;
|
||||
BOOL _keepAlive;
|
||||
NSRunLoop* _currentRunLoop;
|
||||
NSDate* _runLoopDate;
|
||||
BOOL _isMultiThread;
|
||||
NSDate* _creationDate;
|
||||
NSDate* _runDate;
|
||||
NSDate* _dispatchRequestDate;
|
||||
NSDate* _sendResponseDate;
|
||||
int _requestNamingConv;//GSWNAMES_INDEX or WONAMES_INDEX
|
||||
}
|
||||
|
||||
-(id)initWithApp:(GSWApplication*)_application
|
||||
withAdaptor:(GSWAdaptor*)_adaptor
|
||||
withStream:(NSFileHandle*)stream_;
|
||||
-(id)initWithApp:(GSWApplication*)application
|
||||
withAdaptor:(GSWAdaptor*)adaptor
|
||||
withStream:(NSFileHandle*)stream;
|
||||
|
||||
-(void)run:(id)void_;
|
||||
-(void)run:(id)nothing;
|
||||
|
||||
-(GSWAdaptor*)adaptor;
|
||||
-(NSAutoreleasePool*)pool;
|
||||
-(void)setPool:(NSAutoreleasePool*)pool_
|
||||
destroyLast:(BOOL)destroy_;
|
||||
-(void)setPool:(NSAutoreleasePool*)pool
|
||||
destroyLast:(BOOL)destroy;
|
||||
|
||||
+(NSMutableArray*)completeLinesWithData:(NSMutableData*)data_
|
||||
returnedConsumedCount:(int*)consumedCount_
|
||||
returnedHeadersEndFlag:(BOOL*)headersEndFlag_;
|
||||
-(BOOL)readRequestReturnedRequestLine:(NSString**)requestLine_
|
||||
returnedHeaders:(NSDictionary**)headers_
|
||||
returnedData:(NSData**)data_;
|
||||
-(GSWRequest*)createRequestFromRequestLine:(NSString*)requestLine_
|
||||
headers:(NSDictionary*)headers_
|
||||
data:(NSData*)data_;
|
||||
+(NSMutableArray*)completeLinesWithData:(NSMutableData*)data
|
||||
returnedConsumedCount:(int*)consumedCount
|
||||
returnedHeadersEndFlag:(BOOL*)headersEndFlag;
|
||||
|
||||
-(BOOL)readRequestReturnedRequestLine:(NSString**)requestLine
|
||||
returnedHeaders:(NSDictionary**)headers
|
||||
returnedData:(NSData**)data;
|
||||
-(GSWRequest*)createRequestFromRequestLine:(NSString*)requestLine
|
||||
headers:(NSDictionary*)headers
|
||||
data:(NSData*)data;
|
||||
-(void)sendResponse:(GSWResponse*)response;
|
||||
-(void)threadExited;
|
||||
+(id)threadExited:(NSNotification*)notif_;
|
||||
+(id)threadExited:(NSNotification*)notif;
|
||||
-(NSDate*)creationDate;
|
||||
-(BOOL)isExpired;
|
||||
|
||||
+(void)sendResponse:(GSWResponse*)response
|
||||
toStream:(NSFileHandle*)aStream
|
||||
withNamingConv:(int)requestNamingConv;
|
||||
|
||||
+(void)sendRetryLasterResponseToStream:(NSFileHandle*)stream;
|
||||
+(void)sendConnectionRefusedResponseToStream:(NSFileHandle*)stream
|
||||
withMessage:(NSString*)message;
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,11 +1,17 @@
|
|||
/* GSWDeployedBundle.m - GSWeb: Class GSWDeployedBundle
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWDeployedBundle.m - <title>GSWeb: Class GSWDeployedBundle</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: Mar 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
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 +25,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$";
|
||||
|
||||
|
@ -256,9 +263,9 @@ static char rcsId[] = "$Id$";
|
|||
NSString* _path=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"name_=%@ language_=%@",name_,language_);
|
||||
NSDebugMLLog(@"bundles",@"bundlePath=%@ Trying WebServerResources",bundlePath);
|
||||
NSDebugMLLog(@"bundles",@"bundlePath=%@ Trying Resources/WebServer",bundlePath);
|
||||
_path=[self lockedRelativePathForResourceNamed:name_
|
||||
inDirectory:@"WebServerResources"
|
||||
inDirectory:@"Resources/WebServer"
|
||||
forLanguage:language_];
|
||||
NSDebugMLLog(@"bundles",@"_path=%@",_path);
|
||||
if (!_path)
|
||||
|
@ -289,9 +296,9 @@ static char rcsId[] = "$Id$";
|
|||
NSString* _path=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"name_=%@ languages_=%@",name_,languages_);
|
||||
NSDebugMLLog(@"bundles",@"bundlePath=%@ Trying WebServerResources",bundlePath);
|
||||
NSDebugMLLog(@"bundles",@"bundlePath=%@ Trying Resources/WebServer",bundlePath);
|
||||
_path=[self lockedRelativePathForResourceNamed:name_
|
||||
inDirectory:@"WebServerResources"
|
||||
inDirectory:@"Resources/WebServer"
|
||||
forLanguages:languages_];
|
||||
NSDebugMLLog(@"bundles",@"_path=%@",_path);
|
||||
if (!_path)
|
||||
|
|
|
@ -147,7 +147,7 @@
|
|||
- (NSMutableDictionary *)inputObjectForQualifier;
|
||||
- (BOOL)inQueryMode;
|
||||
- (void)editingContext:(id)editingContext_
|
||||
presentErrorMessage:(id)msg;
|
||||
presentErrorMessage:(id)msg;
|
||||
- (id)insert;
|
||||
- (NSDictionary *)insertedObjectDefaultValues;
|
||||
- (void)insertObject:object_
|
||||
|
|
|
@ -1068,9 +1068,12 @@ Description: <EOKeyValueUnarchiver: 0x1a84d20>
|
|||
|
||||
if(insert)
|
||||
{
|
||||
NSDebugMLLog(@"gswdisplaygroup",@"insertObject:AtIndex: Will [_dataSource insertObject:anObject]");
|
||||
[_dataSource insertObject:anObject];
|
||||
NSDebugMLLog(@"gswdisplaygroup",@"insertObject:AtIndex: End [_dataSource insertObject:anObject]");
|
||||
|
||||
[_allObjects insertObject:anObject atIndex:index];
|
||||
[_allObjects insertObject:anObject
|
||||
atIndex:index];
|
||||
[self setCurrentBatchIndex:_batchIndex];
|
||||
|
||||
if(_delegateRespondsTo.didInsertObject == YES)
|
||||
|
@ -1090,7 +1093,9 @@ Description: <EOKeyValueUnarchiver: 0x1a84d20>
|
|||
id object=nil;
|
||||
LOGObjectFnStart();
|
||||
|
||||
NSDebugMLLog(@"gswdisplaygroup",@"Will [_dataSource createObject]");
|
||||
object = [_dataSource createObject];
|
||||
NSDebugMLLog(@"gswdisplaygroup",@"End [_dataSource createObject]");
|
||||
if(object == nil)
|
||||
{
|
||||
if(_delegateRespondsTo.createObjectFailed == YES)
|
||||
|
@ -1100,7 +1105,10 @@ Description: <EOKeyValueUnarchiver: 0x1a84d20>
|
|||
else
|
||||
{
|
||||
[object takeValuesFromDictionary:[self insertedObjectDefaultValues]];
|
||||
[self insertObject:object atIndex:index];
|
||||
NSDebugMLLog(@"gswdisplaygroup",@"Will insertObject:AtIndex:");
|
||||
[self insertObject:object
|
||||
atIndex:index];
|
||||
NSDebugMLLog(@"gswdisplaygroup",@"End insertObject:AtIndex:");
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return object;
|
||||
|
@ -1248,6 +1256,7 @@ Description: <EOKeyValueUnarchiver: 0x1a84d20>
|
|||
[self setInQueryMode:NO];
|
||||
qualifier=[self qualifierFromQueryValues];//OK
|
||||
NSDebugMLLog(@"gswdisplaygroup",@"qualifier=%@",qualifier);
|
||||
NSDebugMLLog(@"gswdisplaygroup",@"_dataSource=%@",_dataSource);
|
||||
[_dataSource setAuxiliaryQualifier:qualifier];//OK
|
||||
|
||||
NSDebugMLLog0(@"gswdisplaygroup",@"Will fetch");
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWProjectBundle.m - GSWeb: Class GSWProjectBundle
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWProjectBundle.m - <title>GSWeb: Class GSWProjectBundle</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: Mar 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
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 +25,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$";
|
||||
|
||||
|
@ -151,11 +158,9 @@ static char rcsId[] = "$Id$";
|
|||
NSEnumerator* _projectEnum = nil;
|
||||
NSEnumerator* _projectSearchPathEnum=nil;
|
||||
NSString* _path=nil;
|
||||
NSString* _suffix=isFramework_ ? GSFrameworkPSuffix : GSWApplicationPSuffix[GSWebNamingConv];
|
||||
LOGClassFnStart();
|
||||
NSDebugMLLog(@"bundles",@"name_:%@",name_);
|
||||
NSDebugMLLog(@"bundles",@"isFramework_=%s",(isFramework_ ? "YES" : "NO"));
|
||||
NSDebugMLLog(@"bundles",@"_suffix:%@",_suffix);
|
||||
|
||||
_projectSearchPath=[GSWApplication projectSearchPath]; // ("H:\\Wotests")
|
||||
NSDebugMLLog(@"bundles",@"_projectSearchPath:%@",_projectSearchPath);
|
||||
|
@ -199,8 +204,14 @@ static char rcsId[] = "$Id$";
|
|||
_projectEnum =[_projectsBundles objectEnumerator];
|
||||
while(!_projectBundle && (_aBundle = [_projectEnum nextObject]))
|
||||
{
|
||||
NSString* suffix1=isFramework_ ? GSFrameworkPSuffix : GSWApplicationPSuffix[GSWebNamingConv];
|
||||
NSString* suffix2=isFramework_ ? GSFrameworkPSuffix : GSWApplicationPSuffix[GSWebNamingConvInversed];
|
||||
NSDebugMLLog(@"bundles",@"suffix1:%@ suffix2",suffix1,suffix2);
|
||||
NSDebugMLLog(@"bundles",@"_aBundle:%@",_aBundle);
|
||||
if ([[_aBundle bundlePath]hasSuffix:_suffix] || [[_aBundle bundlePath]hasSuffix:@".debug"])
|
||||
|
||||
if ([[_aBundle bundlePath]hasSuffix:suffix1]
|
||||
|| [[_aBundle bundlePath]hasSuffix:suffix2]
|
||||
|| [[_aBundle bundlePath]hasSuffix:@".debug"])
|
||||
{
|
||||
NSString* _tmpName=[_aBundle projectName];
|
||||
NSDebugMLLog(@"bundles",@"_tmpName:%@",_tmpName);
|
||||
|
|
|
@ -38,6 +38,8 @@ extern NSDictionary* globalMime;
|
|||
NSMutableDictionary* appPaths;
|
||||
GSWMultiKeyDictionary* frameworkPaths;
|
||||
NSMutableDictionary* urlValuedElementsData;
|
||||
NSMutableDictionary* _stringsTablesByFrameworkByLanguageByName;//NDFN
|
||||
NSMutableDictionary* _stringsTableArraysByFrameworkByLanguageByName;//NDFN
|
||||
// NSMutableDictionary* frameworkPathsToFrameworksNames;
|
||||
NSArray* frameworkClassPaths;
|
||||
NSRecursiveLock* selfLock;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GSWResourceManager.m - GSWeb: Class GSWResourceManager
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
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
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -36,7 +36,7 @@ NSString* globalMimePListPathName=nil;
|
|||
NSDictionary* localGS2ISOLanguages=nil;
|
||||
NSDictionary* localISO2GSLanguages=nil;
|
||||
NSString* globalLanguagesPListPathName=nil;
|
||||
|
||||
NSString* localNotFoundMarker=@"NOTFOUND";
|
||||
//--------------------------------------------------------------------
|
||||
+(void)initialize
|
||||
{
|
||||
|
@ -112,6 +112,8 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
appPaths=[NSMutableDictionary new];
|
||||
frameworkPaths=[GSWMultiKeyDictionary new];
|
||||
urlValuedElementsData=[NSMutableDictionary new];
|
||||
_stringsTablesByFrameworkByLanguageByName=[NSMutableDictionary new];
|
||||
_stringsTableArraysByFrameworkByLanguageByName=[NSMutableDictionary new];
|
||||
[self _initFrameworkProjectBundles];
|
||||
// frameworkPathsToFrameworksNames=[NSMutableDictionary new];
|
||||
|
||||
|
@ -147,6 +149,8 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
DESTROY(appPaths);
|
||||
DESTROY(frameworkPaths);
|
||||
DESTROY(urlValuedElementsData);
|
||||
DESTROY(_stringsTablesByFrameworkByLanguageByName);
|
||||
DESTROY(_stringsTableArraysByFrameworkByLanguageByName);
|
||||
DESTROY(frameworkClassPaths);
|
||||
// DESTROY(frameworkPathsToFrameworksNames);
|
||||
GSWLogC("Dealloc GSWResourceManager: selfLock");
|
||||
|
@ -363,26 +367,26 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
//--------------------------------------------------------------------
|
||||
//NDFN
|
||||
-(NSDictionary*)stringsTableNamed:(NSString*)tableName_
|
||||
inFramework:(NSString*)frameworkName_
|
||||
languages:(NSArray*)languages_;
|
||||
inFramework:(NSString*)frameworkName_
|
||||
languages:(NSArray*)languages_;
|
||||
{
|
||||
NSDictionary* _stringsTable=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"resmanager",@"tableName=%@ frameworkName=%@",tableName_,frameworkName_);
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
_stringsTable=[self lockedStringsTableNamed:tableName_
|
||||
inFramework:frameworkName_
|
||||
languages:languages_];
|
||||
}
|
||||
{
|
||||
_stringsTable=[self lockedStringsTableNamed:tableName_
|
||||
inFramework:frameworkName_
|
||||
languages:languages_];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"resmanager",@"EXCEPTION:%@ (%@) [%s %d]",localException,[localException reason],__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
{
|
||||
NSDebugMLLog(@"resmanager",@"EXCEPTION:%@ (%@) [%s %d]",localException,[localException reason],__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
|
@ -392,26 +396,26 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
//--------------------------------------------------------------------
|
||||
//NDFN
|
||||
-(NSArray*)stringsTableArrayNamed:(NSString*)tableName_
|
||||
inFramework:(NSString*)frameworkName_
|
||||
languages:(NSArray*)languages_;
|
||||
inFramework:(NSString*)frameworkName_
|
||||
languages:(NSArray*)languages_;
|
||||
{
|
||||
NSArray* _stringsTableArray=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"resmanager",@"tableName=%@ frameworkName=%@",tableName_,frameworkName_);
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
_stringsTableArray=[self lockedStringsTableArrayNamed:tableName_
|
||||
inFramework:frameworkName_
|
||||
languages:languages_];
|
||||
}
|
||||
{
|
||||
_stringsTableArray=[self lockedStringsTableArrayNamed:tableName_
|
||||
inFramework:frameworkName_
|
||||
languages:languages_];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"resmanager",@"EXCEPTION:%@ (%@) [%s %d]",localException,[localException reason],__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
{
|
||||
NSDebugMLLog(@"resmanager",@"EXCEPTION:%@ (%@) [%s %d]",localException,[localException reason],__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
|
@ -491,8 +495,8 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
//--------------------------------------------------------------------
|
||||
//NDFN
|
||||
-(NSDictionary*)lockedStringsTableNamed:(NSString*)tableName_
|
||||
inFramework:(NSString*)frameworkName_
|
||||
languages:(NSArray*)languages_
|
||||
inFramework:(NSString*)frameworkName_
|
||||
languages:(NSArray*)languages_
|
||||
{
|
||||
//OK
|
||||
NSDictionary* _stringsTable=nil;
|
||||
|
@ -524,6 +528,11 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
language:_language];
|
||||
};
|
||||
};
|
||||
NSDebugMLLog(@"resmanager",@"lockedStringsTableNamed:%@ inFramework:%@ languages:%@: %@",
|
||||
tableName_,
|
||||
frameworkName_,
|
||||
languages_,
|
||||
_stringsTable);
|
||||
LOGObjectFnStop();
|
||||
return _stringsTable;
|
||||
};
|
||||
|
@ -570,9 +579,9 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)lockedCachedStringForKey:(NSString*)key_
|
||||
inTableNamed:(NSString*)tableName_
|
||||
inFramework:(NSString*)frameworkName_
|
||||
language:(NSString*)language_
|
||||
inTableNamed:(NSString*)tableName_
|
||||
inFramework:(NSString*)frameworkName_
|
||||
language:(NSString*)language_
|
||||
{
|
||||
//OK
|
||||
NSString* _string=nil;
|
||||
|
@ -589,15 +598,27 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSDictionary*)lockedCachedStringsTableWithName:(NSString*)tableName_
|
||||
inFramework:(NSString*)frameworkName_
|
||||
language:(NSString*)language_
|
||||
inFramework:(NSString*)frameworkName_
|
||||
language:(NSString*)language_
|
||||
{
|
||||
//OK
|
||||
NSDictionary* _stringsTable=nil;
|
||||
LOGObjectFnStart();
|
||||
_stringsTable=[self lockedStringsTableWithName:tableName_
|
||||
inFramework:frameworkName_
|
||||
language:language_];
|
||||
_stringsTable=[[[_stringsTablesByFrameworkByLanguageByName objectForKey:frameworkName_]
|
||||
objectForKey:language_]
|
||||
objectForKey:tableName_];
|
||||
if (!_stringsTable)
|
||||
_stringsTable=[self lockedStringsTableWithName:tableName_
|
||||
inFramework:frameworkName_
|
||||
language:language_];
|
||||
else if (_stringsTable==localNotFoundMarker)
|
||||
_stringsTable=nil;
|
||||
|
||||
NSDebugMLLog(@"resmanager",@"lockedCachedStringsTableNamed:%@ inFramework:%@ language:%@: %@",
|
||||
tableName_,
|
||||
frameworkName_,
|
||||
language_,
|
||||
_stringsTable);
|
||||
LOGObjectFnStop();
|
||||
return _stringsTable;
|
||||
};
|
||||
|
@ -605,23 +626,29 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
//--------------------------------------------------------------------
|
||||
//NDFN
|
||||
-(NSArray*)lockedCachedStringsTableArrayWithName:(NSString*)tableName_
|
||||
inFramework:(NSString*)frameworkName_
|
||||
language:(NSString*)language_
|
||||
inFramework:(NSString*)frameworkName_
|
||||
language:(NSString*)language_
|
||||
{
|
||||
//OK
|
||||
NSArray* _stringsTableArray=nil;
|
||||
LOGObjectFnStart();
|
||||
_stringsTableArray=[self lockedStringsTableArrayWithName:tableName_
|
||||
inFramework:frameworkName_
|
||||
language:language_];
|
||||
_stringsTableArray=[[[_stringsTableArraysByFrameworkByLanguageByName objectForKey:frameworkName_]
|
||||
objectForKey:language_]
|
||||
objectForKey:tableName_];
|
||||
if (!_stringsTableArray)
|
||||
_stringsTableArray=[self lockedStringsTableArrayWithName:tableName_
|
||||
inFramework:frameworkName_
|
||||
language:language_];
|
||||
else if (_stringsTableArray==localNotFoundMarker)
|
||||
_stringsTableArray=nil;
|
||||
LOGObjectFnStop();
|
||||
return _stringsTableArray;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSDictionary*)lockedStringsTableWithName:(NSString*)tableName_
|
||||
inFramework:(NSString*)frameworkName_
|
||||
language:(NSString*)language_
|
||||
inFramework:(NSString*)frameworkName_
|
||||
language:(NSString*)language_
|
||||
{
|
||||
//OK
|
||||
NSDictionary* _stringsTable=nil;
|
||||
|
@ -636,12 +663,12 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
NSDebugMLLog(@"resmanager",@"tableName_=%@ frameworkName_=%@ language_=%@",tableName_,frameworkName_,language_);
|
||||
_resourceName=[tableName_ stringByAppendingString:GSWStringTablePSuffix];
|
||||
if (!WOStrictFlag && [frameworkName_ isEqualToString:GSWFramework_all])
|
||||
{
|
||||
_frameworks=[frameworkProjectBundlesCache allKeys];
|
||||
_frameworks=[_frameworks arrayByAddingObject:@""];
|
||||
}
|
||||
{
|
||||
_frameworks=[frameworkProjectBundlesCache allKeys];
|
||||
_frameworks=[_frameworks arrayByAddingObject:@""];
|
||||
}
|
||||
else
|
||||
_frameworks=[NSArray arrayWithObject:frameworkName_ ? frameworkName_ : @""];
|
||||
_frameworks=[NSArray arrayWithObject:frameworkName_ ? frameworkName_ : @""];
|
||||
|
||||
for(i=0;!_path && i<[_frameworks count];i++)
|
||||
{
|
||||
|
@ -668,7 +695,7 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
{
|
||||
// NSDebugMLLog(@"resmanager",@"globalAppProjectBundle=%@",globalAppProjectBundle);
|
||||
_relativePath=[globalAppProjectBundle relativePathForResourceNamed:_resourceName
|
||||
forLanguage:language_];
|
||||
forLanguage:language_];
|
||||
// NSDebugMLLog(@"resmanager",@"_relativePath=%@",_relativePath);
|
||||
if (_relativePath)
|
||||
{
|
||||
|
@ -679,18 +706,45 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
};
|
||||
// NSDebugMLLog(@"resmanager",@"_path=%@",_path);
|
||||
if (_path)
|
||||
{
|
||||
//TODO use encoding ??
|
||||
_stringsTable=[NSDictionary dictionaryWithContentsOfFile:_path];
|
||||
if (!_stringsTable)
|
||||
{
|
||||
NSString* _tmpString=[NSString stringWithContentsOfFile:_path];
|
||||
LOGSeriousError(@"Bad stringTable \n%@\n from file %@",
|
||||
_tmpString,
|
||||
_path);
|
||||
};
|
||||
};
|
||||
// NSDebugMLLog(@"resmanager",@"_stringsTable=%@",_stringsTable);
|
||||
{
|
||||
//TODO use encoding ??
|
||||
_stringsTable=[NSDictionary dictionaryWithContentsOfFile:_path];
|
||||
if (!_stringsTable)
|
||||
{
|
||||
NSString* _tmpString=[NSString stringWithContentsOfFile:_path];
|
||||
LOGSeriousError(@"Bad stringTable \n%@\n from file %@",
|
||||
_tmpString,
|
||||
_path);
|
||||
};
|
||||
};
|
||||
{
|
||||
NSMutableDictionary* frameworkDict=[_stringsTablesByFrameworkByLanguageByName objectForKey:frameworkName_];
|
||||
NSMutableDictionary* languageDict=nil;
|
||||
if (!frameworkDict)
|
||||
{
|
||||
frameworkDict=[NSMutableDictionary dictionary];
|
||||
[_stringsTablesByFrameworkByLanguageByName setObject:frameworkDict
|
||||
forKey:frameworkName_];
|
||||
};
|
||||
languageDict=[frameworkDict objectForKey:language_];
|
||||
if (!languageDict)
|
||||
{
|
||||
languageDict=[NSMutableDictionary dictionary];
|
||||
[frameworkDict setObject:languageDict
|
||||
forKey:language_];
|
||||
};
|
||||
if (_stringsTable)
|
||||
[languageDict setObject:_stringsTable
|
||||
forKey:tableName_];
|
||||
else
|
||||
[languageDict setObject:localNotFoundMarker
|
||||
forKey:tableName_];
|
||||
}
|
||||
NSDebugMLLog(@"resmanager",@"lockedStringsTableWithName:%@ inFramework:%@ language:%@: %sFOUND",
|
||||
tableName_,
|
||||
frameworkName_,
|
||||
language_,
|
||||
(_stringsTable ? "" : "NOT "));
|
||||
LOGObjectFnStop();
|
||||
return _stringsTable;
|
||||
};
|
||||
|
@ -769,6 +823,29 @@ NSString* globalLanguagesPListPathName=nil;
|
|||
_path);
|
||||
};
|
||||
};
|
||||
{
|
||||
NSMutableDictionary* frameworkDict=[_stringsTableArraysByFrameworkByLanguageByName objectForKey:frameworkName_];
|
||||
NSMutableDictionary* languageDict=nil;
|
||||
if (!frameworkDict)
|
||||
{
|
||||
frameworkDict=[NSMutableDictionary dictionary];
|
||||
[_stringsTableArraysByFrameworkByLanguageByName setObject:frameworkDict
|
||||
forKey:frameworkName_];
|
||||
};
|
||||
languageDict=[frameworkDict objectForKey:language_];
|
||||
if (!languageDict)
|
||||
{
|
||||
languageDict=[NSMutableDictionary dictionary];
|
||||
[frameworkDict setObject:languageDict
|
||||
forKey:language_];
|
||||
};
|
||||
if (_stringsTableArray)
|
||||
[languageDict setObject:_stringsTableArray
|
||||
forKey:tableName_];
|
||||
else
|
||||
[languageDict setObject:localNotFoundMarker
|
||||
forKey:tableName_];
|
||||
}
|
||||
LOGObjectFnStop();
|
||||
return _stringsTableArray;
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GSWResponse.h - GSWeb: Class GSWResponse
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWResponse.h - GSWeb: Class GSWResponse
|
||||
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
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
@ -19,7 +19,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.
|
||||
*/
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -50,23 +50,23 @@
|
|||
|
||||
-(id)init;
|
||||
-(void)dealloc;
|
||||
-(id)copyWithZone:(NSZone*)zone_;
|
||||
-(id)copyWithZone:(NSZone*)zone;
|
||||
-(NSData*)content;
|
||||
-(void)willSend;//NDFN
|
||||
-(NSString*)headerForKey:(NSString*)key_;
|
||||
-(NSString*)headerForKey:(NSString*)key;
|
||||
-(NSArray*)headerKeys;
|
||||
-(NSArray*)headersForKey:(NSString*)key_;
|
||||
-(NSArray*)headersForKey:(NSString*)key;
|
||||
-(NSString*)httpVersion;
|
||||
-(void)setContent:(NSData*)someData;
|
||||
-(void)setHeader:(NSString*)header_
|
||||
forKey:(NSString*)key_;
|
||||
-(void)setHeaders:(NSArray*)headerList_
|
||||
forKey:(NSString*)key_;
|
||||
-(void)setHeaders:(NSDictionary*)headerList_;
|
||||
-(void)setHeader:(NSString*)header
|
||||
forKey:(NSString*)key;
|
||||
-(void)setHeaders:(NSArray*)headerList
|
||||
forKey:(NSString*)key;
|
||||
-(void)setHeaders:(NSDictionary*)headerList;
|
||||
-(NSMutableDictionary*)headers;
|
||||
-(void)setHTTPVersion:(NSString*)version_;
|
||||
-(void)setStatus:(unsigned int)status_;
|
||||
-(void)setUserInfo:(NSDictionary*)userInfo_;
|
||||
-(void)setHTTPVersion:(NSString*)version;
|
||||
-(void)setStatus:(unsigned int)status;
|
||||
-(void)setUserInfo:(NSDictionary*)userInfo;
|
||||
-(unsigned int)status;
|
||||
-(NSDictionary*)userInfo;
|
||||
-(NSString*)description;
|
||||
|
@ -77,12 +77,12 @@
|
|||
|
||||
//====================================================================
|
||||
@interface GSWResponse (GSWContentConveniences)
|
||||
-(void)appendContentBytes:(const void*)contentsBytes_
|
||||
length:(unsigned)length_;
|
||||
-(void)appendContentCharacter:(char)char_;
|
||||
-(void)appendContentString:(NSString*)string_;
|
||||
-(void)appendContentData:(NSData*)contentData_;
|
||||
-(void)setContentEncoding:(NSStringEncoding)encoding_;
|
||||
-(void)appendContentBytes:(const void*)contentsBytes
|
||||
length:(unsigned)length;
|
||||
-(void)appendContentCharacter:(char)aChar;
|
||||
-(void)appendContentString:(NSString*)string;
|
||||
-(void)appendContentData:(NSData*)contentData;
|
||||
-(void)setContentEncoding:(NSStringEncoding)encoding;
|
||||
-(NSStringEncoding)contentEncoding;
|
||||
|
||||
|
||||
|
@ -91,22 +91,22 @@
|
|||
//====================================================================
|
||||
@interface GSWResponse (GSWHTMLConveniences)
|
||||
|
||||
-(void)appendContentHTMLString:(NSString*)string_;
|
||||
-(void)appendContentHTMLAttributeValue:(NSString*)string_;
|
||||
-(void)appendContentHTMLConvertString:(NSString*)string_;
|
||||
-(void)appendContentHTMLEntitiesConvertString:(NSString*)string_;
|
||||
+(NSString*)stringByEscapingHTMLString:(NSString*)string_;
|
||||
+(NSString*)stringByEscapingHTMLAttributeValue:(NSString*)string_;
|
||||
+(NSString*)stringByConvertingToHTMLEntities:(NSString*)string_;
|
||||
+(NSString*)stringByConvertingToHTML:(NSString*)string_;
|
||||
-(void)appendContentHTMLString:(NSString*)string;
|
||||
-(void)appendContentHTMLAttributeValue:(NSString*)string;
|
||||
-(void)appendContentHTMLConvertString:(NSString*)string;
|
||||
-(void)appendContentHTMLEntitiesConvertString:(NSString*)string;
|
||||
+(NSString*)stringByEscapingHTMLString:(NSString*)string;
|
||||
+(NSString*)stringByEscapingHTMLAttributeValue:(NSString*)string;
|
||||
+(NSString*)stringByConvertingToHTMLEntities:(NSString*)string;
|
||||
+(NSString*)stringByConvertingToHTML:(NSString*)string;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWResponse (Cookies)
|
||||
-(NSString*)_formattedCookiesString;
|
||||
-(NSMutableArray*)allocCookiesIFND;
|
||||
-(void)addCookie:(GSWCookie*)cookie_;
|
||||
-(void)removeCookie:(GSWCookie*)cookie_;
|
||||
-(void)addCookie:(GSWCookie*)cookie;
|
||||
-(void)removeCookie:(GSWCookie*)cookie;
|
||||
-(NSArray*)cookies;
|
||||
-(NSArray*)cookiesHeadersValues;//NDFN
|
||||
|
||||
|
@ -115,16 +115,16 @@
|
|||
//====================================================================
|
||||
@interface GSWResponse (GSWResponseA)
|
||||
-(BOOL)isFinalizeInContextHasBeenCalled;//NDFN
|
||||
-(void)_finalizeInContext:(GSWContext*)context_;
|
||||
-(void)_finalizeInContext:(GSWContext*)context;
|
||||
-(void)_initContentData;
|
||||
-(void)_appendContentAsciiString:(NSString*)_string;
|
||||
-(void)_appendContentAsciiString:(NSString*)string;
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWResponse (GSWResponseB)
|
||||
-(void)_resolveContentFaultsInContext:(GSWContext*)context_;
|
||||
-(void)_appendContentFault:(id)_unknown;
|
||||
-(void)_resolveContentFaultsInContext:(GSWContext*)context;
|
||||
-(void)_appendContentFault:(id)unknown;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -136,7 +136,7 @@
|
|||
|
||||
//====================================================================
|
||||
@interface GSWResponse (GSWResponseD)
|
||||
-(BOOL)_responseIsEqual:(GSWResponse*)response_;
|
||||
-(BOOL)_responseIsEqual:(GSWResponse*)response;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
|
@ -148,7 +148,7 @@
|
|||
|
||||
//====================================================================
|
||||
@interface GSWResponse (GSWResponseDefaultEncoding)
|
||||
+(void)setDefaultEncoding:(NSStringEncoding)_encoding;
|
||||
+(void)setDefaultEncoding:(NSStringEncoding)encoding;
|
||||
+(NSStringEncoding)defaultEncoding;
|
||||
@end
|
||||
|
||||
|
@ -157,9 +157,14 @@
|
|||
|
||||
//NDFN
|
||||
//Last cHance Response
|
||||
+(GSWResponse*)responseWithMessage:(NSString*)message_
|
||||
inContext:(GSWContext*)context_
|
||||
forRequest:(GSWRequest*)request_;
|
||||
+(GSWResponse*)responseWithMessage:(NSString*)message
|
||||
inContext:(GSWContext*)context
|
||||
forRequest:(GSWRequest*)request;
|
||||
|
||||
+(GSWResponse*)responseWithMessage:(NSString*)message
|
||||
inContext:(GSWContext*)context
|
||||
forRequest:(GSWRequest*)request
|
||||
forceFinalize:(BOOL)forceFinalize;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
|
@ -168,8 +173,8 @@
|
|||
//--------------------------------------------------------------------
|
||||
//
|
||||
//Refuse Response
|
||||
+(GSWResponse*)generateRefusingResponseInContext:(GSWContext*)context_
|
||||
forRequest:(GSWRequest*)request_;
|
||||
+(GSWResponse*)generateRefusingResponseInContext:(GSWContext*)context
|
||||
forRequest:(GSWRequest*)request;
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWTemplateParserXML.m - GSWeb: Class GSWTemplateParserXML
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWTemplateParserXML.m - <title>GSWeb: Class GSWTemplateParserXML</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: Mar 1999
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
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 +25,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$";
|
||||
|
||||
|
@ -381,7 +388,10 @@ xmlParserInputPtr GSWTemplateParserSAXHandler_ExternalLoader(const char *systemI
|
|||
{
|
||||
NSString* testMessage=[[message lowercaseString] stringByTrimmingSpaces];
|
||||
if (![testMessage isEqualToString:@"tag webobject invalid"]
|
||||
&& ![testMessage isEqualToString:@"tag gsweb invalid"])
|
||||
&& ![testMessage isEqualToString:@"tag gsweb invalid"]
|
||||
&& ![testMessage isEqualToString:@"htmlparsestarttag: misplaced <html> tag"]
|
||||
&& ![testMessage isEqualToString:@"htmlparsestarttag: misplaced <head> tag"]
|
||||
&& ![testMessage isEqualToString:@"unexpected end tag : head"])
|
||||
{
|
||||
[[GSWApplication application] logErrorWithFormat:@"%@ Error (col %d,line %d): %@",
|
||||
[_templateParser logPrefix],
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Makefile.preamble - GSWeb: Makefile.preamble
|
||||
# Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
# 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
|
||||
#
|
||||
# This file is part of the GNUstep Web Library.
|
||||
|
@ -34,14 +34,25 @@
|
|||
#
|
||||
|
||||
# Additional flags to pass to the preprocessor
|
||||
ADDITIONAL_CPPFLAGS =
|
||||
ADDITIONAL_CPPFLAGS = -lwrap
|
||||
|
||||
# Additional flags to pass to the Objective-C compiler
|
||||
#new
|
||||
ifeq ($(GDL2), yes)
|
||||
ADDITIONAL_OBJCFLAGS = -DUSE_BUILTIN -DGDL2
|
||||
ADDITIONAL_OBJCFLAGS := $(ADDITIONAL_OBJCFLAGS) -DUSE_BUILTIN -DGDL2
|
||||
else
|
||||
ADDITIONAL_OBJCFLAGS = -DUSE_BUILTIN
|
||||
ADDITIONAL_OBJCFLAGS := $(ADDITIONAL_OBJCFLAGS) -DUSE_BUILTIN
|
||||
endif
|
||||
|
||||
ifeq ($(GSWDEBUG_MEM), yes)
|
||||
ADDITIONAL_OBJCFLAGS := $(ADDITIONAL_OBJCFLAGS) -DGSWDEBUG_MEM
|
||||
endif
|
||||
|
||||
ifeq ($(GSWDEBUG_LOCK), yes)
|
||||
ADDITIONAL_OBJCFLAGS := $(ADDITIONAL_OBJCFLAGS) -DGSWDEBUG_LOCK
|
||||
endif
|
||||
|
||||
ifeq ($(GSWDEBUG_DEEP), yes)
|
||||
ADDITIONAL_OBJCFLAGS := $(ADDITIONAL_OBJCFLAGS) -DGSWDEBUG_DEEP
|
||||
endif
|
||||
|
||||
# Additional flags to pass to the C compiler
|
||||
|
@ -53,9 +64,14 @@ ADDITIONAL_INCLUDE_DIRS = -I. -I$(GNUSTEP_SYSTEM_ROOT)/db -I../..
|
|||
|
||||
# Additional LDFLAGS to pass to the linker
|
||||
ifeq ($(debug), yes)
|
||||
ADDITIONAL_LDFLAGS = -lFoundationExt_d -lxml -lz
|
||||
ADDITIONAL_LDFLAGS := $(ADDITIONAL_LDFLAGS) -lFoundationExt_d -lxml -lz
|
||||
else
|
||||
ADDITIONAL_LDFLAGS = -lFoundationExt -lxml -lz
|
||||
ADDITIONAL_LDFLAGS := $(ADDITIONAL_LDFLAGS) -lFoundationExt -lxml -lz
|
||||
endif
|
||||
|
||||
ifeq ($(LIBWRAP), yes)
|
||||
ADDITIONAL_OBJCFLAGS := $(ADDITIONAL_OBJCFLAGS) -DHAVE_LIBWRAP
|
||||
ADDITIONAL_LDFLAGS := $(ADDITIONAL_LDFLAGS) -lwrap
|
||||
endif
|
||||
|
||||
# Additional library directories the linker should search
|
||||
|
|
55
GSWeb.framework/gsweb.gsdoc
Normal file
55
GSWeb.framework/gsweb.gsdoc
Normal file
|
@ -0,0 +1,55 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.7//EN" "http://www.gnustep.org/gsdoc-0_6_7.xml">
|
||||
<gsdoc base="index">
|
||||
<head>
|
||||
<title>GNUstepWeb</title>
|
||||
<author name="Manuel Guesdon">
|
||||
<email address="mguesdon@orange-concept.com"/>
|
||||
<url url="http://www.gnustep.org/developers/whoiswho.html"/></author>
|
||||
</head>
|
||||
<body>
|
||||
<chapter>
|
||||
<heading>GNUstepWeb</heading>
|
||||
<p>
|
||||
GNUstepWeb is a library which was designed to be compatible with WebObjects 4.x (developed by NeXT (now Apple) Inc.).
|
||||
This library is a logic extension of the GNUstep project. I hope it can help Objective-C, OpenStep and WebObject to become standards.
|
||||
</p>
|
||||
<section>
|
||||
<heading>Build Options</heading>
|
||||
<deflist>
|
||||
<term>debug=yes</term>
|
||||
<desc>
|
||||
Activate GNUstep debug features.
|
||||
</desc>
|
||||
<term>GDL2=yes</term>
|
||||
<desc>
|
||||
Use GNUstepWeb with gdl2 library
|
||||
</desc>
|
||||
<term>LIBWRAP=yes</term>
|
||||
<desc>
|
||||
Link with tcpd_libwrap (you know: hosts.deny, hosts.allow and this kind of things)
|
||||
</desc>
|
||||
<term>GSWDEBUG_DEEP=yes</term>
|
||||
<desc>
|
||||
Activate deep debug features (works only if debug=yes is set)
|
||||
</desc>
|
||||
<term>GSWDEBUG_LOCK=yes</term>
|
||||
<desc>
|
||||
Activate lock debug features (works only if debug=yes is set). Also activated by GSWDEBUG_DEEP=yes
|
||||
</desc>
|
||||
<term>GSWDEBUG_MEM=yes</term>
|
||||
<desc>
|
||||
Activate memory allocation/deallocation debug features (works only if debug=yes is set). Also activated by GSWDEBUG_DEEP=yes
|
||||
</desc>
|
||||
<term>doc=yes</term>
|
||||
<desc>
|
||||
Generate documentation
|
||||
</desc>
|
||||
</deflist>
|
||||
</section>
|
||||
</chapter>
|
||||
<back>
|
||||
<index scope="project" type="title" />
|
||||
</back>
|
||||
</body>
|
||||
</gsdoc>
|
1
TODO
1
TODO
|
@ -203,6 +203,7 @@ information, not that there is nothing to do !
|
|||
OK. Finished
|
||||
|
||||
* GSWResourceManager.m
|
||||
Manage better stringsTable cache (test if files changed...)
|
||||
|
||||
* GSWResourceRequestHandler.m
|
||||
|
||||
|
|
10
config.mak
10
config.mak
|
@ -3,3 +3,13 @@
|
|||
#
|
||||
DYNAMIC_LINKER=simple
|
||||
GDL2=no
|
||||
LIBWRAP=yes
|
||||
|
||||
#Log Memory Alloc/Dealloc
|
||||
GSWDEBUG_MEM=no
|
||||
|
||||
#Log Locks
|
||||
GSWDEBUG_LOCK=no
|
||||
|
||||
#Deep logs
|
||||
GSWDEBUG_DEEP=no
|
||||
|
|
Loading…
Reference in a new issue