mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-04-23 07:20:55 +00:00
* GSWExtensionsGSW.framework/GSWFileUploadComponent.m
* GSWExtensionsGSW.framework/GSWLogin.m removed logs * GSWExtensionsGSW.framework/GNUmakefile added ADDITIONAL_OBJCFLAGS = -Werror-implicit-function-declaration * GSWExtensionsGSW.framework/GSWCacheElement.m removed logs, use object_getClassName * GSWExtensionsGSW.framework/GSWValidationFailureComponent.m * GSWExtensionsGSW.framework/GSWTabComponent.m * GSWExtensionsGSW.framework/GSWFileUploadFormComponent.m * GSWExtensionsGSW.framework/GSWSimpleFormComponent.m * GSWeb.framework/GSWApplication.m removed logs, _validateAPI ClassIsKindOfClass -> GSObjCIsKindOf * GSWeb.framework/GSWAction.m include <GNUstepBase/NSObject+GNUstepBase.h> removed logs and unused (commented) code * GSWeb.framework/GSWResourceManager.h removed _validateAPI * GSWeb.framework/GSWImageButton.m added #include <GNUstepBase/NSObject+GNUstepBase.h> removed logs and unused (commented) code * GSWeb.framework/NSString+HTML.h changed int to NSUInteger / NSInteger * GSWeb.framework/GSWResourceManager.m removed logs, _validateAPI * GSWeb.framework/GSWContext.m LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; * GSWeb.framework/GSWRequestHandler.m include <GNUstepBase/NSObject+GNUstepBase.h> LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; * GSWeb.framework/NSString+HTML.m include <GNUstepBase/NSString+GNUstepBase.h> changed int to NSUInteger use memmove in GSWMemMove macro disabled testStringByConvertingHTML removed logs fixed warnings * GSWeb.framework/GSWMultiKeyDictionary.m removed logs * GSWeb.framework/GSWVBScript.m removed logs * GSWeb.framework/NSNonBlockingFileHandle.m removed logs * GSWeb.framework/GSWStatisticsStore.h removed useless @interface / @end for the same class * GSWeb.framework/GSWLifebeatThread.m removed include <GNUstepBase/GSCategories.h> removed logs * GSWeb.framework/GSWStatisticsStore.m removed logs include <GNUstepBase/NSObject+GNUstepBase.h> include <GNUstepBase/NSString+GNUstepBase.h> implement _purgePathsStatistics, _updatePathsStatisticsWithPaths removed useless @implementation / @end for the same class * GSWeb.framework/GSWCookie.m removed logs * GSWeb.framework/GNUmakefile added ADDITIONAL_OBJCFLAGS = -Werror-implicit-function-declaration * GSWeb.framework/GSWRecording.m removed logs * GSWeb.framework/GSWToggle.m removed logs * GSWeb.framework/GSWMessage.m include <GNUstepBase/NSObject+GNUstepBase.h> globalDefaultEncoding = [NSString defaultCStringEncoding]; (see http://wiki.gnustep.org/index.php/GSWebFAQ ) use NSUInteger for index LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; * GSWeb.framework/GSWDefaultAdaptor.m include <GNUstepBase/NSObject+GNUstepBase.h> LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; * GSWeb.framework/GSWJavaScript.m * GSWeb.framework/GSWClientSideScript.m removed logs * GSWeb.framework/GSWNestedList.m removed logs LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; * GSWeb.framework/GSWEmbeddedObject.m LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; * GSWeb.framework/GSWRequest.h removed _validateAPI * GSWeb.framework/GSWRequest.m add includes removed _validateAPI removed logs LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; * GSWeb.framework/GSWUtils.h unsigned int -> NSUInteger * GSWeb.framework/Resources/languages.plist added languages * GSWeb.framework/GSWUtils.m add includes unsigned int -> NSUInteger removed logs * GSWeb.framework/GSWComponentReference.m removed logs * GSWeb.framework/GSWGeometricRegion.m add includes removed logs * GSWeb.framework/GSWKeyValueAssociation.m add includes removed logs LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; * GSWeb.framework/GSWHiddenField.m removed logs * GSWeb.framework/GSWParam.m add includes removed logs LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; * GSWeb.framework/NSString+Trimming.h * GSWeb.framework/NSString+Trimming.m removed longValue, ulongValue, longLongValue; removed logs * GSWeb.framework/GSWStaticResourceRequestHandler.m removed logs * GSWeb.framework/GSWURLValuedElementData.m removed logs * GSWeb.framework/GSWDirectAction.m takeValue -> setValue removed logs int -> NSUInteger * GSWeb.framework/GSWComponentDefinition.m add includes removed logs LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; * GSWeb.framework/GSWAssociation.m add includes LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; removed logs * GSWeb.framework/GSWSession.h * GSWeb.framework/GSWSession.m unsigned int-> NSUInteger add includes LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; removed logs David Ayers: pls check sleepInContext! removed _validateAPI, __setContextCounterIncrementingEnabled, __counterIncrementingEnabledFlag * GSWeb.framework/GSWFileUpload.m removed logs * GSWeb.framework/GSWApplet.m add includes LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; * GSWeb.framework/GSWGenericElement.m removed logs GSWeb.framework/GSWTemplateParser.m add includes * GSWeb.framework/GSWTemporaryElement.m removed logs * GSWeb.framework/GSWResponse.m add include removed docStructure checks removed logs * GSWeb.framework/GSWProjectBundle.m add include LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; removed logs * GSWeb.framework/GSWWorkerThread.m added - drain removed NSLog * GSWeb.framework/GSWApplication+Defaults.m add include LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; removed logs * GSWeb.framework/GSWActiveImage.m * GSWeb.framework/GSWDirectActionRequestHandler.m * GSWeb.framework/GSWConstantValueAssociation.m * GSWeb.framework/NSData+Compress.m removed logs * GSWeb.framework/GSWHTMLStaticElement.m add includes LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; removed logs * GSWeb.framework/GSWServerSessionStore.m removed logs * GSWeb.framework/GSWAdaptor.m add includes LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; * GSWeb.framework/GSWDeployedBundle.m removed logs add includes * GSWeb.framework/GSWSubmitButton.m removed logs * GSWeb.framework/GSWDeclarationParser.m add includes removed logs * GSWeb.framework/GSWBundle.m add includes removed logs clearCache * GSWeb.framework/GSWWOCompatibility.h fixed typo in WOMessage * GSWeb.framework/GSWSessionTimeOut.m removed logs * GSWeb.framework/GSWPopUpButton.m add includes * GSWeb.framework/GSWComponent.m add includes LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; * GSWeb.framework/GSWHTTPIO.m add include * GSWeb.framework/GSWBindingNameAssociation.m takeValue -> setValue * GSWeb.framework/GSWHTMLTemplateParser.m removed logs * GSWeb.framework/GSWResetButton.m removed logs * GSWeb.framework/GSWDebug.h/m disabled log funtions * GSWeb.framework/GSWActionRequestHandler.m add includes removed logs * GSWeb.framework/GSWSwitchComponent.m * GSWeb.framework/GSWSessionTimeOutManager.m removed logs * GSWeb.framework/GSWMailDelivery.m add includes removed logs * GSWeb.framework/GSWDynamicURLString.h * GSWeb.framework/GSWDynamicURLString.m unsigned int -> NSUInteger removed checkURL add includes * GSWeb.framework/GSWProcFS.m removed logs * GSWeb.framework/GSWApplication.h removed _validateAPI * GSWeb.framework/GSWResourceRequestHandler.m add include removed logs LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; * GSWeb.framework/GSWSessionStore.h removed _validateAPI * GSWeb.framework/GSWSessionStore.m add include removed _validateAPI removed logs * GSWExtensions.framework/GSWLongResponsePage.m * GSWExtensions.framework/GSWExceptionPage.m * GSWExtensions.framework/GSWMetaRefresh.m * GSWExtensions.framework/GSWCollapsibleComponentContent.m removed logs * GSWExtensions.framework/GNUmakefile added ADDITIONAL_OBJCFLAGS = -Werror-implicit-function-declaration * GSWExtensions.framework/GSWStatsPage.m removed logs unsigned int -> NSUInteger * Examples/hello/HelloPage.wo/HelloPage.html * Examples/hello/Main.wo/Main.html * Examples/hello/Hello.m convert to UTF8 The change of LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd]; will show where we need to implement functionality. Please send bug reports! -- dw git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@30584 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0c2cdc8915
commit
6ebbd7a4fb
104 changed files with 1125 additions and 2794 deletions
258
ChangeLog
258
ChangeLog
|
@ -1,3 +1,261 @@
|
|||
2010-05-05 David Wetzel <dave@turbocat.de>
|
||||
* GSWExtensionsGSW.framework/GSWFileUploadComponent.m
|
||||
* GSWExtensionsGSW.framework/GSWLogin.m
|
||||
removed logs
|
||||
* GSWExtensionsGSW.framework/GNUmakefile
|
||||
added ADDITIONAL_OBJCFLAGS = -Werror-implicit-function-declaration
|
||||
* GSWExtensionsGSW.framework/GSWCacheElement.m
|
||||
removed logs, use object_getClassName
|
||||
* GSWExtensionsGSW.framework/GSWValidationFailureComponent.m
|
||||
* GSWExtensionsGSW.framework/GSWTabComponent.m
|
||||
* GSWExtensionsGSW.framework/GSWFileUploadFormComponent.m
|
||||
* GSWExtensionsGSW.framework/GSWSimpleFormComponent.m
|
||||
* GSWeb.framework/GSWApplication.m
|
||||
removed logs, _validateAPI
|
||||
ClassIsKindOfClass -> GSObjCIsKindOf
|
||||
* GSWeb.framework/GSWAction.m
|
||||
include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
removed logs and unused (commented) code
|
||||
* GSWeb.framework/GSWResourceManager.h
|
||||
removed _validateAPI
|
||||
* GSWeb.framework/GSWImageButton.m
|
||||
added #include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
removed logs and unused (commented) code
|
||||
* GSWeb.framework/NSString+HTML.h
|
||||
changed int to NSUInteger / NSInteger
|
||||
* GSWeb.framework/GSWResourceManager.m
|
||||
removed logs, _validateAPI
|
||||
* GSWeb.framework/GSWContext.m
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
* GSWeb.framework/GSWRequestHandler.m
|
||||
include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
* GSWeb.framework/NSString+HTML.m
|
||||
include <GNUstepBase/NSString+GNUstepBase.h>
|
||||
changed int to NSUInteger
|
||||
use memmove in GSWMemMove macro
|
||||
disabled testStringByConvertingHTML
|
||||
removed logs
|
||||
fixed warnings
|
||||
* GSWeb.framework/GSWMultiKeyDictionary.m
|
||||
removed logs
|
||||
* GSWeb.framework/GSWVBScript.m
|
||||
removed logs
|
||||
* GSWeb.framework/NSNonBlockingFileHandle.m
|
||||
removed logs
|
||||
* GSWeb.framework/GSWStatisticsStore.h
|
||||
removed useless @interface / @end for the same class
|
||||
* GSWeb.framework/GSWLifebeatThread.m
|
||||
removed include <GNUstepBase/GSCategories.h>
|
||||
removed logs
|
||||
* GSWeb.framework/GSWStatisticsStore.m
|
||||
removed logs
|
||||
include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
include <GNUstepBase/NSString+GNUstepBase.h>
|
||||
implement _purgePathsStatistics, _updatePathsStatisticsWithPaths
|
||||
removed useless @implementation / @end for the same class
|
||||
* GSWeb.framework/GSWCookie.m
|
||||
removed logs
|
||||
* GSWeb.framework/GNUmakefile
|
||||
added ADDITIONAL_OBJCFLAGS = -Werror-implicit-function-declaration
|
||||
* GSWeb.framework/GSWRecording.m
|
||||
removed logs
|
||||
* GSWeb.framework/GSWToggle.m
|
||||
removed logs
|
||||
* GSWeb.framework/GSWMessage.m
|
||||
include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
globalDefaultEncoding = [NSString defaultCStringEncoding];
|
||||
(see http://wiki.gnustep.org/index.php/GSWebFAQ )
|
||||
use NSUInteger for index
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
* GSWeb.framework/GSWDefaultAdaptor.m
|
||||
include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
* GSWeb.framework/GSWJavaScript.m
|
||||
* GSWeb.framework/GSWClientSideScript.m
|
||||
removed logs
|
||||
* GSWeb.framework/GSWNestedList.m
|
||||
removed logs
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
* GSWeb.framework/GSWEmbeddedObject.m
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
* GSWeb.framework/GSWRequest.h
|
||||
removed _validateAPI
|
||||
* GSWeb.framework/GSWRequest.m
|
||||
add includes
|
||||
removed _validateAPI
|
||||
removed logs
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
* GSWeb.framework/GSWUtils.h
|
||||
unsigned int -> NSUInteger
|
||||
* GSWeb.framework/Resources/languages.plist
|
||||
added languages
|
||||
* GSWeb.framework/GSWUtils.m
|
||||
add includes
|
||||
unsigned int -> NSUInteger
|
||||
removed logs
|
||||
* GSWeb.framework/GSWComponentReference.m
|
||||
removed logs
|
||||
* GSWeb.framework/GSWGeometricRegion.m
|
||||
add includes
|
||||
removed logs
|
||||
* GSWeb.framework/GSWKeyValueAssociation.m
|
||||
add includes
|
||||
removed logs
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
* GSWeb.framework/GSWHiddenField.m
|
||||
removed logs
|
||||
* GSWeb.framework/GSWParam.m
|
||||
add includes
|
||||
removed logs
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
* GSWeb.framework/NSString+Trimming.h
|
||||
* GSWeb.framework/NSString+Trimming.m
|
||||
removed longValue, ulongValue, longLongValue;
|
||||
removed logs
|
||||
* GSWeb.framework/GSWStaticResourceRequestHandler.m
|
||||
removed logs
|
||||
* GSWeb.framework/GSWURLValuedElementData.m
|
||||
removed logs
|
||||
* GSWeb.framework/GSWDirectAction.m
|
||||
takeValue -> setValue
|
||||
removed logs
|
||||
int -> NSUInteger
|
||||
* GSWeb.framework/GSWComponentDefinition.m
|
||||
add includes
|
||||
removed logs
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
* GSWeb.framework/GSWAssociation.m
|
||||
add includes
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
removed logs
|
||||
* GSWeb.framework/GSWSession.h
|
||||
* GSWeb.framework/GSWSession.m
|
||||
unsigned int-> NSUInteger
|
||||
add includes
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
removed logs
|
||||
David Ayers: pls check sleepInContext!
|
||||
removed _validateAPI, __setContextCounterIncrementingEnabled, __counterIncrementingEnabledFlag
|
||||
* GSWeb.framework/GSWFileUpload.m
|
||||
removed logs
|
||||
* GSWeb.framework/GSWApplet.m
|
||||
add includes
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
* GSWeb.framework/GSWGenericElement.m
|
||||
removed logs
|
||||
GSWeb.framework/GSWTemplateParser.m
|
||||
add includes
|
||||
* GSWeb.framework/GSWTemporaryElement.m
|
||||
removed logs
|
||||
* GSWeb.framework/GSWResponse.m
|
||||
add include
|
||||
removed docStructure checks
|
||||
removed logs
|
||||
* GSWeb.framework/GSWProjectBundle.m
|
||||
add include
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
removed logs
|
||||
* GSWeb.framework/GSWWorkerThread.m
|
||||
added - drain
|
||||
removed NSLog
|
||||
* GSWeb.framework/GSWApplication+Defaults.m
|
||||
add include
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
removed logs
|
||||
* GSWeb.framework/GSWActiveImage.m
|
||||
* GSWeb.framework/GSWDirectActionRequestHandler.m
|
||||
* GSWeb.framework/GSWConstantValueAssociation.m
|
||||
* GSWeb.framework/NSData+Compress.m
|
||||
removed logs
|
||||
* GSWeb.framework/GSWHTMLStaticElement.m
|
||||
add includes
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
removed logs
|
||||
* GSWeb.framework/GSWServerSessionStore.m
|
||||
removed logs
|
||||
* GSWeb.framework/GSWAdaptor.m
|
||||
add includes
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
* GSWeb.framework/GSWDeployedBundle.m
|
||||
removed logs
|
||||
add includes
|
||||
* GSWeb.framework/GSWSubmitButton.m
|
||||
removed logs
|
||||
* GSWeb.framework/GSWDeclarationParser.m
|
||||
add includes
|
||||
removed logs
|
||||
* GSWeb.framework/GSWBundle.m
|
||||
add includes
|
||||
removed logs
|
||||
clearCache
|
||||
* GSWeb.framework/GSWWOCompatibility.h
|
||||
fixed typo in WOMessage
|
||||
* GSWeb.framework/GSWSessionTimeOut.m
|
||||
removed logs
|
||||
* GSWeb.framework/GSWPopUpButton.m
|
||||
add includes
|
||||
* GSWeb.framework/GSWComponent.m
|
||||
add includes
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
* GSWeb.framework/GSWHTTPIO.m
|
||||
add include
|
||||
* GSWeb.framework/GSWBindingNameAssociation.m
|
||||
takeValue -> setValue
|
||||
* GSWeb.framework/GSWHTMLTemplateParser.m
|
||||
removed logs
|
||||
* GSWeb.framework/GSWResetButton.m
|
||||
removed logs
|
||||
* GSWeb.framework/GSWDebug.h/m
|
||||
disabled log funtions
|
||||
* GSWeb.framework/GSWActionRequestHandler.m
|
||||
add includes
|
||||
removed logs
|
||||
* GSWeb.framework/GSWSwitchComponent.m
|
||||
* GSWeb.framework/GSWSessionTimeOutManager.m
|
||||
removed logs
|
||||
* GSWeb.framework/GSWMailDelivery.m
|
||||
add includes
|
||||
removed logs
|
||||
* GSWeb.framework/GSWDynamicURLString.h
|
||||
* GSWeb.framework/GSWDynamicURLString.m
|
||||
unsigned int -> NSUInteger
|
||||
removed checkURL
|
||||
add includes
|
||||
* GSWeb.framework/GSWProcFS.m
|
||||
removed logs
|
||||
* GSWeb.framework/GSWApplication.h
|
||||
removed _validateAPI
|
||||
* GSWeb.framework/GSWResourceRequestHandler.m
|
||||
add include
|
||||
removed logs
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
* GSWeb.framework/GSWSessionStore.h
|
||||
removed _validateAPI
|
||||
* GSWeb.framework/GSWSessionStore.m
|
||||
add include
|
||||
removed _validateAPI
|
||||
removed logs
|
||||
* GSWExtensions.framework/GSWLongResponsePage.m
|
||||
* GSWExtensions.framework/GSWExceptionPage.m
|
||||
* GSWExtensions.framework/GSWMetaRefresh.m
|
||||
* GSWExtensions.framework/GSWCollapsibleComponentContent.m
|
||||
removed logs
|
||||
* GSWExtensions.framework/GNUmakefile
|
||||
added ADDITIONAL_OBJCFLAGS = -Werror-implicit-function-declaration
|
||||
* GSWExtensions.framework/GSWStatsPage.m
|
||||
removed logs
|
||||
unsigned int -> NSUInteger
|
||||
* Examples/hello/HelloPage.wo/HelloPage.html
|
||||
* Examples/hello/Main.wo/Main.html
|
||||
* Examples/hello/Hello.m
|
||||
convert to UTF8
|
||||
|
||||
The change of
|
||||
LOGObjectFnNotImplemented(); -> [self notImplemented: _cmd];
|
||||
will show where we need to implement functionality.
|
||||
Please send bug reports! -- dw
|
||||
|
||||
2010-05-04 David Wetzel <dave@turbocat.de>
|
||||
* Examples/hello/GNUmakefile
|
||||
check for platform and use frameworks or libs
|
||||
|
|
|
@ -5,6 +5,16 @@
|
|||
#include "Hello.h"
|
||||
|
||||
@implementation Hello
|
||||
|
||||
- (id) init
|
||||
{
|
||||
[super init];
|
||||
|
||||
[WOMessage setDefaultEncoding: NSUTF8StringEncoding];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
+(NSNumber*)sessionTimeOut
|
||||
{
|
||||
return [NSNumber numberWithInt:60];
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<HTML>
|
||||
<HEAD>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<TITLE>Hello World!</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<HTML>
|
||||
<HEAD>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<TITLE>Hello World!</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
|
|
|
@ -227,5 +227,7 @@ ifeq ($(doc),yes)
|
|||
include $(GNUSTEP_MAKEFILES)/documentation.make
|
||||
endif
|
||||
|
||||
ADDITIONAL_OBJCFLAGS = -Werror-implicit-function-declaration
|
||||
|
||||
-include Makefile.postamble
|
||||
|
||||
|
|
|
@ -42,14 +42,11 @@ RCS_ID("$Id$")
|
|||
//-----------------------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
GSWLogC("Dealloc GSWCollopsibleComponent");
|
||||
GSWLogC("Dealloc GSWCollopsibleComponent Super");
|
||||
DESTROY(_openedImageFileName);
|
||||
DESTROY(_closedImageFileName);
|
||||
DESTROY(_openedHelpString);
|
||||
DESTROY(_closedHelpString);
|
||||
[super dealloc];
|
||||
GSWLogC("End Dealloc GSWCollopsibleComponent");
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------------
|
||||
|
@ -71,8 +68,7 @@ RCS_ID("$Id$")
|
|||
//-----------------------------------------------------------------------------------
|
||||
-(BOOL)isVisible
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLog(@"_isVisibleConditionPassed=%s",(_isVisibleConditionPassed ? "YES" : "NO"));
|
||||
|
||||
if (!_isVisibleConditionPassed)
|
||||
{
|
||||
if ([self hasBinding:@"condition"])
|
||||
|
@ -83,24 +79,21 @@ RCS_ID("$Id$")
|
|||
_isVisible=boolValueFor([self valueForBinding:@"condition"]);
|
||||
_isVisibleConditionPassed=YES;
|
||||
};
|
||||
NSDebugMLog(@"_isVisible=%s",(_isVisible ? "YES" : "NO"));
|
||||
LOGObjectFnStop();
|
||||
|
||||
return _isVisible;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------------
|
||||
-(GSWComponent*)toggleVisibilityAction
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLog(@"_isVisible=%s",(_isVisible ? "YES" : "NO"));
|
||||
_isVisible = ![self isVisible];
|
||||
NSDebugMLog(@"_isVisible=%s",(_isVisible ? "YES" : "NO"));
|
||||
|
||||
if ([self hasBinding:@"visibility"])
|
||||
{
|
||||
[self setValue:(_isVisible ? GSWNumberYes : GSWNumberNo)
|
||||
forBinding:@"visibility"];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -108,7 +101,7 @@ RCS_ID("$Id$")
|
|||
-(NSString*)imageFileName
|
||||
{
|
||||
NSString* _image=nil;
|
||||
LOGObjectFnStart();
|
||||
|
||||
if ([self isVisible])
|
||||
{
|
||||
if (!_openedImageFileName)
|
||||
|
@ -124,7 +117,6 @@ RCS_ID("$Id$")
|
|||
}
|
||||
else
|
||||
{
|
||||
NSDebugMLog(@"_closedImageFileName=%@",_closedImageFileName);
|
||||
if (!_closedImageFileName)
|
||||
{
|
||||
if ([self hasBinding:@"closedImageFileName"])
|
||||
|
@ -136,8 +128,7 @@ RCS_ID("$Id$")
|
|||
};
|
||||
_image=_closedImageFileName;
|
||||
};
|
||||
NSDebugMLog(@"_image=%@",_image);
|
||||
LOGObjectFnStop();
|
||||
|
||||
return _image;
|
||||
};
|
||||
|
||||
|
@ -145,7 +136,7 @@ RCS_ID("$Id$")
|
|||
-(NSString*)label
|
||||
{
|
||||
NSString* _label=nil;
|
||||
LOGObjectFnStart();
|
||||
|
||||
if ([self isVisible])
|
||||
{
|
||||
if ([self hasBinding:@"openedLabel"])
|
||||
|
@ -160,8 +151,7 @@ RCS_ID("$Id$")
|
|||
else if ([self hasBinding:@"label"])
|
||||
_label=[self valueForBinding:@"label"];
|
||||
};
|
||||
NSDebugMLog(@"_label=%@",_label);
|
||||
LOGObjectFnStop();
|
||||
|
||||
return _label;
|
||||
};
|
||||
|
||||
|
@ -169,7 +159,7 @@ RCS_ID("$Id$")
|
|||
-(NSString*)helpString
|
||||
{
|
||||
NSString* _helpString=nil;
|
||||
LOGObjectFnStart();
|
||||
|
||||
if ([self isVisible])
|
||||
{
|
||||
if (!_openedHelpString)
|
||||
|
@ -196,8 +186,7 @@ RCS_ID("$Id$")
|
|||
};
|
||||
_helpString=_closedHelpString;
|
||||
};
|
||||
NSDebugMLog(@"_helpString=%@",_helpString);
|
||||
LOGObjectFnStop();
|
||||
|
||||
return _helpString;
|
||||
};
|
||||
|
||||
|
@ -212,8 +201,6 @@ RCS_ID("$Id$")
|
|||
{
|
||||
BOOL isDisabled=NO;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
if ([self hasBinding:@"disabled"])
|
||||
isDisabled=boolValueFor([self valueForBinding:@"disabled"]);
|
||||
else if ([self hasBinding:@"enabled"])
|
||||
|
@ -221,10 +208,6 @@ RCS_ID("$Id$")
|
|||
BOOL isEnabled=boolValueFor([self valueForBinding:@"enabled"]);
|
||||
isDisabled=(isEnabled ? NO : YES);
|
||||
};
|
||||
|
||||
NSDebugMLog(@"isDisabled=%s",(isDisabled ? "YES" : "NO"));
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return isDisabled;
|
||||
};
|
||||
|
@ -234,16 +217,10 @@ RCS_ID("$Id$")
|
|||
{
|
||||
BOOL shouldDisplay=YES;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
if ([self isDisabled]
|
||||
&& [self hasBinding:@"displayDisabled"]
|
||||
&& !boolValueFor([self valueForBinding:@"displayDisabled"]))
|
||||
shouldDisplay=NO;
|
||||
|
||||
NSDebugMLog(@"shouldDisplay=%s",(shouldDisplay ? "YES" : "NO"));
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return shouldDisplay;
|
||||
};
|
||||
|
|
|
@ -41,15 +41,10 @@ RCS_ID("$Id$")
|
|||
|
||||
-(void)dealloc
|
||||
{
|
||||
GSWLogC("Dealloc GSWExceptionPage\n");
|
||||
DESTROY(_exception);
|
||||
GSWLogC("Dealloc GSWExceptionPage reasons\n");
|
||||
DESTROY(_reasons);
|
||||
GSWLogC("Dealloc GSWExceptionPage reference\n");
|
||||
DESTROY(_reference);
|
||||
GSWLogC("Dealloc GSWExceptionPage super\n");
|
||||
[super dealloc];
|
||||
GSWLogC("Dealloc GSWExceptionPage end\n");
|
||||
};
|
||||
|
||||
-(void)awake
|
||||
|
@ -70,9 +65,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
if (!_reasons)
|
||||
{
|
||||
NSDebugMLog(@"_exception reason=%@",[_exception reason]);
|
||||
ASSIGN(_reasons,[[_exception reason] componentsSeparatedByString:@"\n"]);
|
||||
NSDebugMLog(@"_reasons=%@",_reasons);
|
||||
};
|
||||
return _reasons;
|
||||
};
|
||||
|
@ -88,9 +81,6 @@ RCS_ID("$Id$")
|
|||
-(void)setException:(NSException*)exception
|
||||
{
|
||||
ASSIGN(_exception,exception);
|
||||
NSDebugMLog(@"_exception name=%@",[_exception name]);
|
||||
NSDebugMLog(@"_exception reason=%@",[_exception reason]);
|
||||
NSDebugMLog(@"_exception userInfo=%@",[_exception userInfo]);
|
||||
};
|
||||
|
||||
-(id)getTmpUserInfoValue
|
||||
|
|
|
@ -52,25 +52,16 @@ RCS_ID("$Id$")
|
|||
id parentValue;
|
||||
id value;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
// key = [self valueForBinding:@"key"];
|
||||
// parentValue = (key ? [[self parent] valueForKeyPath:key]:nil);
|
||||
parentValue = [self valueForBinding:@"key"];
|
||||
value = [self valueForBinding:@"value"];
|
||||
|
||||
NSDebugMLLog(@"GSWComponent",@"parentValue=%@",parentValue);
|
||||
NSDebugMLLog(@"GSWComponent",@"value=%@",value);
|
||||
|
||||
if(parentValue == nil)
|
||||
condition = (value == nil);
|
||||
else
|
||||
condition = [parentValue isEqual:value];
|
||||
|
||||
NSDebugMLLog(@"GSWComponent",@"condition=%d",condition);
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return condition;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ RCS_ID("$Id$")
|
|||
|
||||
#include "GSWExtWOCompatibility.h"
|
||||
#include "GSWLongResponsePage.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
@interface GSWLongResponsePage (Private)
|
||||
-(void) _setCancelled:(BOOL)cancelled;
|
||||
|
@ -66,29 +67,21 @@ RCS_ID("$Id$")
|
|||
/** Locks the page **/
|
||||
-(void) lock
|
||||
{
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
[self subclassResponsibility: _cmd];
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
};
|
||||
|
||||
|
||||
/** Unlock the page **/
|
||||
-(void) unlock
|
||||
{
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
[self subclassResponsibility: _cmd];
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
};
|
||||
|
||||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
[self lock];
|
||||
NSDebugMLog(@"_refreshInterval=%f",(double)_refreshInterval);
|
||||
NSDebugMLog(@"_done=%d",(int)_done);
|
||||
NSDebugMLog(@"_performingAction=%d",(int)_performingAction);
|
||||
//
|
||||
|
||||
if (_refreshInterval>0 && !_done/*_keepRefreshing*/)
|
||||
{
|
||||
NSString *url=nil;
|
||||
|
@ -97,13 +90,13 @@ RCS_ID("$Id$")
|
|||
url=(NSString*)[aContext urlWithRequestHandlerKey:@"cr"
|
||||
path:nil
|
||||
queryString:nil];
|
||||
NSDebugMLog(@"url=%@",url);
|
||||
|
||||
header=[NSString stringWithFormat:@"%d;url=%@%@/%@.GSWMetaRefresh",
|
||||
(int)_refreshInterval,
|
||||
url,
|
||||
[[aContext session]sessionID],
|
||||
[aContext contextID]];
|
||||
NSDebugMLog(@"header=%@",header);
|
||||
|
||||
[aResponse setHeader:header
|
||||
forKey:@"Refresh"];
|
||||
};
|
||||
|
@ -111,7 +104,7 @@ RCS_ID("$Id$")
|
|||
if (!_performingAction)
|
||||
{
|
||||
_performingAction = YES;
|
||||
NSDebugMLog(@"BEFORE performAction thread=%p",[NSThread currentThread]);
|
||||
|
||||
[NSThread detachNewThreadSelector:@selector(_perform)
|
||||
toTarget:self
|
||||
withObject:nil];
|
||||
|
@ -119,18 +112,14 @@ RCS_ID("$Id$")
|
|||
[super appendToResponse:aResponse
|
||||
inContext:aContext];
|
||||
[self unlock];
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
};
|
||||
|
||||
-(id)threadExited:(NSNotification*)notif
|
||||
{
|
||||
NSThread* thread=nil;
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
thread=[notif object];
|
||||
NSDebugMLog(@"threadExited thread=%@",thread);
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
// threadDict = [thread threadDictionary];
|
||||
|
||||
// threadDict = [thread threadDictionary];
|
||||
// NSDebugMLLog(@"low",@"threadDict=%@",threadDict);
|
||||
// adaptorThread=[threadDict objectForKey:GSWThreadKey_DefaultAdaptorThread];
|
||||
// NSDebugMLLog(@"low",@"adaptorThread=%@",adaptorThread);
|
||||
|
@ -138,7 +127,6 @@ RCS_ID("$Id$")
|
|||
[[NSNotificationCenter defaultCenter] removeObserver:self
|
||||
name:NSThreadWillExitNotification
|
||||
object:thread];
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
return nil; //??
|
||||
};
|
||||
|
||||
|
@ -146,7 +134,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
id result=nil;
|
||||
NSAutoreleasePool* arp = nil;
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
|
||||
arp = [NSAutoreleasePool new];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(threadExited:)
|
||||
|
@ -155,17 +143,7 @@ RCS_ID("$Id$")
|
|||
NS_DURING
|
||||
{
|
||||
[self _setResult:nil];
|
||||
NSDebugMLog(@"CALL performAction thread=%p",[NSThread currentThread]);
|
||||
NSDebugMLog(@"CALL performAction thread=%@",[NSThread currentThread]);
|
||||
result=[self performAction];
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
printf("==AFTER performAction");
|
||||
NSDebugMLog(@"result=%@",result);
|
||||
NSDebugMLog(@"AFTER performAction");
|
||||
printf("AFTER performAction");
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
|
||||
if (!_cancelled)
|
||||
_done=YES; //???
|
||||
|
@ -174,58 +152,43 @@ RCS_ID("$Id$")
|
|||
NS_HANDLER
|
||||
{
|
||||
RETAIN(localException);
|
||||
NSLog(@"EXCEPTION %@",localException);
|
||||
NSDebugMLog(@"EXCEPTION %@",localException);
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
DESTROY(arp);
|
||||
AUTORELEASE(localException);
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
DESTROY(arp);
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
};
|
||||
|
||||
/** Set status (Lock protected) **/
|
||||
-(void)setStatus:(id)status
|
||||
{
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
if (status!=_status)
|
||||
{
|
||||
[self lock];
|
||||
ASSIGN(_status,status);
|
||||
[self unlock];
|
||||
};
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
};
|
||||
|
||||
-(id) _status
|
||||
{
|
||||
//??
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
return _status;
|
||||
};
|
||||
|
||||
/** Set the refresh interval. Default is 0. If >0, a refresh header is appended to the response **/
|
||||
-(void)setRefreshInterval:(NSTimeInterval)interval
|
||||
{
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
if (interval>0)
|
||||
_refreshInterval = interval;
|
||||
else
|
||||
_refreshInterval = 0;
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
};
|
||||
|
||||
/** Get the refresh interval. **/
|
||||
-(NSTimeInterval)refreshInterval
|
||||
{
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
return _refreshInterval;
|
||||
};
|
||||
|
||||
|
@ -233,8 +196,6 @@ RCS_ID("$Id$")
|
|||
-(BOOL)isCancelled
|
||||
{
|
||||
//??
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
return _cancelled;
|
||||
};
|
||||
|
||||
|
@ -246,9 +207,8 @@ count>1 ==> if your code is thread safe, you can enable concurrent request handl
|
|||
**/
|
||||
-(id) performAction
|
||||
{
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
[self subclassResponsibility:_cmd];
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -265,7 +225,7 @@ Don't override it
|
|||
NSException *exception=nil;
|
||||
id result=[self _result];//OK
|
||||
id status=nil;
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
|
||||
exception=[self _exception];
|
||||
status=[self _status];
|
||||
if (exception)
|
||||
|
@ -279,7 +239,7 @@ Don't override it
|
|||
page=[self cancelPageForStatus:status];
|
||||
else
|
||||
page=[self refreshPageForStatus:status];
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
|
||||
return page;
|
||||
};
|
||||
|
||||
|
@ -289,10 +249,10 @@ Don't override it
|
|||
GSWComponent *page=nil;
|
||||
id status=nil;
|
||||
status=[self _status];
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
|
||||
[self _setCancelled:YES];
|
||||
page=[self cancelPageForStatus:status];
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
|
||||
return page;
|
||||
};
|
||||
|
||||
|
@ -301,9 +261,9 @@ Default implemnetation raise the exception **/
|
|||
-(GSWComponent *)pageForException:(NSException *)exception
|
||||
{
|
||||
//??
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
|
||||
[exception raise];//??
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -314,18 +274,15 @@ You can override this to return a newly created result page
|
|||
**/
|
||||
-(GSWComponent *)pageForResult:(id) result
|
||||
{
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
//TODO: stop refreshing ?
|
||||
_done=YES;
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
|
||||
return self;
|
||||
};
|
||||
|
||||
/** Called on each refresh. Should return self. **/
|
||||
-(GSWComponent *)refreshPageForStatus:(id) status
|
||||
{
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
return self;
|
||||
};
|
||||
|
||||
|
@ -334,10 +291,9 @@ Default implementation stops automatic refresh and returns self.
|
|||
**/
|
||||
-(GSWComponent *)cancelPageForStatus:(id) status;
|
||||
{
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
//[self subclassResponsibility: _cmd];
|
||||
_cancelled=YES;
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
|
||||
return self;
|
||||
};
|
||||
|
||||
|
@ -347,7 +303,7 @@ Default implementation stops automatic refresh and returns self.
|
|||
{
|
||||
//??
|
||||
GSWElement *element=nil;
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
|
||||
if ([GSWContext_senderID(aContext) isEqualToString:@"GSWMetaRefresh"])//GSWMetaRefreshSenderId])//senderID ret: GSWMetaRefresh // Seems OK
|
||||
{
|
||||
element=[self refresh];//OK
|
||||
|
@ -355,7 +311,7 @@ Default implementation stops automatic refresh and returns self.
|
|||
else
|
||||
element=[super invokeActionForRequest:aRequest
|
||||
inContext:aContext];
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
|
||||
return element;
|
||||
};
|
||||
|
||||
|
@ -363,39 +319,32 @@ Default implementation stops automatic refresh and returns self.
|
|||
-(void) _setCancelled:(BOOL)cancelled
|
||||
{
|
||||
//??
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
if (cancelled!=_cancelled)
|
||||
{
|
||||
[self lock];
|
||||
_cancelled=cancelled;
|
||||
[self unlock];
|
||||
};
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
};
|
||||
|
||||
-(void) _setResult:(id)result
|
||||
{
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
if (result!=_result)
|
||||
{
|
||||
[self lock];
|
||||
_result=result;
|
||||
[self unlock];
|
||||
};
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
};
|
||||
|
||||
-(id)_result
|
||||
{
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
return _result;
|
||||
};
|
||||
|
||||
-(void)_setException:(NSException*)exception
|
||||
{
|
||||
//??
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
if (exception!=_exception)
|
||||
{
|
||||
[self lock];
|
||||
|
@ -403,13 +352,10 @@ Default implementation stops automatic refresh and returns self.
|
|||
[self unlock];
|
||||
};
|
||||
[self subclassResponsibility: _cmd];
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
};
|
||||
|
||||
-(NSException*)_exception
|
||||
{
|
||||
LOGObjectFnStartC("GSWLongResponsePage");
|
||||
LOGObjectFnStopC("GSWLongResponsePage");
|
||||
return _exception;
|
||||
};
|
||||
|
||||
|
|
|
@ -51,15 +51,11 @@ RCS_ID("$Id$")
|
|||
NSNumber* seconds = nil;
|
||||
NSString* contentString = nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
seconds = [self valueForBinding:@"seconds"];
|
||||
contentString = [NSString stringWithFormat:@"%@;url=%@",
|
||||
[seconds description],
|
||||
[[self context]componentActionURL]];
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return contentString;
|
||||
};
|
||||
|
||||
|
@ -68,8 +64,6 @@ RCS_ID("$Id$")
|
|||
{
|
||||
GSWComponent* component = nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
if ([self hasBinding:@"pageName"])
|
||||
{
|
||||
NSString* pageName = [self valueForBinding:@"pageName"];
|
||||
|
@ -78,8 +72,6 @@ RCS_ID("$Id$")
|
|||
else
|
||||
component = [self valueForBinding:@"action"];
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return component;
|
||||
};
|
||||
|
||||
|
|
|
@ -76,7 +76,8 @@ RCS_ID("$Id$")
|
|||
NSString* password;
|
||||
|
||||
*/
|
||||
NSLog(@"detailsDict");
|
||||
/*
|
||||
NSLog(@"detailsDict");
|
||||
NSLog([_detailsDict description]);
|
||||
NSLog(@"pagesDict");
|
||||
NSLog([_pagesDict description]);
|
||||
|
@ -86,7 +87,7 @@ NSLog(@"sessionMemoryDict");
|
|||
NSLog([_sessionMemoryDict description]);
|
||||
|
||||
NSLog(@"transactions");
|
||||
/*NSLog(_transactions);
|
||||
NSLog(_transactions);
|
||||
NSLog(@"statsDict");
|
||||
NSLog(_statsDict);
|
||||
NSLog(@"memoryDict");
|
||||
|
@ -102,7 +103,7 @@ NSLog(_sessionsDict);
|
|||
{
|
||||
id instance=nil;
|
||||
NSArray* commandLineArguments = [[NSProcessInfo processInfo] arguments];
|
||||
unsigned int i=0;
|
||||
NSUInteger i=0;
|
||||
i = [commandLineArguments indexOfObject:@"-n"];
|
||||
if (i!=NSNotFound && ([commandLineArguments count] > i + 1))
|
||||
instance=[commandLineArguments objectAtIndex:i+1];
|
||||
|
@ -125,7 +126,6 @@ NSLog(_sessionsDict);
|
|||
|
||||
-(id)_initIvars
|
||||
{
|
||||
id currentCount=nil;
|
||||
_statsDict = [[self application] statistics];
|
||||
_pagesDict = [_statsDict objectForKey:@"Pages"];
|
||||
_directActionsDict = [_statsDict objectForKey:@"DirectActions"];
|
||||
|
|
|
@ -141,5 +141,7 @@ ifeq ($(doc),yes)
|
|||
include $(GNUSTEP_MAKEFILES)/documentation.make
|
||||
endif
|
||||
|
||||
ADDITIONAL_OBJCFLAGS = -Werror-implicit-function-declaration
|
||||
|
||||
-include Makefile.postamble
|
||||
|
||||
|
|
|
@ -78,7 +78,6 @@ static Class standardClass = Nil;
|
|||
associations:(NSDictionary*)associations
|
||||
contentElements:(NSArray*)elements
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if ((self=[super initWithName:aName
|
||||
associations:nil
|
||||
template:nil]))
|
||||
|
@ -88,27 +87,21 @@ static Class standardClass = Nil;
|
|||
|
||||
_cachedObject = [[associations objectForKey:@"cachedObject"
|
||||
withDefaultObject:[_cachedObject autorelease]] retain];
|
||||
NSDebugMLLog(@"GSWCacheElement",@"cachedObject=%@",_cachedObject);
|
||||
|
||||
_cache = [[associations objectForKey:@"cache"
|
||||
withDefaultObject:[_cache autorelease]] retain];
|
||||
NSDebugMLLog(@"GSWCacheElement",@"cache=%@",_cache);
|
||||
|
||||
_duration = [[associations objectForKey:@"duration"
|
||||
withDefaultObject:[_duration autorelease]] retain];
|
||||
NSDebugMLLog(@"GSWCacheElement",@"duration=%@",_duration);
|
||||
|
||||
_uniqID = [[associations objectForKey:@"uniqID"
|
||||
withDefaultObject:[_uniqID autorelease]] retain];
|
||||
NSDebugMLLog(@"GSWCacheElement",@"uniqID=%@",_uniqID);
|
||||
|
||||
_disabled = [[associations objectForKey:disabled__Key
|
||||
withDefaultObject:[_disabled autorelease]] retain];
|
||||
NSDebugMLLog(@"GSWCacheElement",@"disabled=%@",_disabled);
|
||||
|
||||
_enabled = [[associations objectForKey:enabled__Key
|
||||
withDefaultObject:[_enabled autorelease]] retain];
|
||||
NSDebugMLLog(@"GSWCacheElement",@"enabled=%@",_enabled);
|
||||
|
||||
if (_disabled && _enabled)
|
||||
{
|
||||
|
@ -178,7 +171,6 @@ static Class standardClass = Nil;
|
|||
};
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
|
@ -187,13 +179,11 @@ static Class standardClass = Nil;
|
|||
associations:(NSDictionary*)someAssociations
|
||||
template:(GSWElement*)templateElement
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if ((self=[self initWithName:aName
|
||||
associations:someAssociations
|
||||
contentElements:templateElement ? [NSArray arrayWithObject:templateElement] : nil]))
|
||||
{
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
|
@ -223,7 +213,7 @@ static Class standardClass = Nil;
|
|||
-(NSString*)description
|
||||
{
|
||||
return [NSString stringWithFormat:@"<%s %p>",
|
||||
object_get_class_name(self),
|
||||
object_getClassName(self),
|
||||
(void*)self];
|
||||
};
|
||||
|
||||
|
@ -240,8 +230,6 @@ static Class standardClass = Nil;
|
|||
BOOL isDisabled=NO;
|
||||
GSWDeclareDebugElementIDsCount(aContext);
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
component=[aContext component];
|
||||
|
||||
NS_DURING
|
||||
|
@ -282,15 +270,10 @@ static Class standardClass = Nil;
|
|||
[aContext appendElementIDComponent:[@"CacheElement-" stringByAppendingString:uniqID]];
|
||||
|
||||
contextAndElementID=[aContext contextAndElementID];
|
||||
NSDebugMLLog(@"GSWCacheElement",@"contextAndElementID=%@",contextAndElementID);
|
||||
|
||||
elementID=AUTORELEASE([[aContext elementID] copy]); // because elementID is mutable (and varying)
|
||||
NSDebugMLLog(@"GSWCacheElement",@"elementID=%@",elementID);
|
||||
|
||||
sessionID=[[aContext session] sessionID];
|
||||
NSDebugMLLog(@"GSWCacheElement",@"sessionID=%@",sessionID);
|
||||
|
||||
NSDebugMLLog(@"GSWCacheElement",@"isDisabled=%d",isDisabled);
|
||||
|
||||
if (!isDisabled)
|
||||
{
|
||||
|
@ -304,17 +287,15 @@ static Class standardClass = Nil;
|
|||
{
|
||||
GSWAssociation* assoc=[_keys objectAtIndex:i];
|
||||
keys[i]=[assoc valueInComponent:component];
|
||||
NSDebugMLLog(@"GSWCacheElement",@"keys[%d]=%@",i,keys[i]);
|
||||
|
||||
if (!keys[i])
|
||||
{
|
||||
keys[i]=[NSNull null];
|
||||
NSDebugMLLog(@"GSWCacheElement",@"keys[%d]=%@",i,keys[i]);
|
||||
};
|
||||
};
|
||||
cachedObject=[cache objectForKeys:keys
|
||||
count:keysCount];
|
||||
};
|
||||
NSDebugMLLog(@"GSWCacheElement",@"cachedObject=%p",cachedObject);
|
||||
|
||||
contextAndElementIDCacheKey=(NSMutableString*)[NSMutableString stringWithString:@"##CONTEXT_ELEMENT_ID-"];
|
||||
[contextAndElementIDCacheKey appendString:uniqID];
|
||||
|
@ -327,9 +308,6 @@ static Class standardClass = Nil;
|
|||
if (cachedObject)
|
||||
{
|
||||
NSData* sessionIDData=nil;
|
||||
NSLog(@"GSWCacheElement5: sessionID=%@",sessionID);
|
||||
NSLog(@"GSWCacheElement5: elementID=%@",elementID);
|
||||
NSLog(@"GSWCacheElement5: contextAndElementID=%@",contextAndElementID);
|
||||
cacheUsed=YES;
|
||||
cachedObject=AUTORELEASE([cachedObject mutableCopy]);
|
||||
//NSLog(@"GSWCacheElement: cachedObject found=%@",cachedObject);
|
||||
|
@ -353,11 +331,9 @@ static Class standardClass = Nil;
|
|||
else
|
||||
{
|
||||
_cacheIndex=[aResponse startCache];
|
||||
NSDebugMLLog(@"GSWCacheElement",@"cacheIndex=%d",_cacheIndex);
|
||||
};
|
||||
};
|
||||
|
||||
NSDebugMLLog(@"GSWCacheElement",@"cacheUsed=%d",cacheUsed);
|
||||
if (!cacheUsed)
|
||||
{
|
||||
/*NSLog(@"GSWCacheElement Children Start Date=%@",
|
||||
|
@ -371,7 +347,7 @@ static Class standardClass = Nil;
|
|||
if (!cacheUsed && !isDisabled)
|
||||
{
|
||||
NSMutableData* cachedObject=[aResponse stopCacheOfIndex:_cacheIndex];
|
||||
NSDebugMLLog(@"GSWCacheElement",@"cachedObject=%p",cachedObject);
|
||||
//NSDebugMLLog(@"GSWCacheElement",@"cachedObject=%p",cachedObject);
|
||||
//NSLog(@"GSWCacheElement6: sessionID=%@",sessionID);
|
||||
//NSLog(@"GSWCacheElement6: elementID=%@",elementID);
|
||||
//NSLog(@"GSWCacheElement6: contextAndElementID=%@",contextAndElementID);
|
||||
|
@ -393,7 +369,6 @@ static Class standardClass = Nil;
|
|||
else
|
||||
{
|
||||
id duration=[_duration valueInComponent:component];
|
||||
NSDebugMLLog(@"GSWCacheElement",@"duration=%@",duration);
|
||||
if (duration)
|
||||
{
|
||||
NSTimeInterval ts=0;
|
||||
|
@ -420,8 +395,6 @@ static Class standardClass = Nil;
|
|||
|
||||
[aContext deleteLastElementIDComponent];
|
||||
|
||||
NSDebugMLLog(@"GSWCacheElement",@"END ET=%@ id=%@",[self class],[aContext elementID]);
|
||||
|
||||
/*NSLog(@"GSWCacheElement Stop Date=%@",
|
||||
GSWTime_format(GSWTime_now()));*/
|
||||
|
||||
|
@ -429,16 +402,12 @@ static Class standardClass = Nil;
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException0(@"exception in GSWCacheElement appendToResponse:inContext");
|
||||
LOGException(@"exception=%@",localException);
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo(localException,
|
||||
@"In GSWForm appendToResponse:inContext");
|
||||
LOGException(@"exception=%@",localException);
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -447,8 +416,6 @@ static Class standardClass = Nil;
|
|||
{
|
||||
NSString* uniqID=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
GSWStartElement(aContext);
|
||||
GSWAssertCorrectElementID(aContext);
|
||||
|
||||
|
@ -464,7 +431,6 @@ static Class standardClass = Nil;
|
|||
GSWStopElement(aContext);
|
||||
GSWAssertIsElementID(aContext);
|
||||
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -474,8 +440,6 @@ static Class standardClass = Nil;
|
|||
GSWElement* element=nil;
|
||||
NSString* uniqID=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
GSWStartElement(aContext);
|
||||
GSWAssertCorrectElementID(aContext);
|
||||
|
||||
|
@ -487,7 +451,6 @@ static Class standardClass = Nil;
|
|||
element=[_childrenGroup invokeActionForRequest:aRequest
|
||||
inContext:aContext];
|
||||
|
||||
NSDebugMLLog(@"GSWCacheElement",@"element=%@",element);
|
||||
NSAssert2(!element || [element isKindOfClass:[GSWElement class]],
|
||||
@"Element is a %@ not a GSWElement: %@",
|
||||
[element class],
|
||||
|
@ -498,8 +461,6 @@ static Class standardClass = Nil;
|
|||
GSWStopElement(aContext);
|
||||
GSWAssertIsElementID(aContext);
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return element;
|
||||
};
|
||||
|
||||
|
|
|
@ -41,30 +41,24 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(id)init
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if ((self=[super init]))
|
||||
{
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)awake
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[super awake];
|
||||
_tmpFileInfo=nil;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)sleep
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
_tmpFileInfo=nil;
|
||||
[super sleep];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -84,46 +78,31 @@ RCS_ID("$Id$")
|
|||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
_tmpFileInfo=nil;
|
||||
[aResponse appendDebugCommentContentString:[[self fileInfo]description]];
|
||||
NSDebugMLog(@"fileInfo %@",_tmpFileInfo);
|
||||
|
||||
[super appendToResponse:aResponse
|
||||
inContext:aContext];
|
||||
_tmpFileInfo=nil;
|
||||
NSDebugMLog(@"fileInfo %@",_tmpFileInfo);
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)aRequest
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
_tmpFileInfo=nil;
|
||||
NSDebugMLog(@"fileInfo %@",[self fileInfo]);
|
||||
[super takeValuesFromRequest:aRequest
|
||||
inContext:aContext];
|
||||
NSDebugMLog(@"fileInfo.fileURL %@",[_tmpFileInfo valueForKey:@"fileURL"]);
|
||||
NSDebugMLog(@"fileInfo.fileName %@",[_tmpFileInfo valueForKey:@"fileName"]);
|
||||
NSDebugMLog(@"fileInfo.filePath %@",[_tmpFileInfo valueForKey:@"filePath"]);
|
||||
NSDebugMLog(@"fileInfo.data %p",[_tmpFileInfo valueForKey:@"data"]);
|
||||
NSDebugMLog(@"fileInfo.data length %d",(int)[[_tmpFileInfo valueForKey:@"data"] length]);
|
||||
NSDebugMLog(@"fileInfo.mimeType %@",[_tmpFileInfo valueForKey:@"mimeType"]);
|
||||
NSDebugMLog(@"fileInfo.widthAndHeightCode %@",[_tmpFileInfo valueForKey:@"widthAndHeightCode"]);
|
||||
NSDebugMLog(@"fileInfo.width %@",[_tmpFileInfo valueForKey:@"width"]);
|
||||
NSDebugMLog(@"fileInfo.height %@",[_tmpFileInfo valueForKey:@"height"]);
|
||||
|
||||
if ([[_tmpFileInfo valueForKey:@"data"]length]>0 || boolValueWithDefaultFor([_tmpFileInfo valueForKey:@"isDeleted"],NO))
|
||||
[self setValue:_tmpFileInfo
|
||||
forBinding:@"fileInfo"];
|
||||
_tmpFileInfo=nil;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSMutableDictionary*)fileInfo
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if (!_tmpFileInfo)
|
||||
{
|
||||
if ([self hasBinding:@"fileInfo"])
|
||||
|
@ -133,7 +112,7 @@ RCS_ID("$Id$")
|
|||
_tmpFileInfo=(NSMutableDictionary*)[NSMutableDictionary dictionary];
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
|
||||
return _tmpFileInfo;
|
||||
};
|
||||
|
||||
|
|
|
@ -41,28 +41,22 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(id)init
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if ((self=[super init]))
|
||||
{
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)awake
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[super awake];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)sleep
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[super sleep];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -81,7 +75,6 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(NSMutableDictionary*)fileInfo
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if (!_fileInfo)
|
||||
{
|
||||
if ([self hasBinding:@"fileInfo"])
|
||||
|
@ -91,7 +84,7 @@ RCS_ID("$Id$")
|
|||
_fileInfo=[NSMutableDictionary new];
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
|
||||
return _fileInfo;
|
||||
};
|
||||
|
||||
|
@ -137,7 +130,6 @@ RCS_ID("$Id$")
|
|||
-(GSWComponent*)updateAction
|
||||
{
|
||||
GSWComponent* _returnPage=nil;
|
||||
LOGObjectFnStart();
|
||||
[self setValue:_fileInfo
|
||||
forBinding:@"fileInfo"];
|
||||
if ([self hasBinding:@"action"])
|
||||
|
@ -145,7 +137,7 @@ RCS_ID("$Id$")
|
|||
_returnPage=[self valueForBinding:@"action"];
|
||||
};
|
||||
DESTROY(_fileInfo);
|
||||
LOGObjectFnStop();
|
||||
|
||||
return _returnPage;
|
||||
};
|
||||
|
||||
|
@ -153,7 +145,6 @@ RCS_ID("$Id$")
|
|||
-(GSWComponent*)deleteAction
|
||||
{
|
||||
GSWComponent* _returnPage=nil;
|
||||
LOGObjectFnStart();
|
||||
[_fileInfo removeObjectForKey:@"data"];
|
||||
[self setValue:_fileInfo
|
||||
forBinding:@"fileInfo"];
|
||||
|
@ -162,7 +153,7 @@ RCS_ID("$Id$")
|
|||
_returnPage=[self valueForBinding:@"action"];
|
||||
};
|
||||
DESTROY(_fileInfo);
|
||||
LOGObjectFnStop();
|
||||
|
||||
return _returnPage;
|
||||
};
|
||||
|
||||
|
|
|
@ -41,34 +41,28 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(id)init
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if ((self=[super init]))
|
||||
{
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)awake
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[super awake];
|
||||
message=nil;
|
||||
user=nil;
|
||||
password=nil;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)sleep
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
message=nil;
|
||||
user=nil;
|
||||
password=nil;
|
||||
[super sleep];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -88,8 +82,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
GSWComponent* _nextPage=nil;
|
||||
BOOL _bindingOk=NO;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLog(@"user=%@ password=%@",user,password);
|
||||
|
||||
NS_DURING
|
||||
{
|
||||
if ([self hasBinding:@"password"])
|
||||
|
@ -107,7 +100,6 @@ RCS_ID("$Id$")
|
|||
forBinding:@"login"];
|
||||
};
|
||||
};
|
||||
NSDebugMLog(@"_bindingOk=%s",(_bindingOk ? "YES" : "NO"));
|
||||
if (_bindingOk)
|
||||
{
|
||||
[self setValue:password
|
||||
|
@ -121,28 +113,22 @@ RCS_ID("$Id$")
|
|||
{
|
||||
message=[self valueForBinding:@"message"];
|
||||
};
|
||||
NSDebugMLog(@"message=%@",message);
|
||||
_tryCount++;
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException0(@"exception in GSWLogin login action");
|
||||
LOGException(@"exception=%@",localException);
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo(localException,
|
||||
@"In GSWLogin login action");
|
||||
LOGException(@"exception=%@",localException);
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
LOGObjectFnStop();
|
||||
|
||||
return _nextPage;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSNumber*)computeIsTryCountGreaterThanForKey:(NSString*)count
|
||||
{
|
||||
NSDebugMLog(@"_tryCount=%d",_tryCount);
|
||||
NSDebugMLog(@"count=%@ countIntValue=%d",count,[count intValue]);
|
||||
return ((_tryCount>[count intValue]) ? GSWNumberYes : GSWNumberNo);
|
||||
};
|
||||
@end
|
||||
|
|
|
@ -41,30 +41,25 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(id)init
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if ((self=[super init]))
|
||||
{
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)awake
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[super awake];
|
||||
_tmpErrorMessage=nil;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)sleep
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
_tmpErrorMessage=nil;
|
||||
[super sleep];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -90,7 +85,6 @@ RCS_ID("$Id$")
|
|||
id key=nil;
|
||||
NSString* dscrValue=nil;
|
||||
NSString* value=nil;
|
||||
LOGObjectFnStart();
|
||||
anEnum=[fieldsDscription keyEnumerator];
|
||||
while((key=[anEnum nextObject]))
|
||||
{
|
||||
|
@ -110,9 +104,8 @@ RCS_ID("$Id$")
|
|||
(errorMessagePrefix ? errorMessagePrefix : @""),
|
||||
missingFields,
|
||||
(errorMessageSuffix ? errorMessageSuffix : @"")];
|
||||
NSDebugMLog(@"_tmpErrorMessage=%@",_tmpErrorMessage);
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
|
||||
return !missingFields;
|
||||
};
|
||||
|
||||
|
@ -145,7 +138,7 @@ RCS_ID("$Id$")
|
|||
NSString* dscrValue=nil;
|
||||
NSString* value=nil;
|
||||
NSString* msg=nil;
|
||||
LOGObjectFnStart();
|
||||
|
||||
anEnum=[fieldsDscription keyEnumerator];
|
||||
while((key=[anEnum nextObject]))
|
||||
{
|
||||
|
@ -153,30 +146,28 @@ RCS_ID("$Id$")
|
|||
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);
|
||||
// LOGError(@"No From or To address (from=%@ , to=%@)",from,to);
|
||||
};
|
||||
page=[self pageWithName:sentPageName];
|
||||
LOGObjectFnStop();
|
||||
|
||||
return page;
|
||||
};
|
||||
@end
|
||||
|
|
|
@ -40,26 +40,22 @@ RCS_ID("$Id$")
|
|||
|
||||
-(id)init
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if ((self=[super init]))
|
||||
{
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
|
||||
return self;
|
||||
};
|
||||
|
||||
-(void)awake
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[super awake];
|
||||
LOGObjectFnStop();
|
||||
|
||||
};
|
||||
|
||||
-(void)sleep
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[super sleep];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
-(void)dealloc
|
||||
|
@ -76,7 +72,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
NSString* image=nil;
|
||||
BOOL isSelected=NO;
|
||||
LOGObjectFnStart();
|
||||
|
||||
isSelected=boolValueFor([self valueForBinding:@"isCurrentTabSelected"]);
|
||||
if (isSelected)
|
||||
{
|
||||
|
@ -96,7 +92,7 @@ RCS_ID("$Id$")
|
|||
else
|
||||
image = @"tabLeftBorderNotSelected.gif";
|
||||
};
|
||||
NSDebugMLog(@"image=%@",image);
|
||||
|
||||
return image;
|
||||
};
|
||||
|
||||
|
@ -104,7 +100,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
NSString* image=nil;
|
||||
BOOL isSelected=NO;
|
||||
LOGObjectFnStart();
|
||||
|
||||
isSelected=boolValueFor([self valueForBinding:@"isCurrentTabSelected"]);
|
||||
if (isSelected)
|
||||
{
|
||||
|
@ -124,14 +120,14 @@ RCS_ID("$Id$")
|
|||
else
|
||||
image = @"tabRightBorderNotSelected.gif";
|
||||
};
|
||||
NSDebugMLog(@"image=%@",image);
|
||||
|
||||
return image;
|
||||
};
|
||||
-(NSString*)tabImage
|
||||
{
|
||||
NSString* image=nil;
|
||||
BOOL isSelected=NO;
|
||||
LOGObjectFnStart();
|
||||
|
||||
isSelected=boolValueFor([self valueForBinding:@"isCurrentTabSelected"]);
|
||||
if (isSelected)
|
||||
{
|
||||
|
@ -147,7 +143,7 @@ RCS_ID("$Id$")
|
|||
else if ([self hasBinding:@"tabImage"])
|
||||
image=[self valueForBinding:@"tabImage"];
|
||||
};
|
||||
NSDebugMLog(@"image=%@",image);
|
||||
|
||||
return image;
|
||||
};
|
||||
|
||||
|
@ -155,7 +151,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
NSString* text=nil;
|
||||
BOOL isSelected=NO;
|
||||
LOGObjectFnStart();
|
||||
|
||||
isSelected=boolValueFor([self valueForBinding:@"isCurrentTabSelected"]);
|
||||
if (isSelected)
|
||||
{
|
||||
|
@ -171,17 +167,14 @@ RCS_ID("$Id$")
|
|||
else if ([self hasBinding:@"tabText"])
|
||||
text=[self valueForBinding:@"tabText"];
|
||||
};
|
||||
NSDebugMLog(@"text=%@",text);
|
||||
LOGObjectFnStop();
|
||||
|
||||
return text;
|
||||
};
|
||||
|
||||
-(GSWComponent*)selectCurrentTab
|
||||
{
|
||||
GSWComponent* page=nil;
|
||||
LOGObjectFnStart();
|
||||
page=[self valueForBinding:@"selectCurrentTab"];
|
||||
LOGObjectFnStop();
|
||||
return page;
|
||||
};
|
||||
@end
|
||||
|
|
|
@ -40,32 +40,26 @@ RCS_ID("$Id$")
|
|||
|
||||
-(id)init
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if ((self=[super init]))
|
||||
{
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)awake
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[super awake];
|
||||
_tmpValidationFailureMessage=nil;
|
||||
_tmpAllValidationFailureMessagesArray=nil;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)sleep
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
_tmpValidationFailureMessage=nil;
|
||||
_tmpAllValidationFailureMessagesArray=nil;
|
||||
[super sleep];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -84,12 +78,10 @@ RCS_ID("$Id$")
|
|||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
_tmpValidationFailureMessage=nil;
|
||||
_tmpAllValidationFailureMessagesArray=nil;
|
||||
[super appendToResponse:response
|
||||
inContext:aContext];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -101,16 +93,12 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(NSArray*)allValidationFailureMessagesArray
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if (!_tmpAllValidationFailureMessagesArray)
|
||||
{
|
||||
NSArray* allValidationFailureMessagesArray=[[self parent]allValidationFailureMessages];
|
||||
NSDebugMLog(@"allValidationFailureMessagesArray=%@",allValidationFailureMessagesArray);
|
||||
_tmpAllValidationFailureMessagesArray=allValidationFailureMessagesArray;
|
||||
NSDebugMLog(@"_tmpAllValidationFailureMessagesArray=%@",_tmpAllValidationFailureMessagesArray);
|
||||
};
|
||||
NSDebugMLog(@"_tmpAllValidationFailureMessagesArray=%@",_tmpAllValidationFailureMessagesArray);
|
||||
LOGObjectFnStop();
|
||||
|
||||
return _tmpAllValidationFailureMessagesArray;
|
||||
};
|
||||
|
||||
|
|
|
@ -395,4 +395,6 @@ ifeq ($(doc),yes)
|
|||
include $(GNUSTEP_MAKEFILES)/documentation.make
|
||||
endif
|
||||
|
||||
ADDITIONAL_OBJCFLAGS = -Werror-implicit-function-declaration
|
||||
|
||||
-include Makefile.postamble
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWAction
|
||||
|
@ -91,7 +92,6 @@ RCS_ID("$Id$")
|
|||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"in session create/restore");
|
||||
LOGException(@"exception=%@",localException);
|
||||
//No Exception if session can't be restored !
|
||||
session=nil;
|
||||
}
|
||||
|
@ -139,52 +139,6 @@ RCS_ID("$Id$")
|
|||
return session;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//-(GSWSession*)session
|
||||
//{
|
||||
// BOOL hasSession=NO;
|
||||
// GSWSession* session=nil;
|
||||
//
|
||||
// if (![_context isSessionDisabled])
|
||||
// {
|
||||
// hasSession=[_context hasSession];
|
||||
// if (hasSession)
|
||||
// session=[_context existingSession];
|
||||
// if (!session)
|
||||
// {
|
||||
// NSString* sessionID=nil;
|
||||
// sessionID=[[self request] sessionID];
|
||||
// if (sessionID)
|
||||
// {
|
||||
// NS_DURING
|
||||
// {
|
||||
// session=[GSWApp restoreSessionWithID:sessionID
|
||||
// inContext:_context];
|
||||
// }
|
||||
// NS_HANDLER
|
||||
// {
|
||||
// localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"in session create/restore");
|
||||
// LOGException(@"exception=%@",localException);
|
||||
// [localException raise];
|
||||
// };
|
||||
// NS_ENDHANDLER;
|
||||
// if (!session)
|
||||
// {
|
||||
// ExceptionRaise(@"GSWAction",
|
||||
// @"Unable to restore sessionID %@.",
|
||||
// sessionID);
|
||||
// };
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // No Session ID: Create a new Session
|
||||
// session=[_context session];
|
||||
// };
|
||||
// };
|
||||
// };
|
||||
//
|
||||
// return session;
|
||||
//};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// application
|
||||
|
@ -208,9 +162,6 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"%@ (%@)",
|
||||
localException,
|
||||
[localException reason]);
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"In pageWithName:inContext:");
|
||||
[localException raise];
|
||||
};
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/GSObjCRuntime.h>
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWActionRequestHandler
|
||||
|
@ -139,7 +141,6 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[application unlockRequestHandling];
|
||||
[localException raise];//TODO
|
||||
};
|
||||
|
@ -317,7 +318,6 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
// Be carefull: there's no context created for the moment
|
||||
response=[application handleActionRequestErrorWithRequest:aRequest
|
||||
exception:localException
|
||||
|
@ -349,7 +349,6 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
response=[application handleActionRequestErrorWithRequest:aRequest
|
||||
exception:localException
|
||||
reason:@"InstantiationError"
|
||||
|
@ -371,7 +370,6 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
response=[application handleActionRequestErrorWithRequest:aRequest
|
||||
exception:localException
|
||||
reason:@"InvocationError"
|
||||
|
@ -436,7 +434,6 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
if (!response)
|
||||
{
|
||||
if (!context)
|
||||
|
|
|
@ -323,17 +323,14 @@ static NSString * static_tempQueryKey = nil;
|
|||
int x=0;
|
||||
int y=0;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
component=GSWContext_component(aContext);
|
||||
|
||||
GSWContext_appendZeroElementIDComponent(aContext);
|
||||
|
||||
senderID=GSWContext_senderID(aContext);
|
||||
NSDebugMLog(@"senderID=%@",senderID);
|
||||
|
||||
elementID=GSWContext_elementID(aContext);
|
||||
NSDebugMLog(@"elementID=%@",elementID);
|
||||
|
||||
if ([elementID isEqualToString:senderID])
|
||||
{
|
||||
|
@ -352,8 +349,7 @@ static NSString * static_tempQueryKey = nil;
|
|||
NSString* nameInContext=[self nameInContext:aContext];
|
||||
NSString* formValueX=[request formValueForKey:[nameInContext stringByAppendingString:@".x"]];
|
||||
NSString* formValueY=[request formValueForKey:[nameInContext stringByAppendingString:@".y"]];
|
||||
NSDebugMLLog(@"gswdync",@"formValueX=%@",formValueX);
|
||||
NSDebugMLLog(@"gswdync",@"formValueY=%@",formValueY);
|
||||
|
||||
if (formValueX && formValueY)
|
||||
{
|
||||
x=[formValueX intValue];
|
||||
|
@ -370,11 +366,11 @@ static NSString * static_tempQueryKey = nil;
|
|||
else
|
||||
{
|
||||
elementID=GSWContext_elementID(aContext);
|
||||
NSDebugMLog(@"elementID=%@",elementID);
|
||||
|
||||
if ([elementID isEqualToString:senderID])
|
||||
{
|
||||
id param=[request formValueForKey:GSWKey_IsmapCoords[GSWebNamingConv]];
|
||||
NSDebugMLLog(@"gswdync",@"param=%@",param);
|
||||
|
||||
if (param)
|
||||
{
|
||||
if ([param ismapCoordx:&x
|
||||
|
@ -411,7 +407,7 @@ static NSString * static_tempQueryKey = nil;
|
|||
regions=[GSWGeometricRegion geometricRegionsWithFile:imageMapFilePath];
|
||||
else
|
||||
{
|
||||
NSDebugMLLog0(@"gswdync",@"GSWActiveImage No image Map.");
|
||||
//NSDebugMLLog0(@"gswdync",@"GSWActiveImage No image Map.");
|
||||
};
|
||||
}
|
||||
else if (!WOStrictFlag && _imageMapString)
|
||||
|
@ -464,7 +460,7 @@ static NSString * static_tempQueryKey = nil;
|
|||
}
|
||||
else
|
||||
{
|
||||
NSDebugMLLog0(@"gswdync",@"GSWActiveImage Couldn't trigger action.");
|
||||
//NSDebugMLLog0(@"gswdync",@"GSWActiveImage Couldn't trigger action.");
|
||||
};
|
||||
};
|
||||
if (!element)
|
||||
|
@ -495,7 +491,6 @@ static NSString * static_tempQueryKey = nil;
|
|||
[element class],
|
||||
element);
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return element;
|
||||
};
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
|
||||
//====================================================================
|
||||
|
@ -106,6 +107,6 @@ RCS_ID("$Id$")
|
|||
-(void) registerPort:(int)port
|
||||
forApplicationNamed:(NSString*)applicationName
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
}
|
||||
@end
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWApplet
|
||||
|
@ -40,7 +41,7 @@ RCS_ID("$Id$")
|
|||
associations:(NSDictionary*)associations
|
||||
contentElements:(NSArray*)elements
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -55,7 +56,7 @@ RCS_ID("$Id$")
|
|||
-(BOOL)appendStringAtRight:(id)unkwnon
|
||||
withMapping:(char*)mapping
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return NO;
|
||||
};
|
||||
|
||||
|
@ -67,7 +68,7 @@ RCS_ID("$Id$")
|
|||
key:(id)key
|
||||
treatNilValueAsGSWNull:(BOOL)treatNilValueAsGSWNull
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -75,48 +76,48 @@ RCS_ID("$Id$")
|
|||
|
||||
-(NSString*)elementName
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)contextID
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)setContextID:(id)contextID
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
-(id)url
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)setURL:(id)url
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)elementID
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)setElementID:(NSString*)elementID
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -127,7 +128,7 @@ RCS_ID("$Id$")
|
|||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -135,7 +136,7 @@ RCS_ID("$Id$")
|
|||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)aRequest
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -144,60 +145,60 @@ RCS_ID("$Id$")
|
|||
-(void)takeValuesFromRequest:(GSWRequest*)aRequest
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)appendGSWebObjectsAssociationsToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_computeAgcArchiveStringInContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)_agcArchiveURLsListInContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)_archiveURLsListInContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)_agcArchiveNamesListInContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)_archiveNamesListInContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_deallocForComponent:(id)aComponent
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_awakeForComponent:(id)aComponent
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
|
||||
/* globals used by GSWeb: */
|
||||
|
@ -558,13 +559,13 @@ GSWeb_DestroyGlobalAppDefaultOptions(void)
|
|||
//--------------------------------------------------------------------
|
||||
+(void)_initRegistrationDomainDefaults
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(void)_initUserDefaultsKeys
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -573,7 +574,6 @@ GSWeb_DestroyGlobalAppDefaultOptions(void)
|
|||
GSWAdaptor* adaptor=nil;
|
||||
NSDictionary* args=nil;
|
||||
NSString* adaptorName=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"options",@"userDefault=%@",userDefaults);
|
||||
args=[self _argsDictionaryWithUserDefaults:userDefaults];
|
||||
NSDebugMLLog(@"options",@"args=%@",args);
|
||||
|
@ -585,7 +585,6 @@ GSWeb_DestroyGlobalAppDefaultOptions(void)
|
|||
ASSIGN(_adaptors,[_adaptors arrayByAddingObject:adaptor]);
|
||||
else
|
||||
ASSIGN(_adaptors,[NSArray arrayWithObject:adaptor]);
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -599,7 +598,6 @@ GSWeb_DestroyGlobalAppDefaultOptions(void)
|
|||
NSNumber* workerThreadCount=nil;
|
||||
NSNumber* listenQueueSize=nil;
|
||||
NSMutableDictionary* argsDict=nil;
|
||||
LOGObjectFnStart();
|
||||
port=[(GSWAppClassDummy*)[self class] port];
|
||||
host=[(GSWAppClassDummy*)[self class] host];
|
||||
adaptor=[(GSWAppClassDummy*)[self class] adaptor];
|
||||
|
@ -622,7 +620,6 @@ GSWeb_DestroyGlobalAppDefaultOptions(void)
|
|||
if (listenQueueSize)
|
||||
[argsDict setObject:listenQueueSize
|
||||
forKey:GSWOPT_ListenQueueSize[GSWebNamingConv]];
|
||||
LOGObjectFnStop();
|
||||
return argsDict;
|
||||
};
|
||||
|
||||
|
|
|
@ -266,8 +266,6 @@ GSWEB_EXPORT BOOL WOStrictFlag;
|
|||
|
||||
-(void)_terminateFromMonitor;
|
||||
|
||||
-(void)_validateAPI;
|
||||
|
||||
-(NSArray*)adaptors;
|
||||
|
||||
-(GSWAdaptor*)adaptorWithName:(NSString*)aName
|
||||
|
|
|
@ -40,6 +40,11 @@ RCS_ID("$Id$")
|
|||
#include "stacktrace.h"
|
||||
#include "attach.h"
|
||||
|
||||
#include <GNUstepBase/NSThread+GNUstepBase.h>
|
||||
#include <GNUstepBase/NString+GNUstepBase.h>
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
#include <GNUstepBase/GSObjCRuntime.h>
|
||||
|
||||
/*
|
||||
Monitor Refresh (or View Details):
|
||||
application lock
|
||||
|
@ -283,7 +288,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
[self setTimeOut:0];//No time out
|
||||
|
||||
//Do it before run so application can addTimer,... in -run
|
||||
NSDebugMLLog(@"application",@"[NSRunLoop currentRunLoop]=%@",[NSRunLoop currentRunLoop]);
|
||||
ASSIGN(_currentRunLoop,[NSRunLoop currentRunLoop]);
|
||||
|
||||
_pageCacheSize=30;
|
||||
|
@ -300,7 +304,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
[self _touchPrincipalClasses];
|
||||
|
||||
standardUserDefaults=[NSUserDefaults standardUserDefaults];
|
||||
NSDebugMLLog(@"options",@"standardUserDefaults=%@",standardUserDefaults);
|
||||
|
||||
[self _initAdaptorsWithUserDefaults:standardUserDefaults];
|
||||
|
||||
|
@ -327,10 +330,8 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
|
||||
if ([[self class]isMonitorEnabled])
|
||||
{
|
||||
NSDebugMLLog0(@"application",@"init: call self _setupForMonitoring");
|
||||
[self _setupForMonitoring];
|
||||
};
|
||||
NSDebugMLLog0(@"application",@"init: call appGSWBundle initializeObject:...");
|
||||
[[GSWResourceManager _applicationGSWBundle] initializeObject:self
|
||||
fromArchiveNamed:@"Application"];
|
||||
[self setPrintsHTMLParserDiagnostics:NO];
|
||||
|
@ -342,25 +343,20 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
};
|
||||
|
||||
//call recordingPath
|
||||
NSDebugMLLog0(@"application",@"init: call self registerRequestHandlers");
|
||||
[self registerRequestHandlers];
|
||||
[self _validateAPI];
|
||||
NSDebugMLLog0(@"application",@"init: addObserver");
|
||||
|
||||
[[NSNotificationCenter defaultCenter]addObserver:self
|
||||
selector:@selector(_sessionDidTimeOutNotification:)
|
||||
name:GSWNotification__SessionDidTimeOutNotification[GSWebNamingConv]
|
||||
object:nil];
|
||||
NSDebugMLLog0(@"application",@"init: addObserver called");
|
||||
|
||||
// Create lifebeat thread only if we're not the observer :-)
|
||||
NSDebugMLLog(@"application",@"[self isTaskDaemon]=%d",[self isTaskDaemon]);
|
||||
NSDebugMLLog(@"application",@"[[self class] isLifebeatEnabled]=%d",[[self class] isLifebeatEnabled]);
|
||||
|
||||
if (![self isTaskDaemon] && [[self class] isLifebeatEnabled])
|
||||
{
|
||||
NSTimeInterval lifebeatInterval=[[self class]lifebeatInterval];
|
||||
if (lifebeatInterval<1)
|
||||
lifebeatInterval=30; //30s
|
||||
NSDebugMLLog(@"application",@"lifebeatInterval=%f",lifebeatInterval);
|
||||
|
||||
ASSIGN(_lifebeatThread,
|
||||
[GSWLifebeatThread lifebeatThreadWithApplication:self
|
||||
|
@ -370,7 +366,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
lifebeatHost:[[self class] lifebeatDestinationHost]
|
||||
lifebeatPort:[[self class] lifebeatDestinationPort]
|
||||
interval:lifebeatInterval]);
|
||||
NSDebugMLLog(@"application",@"_lifebeatThread=%@",_lifebeatThread);
|
||||
//#warning go only multi-thread if we want this!
|
||||
|
||||
[NSThread detachNewThreadSelector:@selector(run:)
|
||||
|
@ -386,7 +381,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
GSWLogMemC("Dealloc GSWApplication");
|
||||
DESTROY(_adaptors);
|
||||
DESTROY(_sessionStore);
|
||||
DESTROY(_componentDefinitionCache);
|
||||
|
@ -400,11 +394,8 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
DESTROY(_instanceNumber);
|
||||
DESTROY(_requestHandlers);
|
||||
DESTROY(_defaultRequestHandler);
|
||||
GSWLogMemC("Dealloc GSWApplication: selfLock");
|
||||
DESTROY(_selfLock);
|
||||
GSWLogMemC("Dealloc GSWApplication: globalLock");
|
||||
DESTROY(_globalLock);
|
||||
GSWLogMemC("Dealloc GSWApplication: globalAutoreleasePool");
|
||||
DESTROY(_globalAutoreleasePool);
|
||||
DESTROY(_currentRunLoop);
|
||||
DESTROY(_runLoopDate);
|
||||
|
@ -417,9 +408,7 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
GSWApp = nil;
|
||||
}
|
||||
|
||||
GSWLogMemC("Dealloc GSWApplication Super");
|
||||
[super dealloc];
|
||||
GSWLogMemC("End Dealloc GSWApplication");
|
||||
};
|
||||
|
||||
|
||||
|
@ -546,9 +535,7 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
*/
|
||||
NS_DURING
|
||||
{
|
||||
NSDebugLockMLog(@"GLOBALLOCK lock %@", GSCurrentThread());
|
||||
LoggedLockBeforeDate(_globalLock,GSW_LOCK_LIMIT);
|
||||
NSDebugLockMLog(@"GLOBALLOCK locked %@", GSCurrentThread());
|
||||
#ifndef NDEBUG
|
||||
_globalLockn++;
|
||||
_globalLock_thread_id=GSCurrentThread();
|
||||
|
@ -563,7 +550,7 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"globalLock loggedlockBeforeDate");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
NSLog(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
};
|
||||
NS_ENDHANDLER;
|
||||
|
@ -590,12 +577,9 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
{
|
||||
if (_globalLock_thread_id!=GSCurrentThread())
|
||||
{
|
||||
NSDebugMLLog0(@"application",@"PROBLEM: owner!=thread id");
|
||||
};
|
||||
};
|
||||
NSDebugLockMLog(@"GLOBALLOCK unlock %@", GSCurrentThread());
|
||||
LoggedUnlock(_globalLock);
|
||||
NSDebugLockMLog(@"GLOBALLOCK unlocked %@",GSCurrentThread());
|
||||
#ifndef NDEBUG
|
||||
_globalLockn--;
|
||||
if (_globalLockn==0)
|
||||
|
@ -609,14 +593,8 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLog(@"globalLockn=%d globalLock_thread_id=%@ "
|
||||
@"GSCurrentThread()=%@",
|
||||
_globalLockn,
|
||||
_globalLock_thread_id,
|
||||
GSCurrentThread());
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"globalLock loggedunlock");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
};
|
||||
NS_ENDHANDLER;
|
||||
|
@ -656,15 +634,12 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
{*/
|
||||
processInfo=[NSProcessInfo processInfo];
|
||||
processName=[processInfo processName];
|
||||
NSDebugMLLog(@"application",@"_cmd:%p",_cmd);
|
||||
NSDebugMLLog(@"application",@"processInfo:%@",processInfo);
|
||||
NSDebugMLLog(@"application",@"processName:%@",processName);
|
||||
|
||||
processName=[processName lastPathComponent];
|
||||
if ([processName hasSuffix:GSWApplicationPSuffix[GSWebNamingConv]])
|
||||
name=[processName stringByDeletingSuffix:GSWApplicationPSuffix[GSWebNamingConv]];
|
||||
else
|
||||
name=processName;
|
||||
NSDebugMLLog(@"application",@"_name:%@ %p",name,name);
|
||||
// };
|
||||
return name;
|
||||
|
||||
|
@ -683,9 +658,7 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
{
|
||||
NSString* path=nil;
|
||||
|
||||
NSDebugMLLog(@"bundles",@"[GSWResourceManager _applicationGSWBundle]:%@",[GSWResourceManager _applicationGSWBundle]);
|
||||
path=[[GSWResourceManager _applicationGSWBundle] path];
|
||||
NSDebugMLLog(@"application",@"path:%@",path);
|
||||
|
||||
return path;
|
||||
};
|
||||
|
@ -695,7 +668,7 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
-(NSString*)baseURL
|
||||
{
|
||||
NSString* baseURL=nil;
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
|
||||
baseURL=[GSWURLPrefix[GSWebNamingConv] stringByAppendingString:[self name]];
|
||||
|
||||
|
@ -727,9 +700,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
componentRequestHandler=[[self class] _componentRequestHandler];
|
||||
componentRequestHandlerKey=[[self class] componentRequestHandlerKey];
|
||||
|
||||
NSDebugMLLog(@"application",@"componentRequestHandlerKey:%@",
|
||||
componentRequestHandlerKey);
|
||||
|
||||
|
||||
// Resource Handler
|
||||
resourceRequestHandler=(GSWResourceRequestHandler*)
|
||||
|
@ -737,9 +707,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
|
||||
resourceRequestHandlerKey=[[self class] resourceRequestHandlerKey];
|
||||
|
||||
NSDebugMLLog(@"application",@"resourceRequestHandlerKey:%@",
|
||||
resourceRequestHandlerKey);
|
||||
|
||||
|
||||
// DirectAction Handler
|
||||
directActionRequestHandler=(GSWDirectActionRequestHandler*)
|
||||
|
@ -747,9 +714,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
|
||||
directActionRequestHandlerKey=[[self class] directActionRequestHandlerKey];
|
||||
|
||||
NSDebugMLLog(@"application",@"directActionRequestHandlerKey:%@",
|
||||
directActionRequestHandlerKey);
|
||||
|
||||
|
||||
// "Ping" Handler
|
||||
pingDirectActionRequestHandler=(GSWDirectActionRequestHandler*)
|
||||
|
@ -758,9 +722,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
shouldAddToStatistics:NO];
|
||||
pingDirectActionRequestHandlerKey=[[self class] pingActionRequestHandlerKey];
|
||||
|
||||
NSDebugMLLog(@"application",@"pingDirectActionRequestHandlerKey:%@",
|
||||
pingDirectActionRequestHandlerKey);
|
||||
|
||||
|
||||
// Stream Handler
|
||||
streamDirectActionRequestHandler=(GSWDirectActionRequestHandler*)
|
||||
|
@ -769,9 +730,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
streamDirectActionRequestHandlerKey=[[self class] streamActionRequestHandlerKey];
|
||||
[streamDirectActionRequestHandler setAllowsContentInputStream:YES];
|
||||
|
||||
NSDebugMLLog(@"application",@"streamDirectActionRequestHandlerKey:%@",
|
||||
streamDirectActionRequestHandlerKey);
|
||||
|
||||
|
||||
[self registerRequestHandler:componentRequestHandler
|
||||
forKey:componentRequestHandlerKey];
|
||||
|
@ -804,8 +762,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
[self registerRequestHandler:staticResourceRequestHandler
|
||||
forKey:staticResourceRequestHandlerKey];
|
||||
};
|
||||
|
||||
NSDebugMLLog(@"application",@"_requestHandlers:%@",_requestHandlers);
|
||||
|
||||
};
|
||||
|
||||
|
@ -830,7 +786,7 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
|
||||
-(void)becomesMultiThreaded
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
}
|
||||
|
||||
-(NSString*)_webserverConnectURL
|
||||
|
@ -839,7 +795,7 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
NSString* cgiAdaptorURL=[[self class]cgiAdaptorURL]; //return http://www.example.com/cgi-bin/GSWeb.exe
|
||||
if (!cgiAdaptorURL)
|
||||
{
|
||||
NSDebugMLog(@"No CGI adaptor");
|
||||
//NSDebugMLog(@"No CGI adaptor");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -855,7 +811,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
[self name],
|
||||
[self _applicationExtension],
|
||||
port];
|
||||
NSDebugMLog(@"webserverConnectURL=%@",webserverConnectURL);
|
||||
}
|
||||
return webserverConnectURL; //return http://www.example.com:1436/cgi-bin/GSWeb.exe/ObjCTest3.gswa/-2
|
||||
};
|
||||
|
@ -879,14 +834,12 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
//--------------------------------------------------------------------
|
||||
-(NSString*)_applicationExtension
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return GSWApplicationSuffix[GSWebNamingConv];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_resetCacheForGeneration
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -913,7 +866,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"In Application _resetCache");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
//TODO
|
||||
|
@ -929,7 +881,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
//OK
|
||||
GSWComponentDefinition* componentDefinition=nil;
|
||||
|
||||
NSDebugMLLog(@"info",@"aName=%@",aName);
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -940,7 +891,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"In lockedComponentDefinitionWithName");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
|
@ -1170,7 +1120,7 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
//NSDebugMLLog(@"gswcomponents",@"allFrameworks=%@",allFrameworks);
|
||||
//NSDebugFLLog(@"gswcomponents",@"allFrameworks pathes=%@",[allFrameworks valueForKey:@"resourcePath"]);
|
||||
array=[self lockedInitComponentBearingFrameworksFromBundleArray:allFrameworks];
|
||||
NSDebugMLLog(@"gswcomponents",@"array=%@",array);
|
||||
|
||||
[allFrameworks release];
|
||||
|
||||
|
||||
|
@ -1206,7 +1156,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
//if (boolValueFor(hasGSWComponents))
|
||||
// {
|
||||
[array addObject:bundle];
|
||||
NSDebugMLLog(@"gswcomponents",@"Add %@",[bundle bundleName]);
|
||||
// };
|
||||
};
|
||||
// NSDebugMLLog(@"gswcomponents",@"_array=%@",_array);
|
||||
|
@ -1367,7 +1316,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"In lockedDecrementActiveSessionCount...");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
|
@ -1396,7 +1344,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"In initializeObject:fromArchiveNamed:");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
|
@ -1413,7 +1360,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
|
||||
if ([self isRefusingNewSessions])
|
||||
{
|
||||
LOGError0(@"Try to initialize session with isRefusingNewSessions evaluation to YES");
|
||||
[aContext _setIsRefusingThisRequest:YES];
|
||||
}
|
||||
|
||||
|
@ -1535,7 +1481,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
|
@ -1564,13 +1509,13 @@ to another instance **/
|
|||
//called when deamon is shutdown
|
||||
-(void)_connectionDidDie:(id)unknown
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)_shouldKill
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return NO;
|
||||
};
|
||||
|
||||
|
@ -1578,13 +1523,13 @@ to another instance **/
|
|||
//TODO return (Vv9@0:4c8)
|
||||
-(void)_setShouldKill:(BOOL)flag
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_synchronizeInstanceSettingsWithMonitor:(id)_monitor
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -1611,8 +1556,6 @@ to another instance **/
|
|||
NSString* monitorHost=[self _monitorHost];
|
||||
NSNumber* workerThreadCount=[[self class]workerThreadCount];
|
||||
id proxy=nil;
|
||||
NSDebugFLLog(@"monitor",@"monitorHost=%@",monitorHost);
|
||||
NSDebugFLLog(@"monitor",@"workerThreadCount=%@",workerThreadCount);
|
||||
if ([[NSDistantObject class] respondsToSelector:@selector(setDebug:)])
|
||||
{
|
||||
[NSDistantObject setDebug:YES];
|
||||
|
@ -1650,13 +1593,6 @@ to another instance **/
|
|||
[self terminate];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_validateAPI
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//adaptors
|
||||
|
||||
|
@ -1681,18 +1617,16 @@ to another instance **/
|
|||
Class gswadaptorClass=nil;
|
||||
Class adaptorClass=nil;
|
||||
|
||||
NSDebugMLLog(@"application",@"adaptor name:%@",name);
|
||||
gswadaptorClass=[GSWAdaptor class];
|
||||
NSAssert([name length]>0,@"No adaptor name");
|
||||
adaptorClass=NSClassFromString(name);
|
||||
NSAssert1(adaptorClass,@"No adaptor named '%@'",name);
|
||||
if (adaptorClass)
|
||||
{
|
||||
if (ClassIsKindOfClass(adaptorClass,gswadaptorClass))
|
||||
if (GSObjCIsKindOf(adaptorClass,gswadaptorClass))
|
||||
{
|
||||
adaptor=[[[adaptorClass alloc] initWithName:name
|
||||
arguments:arguments] autorelease];
|
||||
NSDebugMLLog(@"application",@"adaptor:%@",adaptor);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1930,7 +1864,7 @@ to another instance **/
|
|||
-(GSWComponent*)pageWithName:(NSString*)aName
|
||||
forRequest:(GSWRequest*)aRequest
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -1987,7 +1921,6 @@ to another instance **/
|
|||
{
|
||||
localException=[localException exceptionByAddingUserInfoFrameInfoFormat:@"In %s",
|
||||
__PRETTY_FUNCTION__];
|
||||
LOGException(@"exception=%@",localException);
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
};
|
||||
|
@ -2107,7 +2040,6 @@ to another instance **/
|
|||
}
|
||||
} NS_HANDLER {
|
||||
NSLog(@"%@",localException);
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
} NS_ENDHANDLER;
|
||||
|
||||
|
@ -2139,7 +2071,6 @@ to another instance **/
|
|||
|
||||
-(void)setTimeOut:(NSTimeInterval)aTimeInterval
|
||||
{
|
||||
NSDebugMLLog(@"sessions",@"timeOut=%ld",(long)aTimeInterval);
|
||||
if (aTimeInterval==0)
|
||||
_timeOut=[[NSDate distantFuture]timeIntervalSinceDate:_lastAccessDate];
|
||||
else
|
||||
|
@ -2197,7 +2128,6 @@ to another instance **/
|
|||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"In addTimer:");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
|
@ -2228,14 +2158,8 @@ to another instance **/
|
|||
-(void)lockedAddTimer:(NSTimer*)aTimer
|
||||
{
|
||||
|
||||
NSDebugMLLog(@"application",@"[self runLoop]=%p",(void*)[self runLoop]);
|
||||
NSDebugMLLog(@"application",@"currentMode=%@",[[self runLoop]currentMode]);
|
||||
NSDebugMLLog(@"application",@"NSDefaultRunLoopMode=%@",NSDefaultRunLoopMode);
|
||||
NSDebugMLLog(@"application",@"aTimer=%@",aTimer);
|
||||
NSDebugMLLog(@"application",@"aTimer fireDate=%@",[aTimer fireDate]);
|
||||
[[self runLoop]addTimer:aTimer
|
||||
forMode:NSDefaultRunLoopMode];
|
||||
NSDebugMLLog(@"application",@"limitDateForMode=%@",[[self runLoop]limitDateForMode:NSDefaultRunLoopMode]);
|
||||
|
||||
};
|
||||
|
||||
|
@ -2252,7 +2176,6 @@ to another instance **/
|
|||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"In addTimer:");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
|
@ -2275,7 +2198,7 @@ to another instance **/
|
|||
//--------------------------------------------------------------------
|
||||
-(void)_setNextCollectionCount:(int)_count
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -2312,7 +2235,7 @@ to another instance **/
|
|||
{
|
||||
// [NSBundle bundleForClass:XX];
|
||||
//TODO finish
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -2350,7 +2273,6 @@ to another instance **/
|
|||
|
||||
response = [requestHandler handleRequest:aRequest];
|
||||
if (!response) {
|
||||
NSDebugLog(@"%s !!! Response is null !!!", __PRETTY_FUNCTION__);
|
||||
response = [self createResponseInContext:nil];
|
||||
}
|
||||
|
||||
|
@ -2413,11 +2335,8 @@ to another instance **/
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException0(@"exception in GSWApplication invokeActionForRequest:inContext");
|
||||
LOGException(@"exception=%@",localException);
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo(localException,
|
||||
@"In GSWApplication invokeActionForRequest:inContext");
|
||||
LOGException(@"exception=%@",localException);
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
|
@ -2436,13 +2355,10 @@ to another instance **/
|
|||
|
||||
|
||||
request=[aContext request];
|
||||
NSDebugMLog(@"request=%p",request);
|
||||
session=[aContext existingSession];
|
||||
NSDebugMLog(@"session=%p",session);
|
||||
|
||||
if ([aContext _isRefusingThisRequest])
|
||||
{
|
||||
NSLog(@"Context refuseThisRequest. Will redirect to available instance");
|
||||
[aResponse _generateRedirectResponseWithMessage:nil
|
||||
location:[self _newLocationForRequest:request]
|
||||
isDefinitive:YES];//301
|
||||
|
@ -2457,13 +2373,9 @@ to another instance **/
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"exception in %@ appendToResponse:inContext",
|
||||
[self class]);
|
||||
LOGException(@"exception=%@",localException);
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo(localException,
|
||||
@"In %@ appendToResponse:inContext",
|
||||
[self class]);
|
||||
LOGException(@"exception=%@",localException);
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
|
@ -2476,13 +2388,9 @@ to another instance **/
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"exception in %@ _setRecordingHeadersToResponse...",
|
||||
[self class]);
|
||||
LOGException(@"exception=%@",localException);
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo(localException,
|
||||
@"In %@ _setRecordingHeadersToResponse...",
|
||||
[self class]);
|
||||
LOGException(@"exception=%@",localException);
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
|
@ -2495,10 +2403,6 @@ to another instance **/
|
|||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
|
||||
|
||||
NSDebugMLog(@"Recording Header=%@",
|
||||
[aRequest headerForKey:GSWHTTPHeader_Recording[GSWebNamingConv]]);
|
||||
|
||||
if (_recorder
|
||||
&& ([aRequest headerForKey:GSWHTTPHeader_Recording[GSWebNamingConv]]
|
||||
|| [[self class] recordingPath]))
|
||||
|
@ -2508,7 +2412,6 @@ to another instance **/
|
|||
NSString* header=nil;
|
||||
|
||||
header=GSWIntToNSString([aRequest applicationNumber]);
|
||||
NSDebugMLog(@"header=%@",header);
|
||||
|
||||
[aResponse setHeader:header
|
||||
forKey:GSWHTTPHeader_RecordingApplicationNumber[GSWebNamingConv]];
|
||||
|
@ -2521,8 +2424,6 @@ to another instance **/
|
|||
else
|
||||
sessionID = [aRequest sessionID];
|
||||
|
||||
NSDebugMLog(@"sessionID=%@",sessionID);
|
||||
|
||||
if (sessionID)
|
||||
{
|
||||
[aResponse setHeader:sessionID
|
||||
|
@ -2578,9 +2479,7 @@ to another instance **/
|
|||
[context _putAwakeComponentsToSleep];
|
||||
else
|
||||
{
|
||||
LOGError0(@"No context !");
|
||||
context=[GSWContext contextWithRequest:nil];
|
||||
LOGError0(@"Really can't get context !");
|
||||
};
|
||||
//TODO Hack: verify that there is an application context otherswise, it failed in component Creation
|
||||
if (![self _context])
|
||||
|
@ -2601,7 +2500,6 @@ to another instance **/
|
|||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"In _handleException:inContext:");
|
||||
NSLog(@"exception=%@",localException);
|
||||
LOGException(@"exception=%@",localException);
|
||||
if ([[localException name]isEqualToString:GSWPageNotFoundException])
|
||||
response=[self _invokeDefaultException:localException
|
||||
named:pageName
|
||||
|
@ -2655,7 +2553,6 @@ to another instance **/
|
|||
{
|
||||
GSWResponse* response=nil;
|
||||
|
||||
NSDebugMLLog(@"application",@"context=%@",aContext);
|
||||
NSLog(@"EXCEPTION=%@",anException);
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -2668,7 +2565,6 @@ to another instance **/
|
|||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"In _handleException:inContext:");
|
||||
LOGException(@"exception=%@",localException);
|
||||
response=[GSWResponse responseWithMessage:@"Exception Handling failed"
|
||||
inContext:aContext
|
||||
forRequest:nil];
|
||||
|
@ -2694,7 +2590,6 @@ to another instance **/
|
|||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"In _handlePageRestorationErrorInContext:");
|
||||
LOGException(@"exception=%@",localException);
|
||||
response=[GSWResponse responseWithMessage:@"Exception Handling failed. Can't find Page Restoration Error Page"
|
||||
inContext:aContext
|
||||
forRequest:nil];
|
||||
|
@ -2734,7 +2629,6 @@ to another instance **/
|
|||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"In _handleSessionCreationErrorInContext:");
|
||||
LOGException(@"exception=%@",localException);
|
||||
response=[GSWResponse responseWithMessage:@"Session Creation Error Handling failed."
|
||||
inContext:aContext
|
||||
forRequest:nil];
|
||||
|
@ -2774,7 +2668,6 @@ to another instance **/
|
|||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"In _handleSessionRestorationErrorInContext:");
|
||||
LOGException(@"exception=%@",localException);
|
||||
response=[GSWResponse responseWithMessage:@"Session Restoration Error Handling failed."
|
||||
inContext:aContext
|
||||
forRequest:nil];
|
||||
|
@ -2828,10 +2721,6 @@ to another instance **/
|
|||
//call self isTerminating
|
||||
//call self isCachingEnabled
|
||||
//call self isPageRefreshOnBacktrackEnabled
|
||||
NSDebugMLog(@"setApplication:%p (of class %@) name:%@",
|
||||
application,
|
||||
[application class],
|
||||
[application name]);
|
||||
GSWApp=application;
|
||||
}
|
||||
|
||||
|
@ -2844,7 +2733,6 @@ to another instance **/
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
|
@ -2868,7 +2756,7 @@ to another instance **/
|
|||
|
||||
-(Class)scriptedClassWithPath:(NSString*)path
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -2878,7 +2766,7 @@ to another instance **/
|
|||
-(Class)scriptedClassWithPath:(NSString*)path
|
||||
encoding:(NSStringEncoding)encoding
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -2886,14 +2774,14 @@ to another instance **/
|
|||
-(Class)_classWithScriptedClassName:(NSString*)aName
|
||||
languages:(NSArray*)languages
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_setClassFromNameResolutionEnabled:(BOOL)flag
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -2902,13 +2790,10 @@ to another instance **/
|
|||
{
|
||||
Class aClass=nil;
|
||||
NSBundle* bundle=[NSBundle bundleWithPath:path];
|
||||
NSDebugMLLog(@"application",@"GSWApplication libraryClassWithPath:bundle=%@",bundle);
|
||||
if (bundle)
|
||||
{
|
||||
BOOL result=[bundle load];
|
||||
NSDebugMLLog(@"application",@"GSWApplication libraryClassWithPath:bundle load result=%d",result);
|
||||
aClass=[bundle principalClass];
|
||||
NSDebugMLLog(@"application",@"GSWApplication libraryClassWithPath:bundle class=%@",aClass);
|
||||
};
|
||||
return aClass;
|
||||
};
|
||||
|
@ -2956,7 +2841,7 @@ to another instance **/
|
|||
-(void)_setTracingAspect:(id)unknwon
|
||||
enabled:(BOOL)enabled
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -3461,9 +3346,6 @@ to another instance **/
|
|||
if (ti<15)
|
||||
ti = 15;
|
||||
|
||||
NSDebugMLog(@"activeSessionsCount=%d sessionTimeOut=%f ==> refuseNewSessionsTimeInterval=%f",
|
||||
activeSessionsCount,sessionTimeOut,ti);
|
||||
|
||||
|
||||
|
||||
return ti;
|
||||
|
@ -3473,7 +3355,7 @@ to another instance **/
|
|||
//logToMonitorWithFormat:
|
||||
-(void)logToMonitorWithFormat:(NSString*)aFormat
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -3495,7 +3377,6 @@ to another instance **/
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
|
@ -3595,7 +3476,6 @@ to another instance **/
|
|||
GSWRequestHandler* handler=nil;
|
||||
|
||||
handler=[_requestHandlers objectForKey:aKey];
|
||||
NSDebugMLogCond(!handler,@"_requestHandlers=%@",_requestHandlers);
|
||||
|
||||
return handler;
|
||||
};
|
||||
|
@ -3617,7 +3497,7 @@ to another instance **/
|
|||
//--------------------------------------------------------------------
|
||||
+(NSDictionary*)_webServerConfigDictionary
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -3635,7 +3515,7 @@ to another instance **/
|
|||
//--------------------------------------------------------------------
|
||||
+(Class)_compiledApplicationClass
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -3659,7 +3539,7 @@ to another instance **/
|
|||
//--------------------------------------------------------------------
|
||||
+(id)_modelGroupFromBundles:(id)bundles
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -3697,7 +3577,7 @@ to another instance **/
|
|||
+(NSBundle*)mainBundle
|
||||
{
|
||||
NSBundle* mainBundle=nil;
|
||||
// LOGClassFnNotImplemented(); //TODOFN
|
||||
// [self notImplemented: _cmd]; //TODOFN
|
||||
mainBundle=[NSBundle mainBundle];
|
||||
NSDebugMLog(@"[mainBundle bundlePath]:%@",[mainBundle bundlePath]);
|
||||
return mainBundle;
|
||||
|
@ -3727,62 +3607,62 @@ to another instance **/
|
|||
//--------------------------------------------------------------------
|
||||
+(int)_garbageCollectionRepeatCount
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return 1;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(BOOL)_lockDefaultEditingContext
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return YES;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(void)_setLockDefaultEditingContext:(BOOL)flag
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(id)_allowsConcurrentRequestHandling
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(void)_setAllowsConcurrentRequestHandling:(id)unknown
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(int)_requestLimit
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return 1;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(int)_requestWindow
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return 1;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(BOOL)_multipleThreads
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return YES;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(BOOL)_multipleInstances
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return NO;
|
||||
};
|
||||
|
||||
|
@ -3808,16 +3688,15 @@ to another instance **/
|
|||
pathName=[resourceManager pathForResourceNamed:[NSString stringWithFormat:@"%@.%@",aName,type]
|
||||
inFramework:aFrameworkName
|
||||
languages:languages];
|
||||
NSDebugMLLog(@"application",@"pathName:%@",pathName);
|
||||
if (pathName)
|
||||
{
|
||||
NSString* propListString=[NSString stringWithContentsOfFile:pathName];
|
||||
propList=[propListString propertyList];
|
||||
if (!propList)
|
||||
{
|
||||
LOGSeriousError(@"Bad propertyList \n%@\n from file %@",
|
||||
propListString,
|
||||
pathName);
|
||||
// LOGSeriousError(@"Bad propertyList \n%@\n from file %@",
|
||||
// propListString,
|
||||
// pathName);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -3839,7 +3718,6 @@ to another instance **/
|
|||
BOOL ok=YES;
|
||||
int classesCount=0;
|
||||
|
||||
LOGClassFnStart();
|
||||
|
||||
classesCount=[classes count];
|
||||
|
||||
|
@ -3881,7 +3759,7 @@ to another instance **/
|
|||
}
|
||||
else
|
||||
{
|
||||
LOGError(@"Can't create one of these classes %@ (super class: %@)",
|
||||
NSLog(@"Can't create one of these classes %@ (super class: %@)",
|
||||
aClassName,superClassName);
|
||||
};
|
||||
};
|
||||
|
@ -3892,7 +3770,6 @@ to another instance **/
|
|||
GSObjCAddClasses(newClasses);
|
||||
};
|
||||
};
|
||||
LOGClassFnStop();
|
||||
return ok;
|
||||
#endif
|
||||
};
|
||||
|
@ -3901,12 +3778,10 @@ to another instance **/
|
|||
+(void)addDynCreateClassName:(NSString*)className
|
||||
superClassName:(NSString*)superClassName
|
||||
{
|
||||
LOGClassFnStart();
|
||||
NSDebugMLLog(@"gswdync",@"ClassName:%@ superClassName:%@",
|
||||
className, superClassName);
|
||||
[localDynCreateClassNames setObject:superClassName
|
||||
forKey:className];
|
||||
LOGClassFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
@ -36,6 +36,8 @@ RCS_ID("$Id$")
|
|||
#include "GSWConstantValueAssociation.h"
|
||||
#include "GSWBindingNameAssociation.h"
|
||||
#include <math.h>
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
#include <GNUstepBase/NSString+GNUstepBase.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <float.h>
|
||||
|
@ -165,7 +167,7 @@ static Class NSStringClass = Nil;
|
|||
//--------------------------------------------------------------------
|
||||
-(NSString*)description
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return [super description];
|
||||
}
|
||||
|
||||
|
@ -552,7 +554,6 @@ static Class NSStringClass = Nil;
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
LoggedUnlock(associationsLock);
|
||||
[localException raise];
|
||||
}
|
||||
|
@ -604,7 +605,6 @@ static Class NSStringClass = Nil;
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
LoggedUnlock(associationsLock);
|
||||
[localException raise];
|
||||
}
|
||||
|
|
|
@ -154,20 +154,20 @@ RCS_ID("$Id$")
|
|||
{
|
||||
if (_keyPath != nil) {
|
||||
id value = [component valueForBinding:_parentBindingName];
|
||||
|
||||
|
||||
if (value != nil) {
|
||||
[component takeValue:aValue
|
||||
forKeyPath:_keyPath];
|
||||
[component setValue:aValue
|
||||
forKeyPath:_keyPath];
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
GSWAssociation * association = [component _associationWithName:_parentBindingName];
|
||||
GSWComponent* parent = nil;
|
||||
|
||||
|
||||
if (association == nil) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
parent = [component parent];
|
||||
if ([association isValueSettableInComponent:parent]) {
|
||||
[association _setValueNoValidation:aValue inComponent:parent];
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
//#ifdef HAVE_GDL2
|
||||
//#include <EOControl/EOKeyValueCoding.h>
|
||||
|
@ -94,11 +95,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
if ((self=[super init]))
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"aPath=%@",aPath);
|
||||
NSDebugMLLog(@"bundles",@"aBaseURL=%@",aBaseURL);
|
||||
ASSIGN(_path,[aPath stringGoodPath]);
|
||||
NSDebugMLLog(@"bundles",@"path=%@",_path);
|
||||
ASSIGN(_baseURL,aBaseURL);
|
||||
ASSIGN(_frameworkName,aFrameworkName);
|
||||
_archiveCache=[NSMutableDictionary new];
|
||||
|
@ -112,7 +109,6 @@ RCS_ID("$Id$")
|
|||
_templateCache=[NSMutableDictionary new];
|
||||
_classCache=[NSMutableDictionary new];
|
||||
_selfLock=[NSRecursiveLock new];
|
||||
LOGObjectFnStop();
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -120,36 +116,21 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
GSWLogC("Dealloc GSWBundle");
|
||||
GSWLogC("Dealloc GSWBundle: path");
|
||||
DESTROY(_path);
|
||||
GSWLogC("Dealloc GSWBundle: baseURL");
|
||||
DESTROY(_baseURL);
|
||||
GSWLogC("Dealloc GSWBundle: archiveCache");
|
||||
DESTROY(_archiveCache);
|
||||
GSWLogC("Dealloc GSWBundle: apiCache");
|
||||
DESTROY(_apiCache);
|
||||
GSWLogC("Dealloc GSWBundle: encodingCache");
|
||||
DESTROY(_encodingCache);
|
||||
GSWLogC("Dealloc GSWBundle: templateParserTypeCache");
|
||||
DESTROY(_templateParserTypeCache);
|
||||
GSWLogC("Dealloc GSWBundle: pathCache");
|
||||
DESTROY(_pathCache);
|
||||
GSWLogC("Dealloc GSWBundle: urlCache");
|
||||
DESTROY(_urlCache);
|
||||
GSWLogC("Dealloc GSWBundle: stringsTableCache");
|
||||
DESTROY(_stringsTableCache);
|
||||
GSWLogC("Dealloc GSWBundle: stringsTableArrayCache");
|
||||
DESTROY(_stringsTableArrayCache);
|
||||
GSWLogC("Dealloc GSWBundle: templateCache");
|
||||
DESTROY(_templateCache);
|
||||
GSWLogC("Dealloc GSWBundle: classCache");
|
||||
DESTROY(_classCache);
|
||||
GSWLogC("Dealloc GSWBundle: selfLock");
|
||||
DESTROY(_selfLock);
|
||||
GSWLogC("Dealloc GSWBundle Super");
|
||||
|
||||
[super dealloc];
|
||||
GSWLogC("End Dealloc GSWBundle");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -174,77 +155,83 @@ RCS_ID("$Id$")
|
|||
-(NSString*)description
|
||||
{
|
||||
NSString* descr=nil;
|
||||
// GSWLogC("GSWBundle description A");
|
||||
// NSDebugMLLog(@"bundles",@"GSWBundle description Self=%p",self);
|
||||
|
||||
descr=[NSString stringWithFormat:@"<%s %p - ",
|
||||
object_getClassName(self),
|
||||
(void*)self];
|
||||
// GSWLogC("GSWBundle description B");
|
||||
|
||||
descr=[descr stringByAppendingFormat:@"path:[%@] ",
|
||||
_path];
|
||||
// GSWLogC("GSWBundle description C");
|
||||
|
||||
descr=[descr stringByAppendingFormat:@"baseURL:[%@] frameworkName:[%@]>",
|
||||
_baseURL,
|
||||
_frameworkName];
|
||||
// GSWLogC("GSWBundle description D");
|
||||
|
||||
return descr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)unlock
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"selfLockn=%d",_selfLockn);
|
||||
LoggedUnlock(_selfLock);
|
||||
#ifndef NDEBUG
|
||||
_selfLockn--;
|
||||
#endif
|
||||
NSDebugMLLog(@"bundles",@"selfLockn=%d",_selfLockn);
|
||||
LOGObjectFnStop();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)lock
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"selfLockn=%d",_selfLockn);
|
||||
LoggedLockBeforeDate(_selfLock,GSW_LOCK_LIMIT);
|
||||
#ifndef NDEBUG
|
||||
_selfLockn++;
|
||||
#endif
|
||||
NSDebugMLLog(@"bundles",@"selfLockn=%d",_selfLockn);
|
||||
LOGObjectFnStop();
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)clearCache
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
//TemplateCache clearr ?
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
DESTROY(_archiveCache);
|
||||
DESTROY(_apiCache);
|
||||
DESTROY(_encodingCache);
|
||||
DESTROY(_templateParserTypeCache);
|
||||
DESTROY(_pathCache);
|
||||
DESTROY(_urlCache);
|
||||
DESTROY(_stringsTableCache);
|
||||
DESTROY(_stringsTableArrayCache);
|
||||
DESTROY(_templateCache);
|
||||
DESTROY(_classCache);
|
||||
|
||||
_archiveCache=[NSMutableDictionary new];
|
||||
_apiCache=[NSMutableDictionary new];
|
||||
_encodingCache=[NSMutableDictionary new];
|
||||
_templateParserTypeCache=[NSMutableDictionary new];
|
||||
_pathCache=[NSMutableDictionary new];
|
||||
_urlCache=[NSMutableDictionary new];
|
||||
_stringsTableCache=[NSMutableDictionary new];
|
||||
_stringsTableArrayCache=[NSMutableDictionary new];
|
||||
_templateCache=[NSMutableDictionary new];
|
||||
_classCache=[NSMutableDictionary new];
|
||||
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)loadCache
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
}
|
||||
|
||||
|
||||
|
@ -267,15 +254,13 @@ RCS_ID("$Id$")
|
|||
NSFileManager* fileManager=nil;
|
||||
int languagesNb=0;
|
||||
BOOL exists=NO;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"type=%@",aType);
|
||||
|
||||
languagesNb=[someLanguages count];
|
||||
|
||||
fileManager=[NSFileManager defaultManager];
|
||||
NSAssert(fileManager,@"No fileManager");
|
||||
|
||||
fileName=[aName stringByAppendingPathExtension:aType];
|
||||
NSDebugMLLog(@"bundles",@"fileName=%@",fileName);
|
||||
|
||||
for(languageIndex=0;!resource && !path && languageIndex<=languagesNb;languageIndex++)
|
||||
{
|
||||
|
@ -289,13 +274,12 @@ RCS_ID("$Id$")
|
|||
relativePath=[language stringByAppendingPathExtension:GSLanguageSuffix];
|
||||
relativePath=[relativePath stringByAppendingPathComponent:fileName];
|
||||
}
|
||||
NSDebugMLLog(@"bundles",@"language=%@",language);
|
||||
NSDebugMLLog(@"bundles",@"relativePath=%@",relativePath);
|
||||
|
||||
absolutePath=[_path stringByAppendingPathComponent:relativePath];
|
||||
NSDebugMLLog(@"bundles",@"absolutePath=%@",absolutePath);
|
||||
|
||||
if ([[GSWApplication application] isCachingEnabled])
|
||||
resource=[aCache objectForKey:relativePath];
|
||||
NSDebugMLLog(@"bundles",@"resource=%@",resource);
|
||||
|
||||
if (resource==GSNotFoundMarker)
|
||||
{
|
||||
resource=nil;
|
||||
|
@ -305,7 +289,7 @@ RCS_ID("$Id$")
|
|||
else if (!resource)
|
||||
{
|
||||
exists=[fileManager fileExistsAtPath:absolutePath];
|
||||
NSDebugMLLog(@"bundles",@"%@ exists=%s",absolutePath,(exists ? "YES" : "NO"));
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
if ([[GSWApplication application] isCachingEnabled])
|
||||
|
@ -341,44 +325,35 @@ RCS_ID("$Id$")
|
|||
{
|
||||
//OK
|
||||
NSDictionary* archive=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"anObject:%@",anObject);
|
||||
NSDebugMLLog(@"bundles",@"aName:%@",aName);
|
||||
|
||||
//call application _isDynamicLoadingEnabled
|
||||
//call -- isTerminating
|
||||
//call -- isCachingEnabled
|
||||
//call -- isPageRefreshOnBacktrackEnabled//0
|
||||
archive=[self archiveNamed:aName];
|
||||
//Verify
|
||||
NSDebugMLLog(@"bundles",@"archive:%@",archive);
|
||||
|
||||
if (archive)
|
||||
[self initializeObject:anObject
|
||||
fromArchive:archive];
|
||||
LOGObjectFnStop();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)initializeObject:(id)anObject
|
||||
fromArchive:(NSDictionary*)anArchive
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"anObject:%@",anObject);
|
||||
NSDebugMLLog(@"bundles",@"anArchive:%@",anArchive);
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
/*
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
NSDictionary* userDictionary=[anArchive objectForKey:@"userDictionary"];
|
||||
NSDictionary* userAssociations=[anArchive objectForKey:@"userAssociations"];
|
||||
NSDictionary* defaultAssociations=[anArchive objectForKey:@"defaultAssociations"];
|
||||
NSDebugMLLog(@"bundles",@"userDictionary:%@",userDictionary);
|
||||
NSDebugMLLog(@"bundles",@"userAssociations:%@",userAssociations);
|
||||
NSDebugMLLog(@"bundles",@"defaultAssociations:%@",defaultAssociations);
|
||||
|
||||
userAssociations=[userAssociations dictionaryByReplacingStringsWithAssociations];
|
||||
NSDebugMLLog(@"bundles",@"userAssociations:%@",userAssociations);
|
||||
defaultAssociations=[defaultAssociations dictionaryByReplacingStringsWithAssociations];
|
||||
NSDebugMLLog(@"bundles",@"defaultAssociations:%@",defaultAssociations);
|
||||
if (userDictionary && [anObject respondsToSelector:@selector(setUserDictionary:)])
|
||||
[anObject setUserDictionary:userDictionary];
|
||||
if (userAssociations && [anObject respondsToSelector:@selector(setUserAssociations:)])
|
||||
|
@ -386,54 +361,8 @@ RCS_ID("$Id$")
|
|||
if (defaultAssociations && [anObject respondsToSelector:@selector(setDefaultAssociations:)])
|
||||
[anObject setDefaultAssociations:defaultAssociations];
|
||||
}
|
||||
#if 0 //HAVE_GDL2 // GDL2 implementation
|
||||
{
|
||||
NSKeyedUnarchiver* unarchiver=nil;
|
||||
GSWBundleUnarchiverDelegate* bundleDelegate=nil;
|
||||
NSDictionary* variables=nil;
|
||||
NSEnumerator* variablesEnum=nil;
|
||||
id variableName=nil;
|
||||
NSDebugMLLog(@"bundles",@"anArchive %p:%@",anArchive,anArchive);
|
||||
unarchiver=[[[EOKeyValueUnarchiver alloc] initWithDictionary:anArchive]
|
||||
autorelease];
|
||||
NSDebugMLLog(@"bundles",@"unarchiver %p:%@",unarchiver,unarchiver);
|
||||
bundleDelegate=[[[GSWBundleUnarchiverDelegate alloc] initWithObject:anObject]
|
||||
autorelease];
|
||||
NSDebugMLLog(@"bundles",@"bundleDelegate %p:%@",bundleDelegate,bundleDelegate);
|
||||
[unarchiver setDelegate:bundleDelegate];
|
||||
NSDebugMLLog(@"bundles",@"decodevar here=%p",[NSString string]);
|
||||
variables=[unarchiver decodeObjectForKey:@"variables"];
|
||||
NSDebugMLLog(@"bundles",@"variables %p:%@",variables,variables);
|
||||
[unarchiver finishInitializationOfObjects];
|
||||
NSDebugMLLog(@"bundles",@"here=%p",[NSString string]);
|
||||
[unarchiver awakeObjects];
|
||||
variablesEnum=[variables keyEnumerator];
|
||||
NSDebugMLLog(@"bundles",@"here=%p",[NSString string]);
|
||||
NSDebugMLLog0(@"bundles",@"Will set variables");
|
||||
while ((variableName = [variablesEnum nextObject]))
|
||||
{
|
||||
id variableValue=[variables objectForKey:variableName];
|
||||
NSDebugMLLog(@"bundles",@"ObjectClas=%@ variableName %p:%@ variableValue %p:%@",
|
||||
[anObject class],
|
||||
variableName,
|
||||
variableName,
|
||||
variableValue,
|
||||
variableValue);
|
||||
NSDebugMLLog(@"bundles",@"BEF variableValue %p:%@ [RC=%d]",
|
||||
variableValue,
|
||||
variableValue,
|
||||
[variableValue retainCount]);
|
||||
[anObject smartTakeValue:variableValue
|
||||
forKey:variableName];
|
||||
NSDebugMLLog(@"bundles",@"AFT variableValue %p:%@ [RC=%d]",
|
||||
variableValue,
|
||||
variableValue,
|
||||
[variableValue retainCount]);
|
||||
}
|
||||
}
|
||||
#else
|
||||
LOGObjectFnNotImplemented();
|
||||
#endif
|
||||
[self notImplemented: _cmd];
|
||||
*/
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
|
@ -451,7 +380,6 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -461,9 +389,7 @@ RCS_ID("$Id$")
|
|||
//OK
|
||||
Class aClass=nil;
|
||||
NSString* pathName=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"Name=%@",aName);
|
||||
NSDebugMLLog(@"bundles",@"aSuperclassName=%@",aSuperclassName);
|
||||
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -478,15 +404,13 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
|
||||
return aClass;
|
||||
}
|
||||
|
||||
|
@ -495,7 +419,7 @@ RCS_ID("$Id$")
|
|||
pathName:(NSString*)aPathName
|
||||
superclassName:(NSString*)aSuperclassName
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
@ -524,7 +448,7 @@ RCS_ID("$Id$")
|
|||
-(Class)compiledClassWithName:(NSString*)aName
|
||||
superclassName:(NSString*)aSuperclassName
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
@ -542,8 +466,6 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
|
@ -576,9 +498,9 @@ RCS_ID("$Id$")
|
|||
{
|
||||
if (!relativeTemplatePath)
|
||||
{
|
||||
NSDebugMLLog(@"errors",@"No template named:%@ for languages:%@",
|
||||
aName,
|
||||
someLanguages);
|
||||
// NSDebugMLLog(@"errors",@"No template named:%@ for languages:%@",
|
||||
// aName,
|
||||
// someLanguages);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -588,12 +510,12 @@ RCS_ID("$Id$")
|
|||
NSString* htmlString=[NSString stringWithContentsOfFile:absoluteTemplatePath
|
||||
encoding:encoding];
|
||||
//NSString* htmlString=[NSString stringWithContentsOfFile:absoluteTemplatePath];
|
||||
NSDebugMLLog(@"bundles",@"htmlPath=%@",absoluteTemplatePath);
|
||||
|
||||
if (!htmlString)
|
||||
{
|
||||
NSDebugMLLog(@"errors",@"No html file for template named:%@ for languages:%@",
|
||||
aName,
|
||||
someLanguages);
|
||||
// NSDebugMLLog(@"errors",@"No html file for template named:%@ for languages:%@",
|
||||
// aName,
|
||||
// someLanguages);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -604,8 +526,7 @@ RCS_ID("$Id$")
|
|||
usingCache:nil
|
||||
relativePath:NULL
|
||||
absolutePath:&absoluteDefinitionPath];
|
||||
NSDebugMLLog(@"bundles",@"absoluteDefinitionPath=%@",
|
||||
absoluteDefinitionPath);
|
||||
|
||||
if (!pageDefString && !absoluteDefinitionPath)
|
||||
{
|
||||
pageDefString=[self lockedResourceNamed:aName
|
||||
|
@ -614,15 +535,11 @@ RCS_ID("$Id$")
|
|||
usingCache:nil
|
||||
relativePath:NULL
|
||||
absolutePath:&absoluteDefinitionPath];
|
||||
NSDebugMLLog(@"bundles",@"absoluteDefinitionPath=%@",
|
||||
absoluteDefinitionPath);
|
||||
}
|
||||
|
||||
if (absoluteDefinitionPath)
|
||||
{
|
||||
//TODO use encoding !
|
||||
NSDebugMLLog(@"bundles",@"absoluteDefinitionPath=%@",
|
||||
absoluteDefinitionPath);
|
||||
//pageDefString=[NSString stringWithContentsOfFile:absoluteDefinitionPath];
|
||||
pageDefString = [NSString stringWithContentsOfFile:absoluteDefinitionPath
|
||||
encoding:encoding];
|
||||
|
@ -632,8 +549,6 @@ RCS_ID("$Id$")
|
|||
NS_DURING
|
||||
#endif
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"GSWTemplateParser on template named %@",
|
||||
aName);
|
||||
template=[GSWTemplateParser templateNamed:aName
|
||||
inFrameworkNamed:[self frameworkName]
|
||||
withParserType:templateParserType
|
||||
|
@ -648,11 +563,6 @@ RCS_ID("$Id$")
|
|||
#ifndef NDEBUG
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,
|
||||
[localException reason],
|
||||
__FILE__,
|
||||
__LINE__);
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"In template Parsing");
|
||||
[localException raise];
|
||||
|
@ -687,18 +597,14 @@ RCS_ID("$Id$")
|
|||
{
|
||||
NSDictionary* stringsTable=nil;
|
||||
NSString* string=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"AKey=%@",aKey);
|
||||
NSDebugMLLog(@"bundles",@"aName=%@",aName);
|
||||
NSDebugMLLog(@"bundles",@"SomeLanguages=%@",someLanguages);
|
||||
NSDebugMLLog(@"bundles",@"defaultValue_=%@",defaultValue);
|
||||
|
||||
stringsTable=[self stringsTableNamed:aName
|
||||
withLanguages:someLanguages];
|
||||
if (stringsTable)
|
||||
string=[stringsTable objectForKey:aKey];
|
||||
if (!string)
|
||||
string=defaultValue;
|
||||
LOGObjectFnStop();
|
||||
|
||||
return string;
|
||||
}
|
||||
|
||||
|
@ -708,15 +614,13 @@ RCS_ID("$Id$")
|
|||
withLanguages:(NSArray*)someLanguages
|
||||
{
|
||||
NSDictionary* stringsTable=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"aName=%@",aName);
|
||||
NSDebugMLLog(@"bundles",@"SomeLanguages=%@",someLanguages);
|
||||
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
NSString* relativePath=nil;
|
||||
NSString* absolutePath=nil;
|
||||
LOGObjectFnStart();
|
||||
|
||||
stringsTable=[self lockedResourceNamed:aName
|
||||
ofType:GSWStringTableSuffix
|
||||
withLanguages:someLanguages
|
||||
|
@ -735,8 +639,8 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGSeriousError(@"Failed to parse strings file %@ - %@",
|
||||
absolutePath, localException);
|
||||
// LOGSeriousError(@"Failed to parse strings file %@ - %@",
|
||||
// absolutePath, localException);
|
||||
stringsTable = nil;
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
|
@ -754,15 +658,13 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
|
||||
return stringsTable;
|
||||
}
|
||||
|
||||
|
@ -772,15 +674,13 @@ RCS_ID("$Id$")
|
|||
withLanguages:(NSArray*)someLanguages
|
||||
{
|
||||
NSArray* stringsTableArray=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"aName=%@",aName);
|
||||
NSDebugMLLog(@"bundles",@"SomeLanguages=%@",someLanguages);
|
||||
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
NSString* relativePath=nil;
|
||||
NSString* absolutePath=nil;
|
||||
LOGObjectFnStart();
|
||||
|
||||
stringsTableArray=[self lockedResourceNamed:aName
|
||||
ofType:GSWStringTableArraySuffix
|
||||
withLanguages:someLanguages
|
||||
|
@ -795,9 +695,9 @@ RCS_ID("$Id$")
|
|||
stringsTableArray=[NSArray arrayWithContentsOfFile:absolutePath];
|
||||
if (!stringsTableArray)
|
||||
{
|
||||
LOGSeriousError(@"Bad stringTableArray \n%@\n from file %@",
|
||||
[NSString stringWithContentsOfFile:absolutePath],
|
||||
absolutePath);
|
||||
// LOGSeriousError(@"Bad stringTableArray \n%@\n from file %@",
|
||||
// [NSString stringWithContentsOfFile:absolutePath],
|
||||
// absolutePath);
|
||||
}
|
||||
if ([[GSWApplication application] isCachingEnabled])
|
||||
{
|
||||
|
@ -815,14 +715,13 @@ RCS_ID("$Id$")
|
|||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"During stringsTableArrayNamed:withLanguages:");
|
||||
LOGException(@"exception=%@",localException);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
|
||||
return stringsTableArray;
|
||||
}
|
||||
|
||||
|
@ -834,7 +733,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
BOOL isUsingWebServer=NO;
|
||||
NSString* url=nil;
|
||||
LOGObjectFnStart();
|
||||
|
||||
isUsingWebServer=[aRequest _isUsingWebServer];
|
||||
[self lock];
|
||||
NS_DURING
|
||||
|
@ -843,8 +742,6 @@ RCS_ID("$Id$")
|
|||
NSString* absolutePath=nil;
|
||||
NSString* baseURL=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
// baseURL have / prefix, relativePath don't
|
||||
baseURL=[self lockedResourceNamed:aName
|
||||
ofType:aType
|
||||
|
@ -883,15 +780,13 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
|
@ -901,7 +796,7 @@ RCS_ID("$Id$")
|
|||
languages:(NSArray*)someLanguages
|
||||
{
|
||||
NSString* absolutePath=nil;
|
||||
LOGObjectFnStart();
|
||||
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -925,8 +820,6 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
|
@ -943,13 +836,10 @@ RCS_ID("$Id$")
|
|||
NSDictionary* archive=nil;
|
||||
NSStringEncoding encoding=[GSWMessage defaultEncoding]; // safer, because we may not have a .woo file
|
||||
id encodingObject=nil;
|
||||
LOGObjectFnStart();
|
||||
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"aName=%@",aName);
|
||||
NSDebugMLLog(@"bundles",@"encodingCache=%@",_encodingCache);
|
||||
NSDebugMLLog(@"bundles",@"archiveCache=%@",_archiveCache);
|
||||
encodingObject=[_encodingCache objectForKey:aName];
|
||||
if (!encodingObject)
|
||||
{
|
||||
|
@ -974,15 +864,13 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
|
||||
return encoding;
|
||||
}
|
||||
|
||||
|
@ -992,13 +880,10 @@ RCS_ID("$Id$")
|
|||
NSDictionary* archive=nil;
|
||||
GSWTemplateParserType templateParserType=GSWTemplateParserType_Default;
|
||||
id templateParserTypeObject=nil;
|
||||
LOGObjectFnStart();
|
||||
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"aName=%@",aName);
|
||||
NSDebugMLLog(@"bundles",@"templateParserTypeCache=%@",_templateParserTypeCache);
|
||||
NSDebugMLLog(@"bundles",@"archiveCache=%@",_archiveCache);
|
||||
templateParserTypeObject=[_templateParserTypeCache objectForKey:aName];
|
||||
if (!templateParserTypeObject)
|
||||
{
|
||||
|
@ -1019,15 +904,13 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
|
||||
return templateParserType;
|
||||
}
|
||||
|
||||
|
@ -1036,26 +919,21 @@ RCS_ID("$Id$")
|
|||
{
|
||||
//OK
|
||||
NSDictionary* archive=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"aName=%@",aName);
|
||||
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
archive=[self lockedArchiveNamed:aName];
|
||||
NSDebugMLLog(@"bundles",@"archive=%@",archive);
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
NSDebugMLLog(@"bundles",@"archive=%@",archive);
|
||||
LOGObjectFnStop();
|
||||
|
||||
return archive;
|
||||
}
|
||||
|
||||
|
@ -1066,25 +944,22 @@ RCS_ID("$Id$")
|
|||
NSDictionary* archive=nil;
|
||||
NSString* relativePath=nil;
|
||||
NSString* absolutePath=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"search=%@.%@",aName,GSWArchiveSuffix[GSWebNamingConv]);
|
||||
|
||||
archive=[self lockedResourceNamed:aName
|
||||
ofType:GSWArchiveSuffix[GSWebNamingConv]
|
||||
withLanguages:nil
|
||||
usingCache:_archiveCache
|
||||
relativePath:&relativePath
|
||||
absolutePath:&absolutePath];
|
||||
NSDebugMLLog(@"bundles",@"archive=%p absolutePath=%@",archive,absolutePath);
|
||||
|
||||
if (!archive && !absolutePath)
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"search=%@.%@",aName,GSWArchiveSuffix[GSWebNamingConvInversed]);
|
||||
archive=[self lockedResourceNamed:aName
|
||||
ofType:GSWArchiveSuffix[GSWebNamingConvInversed]
|
||||
withLanguages:nil
|
||||
usingCache:_archiveCache
|
||||
relativePath:&relativePath
|
||||
absolutePath:&absolutePath];
|
||||
NSDebugMLLog(@"bundles",@"archive=%p absolutePath=%@",archive,absolutePath);
|
||||
}
|
||||
if (!archive)
|
||||
{
|
||||
|
@ -1102,8 +977,7 @@ RCS_ID("$Id$")
|
|||
}
|
||||
}
|
||||
}
|
||||
NSDebugMLLog(@"bundles",@"archive=%@",archive);
|
||||
LOGObjectFnStop();
|
||||
|
||||
return archive;
|
||||
}
|
||||
|
||||
|
@ -1112,26 +986,21 @@ RCS_ID("$Id$")
|
|||
{
|
||||
//OK
|
||||
NSDictionary* api=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"aName=%@",aName);
|
||||
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
api=[self lockedApiNamed:aName];
|
||||
NSDebugMLLog(@"bundles",@"api=%@",api);
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
NSDebugMLLog(@"bundles",@"api=%@",api);
|
||||
LOGObjectFnStop();
|
||||
|
||||
return api;
|
||||
}
|
||||
|
||||
|
@ -1142,7 +1011,7 @@ RCS_ID("$Id$")
|
|||
NSDictionary* api=nil;
|
||||
NSString* relativePath=nil;
|
||||
NSString* absolutePath=nil;
|
||||
LOGObjectFnStart();
|
||||
|
||||
api=[self lockedResourceNamed:aName
|
||||
ofType:GSWAPISuffix
|
||||
withLanguages:nil
|
||||
|
@ -1165,8 +1034,7 @@ RCS_ID("$Id$")
|
|||
}
|
||||
}
|
||||
}
|
||||
NSDebugMLLog(@"bundles",@"api=%@",api);
|
||||
LOGObjectFnStop();
|
||||
|
||||
return api;
|
||||
}
|
||||
|
||||
|
@ -1174,14 +1042,14 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(id)scriptedClassNameFromClassName:(NSString*)aName
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)scriptPathNameFromScriptedClassName:(NSString*)aName
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
|
|
@ -59,8 +59,7 @@ static Class standardClass = Nil;
|
|||
template:(GSWElement*)templateElement
|
||||
{
|
||||
NSMutableDictionary* tmpAssociations=[NSMutableDictionary dictionaryWithDictionary:associations];
|
||||
LOGObjectFnStartC("GSWClientSideScript");
|
||||
NSDebugMLLog(@"gswdync",@"aName=%@ associations:%@ templateElement=%@",aName,associations,templateElement);
|
||||
|
||||
[tmpAssociations removeObjectForKey:scriptFile__Key];
|
||||
[tmpAssociations removeObjectForKey:scriptString__Key];
|
||||
[tmpAssociations removeObjectForKey:scriptSource__Key];
|
||||
|
@ -74,19 +73,19 @@ static Class standardClass = Nil;
|
|||
{
|
||||
_scriptFile = [[associations objectForKey:scriptFile__Key
|
||||
withDefaultObject:[_scriptFile autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWClientSideScript: scriptFile=%@",_scriptFile);
|
||||
|
||||
_scriptString = [[associations objectForKey:scriptString__Key
|
||||
withDefaultObject:[_scriptString autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWClientSideScript: scriptString=%@",_scriptString);
|
||||
|
||||
_scriptSource = [[associations objectForKey:scriptSource__Key
|
||||
withDefaultObject:[_scriptSource autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWClientSideScript: scriptSource=%@",_scriptSource);
|
||||
|
||||
_hideInComment = [[associations objectForKey:hideInComment__Key
|
||||
withDefaultObject:[_hideInComment autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWClientSideScript: hideInComment=%@",_hideInComment);
|
||||
|
||||
_language = [[associations objectForKey:language__Key
|
||||
withDefaultObject:[_language autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWClientSideScript: language=%@",_language);
|
||||
|
||||
};
|
||||
return self;
|
||||
};
|
||||
|
@ -116,7 +115,7 @@ static Class standardClass = Nil;
|
|||
BOOL hideInCommentValue=NO;
|
||||
id languageValue=nil;
|
||||
id scriptValue=nil;
|
||||
LOGObjectFnStartC("GSWClientSideScript");
|
||||
|
||||
GSWStartElement(aContext);
|
||||
GSWSaveAppendToResponseElementID(aContext);
|
||||
component=GSWContext_component(aContext);
|
||||
|
@ -206,7 +205,6 @@ static Class standardClass = Nil;
|
|||
@"Can't find script file '%@'",
|
||||
scriptFileName]
|
||||
userInfo:nil];
|
||||
LOGException(@"GSWClientSideScript exception=%@",exception);
|
||||
[exception raise];
|
||||
};
|
||||
}
|
||||
|
@ -222,7 +220,6 @@ static Class standardClass = Nil;
|
|||
};
|
||||
GSWResponse_appendContentAsciiString(aResponse,@"</SCRIPT>");
|
||||
GSWStopElement(aContext);
|
||||
LOGObjectFnStopC("GSWClientSideScript");
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
@ -37,6 +37,8 @@ RCS_ID("$Id$")
|
|||
#include "GSWeb.h"
|
||||
|
||||
#include "GSWPrivate.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
#include <GNUstepBase/NSString+GNUstepBase.h>
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWComponent
|
||||
|
@ -277,7 +279,7 @@ static Class GSWHTMLBareStringClass = Nil;
|
|||
|
||||
-(NSString*)baseURL
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
@ -866,7 +868,6 @@ static Class GSWHTMLBareStringClass = Nil;
|
|||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"In sleepInContext:");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
|
@ -1239,7 +1240,7 @@ Call this method before using a component which was cached in a variable.
|
|||
//--------------------------------------------------------------------
|
||||
-(void)_debugWithString:(NSString*)string
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
/* Seems there's a problem with patches... Why this code is here ?
|
||||
if (![self context])
|
||||
{
|
||||
|
@ -1254,14 +1255,13 @@ Call this method before using a component which was cached in a variable.
|
|||
[self awakeInContext:aContext];
|
||||
}
|
||||
}
|
||||
LOGObjectFnStop();
|
||||
*/
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)debugWithFormat:(NSString*)aFormat,...
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -1277,7 +1277,7 @@ Call this method before using a component which was cached in a variable.
|
|||
|
||||
-(NSString*)_uniqueID
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
@ -1338,9 +1338,7 @@ Call this method before using a component which was cached in a variable.
|
|||
NSLog(@"localException is %@", localException);
|
||||
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"in GSWComponent -_generateResponseInContext:");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
|
||||
@"in GSWComponent -_generateResponseInContext:");
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
|
@ -1501,7 +1499,7 @@ Call this method before using a component which was cached in a variable.
|
|||
-(NSString*)_urlForResourceNamed:(NSString*)aName
|
||||
ofType:(NSString*)type
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
@ -1649,13 +1647,12 @@ Call this method before using a component which was cached in a variable.
|
|||
-(NSString*)descriptionForResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
return _name;
|
||||
}
|
||||
|
||||
+(void)_registerObserver:(id)observer
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
}
|
||||
|
||||
-(void)validateAPIAssociations
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
**/
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
//====================================================================
|
||||
|
||||
|
@ -368,7 +369,6 @@ static GSWContext * TheTemporaryContext;
|
|||
}
|
||||
localException=[localException exceptionByAddingUserInfoFrameInfoFormat:@"In %s",
|
||||
__PRETTY_FUNCTION__];
|
||||
LOGException(@"exception=%@",localException);
|
||||
[localException raise];
|
||||
NS_ENDHANDLER;
|
||||
|
||||
|
@ -446,7 +446,6 @@ static GSWContext * TheTemporaryContext;
|
|||
|
||||
localException=[localException exceptionByAddingUserInfoFrameInfoFormat:@"In %s",
|
||||
__PRETTY_FUNCTION__];
|
||||
LOGException(@"exception=%@",localException);
|
||||
if (_lockInstancePool && locked) {
|
||||
[_instancePoolLock unlock];
|
||||
}
|
||||
|
@ -513,11 +512,9 @@ static GSWContext * TheTemporaryContext;
|
|||
{
|
||||
//OK
|
||||
GSWComponentReference* componentReference=nil;
|
||||
LOGObjectFnStart();
|
||||
componentReference=[[[GSWComponentReference alloc]initWithName:_name
|
||||
associations:associations
|
||||
template:template] autorelease];
|
||||
LOGObjectFnStop();
|
||||
return componentReference;
|
||||
};
|
||||
|
||||
|
@ -546,37 +543,37 @@ static GSWContext * TheTemporaryContext;
|
|||
//--------------------------------------------------------------------
|
||||
-(void)_notifyObserversForDyingComponent:(GSWComponent*)aComponent
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_awakeObserversForComponent:(GSWComponent*)aComponent
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_deallocForComponent:(GSWComponent*)aComponent
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_awakeForComponent:(GSWComponent*)aComponent
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_registerObserver:(id)observer
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(void)_registerObserver:(id)observer
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
- (GSWElement *) template
|
||||
|
@ -612,20 +609,20 @@ static GSWContext * TheTemporaryContext;
|
|||
|
||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
NSLog(@"%s is not imlemented", __PRETTY_FUNCTION__);
|
||||
[self notImplemented: _cmd];
|
||||
return;
|
||||
}
|
||||
|
||||
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||
{
|
||||
NSLog(@"%s is not imlemented", __PRETTY_FUNCTION__);
|
||||
[self notImplemented: _cmd];
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id) copyWithZone: (NSZone*)z
|
||||
{
|
||||
|
||||
NSLog(@"%s is not imlemented", __PRETTY_FUNCTION__);
|
||||
[self notImplemented: _cmd];
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@ RCS_ID("$Id$")
|
|||
-(id)initWithName:(NSString*)aName
|
||||
associations:(NSDictionary*)associations
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if ((self==[super initWithName:aName
|
||||
associations:associations
|
||||
template:nil])) {
|
||||
|
@ -181,7 +180,6 @@ RCS_ID("$Id$")
|
|||
|
||||
return element;
|
||||
|
||||
// LOGObjectFnStart();
|
||||
//
|
||||
// GSWStartElement(aContext);
|
||||
// GSWAssertCorrectElementID(aContext);
|
||||
|
@ -214,7 +212,6 @@ RCS_ID("$Id$")
|
|||
// GSWStopElement(aContext);
|
||||
// GSWAssertDebugElementIDsCount(aContext);
|
||||
//
|
||||
// LOGObjectFnStop();
|
||||
|
||||
// return element;
|
||||
};
|
||||
|
@ -228,7 +225,6 @@ RCS_ID("$Id$")
|
|||
GSWComponent* componentPrev=nil;
|
||||
GSWDeclareDebugElementIDsCount(aContext);
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
GSWStartElement(aContext);
|
||||
GSWAssertCorrectElementID(aContext);
|
||||
|
@ -248,7 +244,6 @@ RCS_ID("$Id$")
|
|||
GSWStopElement(aContext);
|
||||
GSWAssertDebugElementIDsCount(aContext);
|
||||
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
@end
|
||||
|
|
|
@ -50,12 +50,8 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
GSWLogMemC("GSWConstantValueAssociation start of dealloc");
|
||||
GSWLogAssertGood(self);
|
||||
DESTROY(_value);
|
||||
GSWLogMemC("value deallocated");
|
||||
[super dealloc];
|
||||
GSWLogMemC("GSWConstantValueAssociation end of dealloc");
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -108,11 +104,7 @@ RCS_ID("$Id$")
|
|||
-(NSString*)description
|
||||
{
|
||||
NSString* dscr=nil;
|
||||
GSWLogAssertGood(self);
|
||||
if (_value)
|
||||
{
|
||||
GSWLogAssertGood(_value);
|
||||
};
|
||||
|
||||
dscr=[NSString stringWithFormat:@"<%s %p - value=%@ (class: %@)>",
|
||||
object_getClassName(self),
|
||||
(void*)self,
|
||||
|
|
|
@ -34,6 +34,7 @@ RCS_ID("$Id$")
|
|||
|
||||
#include "GSWeb.h"
|
||||
#include "GSWPrivate.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
static int dontTraceComponentActionURL=0;
|
||||
|
||||
|
@ -2055,7 +2056,7 @@ If none, try request languages
|
|||
// return http://my.host.org/cgi-bin/GSWeb/MyApp.ApplicationSuffix/123456789012334567890123456789
|
||||
-(NSString*)urlSessionPrefix
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
|
||||
return [NSString stringWithFormat:@"%@%@/%@.%@/%@",
|
||||
[_request urlProtocolHostPort],
|
||||
|
|
|
@ -86,7 +86,6 @@ RCS_ID("$Id$")
|
|||
expires:(NSDate*)anExpireDate
|
||||
isSecure:(BOOL)isSecureFlag
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if ((self=[self init]))
|
||||
{
|
||||
NSDebugMLLog(@"low",@"aName:%@",aName);
|
||||
|
@ -102,7 +101,6 @@ RCS_ID("$Id$")
|
|||
[self setExpires:anExpireDate];
|
||||
[self setIsSecure:isSecureFlag];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
|
@ -193,7 +191,6 @@ RCS_ID("$Id$")
|
|||
domainString,
|
||||
(_isSecure ? @" secure;" : @"")];
|
||||
NSDebugMLLog(@"low",@"header=%@",header);
|
||||
LOGObjectFnStop();
|
||||
return header;
|
||||
};
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#ifndef _GSWebDebug_h__
|
||||
#define _GSWebDebug_h__
|
||||
|
||||
#if 0 // If somebody needs this please send patches to make it work
|
||||
|
||||
#ifdef DEBUG
|
||||
GSWEB_EXPORT NSString *
|
||||
GSWDebugMethodMsg(id obj, SEL sel, const char *file, int line, NSString *fmt);
|
||||
|
@ -805,4 +807,6 @@ GSWLogAssertGoodFn(CONST char* file,int line,id object);
|
|||
#define NSDebugLockMLogCond(cond, format, args...) {}
|
||||
#endif
|
||||
|
||||
#endif // 0
|
||||
|
||||
#endif // _GSWebDebug_h__
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
</license>
|
||||
**/
|
||||
|
||||
#if 0 // If somebody needs this please send patches to make it work
|
||||
|
||||
#include "config.h"
|
||||
|
||||
RCS_ID("$Id$")
|
||||
|
@ -35,6 +37,9 @@ RCS_ID("$Id$")
|
|||
#include "GSWDebug.h"
|
||||
#include <Foundation/NSThread.h>
|
||||
#include <Foundation/NSAutoreleasePool.h>
|
||||
#include <GNUstepBase/NSThread+GNUstepBase.h>
|
||||
#include <GNUstepBase/GSObjCRuntime.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#define USTART NSAutoreleasePool* arp=[NSAutoreleasePool new];
|
||||
|
@ -47,7 +52,7 @@ NSString* GSWDebugMethodMsg(id obj, SEL sel, const char *file, int line, NSStrin
|
|||
Class cls = (Class)obj;
|
||||
char c = '+';
|
||||
|
||||
if ([obj isInstance] == YES)
|
||||
if (GSObjCIsInstance(obj) == YES)
|
||||
{
|
||||
c = '-';
|
||||
cls = [obj class];
|
||||
|
@ -61,7 +66,7 @@ NSString* GSWDebugMethodMsg(id obj, SEL sel, const char *file, int line, NSStrin
|
|||
void GSWLogC_(CONST char* file,int line,CONST char* string)
|
||||
{
|
||||
int len=0;
|
||||
const char *thread=[[GSCurrentThread() description] cString];
|
||||
const char *thread=[[GSCurrentThread() description] cStringUsingEncoding:NSASCIIStringEncoding];
|
||||
|
||||
fprintf(stderr,"%s (%d) ", thread, (int)getpid());
|
||||
fprintf(stderr,"File %s: %d. ",file,line);
|
||||
|
@ -386,3 +391,4 @@ void GSWLogAssertGoodFn(CONST char* file,int line,id object)
|
|||
};
|
||||
};
|
||||
#endif
|
||||
#endif // 0
|
||||
|
|
|
@ -38,6 +38,9 @@ RCS_ID("$Id$")
|
|||
|
||||
#include "GSWDeclarationParser.h"
|
||||
#include <GNUstepBase/Unicode.h>
|
||||
#include <GNUstepBase/GSObjCRuntime.h>
|
||||
#include <GNUstepBase/NSString+GNUstepBase.h>
|
||||
#include <GNUstepBase/NSData+GNUstepBase.h>
|
||||
|
||||
static inline BOOL _parserIsIdentifierChar(unichar c)
|
||||
{
|
||||
|
@ -429,7 +432,6 @@ inline GSWDeclaration* parseDeclaration(GSWDeclarationParser* parser)
|
|||
{
|
||||
NSData* md5=nil;
|
||||
NSDictionary* declarations=nil;
|
||||
LOGObjectFnStart();
|
||||
|
||||
if (_declarations)
|
||||
[_declarations removeAllObjects];
|
||||
|
@ -512,8 +514,6 @@ inline GSWDeclaration* parseDeclaration(GSWDeclarationParser* parser)
|
|||
forKey:md5];
|
||||
};
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return declarations;
|
||||
}
|
||||
|
||||
|
@ -521,14 +521,11 @@ inline GSWDeclaration* parseDeclaration(GSWDeclarationParser* parser)
|
|||
-(NSDictionary*)parseDeclarationString:(NSString*)declarationString
|
||||
{
|
||||
NSDictionary* declarations=nil;
|
||||
LOGObjectFnStart();
|
||||
|
||||
declarations=[self parseDeclarationString:declarationString
|
||||
named:nil
|
||||
inFrameworkNamed:nil];
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return declarations;
|
||||
}
|
||||
|
||||
|
@ -1110,7 +1107,7 @@ Returns a NSNumber
|
|||
string=[NSString stringWithCharacters:_uniBuf+startIndex+1
|
||||
length:_index-startIndex-1];
|
||||
NSDebugMLog(@"string=%@",string);
|
||||
cString=[string cString];
|
||||
cString=[string cStringUsingEncoding:NSASCIIStringEncoding];
|
||||
intValue=strtol(cString,&endPtr,16);
|
||||
NSDebugMLog(@"cString='%s' endPtr='%s'",cString,endPtr);
|
||||
if (endPtr && *endPtr)
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "GSWeb.h"
|
||||
|
||||
#include "GSWWorkerThread.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
#ifndef GNUSTEP
|
||||
#include <GNUstepBase/NSFileHandle+GNUstepBase.h>
|
||||
|
@ -239,7 +240,7 @@ void _queueWorkOnHandle(NSFileHandle* handle, NSMutableArray* waitingThreadArray
|
|||
-(BOOL)doesBusyRunOnce
|
||||
{
|
||||
//call _runOnce
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return NO;
|
||||
};
|
||||
|
||||
|
@ -315,7 +316,7 @@ void _queueWorkOnHandle(NSFileHandle* handle, NSMutableArray* waitingThreadArray
|
|||
|
||||
-(id)announceBrokenConnection:(id)notification
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
NSDebugMLLog(@"trace",@"announceBrokenConnection");
|
||||
// [self shutDownConnectionWithSocket:[in_port _port_socket]];
|
||||
return self;
|
||||
|
@ -386,17 +387,17 @@ void _queueWorkOnHandle(NSFileHandle* handle, NSMutableArray* waitingThreadArray
|
|||
|
||||
-(void)stop
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
-(void)run
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
-(void)_runOnce
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
// WO 5:Use the user default WOListenQueueSize instead
|
||||
|
|
|
@ -34,6 +34,9 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/NSThread+GNUstepBase.h>
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWDeployedBundle
|
||||
|
@ -41,19 +44,11 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(id)initWithPath:(NSString*)aPath
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if ((self=[super init]))
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"aPath=%@",aPath);
|
||||
|
||||
ASSIGN(_bundlePath,[aPath stringGoodPath]);
|
||||
NSDebugMLLog(@"bundles",@"_bundlePath=%@",_bundlePath);
|
||||
|
||||
ASSIGN(_wrapperName,([_bundlePath lastPathComponent]));
|
||||
NSDebugMLLog(@"bundles",@"_wrapperName=%@",_wrapperName);
|
||||
|
||||
ASSIGN(_projectName,([_wrapperName stringByDeletingPathExtension]));
|
||||
NSDebugMLLog(@"bundles",@"_projectName=%@",_projectName);
|
||||
|
||||
_isFramework=[_bundlePath hasSuffix:GSFrameworkSuffix];//Ok ?
|
||||
|
||||
|
@ -65,50 +60,34 @@ RCS_ID("$Id$")
|
|||
#endif
|
||||
_selfLock=[NSRecursiveLock new];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
NSDebugFLog(@"Dealloc GSWDeployedBundle %p",(void*)self);
|
||||
DESTROY(_bundlePath);
|
||||
DESTROY(_wrapperName);
|
||||
DESTROY(_projectName);
|
||||
DESTROY(_relativePathsCache);
|
||||
DESTROY(_absolutePathsCache);
|
||||
DESTROY(_urlsCache);
|
||||
GSWLogC("Dealloc GSWDeployedBundle: selfLock");
|
||||
NSDebugFLog(@"selfLock=%p selfLockn=%d selfLock_thread_id=%@ "
|
||||
@"GSCurrentThread()=%@ creation_thread_id=%@",
|
||||
(void*)_selfLock,
|
||||
_selfLockn,
|
||||
_selfLock_thread_id,
|
||||
GSCurrentThread(),
|
||||
_creation_thread_id);
|
||||
fflush(stderr);
|
||||
DESTROY(_selfLock);
|
||||
GSWLogC("Dealloc GSWDeployedBundle Super");
|
||||
|
||||
[super dealloc];
|
||||
NSDebugFLog(@"End Dealloc GSWDeployedBundle %p",(void*)self);
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)description
|
||||
{
|
||||
NSString* descr=nil;
|
||||
// GSWLogC("GSWDeployedBundle description A");
|
||||
descr=[NSString stringWithFormat:@"<%s %p - ",
|
||||
object_getClassName(self),
|
||||
(void*)self];
|
||||
// GSWLogC("GSWDeployedBundle description B");
|
||||
descr=[descr stringByAppendingFormat:@"bundlePath:%@ ",
|
||||
_bundlePath];
|
||||
// GSWLogC("GSWDeployedBundle description C");
|
||||
descr=[descr stringByAppendingFormat:@"relativePathsCache=%p>",
|
||||
(void*)_relativePathsCache];
|
||||
// GSWLogC("GSWDeployedBundle description D");
|
||||
return descr;
|
||||
};
|
||||
|
||||
|
@ -119,15 +98,12 @@ RCS_ID("$Id$")
|
|||
NSString* projectName=nil;
|
||||
BOOL isFramework=NO;
|
||||
GSWDeployedBundle* projectBundle=nil;
|
||||
LOGObjectFnStart();
|
||||
projectName=[self projectName];
|
||||
NSDebugMLLog(@"bundles",@"projectName=%@",projectName);
|
||||
isFramework=[self isFramework];
|
||||
NSDebugMLLog(@"bundles",@"isFramework=%s",(isFramework ? "YES" : "NO"));
|
||||
|
||||
projectBundle=[GSWProjectBundle projectBundleForProjectNamed:projectName
|
||||
isFramework:isFramework];
|
||||
NSDebugMLLog(@"bundles",@"projectBundle=%@",projectBundle);
|
||||
LOGObjectFnStop();
|
||||
|
||||
return (GSWProjectBundle*)projectBundle;
|
||||
};
|
||||
|
||||
|
@ -140,16 +116,12 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(NSString*)wrapperName
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _wrapperName;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)projectName
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _projectName;
|
||||
};
|
||||
|
||||
|
@ -170,17 +142,14 @@ RCS_ID("$Id$")
|
|||
else
|
||||
urlPrefix = [GSWApplication applicationBaseURL];
|
||||
|
||||
NSDebugMLLog(@"bundles",@"urlPrefix=%@",urlPrefix);
|
||||
NSAssert([urlPrefix length]>0,@"No urlPrefix");
|
||||
|
||||
wrapperName=[self wrapperName];
|
||||
NSDebugMLLog(@"bundles",@"wrapperName=%@",wrapperName);
|
||||
NSAssert([wrapperName length]>0,@"No wrapperName");
|
||||
|
||||
if (urlPrefix && wrapperName)
|
||||
{
|
||||
urlPrefix=[urlPrefix stringByAppendingPathComponent:wrapperName];
|
||||
NSDebugMLLog(@"bundles",@"urlPrefix=%@",urlPrefix);
|
||||
};
|
||||
return urlPrefix;
|
||||
};
|
||||
|
@ -190,18 +159,13 @@ RCS_ID("$Id$")
|
|||
{
|
||||
//OK
|
||||
NSArray* paths=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"aType=%@",aType);
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
paths=[self lockedPathsForResourcesOfType:aType];
|
||||
NSDebugMLLog(@"bundles",@"paths=%@",paths);
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"EXCEPTION:%@ (%@)",
|
||||
localException,[localException reason]);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
|
@ -214,7 +178,7 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(NSArray*)lockedPathsForResourcesOfType:(NSString*)aType
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd];
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -224,19 +188,15 @@ RCS_ID("$Id$")
|
|||
{
|
||||
//OK
|
||||
NSString* path=nil;
|
||||
LOGObjectFnStart();
|
||||
[self lock];
|
||||
NSDebugMLLog(@"bundles",@"aName=%@ aLanguage=%@",aName,aLanguage);
|
||||
|
||||
NS_DURING
|
||||
{
|
||||
path=[self lockedRelativePathForResourceNamed:aName
|
||||
language:aLanguage];
|
||||
NSDebugMLLog(@"bundles",@"path=%@",path);
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"EXCEPTION:%@ (%@)",
|
||||
localException,[localException reason]);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
|
@ -251,8 +211,7 @@ RCS_ID("$Id$")
|
|||
languages:(NSArray*)someLanguages
|
||||
{
|
||||
NSString* path=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"aName=%@ someLanguages=%@",aName,someLanguages);
|
||||
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -262,15 +221,12 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"EXCEPTION:%@ (%@)",
|
||||
localException,[localException reason]);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
};
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
return path;
|
||||
};
|
||||
|
||||
|
@ -280,30 +236,23 @@ RCS_ID("$Id$")
|
|||
{
|
||||
//OK
|
||||
NSString* path=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"aName=%@ aLanguage=%@",aName,aLanguage);
|
||||
NSDebugMLLog(@"bundles",@"bundlePath=%@ Trying Resources/WebServer",_bundlePath);
|
||||
|
||||
path=[self lockedRelativePathForResourceNamed:aName
|
||||
inDirectory:@"Resources/WebServer"
|
||||
language:aLanguage];
|
||||
NSDebugMLLog(@"bundles",@"path=%@",path);
|
||||
|
||||
if (!path)
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"bundlePath=%@ Trying Resources",_bundlePath);
|
||||
path=[self lockedRelativePathForResourceNamed:aName
|
||||
inDirectory:@"Resources"
|
||||
language:aLanguage];
|
||||
NSDebugMLLog(@"bundles",@"path=%@",path);
|
||||
if (!path)
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"bundlePath=%@ Trying .",_bundlePath);
|
||||
path=[self lockedRelativePathForResourceNamed:aName
|
||||
inDirectory:@"."
|
||||
language:aLanguage];
|
||||
NSDebugMLLog(@"bundles",@"path=%@",path);
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return path;
|
||||
};
|
||||
|
||||
|
@ -313,30 +262,23 @@ RCS_ID("$Id$")
|
|||
{
|
||||
//OK
|
||||
NSString* path=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"aName=%@ someLanguages=%@",aName,someLanguages);
|
||||
NSDebugMLLog(@"bundles",@"bundlePath=%@ Trying Resources/WebServer",_bundlePath);
|
||||
|
||||
path=[self lockedRelativePathForResourceNamed:aName
|
||||
inDirectory:@"Resources/WebServer"
|
||||
languages:someLanguages];
|
||||
NSDebugMLLog(@"bundles",@"path=%@",path);
|
||||
|
||||
if (!path)
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"bundlePath=%@ Trying Resources",_bundlePath);
|
||||
path=[self lockedRelativePathForResourceNamed:aName
|
||||
inDirectory:@"Resources"
|
||||
languages:someLanguages];
|
||||
NSDebugMLLog(@"bundles",@"path=%@",path);
|
||||
if (!path)
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"bundlePath=%@ Trying .",_bundlePath);
|
||||
path=[self lockedRelativePathForResourceNamed:aName
|
||||
inDirectory:@"."
|
||||
languages:someLanguages];
|
||||
NSDebugMLLog(@"bundles",@"path=%@",path);
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return path;
|
||||
};
|
||||
|
||||
|
@ -347,8 +289,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
//OK
|
||||
NSString* path=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"aName=%@ aDirectory=%@ someLanguages=%@",aName,aDirectory,someLanguages);
|
||||
|
||||
if (someLanguages)
|
||||
{
|
||||
int i=0;
|
||||
|
@ -358,15 +299,12 @@ RCS_ID("$Id$")
|
|||
path=[self lockedCachedRelativePathForResourceNamed:aName
|
||||
inDirectory:aDirectory
|
||||
language:[someLanguages objectAtIndex:i]];
|
||||
NSDebugMLLog(@"bundles",@"path=%@",path);
|
||||
};
|
||||
};
|
||||
if (!path)
|
||||
path=[self lockedCachedRelativePathForResourceNamed:aName
|
||||
inDirectory:aDirectory
|
||||
language:nil];
|
||||
NSDebugMLLog(@"bundles",@"path=%@",path);
|
||||
LOGObjectFnStop();
|
||||
return path;
|
||||
};
|
||||
|
||||
|
@ -377,8 +315,6 @@ RCS_ID("$Id$")
|
|||
{
|
||||
//OK
|
||||
NSString* path=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"aName=%@ aDirectory=%@ aLanguage=%@",aName,aDirectory,aLanguage);
|
||||
if (aName)
|
||||
{
|
||||
NSAutoreleasePool* arp = [NSAutoreleasePool new];
|
||||
|
@ -386,8 +322,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
NSString* emptyString=@"";
|
||||
NSString* bundlePath=[self bundlePath];
|
||||
NSDebugMLLog(@"bundles",@"aName=%@ bundlePath=%@ aDirectory=%@ aLanguage=%@",
|
||||
aName,bundlePath,aDirectory,aLanguage);
|
||||
|
||||
if ([aDirectory isEqualToString:@"."])
|
||||
aDirectory=nil;
|
||||
if (aLanguage)
|
||||
|
@ -401,7 +336,7 @@ RCS_ID("$Id$")
|
|||
(bundlePath ? bundlePath : emptyString),
|
||||
(aDirectory ? aDirectory : emptyString),
|
||||
nil];
|
||||
NSDebugMLLog(@"bundles",@"path=%@",path);
|
||||
|
||||
if (path==GSNotFoundMarker)
|
||||
path=nil;
|
||||
else if (!path)
|
||||
|
@ -420,12 +355,9 @@ RCS_ID("$Id$")
|
|||
[aLanguage stringByAppendingString:GSLanguagePSuffix]];
|
||||
//NSDebugMLLog(@"bundles",@"pathTest=%@",pathTest);
|
||||
pathTest=[pathTest stringByAppendingPathComponent:aName];
|
||||
NSDebugMLLog(@"bundles",@"pathTest=%@",pathTest);
|
||||
completePathTest=[bundlePath stringByAppendingPathComponent:pathTest];
|
||||
NSDebugMLLog(@"bundles",@"completePathTest=%@",completePathTest);
|
||||
fileManager=[NSFileManager defaultManager];
|
||||
exists=[fileManager fileExistsAtPath:completePathTest];
|
||||
NSDebugMLLog(@"bundles",@"exists=%s",(exists ? "YES" : "NO"));
|
||||
#ifdef __APPLE__
|
||||
if(!exists)
|
||||
{
|
||||
|
@ -482,7 +414,6 @@ RCS_ID("$Id$")
|
|||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"lockedCachedRelativePathForResourceNamed:inDirectory:language:");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
RETAIN(localException);
|
||||
DESTROY(arp);
|
||||
AUTORELEASE(localException);
|
||||
|
@ -493,8 +424,6 @@ RCS_ID("$Id$")
|
|||
DESTROY(arp);
|
||||
AUTORELEASE(path);
|
||||
};
|
||||
NSDebugMLLog(@"bundles",@"path=%@",path);
|
||||
LOGObjectFnStop();
|
||||
return path;
|
||||
};
|
||||
|
||||
|
@ -505,13 +434,10 @@ RCS_ID("$Id$")
|
|||
{
|
||||
//OK
|
||||
NSString* path=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"aName=%@ aDirectory=%@ aLanguage=%@",
|
||||
aName,aDirectory,aLanguage);
|
||||
|
||||
path=[self lockedCachedRelativePathForResourceNamed:aName
|
||||
inDirectory:aDirectory
|
||||
language:aLanguage];
|
||||
LOGObjectFnStop();
|
||||
return path;
|
||||
};
|
||||
|
||||
|
@ -522,23 +448,16 @@ RCS_ID("$Id$")
|
|||
{
|
||||
NSString* url=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
NSDebugMLLog(@"bundles",@"aName=%@ someLanguages=%@",aName,someLanguages);
|
||||
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
NSString* relativePath=[self lockedRelativePathForResourceNamed:aName
|
||||
languages:someLanguages];
|
||||
NSDebugMLLog(@"bundles",@"relativePath=%@",relativePath);
|
||||
|
||||
url=[self lockedCachedURLForRelativePath:relativePath];
|
||||
NSDebugMLLog(@"bundles",@"url=%@",url);
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"EXCEPTION:%@ (%@)",
|
||||
localException,[localException reason]);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
|
@ -546,7 +465,6 @@ RCS_ID("$Id$")
|
|||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return url;
|
||||
};
|
||||
|
@ -557,7 +475,6 @@ if it was not cached **/
|
|||
{
|
||||
NSString* path=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
if (relativePath)
|
||||
{
|
||||
|
@ -573,7 +490,6 @@ if it was not cached **/
|
|||
}
|
||||
}
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return path;
|
||||
};
|
||||
|
@ -583,18 +499,14 @@ if it was not cached **/
|
|||
{
|
||||
NSString* path=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
path=[self lockedCachedAbsolutePathForRelativePath:relativePath];
|
||||
NSDebugMLLog(@"bundles",@"path=%@",path);
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"EXCEPTION:%@ (%@)",
|
||||
localException,[localException reason]);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
|
@ -602,7 +514,6 @@ if it was not cached **/
|
|||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return path;
|
||||
}
|
||||
|
@ -614,16 +525,12 @@ if it was not cached **/
|
|||
NSString* absolutePath=nil;
|
||||
NSString* relativePath=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
relativePath = [self relativePathForResourceNamed:aName
|
||||
languages:someLanguages];
|
||||
NSDebugMLLog(@"bundles",@"relativePath=%@",relativePath);
|
||||
|
||||
absolutePath=[self absolutePathForRelativePath:relativePath];
|
||||
NSDebugMLLog(@"bundles",@"absolutePath=%@",absolutePath);
|
||||
|
||||
LOGObjectFnStop();
|
||||
return absolutePath;
|
||||
}
|
||||
|
||||
|
@ -634,7 +541,6 @@ if it was not cached **/
|
|||
{
|
||||
NSString* url=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
if (relativePath)
|
||||
{
|
||||
|
@ -645,16 +551,13 @@ if it was not cached **/
|
|||
if (!url)
|
||||
{
|
||||
NSString* urlPrefix=[self bundleURLPrefix];
|
||||
NSDebugMLLog(@"bundles",@"urlPrefix=%@",urlPrefix);
|
||||
|
||||
url=[urlPrefix stringByAppendingPathComponent:relativePath];
|
||||
NSDebugMLLog(@"bundles",@"url=%@",url);
|
||||
|
||||
[_urlsCache setObject:url
|
||||
forKey:relativePath];
|
||||
};
|
||||
}
|
||||
LOGObjectFnStop();
|
||||
return url;
|
||||
};
|
||||
|
||||
|
@ -662,19 +565,11 @@ if it was not cached **/
|
|||
// lock
|
||||
-(void)lock
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",
|
||||
@"selfLock=%p selfLockn=%d selfLock_thread_id=%@ "
|
||||
@"GSCurrentThread()=%@",
|
||||
(void*)_selfLock,
|
||||
_selfLockn,
|
||||
_selfLock_thread_id,
|
||||
GSCurrentThread());
|
||||
if (_selfLockn>0)
|
||||
{
|
||||
if (_selfLock_thread_id!=GSCurrentThread())
|
||||
{
|
||||
NSDebugMLog0(@"PROBLEM: owner!=thread id");
|
||||
NSLog(@"PROBLEM: owner!=thread id");
|
||||
};
|
||||
};
|
||||
LoggedLockBeforeDate(_selfLock,GSW_LOCK_LIMIT);
|
||||
|
@ -682,33 +577,17 @@ if it was not cached **/
|
|||
_selfLockn++;
|
||||
_selfLock_thread_id=GSCurrentThread();
|
||||
#endif
|
||||
NSDebugMLLog(@"bundles",
|
||||
@"selfLock=%p selfLockn=%d selfLock_thread_id=%@ "
|
||||
@"GSCurrentThread()=%@",
|
||||
_selfLock,
|
||||
_selfLockn,
|
||||
_selfLock_thread_id,
|
||||
GSCurrentThread());
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// unlock
|
||||
-(void)unlock
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",
|
||||
@"selfLock=%p selfLockn=%d selfLock_thread_id=%@ "
|
||||
@"GSCurrentThread()=%@",
|
||||
(void*)_selfLock,
|
||||
_selfLockn,
|
||||
_selfLock_thread_id,
|
||||
GSCurrentThread());
|
||||
if (_selfLockn>0)
|
||||
{
|
||||
if (_selfLock_thread_id!=GSCurrentThread())
|
||||
{
|
||||
NSDebugMLog0(@"PROBLEM: owner!=thread id");
|
||||
NSLog(@"PROBLEM: owner!=thread id");
|
||||
};
|
||||
};
|
||||
LoggedUnlock(_selfLock);
|
||||
|
@ -717,14 +596,6 @@ if it was not cached **/
|
|||
if (_selfLockn==0)
|
||||
_selfLock_thread_id=NULL;
|
||||
#endif
|
||||
NSDebugMLLog(@"bundles",
|
||||
@"selfLock=%p selfLockn=%d selfLock_thread_id=%@ "
|
||||
@"GSCurrentThread()=%@",
|
||||
(void*)_selfLock,
|
||||
_selfLockn,
|
||||
_selfLock_thread_id,
|
||||
GSCurrentThread());
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
|
||||
|
@ -732,7 +603,6 @@ if it was not cached **/
|
|||
+(id)bundleWithPath:(NSString*)aPath
|
||||
{
|
||||
id bundle=nil;
|
||||
NSDebugMLLog(@"bundles",@"aPath=%@",aPath);
|
||||
bundle=[[[GSWDeployedBundle alloc]initWithPath:aPath]autorelease];
|
||||
return bundle;
|
||||
};
|
||||
|
|
|
@ -40,11 +40,9 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(id)initWithRequest:(GSWRequest*)aRequest
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if ((self=[super initWithRequest:aRequest]))
|
||||
{
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
|
@ -59,9 +57,8 @@ RCS_ID("$Id$")
|
|||
{
|
||||
id<GSWActionResults> actionResult=nil;
|
||||
SEL actionSel=NULL;
|
||||
LOGObjectFnStart();
|
||||
actionSel=[self _selectorForActionNamed:actionName];
|
||||
NSDebugMLLog(@"requests",@"actionSel=%p",(void*)actionSel);
|
||||
|
||||
if (!actionSel)
|
||||
{
|
||||
[NSException raise:NSInvalidArgumentException
|
||||
|
@ -73,16 +70,9 @@ RCS_ID("$Id$")
|
|||
NS_DURING
|
||||
{
|
||||
actionResult=[self performSelector:actionSel];
|
||||
NSDebugMLLog(@"requests",
|
||||
@"_actionResult=%@ class=%@",
|
||||
actionResult,
|
||||
[(NSObject*)actionResult class]);
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"%@ (%@)",
|
||||
localException,
|
||||
[localException reason]);
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo(localException,
|
||||
@"In performSelector: class: %@ actionName: %@",
|
||||
[self class],actionName);
|
||||
|
@ -90,7 +80,6 @@ RCS_ID("$Id$")
|
|||
};
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return actionResult;
|
||||
};
|
||||
|
||||
|
@ -98,9 +87,8 @@ RCS_ID("$Id$")
|
|||
-(NSString*)sessionIDForRequest:(GSWRequest*)aRequest
|
||||
{
|
||||
NSString* sessionID = nil;
|
||||
NSDebugMLog(@"aRequest=%@",aRequest);
|
||||
sessionID = [aRequest sessionIDFromValuesOrCookieByLookingForCookieFirst:NO];
|
||||
NSDebugMLog(@"sessionID=%@",sessionID);
|
||||
|
||||
return sessionID;
|
||||
}
|
||||
|
||||
|
@ -130,13 +118,14 @@ RCS_ID("$Id$")
|
|||
GSWRequest* request=[self request];
|
||||
if (request)
|
||||
{
|
||||
int count=[keyArray count];
|
||||
int i=0;
|
||||
NSUInteger count=[keyArray count];
|
||||
NSUInteger i=0;
|
||||
|
||||
for(i=0;i<count;i++)
|
||||
{
|
||||
NSString* key=[keyArray objectAtIndex:i];
|
||||
NSArray* v=[request formValuesForKey:key];
|
||||
[self takeValue:v
|
||||
[self setValue:v
|
||||
forKey:key];
|
||||
};
|
||||
}
|
||||
|
@ -148,13 +137,14 @@ RCS_ID("$Id$")
|
|||
GSWRequest* request=[self request];
|
||||
if (request)
|
||||
{
|
||||
int count=[keyArray count];
|
||||
int i=0;
|
||||
NSUInteger count=[keyArray count];
|
||||
NSUInteger i=0;
|
||||
|
||||
for(i=0;i<count;i++)
|
||||
{
|
||||
NSString* key=[keyArray objectAtIndex:i];
|
||||
id v=[request formValueForKey:key];
|
||||
[self takeValue:v
|
||||
[self setValue:v
|
||||
forKey:key];
|
||||
}
|
||||
};
|
||||
|
@ -173,7 +163,7 @@ RCS_ID("$Id$")
|
|||
while(key)
|
||||
{
|
||||
NSArray* v=[request formValuesForKey:key];
|
||||
[self takeValue:v
|
||||
[self setValue:v
|
||||
forKey:key];
|
||||
key = va_arg(ap,id);
|
||||
};
|
||||
|
@ -194,7 +184,7 @@ RCS_ID("$Id$")
|
|||
while(key)
|
||||
{
|
||||
id v=[request formValueForKey:key];
|
||||
[self takeValue:v
|
||||
[self setValue:v
|
||||
forKey:key];
|
||||
key = va_arg(ap,id);
|
||||
};
|
||||
|
|
|
@ -164,11 +164,9 @@ RCS_ID("$Id$")
|
|||
{
|
||||
NSArray* requestHandlerPathArray=nil;
|
||||
NSArray* additionalRequestPathArray=nil;
|
||||
LOGObjectFnStart();
|
||||
requestHandlerPathArray=[aRequest requestHandlerPathArray];
|
||||
if ([requestHandlerPathArray count]>2)
|
||||
additionalRequestPathArray=[requestHandlerPathArray subarrayWithRange:NSMakeRange(2,[requestHandlerPathArray count]-2)];
|
||||
LOGObjectFnStart();
|
||||
return additionalRequestPathArray;
|
||||
};
|
||||
|
||||
|
|
|
@ -60,15 +60,15 @@
|
|||
|
||||
-(id)init;
|
||||
-(id)initWithCharactersNoCopy:(unichar*)chars
|
||||
length:(unsigned int)length
|
||||
length:(NSUInteger)length
|
||||
freeWhenDone:(BOOL)flag;
|
||||
-(id)initWithCharacters:(const unichar*)chars
|
||||
length:(unsigned int)length;
|
||||
length:(NSUInteger)length;
|
||||
-(id)initWithCStringNoCopy:(char*)byteString
|
||||
length:(unsigned int)length
|
||||
length:(NSUInteger)length
|
||||
freeWhenDone:(BOOL)flag;
|
||||
-(id)initWithCString:(const char*)byteString
|
||||
length:(unsigned int)length;
|
||||
length:(NSUInteger)length;
|
||||
-(id)initWithCString:(const char*)byteString;
|
||||
-(id)initWithString:(NSString*)string;
|
||||
-(id)initWithFormat:(NSString*)format,...;
|
||||
|
@ -111,7 +111,6 @@
|
|||
-(NSString*)urlPortString;//NDFN
|
||||
-(int)urlPort;//NDFN
|
||||
-(NSString*)urlProtocolHostPort;//NDFN
|
||||
-(void)checkURL;
|
||||
|
||||
-(void)setURLRequestHandlerPath:(NSString*)aString;
|
||||
// 5.0 also in 4.5?
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
#include <GNUstepBase/NSString+GNUstepBase.h>
|
||||
|
||||
static SEL appendStringSel = NULL;
|
||||
|
||||
|
@ -69,7 +71,7 @@ static SEL appendStringSel = NULL;
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithCharactersNoCopy:(unichar*)chars
|
||||
length:(unsigned int)length
|
||||
length:(NSUInteger)length
|
||||
freeWhenDone:(BOOL)flag
|
||||
{
|
||||
_url=[(NSMutableString*) [NSMutableString alloc] initWithCharactersNoCopy:chars
|
||||
|
@ -84,7 +86,7 @@ static SEL appendStringSel = NULL;
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithCharacters:(const unichar*)chars
|
||||
length:(unsigned int)length
|
||||
length:(NSUInteger)length
|
||||
{
|
||||
_url = [(NSMutableString*)[NSMutableString alloc] initWithCharacters:chars
|
||||
length:length];
|
||||
|
@ -96,7 +98,7 @@ static SEL appendStringSel = NULL;
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithCStringNoCopy:(char*)byteString
|
||||
length:(unsigned int)length
|
||||
length:(NSUInteger)length
|
||||
freeWhenDone:(BOOL)flag
|
||||
{
|
||||
_url = [(NSMutableString*) [NSMutableString alloc] initWithCStringNoCopy:byteString
|
||||
|
@ -110,7 +112,7 @@ static SEL appendStringSel = NULL;
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithCString:(const char*)byteString
|
||||
length:(unsigned int)length;
|
||||
length:(NSUInteger)length;
|
||||
{
|
||||
_url = [(NSMutableString*) [NSMutableString alloc] initWithCString:byteString
|
||||
length:length];
|
||||
|
@ -238,7 +240,7 @@ static SEL appendStringSel = NULL;
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
- (unsigned) length
|
||||
- (NSUInteger) length
|
||||
{
|
||||
if (!_flags.composed)
|
||||
{
|
||||
|
@ -718,12 +720,6 @@ static SEL appendStringSel = NULL;
|
|||
return _prefix;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)checkURL
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//NDFN
|
||||
-(NSString*)urlProtocol
|
||||
|
|
|
@ -40,28 +40,28 @@ RCS_ID("$Id$")
|
|||
associations:(NSDictionary*)associations
|
||||
contentElements:(NSArray*)elements
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)valueAttributeName
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)urlAttributeName
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)elementName
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
|
|
@ -177,14 +177,14 @@ RCS_ID("$Id$")
|
|||
{
|
||||
if ([dataValue length]==0)
|
||||
{
|
||||
LOGError(@"Empty Data: %@",dataValue);
|
||||
// LOGError(@"Empty Data: %@",dataValue);
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([dataValue isKindOfClass:[NSString class]] && [dataValue length]==0)
|
||||
{
|
||||
LOGError(@"No Data: %@",dataValue);
|
||||
// LOGError(@"No Data: %@",dataValue);
|
||||
dataValue=nil;
|
||||
}
|
||||
else
|
||||
|
@ -194,13 +194,13 @@ RCS_ID("$Id$")
|
|||
}
|
||||
else
|
||||
{
|
||||
LOGError0(@"No Data:");
|
||||
// LOGError0(@"No Data:");
|
||||
};
|
||||
fileNameFormValueName=[NSString stringWithFormat:@"%@.filename",nameInContext];
|
||||
fileNameValue=[request formValueForKey:fileNameFormValueName];
|
||||
if (!fileNameValue || [fileNameValue length]==0)
|
||||
{
|
||||
LOGError(@"No fileName: %@",fileNameValue);
|
||||
//LOGError(@"No fileName: %@",fileNameValue);
|
||||
};
|
||||
[_filepath setValue:fileNameValue
|
||||
inComponent:component];
|
||||
|
@ -221,7 +221,6 @@ RCS_ID("$Id$")
|
|||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"GSWFileUpload in takeValuesFromRequest");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
};
|
||||
NS_ENDHANDLER;
|
||||
|
|
|
@ -57,7 +57,6 @@ static Class standardClass = Nil;
|
|||
associations:(NSDictionary*)associations
|
||||
template:(GSWElement*)templateElement
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
|
||||
if ((self=[super initWithName: name
|
||||
associations: associations
|
||||
|
@ -102,7 +101,6 @@ static Class standardClass = Nil;
|
|||
ASSIGNCOPY(_otherAssociations, dict);
|
||||
}
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return self;
|
||||
};
|
||||
|
@ -132,12 +130,10 @@ static Class standardClass = Nil;
|
|||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)context
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
|
||||
[self _elementNameAppendToResponse: response
|
||||
inContext: context];
|
||||
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -147,7 +143,6 @@ static Class standardClass = Nil;
|
|||
GSWElement *element = nil;
|
||||
GSWComponent *component = nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
component = GSWContext_component(aContext);
|
||||
|
||||
|
@ -188,7 +183,6 @@ static Class standardClass = Nil;
|
|||
};
|
||||
}
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return element;
|
||||
};
|
||||
|
@ -197,7 +191,6 @@ static Class standardClass = Nil;
|
|||
-(void)takeValuesFromRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
|
||||
if (_hasFormValues)
|
||||
{
|
||||
|
@ -222,7 +215,6 @@ static Class standardClass = Nil;
|
|||
}
|
||||
}
|
||||
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -231,7 +223,6 @@ static Class standardClass = Nil;
|
|||
{
|
||||
NSString *elementName = nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
if (_elementID != nil)
|
||||
{
|
||||
|
@ -249,7 +240,6 @@ static Class standardClass = Nil;
|
|||
inContext: aContext];
|
||||
}
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return elementName;
|
||||
};
|
||||
|
@ -261,7 +251,6 @@ static Class standardClass = Nil;
|
|||
{
|
||||
GSWComponent *comp = nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
comp = GSWContext_component(aContext);
|
||||
GSWResponse_appendContentCharacter(aResponse,'<');
|
||||
|
@ -289,7 +278,6 @@ static Class standardClass = Nil;
|
|||
}
|
||||
GSWResponse_appendContentCharacter(aResponse, '>');
|
||||
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -300,7 +288,6 @@ static Class standardClass = Nil;
|
|||
NSEnumerator *keyEnum = nil;
|
||||
NSString *key = nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
comp = GSWContext_component(aContext);
|
||||
keyEnum = [_otherAssociations keyEnumerator];
|
||||
|
@ -323,7 +310,6 @@ static Class standardClass = Nil;
|
|||
}
|
||||
}
|
||||
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -331,7 +317,6 @@ static Class standardClass = Nil;
|
|||
{
|
||||
NSString* elementName = nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
NSDebugMLog(@"_elementName=%@",_elementName);
|
||||
|
||||
|
@ -354,7 +339,6 @@ static Class standardClass = Nil;
|
|||
|
||||
NSDebugMLog(@"elementName=%@",elementName);
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return elementName;
|
||||
};
|
||||
|
|
|
@ -33,6 +33,8 @@ RCS_ID("$Id$")
|
|||
|
||||
#include "GSWeb.h"
|
||||
#include <math.h>
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
#include <GNUstepBase/NSString+GNUstepBase.h>
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -292,13 +294,11 @@ BOOL canBeOnSegment(NSPoint m,NSPoint a,NSPoint b)
|
|||
-(id)copyWithZone:(NSZone*)zone
|
||||
{
|
||||
GSWGeometricRegion* clone = nil;
|
||||
LOGObjectFnStart();
|
||||
clone=[[isa allocWithZone:zone] init];
|
||||
if (clone)
|
||||
{
|
||||
ASSIGN(clone->_userDefinedString,_userDefinedString);
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return clone;
|
||||
};
|
||||
|
||||
|
@ -495,7 +495,6 @@ BOOL canBeOnSegment(NSPoint m,NSPoint a,NSPoint b)
|
|||
-(id)copyWithZone:(NSZone*)zone
|
||||
{
|
||||
GSWArcRegion* clone = nil;
|
||||
LOGObjectFnStart();
|
||||
clone = [super copyWithZone:zone];
|
||||
if (clone)
|
||||
{
|
||||
|
@ -504,7 +503,6 @@ BOOL canBeOnSegment(NSPoint m,NSPoint a,NSPoint b)
|
|||
clone->_start=_start;
|
||||
clone->_stop=_stop;
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return clone;
|
||||
};
|
||||
|
||||
|
@ -528,7 +526,6 @@ BOOL canBeOnSegment(NSPoint m,NSPoint a,NSPoint b)
|
|||
{
|
||||
BOOL hitOk=NO;
|
||||
NSPoint test=NSMakePoint(x,y);
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"low",@"self=%@\nx=%u y=%u",self,x,y);
|
||||
if (_size.width==0)
|
||||
hitOk=isOnSegment(test,
|
||||
|
@ -568,7 +565,6 @@ BOOL canBeOnSegment(NSPoint m,NSPoint a,NSPoint b)
|
|||
};
|
||||
};
|
||||
NSDebugMLLog(@"low",@"hitOk=%s",(hitOk ? "YES" : "NO"));
|
||||
LOGObjectFnStop();
|
||||
return hitOk;
|
||||
};
|
||||
|
||||
|
@ -917,10 +913,8 @@ BOOL canBeOnSegment(NSPoint m,NSPoint a,NSPoint b)
|
|||
y:(int)y
|
||||
{
|
||||
BOOL hitOk=NO;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"low",@"self=%@\nx=%u y=%u",self,x,y);
|
||||
hitOk=NSPointInRect(NSMakePoint(x,y),_rect);
|
||||
LOGObjectFnStop();
|
||||
return hitOk;
|
||||
};
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
/*
|
||||
|
||||
|
@ -70,11 +71,7 @@ static Class GSWHTMLBareStringClass = Nil;
|
|||
contentElements:(NSArray*)anElementsArray
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"gswdync",@"anElementName=%@ aAttributeAssociationsList:%@ anElementsArray=%@",
|
||||
anElementName,
|
||||
aAttributeAssociationsList,
|
||||
anElementsArray);
|
||||
|
||||
if ((self=[super init]))
|
||||
{
|
||||
NSMutableArray* attributeAssociationsValues=[NSMutableArray array];
|
||||
|
@ -90,14 +87,12 @@ static Class GSWHTMLBareStringClass = Nil;
|
|||
length:1];
|
||||
|
||||
attributesKeyEnum= [aAttributeAssociationsList keyEnumerator];
|
||||
NSDebugMLLog(@"gswdync",@"attributesKeyEnum=%@ aAttributeAssociationsList=%@",
|
||||
attributesKeyEnum,aAttributeAssociationsList);
|
||||
|
||||
while ((key = [attributesKeyEnum nextObject]))
|
||||
{
|
||||
id association=[aAttributeAssociationsList objectForKey:key];
|
||||
id associationValue=[association valueInComponent:nil];
|
||||
NSDebugMLLog(@"gswdync",@"association=%@ associationValue=%@",
|
||||
association,associationValue);
|
||||
|
||||
[tmpHtmlBareStrings addObject:[@" " stringByAppendingString:NSStringWithObject(key)]];
|
||||
[tmpElementsMap appendBytes:&ElementsMap_htmlBareString
|
||||
length:1];
|
||||
|
@ -142,7 +137,6 @@ static Class GSWHTMLBareStringClass = Nil;
|
|||
htmlBareStrings:tmpHtmlBareStrings
|
||||
dynamicChildren:anElementsArray];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
|
@ -151,12 +145,7 @@ static Class GSWHTMLBareStringClass = Nil;
|
|||
attributeString:(NSString*)attributeString
|
||||
contentElements:(NSArray*)anElementsArray
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"gswdync",@"anElementName=%@ attributeString:%@ anElementsArray=%@",
|
||||
anElementName,
|
||||
attributeString,
|
||||
anElementsArray);
|
||||
|
||||
if ((self=[super init]))
|
||||
{
|
||||
NSMutableArray* tmpHtmlBareStrings=[NSMutableArray array];
|
||||
|
@ -193,7 +182,6 @@ static Class GSWHTMLBareStringClass = Nil;
|
|||
htmlBareStrings:tmpHtmlBareStrings
|
||||
dynamicChildren:anElementsArray];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
|
@ -203,11 +191,7 @@ static Class GSWHTMLBareStringClass = Nil;
|
|||
dynamicChildren:(NSArray*)aDynamicChildrensArray
|
||||
{
|
||||
BOOL compactHTMLTags=NO;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"gswdync",@"tmpElementsMap=%@ tmpHtmlBareStrings:%@ dynamicChildren=%@",
|
||||
tmpElementsMap,
|
||||
tmpHtmlBareStrings,
|
||||
aDynamicChildrensArray);
|
||||
|
||||
compactHTMLTags=[self compactHTMLTags];
|
||||
//OK
|
||||
if (compactHTMLTags)
|
||||
|
@ -233,25 +217,15 @@ static Class GSWHTMLBareStringClass = Nil;
|
|||
tmpElementsMap=tmpElementsMap;
|
||||
for(rmStringN=0;rmStringN<elementN;rmStringN++)
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"rmString=[%@]",rmString);
|
||||
NSDebugMLLog(@"gswdync",@"[tmpHtmlBareStrings objectAtIndex:rmStringN]=[%@]",
|
||||
[tmpHtmlBareStrings objectAtIndex:rmStringN]);
|
||||
[rmString appendString:[tmpHtmlBareStrings objectAtIndex:rmStringN]];
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"rmString=[%@]",rmString);
|
||||
NSDebugMLLog(@"gswdync",@"rmStrings=[%@]",rmStrings);
|
||||
[rmStrings addObject:rmString];
|
||||
NSDebugMLLog(@"gswdync",@"rmStrings=[%@]",rmStrings);
|
||||
|
||||
tmpHtmlBareStringsCount=[tmpHtmlBareStrings count];
|
||||
for(rmStringN=elementN;rmStringN<tmpHtmlBareStringsCount;rmStringN++)
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"rmStrings=[%@]",rmStrings);
|
||||
NSDebugMLLog(@"gswdync",@"[tmpHtmlBareStrings objectAtIndex:rmStringN]=[%@]",
|
||||
[tmpHtmlBareStrings objectAtIndex:rmStringN]);
|
||||
[rmStrings addObject:[tmpHtmlBareStrings objectAtIndex:rmStringN]];
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"rmStrings=[%@]",rmStrings);
|
||||
tmpHtmlBareStrings=rmStrings;
|
||||
};
|
||||
};
|
||||
|
@ -259,7 +233,6 @@ static Class GSWHTMLBareStringClass = Nil;
|
|||
ASSIGN(_elementsMap,tmpElementsMap);
|
||||
ASSIGN(_dynamicChildren,aDynamicChildrensArray);
|
||||
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
|
@ -307,7 +280,7 @@ static Class GSWHTMLBareStringClass = Nil;
|
|||
//--------------------------------------------------------------------
|
||||
-(void)_setEndOfHTMLTag:(unsigned int)unknown
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -376,9 +349,6 @@ static Class GSWHTMLBareStringClass = Nil;
|
|||
|
||||
for(elementN=0;elementN<=toIndex;elementN++)
|
||||
{
|
||||
NSDebugMLLog(@"GSWElement",@"appendTo self=%p elementN=%d GSWContext_elementID(context)=%@",
|
||||
self,elementN,GSWContext_elementID(aContext));
|
||||
|
||||
element=(BYTE)elements[elementN];
|
||||
if (element==ElementsMap_htmlBareString)
|
||||
{
|
||||
|
@ -496,7 +466,6 @@ id currentEl = nil;
|
|||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
int length=0;
|
||||
LOGObjectFnStart();
|
||||
|
||||
GSWStartElement(aContext);
|
||||
GSWAssertCorrectElementID(aContext);
|
||||
|
@ -540,14 +509,12 @@ id currentEl = nil;
|
|||
};
|
||||
GSWAssertIsElementID(aContext);
|
||||
GSWStopElement(aContext);
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)compactHTMLTags
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return NO;
|
||||
};
|
||||
|
||||
|
@ -555,7 +522,7 @@ id currentEl = nil;
|
|||
-(BOOL)appendStringAtRight:(id)unkwnon
|
||||
withMapping:(char*)mapping
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return NO;
|
||||
};
|
||||
|
||||
|
@ -563,21 +530,21 @@ id currentEl = nil;
|
|||
-(BOOL)appendStringAtLeft:(id)unkwnon
|
||||
withMapping:(char*)mapping
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return NO;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)canBeFlattenedAtInitialization
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return NO;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(BOOL)charactersNeedingQuotes
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return NO;
|
||||
};
|
||||
|
||||
|
@ -585,27 +552,27 @@ id currentEl = nil;
|
|||
+(void)addURLAttribute:(id)attribute
|
||||
forElementNamed:(NSString*)name
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(id)urlsForElementNamed:(NSString*)name
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(NSDictionary*)attributeDictionaryForString:(NSString*)string
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(NSString*)stringForAttributeDictionary:(NSDictionary*)attributeDictionary
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -614,7 +581,7 @@ id currentEl = nil;
|
|||
attributeString:(NSString*)attributeString
|
||||
contentElements:(NSArray*)elements
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -623,25 +590,25 @@ id currentEl = nil;
|
|||
attributeDictionary:(NSDictionary*)attributeDictionary
|
||||
contentElements:(NSArray*)elements
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
+(Class)_elementClassForName:(NSString*)name
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
+(void)setElementClass:(Class)class
|
||||
forName:(NSString*)name
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
+(GSWElement*)_theEmptyElement
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
|
|
@ -55,8 +55,6 @@ RCS_ID("$Id$")
|
|||
{
|
||||
GSWElement* template=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
if ([_string length])
|
||||
{
|
||||
GSWHTMLRawParser* htmlRawParser = [GSWHTMLRawParser parserWithDelegate:self
|
||||
|
@ -78,7 +76,6 @@ RCS_ID("$Id$")
|
|||
|
||||
if ([_currentElement parentElement])
|
||||
{
|
||||
NSDebugMLog(@"_currentElement=%@",_currentElement);
|
||||
[NSException raise:NSInvalidArgumentException
|
||||
format:@"In template named %@: Missing dynamic tag end after reaching end of template. Tag name is '%@'. templateInfo: %@",
|
||||
_templateName,[_currentElement name],[_currentElement templateInfo]];
|
||||
|
@ -87,8 +84,6 @@ RCS_ID("$Id$")
|
|||
template=[_currentElement template];
|
||||
};
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return template;
|
||||
};
|
||||
|
||||
|
@ -97,8 +92,6 @@ RCS_ID("$Id$")
|
|||
{
|
||||
GSWElement* template=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
[self parseDeclarations];
|
||||
_currentElement = [GSWTemporaryElement temporaryElement];
|
||||
template=[self parseHTML];
|
||||
|
@ -114,8 +107,6 @@ RCS_ID("$Id$")
|
|||
_processedDeclarationsFilePaths);
|
||||
};
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return template;
|
||||
}
|
||||
|
||||
|
@ -135,15 +126,10 @@ Creates a GSWHTMLBareString element with the text
|
|||
{
|
||||
GSWHTMLBareString* element=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
NSDebugMLog(@"text=%@",text);
|
||||
|
||||
element = [GSWHTMLBareString elementWithString:text];
|
||||
|
||||
[_currentElement addChildElement:element];
|
||||
|
||||
LOGObjectFnStop();
|
||||
}
|
||||
|
||||
|
||||
|
@ -156,20 +142,10 @@ Creates a GSWTemporaryElement element, waiting for tag end
|
|||
withProperties:(NSDictionary*)tagProperties
|
||||
templateInfo:(NSString*)templateInfo
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
|
||||
NSDebugMLog(@"Opening element: tagProperties=%@",tagProperties);
|
||||
NSDebugMLog(@"Opening element: templateInfo=%@",templateInfo);
|
||||
NSDebugMLog(@"Opening element: parent=%@",_currentElement);
|
||||
|
||||
_currentElement = [GSWTemporaryElement temporaryElementOfType:tagType
|
||||
withProperties:tagProperties
|
||||
templateInfo:templateInfo
|
||||
parent:_currentElement];
|
||||
|
||||
NSDebugMLog(@"New (Child) _currentElement=%@",_currentElement);
|
||||
|
||||
LOGObjectFnStop();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -185,12 +161,7 @@ Creates a dynamic element from current temporary element element
|
|||
{
|
||||
GSWTemporaryElement* parent=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
NSDebugMLog(@"Closing element=%@",_currentElement);
|
||||
|
||||
parent=[_currentElement parentElement];
|
||||
NSDebugMLog(@"Parent element=%@",_currentElement);
|
||||
|
||||
if(!parent)
|
||||
{
|
||||
|
@ -232,10 +203,7 @@ Creates a dynamic element from current temporary element element
|
|||
NS_ENDHANDLER;
|
||||
|
||||
_currentElement = parent;
|
||||
|
||||
NSDebugMLog(@"New (Parent) _currentElement=%@",_currentElement);
|
||||
}
|
||||
LOGObjectFnStop();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -247,18 +215,10 @@ Creates a GSWHTMLComment with the comment text
|
|||
{
|
||||
GSWHTMLComment* element=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
NSDebugMLog(@"didParseComment child Of element: %@",_currentElement);
|
||||
NSDebugMLog(@"string=%@",text);
|
||||
|
||||
element = [GSWHTMLComment elementWithString:text];
|
||||
NSDebugMLog(@"element=%@",element);
|
||||
|
||||
[_currentElement addChildElement:element];
|
||||
NSDebugMLog(@"_currentElement=%@",_currentElement);
|
||||
|
||||
LOGObjectFnStop();
|
||||
}
|
||||
|
||||
// those are here because a protocol forces us to implement them -- dw
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#ifdef GNUSTEP
|
||||
#include <GNUstepBase/GSFileHandle.h>
|
||||
#endif
|
||||
#include <GNUstepBase/NSString+GNUstepBase.h>
|
||||
#include <Foundation/NSError.h>
|
||||
#include <Foundation/NSException.h>
|
||||
#include <Foundation/NSDictionary.h>
|
||||
|
|
|
@ -40,9 +40,7 @@ RCS_ID("$Id$")
|
|||
contentElements:(NSArray*)elements
|
||||
{
|
||||
NSMutableDictionary* tmpAssociations=[NSMutableDictionary dictionaryWithDictionary:associations];
|
||||
LOGObjectFnStartC("GSWHiddenField");
|
||||
NSDebugMLLog(@"gswdync",@"name=%@ associations:%@ elements=%@",
|
||||
aName,associations,elements);
|
||||
|
||||
[tmpAssociations setObject:[GSWAssociation associationWithValue:@"hidden"]
|
||||
forKey:@"type"];
|
||||
if ((self=[super initWithName:aName
|
||||
|
@ -50,7 +48,7 @@ RCS_ID("$Id$")
|
|||
contentElements:nil])) //No Childs!
|
||||
{
|
||||
};
|
||||
LOGObjectFnStopC("GSWHiddenField");
|
||||
|
||||
return self;
|
||||
};
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWImageButton
|
||||
|
@ -271,7 +272,7 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(id)_imageURLInContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -399,14 +400,11 @@ RCS_ID("$Id$")
|
|||
GSWComponent* component=nil;
|
||||
int x=0;
|
||||
int y=0;
|
||||
LOGObjectFnStart();
|
||||
component=GSWContext_component(aContext);
|
||||
GSWContext_appendZeroElementIDComponent(aContext);
|
||||
senderID=GSWContext_senderID(aContext);
|
||||
NSDebugMLog(@"senderID=%@",senderID);
|
||||
elementID=GSWContext_elementID(aContext);
|
||||
NSDebugMLog(@"declarationName=%@ elementID=%@",
|
||||
[self declarationName],elementID);
|
||||
|
||||
if ([elementID isEqualToString:senderID])
|
||||
{
|
||||
//TODO
|
||||
|
@ -423,8 +421,7 @@ RCS_ID("$Id$")
|
|||
NSString* nameInContext=[self nameInContext:aContext];
|
||||
NSString* formValueX=[request formValueForKey:[nameInContext stringByAppendingString:@".x"]];
|
||||
NSString* formValueY=[request formValueForKey:[nameInContext stringByAppendingString:@".y"]];
|
||||
NSDebugMLLog(@"gswdync",@"formValueX=%@",formValueX);
|
||||
NSDebugMLLog(@"gswdync",@"formValueY=%@",formValueY);
|
||||
|
||||
if (formValueX && formValueY)
|
||||
{
|
||||
x=[formValueX intValue];
|
||||
|
@ -442,11 +439,11 @@ RCS_ID("$Id$")
|
|||
else
|
||||
{
|
||||
elementID=GSWContext_elementID(aContext);
|
||||
NSDebugMLog(@"elementID=%@",elementID);
|
||||
|
||||
if ([elementID isEqualToString:senderID])
|
||||
{
|
||||
id param=[request formValueForKey:GSWKey_IsmapCoords[GSWebNamingConv]];
|
||||
NSDebugMLLog(@"gswdync",@"param=%@",param);
|
||||
|
||||
if (param)
|
||||
{
|
||||
if ([param ismapCoordx:&x
|
||||
|
@ -482,7 +479,7 @@ RCS_ID("$Id$")
|
|||
regions=[GSWGeometricRegion geometricRegionsWithFile:imageMapFilePath];
|
||||
else
|
||||
{
|
||||
NSDebugMLLog0(@"gswdync",@"GSWActiveImage No image Map.");
|
||||
//NSDebugMLLog0(@"gswdync",@"GSWActiveImage No image Map.");
|
||||
};
|
||||
}
|
||||
else if (!WOStrictFlag && _imageMapString)
|
||||
|
@ -536,7 +533,7 @@ RCS_ID("$Id$")
|
|||
}
|
||||
else
|
||||
{
|
||||
NSDebugMLLog0(@"gswdync",@"GSWActiveImage Couldn't trigger action.");
|
||||
// NSDebugMLLog0(@"gswdync",@"GSWActiveImage Couldn't trigger action.");
|
||||
};
|
||||
};
|
||||
if (!element)
|
||||
|
@ -549,24 +546,9 @@ RCS_ID("$Id$")
|
|||
else
|
||||
element=[super invokeActionForRequest:request
|
||||
inContext:aContext];
|
||||
LOGObjectFnStop();
|
||||
return element;
|
||||
};
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//-(NSString*)frameworkNameInContext:(GSWContext*)aContext
|
||||
//{
|
||||
// //OK
|
||||
// NSString* frameworkName=nil;
|
||||
// GSWComponent* component=GSWContext_component(aContext);
|
||||
// NSDebugMLog(@"framework=%@",_framework);
|
||||
// if (_framework)
|
||||
// frameworkName=[_framework valueInComponent:component];
|
||||
// else
|
||||
// frameworkName=[component frameworkName];
|
||||
// return frameworkName;
|
||||
//};
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
@ -41,8 +41,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
GSWAssociation* languageAssociation=nil;
|
||||
NSMutableDictionary* tmpAssociations=[NSMutableDictionary dictionaryWithDictionary:associations];
|
||||
LOGObjectFnStartC("GSWJavaScript");
|
||||
NSDebugMLLog(@"gswdync",@"aName=%@ associations:%@ templateElement=%@",aName,associations,templateElement);
|
||||
|
||||
if (![tmpAssociations objectForKey:language__Key])
|
||||
{
|
||||
// Create and set the language (Javascript)
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWKeyValueAssociation
|
||||
|
@ -50,12 +51,8 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
GSWLogMemC("GSWKeyValueAssociation start of dealloc");
|
||||
GSWLogAssertGood(self);
|
||||
DESTROY(_keyPath);
|
||||
GSWLogMemC("keyPath deallocated");
|
||||
[super dealloc];
|
||||
GSWLogMemC("GSWKeyValueAssociation end of dealloc");
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -132,7 +129,7 @@ RCS_ID("$Id$")
|
|||
-(NSString*)description
|
||||
{
|
||||
NSString* dscr=nil;
|
||||
GSWLogAssertGood(self);
|
||||
|
||||
dscr=[NSString stringWithFormat:@"<%s %p -",
|
||||
object_getClassName(self),
|
||||
(void*)self];
|
||||
|
@ -151,7 +148,7 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(NSString*)debugDescription
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@ RCS_ID("$Id$")
|
|||
#include <unistd.h>
|
||||
#include "GSWeb.h"
|
||||
#include "GSWLifebeatThread.h"
|
||||
#include <GNUstepBase/GSCategories.h>
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWLifebeatThread
|
||||
|
@ -116,18 +115,14 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
GSWLogMemC("dealloc GSWLifebeatThread");
|
||||
DESTROY(_creationDate);
|
||||
DESTROY(_applicationName);
|
||||
DESTROY(_applicationHost);
|
||||
DESTROY(_lifebeatHost);
|
||||
DESTROY(_baseURL);
|
||||
DESTROY(_messages);
|
||||
GSWLogMemC("release pool");
|
||||
// DESTROY(_pool);
|
||||
GSWLogMemC("super dealloc");
|
||||
[super dealloc];
|
||||
GSWLogMemC("dealloc GSWLifebeatThread end");
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -142,11 +137,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
if (destroy)
|
||||
{
|
||||
GSWLogMemC("dealloc pool");
|
||||
GSWLogMemCF("Destroy NSAutoreleasePool: %p. %@",
|
||||
_pool, GSCurrentThread());
|
||||
DESTROY(_pool);
|
||||
GSWLogMemC("end dealloc pool");
|
||||
};
|
||||
_pool=pool;
|
||||
};
|
||||
|
@ -154,9 +145,9 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(void)sendMessage:(NSString*)message
|
||||
{
|
||||
NSURL* url=[NSURL URLWithString:message];
|
||||
NSData* data=[url resourceDataUsingCache:NO];
|
||||
NSDebugMLog(@"MESSAGE data=%@",data);//TODO handle it !
|
||||
// NSURL* url=[NSURL URLWithString:message];
|
||||
// NSData* data=[url resourceDataUsingCache:NO];
|
||||
// TODO: check
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -180,15 +171,8 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(void)threadExited
|
||||
{
|
||||
// LOGObjectFnStart();
|
||||
// NSDebugMLLog0(@"trace",@"GSWLifebeatThread: threadExited method");
|
||||
// NSDebugMLLog(@"low",@"[_defaultAdaptorThread retainCount=%d",
|
||||
// (int)[self retainCount]);
|
||||
GSWLogMemCF("Will Destroy NSAutoreleasePool: %p",_pool);
|
||||
[self setPool:nil
|
||||
destroyLast:YES];
|
||||
// LOGObjectFnStop();
|
||||
GSWLogDeepC("threadExited");
|
||||
};
|
||||
/*
|
||||
//TODO
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWMailDelivery
|
||||
|
@ -57,13 +58,7 @@ static GSWMailDelivery *sharedInstance;
|
|||
send:(BOOL)sendNow
|
||||
{
|
||||
NSString* emailString=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLog(@"sender=%@",sender);
|
||||
NSDebugMLog(@"to=%@",to);
|
||||
NSDebugMLog(@"cc=%@",cc);
|
||||
NSDebugMLog(@"subject=%@",subject);
|
||||
NSDebugMLog(@"plainTextMessage=%@",plainTextMessage);
|
||||
NSDebugMLog(@"sendNow=%d",(int)sendNow);
|
||||
|
||||
emailString=[self composeEmailFrom:sender
|
||||
to:to
|
||||
cc:cc
|
||||
|
@ -71,8 +66,7 @@ static GSWMailDelivery *sharedInstance;
|
|||
subject:subject
|
||||
plainText:plainTextMessage
|
||||
send:sendNow];
|
||||
NSDebugMLog(@"emailString=%@",emailString);
|
||||
LOGObjectFnStop();
|
||||
|
||||
return emailString;
|
||||
};
|
||||
|
||||
|
@ -84,13 +78,7 @@ static GSWMailDelivery *sharedInstance;
|
|||
send:(BOOL)sendNow
|
||||
{
|
||||
NSString* emailString=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLog(@"sender=%@",sender);
|
||||
NSDebugMLog(@"to=%@",to);
|
||||
NSDebugMLog(@"cc=%@",cc);
|
||||
NSDebugMLog(@"subject=%@",subject);
|
||||
NSDebugMLog(@"component=%@",component);
|
||||
NSDebugMLog(@"sendNow=%d",(int)sendNow);
|
||||
|
||||
emailString=[self composeEmailFrom:sender
|
||||
to:to
|
||||
cc:cc
|
||||
|
@ -98,8 +86,7 @@ static GSWMailDelivery *sharedInstance;
|
|||
subject:subject
|
||||
component:component
|
||||
send:sendNow];
|
||||
NSDebugMLog(@"emailString=%@",emailString);
|
||||
LOGObjectFnStop();
|
||||
|
||||
return emailString;
|
||||
};
|
||||
|
||||
|
@ -117,18 +104,10 @@ static GSWMailDelivery *sharedInstance;
|
|||
NSMutableString* toString=nil;
|
||||
int i=0;
|
||||
int count=0;
|
||||
LOGObjectFnStart();
|
||||
NSAssert1(!to || [to isKindOfClass:[NSArray class]],@"to is a %@, not a NSArray",[to class]);
|
||||
NSAssert1(!cc || [cc isKindOfClass:[NSArray class]],@"cc is a %@, not a NSArray",[cc class]);
|
||||
NSAssert1(!bcc || [bcc isKindOfClass:[NSArray class]],@"bcc is a %@, not a NSArray",[bcc class]);
|
||||
count=[to count];
|
||||
NSDebugMLog(@"sender=%@",sender);
|
||||
NSDebugMLog(@"to=%@",to);
|
||||
NSDebugMLog(@"cc=%@",cc);
|
||||
NSDebugMLog(@"bcc=%@",bcc);
|
||||
NSDebugMLog(@"subject=%@",subject);
|
||||
NSDebugMLog(@"plainTextMessage=%@",plainTextMessage);
|
||||
NSDebugMLog(@"sendNow=%d",(int)sendNow);
|
||||
|
||||
for(i=0;i<count;i++)
|
||||
{
|
||||
|
@ -140,7 +119,6 @@ static GSWMailDelivery *sharedInstance;
|
|||
[toString appendString:NSStringWithObject([to objectAtIndex:i])];
|
||||
};
|
||||
};
|
||||
NSDebugMLog(@"toString=%@",toString);
|
||||
messageString=(NSMutableString*)[NSMutableString string];
|
||||
|
||||
// From:
|
||||
|
@ -153,7 +131,6 @@ static GSWMailDelivery *sharedInstance;
|
|||
[messageString appendString:toString];
|
||||
[messageString appendString:@"\n"];
|
||||
|
||||
NSDebugMLog(@"messageString=%@",messageString);
|
||||
count=[cc count];
|
||||
if (count)
|
||||
{
|
||||
|
@ -168,13 +145,11 @@ static GSWMailDelivery *sharedInstance;
|
|||
[ccString appendString:NSStringWithObject([cc objectAtIndex:i])];
|
||||
};
|
||||
};
|
||||
NSDebugMLog(@"ccString=%@",ccString);
|
||||
|
||||
// cc:
|
||||
[messageString appendString:@"Cc: "];
|
||||
[messageString appendString:ccString];
|
||||
[messageString appendString:@"\n"];
|
||||
NSDebugMLog(@"messageString=%@",messageString);
|
||||
};
|
||||
count=[bcc count];
|
||||
if (count)
|
||||
|
@ -190,13 +165,11 @@ static GSWMailDelivery *sharedInstance;
|
|||
[bccString appendString:NSStringWithObject([bcc objectAtIndex:i])];
|
||||
};
|
||||
};
|
||||
NSDebugMLog(@"bccString=%@",bccString);
|
||||
|
||||
// Bcc:
|
||||
[messageString appendString:@"Bcc: "];
|
||||
[messageString appendString:bccString];
|
||||
[messageString appendString:@"\n"];
|
||||
NSDebugMLog(@"messageString=%@",messageString);
|
||||
};
|
||||
|
||||
//Subject
|
||||
|
@ -206,11 +179,9 @@ static GSWMailDelivery *sharedInstance;
|
|||
|
||||
// plainTextMessage
|
||||
[messageString appendString:NSStringWithObject(plainTextMessage)];
|
||||
NSDebugMLog(@"messageString=%@",messageString);
|
||||
|
||||
if (sendNow)
|
||||
[self sendEmail:messageString];
|
||||
LOGObjectFnStop();
|
||||
return messageString;
|
||||
};
|
||||
|
||||
|
@ -229,16 +200,13 @@ static GSWMailDelivery *sharedInstance;
|
|||
NSString* plainTextMessage=nil;
|
||||
NSString* messageString=nil;
|
||||
GSWResponse* response=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLog(@"component=%@",component);
|
||||
|
||||
context=[component context];
|
||||
NSDebugMLog(@"context=%@",context);
|
||||
[context _generateCompleteURLs];
|
||||
response=[component generateResponse];
|
||||
NSDebugMLog(@"response=%@",response);
|
||||
plainTextMessage=[[[NSString alloc]initWithData:[response content]
|
||||
encoding:[response contentEncoding]] autorelease];
|
||||
NSDebugMLog(@"plainTextMessage=%@",plainTextMessage);
|
||||
|
||||
messageString=[self composeEmailFrom:sender
|
||||
to:to
|
||||
cc:cc
|
||||
|
@ -247,8 +215,7 @@ static GSWMailDelivery *sharedInstance;
|
|||
plainText:plainTextMessage
|
||||
send:sendNow];
|
||||
messageString=[[response content]description];
|
||||
NSDebugMLog(@"messageString=%@",messageString);
|
||||
LOGObjectFnStop();
|
||||
|
||||
return messageString;
|
||||
};
|
||||
|
||||
|
@ -259,9 +226,7 @@ static GSWMailDelivery *sharedInstance;
|
|||
NSString* sendmailPath=nil;
|
||||
NSString* sendmailCommand=nil;
|
||||
NSFileManager* fileManager=nil;
|
||||
LOGObjectFnStart();
|
||||
//TODO: here we should contact smtp server,... instead au using sendmail
|
||||
NSDebugMLog(@"emailString=%@",emailString);
|
||||
fileManager=[NSFileManager defaultManager];
|
||||
NSAssert(fileManager,@"No fileManager");
|
||||
sendmailPath=@"/usr/bin/sendmail";
|
||||
|
@ -297,11 +262,9 @@ static GSWMailDelivery *sharedInstance;
|
|||
};
|
||||
};
|
||||
};
|
||||
NSDebugMLog(@"sendmailPath=%@",sendmailPath);
|
||||
// -i When reading a message from standard input, don't treat a line with only a . character as the end of input.
|
||||
// -t Extract recipients from message headers. This requires that no recipients be specified on the command line.
|
||||
sendmailCommand=[sendmailPath stringByAppendingString:@" -i -t"];
|
||||
NSDebugMLog(@"sendmailCommand=%@",sendmailCommand);
|
||||
sendmailFile=popen([sendmailCommand lossyCString],"w");
|
||||
if (sendmailFile)
|
||||
{
|
||||
|
@ -310,68 +273,21 @@ static GSWMailDelivery *sharedInstance;
|
|||
size_t written=fwrite(cString, sizeof(char),len,sendmailFile);
|
||||
if (written!=len)
|
||||
{
|
||||
NSDebugMLog(@"Error writing to sendmail (written %d / %d",written,len);
|
||||
// NSDebugMLog(@"Error writing to sendmail (written %d / %d",written,len);
|
||||
};
|
||||
fclose(sendmailFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
NSDebugMLog(@"Can't run sendmail (%@)",sendmailCommand);
|
||||
NSLog(@"Can't run sendmail (%@)",sendmailCommand);
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
|
||||
/* int files[2];
|
||||
pid_t pid;
|
||||
LOGObjectFnStart();
|
||||
|
||||
NSDebugMLog(@"emailString=%@",emailString);
|
||||
|
||||
if(pipe(files))
|
||||
[NSException raise:NSInternalInconsistencyException format:@"%@ -- %@ 0x%x: cannot create pipe",
|
||||
NSStringFromSelector(_cmd),
|
||||
NSStringFromClass([self class]),
|
||||
self];
|
||||
|
||||
switch(pid = fork())
|
||||
{
|
||||
case 0:
|
||||
NSDebugMLog(@"FORK0");
|
||||
close(0);
|
||||
dup(files[0]);
|
||||
close(files[0]);
|
||||
close(files[1]);
|
||||
|
||||
execlp("sendmail", "sendmail", "-i", "-t", NULL);
|
||||
|
||||
break;
|
||||
|
||||
case -1:
|
||||
NSDebugMLog(@"FORK-1");
|
||||
close(files[0]);
|
||||
close(files[1]);
|
||||
[NSException raise:NSInternalInconsistencyException format:@"%@ -- %@ 0x%x: cannot fork process",
|
||||
NSStringFromSelector(_cmd),
|
||||
NSStringFromClass([self class]),
|
||||
self];
|
||||
break;
|
||||
|
||||
default:
|
||||
NSDebugMLog(@"FORKDEF");
|
||||
write(files[1], [emailString cString], strlen([emailString cString]));
|
||||
close(files[0]);
|
||||
close(files[1]);
|
||||
|
||||
waitpid(pid, NULL, 0);
|
||||
break;
|
||||
}
|
||||
LOGObjectFnStop();
|
||||
*/
|
||||
};
|
||||
|
||||
-(void)_invokeGSWSendMailAt:(id)at
|
||||
withEmail:(id)email
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
@end
|
||||
|
|
|
@ -35,6 +35,7 @@ RCS_ID("$Id$")
|
|||
#include <GNUstepBase/Unicode.h>
|
||||
#include "GSWeb.h"
|
||||
#include "NSData+Compress.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
|
||||
static NSStringEncoding globalDefaultEncoding=GSUndefinedEncoding;
|
||||
|
@ -465,8 +466,8 @@ static __inline__ NSMutableData *_checkBody(GSWMessage *self) {
|
|||
|
||||
stringByConvertingToHTMLSEL = @selector(stringByConvertingToHTML:);
|
||||
NSAssert(stringByConvertingToHTMLSEL,@"No stringByConvertingToHTMLSEL");
|
||||
|
||||
globalDefaultEncoding = WOStrictFlag ? NSISOLatin1StringEncoding : [NSString defaultCStringEncoding];
|
||||
// WO 4.5 uses Latin1, WO 5 utf8
|
||||
globalDefaultEncoding = [NSString defaultCStringEncoding];
|
||||
initGSWMessageDataCache();
|
||||
}
|
||||
}
|
||||
|
@ -746,31 +747,31 @@ static __inline__ NSMutableData *_checkBody(GSWMessage *self) {
|
|||
forKey:(NSString*)key
|
||||
{
|
||||
id object=[_headers objectForKey:key];
|
||||
|
||||
|
||||
if (object)
|
||||
{
|
||||
if ([object isKindOfClass:[NSArray class]])
|
||||
{
|
||||
if ([object isKindOfClass:[NSArray class]])
|
||||
{
|
||||
int index=[object indexOfObject:header];
|
||||
if (index!=NSNotFound)
|
||||
{
|
||||
if ([object count]==1)
|
||||
[_headers removeObjectForKey:key];
|
||||
else
|
||||
{
|
||||
object=[[object mutableCopy]autorelease];
|
||||
[object removeObjectAtIndex:index];
|
||||
[self setHeaders:object
|
||||
forKey:key];
|
||||
};
|
||||
}
|
||||
}
|
||||
else if ([object isEqual:header])
|
||||
{
|
||||
NSUInteger index=[object indexOfObject:header];
|
||||
if (index!=NSNotFound)
|
||||
{
|
||||
if ([object count]==1)
|
||||
[_headers removeObjectForKey:key];
|
||||
};
|
||||
};
|
||||
};
|
||||
else
|
||||
{
|
||||
object=[[object mutableCopy]autorelease];
|
||||
[object removeObjectAtIndex:index];
|
||||
[self setHeaders:object
|
||||
forKey:key];
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ([object isEqual:header])
|
||||
{
|
||||
[_headers removeObjectForKey:key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)removeHeaderForKey:(NSString*)key
|
||||
|
@ -850,7 +851,6 @@ static __inline__ NSMutableData *_checkBody(GSWMessage *self) {
|
|||
|
||||
if (!myData)
|
||||
{
|
||||
NSLog(aValue);
|
||||
[NSException raise:NSInvalidArgumentException
|
||||
format:@"%s: could not convert '%s' non-lossy to encoding %i",
|
||||
__PRETTY_FUNCTION__, [aValue lossyCString],_contentEncoding];
|
||||
|
@ -1083,7 +1083,7 @@ static __inline__ NSMutableData *_checkBody(GSWMessage *self) {
|
|||
//--------------------------------------------------------------------
|
||||
-(NSString*)_formattedCookiesString
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
|
|
@ -1022,23 +1022,19 @@ static void GSWMapBaseInitWithZoneAndCapacity(GSWMapBase base,
|
|||
//------------------------------------------------------------------------------
|
||||
-(id)initWithNodeSize:(NSUInteger)nodeSize
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSCAssert2(nodeSize>=sizeof(GSWMapNode_t),
|
||||
@"Bad node size: %u < %u",
|
||||
nodeSize,
|
||||
sizeof(GSWMapNode_t));
|
||||
self=[self initWithNodeSize:nodeSize
|
||||
capacity:DEFAULT_DICTIONARY_CAPACITY];
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
-(id)init
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
self=[self initWithNodeSize:sizeof(GSWMapNode_t)];
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
|
@ -1046,7 +1042,6 @@ static void GSWMapBaseInitWithZoneAndCapacity(GSWMapBase base,
|
|||
-(id)initWithNodeSize:(NSUInteger)nodeSize
|
||||
capacity:(NSUInteger)capacity
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSCAssert2(nodeSize>=sizeof(GSWMapNode_t),
|
||||
@"Bad node size: %u < %u",
|
||||
nodeSize,
|
||||
|
@ -1063,17 +1058,14 @@ static void GSWMapBaseInitWithZoneAndCapacity(GSWMapBase base,
|
|||
GSWMapBaseInitWithZoneAndCapacity((GSWMapBase)_mapBase, [self zone],
|
||||
capacity);
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
-(id)initWithCapacity:(NSUInteger)capacity
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[self initWithNodeSize:sizeof(GSWMapNode_t)
|
||||
capacity:capacity];
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
|
|
|
@ -32,13 +32,14 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWNestedList
|
||||
|
||||
-(void)dealloc
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -48,7 +49,7 @@ RCS_ID("$Id$")
|
|||
associations:(NSDictionary*)associations
|
||||
template:(GSWElement*)templateElement
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -57,7 +58,7 @@ RCS_ID("$Id$")
|
|||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -66,14 +67,14 @@ RCS_ID("$Id$")
|
|||
orderedList:(id)orderedList
|
||||
level:(int)level
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)aRequest
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -83,7 +84,7 @@ RCS_ID("$Id$")
|
|||
inList:(id)list
|
||||
inComponent:(id)component
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -93,7 +94,7 @@ RCS_ID("$Id$")
|
|||
currentIndex:(unsigned int)index
|
||||
inComponent:(id)component
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWParam
|
||||
|
@ -44,7 +45,6 @@ RCS_ID("$Id$")
|
|||
treatNilValueAsGSWNull:(BOOL)treatNilValueAsGSWNull
|
||||
{
|
||||
NSMutableDictionary* associations=nil;
|
||||
LOGObjectFnStartC("GSWImage");
|
||||
|
||||
_treatNilValueAsGSWNull = treatNilValueAsGSWNull;
|
||||
ASSIGN(_target,target);
|
||||
|
@ -54,11 +54,9 @@ treatNilValueAsGSWNull:(BOOL)treatNilValueAsGSWNull
|
|||
|
||||
_action = [[inAssociations objectForKey:action__Key
|
||||
withDefaultObject:[_action autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"_action=%@",_action);
|
||||
|
||||
_value = [[inAssociations objectForKey:value__Key
|
||||
withDefaultObject:[_value autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"_value=%@",_value);
|
||||
|
||||
[associations removeObjectForKey:action__Key];
|
||||
[associations removeObjectForKey:value__Key];
|
||||
|
@ -114,14 +112,14 @@ treatNilValueAsGSWNull:(BOOL)treatNilValueAsGSWNull
|
|||
//--------------------------------------------------------------------
|
||||
-(NSString*)description
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)elementName
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -132,7 +130,6 @@ treatNilValueAsGSWNull:(BOOL)treatNilValueAsGSWNull
|
|||
{
|
||||
GSWElement* element=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
if (_action
|
||||
&& [GSWContext_elementID(aContext) isEqualToString:GSWContext_senderID(aContext)])
|
||||
|
@ -145,60 +142,22 @@ treatNilValueAsGSWNull:(BOOL)treatNilValueAsGSWNull
|
|||
element = [aContext page];
|
||||
};
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
return element;
|
||||
};
|
||||
|
||||
//-(void)appendGSWebObjectsAssociationsToResponse:(GSWResponse*)aResponse
|
||||
// inContext:(GSWContext*)aContext
|
||||
//{
|
||||
// [super appendGSWebObjectsAssociationsToResponse:aResponse
|
||||
// inContext:aContext];
|
||||
// if (_action)
|
||||
// {
|
||||
// GSWResponse_appendTagAttributeValueEscapingHTMLAttributeValue(aResponse,
|
||||
// @"value",
|
||||
// [aContext componentActionURL],
|
||||
// NO);// Don't escape
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// GSWComponent* component=GSWContext_component(aContext);
|
||||
//
|
||||
// id value = [self valueInComponent:component];
|
||||
// if (value)
|
||||
// {
|
||||
// GSWResponse_appendTagAttributeValueEscapingHTMLAttributeValue(aResponse,
|
||||
// @"value",
|
||||
// value,
|
||||
// YES);
|
||||
// }
|
||||
// else if(_treatNilValueAsGSWNull)
|
||||
// {
|
||||
// GSWResponse_appendTagAttributeValueEscapingHTMLAttributeValue(aResponse,
|
||||
// @"value",
|
||||
// @"GSWNull",
|
||||
// NO);
|
||||
// }
|
||||
// else
|
||||
// NSWarnLog(@"GSWParam: nil 'value'");
|
||||
// };
|
||||
//};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)valueInComponent:(GSWComponent*)component
|
||||
{
|
||||
id value=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
if (_target)
|
||||
value=[_target valueForKey:_targetKey];
|
||||
else if (_value)
|
||||
value=[_value valueInComponent:component];
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return value;
|
||||
};
|
||||
|
@ -207,7 +166,7 @@ treatNilValueAsGSWNull:(BOOL)treatNilValueAsGSWNull
|
|||
//--------------------------------------------------------------------
|
||||
+(BOOL)escapeHTML
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return NO;
|
||||
};
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/NSString+GNUstepBase.h>
|
||||
|
||||
/**
|
||||
Bindings
|
||||
|
|
|
@ -192,7 +192,7 @@ NSString* formattedByteSizeValue(unsigned int value)
|
|||
|
||||
if ([content length] == 0)
|
||||
{
|
||||
LOGSeriousError(@"Read (%@) attempt failed", path);
|
||||
//LOGSeriousError(@"Read (%@) attempt failed", path);
|
||||
}
|
||||
|
||||
return content;
|
||||
|
@ -214,11 +214,10 @@ NSString* formattedByteSizeValue(unsigned int value)
|
|||
{
|
||||
BOOL ok=NO;
|
||||
NSString* pidstat=[self contentOfPIDFile:@"statm"];
|
||||
NSDebugMLog(@"pidstat=%@",pidstat);
|
||||
|
||||
if (pidstat)
|
||||
{
|
||||
const char* statsChars=[pidstat cString];
|
||||
NSDebugMLog(@"pidstat=%@",pidstat);
|
||||
if (sscanf(statsChars, "%ld %ld %ld %ld %ld %ld %ld",
|
||||
&_pagesNb,//size
|
||||
&_residentPagesNb,//resident
|
||||
|
@ -238,14 +237,13 @@ NSString* formattedByteSizeValue(unsigned int value)
|
|||
BOOL ok=NO;
|
||||
NSString* pidstat = [self contentOfPIDFile: @"stat"];
|
||||
|
||||
NSDebugMLog(@"pidstat=%@",pidstat);
|
||||
if (pidstat)
|
||||
{
|
||||
NSRange cmdEnd=[pidstat rangeOfString:@") "];
|
||||
if (cmdEnd.length>0)
|
||||
{
|
||||
NSString* pid_cmd=[pidstat substringToIndex:cmdEnd.location];
|
||||
NSDebugMLog(@"pid_cmd=%@",pid_cmd);
|
||||
|
||||
if (cmdEnd.location+cmdEnd.length<[pidstat length])
|
||||
{
|
||||
NSString* stats=[pidstat substringFromIndex:cmdEnd.location+cmdEnd.length];
|
||||
|
@ -264,7 +262,6 @@ NSString* formattedByteSizeValue(unsigned int value)
|
|||
long cstime;
|
||||
long startTime;
|
||||
|
||||
NSDebugMLog(@"stats=%@",stats);
|
||||
if (sscanf(statsChars,
|
||||
"%c %d %d %d %d %d %lu %lu %lu %lu %lu %ld %ld %ld %ld %d "
|
||||
"%d %lu %lu %ld %lu %lu %lu %lu %lu %lu %lu %lu %LX %LX %LX %LX %lu",
|
||||
|
@ -341,7 +338,6 @@ NSString* formattedByteSizeValue(unsigned int value)
|
|||
if (linux_version_code < LINUX_VERSION(1,1,30) && P->tty != -1)
|
||||
P->tty = 4*0x100 + P->tty; // when tty wasn't full devno
|
||||
*/
|
||||
NSDebugMLog(@"residentMemorySize=%lu",_residentMemorySize);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -35,19 +35,17 @@ RCS_ID("$Id$")
|
|||
|
||||
#include "GSWeb.h"
|
||||
#include <Foundation/NSFileManager.h>
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWProjectBundle
|
||||
|
||||
-(id)initWithPath:(NSString*)aPath
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"aPath=%@",aPath);
|
||||
if ((self=[super initWithPath:aPath]))
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -75,14 +73,14 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(NSArray*)lockedPathsForResourcesOfType:(id)aType
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return [super lockedPathsForResourcesOfType:aType];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSArray*)lockedPathsForResourcesInSubprojectsOfType:(id)aType
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -90,7 +88,7 @@ RCS_ID("$Id$")
|
|||
-(NSString*)lockedRelativePathForResourceNamed:(NSString*)aName
|
||||
language:(NSString*)aLanguage
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return [super lockedRelativePathForResourceNamed:aName
|
||||
language:aLanguage];
|
||||
};
|
||||
|
@ -99,7 +97,7 @@ RCS_ID("$Id$")
|
|||
-(NSString*)lockedRelativePathForResourceNamed:(NSString*)aName
|
||||
languages:(NSArray*)someLanguages
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return [super lockedRelativePathForResourceNamed:aName
|
||||
languages:someLanguages];
|
||||
};
|
||||
|
@ -113,21 +111,21 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(BOOL)isFramework
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return NO;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWDeployedBundle*)projectBundle
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return [super projectBundle];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)projectPath
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -153,12 +151,8 @@ RCS_ID("$Id$")
|
|||
NSEnumerator* projectEnum = nil;
|
||||
NSEnumerator* projectSearchPathEnum=nil;
|
||||
NSString* path=nil;
|
||||
LOGClassFnStart();
|
||||
NSDebugMLLog(@"bundles",@"aName:%@",aName);
|
||||
NSDebugMLLog(@"bundles",@"isFramework=%s",(isFramework ? "YES" : "NO"));
|
||||
|
||||
projectSearchPath=[GSWApplication projectSearchPath]; // ("H:\\Wotests")
|
||||
NSDebugMLLog(@"bundles",@"projectSearchPath:%@",projectSearchPath);
|
||||
projectsBundles=[NSMutableArray array];
|
||||
|
||||
projectSearchPathEnum = [projectSearchPath objectEnumerator];
|
||||
|
@ -173,25 +167,17 @@ RCS_ID("$Id$")
|
|||
NSDictionary* attributes = [dirEnum fileAttributes];
|
||||
NSString* fileType = [attributes objectForKey:NSFileType];
|
||||
filePath=[path stringByAppendingFormat:@"/%@",filePath];
|
||||
NSDebugMLLog(@"bundles",@"filePath:%@",filePath);
|
||||
// NSDebugMLLog(@"bundles",@"attributes:%@",attributes);
|
||||
// NSDebugMLLog(@"bundles",@"fileType:%@",fileType);
|
||||
if ([fileType isEqual:NSFileTypeDirectory])
|
||||
{
|
||||
BOOL tmpBundleIsFramework=NO;
|
||||
NSString* tmpBundleProjectName=nil;
|
||||
GSWDeployedBundle* tmpBundle=(GSWDeployedBundle*)[GSWProjectBundle bundleWithPath:filePath];
|
||||
NSDebugMLLog(@"bundles",@"tmpBundle:%@",tmpBundle);
|
||||
tmpBundleProjectName=[tmpBundle projectName];
|
||||
NSDebugMLLog(@"bundles",@"tmpBundleProjectName:%@",tmpBundleProjectName);
|
||||
tmpBundleIsFramework=[tmpBundle isFramework];
|
||||
NSDebugMLLog(@"bundles",@"tmpBundleIsFramework=%s",
|
||||
(tmpBundleIsFramework ? "YES" : "NO"));
|
||||
//Why projectName...
|
||||
if ((isFramework && tmpBundleIsFramework)
|
||||
||(!isFramework && !tmpBundleIsFramework))
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"adding tmpBundle:%@",tmpBundleProjectName);
|
||||
[projectsBundles addObject:tmpBundle];
|
||||
};
|
||||
};
|
||||
|
@ -202,24 +188,18 @@ RCS_ID("$Id$")
|
|||
{
|
||||
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:suffix1]
|
||||
|| [[aBundle bundlePath]hasSuffix:suffix2]
|
||||
|| [[aBundle bundlePath]hasSuffix:@".debug"])
|
||||
{
|
||||
NSString* tmpName=[aBundle projectName];
|
||||
NSDebugMLLog(@"bundles",@"tmpName:%@",tmpName);
|
||||
if ([tmpName isEqual:aName])
|
||||
{
|
||||
projectBundle=aBundle;
|
||||
NSDebugMLLog(@"bundles",@"projectBundle:%@",projectBundle);
|
||||
};
|
||||
};
|
||||
};
|
||||
NSDebugMLLog(@"bundles",@"projectBundle:%@",projectBundle);
|
||||
LOGClassFnStop();
|
||||
return projectBundle;
|
||||
};
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(void)_setRecordingPath:(NSString*)recordingPath
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
|
||||
NSDebugMLog(@"recordingPath=%@",recordingPath);
|
||||
|
||||
|
@ -90,7 +89,6 @@ RCS_ID("$Id$")
|
|||
ExceptionRaise(@"GSWRecording: can't create directory '%@'",_recordingPath);
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -137,7 +135,6 @@ RCS_ID("$Id$")
|
|||
int i=0;
|
||||
int count=0;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
headerKeys=[message headerKeys];
|
||||
count=[headerKeys count];
|
||||
|
@ -164,7 +161,6 @@ RCS_ID("$Id$")
|
|||
|
||||
[headersString appendString:@"\r\n"];
|
||||
|
||||
LOGObjectFnStop();
|
||||
return headersString;
|
||||
}
|
||||
|
||||
|
@ -178,7 +174,6 @@ RCS_ID("$Id$")
|
|||
NSString* applicationURLPrefix=nil;
|
||||
NSStringEncoding contentEncoding=NSUTF8StringEncoding;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
response = (GSWResponse*)[[response copy]autorelease];
|
||||
sessionID = [response headerForKey:GSWHTTPHeader_RecordingSessionID[GSWebNamingConv]];
|
||||
|
@ -211,14 +206,12 @@ RCS_ID("$Id$")
|
|||
forKey:@"x-gsweb-unwildcarded-content-length"];
|
||||
[response setContent:contentData];
|
||||
|
||||
LOGObjectFnStop();
|
||||
return response;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)saveRequest:(GSWRequest*)request
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
|
||||
NSDebugMLog(@"_recordingStep=%d",_recordingStep);
|
||||
|
||||
|
@ -249,7 +242,6 @@ RCS_ID("$Id$")
|
|||
atomically:NO];
|
||||
};
|
||||
|
||||
LOGObjectFnStop();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -259,7 +251,6 @@ RCS_ID("$Id$")
|
|||
NSString* responseString=nil;
|
||||
NSString* headerString=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
NSDebugMLog(@"_recordingStep=%d",_recordingStep);
|
||||
|
||||
|
@ -289,7 +280,6 @@ RCS_ID("$Id$")
|
|||
|
||||
NSDebugMLog(@"_recordingStep=%d",_recordingStep);
|
||||
|
||||
LOGObjectFnStop();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -297,7 +287,6 @@ RCS_ID("$Id$")
|
|||
{
|
||||
GSWRequest* request=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
// Get the request
|
||||
request = (GSWRequest*)[notification object];
|
||||
|
@ -307,13 +296,11 @@ RCS_ID("$Id$")
|
|||
// Save it
|
||||
[self saveRequest:request];
|
||||
|
||||
LOGObjectFnStop();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_applicationDidDispatchRequest:(NSNotification*)notification
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
|
||||
NSDebugMLog(@"_request=%p",_request);
|
||||
|
||||
|
@ -326,7 +313,6 @@ RCS_ID("$Id$")
|
|||
[self saveResponse:response];
|
||||
}
|
||||
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
@end
|
||||
|
|
|
@ -223,8 +223,6 @@ Cf RFC 2616 (http://www.rfc-editor.org/rfc/rfc2616.txt)
|
|||
byLookingForCookieFirst:(BOOL)lookCookieFirst;
|
||||
-(NSDictionary*)uriOrFormOrCookiesElements;
|
||||
|
||||
-(void)_validateAPI;
|
||||
|
||||
-(NSString*) _originatingAddress;
|
||||
-(void) _setOriginatingAddress:(NSString*) anAddress;
|
||||
- (uint16_t) _originatingPort;
|
||||
|
|
|
@ -34,6 +34,9 @@ RCS_ID("$Id$")
|
|||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/GSMime.h>
|
||||
#include <GNUstepBase/GSObjCRuntime.h>
|
||||
#include <GNUstepBase/NSString+GNUstepBase.h>
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
#include "GSWInputStreamData.h"
|
||||
#include "GSWPrivate.h"
|
||||
|
||||
|
@ -116,7 +119,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
if (qualitySeparatorRange.location==0)
|
||||
{
|
||||
LOGError(@"value/quality string: '%@'",string);
|
||||
// LOGError(@"value/quality string: '%@'",string);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -239,7 +242,6 @@ RCS_ID("$Id$")
|
|||
[self _setIsUsingWebServer:(adaptorVersion!=nil)];
|
||||
|
||||
_uri = [[GSWDynamicURLString alloc] initWithString:anURL];
|
||||
[_uri checkURL];
|
||||
|
||||
if (!content)
|
||||
content = [NSData data];
|
||||
|
@ -526,7 +528,7 @@ RCS_ID("$Id$")
|
|||
NSArray* languages=[GSWValueQualityHeaderPart valuesFromHeaderString:header];
|
||||
if (!languages)
|
||||
{
|
||||
LOGError0(@"No languages");
|
||||
// LOGError0(@"No languages");
|
||||
};
|
||||
browserLanguages=(NSMutableArray*)[GSWResourceManager GSLanguagesFromISOLanguages:languages];
|
||||
if (browserLanguages)
|
||||
|
@ -556,12 +558,12 @@ RCS_ID("$Id$")
|
|||
}
|
||||
else
|
||||
{
|
||||
LOGError0(@"No languages header");
|
||||
//LOGError0(@"No languages header");
|
||||
};
|
||||
|
||||
if (!browserLanguages)
|
||||
{
|
||||
LOGError0(@"No known languages");
|
||||
//LOGError0(@"No known languages");
|
||||
browserLanguages=(NSMutableArray*)[NSArray array];
|
||||
};
|
||||
ASSIGN(_browserLanguages,browserLanguages);
|
||||
|
@ -681,7 +683,6 @@ RCS_ID("$Id$")
|
|||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"GSWRequest formValueKeys");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
};
|
||||
NS_ENDHANDLER;
|
||||
|
@ -802,7 +803,6 @@ RCS_ID("$Id$")
|
|||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"GSWRequest formValues");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
};
|
||||
NS_ENDHANDLER;
|
||||
|
@ -910,7 +910,6 @@ RCS_ID("$Id$")
|
|||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"GSWRequest uriElementKeys");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
};
|
||||
NS_ENDHANDLER;
|
||||
|
@ -933,7 +932,6 @@ RCS_ID("$Id$")
|
|||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"GSWRequest uriElementForKey:");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
};
|
||||
NS_ENDHANDLER;
|
||||
|
@ -956,7 +954,6 @@ RCS_ID("$Id$")
|
|||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"GSWRequest uriElements");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
};
|
||||
NS_ENDHANDLER;
|
||||
|
@ -1429,7 +1426,7 @@ RCS_ID("$Id$")
|
|||
isSecure:(BOOL)isSecure
|
||||
port:(int)port
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -1938,7 +1935,7 @@ into
|
|||
//--------------------------------------------------------------------
|
||||
-(id)nonNilFormValueForKey:(NSString*)key
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -1947,21 +1944,21 @@ into
|
|||
//--------------------------------------------------------------------
|
||||
-(id)dictionaryWithKeys:(id)unknown
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)selectedButtonName
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)valueFromImageMapNamed:(NSString*)aName
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -1969,35 +1966,35 @@ into
|
|||
-(id)valueFromImageMapNamed:(NSString*)aName
|
||||
inFramework:(NSString*)aFramework
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)valueFromImageMap:(id)unknown
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)yCoord
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)xCoord
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)formKeyWithSuffix:(NSString*)suffix
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -2008,7 +2005,7 @@ into
|
|||
|
||||
-(NSString*)applicationHost
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -2280,11 +2277,6 @@ into
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_validateAPI
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
|
||||
-(NSString*) _originatingAddress
|
||||
{
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWRequestHandler
|
||||
|
@ -45,13 +46,13 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(void)lock
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)unlock
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
}
|
||||
|
||||
+(id)handler
|
||||
|
|
|
@ -41,8 +41,7 @@ RCS_ID("$Id$")
|
|||
contentElements:(NSArray*)elements
|
||||
{
|
||||
NSMutableDictionary* tmpAssociations=[NSMutableDictionary dictionaryWithDictionary:associations];
|
||||
LOGObjectFnStartC("GSWResetButton");
|
||||
NSDebugMLLog(@"gswdync",@"aName=%@ associations:%@ elements=%@",aName,associations,elements);
|
||||
|
||||
[tmpAssociations setObject:[GSWAssociation associationWithValue:@"reset"]
|
||||
forKey:@"type"];
|
||||
|
||||
|
@ -55,7 +54,7 @@ RCS_ID("$Id$")
|
|||
contentElements:nil]))
|
||||
{
|
||||
};
|
||||
LOGObjectFnStopC("GSWResetButton");
|
||||
|
||||
return self;
|
||||
};
|
||||
|
||||
|
|
|
@ -208,8 +208,6 @@ bundle if none is found
|
|||
-(NSString*)pathForResourceNamed:(NSString*)name
|
||||
inFramework:(NSString*)frameworkName;
|
||||
|
||||
-(void)_validateAPI;
|
||||
|
||||
+(NSString*)GSLanguageFromISOLanguage:(NSString*)ISOLanguage; //NDFN
|
||||
+(NSArray*)GSLanguagesFromISOLanguages:(NSArray*)ISOlanguages; //NDFN
|
||||
+(NSString*)ISOLanguageFromGSLanguage:(NSString*)GSLanguage; //NDFN
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -33,6 +33,7 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWResourceRequestHandler
|
||||
|
@ -45,35 +46,31 @@ RCS_ID("$Id$")
|
|||
GSWResponse* response=nil;
|
||||
NSString* gswdata=nil;
|
||||
NSDictionary* elements=nil;
|
||||
LOGObjectFnStart();
|
||||
|
||||
elements=[aRequest uriOrFormOrCookiesElements];
|
||||
NSDebugMLog(@"elements=%@",elements);
|
||||
gswdata=[elements objectForKey:GSWKey_Data[GSWebNamingConv]];
|
||||
NSDebugMLog(@"gswdata=%@",gswdata);
|
||||
|
||||
if (gswdata)
|
||||
response=[self _responseForDataCachedWithKey:gswdata];
|
||||
else
|
||||
{
|
||||
ExceptionRaise0(@"GSWResourceRequestHandler",@"No data key in request");
|
||||
LOGError0(@"");//TODO
|
||||
};
|
||||
NSDebugMLog(@"response=%@",response);
|
||||
{
|
||||
ExceptionRaise0(@"GSWResourceRequestHandler",@"No data key in request");
|
||||
};
|
||||
[response _finalizeInContext:nil];
|
||||
LOGObjectFnStop();
|
||||
return response;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWResponse*)_responseForJavaClassAtPath:(NSString*)aPath
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWResponse*)_responseForDataAtPath:(NSString*)aPath
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -84,22 +81,20 @@ RCS_ID("$Id$")
|
|||
GSWResponse* response=nil;
|
||||
GSWResourceManager* resourceManager=nil;
|
||||
GSWURLValuedElementData* data=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLog(@"aKey=%@",aKey);
|
||||
|
||||
response=[GSWApp createResponseInContext:nil];
|
||||
resourceManager=[[GSWApplication application] resourceManager];
|
||||
data=[resourceManager _cachedDataForKey:aKey];
|
||||
NSDebugMLog(@"data=%@",data);
|
||||
|
||||
if (data)
|
||||
[data appendToResponse:response
|
||||
inContext:nil];
|
||||
else
|
||||
{
|
||||
LOGSeriousError(@"No data for key '%@'",
|
||||
aKey);
|
||||
// LOGSeriousError(@"No data for key '%@'",
|
||||
// aKey);
|
||||
//TODO
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return response;
|
||||
};
|
||||
|
||||
|
@ -107,7 +102,7 @@ RCS_ID("$Id$")
|
|||
-(GSWResponse*)_generateResponseForData:(NSData*)aData
|
||||
mimeType:(NSString*)mimeType
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ RCS_ID("$Id$")
|
|||
#include "GSWeb.h"
|
||||
#include "NSData+Compress.h"
|
||||
#include "GSWPrivate.h"
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWResponse
|
||||
|
@ -97,14 +98,12 @@ void GSWResponse_appendTagAttributeValueEscapingHTMLAttributeValue(GSWResponse*
|
|||
-(id)init
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
if ((self=[super init]))
|
||||
{
|
||||
GetGSWResponseIMPs(&_selfIMPs,self);
|
||||
_canDisableClientCaching=YES;
|
||||
_status=200;
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
|
@ -191,7 +190,6 @@ void GSWResponse_appendTagAttributeValueEscapingHTMLAttributeValue(GSWResponse*
|
|||
//--------------------------------------------------------------------
|
||||
-(void)disableClientCaching
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
|
||||
if (!_isClientCachingDisabled && _canDisableClientCaching)
|
||||
{
|
||||
|
@ -208,14 +206,12 @@ void GSWResponse_appendTagAttributeValueEscapingHTMLAttributeValue(GSWResponse*
|
|||
_isClientCachingDisabled=YES;
|
||||
};
|
||||
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)description
|
||||
{
|
||||
NSString* description=nil;
|
||||
LOGObjectFnStart();
|
||||
description=[NSString stringWithFormat:
|
||||
@"<%s %p - httpVersion=%@ status=%d headers=%p contentFaults=%p contentData=%p contentEncoding=%d userInfo=%p>",
|
||||
object_getClassName(self),
|
||||
|
@ -227,7 +223,6 @@ void GSWResponse_appendTagAttributeValueEscapingHTMLAttributeValue(GSWResponse*
|
|||
(void*)_contentData,
|
||||
(int)_contentEncoding,
|
||||
(void*)_userInfo];
|
||||
LOGObjectFnStop();
|
||||
return description;
|
||||
}
|
||||
|
||||
|
@ -318,25 +313,15 @@ void GSWResponse_appendTagAttributeValueEscapingHTMLAttributeValue(GSWResponse*
|
|||
NSString* dataLengthString=nil;
|
||||
NSData* content=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
NSAssert(!_isFinalizeInContextHasBeenCalled,@"GSWResponse _finalizeInContext: already called");
|
||||
|
||||
#ifndef NDEBUG
|
||||
if(GSDebugSet(@"GSWDocStructure"))
|
||||
{
|
||||
NSString* docStructure=[aContext docStructure];
|
||||
if (docStructure)
|
||||
GSWResponse_appendContentString(self,
|
||||
([NSString stringWithFormat:@"\n<!-- %@ -->\n",docStructure]));
|
||||
}
|
||||
#endif
|
||||
|
||||
//TODOV: if !session in request and session created: no client cache
|
||||
if (![self _isClientCachingDisabled] && [aContext hasSession] && ![aContext _requestSessionID])
|
||||
[self disableClientCaching];
|
||||
|
||||
[self _resolveContentFaultsInContext:aContext];
|
||||
// where does this come from?
|
||||
//[self _resolveContentFaultsInContext:aContext];
|
||||
|
||||
// Finalize cookies
|
||||
[self _finalizeCookiesInContext:aContext];
|
||||
|
@ -356,17 +341,14 @@ void GSWResponse_appendTagAttributeValueEscapingHTMLAttributeValue(GSWResponse*
|
|||
|
||||
content=[self content];
|
||||
dataLength=[self _contentLength];
|
||||
NSDebugMLog(@"dataLength=%d",dataLength);
|
||||
|
||||
dataLengthString=GSWIntToNSString(dataLength);
|
||||
|
||||
[self setHeader:dataLengthString
|
||||
forKey:GSWHTTPHeader_ContentLength];
|
||||
NSDebugMLLog(@"low",@"headers:%@",_headers);
|
||||
|
||||
_isFinalizeInContextHasBeenCalled=YES;
|
||||
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -397,13 +379,13 @@ escapingHTMLAttributeValue:(BOOL)escape
|
|||
@implementation GSWResponse (GSWResponseB)
|
||||
-(void)_resolveContentFaultsInContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_appendContentFault:(id)unknown
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
@end
|
||||
|
@ -431,7 +413,7 @@ escapingHTMLAttributeValue:(BOOL)escape
|
|||
//--------------------------------------------------------------------
|
||||
-(BOOL)_responseIsEqual:(GSWResponse*)aResponse
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return NO;
|
||||
};
|
||||
|
||||
|
@ -486,7 +468,6 @@ escapingHTMLAttributeValue:(BOOL)escape
|
|||
{
|
||||
GSWResponse* aResponse=nil;
|
||||
NSString* httpVersion=nil;
|
||||
LOGClassFnStart();
|
||||
aResponse=[GSWApp createResponseInContext:aContext];
|
||||
if (aResponse)
|
||||
{
|
||||
|
@ -505,7 +486,6 @@ escapingHTMLAttributeValue:(BOOL)escape
|
|||
if (forceFinalize)
|
||||
[aResponse forceFinalizeInContext];
|
||||
};
|
||||
LOGClassFnStop();
|
||||
return aResponse;
|
||||
};
|
||||
|
||||
|
@ -522,7 +502,6 @@ escapingHTMLAttributeValue:(BOOL)escape
|
|||
{
|
||||
GSWResponse* response=nil;
|
||||
NSString* httpVersion=nil;
|
||||
LOGClassFnStart();
|
||||
response=[GSWApp createResponseInContext:aContext];
|
||||
if (response)
|
||||
{
|
||||
|
@ -560,7 +539,6 @@ escapingHTMLAttributeValue:(BOOL)escape
|
|||
[aContext _setResponse:response];
|
||||
}
|
||||
};
|
||||
LOGClassFnStop();
|
||||
return response;
|
||||
};
|
||||
|
||||
|
@ -604,7 +582,6 @@ escapingHTMLAttributeValue:(BOOL)escape
|
|||
{
|
||||
GSWResponse* response=nil;
|
||||
NSString* httpVersion=nil;
|
||||
LOGClassFnStart();
|
||||
response=[GSWApp createResponseInContext:aContext];
|
||||
if (response)
|
||||
{
|
||||
|
@ -627,7 +604,6 @@ escapingHTMLAttributeValue:(BOOL)escape
|
|||
[aContext _setResponse:response];
|
||||
}
|
||||
};
|
||||
LOGClassFnStop();
|
||||
return response;
|
||||
};
|
||||
|
||||
|
@ -639,13 +615,11 @@ escapingHTMLAttributeValue:(BOOL)escape
|
|||
isDefinitive:(BOOL)isDefinitive
|
||||
{
|
||||
GSWResponse* response=nil;
|
||||
LOGClassFnStart();
|
||||
response=[self generateRedirectResponseWithMessage:message
|
||||
location:location
|
||||
isDefinitive:isDefinitive
|
||||
inContext:nil
|
||||
forRequest:nil];
|
||||
LOGClassFnStop();
|
||||
return response;
|
||||
};
|
||||
|
||||
|
@ -657,7 +631,6 @@ escapingHTMLAttributeValue:(BOOL)escape
|
|||
{
|
||||
NSString* message=nil;
|
||||
GSWResponse* response=nil;
|
||||
LOGClassFnStart();
|
||||
message=[NSString stringWithFormat:@"This page has been moved%s to <a HREF=\"%@\">%@</a>",
|
||||
(isDefinitive ? "" : " temporarily"),
|
||||
location,
|
||||
|
@ -667,7 +640,6 @@ escapingHTMLAttributeValue:(BOOL)escape
|
|||
isDefinitive:isDefinitive
|
||||
inContext:aContext
|
||||
forRequest:aRequest];
|
||||
LOGClassFnStop();
|
||||
return response;
|
||||
};
|
||||
|
||||
|
@ -676,12 +648,10 @@ escapingHTMLAttributeValue:(BOOL)escape
|
|||
isDefinitive:(BOOL)isDefinitive
|
||||
{
|
||||
GSWResponse* response=nil;
|
||||
LOGClassFnStart();
|
||||
response=[self generateRedirectDefaultResponseWithLocation:location
|
||||
isDefinitive:isDefinitive
|
||||
inContext:nil
|
||||
forRequest:nil];
|
||||
LOGClassFnStop();
|
||||
return response;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,12 +38,11 @@ RCS_ID("$Id$")
|
|||
-(id)init
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
if ((self=[super init]))
|
||||
{
|
||||
_sessions=[NSMutableDictionary new];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
|
||||
return self;
|
||||
};
|
||||
|
||||
|
@ -71,9 +70,8 @@ RCS_ID("$Id$")
|
|||
//OK
|
||||
GSWSession* session=nil;
|
||||
NSString* sessionID=nil;
|
||||
LOGObjectFnStart();
|
||||
session=[aContext existingSession];
|
||||
NSDebugMLLog(@"sessions",@"session=%@",session);
|
||||
|
||||
if (!session)
|
||||
{
|
||||
[NSException raise:@"IllegalStateException"
|
||||
|
@ -82,14 +80,11 @@ RCS_ID("$Id$")
|
|||
|
||||
sessionID=[session sessionID];
|
||||
NSAssert(sessionID,@"No _sessionID!");
|
||||
NSDebugMLLog(@"sessions",@"_sessionID=%@",sessionID);
|
||||
|
||||
[_sessions setObject:session
|
||||
forKey:sessionID];
|
||||
|
||||
NSDebugMLLog(@"sessions",@"session=%@",session);
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
/** Should be Locked **/
|
||||
|
@ -123,10 +118,8 @@ RCS_ID("$Id$")
|
|||
{
|
||||
BOOL contain = NO;
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
if([_sessions objectForKey:aSessionID])
|
||||
contain = YES;
|
||||
LOGObjectFnStop();
|
||||
return contain;
|
||||
};
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
|
||||
-(void)savePage:(GSWComponent*)page;
|
||||
-(GSWComponent*)restorePageForContextID:(NSString*)aContextID;
|
||||
-(unsigned int)permanentPageCacheSize;
|
||||
-(NSUInteger)permanentPageCacheSize;
|
||||
-(void)savePageInPermanentCache:(GSWComponent*)page;
|
||||
|
||||
// SessionF
|
||||
|
@ -135,10 +135,10 @@
|
|||
-(NSString*)_contextIDMatchingIDsInContext:(GSWContext*)aContext;
|
||||
-(void)_rearrangeContextArrayStackForContextID:(NSString*)contextID;
|
||||
-(NSMutableArray*)_contextArrayForContextID:(NSString*)aContextID
|
||||
stackIndex:(unsigned int*)pStackIndex
|
||||
contextArrayIndex:(unsigned int*)pContextArrayIndex;
|
||||
stackIndex:(NSUInteger*)pStackIndex
|
||||
contextArrayIndex:(NSUInteger*)pContextArrayIndex;
|
||||
-(void)_replacePage:(GSWComponent*)page;
|
||||
-(unsigned int)pageCacheSize;
|
||||
-(NSUInteger)pageCacheSize;
|
||||
-(void)_saveCurrentPage;
|
||||
-(int)_requestCounter;
|
||||
-(void)_contextDidIncrementContextID;
|
||||
|
@ -220,10 +220,5 @@ Returns first element of languages or nil if languages is empty
|
|||
|
||||
-(GSWApplication*)application;
|
||||
|
||||
-(void)_validateAPI;
|
||||
|
||||
+(void)__setContextCounterIncrementingEnabled:(BOOL)flag;
|
||||
+(int)__counterIncrementingEnabledFlag;
|
||||
|
||||
@end
|
||||
#endif
|
||||
|
|
|
@ -33,7 +33,9 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/GSCategories.h>
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
#include <GNUstepBase/NSData+GNUstepBase.h>
|
||||
#include <GNUstepBase/NSString+GNUstepBase.h>
|
||||
|
||||
#include <time.h>
|
||||
#if __linux__
|
||||
|
@ -145,85 +147,76 @@ extern id gcObjectsToBeVisited;
|
|||
struct sysinfo info;
|
||||
if ((sysinfo(&info)) == 0)
|
||||
{
|
||||
unsigned int rnd;
|
||||
NSUInteger rnd;
|
||||
|
||||
// >0 test is to ignore not changing elements
|
||||
|
||||
if (sizeToFill>=sizeof(unsigned int) && info.uptime>0)
|
||||
if (sizeToFill>=sizeof(NSUInteger) && info.uptime>0)
|
||||
{
|
||||
rnd=(unsigned)(((float)UINT_MAX)*rand()/(RAND_MAX+1.0));
|
||||
NSDebugMLog(@"UPTIME %ld",(long)info.uptime);
|
||||
*((unsigned int*)pMd5Data)=(((unsigned int)(info.uptime)) ^ rnd);
|
||||
sizeToFill-=sizeof(unsigned int);
|
||||
pMd5Data+=sizeof(unsigned int);
|
||||
*((NSUInteger*)pMd5Data)=(((NSUInteger)(info.uptime)) ^ rnd);
|
||||
sizeToFill-=sizeof(NSUInteger);
|
||||
pMd5Data+=sizeof(NSUInteger);
|
||||
}
|
||||
|
||||
if (sizeToFill>=sizeof(unsigned int) && info.loads[0]>0)
|
||||
if (sizeToFill>=sizeof(NSUInteger) && info.loads[0]>0)
|
||||
{
|
||||
rnd=(unsigned)(((float)UINT_MAX)*rand()/(RAND_MAX+1.0));
|
||||
NSDebugMLog(@"loads[0] %ld",(long)info.loads[0]);
|
||||
*((unsigned int*)pMd5Data)=(((unsigned int)(info.loads[0] >> 4)) ^ rnd);
|
||||
sizeToFill-=sizeof(unsigned int);
|
||||
pMd5Data+=sizeof(unsigned int);
|
||||
*((NSUInteger*)pMd5Data)=(((NSUInteger)(info.loads[0] >> 4)) ^ rnd);
|
||||
sizeToFill-=sizeof(NSUInteger);
|
||||
pMd5Data+=sizeof(NSUInteger);
|
||||
}
|
||||
|
||||
if (sizeToFill>=sizeof(unsigned int) && info.loads[1]>0)
|
||||
if (sizeToFill>=sizeof(NSUInteger) && info.loads[1]>0)
|
||||
{
|
||||
rnd=(unsigned)(((float)UINT_MAX)*rand()/(RAND_MAX+1.0));
|
||||
NSDebugMLog(@"loads[1] %ld",(long)info.loads[1]);
|
||||
*((unsigned int*)pMd5Data)=(((unsigned int)(info.loads[1] >> 4)) ^ rnd);
|
||||
sizeToFill-=sizeof(unsigned int);
|
||||
pMd5Data+=sizeof(unsigned int);
|
||||
*((NSUInteger*)pMd5Data)=(((NSUInteger)(info.loads[1] >> 4)) ^ rnd);
|
||||
sizeToFill-=sizeof(NSUInteger);
|
||||
pMd5Data+=sizeof(NSUInteger);
|
||||
}
|
||||
|
||||
if (sizeToFill>=sizeof(unsigned int) && info.loads[2]>0)
|
||||
if (sizeToFill>=sizeof(NSUInteger) && info.loads[2]>0)
|
||||
{
|
||||
rnd=(unsigned)(((float)UINT_MAX)*rand()/(RAND_MAX+1.0));
|
||||
NSDebugMLog(@"loads[2] %ld",(long)info.loads[2]);
|
||||
*((unsigned int*)pMd5Data)=(((unsigned int)(info.loads[2] >> 4)) ^ rnd);
|
||||
sizeToFill-=sizeof(unsigned int);
|
||||
pMd5Data+=sizeof(unsigned int);
|
||||
*((NSUInteger*)pMd5Data)=(((NSUInteger)(info.loads[2] >> 4)) ^ rnd);
|
||||
sizeToFill-=sizeof(NSUInteger);
|
||||
pMd5Data+=sizeof(NSUInteger);
|
||||
}
|
||||
|
||||
if (sizeToFill>=sizeof(unsigned int) && info.freeram>0)
|
||||
if (sizeToFill>=sizeof(NSUInteger) && info.freeram>0)
|
||||
{
|
||||
NSDebugMLog(@"freeram %ld",(unsigned long)info.freeram);
|
||||
rnd=(unsigned)(((float)UINT_MAX)*rand()/(RAND_MAX+1.0));
|
||||
*((unsigned int*)pMd5Data)=(((unsigned int)(info.freeram >> 4)) ^ rnd); // Drop 4 minor bits
|
||||
sizeToFill-=sizeof(unsigned int);
|
||||
pMd5Data+=sizeof(unsigned int);
|
||||
*((NSUInteger*)pMd5Data)=(((NSUInteger)(info.freeram >> 4)) ^ rnd); // Drop 4 minor bits
|
||||
sizeToFill-=sizeof(NSUInteger);
|
||||
pMd5Data+=sizeof(NSUInteger);
|
||||
}
|
||||
|
||||
if (sizeToFill>=sizeof(unsigned int) && info.sharedram>0)
|
||||
if (sizeToFill>=sizeof(NSUInteger) && info.sharedram>0)
|
||||
{
|
||||
NSDebugMLog(@"sharedram %ld",(unsigned long)info.sharedram);
|
||||
rnd=(unsigned)(((float)UINT_MAX)*rand()/(RAND_MAX+1.0));
|
||||
*((unsigned int*)pMd5Data)=(((unsigned int)(info.sharedram >> 4)) ^ rnd); // Drop 4 minor bits
|
||||
sizeToFill-=sizeof(unsigned int);
|
||||
pMd5Data+=sizeof(unsigned int);
|
||||
*((NSUInteger*)pMd5Data)=(((NSUInteger)(info.sharedram >> 4)) ^ rnd); // Drop 4 minor bits
|
||||
sizeToFill-=sizeof(NSUInteger);
|
||||
pMd5Data+=sizeof(NSUInteger);
|
||||
}
|
||||
|
||||
if (sizeToFill>=sizeof(unsigned int) && info.freeswap>0)
|
||||
if (sizeToFill>=sizeof(NSUInteger) && info.freeswap>0)
|
||||
{
|
||||
NSDebugMLog(@"freeswap %ld",(unsigned long)info.freeswap);
|
||||
rnd=(unsigned)(((float)UINT_MAX)*rand()/(RAND_MAX+1.0));
|
||||
*((unsigned int*)pMd5Data)=(((unsigned int)(info.freeswap >> 4)) ^ rnd); // Drop 4 minor bits
|
||||
sizeToFill-=sizeof(unsigned int);
|
||||
pMd5Data+=sizeof(unsigned int);
|
||||
*((NSUInteger*)pMd5Data)=(((NSUInteger)(info.freeswap >> 4)) ^ rnd); // Drop 4 minor bits
|
||||
sizeToFill-=sizeof(NSUInteger);
|
||||
pMd5Data+=sizeof(NSUInteger);
|
||||
}
|
||||
|
||||
if (sizeToFill>=sizeof(unsigned int) && info.bufferram>0)
|
||||
if (sizeToFill>=sizeof(NSUInteger) && info.bufferram>0)
|
||||
{
|
||||
NSDebugMLog(@"bufferram %ld",(unsigned long)info.bufferram);
|
||||
rnd=(unsigned)(((float)UINT_MAX)*rand()/(RAND_MAX+1.0));
|
||||
*((unsigned int*)pMd5Data)=(((unsigned int)(info.bufferram >> 4)) ^ rnd); // Drop 4 minor bits
|
||||
sizeToFill-=sizeof(unsigned int);
|
||||
pMd5Data+=sizeof(unsigned int);
|
||||
*((NSUInteger*)pMd5Data)=(((NSUInteger)(info.bufferram >> 4)) ^ rnd); // Drop 4 minor bits
|
||||
sizeToFill-=sizeof(NSUInteger);
|
||||
pMd5Data+=sizeof(NSUInteger);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
NSDebugMLog(@"sizeToFill %d",sizeToFill);
|
||||
while(sizeToFill>0)
|
||||
{
|
||||
*((unsigned char*)pMd5Data)=(unsigned char)(256.0*rand()/(RAND_MAX+1.0));
|
||||
|
@ -239,7 +232,7 @@ extern id gcObjectsToBeVisited;
|
|||
//--------------------------------------------------------------------
|
||||
-(void)encodeWithCoder:(NSCoder*)coder
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
/*
|
||||
[coder_ encodeObject:sessionID];
|
||||
[coder_ encodeObject:languages];
|
||||
|
@ -252,7 +245,7 @@ extern id gcObjectsToBeVisited;
|
|||
//--------------------------------------------------------------------
|
||||
-(id)initWithCoder: (NSCoder*)coder
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
/*
|
||||
[coder_ decodeValueOfObjCType: @encode(id) at:&sessionID];
|
||||
[coder_ decodeValueOfObjCType: @encode(id) at:&languages];
|
||||
|
@ -287,15 +280,7 @@ extern id gcObjectsToBeVisited;
|
|||
-(NSString*)description
|
||||
{
|
||||
NSString* dscr=nil;
|
||||
GSWLogAssertGood(self);
|
||||
/*
|
||||
NSDebugMLLog(@"sessions",@"selfCount=%u",(unsigned int)[self retainCount]);
|
||||
NSDebugMLLog(@"sessions",@"sessionIDCount=%u",(unsigned int)[sessionID retainCount]);
|
||||
*/
|
||||
// dscr=[NSString stringWithFormat:@"<%s %p>",
|
||||
// object_getClassName(self),
|
||||
// (void*)self];
|
||||
|
||||
|
||||
dscr=[NSString stringWithFormat:@"<%s %p - sessionID=%@ autoreleasePool=%p timeOut=%f contextArrayStack=%@",
|
||||
object_getClassName(self),
|
||||
(void*)self,
|
||||
|
@ -303,26 +288,7 @@ extern id gcObjectsToBeVisited;
|
|||
(void*)_autoreleasePool,
|
||||
_timeOut,
|
||||
_contextArrayStack];
|
||||
/*
|
||||
dscr=[dscr stringByAppendingFormat:@" contextRecords=%@ editingContext=%p languages=%@ componentState=%@ birthDate=%@",
|
||||
contextRecords,
|
||||
(void*)editingContext,
|
||||
languages,
|
||||
componentState,
|
||||
birthDate];
|
||||
|
||||
dscr=[dscr stringByAppendingFormat:@" statistics=%@ formattedStatistics=%@ currentContext=%p permanentPageCache=%@",
|
||||
statistics,
|
||||
formattedStatistics,
|
||||
(void*)currentContext,
|
||||
permanentPageCache];
|
||||
|
||||
dscr=[dscr stringByAppendingFormat:@" permanentContextIDArray=%@ contextCounter=%d requestCounter=%d isAllowedToViewStatistics=%s",
|
||||
permanentContextIDArray,
|
||||
contextCounter,
|
||||
requestCounter,
|
||||
isAllowedToViewStatistics ? "YES" : "NO"];
|
||||
*/
|
||||
dscr=[dscr stringByAppendingFormat:@" isTerminating=%s isDistributionEnabled=%s storesIDsInCookies=%s storesIDsInURLs=%s hasSessionLockedEditingContext=%s>",
|
||||
_isTerminating ? "YES" : "NO",
|
||||
_isDistributionEnabled ? "YES" : "NO",
|
||||
|
@ -355,30 +321,28 @@ extern id gcObjectsToBeVisited;
|
|||
//OK
|
||||
|
||||
if (!_domainForIDCookies)
|
||||
{
|
||||
GSWContext* context=nil;
|
||||
GSWRequest* request=nil;
|
||||
NSString* applicationName=nil;
|
||||
NSString* adaptorPrefix=nil;
|
||||
[[GSWApplication application]lock];
|
||||
context=[self context];
|
||||
request=[context request];
|
||||
applicationName=[request applicationName];
|
||||
NSDebugMLLog(@"sessions",@"applicationName=%@",applicationName);
|
||||
adaptorPrefix=[request adaptorPrefix];
|
||||
NSDebugMLLog(@"sessions",@"adaptorPrefix=%@",adaptorPrefix);
|
||||
[[GSWApplication application]unlock];
|
||||
ASSIGN(_domainForIDCookies,
|
||||
([NSString stringWithFormat:@"%@/%@.%@",
|
||||
adaptorPrefix,
|
||||
applicationName,
|
||||
GSWApplicationSuffix[GSWebNamingConv]]));
|
||||
}
|
||||
|
||||
NSDebugMLLog(@"sessions",@"_domainForIDCookies=%@",_domainForIDCookies);
|
||||
|
||||
{
|
||||
GSWContext* context=nil;
|
||||
GSWRequest* request=nil;
|
||||
NSString* applicationName=nil;
|
||||
NSString* adaptorPrefix=nil;
|
||||
|
||||
[[GSWApplication application]lock];
|
||||
|
||||
context=[self context];
|
||||
request=[context request];
|
||||
applicationName=[request applicationName];
|
||||
adaptorPrefix=[request adaptorPrefix];
|
||||
|
||||
[[GSWApplication application]unlock];
|
||||
|
||||
ASSIGN(_domainForIDCookies,
|
||||
([NSString stringWithFormat:@"%@/%@.%@",
|
||||
adaptorPrefix,
|
||||
applicationName,
|
||||
GSWApplicationSuffix[GSWebNamingConv]]));
|
||||
}
|
||||
|
||||
|
||||
return _domainForIDCookies;
|
||||
}
|
||||
|
||||
|
@ -402,11 +366,8 @@ extern id gcObjectsToBeVisited;
|
|||
-(NSDate*)expirationDateForIDCookies
|
||||
{
|
||||
NSDate* expirationDateForIDCookies=nil;
|
||||
NSDebugMLLog(@"sessions",@"timeOut=%f",(double)_timeOut);
|
||||
expirationDateForIDCookies=[NSDate dateWithTimeIntervalSinceNow:_timeOut];
|
||||
NSDebugMLLog(@"sessions",@"expirationDateForIDCookies=%@ (HTML: %@)",
|
||||
expirationDateForIDCookies,
|
||||
[expirationDateForIDCookies htmlDescription]);
|
||||
|
||||
return expirationDateForIDCookies;
|
||||
}
|
||||
|
||||
|
@ -419,7 +380,6 @@ extern id gcObjectsToBeVisited;
|
|||
//--------------------------------------------------------------------
|
||||
-(void)setStoresIDsInCookies:(BOOL)flag
|
||||
{
|
||||
NSDebugMLLog(@"sessions",@"newflag=%d",(int)flag);
|
||||
if (flag!=_storesIDsInCookies)
|
||||
{
|
||||
_storesIDsInCookies=flag;
|
||||
|
@ -518,10 +478,6 @@ extern id gcObjectsToBeVisited;
|
|||
|
||||
ASSIGNCOPY(_sessionID,aSessionID);
|
||||
|
||||
if (_sessionID)
|
||||
{
|
||||
NSDebugMLLog(@"sessions",@"sessionIDCount=%u",[_sessionID retainCount]);
|
||||
}
|
||||
application=[GSWApplication application];
|
||||
//applic statisticsStore
|
||||
//applic _activeSessionsCount
|
||||
|
@ -703,7 +659,6 @@ extern id gcObjectsToBeVisited;
|
|||
NSArray* contextArray=nil;
|
||||
GSWTransactionRecord* transactionRecord=nil;
|
||||
|
||||
GSWLogAssertGood(self);
|
||||
NSAssert(aContextID,@"No contextID");
|
||||
NSAssert([aContextID length]>0,@"contextID empty");
|
||||
|
||||
|
@ -712,13 +667,12 @@ extern id gcObjectsToBeVisited;
|
|||
if (transactionRecord)
|
||||
{
|
||||
page=[transactionRecord responsePage];
|
||||
GSWLogAssertGood(page);
|
||||
}
|
||||
|
||||
if (page) // will put it at the end of the stack
|
||||
{
|
||||
unsigned int stackIndex=0;
|
||||
unsigned int contextArrayIndex=0;
|
||||
NSUInteger stackIndex=0;
|
||||
NSUInteger contextArrayIndex=0;
|
||||
|
||||
contextArray=[self _contextArrayForContextID:aContextID
|
||||
stackIndex:&stackIndex
|
||||
|
@ -737,8 +691,6 @@ extern id gcObjectsToBeVisited;
|
|||
if ([_permanentPageCache objectForKey:aContextID])
|
||||
page=[self _permanentPageWithContextID:aContextID];
|
||||
|
||||
NSAssert(self,@"self");
|
||||
|
||||
[page _awakeInContext:_currentContext];
|
||||
|
||||
return page;
|
||||
|
@ -746,7 +698,7 @@ extern id gcObjectsToBeVisited;
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
//NDFN
|
||||
-(unsigned int)permanentPageCacheSize
|
||||
-(NSUInteger)permanentPageCacheSize
|
||||
{
|
||||
return [GSWApp permanentPageCacheSize];
|
||||
}
|
||||
|
@ -756,7 +708,7 @@ extern id gcObjectsToBeVisited;
|
|||
{
|
||||
GSWContext* context=nil;
|
||||
NSMutableDictionary* permanentPageCache=nil;
|
||||
unsigned int permanentPageCacheSize=0;
|
||||
NSUInteger permanentPageCacheSize=0;
|
||||
NSString* contextID=nil;
|
||||
context=[self context];
|
||||
permanentPageCache=[self _permanentPageCache];
|
||||
|
@ -767,25 +719,13 @@ extern id gcObjectsToBeVisited;
|
|||
{
|
||||
id deletePage=nil;
|
||||
NSString* deleteContextID=nil;
|
||||
[GSWApplication statusLogString:@"Deleting permanent cached Page"];
|
||||
deleteContextID=[_permanentContextIDArray objectAtIndex:0];
|
||||
GSWLogAssertGood(deleteContextID);
|
||||
|
||||
RETAIN(deleteContextID); // We'll remove it from array
|
||||
[GSWApplication statusLogWithFormat:@"permanentContextIDArray=%@",
|
||||
_permanentContextIDArray];
|
||||
[GSWApplication statusLogWithFormat:@"contextID=%@",deleteContextID];
|
||||
NSDebugMLLog(@"sessions",@"deleteContextID=%@",deleteContextID);
|
||||
NSDebugMLLog(@"sessions",@"[permanentContextIDArray objectAtIndex:0]=%@",
|
||||
[_permanentContextIDArray objectAtIndex:0]);
|
||||
NSDebugMLLog(@"sessions",@"[permanentContextIDArray objectAtIndex:0] retainCount=%d",
|
||||
(int)[[_permanentContextIDArray objectAtIndex:0] retainCount]);
|
||||
NSDebugMLLog(@"sessions",@"SESSION REMOVE: %p",[_permanentContextIDArray objectAtIndex:0]);
|
||||
|
||||
[_permanentContextIDArray removeObjectAtIndex:0];
|
||||
deletePage=[_contextRecords objectForKey:deleteContextID];
|
||||
GSWLogAssertGood(deletePage);
|
||||
[GSWApplication statusLogWithFormat:@"delete page of class=%@",
|
||||
[deletePage class]];
|
||||
NSDebugMLLog(@"sessions",@"SESSION REMOVE: %p",[permanentPageCache objectForKey:deleteContextID]);
|
||||
|
||||
[permanentPageCache removeObjectForKey:deleteContextID];
|
||||
RELEASE(deleteContextID);
|
||||
}
|
||||
|
@ -794,24 +734,15 @@ extern id gcObjectsToBeVisited;
|
|||
|
||||
if ([_permanentContextIDArray containsObject:contextID])
|
||||
{
|
||||
LOGSeriousError(@"page of class %@ contextID %@ already in permanent cache stack",
|
||||
[page class],
|
||||
contextID);
|
||||
NSDebugMLLog(@"sessions",@"SESSION REMOVE: %p",contextID);
|
||||
[_permanentContextIDArray removeObject:contextID];
|
||||
if (![permanentPageCache objectForKey:contextID])
|
||||
{
|
||||
LOGSeriousError0(@"but not present in cache");
|
||||
}
|
||||
}
|
||||
else if ([permanentPageCache objectForKey:contextID])
|
||||
{
|
||||
LOGSeriousError(@"page of class %@ contextID %@ in permanent cache but not in stack",
|
||||
[page class],
|
||||
contextID);
|
||||
}
|
||||
|
||||
NSDebugMLLog(@"sessions",@"SESSION REPLACE: %p",[permanentPageCache objectForKey:contextID]);
|
||||
[permanentPageCache setObject:page
|
||||
forKey:contextID];
|
||||
[_permanentContextIDArray addObject:contextID];
|
||||
|
@ -830,9 +761,6 @@ extern id gcObjectsToBeVisited;
|
|||
*/
|
||||
if ([_permanentContextIDArray count]!=[permanentPageCache count])
|
||||
{
|
||||
LOGSeriousError(@"[permanentContextIDArray count] %d != [permanentPageCache count] %d",
|
||||
(int)[_permanentContextIDArray count],
|
||||
(int)[permanentPageCache count]);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -952,7 +880,6 @@ extern id gcObjectsToBeVisited;
|
|||
if (!_autoreleasePool)
|
||||
{
|
||||
_autoreleasePool=[NSAutoreleasePool new];
|
||||
GSWLogMemCF("New NSAutoreleasePool: %p",_autoreleasePool);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -991,9 +918,7 @@ extern id gcObjectsToBeVisited;
|
|||
NSString* contextID=nil;
|
||||
NSString* requestContextID=nil;
|
||||
|
||||
NSDebugMLog(@"aContext=%@",aContext);
|
||||
requestContextID=[aContext _requestContextID];
|
||||
NSDebugMLog(@"requestContextID=%@",requestContextID);
|
||||
if (_contextRecords && requestContextID)
|
||||
{
|
||||
NSArray* contextIDs = [_contextRecords allKeys];
|
||||
|
@ -1020,8 +945,8 @@ extern id gcObjectsToBeVisited;
|
|||
|
||||
if (_contextRecords)
|
||||
{
|
||||
unsigned int stackIndex=0;
|
||||
unsigned int contextArrayIndex=0;
|
||||
NSUInteger stackIndex=0;
|
||||
NSUInteger contextArrayIndex=0;
|
||||
NSMutableArray* contextArray = [self _contextArrayForContextID:contextID
|
||||
stackIndex:&stackIndex
|
||||
contextArrayIndex:&contextArrayIndex];
|
||||
|
@ -1041,16 +966,16 @@ extern id gcObjectsToBeVisited;
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSMutableArray*)_contextArrayForContextID:(NSString*)aContextID
|
||||
stackIndex:(unsigned int*)pStackIndex
|
||||
contextArrayIndex:(unsigned int*)pContextArrayIndex
|
||||
stackIndex:(NSUInteger*)pStackIndex
|
||||
contextArrayIndex:(NSUInteger*)pContextArrayIndex
|
||||
{
|
||||
NSMutableArray* contextArray=nil;
|
||||
int stackCount=[_contextArrayStack count];
|
||||
unsigned int i=0;
|
||||
NSUInteger stackCount=[_contextArrayStack count];
|
||||
NSUInteger i=0;
|
||||
for(i=0;!contextArray && i<stackCount;i++)
|
||||
{
|
||||
NSMutableArray* aContextArray=[_contextArrayStack objectAtIndex:i];
|
||||
unsigned int contextArrayIndex=[aContextArray indexOfObject:aContextID];
|
||||
NSUInteger contextArrayIndex=[aContextArray indexOfObject:aContextID];
|
||||
if (contextArrayIndex!=NSNotFound)
|
||||
{
|
||||
contextArray=aContextArray;
|
||||
|
@ -1073,12 +998,12 @@ extern id gcObjectsToBeVisited;
|
|||
//--------------------------------------------------------------------
|
||||
-(void)_replacePage:(GSWComponent*)page
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//NDFN
|
||||
-(unsigned int)pageCacheSize
|
||||
-(NSUInteger)pageCacheSize
|
||||
{
|
||||
return [GSWApp pageCacheSize];
|
||||
}
|
||||
|
@ -1136,8 +1061,6 @@ extern id gcObjectsToBeVisited;
|
|||
//--------------------------------------------------------------------
|
||||
-(void)_setContext:(GSWContext*)aContext
|
||||
{
|
||||
//OK
|
||||
NSDebugMLLog(@"sessions",@"aContext=%p",(void*)aContext);
|
||||
if (aContext!=_currentContext)
|
||||
_currentContext=aContext;
|
||||
|
||||
|
@ -1146,13 +1069,23 @@ extern id gcObjectsToBeVisited;
|
|||
//--------------------------------------------------------------------
|
||||
-(void)sleepInContext:(GSWContext*)aContext
|
||||
{
|
||||
//OK
|
||||
[self sleep];
|
||||
[self sleep];
|
||||
|
||||
if (_hasSessionLockedEditingContext)
|
||||
{
|
||||
{
|
||||
if (_editingContext) {
|
||||
[_editingContext unlock];
|
||||
_hasSessionLockedEditingContext = NO;
|
||||
}
|
||||
_hasSessionLockedEditingContext = NO;
|
||||
}
|
||||
|
||||
if (([self isTerminating]) && (_editingContext != nil))
|
||||
{
|
||||
// TODO: discuss with Mr. Ayers if we need that.
|
||||
// [_editingContext dispose];
|
||||
DESTROY(_editingContext);
|
||||
}
|
||||
|
||||
[self _setContext:nil];
|
||||
|
||||
}
|
||||
|
@ -1160,24 +1093,18 @@ extern id gcObjectsToBeVisited;
|
|||
//--------------------------------------------------------------------
|
||||
-(void)awakeInContext:(GSWContext*)aContext
|
||||
{
|
||||
[self _setContext:aContext];
|
||||
NSDebugMLLog(@"sessions",@"contextCounter=%i",_contextCounter);
|
||||
if (aContext)
|
||||
{
|
||||
if ([[self class] __counterIncrementingEnabledFlag]) //??
|
||||
{
|
||||
_contextCounter++;
|
||||
_requestCounter++;
|
||||
}
|
||||
}
|
||||
NSDebugMLLog(@"sessions",@"contextCounter=%i",_contextCounter);
|
||||
[self _setContext:aContext];
|
||||
|
||||
_contextCounter++;
|
||||
_requestCounter++;
|
||||
|
||||
if (_editingContext
|
||||
&& !_hasSessionLockedEditingContext
|
||||
&& [GSWApplication _lockDefaultEditingContext])
|
||||
{
|
||||
[_editingContext lock];
|
||||
_hasSessionLockedEditingContext=YES;
|
||||
}
|
||||
{
|
||||
[_editingContext lock];
|
||||
_hasSessionLockedEditingContext=YES;
|
||||
}
|
||||
[self awake];
|
||||
|
||||
}
|
||||
|
@ -1187,12 +1114,6 @@ extern id gcObjectsToBeVisited;
|
|||
-(void)setLanguages:(NSArray*)someLanguages
|
||||
{
|
||||
|
||||
NSDebugMLLog(@"sessions",@"someLanguages=%@",someLanguages);
|
||||
|
||||
if (!someLanguages)
|
||||
{
|
||||
LOGError0(@"No languages");
|
||||
}
|
||||
ASSIGN(_languages,someLanguages);
|
||||
|
||||
|
||||
|
@ -1473,13 +1394,9 @@ Returns first element of languages or nil if languages is empty
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"exception in %@ appendToResponse:inContext",
|
||||
[self class]);
|
||||
LOGException(@"exception=%@",localException);
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo(localException,
|
||||
@"In %@ appendToResponse:inContext",
|
||||
[self class]);
|
||||
LOGException(@"exception=%@",localException);
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
|
@ -1640,24 +1557,4 @@ Returns first element of languages or nil if languages is empty
|
|||
return [GSWApplication application];
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_validateAPI
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(void)__setContextCounterIncrementingEnabled:(BOOL)flag
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(int)__counterIncrementingEnabledFlag
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
return 1;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -61,11 +61,6 @@
|
|||
@interface GSWSessionStore (GSWSessionStoreCreation)
|
||||
+(GSWSessionStore*)serverSessionStore;
|
||||
@end
|
||||
//====================================================================
|
||||
@interface GSWSessionStore (GSWSessionStoreB)
|
||||
-(void)_validateAPI;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWSessionStore (GSWSessionStoreInfo)
|
||||
-(BOOL)containsSessionID:(NSString*)aSessionID;
|
||||
|
|
|
@ -36,6 +36,7 @@ RCS_ID("$Id$")
|
|||
#include "GSWeb.h"
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWSessionStore
|
||||
|
@ -43,39 +44,30 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(id)init
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if ((self=[super init]))
|
||||
{
|
||||
_lock=[NSRecursiveLock new];
|
||||
_timeOutManager=[GSWSessionTimeOutManager new];
|
||||
NSDebugMLLog(@"sessions",@"GSWSessionStore self=%p class=%@",self,[self class]);
|
||||
|
||||
[_timeOutManager setCallBack:@selector(removeSessionWithID:)
|
||||
target:self];
|
||||
[_timeOutManager startHandleTimerRefusingSessions];
|
||||
[self _validateAPI];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
GSWLogC("Dealloc GSWSessionStore");
|
||||
GSWLogC("Dealloc GSWSessionStore: lock");
|
||||
DESTROY(_lock);
|
||||
GSWLogC("Dealloc GSWSessionStore: timeOutManager");
|
||||
DESTROY(_timeOutManager);
|
||||
GSWLogC("Dealloc GSWSessionStore Super");
|
||||
[super dealloc];
|
||||
GSWLogC("End Dealloc GSWSessionStore");
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
/** Abstract **/
|
||||
-(GSWSession*)removeSessionWithID:(NSString*)aSessionID
|
||||
{
|
||||
NSDebugMLLog(@"sessions",@"self=%p class=%@",self,[self class]);
|
||||
[self subclassResponsibility: _cmd];
|
||||
return nil;
|
||||
};
|
||||
|
@ -279,23 +271,6 @@ RCS_ID("$Id$")
|
|||
};
|
||||
|
||||
@end
|
||||
//====================================================================
|
||||
@implementation GSWSessionStore (GSWSessionStoreB)
|
||||
-(void)_validateAPI
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if ([self class]==[GSWSessionStore class])
|
||||
{
|
||||
[NSException raise:NSGenericException
|
||||
format:@"Can't allocate a direct GSWSessionStore instance because some methods need to be implemented by subclasses"];
|
||||
};
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWSessionStore (GSWSessionStoreInfo)
|
||||
|
||||
|
|
|
@ -48,11 +48,6 @@ RCS_ID("$Id$")
|
|||
ASSIGN(_sessionID,aSessionID);
|
||||
_lastAccessTime=aTime;
|
||||
_timeOut=aTimeOutInterval;
|
||||
NSDebugMLLog(@"sessions",@"_lastAccessTime=%f (%@)",
|
||||
_lastAccessTime,
|
||||
[NSDate dateWithTimeIntervalSinceReferenceDate:_lastAccessTime]);
|
||||
NSDebugMLLog(@"sessions",@"_timeOut=%f s",
|
||||
_timeOut);
|
||||
};
|
||||
return self;
|
||||
};
|
||||
|
@ -70,11 +65,6 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
NSDebugFLog0(@"Dealloc GSWSessionTimeOut");
|
||||
if (_sessionID)
|
||||
{
|
||||
NSDebugFLog(@"sessionIDCount=%u",[_sessionID retainCount]);
|
||||
};
|
||||
DESTROY(_sessionID);
|
||||
[super dealloc];
|
||||
};
|
||||
|
@ -120,8 +110,6 @@ RCS_ID("$Id$")
|
|||
-(void)setSessionTimeOutValue:(NSTimeInterval)aTimeOutInterval
|
||||
{
|
||||
_timeOut=aTimeOutInterval;
|
||||
NSDebugMLLog(@"sessions",@"_timeOut=%f s",
|
||||
_timeOut);
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -134,9 +122,6 @@ RCS_ID("$Id$")
|
|||
-(void)setLastAccessTime:(NSTimeInterval)aTime
|
||||
{
|
||||
_lastAccessTime=aTime;
|
||||
NSDebugMLLog(@"sessions",@"_lastAccessTime=%f (%@)",
|
||||
_lastAccessTime,
|
||||
[NSDate dateWithTimeIntervalSinceReferenceDate:_lastAccessTime]);
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
@ -74,7 +74,6 @@ RCS_ID("$Id$")
|
|||
-(GSWSessionTimeOut*)_sessionTimeOutForSessionID:(NSString*)sessionID
|
||||
{
|
||||
GSWSessionTimeOut* sessionTimeOut=nil;
|
||||
LOGObjectFnStart();
|
||||
sessionTimeOut=[_sessionTimeOuts objectForKey:sessionID];
|
||||
if (sessionTimeOut)
|
||||
{
|
||||
|
@ -91,7 +90,7 @@ RCS_ID("$Id$")
|
|||
forKey:sessionID];
|
||||
[_sessionOrderedTimeOuts addObject:sessionTimeOut];
|
||||
}
|
||||
LOGObjectFnStop();
|
||||
|
||||
return sessionTimeOut;
|
||||
}
|
||||
|
||||
|
@ -99,7 +98,6 @@ RCS_ID("$Id$")
|
|||
-(GSWSessionTimeOut*)sessionTimeOutForSessionID:(NSString*)sessionID
|
||||
{
|
||||
GSWSessionTimeOut* sessionTimeOut=nil;
|
||||
LOGObjectFnStart();
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -108,13 +106,12 @@ RCS_ID("$Id$")
|
|||
NS_HANDLER
|
||||
{
|
||||
NSLog(@"### exception ... %@", [localException reason]);
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
|
||||
return sessionTimeOut;
|
||||
}
|
||||
|
||||
|
@ -208,7 +205,6 @@ RCS_ID("$Id$")
|
|||
{
|
||||
NSTimer* newTimer=nil;
|
||||
GSWSessionTimeOut* sessionTimeOut=nil;
|
||||
LOGObjectFnStart();
|
||||
// [self lock];
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -293,16 +289,13 @@ RCS_ID("$Id$")
|
|||
NS_HANDLER
|
||||
{
|
||||
NSLog(@"%@ (%@)",localException,[localException reason]);
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
//TODO
|
||||
// [self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
// [self unlock];
|
||||
NSDebugMLLog(@"sessions",@"newTimer=%@",newTimer);
|
||||
NSDebugMLLog(@"sessions",@"newTimer fireDate=%@",[newTimer fireDate]);
|
||||
LOGObjectFnStop();
|
||||
|
||||
return newTimer;
|
||||
}
|
||||
|
||||
|
@ -324,65 +317,45 @@ RCS_ID("$Id$")
|
|||
target:(id)target
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"sessions",@"target [%@]=%@",[target class],target);
|
||||
NSDebugMLLog(@"sessions",@"callback=%@",NSStringFromSelector(callback));
|
||||
_target=target; //Do not retain !
|
||||
_callback=callback;
|
||||
LOGObjectFnStop();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)tryLockBeforeTimeIntervalSinceNow:(NSTimeInterval)ti
|
||||
{
|
||||
BOOL locked=NO;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"sessions",@"selfLockn=%d lock before %f s (%@)",
|
||||
_selfLockn,ti,[NSDate dateWithTimeIntervalSinceNow:ti]);
|
||||
locked=LoggedTryLockBeforeDate(_selfLock,
|
||||
[NSDate dateWithTimeIntervalSinceNow:ti]);
|
||||
#ifndef NDEBUG
|
||||
if (locked)
|
||||
_selfLockn++;
|
||||
#endif
|
||||
NSDebugMLLog(@"sessions",@"selfLockn=%d",_selfLockn);
|
||||
LOGObjectFnStop();
|
||||
return locked;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)lockBeforeTimeIntervalSinceNow:(NSTimeInterval)ti
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"sessions",@"selfLockn=%d lock before %f s (%@)",
|
||||
_selfLockn,ti,[NSDate dateWithTimeIntervalSinceNow:ti]);
|
||||
LoggedLockBeforeDate(_selfLock,[NSDate dateWithTimeIntervalSinceNow:ti]);
|
||||
#ifndef NDEBUG
|
||||
_selfLockn++;
|
||||
#endif
|
||||
NSDebugMLLog(@"sessions",@"selfLockn=%d",_selfLockn);
|
||||
LOGObjectFnStop();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)lock
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[self lockBeforeTimeIntervalSinceNow:GSLOCK_DELAY_S];
|
||||
LOGObjectFnStop();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)unlock
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"sessions",@"selfLockn=%d",_selfLockn);
|
||||
LoggedUnlock(_selfLock);
|
||||
#ifndef NDEBUG
|
||||
_selfLockn--;
|
||||
#endif
|
||||
NSDebugMLLog(@"sessions",@"selfLockn=%d",_selfLockn);
|
||||
LOGObjectFnStop();
|
||||
}
|
||||
|
||||
|
||||
|
@ -394,7 +367,6 @@ RCS_ID("$Id$")
|
|||
|
||||
//NSLog(@"---Start startHandleTimerRefusingSessions");
|
||||
//[GSWApplication statusLogString:@"Start startHandleTimerRefusingSessions"];
|
||||
//LOGObjectFnStart();
|
||||
[self lock];
|
||||
/*
|
||||
newTimer=[NSTimer timerWithTimeInterval:REFUSING_NEW_SESSION_TIMER_INTERVAL // first time after 5 seconds
|
||||
|
@ -418,7 +390,6 @@ RCS_ID("$Id$")
|
|||
NSDebugMLLog(@"sessions",@"newTimer tisn=%f",[[newTimer fireDate]timeIntervalSinceNow]);
|
||||
|
||||
[self unlock];
|
||||
//LOGObjectFnStop();
|
||||
//[GSWApplication statusLogString:@"Stop startHandleTimerRefusingSessions"];
|
||||
//NSLog(@"---Stop startHandleTimerRefusingSessions");
|
||||
}
|
||||
|
@ -479,7 +450,6 @@ RCS_ID("$Id$")
|
|||
NS_HANDLER
|
||||
{
|
||||
NSLog(@"### exception ... %@", [localException reason]);
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
//TODO
|
||||
[_target unlock];
|
||||
timer = [NSTimer scheduledTimerWithTimeInterval:REFUSING_NEW_SESSION_TIMER_INTERVAL
|
||||
|
@ -538,7 +508,6 @@ RCS_ID("$Id$")
|
|||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLLog(@"sessions",@"EXCEPTION");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
//TODO
|
||||
[self unlock];
|
||||
//[GSWApp unlockRequestHandling];
|
||||
|
|
|
@ -72,7 +72,6 @@ RCS_ID("$Id$")
|
|||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,
|
||||
@"globalLock loggedlockBeforeDate");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
|
|
|
@ -88,9 +88,7 @@
|
|||
-(void)setSessionMovingAverageSampleSize:(int)aSize;
|
||||
-(int)transactionMovingAverageSampleSize;
|
||||
-(void)setTransactionMovingAverageSampleSize:(int)aSize;
|
||||
@end
|
||||
|
||||
@interface GSWStatisticsStore (GSWStatisticsStoreA)
|
||||
-(void)_purgePathsStatistics;
|
||||
-(void)_updatePathsStatisticsWithPaths:(id)paths;
|
||||
-(void)sessionTerminating:(GSWSession*)session;
|
||||
|
@ -104,17 +102,13 @@
|
|||
-(void)applicationDidHandleComponentActionRequestWithPageNamed:(NSString*)pageName;
|
||||
-(void)applicationDidHandleDirectActionRequestWithActionNamed:(NSString*)actionName;
|
||||
-(void)applicationDidHandleWebServiceRequestWithActionNamed:(NSString*)actionName;
|
||||
@end
|
||||
|
||||
@interface GSWStatisticsStore (GSWStatisticsStoreB)
|
||||
-(NSString*)descriptionForResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext;
|
||||
-(void)recordStatisticsForResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext;
|
||||
|
||||
@end
|
||||
|
||||
@interface GSWStatisticsStore (GSWStatisticsStoreC)
|
||||
-(void)logString:(id)string;
|
||||
-(NSTimeInterval)logFileRotationFrequencyInDays;
|
||||
-(NSString*)logFile;
|
||||
|
@ -123,9 +117,7 @@
|
|||
+(NSString*)formatDescription:(NSString*)description
|
||||
forResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext;
|
||||
@end
|
||||
|
||||
@interface GSWStatisticsStore (GSWStatisticsStoreD)
|
||||
-(NSString*)_password;
|
||||
-(NSDictionary*)_pathsStatistics;
|
||||
-(NSDictionary*)_pagesStatistics;
|
||||
|
@ -149,25 +141,12 @@
|
|||
-(int)_componentActionTransactionsCount;
|
||||
-(int)_transactionsCount;
|
||||
|
||||
@end
|
||||
|
||||
@interface GSWStatisticsStore (GSWStatisticsStoreE)
|
||||
-(BOOL)validateLogin:(id)login
|
||||
forSession:(id)session;
|
||||
-(void)setPassword:(NSString*)password;
|
||||
|
||||
@end
|
||||
|
||||
@interface GSWStatisticsStore (GSWStatisticsStoreF)
|
||||
-(BOOL)validateLogin:(id)login;
|
||||
@end
|
||||
|
||||
@interface GSWStatisticsStore (GSWStatisticsStoreG)
|
||||
-(void)_validateAPI;
|
||||
|
||||
@end
|
||||
|
||||
@interface GSWStatisticsStore (GSWStatisticsStoreH)
|
||||
+(id)timeIntervalDescription:(NSTimeInterval)timeInterval;
|
||||
@end
|
||||
#endif //_GSWStatisticsStore_h__
|
||||
|
|
|
@ -35,6 +35,8 @@ RCS_ID("$Id$")
|
|||
|
||||
#include <sys/resource.h>
|
||||
#include <unistd.h>
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
#include <GNUstepBase/NSString+GNUstepBase.h>
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWStatisticsStore
|
||||
|
@ -48,7 +50,7 @@ RCS_ID("$Id$")
|
|||
_transactionMovingAverageSampleCount = 100;
|
||||
_sessionMovingAverageSampleCount = 10;
|
||||
ASSIGN(_startDate, [NSDate date]);
|
||||
ASSIGN(_initializationMemory, [self _memoryUsage]);
|
||||
//ASSIGN(_initializationMemory, [self _memoryUsage]);
|
||||
_selfLock = [NSRecursiveLock new];
|
||||
};
|
||||
return self;
|
||||
|
@ -57,10 +59,7 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
GSWLogC("Dealloc GSWStatisticsStore");
|
||||
GSWLogC("Dealloc GSWStatisticsStore: selfLock");
|
||||
DESTROY(_selfLock);
|
||||
GSWLogC("Dealloc GSWStatisticsStore: maxActiveSessionsDate");
|
||||
DESTROY(_maxActiveSessionsDate);
|
||||
DESTROY(_lastSessionStatistics);
|
||||
DESTROY(_startDate);
|
||||
|
@ -73,35 +72,25 @@ RCS_ID("$Id$")
|
|||
DESTROY(_logCreationDate);
|
||||
DESTROY(_password);
|
||||
DESTROY(_directActionStatistics);
|
||||
GSWLogC("Dealloc GSWStatisticsStore Super");
|
||||
[super dealloc];
|
||||
GSWLogC("End Dealloc GSWStatisticsStore");
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)unlock
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLog(@"selfLockn=%d",_selfLockn);
|
||||
LoggedUnlock(_selfLock);
|
||||
#ifndef NDEBUG
|
||||
_selfLockn--;
|
||||
#endif
|
||||
NSDebugMLog(@"selfLockn=%d",_selfLockn);
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)lock
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLog(@"selfLockn=%d",_selfLockn);
|
||||
LoggedLockBeforeDate(_selfLock, GSW_LOCK_LIMIT);
|
||||
#ifndef NDEBUG
|
||||
_selfLockn++;
|
||||
#endif
|
||||
NSDebugMLog(@"selfLockn=%d",_selfLockn);
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -178,91 +167,90 @@ RCS_ID("$Id$")
|
|||
}
|
||||
|
||||
|
||||
// LOGObjectFnNotImplemented(); //TODOFN
|
||||
// [self notImplemented: _cmd]; //TODOFN
|
||||
return statDict;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(int)sessionMovingAverageSampleSize
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _sessionMovingAverageSampleCount;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)setSessionMovingAverageSampleSize:(int)aSize
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
_sessionMovingAverageSampleCount=aSize;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(int)transactionMovingAverageSampleSize
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _transactionMovingAverageSampleCount;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)setTransactionMovingAverageSampleSize:(int)aSize
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
_transactionMovingAverageSampleCount=aSize;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWStatisticsStore (GSWStatisticsStoreA)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_purgePathsStatistics
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
[self lock];
|
||||
NS_DURING
|
||||
SYNCHRONIZED(self) {
|
||||
NSUInteger n = 2;
|
||||
|
||||
for(; [_pathsStatistics count] > 100; n++)
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
NSEnumerator * pathsEnum = [_pathsStatistics keyEnumerator];
|
||||
NSEnumerator * pathsToRemoveEnum = nil;
|
||||
NSMutableArray * pathsToRemove = [NSMutableArray array];
|
||||
NSString * path = nil;
|
||||
|
||||
while ((path = [pathsEnum nextObject]))
|
||||
{
|
||||
// we have to store NSNumbers
|
||||
if ([[_pathsStatistics objectForKey:path] integerValue] < n) {
|
||||
[pathsToRemove addObject:path];
|
||||
}
|
||||
}
|
||||
pathsToRemoveEnum = [pathsToRemove objectEnumerator];
|
||||
|
||||
while ((path = [pathsToRemoveEnum nextObject])) {
|
||||
[_pathsStatistics removeObjectForKey:path];
|
||||
}
|
||||
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLog(@"EXCEPTION:%@ (%@) [%s %d]",localException,[localException reason],__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
} END_SYNCHRONIZED;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_updatePathsStatisticsWithPaths:(id)paths
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
[self _purgePathsStatistics];
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
NSEnumerator * pathsEnum;
|
||||
NSString * path = nil;
|
||||
|
||||
[self _purgePathsStatistics];
|
||||
|
||||
pathsEnum = [paths objectEnumerator];
|
||||
|
||||
while ((path = [pathsEnum nextObject]))
|
||||
{
|
||||
NSNumber * count = [_pathsStatistics objectForKey:path];
|
||||
|
||||
if (count) {
|
||||
NSInteger integerValue = [count integerValue] + 1;
|
||||
[_pathsStatistics setObject:[NSNumber numberWithInteger:integerValue]
|
||||
forKey:path];
|
||||
} else {
|
||||
[_pathsStatistics setObject:[NSNumber numberWithInteger:1]
|
||||
forKey:path];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLog(@"EXCEPTION:%@ (%@) [%s %d]",localException,[localException reason],__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_sessionTerminating:(GSWSession*)aSession
|
||||
|
@ -273,7 +261,6 @@ RCS_ID("$Id$")
|
|||
NSTimeInterval sessionTimeOut = 0;
|
||||
int sessionRequestCounter = 0;
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
activeSessionsCount=[GSWApp _activeSessionsCount];
|
||||
statistics=[aSession statistics];
|
||||
sessionBirthDate=nil;
|
||||
|
@ -283,13 +270,11 @@ RCS_ID("$Id$")
|
|||
sessionBirthDate=[aSession _birthDate];
|
||||
sessionTimeOut=[aSession timeOut];
|
||||
sessionRequestCounter=[aSession _requestCounter];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)sessionTerminating:(GSWSession*)aSession
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -297,16 +282,12 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLog(@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],
|
||||
__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -314,7 +295,6 @@ RCS_ID("$Id$")
|
|||
{
|
||||
//OK
|
||||
int activeSessionsCount=0;
|
||||
LOGObjectFnStart();
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -325,16 +305,12 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLog(@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],
|
||||
__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -366,7 +342,6 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(void)applicationWillHandleDirectActionRequest
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -375,22 +350,17 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLog(@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],
|
||||
__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)applicationWillHandleWebServiceRequest
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -399,22 +369,17 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLog(@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],
|
||||
__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)applicationWillHandleComponentActionRequest
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -423,23 +388,18 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLog(@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],
|
||||
__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
-(void)_updateHandlerStatistics:(NSMutableDictionary*)statistics
|
||||
withKey:(NSString*)aKey
|
||||
handlingTimeInterval:(NSTimeInterval)handlingTimeInterval
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if (aKey)
|
||||
{
|
||||
NSNumber* AvgRespTime=nil;
|
||||
|
@ -452,7 +412,6 @@ RCS_ID("$Id$")
|
|||
int ServedValue=0;
|
||||
NSMutableDictionary* statsForKey=[statistics objectForKey:aKey];
|
||||
|
||||
NSDebugMLog(@"statsForKey=%@",statsForKey);
|
||||
if (statsForKey)
|
||||
{
|
||||
AvgRespTime=[statsForKey objectForKey:@"Avg Resp. Time"];
|
||||
|
@ -498,10 +457,7 @@ RCS_ID("$Id$")
|
|||
MinRespTime=[NSNumber numberWithDouble:MinRespTimeValue];
|
||||
MaxRespTime=[NSNumber numberWithDouble:MaxRespTimeValue];
|
||||
Served=GSWIntNumber(ServedValue);
|
||||
NSDebugMLog(@"AvgRespTime=%@",AvgRespTime);
|
||||
NSDebugMLog(@"MinRespTime=%@",MinRespTime);
|
||||
NSDebugMLog(@"MaxRespTime=%@",MaxRespTime);
|
||||
NSDebugMLog(@"Served=%@",Served);
|
||||
|
||||
[statsForKey setObject:AvgRespTime
|
||||
forKey:@"Avg Resp. Time"];
|
||||
[statsForKey setObject:MinRespTime
|
||||
|
@ -511,7 +467,6 @@ RCS_ID("$Id$")
|
|||
[statsForKey setObject:Served
|
||||
forKey:@"Served"];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -571,7 +526,6 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(void)applicationDidHandleComponentActionRequestWithPageNamed:(NSString*)pageName
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -579,23 +533,18 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLog(@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],
|
||||
__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)applicationDidHandleDirectActionRequestWithActionNamed:(NSString*)actionName
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -603,22 +552,17 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLog(@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],
|
||||
__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)applicationDidHandleWebServiceRequestWithActionNamed:(NSString*)actionName
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -626,23 +570,15 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLog(@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],
|
||||
__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWStatisticsStore (GSWStatisticsStoreB)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)descriptionForResponse:(GSWResponse*)aResponse
|
||||
|
@ -651,7 +587,6 @@ RCS_ID("$Id$")
|
|||
//OK
|
||||
GSWComponent* page=nil;
|
||||
NSString* description=nil;
|
||||
LOGObjectFnStart();
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -661,16 +596,12 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLog(@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],
|
||||
__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
return description;
|
||||
};
|
||||
|
||||
|
@ -681,48 +612,34 @@ RCS_ID("$Id$")
|
|||
//OK
|
||||
GSWComponent* page=nil;
|
||||
NSString* pageName=nil;
|
||||
LOGObjectFnStart();
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
page=[aContext page];
|
||||
NSDebugMLog(@"page=%@",page);
|
||||
pageName=[page name];
|
||||
NSDebugMLog(@"pageName=%@",pageName);
|
||||
ASSIGN(_currentPage,pageName);
|
||||
NSDebugMLog(@"_currentPage=%@",_currentPage);
|
||||
[self _memoryUsage];//TODO Delete because it's Just for Test !
|
||||
//[self _memoryUsage];//TODO Delete because it's Just for Test !
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLog(@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],
|
||||
__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWStatisticsStore (GSWStatisticsStoreC)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)logString:(id)aString
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(double)logFileRotationFrequencyInDays
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _logRotation;
|
||||
};
|
||||
|
||||
|
@ -731,7 +648,6 @@ RCS_ID("$Id$")
|
|||
{
|
||||
//OK
|
||||
NSString* logFile=nil;
|
||||
LOGObjectFnStart();
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
|
@ -739,16 +655,12 @@ RCS_ID("$Id$")
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLog(@"EXCEPTION:%@ (%@) [%s %d]",
|
||||
localException,[localException reason],
|
||||
__FILE__,__LINE__);
|
||||
//TODO
|
||||
[self unlock];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
return logFile;
|
||||
};
|
||||
|
||||
|
@ -813,39 +725,29 @@ RCS_ID("$Id$")
|
|||
return formattedDescr;
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWStatisticsStore (GSWStatisticsStoreD)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)_password
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _password;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSDictionary*)_pathsStatistics
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _pathsStatistics;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSDictionary*)_pagesStatistics
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _pagesStatistics;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)_lastSessionStatistics
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
@ -854,40 +756,20 @@ RCS_ID("$Id$")
|
|||
{
|
||||
struct rusage rusageStruct;
|
||||
int i=0;
|
||||
LOGObjectFnStart();
|
||||
//Use NSRealMemoryAvailable ??
|
||||
for(i=0;i<2;i++)
|
||||
{
|
||||
memset(&rusageStruct,0,sizeof(rusageStruct));
|
||||
if (getrusage(i>0 ? RUSAGE_CHILDREN : RUSAGE_SELF,&rusageStruct)!=0)
|
||||
{
|
||||
LOGError(@"getrusage faled %d",errno);
|
||||
// LOGError(@"getrusage faled %d",errno);
|
||||
}
|
||||
else
|
||||
{
|
||||
NSTimeInterval userTime=NSTimeIntervalFromTimeVal(&rusageStruct.ru_utime);
|
||||
NSTimeInterval systemTime=NSTimeIntervalFromTimeVal(&rusageStruct.ru_stime);
|
||||
NSDebugMLog(@"userTime=%ld",(long)userTime);
|
||||
NSDebugMLog(@"systemTime=%ld",(long)systemTime);
|
||||
NSDebugMLog(@"ru_maxrss=%ld",rusageStruct.ru_maxrss); /* maximum resident set size */
|
||||
NSDebugMLog(@"ru_ixrss=%ld",rusageStruct.ru_ixrss); /* integral shared memory size */
|
||||
NSDebugMLog(@"ru_idrss=%ld",rusageStruct.ru_idrss); /* integral unshared data size */
|
||||
NSDebugMLog(@"ru_isrss=%ld",rusageStruct.ru_isrss); /* integral unshared stack size */
|
||||
NSDebugMLog(@"ru_minflt=%ld",rusageStruct.ru_minflt); /* page reclaims */
|
||||
NSDebugMLog(@"ru_minflt bytes=%ld",rusageStruct.ru_minflt*getpagesize()); /* page reclaims */
|
||||
NSDebugMLog(@"ru_majflt=%ld",rusageStruct.ru_majflt); /* page faults */
|
||||
NSDebugMLog(@"ru_majflt bytes=%ld",rusageStruct.ru_majflt*getpagesize()); /* page faults */
|
||||
NSDebugMLog(@"ru_nswap=%ld",rusageStruct.ru_nswap); /* swaps */
|
||||
NSDebugMLog(@"ru_inblock=%ld",rusageStruct.ru_inblock); /* block input operations */
|
||||
NSDebugMLog(@"ru_oublock=%ld",rusageStruct.ru_oublock); /* block output operations */
|
||||
NSDebugMLog(@"ru_msgsnd=%ld",rusageStruct.ru_msgsnd); /* messages sent */
|
||||
NSDebugMLog(@"ru_msgrcv=%ld",rusageStruct.ru_msgrcv); /* messages received */
|
||||
NSDebugMLog(@"ru_nsignals=%ld",rusageStruct.ru_nsignals); /* signals received */
|
||||
NSDebugMLog(@"ru_nvcsw=%ld",rusageStruct.ru_nvcsw); /* voluntary context switches */
|
||||
NSDebugMLog(@"ru_nivcsw=%ld",rusageStruct.ru_nivcsw); /* involuntary context switches */
|
||||
};
|
||||
};
|
||||
NSDebugMLog(@"ProcInfo:%@",[GSWProcFSProcInfo filledProcInfo]);
|
||||
|
||||
//{Committed = 14184448; Reserved = 19025920; }
|
||||
/*
|
||||
|
@ -915,203 +797,145 @@ s
|
|||
*/
|
||||
|
||||
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
LOGObjectFnStop();
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)_averageSessionMemory
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(double)_movingAverageSessionLife
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _movingAverageSessionLife;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(double)_averageSessionLife
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _averageSessionLife;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(float)_movingAverageRequestsPerSession
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _movingAverageRequestsPerSession;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(float)_averageRequestsPerSession
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _averageRequestsPerSession;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSDate*)_maxActiveSessionsDate
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _maxActiveSessionsDate;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(int)_maxActiveSessionsCount
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _maxActiveSessionsCount;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(int)_sessionsCount
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _sessionsCount;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(double)_movingAverageTransactionTime
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSAssert(_movingAverageTransactionsCount!=0,@"movingAverageTransactionsCount==0");
|
||||
LOGObjectFnStop();
|
||||
return _movingTransactionTimeInterval/_movingAverageTransactionsCount; //?
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(double)_movingAverageIdleTime
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSAssert(_movingAverageTransactionsCount!=0,@"movingAverageTransactionsCount==0");
|
||||
LOGObjectFnStop();
|
||||
return _movingIdleTimeInterval/_movingAverageTransactionsCount;//??
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(double)_averageCATransactionTime
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSAssert(_movingAverageTransactionsCount!=0,@"movingAverageTransactionsCount==0");
|
||||
LOGObjectFnStop();
|
||||
return _totalCATransactionTimeInterval/_movingAverageTransactionsCount; //??
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(double)_averageDATransactionTime
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSAssert(_movingAverageTransactionsCount!=0,@"movingAverageTransactionsCount==0");
|
||||
LOGObjectFnStop();
|
||||
return _totalDATransactionTimeInterval/_movingAverageTransactionsCount; //??
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(double)_averageTransactionTime
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSAssert(_movingAverageTransactionsCount!=0,@"movingAverageTransactionsCount==0");
|
||||
LOGObjectFnStop();
|
||||
return _totalTransactionTimeInterval/_movingAverageTransactionsCount; //?
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(double)_averageIdleTime
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSAssert(_movingAverageTransactionsCount!=0,@"movingAverageTransactionsCount==0");
|
||||
LOGObjectFnStop();
|
||||
return _totalIdleTimeInterval/_movingAverageTransactionsCount;//??
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(int)_directActionTransactionsCount
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _directActionTransactionsCount;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(int)_componentActionTransactionsCount
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _componentActionTransactionsCount;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(int)_transactionsCount
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _transactionsCount;
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWStatisticsStore (GSWStatisticsStoreE)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)validateLogin:(id)aLogin
|
||||
forSession:(id)aSession
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return NO;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)setPassword:(NSString*)aPassword
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
ASSIGN(_password,aPassword);
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWStatisticsStore (GSWStatisticsStoreF)
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)validateLogin:(id)aLogin
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return NO;
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWStatisticsStore (GSWStatisticsStoreG)
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_validateAPI
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWStatisticsStore (GSWStatisticsStoreH)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(id)timeIntervalDescription:(double)aTimeInterval
|
||||
{
|
||||
LOGClassFnNotImplemented(); //TODOFN
|
||||
[self notImplemented: _cmd]; //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
|
|
|
@ -136,7 +136,6 @@ RCS_ID("$Id$")
|
|||
NS_HANDLER
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo(localException,
|
||||
@"In GSWSubmitButton invokeActionForRequest:inContext");
|
||||
LOGException(@"exception=%@",localException);
|
||||
[localException raise];
|
||||
NS_ENDHANDLER
|
||||
|
||||
|
|
|
@ -43,44 +43,30 @@ RCS_ID("$Id$")
|
|||
associations:(NSDictionary*)associations
|
||||
template:(GSWElement*)templateElement
|
||||
{
|
||||
LOGObjectFnStartC("GSWSwitchComponent");
|
||||
if ((self=[super initWithName:aName
|
||||
associations:associations
|
||||
template:nil]))
|
||||
{
|
||||
NSMutableDictionary* tmpAssociations=[NSMutableDictionary dictionaryWithDictionary:associations];
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (declarationName=%@): tmpAssociations=%@",
|
||||
self,[self declarationName],tmpAssociations);
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (declarationName=%@): GSWComponentName__Key=%@",
|
||||
self,[self declarationName],GSWComponentName__Key[GSWebNamingConv]);
|
||||
|
||||
[tmpAssociations removeObjectForKey:GSWComponentName__Key[GSWebNamingConv]];
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (declarationName=%@): componentName__Key=%@",
|
||||
self,[self declarationName],componentName__Key);
|
||||
|
||||
[tmpAssociations removeObjectForKey:componentName__Key];
|
||||
|
||||
_componentName = [[associations objectForKey:GSWComponentName__Key[GSWebNamingConv]
|
||||
withDefaultObject:[_componentName autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (declarationName=%@): componentName=%@",
|
||||
self,[self declarationName],_componentName);
|
||||
|
||||
if (!_componentName)
|
||||
{
|
||||
_componentName = [[associations objectForKey:componentName__Key
|
||||
withDefaultObject:[_componentName autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (declarationName=%@): componentName=%@",
|
||||
self,[self declarationName],_componentName);
|
||||
}
|
||||
|
||||
ASSIGN(_componentAttributes,[NSDictionary dictionaryWithDictionary:tmpAssociations]);
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (declarationName=%@): componentAttributes=%@",
|
||||
self,[self declarationName],_componentAttributes);
|
||||
|
||||
ASSIGN(_componentAttributes,[NSDictionary dictionaryWithDictionary:tmpAssociations]);
|
||||
ASSIGN(_template,templateElement);
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (declarationName=%@): template=%@",
|
||||
self,[self declarationName],_template);
|
||||
|
||||
_componentCache=[NSMutableDictionary new];
|
||||
};
|
||||
LOGObjectFnStopC("GSWSwitchComponent");
|
||||
return self;
|
||||
};
|
||||
|
||||
|
@ -113,7 +99,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
GSWElement* element=nil;
|
||||
NSString* elementNameInContext=nil;
|
||||
LOGObjectFnStartC("GSWSwitchComponent");
|
||||
|
||||
GSWStartElement(aContext);
|
||||
GSWSaveAppendToResponseElementID(aContext);
|
||||
elementNameInContext=[self _elementNameInContext:aContext];
|
||||
|
@ -128,7 +114,6 @@ RCS_ID("$Id$")
|
|||
[element appendToResponse:response
|
||||
inContext:aContext];
|
||||
GSWContext_deleteLastElementIDComponent(aContext);
|
||||
LOGObjectFnStopC("GSWSwitchComponent");
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -138,7 +123,7 @@ RCS_ID("$Id$")
|
|||
GSWElement* resultElement=nil;
|
||||
GSWElement* element=nil;
|
||||
NSString* elementNameInContext=nil;
|
||||
LOGObjectFnStartC("GSWSwitchComponent");
|
||||
|
||||
GSWStartElement(aContext);
|
||||
GSWAssertCorrectElementID(aContext);
|
||||
elementNameInContext=[self _elementNameInContext:aContext];
|
||||
|
@ -153,7 +138,7 @@ RCS_ID("$Id$")
|
|||
resultElement=[element invokeActionForRequest:request
|
||||
inContext:aContext];
|
||||
GSWContext_deleteLastElementIDComponent(aContext);
|
||||
LOGObjectFnStopC("GSWSwitchComponent");
|
||||
|
||||
return resultElement;
|
||||
};
|
||||
|
||||
|
@ -163,7 +148,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
GSWElement* element=nil;
|
||||
NSString* elementNameInContext=nil;
|
||||
LOGObjectFnStartC("GSWSwitchComponent");
|
||||
|
||||
GSWStartElement(aContext);
|
||||
GSWAssertCorrectElementID(aContext);
|
||||
elementNameInContext=[self _elementNameInContext:aContext];
|
||||
|
@ -178,7 +163,6 @@ RCS_ID("$Id$")
|
|||
[element takeValuesFromRequest:aRequest
|
||||
inContext:aContext];
|
||||
GSWContext_deleteLastElementIDComponent(aContext);
|
||||
LOGObjectFnStopC("GSWSwitchComponent");
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -192,13 +176,8 @@ if the component has already been created, it get it from the cache; otherwise,
|
|||
NSArray* languages=nil;
|
||||
GSWComponent* component=nil;
|
||||
|
||||
LOGObjectFnStartC("GSWSwitchComponent");
|
||||
|
||||
component=GSWContext_component(aContext);
|
||||
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (declarationName=%@): componentName=%@ parent=%@",
|
||||
self,[self declarationName],_componentName,[component parent]);
|
||||
|
||||
if ([aName length]==0)
|
||||
{
|
||||
ExceptionRaise(@"GSWSwitchComponent",
|
||||
|
@ -228,7 +207,7 @@ if the component has already been created, it get it from the cache; otherwise,
|
|||
};
|
||||
};
|
||||
};
|
||||
LOGObjectFnStopC("GSWSwitchComponent");
|
||||
|
||||
return element;
|
||||
};
|
||||
|
||||
|
@ -239,17 +218,9 @@ if the component has already been created, it get it from the cache; otherwise,
|
|||
GSWComponent* component=nil;
|
||||
NSString* componentNameValue=nil;
|
||||
|
||||
LOGObjectFnStartC("GSWSwitchComponent");
|
||||
|
||||
component=GSWContext_component(aContext);
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (declarationName=%@): componentName=%@",
|
||||
self,[self declarationName],_componentName);
|
||||
|
||||
componentNameValue=[_componentName valueInComponent:component];
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (declarationName=%@): componentNameValue=%@",
|
||||
self,[self declarationName],componentNameValue);
|
||||
|
||||
LOGObjectFnStopC("GSWSwitchComponent");
|
||||
|
||||
return componentNameValue;
|
||||
};
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include <GNUstepBase/NSString+GNUstepBase.h>
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWTemplateParser
|
||||
|
@ -70,7 +72,6 @@ RCS_ID("$Id$")
|
|||
}
|
||||
else
|
||||
type=GSWTemplateParserType_RawHTML;
|
||||
NSDebugMLog(@"templateParserTypeFromString:%@ ==> %d",string,type);
|
||||
return type;
|
||||
}
|
||||
|
||||
|
@ -111,8 +112,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
GSWElement* resultTemplate=nil;
|
||||
Class parserClass=Nil;
|
||||
LOGClassFnStart();
|
||||
NSDebugMLLog(@"GSWTemplateParser",@"aDeclarationsPath=%@",aDeclarationsPath);
|
||||
|
||||
if (parserClassName)
|
||||
{
|
||||
parserClass=NSClassFromString(parserClassName);
|
||||
|
@ -128,7 +128,7 @@ RCS_ID("$Id$")
|
|||
declarationsString:declarationsString
|
||||
languages:someLanguages
|
||||
declarationsPath:aDeclarationsPath];
|
||||
LOGClassFnStop();
|
||||
|
||||
return resultTemplate;
|
||||
};
|
||||
|
||||
|
@ -148,19 +148,6 @@ RCS_ID("$Id$")
|
|||
GSWTemplateParser* templateParser=nil;
|
||||
Class finalParserClass=Nil;
|
||||
|
||||
LOGClassFnStart();
|
||||
|
||||
NSDebugMLLog(@"GSWTemplateParser",
|
||||
@"template named:%@ frameworkName:%@ declarationsString=%@",
|
||||
aName,aFrameworkName,declarationsString);
|
||||
|
||||
NSDebugMLLog(@"GSWTemplateParser",
|
||||
@"aDeclarationsPath=%@",aDeclarationsPath);
|
||||
|
||||
NSDebugMLLog(@"GSWTemplateParser",
|
||||
@"parserClass:%@ parserType:%d",
|
||||
parserClass,parserType);
|
||||
|
||||
if (parserClass)
|
||||
finalParserClass=parserClass;
|
||||
else
|
||||
|
@ -187,10 +174,6 @@ RCS_ID("$Id$")
|
|||
};
|
||||
};
|
||||
|
||||
NSDebugMLLog(@"GSWTemplateParser",
|
||||
@"finalParserClass:%@ parserType:%d",
|
||||
finalParserClass,parserType);
|
||||
|
||||
NSAssert2(finalParserClass,@"No Final Parser class: parserClass:%@ parserType:%d",
|
||||
parserClass,parserType);
|
||||
|
||||
|
@ -207,8 +190,6 @@ RCS_ID("$Id$")
|
|||
resultTemplate=[templateParser template];
|
||||
};
|
||||
|
||||
LOGClassFnStop();
|
||||
|
||||
return resultTemplate;
|
||||
};
|
||||
|
||||
|
@ -310,7 +291,6 @@ May raise exception
|
|||
**/
|
||||
-(GSWElement*)template
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if (!_template)
|
||||
{
|
||||
NSArray* elements=nil;
|
||||
|
@ -347,9 +327,6 @@ May raise exception
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGError(@"%@ Parse failed! Exception:%@",
|
||||
[self logPrefix],
|
||||
localException);
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo(localException,
|
||||
@"%@ - In [htmlParser document] Parse failed!",
|
||||
[self logPrefix]);
|
||||
|
@ -365,9 +342,6 @@ May raise exception
|
|||
|
||||
_template=[[GSWHTMLStaticGroup alloc]initWithContentElements:elements];
|
||||
[_template setDeclarationName:[NSString stringWithFormat:@"Template - %@",_templateName]];
|
||||
|
||||
NSDebugMLLog(@"GSWTemplateParser",
|
||||
@"template %p=%@",_template,_template);
|
||||
|
||||
docTypeRangeStart=[_string rangeOfString:@"<!DOCTYPE"];
|
||||
if (docTypeRangeStart.length) {
|
||||
|
@ -386,8 +360,6 @@ May raise exception
|
|||
};
|
||||
};
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return _template;
|
||||
};
|
||||
|
||||
|
@ -416,25 +388,11 @@ Method for GSWDeclarationParserPragmaDelegate protocol
|
|||
int iLanguage=0;
|
||||
BOOL isPathAlreadyProcessed=NO;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
NSDebugMLLog(@"GSWTemplateParser",
|
||||
@"Template includedDeclarationsFromFilePath:%@",
|
||||
includedFilePath);
|
||||
|
||||
resourceManager=[GSWApp resourceManager];
|
||||
|
||||
declarationFileName=[includedFilePath lastPathComponent];
|
||||
declarationFrameworkName=[includedFilePath stringByDeletingLastPathComponent];
|
||||
|
||||
NSDebugMLLog(@"gswcomponents",
|
||||
@"Template includedDeclarationsFromFilePath: '%@' declarationFileName=%@",
|
||||
includedFilePath,declarationFileName);
|
||||
|
||||
NSDebugMLLog(@"gswcomponents",
|
||||
@"Template includedDeclarationsFromFilePath: '%@' declarationFrameworkName=%@",
|
||||
includedFilePath,declarationFrameworkName);
|
||||
|
||||
if ([declarationFrameworkName length]==0)
|
||||
{
|
||||
declarationFrameworkName=frameworkName;
|
||||
|
@ -444,10 +402,6 @@ Method for GSWDeclarationParserPragmaDelegate protocol
|
|||
};
|
||||
};
|
||||
|
||||
NSDebugMLLog(@"gswcomponents",
|
||||
@"declarationFrameworkName=%@",
|
||||
declarationFrameworkName);
|
||||
|
||||
for(iLanguage=0;iLanguage<=[_languages count] && !path;iLanguage++)
|
||||
{
|
||||
NSString* language=nil;
|
||||
|
@ -464,31 +418,17 @@ Method for GSWDeclarationParserPragmaDelegate protocol
|
|||
GSWPagePSuffix[GSWebNamingConvForRound(iName)]];
|
||||
completeResourceName=[declarationFileName stringByAppendingString:
|
||||
GSWComponentDeclarationsPSuffix[GSWebNamingConvForRound(iName)]];
|
||||
NSDebugMLLog(@"gswcomponents",
|
||||
@"resourceName=%@ completeResourceName=%@ declarationFileName=%@",
|
||||
resourceName,
|
||||
completeResourceName,
|
||||
declarationFileName);
|
||||
|
||||
NSDebugMLLog(@"gswcomponents",
|
||||
@"Search %@ Language=%@",resourceName,language);
|
||||
|
||||
path=[resourceManager pathForResourceNamed:resourceName
|
||||
inFramework:declarationFrameworkName
|
||||
language:language];
|
||||
NSDebugMLLog(@"gswcomponents",
|
||||
@"Search In Page Component: language=%@ path=%@ _processedDeclarationsFilePaths=%@",
|
||||
language,
|
||||
path,
|
||||
_processedDeclarationsFilePaths);
|
||||
|
||||
if (path)
|
||||
{
|
||||
path=[path stringByAppendingPathComponent:completeResourceName];
|
||||
NSDebugMLLog(@"gswcomponents",@"Found %@ Language=%@ : %@",resourceName,language,path);
|
||||
|
||||
if ([_processedDeclarationsFilePaths containsObject:path])
|
||||
{
|
||||
NSDebugMLLog(@"gswcomponents",@"path=%@ already processed",path);
|
||||
path=nil;
|
||||
isPathAlreadyProcessed=YES;
|
||||
if (language)
|
||||
|
@ -497,40 +437,20 @@ Method for GSWDeclarationParserPragmaDelegate protocol
|
|||
};
|
||||
if (!path)
|
||||
{
|
||||
NSDebugMLLog(@"gswcomponents",
|
||||
@"Direct Search %@ Language=%@",
|
||||
completeResourceName,language);
|
||||
|
||||
path=[resourceManager pathForResourceNamed:completeResourceName
|
||||
inFramework:declarationFrameworkName
|
||||
language:language];
|
||||
if (path)
|
||||
{
|
||||
NSDebugMLLog(@"gswcomponents",
|
||||
@"Direct Found %@ Language=%@ : %@",
|
||||
completeResourceName,language,path);
|
||||
|
||||
if ([_processedDeclarationsFilePaths containsObject:path])
|
||||
{
|
||||
NSDebugMLLog(@"gswcomponents",
|
||||
@"path=%@ already processed",path);
|
||||
path=nil;
|
||||
isPathAlreadyProcessed=YES;
|
||||
if (language)
|
||||
iLanguage=[_languages count]-1;//For directly go to no language search so we don't include (for exemple) an English file for a french file
|
||||
};
|
||||
};
|
||||
NSDebugMLLog(@"gswcomponents",
|
||||
@"Direct Search in Component Declaration language=%@ path=%@ (_processedDeclarationsFilePaths=%@)",
|
||||
language,
|
||||
path,
|
||||
_processedDeclarationsFilePaths);
|
||||
};
|
||||
NSDebugMLLog(@"gswcomponents",
|
||||
@"Search In Page Component: language=%@ path=%@ _processedDeclarationsFilePaths=%@",
|
||||
language,
|
||||
path,
|
||||
_processedDeclarationsFilePaths);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -538,8 +458,6 @@ Method for GSWDeclarationParserPragmaDelegate protocol
|
|||
{
|
||||
NSString* declarationsString=nil;
|
||||
|
||||
NSDebugMLLog(@"GSWTemplateParser",@"path=%@",path);
|
||||
|
||||
[_processedDeclarationsFilePaths addObject:path];
|
||||
|
||||
//NSString* pageDefPath=[path stringByAppendingString:_declarationsPath];
|
||||
|
@ -547,28 +465,21 @@ Method for GSWDeclarationParserPragmaDelegate protocol
|
|||
|
||||
declarationsString=[NSString stringWithContentsOfFile:path];
|
||||
|
||||
NSDebugMLLog(@"GSWTemplateParser",
|
||||
@"ParseDeclarations path=%@: declarationsString:%@\n",path,declarationsString);
|
||||
|
||||
if (declarationsString)
|
||||
{
|
||||
declarations=[self parseDeclarationsString:declarationsString
|
||||
named:declarationFileName
|
||||
inFrameworkNamed:declarationFrameworkName];
|
||||
|
||||
NSDebugMLLog(@"GSWTemplateParser",
|
||||
@"declarations:%@\n",declarations);
|
||||
|
||||
if (!declarations)
|
||||
{
|
||||
LOGError(@"%@ Template componentDeclaration parse failed for "
|
||||
@"included file:%@ in framework:%@ (processedFiles=%@)",
|
||||
[self logPrefix],
|
||||
declarationFileName,
|
||||
declarationFrameworkName,
|
||||
_processedDeclarationsFilePaths);
|
||||
ExceptionRaise(@"%@ Template componentDeclaration parse failed for "
|
||||
@"included file:%@ in framework:%@ (processedFiles=%@)",
|
||||
[self logPrefix],
|
||||
declarationFileName,
|
||||
declarationFrameworkName,
|
||||
_processedDeclarationsFilePaths);
|
||||
};
|
||||
NSDebugMLLog(@"GSWTemplateParser",@"declarations:%@\n",declarations);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -580,7 +491,6 @@ Method for GSWDeclarationParserPragmaDelegate protocol
|
|||
declarationFrameworkName,
|
||||
_processedDeclarationsFilePaths);
|
||||
};
|
||||
NSDebugMLLog(@"GSWTemplateParser",@"declarations:%@\n",declarations);
|
||||
}
|
||||
else if (isPathAlreadyProcessed)
|
||||
{
|
||||
|
@ -598,13 +508,6 @@ Method for GSWDeclarationParserPragmaDelegate protocol
|
|||
_processedDeclarationsFilePaths);
|
||||
};
|
||||
|
||||
NSDebugMLLog(@"GSWTemplateParser",@"Template componentDeclaration "
|
||||
@"includeName:%@ declarations=%@",
|
||||
includedFilePath,
|
||||
declarations);
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return declarations;
|
||||
};
|
||||
|
||||
|
@ -613,11 +516,8 @@ Method for GSWDeclarationParserPragmaDelegate protocol
|
|||
parsed **/
|
||||
-(void)parseDeclarations
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if (!_declarations)
|
||||
{
|
||||
NSDebugMLLog(@"GSWTemplateParser",@"_declarationsFilePath=%@",
|
||||
_declarationsFilePath);
|
||||
if ([_declarationsString length]==0)
|
||||
{
|
||||
ASSIGN(_declarations,[NSDictionary dictionary]);
|
||||
|
@ -632,9 +532,6 @@ parsed **/
|
|||
? [NSMutableSet setWithObject:_declarationsFilePath]
|
||||
: [NSMutableSet set]));
|
||||
|
||||
NSDebugMLLog(@"GSWTemplateParser",
|
||||
@"ParseDeclarations path=%@: declarationsString:%@\n",
|
||||
_declarationsFilePath,_declarationsString);
|
||||
declarations = [self parseDeclarationsString:_declarationsString
|
||||
named:_templateName
|
||||
inFrameworkNamed:_frameworkName];
|
||||
|
@ -642,7 +539,7 @@ parsed **/
|
|||
ASSIGNCOPY(_declarations,declarations);
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -650,10 +547,9 @@ parsed **/
|
|||
declarations **/
|
||||
-(NSDictionary*)declarations
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if (!_declarations)
|
||||
[self parseDeclarations];
|
||||
LOGObjectFnStop();
|
||||
|
||||
return _declarations;
|
||||
};
|
||||
|
||||
|
@ -668,60 +564,33 @@ declarations **/
|
|||
GSWDeclarationParser* declarationParser=nil;
|
||||
NSAutoreleasePool* arpParse=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
arpParse=[NSAutoreleasePool new];
|
||||
GSWLogMemCF("New NSAutoreleasePool: %p",arpParse);
|
||||
|
||||
declarationParser=[GSWDeclarationParser declarationParserWithPragmaDelegate:self];
|
||||
|
||||
NSDebugMLLog(@"GSWTemplateParser",@"name:%@ declarationsString=%@",
|
||||
declarationsName,
|
||||
declarationsString);
|
||||
NS_DURING
|
||||
{
|
||||
declarations=[declarationParser parseDeclarationString:declarationsString
|
||||
named:declarationsName
|
||||
inFrameworkNamed:declarationsFrameworkName];
|
||||
NSDebugMLLog(@"GSWTemplateParser",
|
||||
@"declarations=%@",
|
||||
declarations);
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSDebugMLog(@"ERROR ! %@",localException);
|
||||
NSDebugMLog(@"declarationsName=%@",declarationsName);//TODO
|
||||
NSDebugMLog(@"[self logPrefix]=%@",[self logPrefix]);
|
||||
LOGError(@"%@ name:%@ Declarations Parse failed!",
|
||||
[self logPrefix],
|
||||
declarationsName);
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo(localException,
|
||||
@"%@ In [declarationsParser document]...",
|
||||
[self logPrefix]);
|
||||
[localException retain];
|
||||
GSWLogMemCF("Destroy NSAutoreleasePool: %p",arpParse);
|
||||
DESTROY(arpParse);
|
||||
[localException autorelease];
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
|
||||
NSDebugMLLog0(@"low",@"arpParse infos:\n");
|
||||
[declarations retain];
|
||||
|
||||
NSDebugMLLog0(@"low",@"DESTROY(arpParse)\n");
|
||||
GSWLogMemCF("Destroy NSAutoreleasePool: %p",arpParse);
|
||||
|
||||
DESTROY(arpParse);
|
||||
|
||||
NSDebugMLLog0(@"low",@"DESTROYED(arpParse)\n");
|
||||
[declarations autorelease];
|
||||
|
||||
NSDebugMLLog(@"GSWTemplateParser",
|
||||
@"declarations:%@\n",
|
||||
declarations);
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return declarations;
|
||||
};
|
||||
|
|
|
@ -63,8 +63,6 @@ RCS_ID("$Id$")
|
|||
templateInfo:(NSString*)templateInfo
|
||||
parent:(GSWTemporaryElement*)parent
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
|
||||
if ((self=[self init]))
|
||||
{
|
||||
_parent=parent;
|
||||
|
@ -72,8 +70,6 @@ RCS_ID("$Id$")
|
|||
ASSIGNCOPY(_templateInfo,templateInfo);
|
||||
};
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return self;
|
||||
};
|
||||
|
||||
|
@ -103,23 +99,17 @@ RCS_ID("$Id$")
|
|||
/** adds element to children **/
|
||||
-(void)addChildElement:(GSWElement*)element
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
|
||||
if (!_children)
|
||||
_children=[NSMutableArray new];
|
||||
[_children addObject:element];
|
||||
|
||||
LOGObjectFnStart();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
/** Returns parent element **/
|
||||
-(GSWTemporaryElement*)parentElement
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return _parent;
|
||||
};
|
||||
|
||||
|
@ -127,10 +117,6 @@ RCS_ID("$Id$")
|
|||
/** Returns template information **/
|
||||
-(NSString*)templateInfo
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return _templateInfo;
|
||||
}
|
||||
|
||||
|
@ -143,11 +129,6 @@ RCS_ID("$Id$")
|
|||
NSMutableArray* elementChildren=nil;
|
||||
int childrenCount=0;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
NSDebugMLog(@"self=%@",self);
|
||||
NSDebugMLog(@"_children=%@",_children);
|
||||
|
||||
// Is there children ?
|
||||
childrenCount=[_children count];
|
||||
if (childrenCount>0)
|
||||
|
@ -166,10 +147,8 @@ RCS_ID("$Id$")
|
|||
for(i=0;i<childrenCount;i++)
|
||||
{
|
||||
GSWElement* element=[_children objectAtIndex:i];
|
||||
NSDebugMLog(@"element=%@",element);
|
||||
if ([element isKindOfClass:[GSWHTMLBareString class]])// Concatenate BareStrings
|
||||
{
|
||||
NSDebugMLog(@"bareStringText=%@",bareStringText);
|
||||
if (bareStringText)
|
||||
{
|
||||
[bareStringText appendString:[(GSWHTMLBareString*)element string]];
|
||||
|
@ -181,7 +160,6 @@ RCS_ID("$Id$")
|
|||
bareStringText=[NSMutableString stringWithString:[(GSWHTMLBareString*)element string]];
|
||||
element=nil;
|
||||
};
|
||||
NSDebugMLog(@"element=%@",element);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -189,7 +167,6 @@ RCS_ID("$Id$")
|
|||
{
|
||||
GSWHTMLBareString* bareString = [GSWHTMLBareString elementWithString:bareStringText];
|
||||
[bareStringText setString:@""];
|
||||
NSDebugMLog(@"bareString=%@",bareString);
|
||||
if (!elementChildren)
|
||||
elementChildren=(NSMutableArray*)[NSMutableArray array];
|
||||
[elementChildren addObject:bareString];
|
||||
|
@ -204,7 +181,6 @@ RCS_ID("$Id$")
|
|||
};
|
||||
};
|
||||
|
||||
NSDebugMLog(@"elementChildren=%@",elementChildren);
|
||||
if ([elementChildren count]==1)
|
||||
{
|
||||
template=[elementChildren lastObject];
|
||||
|
@ -215,10 +191,6 @@ RCS_ID("$Id$")
|
|||
};
|
||||
};
|
||||
|
||||
NSDebugMLog(@"template=%@",template);
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return template;
|
||||
}
|
||||
|
||||
|
@ -230,13 +202,9 @@ nil if none is found
|
|||
{
|
||||
NSString* name=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
name=[_properties objectForKey:@"name"];
|
||||
NSDebugMLog(@"name=%@",name);
|
||||
NSDebugMLog(@"_properties=%@",_properties);
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return name;
|
||||
};
|
||||
|
@ -254,19 +222,11 @@ found for that element
|
|||
NSString* name=nil;
|
||||
GSWDeclaration* elementDeclaration=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
NSDebugMLog(@"self=%@",self);
|
||||
NSDebugMLog(@"declarations=%@",declarations);
|
||||
NSDebugMLog(@"languages=%@",languages);
|
||||
|
||||
// First, get children template
|
||||
template = [self template];
|
||||
NSDebugMLog(@"template=%@",template);
|
||||
|
||||
// Get element name
|
||||
name=[self name];
|
||||
NSDebugMLog(@"name=%@",name);
|
||||
|
||||
if (!name)
|
||||
{
|
||||
|
@ -277,7 +237,6 @@ found for that element
|
|||
else
|
||||
{
|
||||
elementDeclaration = [declarations objectForKey:name];
|
||||
NSDebugMLog(@"elementDeclaration=%@",elementDeclaration);
|
||||
|
||||
if (!elementDeclaration)
|
||||
{
|
||||
|
@ -292,11 +251,9 @@ found for that element
|
|||
properties:_properties
|
||||
template:template
|
||||
languages:languages];
|
||||
NSDebugMLog(@"element=%@",element);
|
||||
};
|
||||
};
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return element;
|
||||
}
|
||||
|
@ -313,13 +270,6 @@ May raise exception if element can't be created
|
|||
{
|
||||
GSWElement* element = nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
NSDebugMLog(@"declaration=%@",declaration);
|
||||
NSDebugMLog(@"name=%@",name);
|
||||
NSDebugMLog(@"properties=%@",properties);
|
||||
NSDebugMLog(@"template=%@",template);
|
||||
|
||||
if (!declaration)
|
||||
{
|
||||
[GSWDeclarationFormatException raise:GSWDFEMissingDeclarationForElement
|
||||
|
@ -330,7 +280,6 @@ May raise exception if element can't be created
|
|||
{
|
||||
Class elementClass = Nil;
|
||||
NSString* elementType=[declaration type];
|
||||
NSDebugMLog(@"elementType=%@",elementType);
|
||||
|
||||
if (elementType != nil) {
|
||||
elementClass = NSClassFromString(elementType);
|
||||
|
@ -346,8 +295,6 @@ May raise exception if element can't be created
|
|||
{
|
||||
NSDictionary* associations = nil;
|
||||
|
||||
NSDebugMLog(@"elementClass=%@",elementClass);
|
||||
|
||||
associations=[declaration associations];
|
||||
if ([properties count]>0)
|
||||
{
|
||||
|
@ -362,7 +309,6 @@ May raise exception if element can't be created
|
|||
if (!addedAssoc)
|
||||
addedAssoc=(NSMutableDictionary*)[NSMutableDictionary dictionary];
|
||||
value=[properties objectForKey:key];
|
||||
NSDebugMLog(@"key=%@ value=%@",key,value);
|
||||
[addedAssoc setObject:[GSWAssociation associationWithValue:value]
|
||||
forKey:key];
|
||||
};
|
||||
|
@ -378,7 +324,6 @@ May raise exception if element can't be created
|
|||
associations:associations
|
||||
template:template
|
||||
languages:languages];
|
||||
NSDebugMLog(@"element=%@",element);
|
||||
if (element)
|
||||
{
|
||||
[element setDeclarationName:[declaration name]];
|
||||
|
@ -392,10 +337,6 @@ May raise exception if element can't be created
|
|||
};
|
||||
};
|
||||
|
||||
NSDebugMLog(@"element=%@",element);
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return element;
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,6 @@ static Class standardClass = Nil;
|
|||
{
|
||||
//OK
|
||||
NSMutableDictionary* otherAssociations=nil;
|
||||
LOGObjectFnStart();
|
||||
ASSIGN(_children,templateElement);
|
||||
_action = [[someAssociations objectForKey:action__Key
|
||||
withDefaultObject:[_action autorelease]] retain];
|
||||
|
@ -95,7 +94,6 @@ static Class standardClass = Nil;
|
|||
template:nil]))
|
||||
{
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
|
@ -132,7 +130,6 @@ static Class standardClass = Nil;
|
|||
//OK (condition/action/directActionName)
|
||||
GSWComponent* component=GSWContext_component(aContext);
|
||||
BOOL disabled=NO;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"gswdync",@"elementID=%@",GSWContext_elementID(aContext));
|
||||
if (_disabled)
|
||||
{
|
||||
|
@ -181,7 +178,6 @@ static Class standardClass = Nil;
|
|||
GSWResponse_appendContentAsciiString(aResponse,@"</a>");
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"senderID=%@",GSWContext_senderID(aContext));
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -193,7 +189,6 @@ static Class standardClass = Nil;
|
|||
NSString* senderID=nil;
|
||||
NSString* elementID=nil;
|
||||
|
||||
LOGObjectFnStart();
|
||||
|
||||
senderID=GSWContext_senderID(aContext);
|
||||
NSDebugMLLog(@"gswdync",@"senderID=%@",senderID);
|
||||
|
@ -236,7 +231,6 @@ static Class standardClass = Nil;
|
|||
NSDebugMLLog(@"gswdync",@"senderID=%@",GSWContext_senderID(aContext));
|
||||
NSDebugMLLog(@"gswdync",@"elementID=%@",GSWContext_elementID(aContext));
|
||||
|
||||
LOGObjectFnStop();
|
||||
|
||||
return element;
|
||||
};
|
||||
|
|
|
@ -159,7 +159,6 @@ static Class NSStringClass = Nil;
|
|||
mimeType:(NSString*)type
|
||||
key:(NSString*)key
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if ((self=[super init]))
|
||||
{
|
||||
ASSIGN(_data,data);
|
||||
|
@ -179,7 +178,6 @@ static Class NSStringClass = Nil;
|
|||
};
|
||||
NSDebugMLog(@"key=%@",_key);
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
||||
|
@ -199,7 +197,6 @@ static Class NSStringClass = Nil;
|
|||
{
|
||||
NSString* queryString=nil;
|
||||
GSWDynamicURLString* url=nil;
|
||||
LOGObjectFnStart();
|
||||
queryString=[NSString stringWithFormat:@"%@=%@",GSWKey_Data[GSWebNamingConv],[self key]];
|
||||
NSDebugMLog(@"queryString=%@",queryString);
|
||||
url=[aContext urlWithRequestHandlerKey:GSWResourceRequestHandlerKey[GSWebNamingConv]
|
||||
|
@ -207,7 +204,6 @@ static Class NSStringClass = Nil;
|
|||
queryString:queryString];
|
||||
NSDebugMLog(@"url=%@",url);
|
||||
GSWResponse_appendContentAsciiString(aResponse,(NSString*)url);
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -216,7 +212,6 @@ static Class NSStringClass = Nil;
|
|||
{
|
||||
//OK
|
||||
NSData* data=_data;
|
||||
LOGObjectFnStart();
|
||||
// GSWStartElement(aContext);
|
||||
// GSWSaveAppendToResponseElementID(aContext);
|
||||
NSDebugMLog(@"data=%@",data);
|
||||
|
@ -233,7 +228,6 @@ static Class NSStringClass = Nil;
|
|||
|
||||
[response setHeader:_mimeType
|
||||
forKey:@"content-type"];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -247,32 +241,24 @@ static Class NSStringClass = Nil;
|
|||
//--------------------------------------------------------------------
|
||||
-(BOOL)isTemporary
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _temporaryKey;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSData*)data
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _data;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)type
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _mimeType;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)key
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
return _key;
|
||||
};
|
||||
|
||||
|
|
|
@ -55,10 +55,10 @@ typedef unsigned char BYTE;
|
|||
#define BYTE_DEFINED
|
||||
#endif
|
||||
#ifndef UINTs_DEFINED
|
||||
typedef unsigned int UINT;
|
||||
typedef NSUInteger UINT;
|
||||
typedef unsigned char UINT8;
|
||||
typedef unsigned short UINT16;
|
||||
typedef unsigned int UINT32;
|
||||
typedef NSUInteger UINT32;
|
||||
#define UINTs_DEFINED
|
||||
#endif
|
||||
|
||||
|
@ -81,7 +81,7 @@ GSWEB_EXPORT NSNumber* GSWNumber_No();
|
|||
|
||||
#define GSW_LOCK_LIMIT [NSDate dateWithTimeIntervalSinceNow:GSLOCK_DELAY_S]
|
||||
|
||||
GSWEB_EXPORT char* GSWIntToString(char* buffer,unsigned int bufferSize,int value,unsigned int* resultLength);
|
||||
GSWEB_EXPORT char* GSWIntToString(char* buffer,NSUInteger bufferSize,int value,NSUInteger* resultLength);
|
||||
GSWEB_EXPORT NSString* GSWIntToNSString(int value);
|
||||
GSWEB_EXPORT NSNumber* GSWIntNumber(int value);
|
||||
|
||||
|
@ -244,8 +244,8 @@ GSWEB_EXPORT NSString* GSWGetDefaultDocRoot();
|
|||
-(void)addObject:(id)object;
|
||||
-(void)addObjectsFromArray:(NSArray*)array;
|
||||
-(void)insertObject:(id)object
|
||||
atIndex:(unsigned int)index;
|
||||
-(void)replaceObjectAtIndex:(unsigned int)index
|
||||
atIndex:(NSUInteger)index;
|
||||
-(void)replaceObjectAtIndex:(NSUInteger)index
|
||||
withObject:(id)object;
|
||||
-(void)replaceObjectsInRange:(NSRange)range
|
||||
withObjectsFromArray:(NSArray*)array;
|
||||
|
@ -368,19 +368,19 @@ loggedUnlockFromFunctionInFileInLine(id self,
|
|||
@interface NSData (SBNSData)
|
||||
-(NSRange)rangeOfData:(NSData*)data;
|
||||
-(NSRange)rangeOfData:(NSData*)data
|
||||
options:(unsigned)mask;
|
||||
options:(NSUInteger)mask;
|
||||
-(NSRange)rangeOfData:(NSData *)aData
|
||||
options:(unsigned)mask
|
||||
options:(NSUInteger)mask
|
||||
range:(NSRange)aRange;
|
||||
-(NSArray*)componentsSeparatedByData:(NSData*)separator;
|
||||
-(NSData*)dataByDeletingFirstBytesCount:(unsigned int)bytesCount;
|
||||
-(NSData*)dataByDeletingLastBytesCount:(unsigned int)bytesCount;
|
||||
-(NSData*)dataByDeletingFirstBytesCount:(NSUInteger)bytesCount;
|
||||
-(NSData*)dataByDeletingLastBytesCount:(NSUInteger)bytesCount;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface NSMutableData (SBNSData)
|
||||
-(void)deleteFirstBytesCount:(unsigned int)bytesCount;
|
||||
-(void)deleteLastBytesCount:(unsigned int)bytesCount;
|
||||
-(void)deleteFirstBytesCount:(NSUInteger)bytesCount;
|
||||
-(void)deleteLastBytesCount:(NSUInteger)bytesCount;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
|
@ -436,7 +436,7 @@ typedef enum _NSNumFmtType
|
|||
|
||||
//====================================================================
|
||||
@interface NSMutableData (Replace)
|
||||
- (unsigned int) replaceOccurrencesOfData: (NSData*)replace
|
||||
- (NSUInteger) replaceOccurrencesOfData: (NSData*)replace
|
||||
withData: (NSData*)by
|
||||
range: (NSRange)searchRange;
|
||||
@end
|
||||
|
|
|
@ -37,9 +37,12 @@ RCS_ID("$Id$")
|
|||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#ifdef GNUSTEP
|
||||
#include <objc/thr.h>
|
||||
#ifndef GNUSTEP
|
||||
#include <GNUstepBase/GSObjCRuntime.h>
|
||||
#endif
|
||||
#include <GNUstepBase/NSObject+GNUstepBase.h>
|
||||
#include <GNUstepBase/NSString+GNUstepBase.h>
|
||||
#include <GNUstepBase/GSMime.h>
|
||||
#include "stacktrace.h"
|
||||
#include "attach.h"
|
||||
|
||||
|
@ -175,7 +178,7 @@ NSNumber* GSWNumber_No()
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
char* GSWIntToString(char* buffer,unsigned int bufferSize,int value,unsigned int* resultLength)
|
||||
char* GSWIntToString(char* buffer,NSUInteger bufferSize,int value,NSUInteger* resultLength)
|
||||
{
|
||||
int origValue=value;
|
||||
int i=bufferSize-1;
|
||||
|
@ -234,7 +237,7 @@ NSString* GSWIntToNSString(int value)
|
|||
{
|
||||
NSString* s=nil;
|
||||
char buffer[20];
|
||||
unsigned int resultLength=0;
|
||||
NSUInteger resultLength=0;
|
||||
|
||||
NSCAssert(nsStringClass,@"GSWUtils not initialized");
|
||||
|
||||
|
@ -806,10 +809,8 @@ void ValidationExceptionRaiseFn0(const char *func,
|
|||
-(NSString*)htmlDescription
|
||||
{
|
||||
NSTimeZone* gmtTZ=[NSTimeZone timeZoneWithName:@"GMT"];
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
if (!gmtTZ)
|
||||
NSWarnLog(@"no time zone for GMT");
|
||||
//TODO English day...
|
||||
return [self descriptionWithCalendarFormat:@"%A, %d-%b-%Y %H:%M:%S GMT"
|
||||
timeZone:gmtTZ
|
||||
locale:nil];
|
||||
|
@ -832,7 +833,7 @@ void ValidationExceptionRaiseFn0(const char *func,
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
- (id)initWithCapacity:(unsigned)cap
|
||||
- (id)initWithCapacity:(NSUInteger)cap
|
||||
{
|
||||
if ((self=[super init]))
|
||||
{
|
||||
|
@ -843,19 +844,19 @@ void ValidationExceptionRaiseFn0(const char *func,
|
|||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
- (unsigned)count
|
||||
- (NSUInteger)count
|
||||
{
|
||||
return [_array count];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
- (id)objectAtIndex:(unsigned)i
|
||||
- (id)objectAtIndex:(NSUInteger)i
|
||||
{
|
||||
return [_array objectAtIndex:i];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
- (void)removeObjectAtIndex:(unsigned)i
|
||||
- (void)removeObjectAtIndex:(NSUInteger)i
|
||||
{
|
||||
[_array removeObjectAtIndex:i];
|
||||
}
|
||||
|
@ -904,32 +905,27 @@ void ValidationExceptionRaiseFn0(const char *func,
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)insertObject:(id)object
|
||||
atIndex:(unsigned int)index
|
||||
atIndex:(NSUInteger)index
|
||||
{
|
||||
LOGException0(@"NSMutableOrderedArray doesn't support this fn");
|
||||
|
||||
[NSException raise:@"NSMutableOrderedArray"
|
||||
format:@"NSMutableOrderedArray doesn't support %s",sel_get_name(_cmd)];
|
||||
format:@"NSMutableOrderedArray doesn't support %s",sel_getName(_cmd)];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)replaceObjectAtIndex:(unsigned int)index
|
||||
-(void)replaceObjectAtIndex:(NSUInteger)index
|
||||
withObject:(id)object
|
||||
{
|
||||
LOGException0(@"NSMutableOrderedArray doesn't support this fn");
|
||||
|
||||
[NSException raise:@"NSMutableOrderedArray"
|
||||
format:@"NSMutableOrderedArray doesn't support %s",sel_get_name(_cmd)];
|
||||
format:@"NSMutableOrderedArray doesn't support %s",sel_getName(_cmd)];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)replaceObjectsInRange:(NSRange)range
|
||||
withObjectsFromArray:(NSArray*)array
|
||||
{
|
||||
LOGException0(@"NSMutableOrderedArray doesn't support this fn");
|
||||
|
||||
[NSException raise:@"NSMutableOrderedArray"
|
||||
format:@"NSMutableOrderedArray doesn't support %s",sel_get_name(_cmd)];
|
||||
format:@"NSMutableOrderedArray doesn't support %s",sel_getName(_cmd)];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -937,10 +933,8 @@ void ValidationExceptionRaiseFn0(const char *func,
|
|||
withObjectsFromArray:(NSArray*)array
|
||||
range:(NSRange)arrayRange
|
||||
{
|
||||
LOGException0(@"NSMutableOrderedArray doesn't support this fn");
|
||||
|
||||
[NSException raise:@"NSMutableOrderedArray"
|
||||
format:@"NSMutableOrderedArray doesn't support %s",sel_get_name(_cmd)];
|
||||
format:@"NSMutableOrderedArray doesn't support %s",sel_getName(_cmd)];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -1060,7 +1054,7 @@ volatileInternalDescription(NSLock *self)
|
|||
#ifdef GNUSTEP
|
||||
struct objc_mutex *mutex = 0;
|
||||
const char *type;
|
||||
unsigned int size;
|
||||
NSUInteger size;
|
||||
int offset;
|
||||
|
||||
if (GSObjCFindVariable(self, "_mutex", &type, &size, &offset))
|
||||
|
@ -1196,7 +1190,7 @@ loggedUnlockFromFunctionInFileInLine(id self,
|
|||
withObject:(id)object1
|
||||
withObject:(id)object2
|
||||
{
|
||||
unsigned i = [self count];
|
||||
NSUInteger i = [self count];
|
||||
while (i-- > 0)
|
||||
[[self objectAtIndex:i]performSelector:selector
|
||||
withObject:object1
|
||||
|
@ -1206,7 +1200,7 @@ loggedUnlockFromFunctionInFileInLine(id self,
|
|||
//--------------------------------------------------------------------
|
||||
-(void)makeObjectsPerformSelectorIfPossible:(SEL)aSelector
|
||||
{
|
||||
unsigned i = [self count];
|
||||
NSUInteger i = [self count];
|
||||
while (i-->0)
|
||||
[[self objectAtIndex: i] performSelectorIfPossible:aSelector];
|
||||
}
|
||||
|
@ -1221,7 +1215,7 @@ loggedUnlockFromFunctionInFileInLine(id self,
|
|||
-(void)makeObjectsPerformSelectorIfPossible:(SEL)aSelector
|
||||
withObject:(id)argument
|
||||
{
|
||||
unsigned i = [self count];
|
||||
NSUInteger i = [self count];
|
||||
while (i-->0)
|
||||
[[self objectAtIndex: i] performSelectorIfPossible:aSelector
|
||||
withObject:argument];
|
||||
|
@ -1232,7 +1226,7 @@ loggedUnlockFromFunctionInFileInLine(id self,
|
|||
withObject:(id)argument1
|
||||
withObject:(id)argument2
|
||||
{
|
||||
unsigned i = [self count];
|
||||
NSUInteger i = [self count];
|
||||
while (i-->0)
|
||||
[[self objectAtIndex: i] performSelectorIfPossible:aSelector
|
||||
withObject:argument1
|
||||
|
@ -1421,7 +1415,6 @@ NSString* GSWGetDefaultDocRoot()
|
|||
NSString* key=nil;
|
||||
NSString* newKey=nil;
|
||||
id value=nil;
|
||||
LOGObjectFnStart();
|
||||
newDictionary=(NSMutableDictionary*)[NSMutableDictionary dictionary];
|
||||
enumerator = [self keyEnumerator];
|
||||
while ((key = [enumerator nextObject]))
|
||||
|
@ -1441,7 +1434,6 @@ NSString* GSWGetDefaultDocRoot()
|
|||
};
|
||||
};
|
||||
newDictionary=[NSDictionary dictionaryWithDictionary:newDictionary];
|
||||
LOGObjectFnStop();
|
||||
return newDictionary;
|
||||
};
|
||||
|
||||
|
@ -1588,7 +1580,7 @@ NSString* GSWGetDefaultDocRoot()
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSRange)rangeOfData:(NSData*)data
|
||||
options:(unsigned)mask
|
||||
options:(NSUInteger)mask
|
||||
{
|
||||
NSRange all = NSMakeRange(0,[self length]);
|
||||
return [self rangeOfData:data
|
||||
|
@ -1598,7 +1590,7 @@ NSString* GSWGetDefaultDocRoot()
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSRange)rangeOfData:(NSData *)aData
|
||||
options:(unsigned)mask
|
||||
options:(NSUInteger)mask
|
||||
range:(NSRange)aRange
|
||||
{
|
||||
NSRange range=NSMakeRange(NSNotFound,0);
|
||||
|
@ -1632,27 +1624,19 @@ NSString* GSWGetDefaultDocRoot()
|
|||
{
|
||||
if (reverse)
|
||||
{
|
||||
NSDebugFLog(@"cmp at %d length %d",
|
||||
aRange.location-aDataLength,
|
||||
aDataLength);
|
||||
if (memcmp(selfBytes+aRange.location-aDataLength,
|
||||
aDataBytes,
|
||||
aDataLength)==0)
|
||||
{
|
||||
NSDebugFLog0(@"FOUND");
|
||||
range=NSMakeRange(selfLength-aDataLength,aDataLength);
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
NSDebugFLog(@"cmp at %d length %d",
|
||||
aRange.location,
|
||||
aDataLength);
|
||||
if (memcmp(selfBytes+aRange.location,
|
||||
aDataBytes,
|
||||
aDataLength))
|
||||
{
|
||||
NSDebugFLog0(@"FOUND");
|
||||
range=NSMakeRange(0,aDataLength);
|
||||
};
|
||||
};
|
||||
|
@ -1664,18 +1648,13 @@ NSString* GSWGetDefaultDocRoot()
|
|||
{
|
||||
int i=0;
|
||||
int first=(aRange.location+aDataLength);
|
||||
NSDebugFLog(@"cmp at %d downto index: %d",
|
||||
aRange.location+aRange.length-1,
|
||||
first);
|
||||
for(i=aRange.location+aRange.length-1;i>=first && range.length==0;i--)
|
||||
{
|
||||
if (((unsigned char*)selfBytes)[i]==((unsigned char*)aDataBytes)[aDataLength-1])
|
||||
{
|
||||
NSDebugFLog(@"FOUND Last Char at %d",i);
|
||||
if (memcmp(selfBytes+i-aDataLength,aDataBytes,aDataLength)==0)
|
||||
{
|
||||
range=NSMakeRange(i-aDataLength,aDataLength);
|
||||
NSDebugFLog(@"FOUND at %d",i-aDataLength);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1684,18 +1663,14 @@ NSString* GSWGetDefaultDocRoot()
|
|||
{
|
||||
int i=0;
|
||||
int last=aRange.location+aRange.length-aDataLength;
|
||||
NSDebugFLog(@"cmp at %d upto index: %d",
|
||||
aRange.location,
|
||||
last);
|
||||
|
||||
for(i=aRange.location;i<=last && range.length==0;i++)
|
||||
{
|
||||
if (((unsigned char*)selfBytes)[i]==((unsigned char*)aDataBytes)[0])
|
||||
{
|
||||
NSDebugFLog(@"FOUND First Char at %d",i);
|
||||
if (memcmp(selfBytes+i,aDataBytes,aDataLength)==0)
|
||||
{
|
||||
range=NSMakeRange(i,aDataLength);
|
||||
NSDebugFLog(@"FOUND at %d",i);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1716,18 +1691,17 @@ NSString* GSWGetDefaultDocRoot()
|
|||
NSRange found;
|
||||
NSData* tmpData=nil;
|
||||
NSMutableArray *array = [NSMutableArray array];
|
||||
NSDebugFLog(@"aSeparator %@ length=%d",aSeparator,[aSeparator length]);
|
||||
NSDebugFLog(@"self length=%d",[self length]);
|
||||
|
||||
search=NSMakeRange(0, [self length]);
|
||||
complete=search;
|
||||
found=[self rangeOfData:aSeparator];
|
||||
NSDebugFLog(@"found=(%u,%u)",found.location,found.length);
|
||||
|
||||
while (found.length)
|
||||
{
|
||||
NSRange current;
|
||||
current = NSMakeRange (search.location,
|
||||
found.location-search.location);
|
||||
NSDebugFLog(@"current=(%u,%u)",current.location,current.length);
|
||||
|
||||
tmpData=[self subdataWithRange:current];
|
||||
[array addObject:tmpData];
|
||||
search = NSMakeRange (found.location + found.length,
|
||||
|
@ -1739,12 +1713,12 @@ NSString* GSWGetDefaultDocRoot()
|
|||
// Add the last search data range
|
||||
tmpData=[self subdataWithRange:search];
|
||||
[array addObject:tmpData];
|
||||
NSDebugFLog(@"array=%@",array);
|
||||
|
||||
return [NSArray arrayWithArray:array];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSData*)dataByDeletingFirstBytesCount:(unsigned int)bytesCount
|
||||
-(NSData*)dataByDeletingFirstBytesCount:(NSUInteger)bytesCount
|
||||
{
|
||||
NSMutableData* tmpdata=[self mutableCopy];
|
||||
[tmpdata deleteFirstBytesCount:bytesCount];
|
||||
|
@ -1752,7 +1726,7 @@ NSString* GSWGetDefaultDocRoot()
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSData*)dataByDeletingLastBytesCount:(unsigned int)bytesCount
|
||||
-(NSData*)dataByDeletingLastBytesCount:(NSUInteger)bytesCount
|
||||
{
|
||||
NSMutableData* tmpdata=[self mutableCopy];
|
||||
[tmpdata deleteLastBytesCount:bytesCount];
|
||||
|
@ -1765,10 +1739,10 @@ NSString* GSWGetDefaultDocRoot()
|
|||
@implementation NSMutableData (SBNSData)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)deleteFirstBytesCount:(unsigned int)bytesCount
|
||||
-(void)deleteFirstBytesCount:(NSUInteger)bytesCount
|
||||
{
|
||||
void* mutableBytes=NULL;
|
||||
unsigned int length=[self length];
|
||||
NSUInteger length=[self length];
|
||||
NSAssert2(length>=bytesCount,
|
||||
@"Can't delete %d first bytes from a data of length %d",
|
||||
bytesCount,length);
|
||||
|
@ -1778,9 +1752,9 @@ NSString* GSWGetDefaultDocRoot()
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)deleteLastBytesCount:(unsigned int)bytesCount;
|
||||
-(void)deleteLastBytesCount:(NSUInteger)bytesCount;
|
||||
{
|
||||
unsigned int length=[self length];
|
||||
NSUInteger length=[self length];
|
||||
NSAssert2(length>=bytesCount,
|
||||
@"Can't delete %d last bytes from a data of length %d",
|
||||
bytesCount,length);
|
||||
|
@ -1863,9 +1837,9 @@ NSString* GSWGetDefaultDocRoot()
|
|||
}
|
||||
else
|
||||
{
|
||||
LOGSeriousError(@"Can't convert %@ of class %@ to string",
|
||||
anObject,
|
||||
[anObject class]);
|
||||
// LOGSeriousError(@"Can't convert %@ of class %@ to string",
|
||||
// anObject,
|
||||
// [anObject class]);
|
||||
string=@"***";
|
||||
};
|
||||
break;
|
||||
|
@ -1892,17 +1866,17 @@ NSString* GSWGetDefaultDocRoot()
|
|||
}
|
||||
else
|
||||
{
|
||||
LOGSeriousError(@"Can't convert %@ of class %@ to string",
|
||||
anObject,
|
||||
[anObject class]);
|
||||
// LOGSeriousError(@"Can't convert %@ of class %@ to string",
|
||||
// anObject,
|
||||
// [anObject class]);
|
||||
string=@"***";
|
||||
};
|
||||
break;
|
||||
case NSNumFmtType__Unknown:
|
||||
default:
|
||||
LOGSeriousError(@"Unknown type %d to convert %@ to string",
|
||||
(int)_type,
|
||||
anObject);
|
||||
// LOGSeriousError(@"Unknown type %d to convert %@ to string",
|
||||
// (int)_type,
|
||||
// anObject);
|
||||
string=@"***";
|
||||
break;
|
||||
};
|
||||
|
@ -1932,9 +1906,9 @@ NSString* GSWGetDefaultDocRoot()
|
|||
break;
|
||||
case NSNumFmtType__Unknown:
|
||||
default:
|
||||
LOGSeriousError(@"Unknown type %d to convert from string %@",
|
||||
(int)_type,
|
||||
string);
|
||||
// LOGSeriousError(@"Unknown type %d to convert from string %@",
|
||||
// (int)_type,
|
||||
// string);
|
||||
*error = @"Unknown type";
|
||||
break;
|
||||
};
|
||||
|
@ -1943,7 +1917,6 @@ NSString* GSWGetDefaultDocRoot()
|
|||
|
||||
@end
|
||||
|
||||
#include <GNUstepBase/GSMime.h>
|
||||
|
||||
//====================================================================
|
||||
@implementation NSData (Base64)
|
||||
|
@ -2011,12 +1984,12 @@ NSString* GSWGetDefaultDocRoot()
|
|||
@implementation NSMutableData (Replace)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
- (unsigned int) replaceOccurrencesOfData: (NSData*)replace
|
||||
- (NSUInteger) replaceOccurrencesOfData: (NSData*)replace
|
||||
withData: (NSData*)by
|
||||
range: (NSRange)searchRange
|
||||
{
|
||||
NSRange range;
|
||||
unsigned int count = 0;
|
||||
NSUInteger count = 0;
|
||||
|
||||
if (replace == nil)
|
||||
{
|
||||
|
@ -2033,12 +2006,12 @@ NSString* GSWGetDefaultDocRoot()
|
|||
|
||||
if (range.length > 0)
|
||||
{
|
||||
unsigned byLen = [by length];
|
||||
NSUInteger byLen = [by length];
|
||||
const void* byBytes=[by bytes];
|
||||
|
||||
do
|
||||
{
|
||||
unsigned int newEnd;
|
||||
NSUInteger newEnd;
|
||||
count++;
|
||||
[self replaceBytesInRange:range
|
||||
withBytes:byBytes
|
||||
|
|
|
@ -42,8 +42,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
GSWAssociation* languageAssociation=nil;
|
||||
NSMutableDictionary* tmpAssociations=[NSMutableDictionary dictionaryWithDictionary:associations];
|
||||
LOGObjectFnStartC("GSWVBScript");
|
||||
NSDebugMLLog(@"gswdync",@"aName=%@ associations:%@ templateElement=%@",aName,associations,templateElement);
|
||||
|
||||
if (![tmpAssociations objectForKey:language__Key])
|
||||
{
|
||||
// Create and set the language (Javascript)
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
#define GSWEvent WOEvent
|
||||
#define GSWHTTPConnection WOHTTPConnection
|
||||
#define GSWMailDelivery WOMailDelivery
|
||||
#define GSWMessage WOMesssage
|
||||
#define GSWMessage WOMessage
|
||||
#define GSWRequest WORequest
|
||||
#define GSWRequestHandler WORequestHandler
|
||||
#define GSWResourceManager WOResourceManager
|
||||
|
|
|
@ -66,10 +66,19 @@ static NSString *REQUEST_ID = @"x-webobjects-request-id";
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* drain all vars that have been created in the thread.
|
||||
*/
|
||||
-(void)drain
|
||||
{
|
||||
DESTROY(_pool);
|
||||
}
|
||||
|
||||
-(void)dealloc
|
||||
{
|
||||
// TODO: add vars!
|
||||
|
||||
|
||||
DESTROY(_t);
|
||||
DESTROY(_serverSocket);
|
||||
DESTROY(_currentSocket);
|
||||
|
||||
|
@ -77,7 +86,10 @@ static NSString *REQUEST_ID = @"x-webobjects-request-id";
|
|||
|
||||
_app = nil;
|
||||
_mtAdaptor = nil;
|
||||
DESTROY(_pool);
|
||||
// we are NOT draining our _pool here we do it before the thread is gone.
|
||||
// otherwise, we get nice
|
||||
// *** attempt to pop an unknown autorelease pool
|
||||
// messages -- dw
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
@ -117,7 +129,6 @@ static NSString *REQUEST_ID = @"x-webobjects-request-id";
|
|||
|
||||
- (void)threadWillExit:(NSNotification*)notification
|
||||
{
|
||||
NSLog(@"%s",__PRETTY_FUNCTION__);
|
||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||
|
||||
[_mtAdaptor workerThreadWillExit:self];
|
||||
|
@ -198,6 +209,9 @@ static NSString *REQUEST_ID = @"x-webobjects-request-id";
|
|||
[self _closeSocket];
|
||||
|
||||
_processingRequest = NO;
|
||||
|
||||
[self drain];
|
||||
|
||||
if (_isMultiThreadEnabled) {
|
||||
[NSThread exit];
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ static int gzHeaderSize=10;
|
|||
Z_DEFAULT_STRATEGY); /* int strategy */
|
||||
if (err!=Z_OK)
|
||||
{
|
||||
LOGError(@"deflateInit2 error: %d",err);
|
||||
// LOGError(@"deflateInit2 error: %d",err);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -111,7 +111,7 @@ static int gzHeaderSize=10;
|
|||
err = deflate(&c_stream, Z_NO_FLUSH);
|
||||
if (err!=Z_OK)
|
||||
{
|
||||
LOGError(@"deflate error: %d",err);
|
||||
//LOGError(@"deflate error: %d",err);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -142,7 +142,7 @@ static int gzHeaderSize=10;
|
|||
}
|
||||
else
|
||||
{
|
||||
LOGError(@"deflate error: %d",err);
|
||||
//LOGError(@"deflate error: %d",err);
|
||||
};
|
||||
} while (err == Z_OK);
|
||||
};
|
||||
|
@ -156,7 +156,7 @@ static int gzHeaderSize=10;
|
|||
err = deflateEnd(&c_stream);
|
||||
if (err!=Z_OK)
|
||||
{
|
||||
LOGError(@"deflateEnd error: %d",err);
|
||||
//LOGError(@"deflateEnd error: %d",err);
|
||||
}
|
||||
};
|
||||
return outData;
|
||||
|
|
|
@ -88,7 +88,6 @@
|
|||
|
||||
if (ioctl(fd, FIONREAD, (char *) &numBytes) == -1)
|
||||
{
|
||||
LOGException0(@"NSFileHandleOperationException ioctl() Err");
|
||||
[NSException raise: NSFileHandleOperationException
|
||||
format: @"ioctl() Err # %d", (int)errno];
|
||||
};
|
||||
|
|
|
@ -39,8 +39,8 @@ typedef struct _GSWHTMLConvertingStruct
|
|||
{
|
||||
unichar* normalChars;
|
||||
unichar* htmlChars;
|
||||
int* htmlCharsLen;
|
||||
int charsCount;
|
||||
NSUInteger* htmlCharsLen;
|
||||
NSUInteger charsCount;
|
||||
} GSWHTMLConvertingStruct;
|
||||
|
||||
GSWEB_EXPORT GSWHTMLConvertingStruct htmlConvertStruct;
|
||||
|
@ -93,8 +93,8 @@ GSWEB_EXPORT NSString* baseStringByConvertingFromHTML(NSString* string,
|
|||
forceArray:(BOOL)forceArray
|
||||
encoding:(NSStringEncoding) encoding;
|
||||
|
||||
-(BOOL)ismapCoordx:(int*)x
|
||||
y:(int*)y;
|
||||
-(BOOL)ismapCoordx:(NSInteger*)x
|
||||
y:(NSInteger*)y;
|
||||
-(NSString*)stringByEscapingHTMLString;
|
||||
-(NSString*)stringByEscapingHTMLAttributeValue;
|
||||
-(NSString*)stringByConvertingToHTMLEntities;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue