mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-04-23 23:48:46 +00:00
fixed many warnings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@26815 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
461254c7d3
commit
14fdcc1b2c
93 changed files with 1335 additions and 731 deletions
|
@ -1,3 +1,7 @@
|
|||
2008-08-20 David Wetzel <dave@turbocat.de>
|
||||
GSWeb.framework:
|
||||
* fixed many warnings
|
||||
|
||||
2008-07-14 David Wetzel <dave@turbocat.de>
|
||||
GSWeb.framework/GSWDirectActionRequestHandler.m:
|
||||
* set status code in generateNullResponse, reformat, remove some logs
|
||||
|
|
|
@ -36,13 +36,7 @@
|
|||
-(id)initWithName:(NSString*)name
|
||||
associations:(NSDictionary*)associations
|
||||
template:(GSWElement*)template;
|
||||
-(NSString*)elementName;
|
||||
@end
|
||||
|
||||
@interface GSWActionURL (GSWActionURLA)
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)context;
|
||||
+(BOOL)hasGSWebObjectsAssociations;
|
||||
@end
|
||||
|
||||
#endif // _GSWActionURL_h__
|
||||
|
|
|
@ -32,58 +32,83 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include "GSWPrivate.h"
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWActionURL
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithName:(NSString*)name
|
||||
associations:(NSDictionary*)associations
|
||||
template:(GSWElement*)template
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[self notImplemented:_cmd];
|
||||
LOGObjectFnStop();
|
||||
return nil;
|
||||
};
|
||||
id me = [super initWithName:name
|
||||
associations:associations
|
||||
template:template];
|
||||
|
||||
return me;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
[super dealloc];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)elementName
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[self notImplemented:_cmd];
|
||||
LOGObjectFnStop();
|
||||
return nil;
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWActionURL (GSWActionURLA)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)context
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[self notImplemented:_cmd];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
id fragment = nil;
|
||||
NSString * path = nil;
|
||||
NSString * url = nil;
|
||||
|
||||
GSWComponent * component = [context component];
|
||||
|
||||
if(_href != nil)
|
||||
{
|
||||
url = [_href valueInComponent:component];
|
||||
}
|
||||
|
||||
if(_directActionName != nil || _actionClass != nil)
|
||||
{
|
||||
[self _appendCGIActionURLToResponse:response
|
||||
inContext:context];
|
||||
} else {
|
||||
if(_action != nil || _pageName != nil)
|
||||
{
|
||||
NSString * actionURL = [context componentActionURLIsSecure:[self secureInContext:context]];
|
||||
[response appendContentString:actionURL];
|
||||
[self _appendQueryStringToResponse:response inContext: context];
|
||||
[self _appendFragmentToResponse: response inContext:context];
|
||||
} else {
|
||||
if(url != nil)
|
||||
{
|
||||
if (([url isRelativeURL]) && (![url isFragmentURL]))
|
||||
{
|
||||
path = [context _urlForResourceNamed:url inFramework:nil];
|
||||
if(path != nil)
|
||||
{
|
||||
GSWResponse_appendContentString(response,path);
|
||||
|
||||
} else {
|
||||
GSWResponse_appendContentAsciiString(response, [component baseURL]);
|
||||
GSWResponse_appendContentCharacter(response,'/');
|
||||
GSWResponse_appendContentString(response,url);
|
||||
}
|
||||
} else {
|
||||
GSWResponse_appendContentString(response,url);
|
||||
}
|
||||
[self _appendQueryStringToResponse:response inContext: context];
|
||||
[self _appendFragmentToResponse: response inContext:context];
|
||||
} else {
|
||||
if(_fragmentIdentifier != nil)
|
||||
{
|
||||
fragment = [_fragmentIdentifier valueInComponent:component];
|
||||
if (fragment != nil) {
|
||||
NSLog(@"fragment is kind of class %@", NSStringFromClass([fragment class]));
|
||||
GSWResponse_appendContentString(response,fragment);
|
||||
[self _appendQueryStringToResponse: response inContext: context requestHandlerPath:@"" htmlEscapeURL:NO];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(BOOL)hasGSWebObjectsAssociations
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
[self notImplemented:_cmd];
|
||||
LOGObjectFnStop();
|
||||
return NO;
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -58,6 +58,8 @@
|
|||
GSWAssociation * _secure;
|
||||
GSWAssociation * _actionClass;
|
||||
GSWAssociation * _directActionName;
|
||||
NSDictionary * _sessionIDQueryAssociations;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -73,7 +75,7 @@
|
|||
-(void)takeValuesFromRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)aContext;
|
||||
|
||||
-(NSString*)frameworkNameInContext:(GSWContext*)aContext;
|
||||
//-(NSString*)frameworkNameInContext:(GSWContext*)aContext;
|
||||
|
||||
|
||||
-(void)_appendCGIActionURLToResponse:(GSWResponse*)aResponse
|
||||
|
|
|
@ -34,21 +34,61 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include "GSWPrivate.h"
|
||||
|
||||
|
||||
static NSString * static_sessionIDKey = nil;
|
||||
static NSString * static_tempQueryKey = nil;
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWActiveImage
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
if (self == [GSWActiveImage class])
|
||||
{
|
||||
if (!static_sessionIDKey) {
|
||||
static_sessionIDKey = [[GSWApp sessionIdKey] retain];
|
||||
static_tempQueryKey = [[@"?" stringByAppendingString:static_sessionIDKey] retain];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithName:(NSString*)aName
|
||||
associations:(NSDictionary*)associations
|
||||
template:(GSWElement*)template
|
||||
{
|
||||
NSMutableDictionary * tempQueryAssociations = [NSMutableDictionary dictionary];
|
||||
GSWAssociation * tempAssociation = nil;
|
||||
|
||||
self = [super initWithName:@"input" associations:associations template: nil];
|
||||
if (!self) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
tempAssociation = [_associations objectForKey:static_tempQueryKey];
|
||||
if (tempAssociation != nil) {
|
||||
[tempQueryAssociations setObject:tempAssociation
|
||||
forKey:static_sessionIDKey];
|
||||
[_associations removeObjectForKey: static_tempQueryKey];
|
||||
}
|
||||
|
||||
if ([static_sessionIDKey isEqualToString:@"wosid"] == NO) {
|
||||
tempAssociation = [_associations objectForKey:@"?wosid"];
|
||||
if (tempAssociation != nil) {
|
||||
[tempQueryAssociations setObject:@"wosid"
|
||||
forKey:static_sessionIDKey];
|
||||
[_associations removeObjectForKey: @"wosid"];
|
||||
}
|
||||
}
|
||||
|
||||
if ([tempQueryAssociations count] > 0) {
|
||||
_sessionIDQueryAssociations = [tempQueryAssociations retain];
|
||||
} else {
|
||||
DESTROY(_sessionIDQueryAssociations);
|
||||
}
|
||||
|
||||
ASSIGN(_file, [_associations objectForKey: imageMapFileName__Key]);
|
||||
if (_file != nil) {
|
||||
[_associations removeObjectForKey: imageMapFileName__Key];
|
||||
|
@ -227,6 +267,7 @@ RCS_ID("$Id$")
|
|||
DESTROY(_secure);
|
||||
DESTROY(_actionClass);
|
||||
DESTROY(_directActionName);
|
||||
DESTROY(_sessionIDQueryAssociations);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
@ -463,7 +504,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
NSString * srcValue = nil;
|
||||
GSWComponent * component = GSWContext_component(context);
|
||||
GSWResourceManager * resourcemanager = [GSWApp resourceManager];
|
||||
|
||||
GSWResponse_appendTagAttributeValueEscapingHTMLAttributeValue(response, @"border", @"0", NO);
|
||||
|
||||
[self appendURLAttributesToResponse:response
|
||||
|
@ -603,22 +644,22 @@ RCS_ID("$Id$")
|
|||
-(void) _appendCGIActionURLToResponse:(GSWResponse*) response
|
||||
inContext:(GSWContext*) context
|
||||
{
|
||||
|
||||
NSDictionary* queryDictionary = nil;
|
||||
|
||||
NSString * actionStr = [self computeActionStringWithActionClassAssociation: _actionClass
|
||||
directActionNameAssociation: _directActionName
|
||||
inContext: context];
|
||||
|
||||
if (_secure != nil) {
|
||||
[context _generateCompleteURLs];
|
||||
}
|
||||
GSWResponse_appendTagAttributeValueEscapingHTMLAttributeValue(response, @"href",
|
||||
// pass this to _componentActionURL?
|
||||
// (_secure != nil && [_secure boolValueInComponent: [context component]])
|
||||
[context _componentActionURL],
|
||||
NO);
|
||||
if (_secure != nil) {
|
||||
[context _generateRelativeURLs];
|
||||
}
|
||||
|
||||
queryDictionary = [self computeQueryDictionaryWithRequestHandlerPath: actionStr
|
||||
queryDictionaryAssociation: nil
|
||||
otherQueryAssociations: _sessionIDQueryAssociations
|
||||
inContext: context];
|
||||
|
||||
GSWResponse_appendTagAttributeValueEscapingHTMLAttributeValue(response, @"href", [context _directActionURLForActionNamed:actionStr
|
||||
queryDictionary:queryDictionary
|
||||
isSecure:[self secureInContext:context]
|
||||
port:0
|
||||
escapeQueryDictionary:YES], NO);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
// deprecated since?
|
||||
-(void)runOnce;
|
||||
-(BOOL)doesBusyRunOnce;
|
||||
-(BOOL)isMultiThreadEnabled;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -55,6 +56,5 @@
|
|||
// FIXME: check if that exists:
|
||||
// -(id)workerThreadCount;
|
||||
//-(void)adaptorThreadExited:(GSWDefaultAdaptorThread*)adaptorThread;
|
||||
//-(BOOL)isMultiThreadEnabled;
|
||||
|
||||
#endif //_GSWAdaptor_h__
|
||||
|
|
|
@ -91,6 +91,12 @@ RCS_ID("$Id$")
|
|||
return -1;
|
||||
}
|
||||
|
||||
- (BOOL) isMultiThreadEnabled
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
|
|
|
@ -47,8 +47,8 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -262,13 +262,15 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(void)dealloc
|
||||
{
|
||||
[GSWAssociation removeLogHandlerClasse:[self class]];
|
||||
DESTROY(localDynCreateClassNames);
|
||||
GSWeb_DestroyGlobalAppDefaultOptions();
|
||||
[[self superclass]dealloc];
|
||||
};
|
||||
// FIXME: do we need to dealloc a CLASS??? looks strange to me -- dw
|
||||
//+(void)dealloc
|
||||
//{
|
||||
// // FIXME: do we need to dealloc a CLASS??? looks strange to me -- dw
|
||||
// [GSWAssociation removeLogHandlerClasse:[self class]];
|
||||
// DESTROY(localDynCreateClassNames);
|
||||
// GSWeb_DestroyGlobalAppDefaultOptions();
|
||||
// [[self superclass]dealloc];
|
||||
//};
|
||||
|
||||
//-----------------------------------------------------------------------------------
|
||||
//init
|
||||
|
@ -854,7 +856,6 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
{
|
||||
Class GSWAppClass = [self class];
|
||||
NSString* directConnectURL=nil;
|
||||
NSString* applicationBaseURL =[GSWAppClass applicationBaseURL];
|
||||
|
||||
directConnectURL = [NSString stringWithFormat:@"http://%@:%@%@/%@.%@/0/", [GSWAppClass host],
|
||||
[GSWAppClass port],
|
||||
|
@ -2616,7 +2617,7 @@ to another instance **/
|
|||
{
|
||||
if (errorPage)
|
||||
{
|
||||
id monitor=nil;
|
||||
// id monitor=nil;
|
||||
response=[errorPage generateResponse];
|
||||
//here ?
|
||||
// monitor=[self _remoteMonitor];
|
||||
|
@ -3927,10 +3928,19 @@ to another instance **/
|
|||
inFramework:(NSString*)aFrameworkName
|
||||
languages:(NSArray*)languages
|
||||
{
|
||||
return [[self resourceManager]pathForResourceNamed:(type ? [NSString stringWithFormat:@"%@.%@",aName,type] : aName)
|
||||
|
||||
NSString * name;
|
||||
|
||||
if (type) {
|
||||
name = [NSString stringWithFormat:@"%@.%@",aName,type];
|
||||
} else {
|
||||
name = aName;
|
||||
}
|
||||
|
||||
return [[self resourceManager]pathForResourceNamed:name
|
||||
inFramework:aFrameworkName
|
||||
languages:languages];
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//NDFN
|
||||
|
@ -4004,5 +4014,11 @@ to another instance **/
|
|||
return @"woinst";
|
||||
}
|
||||
|
||||
|
||||
// Hackers note: we will not implement WO 5's newDynamicURL. Use
|
||||
// [GSWDynamicURLString string];
|
||||
// or [GSWDynamicURLString stringWithString:url]
|
||||
// instead.
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -242,7 +242,6 @@ static Class NSStringClass = Nil;
|
|||
{
|
||||
id value = [self valueInComponent: component];
|
||||
int length = 0;
|
||||
int intVal = 0;
|
||||
NSString * tmpStr = nil;
|
||||
|
||||
if (! value) {
|
||||
|
@ -852,7 +851,7 @@ static Class NSStringClass = Nil;
|
|||
reason:[exp reason]
|
||||
userInfo:[NSDictionary
|
||||
dictionaryWithObjectsAndKeys:
|
||||
(value ? value : @"nil"),@"EOValidatedObjectUserInfoKey",
|
||||
(value ? value : (id)@"nil"),@"EOValidatedObjectUserInfoKey",
|
||||
keyPath,@"EOValidatedPropertyUserInfoKey",
|
||||
nil,nil]];
|
||||
[object validationFailedWithException:exception
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
@interface GSWBody: GSWHTMLURLValuedElement
|
||||
-(id)initWithName:(NSString*)name
|
||||
associations:(NSDictionary*)associations
|
||||
contentElements:(NSArray*)elements;
|
||||
contentElements:(NSMutableArray*)elements;
|
||||
-(void)dealloc;
|
||||
-(NSString*)valueAttributeName;
|
||||
-(NSString*)urlAttributeName;
|
||||
|
|
|
@ -39,7 +39,7 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(id)initWithName:(NSString*)name
|
||||
associations:(NSDictionary*)associations
|
||||
contentElements:(NSArray*)elements
|
||||
contentElements:(NSMutableArray*)elements
|
||||
{
|
||||
if ((self=[super initWithName:name
|
||||
associations:associations
|
||||
|
|
|
@ -126,8 +126,8 @@ static SEL valueInComponentSEL = NULL;
|
|||
[_associations removeObjectForKey: escapeHTML__Key];
|
||||
}
|
||||
|
||||
if ((_list == nil) || (_value != nil || _displayString != nil) &&
|
||||
((_item == nil) || (![_item isValueSettable])) ||
|
||||
if ((_list == nil) || ((_value != nil || _displayString != nil) &&
|
||||
(((_item == nil) || (![_item isValueSettable])))) ||
|
||||
((_selections != nil) && (![_selections isValueSettable]))) {
|
||||
|
||||
[NSException raise:NSInvalidArgumentException
|
||||
|
@ -188,7 +188,6 @@ static SEL valueInComponentSEL = NULL;
|
|||
NSArray * valueArray = nil;
|
||||
NSArray * selectionsArray = nil;
|
||||
int listCount = 0;
|
||||
id obj = nil;
|
||||
BOOL isSelected = NO;
|
||||
id compoValue = nil;
|
||||
int i = 0;
|
||||
|
@ -393,7 +392,6 @@ static SEL valueInComponentSEL = NULL;
|
|||
int count = 0;
|
||||
int i = 0;
|
||||
NSMutableArray * mutArray = nil;
|
||||
NSArray * selectionsValue = nil;
|
||||
|
||||
if (formValues != nil) {
|
||||
count = [formValues count];
|
||||
|
@ -411,7 +409,6 @@ static SEL valueInComponentSEL = NULL;
|
|||
for (i = 0; i < count; i++) {
|
||||
id s1 = (NSString*) [formValues objectAtIndex:i];
|
||||
int k = [s1 intValue];
|
||||
id obj1 = nil;
|
||||
if (listValue != nil) {
|
||||
id valueValue = [listValue objectAtIndex:k];
|
||||
[mutArray addObject:valueValue];
|
||||
|
|
|
@ -68,15 +68,17 @@
|
|||
-(void)unlock;
|
||||
-(void)lock;
|
||||
|
||||
-(void)clearCache;
|
||||
-(void)loadCache;
|
||||
// CHECKME: do we need this for WO 4.5? -- dw
|
||||
|
||||
-(id)lockedResourceNamed:(NSString*)aName
|
||||
ofType:(NSString*)aType
|
||||
withLanguages:(NSArray*)languages
|
||||
usingCache:(NSMutableDictionary*)cache
|
||||
relativePath:(NSString**)relativePath
|
||||
absolutePath:(NSString**)absolutePath;
|
||||
-(void)clearCache;
|
||||
//-(void)loadCache;
|
||||
|
||||
//-(id)lockedResourceNamed:(NSString*)aName
|
||||
// ofType:(NSString*)aType
|
||||
// withLanguages:(NSArray*)languages
|
||||
// usingCache:(NSMutableDictionary*)cache
|
||||
// relativePath:(NSString**)relativePath
|
||||
// absolutePath:(NSString**)absolutePath;
|
||||
|
||||
-(void)initializeObject:(id)anObject
|
||||
fromArchiveNamed:(NSString*)aName;
|
||||
|
@ -93,39 +95,43 @@
|
|||
|
||||
-(NSString*)lockedScriptedClassPathWithName:(NSString*)aName;
|
||||
|
||||
-(Class)compiledClassWithName:(NSString*)aName
|
||||
superclassName:(NSString*)superclassName;
|
||||
//-(Class)compiledClassWithName:(NSString*)aName
|
||||
// superclassName:(NSString*)superclassName;
|
||||
|
||||
-(GSWElement*)templateNamed:(NSString*)aName
|
||||
languages:(NSArray*)languages;
|
||||
|
||||
|
||||
-(GSWElement*)lockedTemplateNamed:(NSString*)aName
|
||||
languages:(NSArray*)languages;
|
||||
|
||||
-(NSString*)stringForKey:(NSString*)key_
|
||||
inTableNamed:(NSString*)aName
|
||||
withDefaultValue:(NSString*)defaultValue
|
||||
languages:(NSArray*)languages;
|
||||
|
||||
//-(NSString*)stringForKey:(NSString*)key_
|
||||
// inTableNamed:(NSString*)aName
|
||||
// withDefaultValue:(NSString*)defaultValue
|
||||
// languages:(NSArray*)languages;
|
||||
//
|
||||
|
||||
//NDFN
|
||||
-(NSDictionary*)stringsTableNamed:(NSString*)aName
|
||||
withLanguages:(NSArray*)languages;
|
||||
|
||||
//NDFN
|
||||
-(NSArray*)stringsTableArrayNamed:(NSString*)aName
|
||||
withLanguages:(NSArray*)languages;
|
||||
//-(NSArray*)stringsTableArrayNamed:(NSString*)aName
|
||||
// withLanguages:(NSArray*)languages;
|
||||
|
||||
-(NSString*)urlForResourceNamed:(NSString*)aName
|
||||
ofType:(NSString*)aType
|
||||
languages:(NSArray*)languages
|
||||
request:(GSWRequest*)aRequest;
|
||||
//-(NSString*)urlForResourceNamed:(NSString*)aName
|
||||
// ofType:(NSString*)aType
|
||||
// languages:(NSArray*)languages
|
||||
// request:(GSWRequest*)aRequest;
|
||||
//
|
||||
|
||||
-(NSString*)pathForResourceNamed:(NSString*)aName
|
||||
ofType:(NSString*)aType
|
||||
languages:(NSArray*)languages;
|
||||
|
||||
-(NSStringEncoding)encodingForResourcesNamed:(NSString*)aName;
|
||||
|
||||
-(NSStringEncoding)encodingForResourcesNamed:(NSString*)aName;
|
||||
-(GSWTemplateParserType)templateParserTypeForResourcesNamed:(NSString*)aName;//NDFN
|
||||
|
||||
-(NSDictionary*)archiveNamed:(NSString*)aName;
|
||||
|
@ -134,8 +140,8 @@
|
|||
-(NSDictionary*)lockedArchiveNamed:(NSString*)aName;
|
||||
-(NSDictionary*)lockedApiNamed:(NSString*)aName;//NDFN
|
||||
|
||||
-(id)scriptedClassNameFromClassName:(NSString*)aName;
|
||||
-(id)scriptPathNameFromScriptedClassName:(NSString*)aName;
|
||||
//-(id)scriptedClassNameFromClassName:(NSString*)aName;
|
||||
//-(id)scriptPathNameFromScriptedClassName:(NSString*)aName;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -218,10 +218,6 @@ objectForReference:(NSString*)keyPath
|
|||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWBundle (GSWBundleCache)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)clearCache
|
||||
|
@ -253,10 +249,6 @@ objectForReference:(NSString*)keyPath
|
|||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWBundle (GSWBundleA)
|
||||
|
||||
// returned relativePath won't have "/" prefix
|
||||
|
||||
|
@ -327,19 +319,23 @@ objectForReference:(NSString*)keyPath
|
|||
};
|
||||
};
|
||||
|
||||
if (aRelativePath)
|
||||
*aRelativePath=(([relativePath length]>0) ? relativePath : nil);
|
||||
if (anAbsolutePath)
|
||||
*anAbsolutePath=(([absolutePath length]>0) ? absolutePath : nil);
|
||||
|
||||
LOGObjectFnStop();
|
||||
if (aRelativePath) {
|
||||
if ([relativePath length]>0) {
|
||||
*aRelativePath = relativePath;
|
||||
} else {
|
||||
*aRelativePath = nil;
|
||||
}
|
||||
}
|
||||
if (anAbsolutePath) {
|
||||
if ([absolutePath length]>0) {
|
||||
*anAbsolutePath = absolutePath;
|
||||
} else {
|
||||
*anAbsolutePath = nil;
|
||||
}
|
||||
}
|
||||
|
||||
return resource;
|
||||
};
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWBundle (GSWResourceManagement)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)initializeObject:(id)anObject
|
||||
|
@ -908,15 +904,12 @@ objectForReference:(NSString*)keyPath
|
|||
{
|
||||
NSString* absolutePath=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"aName=%@",aName);
|
||||
NSDebugMLLog(@"bundles",@"aType=%@",aType);
|
||||
NSDebugMLLog(@"bundles",@"someLanguages=%@",someLanguages);
|
||||
[self lock];
|
||||
NS_DURING
|
||||
{
|
||||
NSString* path=nil;
|
||||
NSString* relativePath=nil;
|
||||
LOGObjectFnStart();
|
||||
|
||||
path=[self lockedResourceNamed:aName
|
||||
ofType:aType
|
||||
withLanguages:someLanguages
|
||||
|
@ -942,7 +935,7 @@ objectForReference:(NSString*)keyPath
|
|||
};
|
||||
NS_ENDHANDLER;
|
||||
[self unlock];
|
||||
LOGObjectFnStop();
|
||||
|
||||
return absolutePath;
|
||||
};
|
||||
|
||||
|
@ -1179,10 +1172,6 @@ objectForReference:(NSString*)keyPath
|
|||
return api;
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWBundle (GSWBundleC)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)scriptedClassNameFromClassName:(NSString*)aName
|
||||
|
|
|
@ -87,7 +87,7 @@ static Class standardClass = Nil;
|
|||
|
||||
if (((_checked == nil) && (_value == nil)) ||
|
||||
(((_checked != nil) && (_value != nil)) || ((_checked != nil) && (! [_checked isValueSettable])) ||
|
||||
((_value != nil) && (_selection != nil)) && (![_selection isValueSettable]))) {
|
||||
(((_value != nil) && (_selection != nil)) && (![_selection isValueSettable])))) {
|
||||
[NSException raise:NSInvalidArgumentException
|
||||
format:@"%s: Bad attribute list.",
|
||||
__PRETTY_FUNCTION__];
|
||||
|
|
|
@ -139,8 +139,8 @@ static Class standardClass = Nil;
|
|||
}
|
||||
|
||||
|
||||
if ((_list == nil) || (_value != nil || _displayString != nil) && ((_item == nil) || (![_item isValueSettable])) ||
|
||||
(_selections != nil) && (![_selections isValueSettable])) {
|
||||
if ((_list == nil) || ((_value != nil || _displayString != nil) && ((_item == nil) || (![_item isValueSettable]))) ||
|
||||
((_selections != nil) && (![_selections isValueSettable]))) {
|
||||
|
||||
[NSException raise:NSInvalidArgumentException
|
||||
format:@"%s: 'list' must be present. 'item' must not be a constant if 'displayString' or 'value' is present. 'selection' must not be a constant if present.",
|
||||
|
@ -292,13 +292,21 @@ static Class standardClass = Nil;
|
|||
}
|
||||
|
||||
for (j = 0; j < count; j++) {
|
||||
NSString * prefixStr = _prefix == nil ? nil : NSStringWithObject([_prefix valueInComponent:component]);
|
||||
NSString * suffixStr = _suffix == nil ? nil : NSStringWithObject([_suffix valueInComponent:component]);
|
||||
NSString * prefixStr = nil;
|
||||
NSString * suffixStr = nil;
|
||||
NSString * dispStr = nil;
|
||||
id obj2 = nil;
|
||||
id displayValue = nil;
|
||||
id valueValue = nil;
|
||||
|
||||
if ((_prefix != nil)) {
|
||||
prefixStr = NSStringWithObject([_prefix valueInComponent:component]);
|
||||
}
|
||||
|
||||
if ((_suffix != nil)) {
|
||||
suffixStr = NSStringWithObject([_suffix valueInComponent:component]);
|
||||
}
|
||||
|
||||
if (_index != nil) {
|
||||
[_index setValue:GSWIntToNSString(j)
|
||||
inComponent:component];
|
||||
|
|
|
@ -34,6 +34,14 @@
|
|||
#ifndef _GSWComponent_h__
|
||||
#define _GSWComponent_h__
|
||||
|
||||
#include "GSWElement.h"
|
||||
|
||||
@class GSWSession;
|
||||
@class GSWComponentDefinition;
|
||||
@class GSWAssociation;
|
||||
@class GSWDynamicElement;
|
||||
|
||||
#include "GSWResponse.h"
|
||||
|
||||
@interface GSWComponent : GSWElement <NSCopying>
|
||||
{
|
||||
|
@ -88,8 +96,12 @@
|
|||
associations:(NSMutableDictionary *) assocdict
|
||||
template:(GSWElement*) template;
|
||||
|
||||
-(void) pushValuesToParent;
|
||||
|
||||
-(void)synchronizeComponentToParent;
|
||||
-(void)synchronizeParentToComponent;
|
||||
-(void) pullValuesFromParent;
|
||||
|
||||
-(GSWElement*)_childTemplate;
|
||||
-(GSWElement*) template;
|
||||
-(GSWComponentDefinition*)_componentDefinition;
|
||||
|
@ -169,7 +181,7 @@ Call this method before using a component which was cached in a variable.
|
|||
// PRIVATE
|
||||
-(void)_awakeInContext:(GSWContext*)aContext;
|
||||
|
||||
-(id)performParentAction:(NSString*)attribute;
|
||||
- (id<GSWActionResults>)performParentAction:(NSString *)attribute;
|
||||
-(GSWComponent*)parent;
|
||||
-(GSWComponent*)topParent;//NDFN
|
||||
-(NSArray*)parents;//NDFN
|
||||
|
@ -182,9 +194,10 @@ Call this method before using a component which was cached in a variable.
|
|||
-(NSArray*)languages;//NDFN
|
||||
-(GSWApplication*)application;
|
||||
|
||||
-(void)validationFailedWithException:(NSException*)exception
|
||||
value:(id)_value
|
||||
keyPath:(id)_keyPath;
|
||||
-(void) validationFailedWithException:(NSException *)exception
|
||||
value:(id)value
|
||||
keyPath:(NSString *)keyPath;
|
||||
|
||||
-(void)_debugWithString:(NSString*)string;
|
||||
-(void)debugWithFormat:(NSString*)format,...;
|
||||
-(void)logString:(NSString*)aString;
|
||||
|
@ -196,13 +209,13 @@ Call this method before using a component which was cached in a variable.
|
|||
-(NSString*)_uniqueID;
|
||||
|
||||
-(GSWResponse*)_generateResponseInContext:(GSWContext*)aContext;
|
||||
-(id)validateValue:(id*)valuePtr
|
||||
forKey:(id)key;
|
||||
-(NSException*)validateValue:(id*)valuePtr
|
||||
forKey:(NSString*)key;
|
||||
|
||||
//+(id)validateValue:(id*)valuePtr
|
||||
// forKey:(id)key;
|
||||
|
||||
-(NSString*)stringForKey:(id)key
|
||||
-(NSString*)stringForKey:(NSString*)key
|
||||
inTableNamed:(NSString*)aName
|
||||
withDefaultValue:(NSString*)defaultValue;
|
||||
//NDFN
|
||||
|
|
|
@ -1330,7 +1330,7 @@ Call this method before using a component which was cached in a variable.
|
|||
//OK
|
||||
GSWSession* session=nil;
|
||||
GSWRequest* request=nil;
|
||||
NSString* httpVersion=nil;
|
||||
NSString* httpVersion=@"HTTP/1.0";
|
||||
GSWElement* pageElement=nil;
|
||||
BOOL pageChanged=NO;
|
||||
|
||||
|
@ -1339,10 +1339,13 @@ Call this method before using a component which was cached in a variable.
|
|||
{
|
||||
request=[aContext request];
|
||||
GSWContext_deleteAllElementIDComponents(aContext);
|
||||
httpVersion=(request ? [request httpVersion] : @"HTTP/1.0");
|
||||
[response setHTTPVersion:httpVersion];
|
||||
if (request)
|
||||
|
||||
if (request != nil) {
|
||||
httpVersion = [request httpVersion];
|
||||
[response setAcceptedEncodings:[request browserAcceptedEncodings]];
|
||||
}
|
||||
|
||||
[response setHTTPVersion:httpVersion];
|
||||
[response setHeader:@"text/html"
|
||||
forKey:@"content-type"];
|
||||
[aContext _setResponse:response];
|
||||
|
@ -1361,10 +1364,12 @@ Call this method before using a component which was cached in a variable.
|
|||
inContext:aContext];
|
||||
|
||||
session=[aContext _session];
|
||||
|
||||
if (session) {
|
||||
[session appendCookieToResponse:response];
|
||||
[session _saveCurrentPage];
|
||||
};
|
||||
}
|
||||
|
||||
[aContext _incrementContextID];
|
||||
GSWContext_deleteAllElementIDComponents(aContext);
|
||||
[aContext _setPageChanged:YES];
|
||||
|
@ -1469,12 +1474,19 @@ Call this method before using a component which was cached in a variable.
|
|||
{
|
||||
//TODO
|
||||
NSString* url=nil;
|
||||
|
||||
url=[GSWApp urlForResourceNamed:(type ? [NSString stringWithFormat:@"%@.%@",aName,type] : aName)
|
||||
inFramework:[self frameworkName]
|
||||
languages:[self languages]
|
||||
request:nil];//TODO
|
||||
|
||||
NSString* name;
|
||||
|
||||
if ((type != nil)) {
|
||||
name = [NSString stringWithFormat:@"%@.%@",aName,type];
|
||||
} else {
|
||||
name = aName;
|
||||
}
|
||||
|
||||
url=[GSWApp urlForResourceNamed:name
|
||||
inFramework:[self frameworkName]
|
||||
languages:[self languages]
|
||||
request:nil];//TODO
|
||||
|
||||
return url;
|
||||
};
|
||||
|
||||
|
@ -1560,10 +1572,19 @@ Call this method before using a component which was cached in a variable.
|
|||
ofType:(NSString*)extension
|
||||
inFramework:(NSString*)aFrameworkName;
|
||||
{
|
||||
return [GSWApp urlForResourceNamed:(extension ? [NSString stringWithFormat:@"%@.%@",aName,extension] : aName)
|
||||
inFramework:aFrameworkName
|
||||
languages:[self languages]
|
||||
request:nil];//TODO
|
||||
|
||||
NSString * name;
|
||||
|
||||
if ((extension != nil)) {
|
||||
name = [NSString stringWithFormat:@"%@.%@",aName,extension];
|
||||
} else {
|
||||
name = aName;
|
||||
}
|
||||
|
||||
return [GSWApp urlForResourceNamed:name
|
||||
inFramework:aFrameworkName
|
||||
languages:[self languages]
|
||||
request:nil];//TODO
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
@ -32,6 +32,12 @@
|
|||
#ifndef _GSWComponentDefinition_h__
|
||||
#define _GSWComponentDefinition_h__
|
||||
|
||||
@class GSWElement;
|
||||
@class GSWBundle;
|
||||
@class GSWComponent;
|
||||
@class GSWContext;
|
||||
@class GSWComponentReference;
|
||||
|
||||
//====================================================================
|
||||
@interface GSWComponentDefinition : NSObject <NSCoding,NSCopying>
|
||||
{
|
||||
|
@ -52,7 +58,7 @@
|
|||
NSDictionary * _archive;
|
||||
NSStringEncoding _encoding;
|
||||
BOOL _isStateless;
|
||||
GSWDeployedBundle * _bundle;
|
||||
GSWBundle * _bundle;
|
||||
GSWComponent * _sharedInstance;
|
||||
NSMutableArray * _instancePool;
|
||||
BOOL _lockInstancePool;
|
||||
|
@ -96,7 +102,9 @@
|
|||
template:(GSWElement*)template;
|
||||
|
||||
-(NSDictionary*)componentAPI;
|
||||
|
||||
|
||||
//+ (id) copyWithZone: (NSZone*)z;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
static NSLock * ComponentConstructorLock;
|
||||
static NSLock * TemplateLock;
|
||||
static GSWContext * TheTemporaryContext;
|
||||
static BOOL _IsEventLoggingEnabled; // needed?
|
||||
|
||||
@implementation GSWComponentDefinition
|
||||
|
||||
|
@ -58,7 +57,7 @@ static BOOL _IsEventLoggingEnabled; // needed?
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
#warning CHECKME: missing Languages?
|
||||
// CHECKME: missing Languages?
|
||||
// we my have a different name and class?
|
||||
// aName StartPage
|
||||
// aPath /Users/dave/projects/new/PBXBilling/trunk/PBX.gswa/Resources/StartPage.wo
|
||||
|
@ -281,7 +280,7 @@ static BOOL _IsEventLoggingEnabled; // needed?
|
|||
{
|
||||
//OK
|
||||
[_bundle clearCache];
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWElement*)templateWithName:(NSString*)aName
|
||||
|
@ -310,7 +309,7 @@ static BOOL _IsEventLoggingEnabled; // needed?
|
|||
};
|
||||
|
||||
|
||||
#warning CHECKME
|
||||
// CHECKME
|
||||
|
||||
-(GSWComponent*) _componentInstanceInContext:(GSWContext*) aContext
|
||||
{
|
||||
|
@ -611,4 +610,23 @@ static BOOL _IsEventLoggingEnabled; // needed?
|
|||
return _template;
|
||||
}
|
||||
|
||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
NSLog(@"%s is not imlemented", __PRETTY_FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||
{
|
||||
NSLog(@"%s is not imlemented", __PRETTY_FUNCTION__);
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id) copyWithZone: (NSZone*)z
|
||||
{
|
||||
|
||||
NSLog(@"%s is not imlemented", __PRETTY_FUNCTION__);
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include "GSWPrivate.h"
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWComponentReference
|
||||
|
@ -170,8 +171,8 @@ RCS_ID("$Id$")
|
|||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
GSWElement* element=nil;
|
||||
GSWComponent* component=nil;
|
||||
GSWComponent* componentPrev=nil;
|
||||
// GSWComponent* component=nil;
|
||||
// GSWComponent* componentPrev=nil;
|
||||
|
||||
[self _pushComponentInContext:aContext];
|
||||
element = [GSWContext_component(aContext) invokeActionForRequest: request
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
|
||||
-(GSWResponse*)handleRequest:(GSWRequest*)aRequest;
|
||||
|
||||
+(id)handler;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
@ -189,7 +189,8 @@ GSWResponse * _dispatchWithPreparedPage(GSWComponent * aPage, GSWSession * aSess
|
|||
[aContext _setPageElement:aResultComponent];
|
||||
}
|
||||
} else {
|
||||
GSWResponse * theResponse = [anActionResults generateResponse];
|
||||
// CHECKME: extend the GSWElement protocol? -- dw
|
||||
GSWResponse * theResponse = [(GSWComponent*)anActionResults generateResponse];
|
||||
return theResponse;
|
||||
}
|
||||
}
|
||||
|
@ -414,10 +415,11 @@ GSWResponse * _dispatchWithPreparedApplication(GSWApplication *app, GSWContext *
|
|||
}
|
||||
|
||||
// do we need this? -- dw
|
||||
// used in GSWApplication _componentRequestHandler
|
||||
+(id)handler
|
||||
{
|
||||
return [[GSWComponentRequestHandler new] autorelease];
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
@ -30,9 +30,15 @@
|
|||
// $Id$
|
||||
|
||||
#ifndef _GSWContext_h__
|
||||
#define _GSWContext_h__
|
||||
#define _GSWContext_h__
|
||||
|
||||
@class GSWContext;
|
||||
#include "GSWElementID.h"
|
||||
|
||||
@class GSWElementID;
|
||||
@class GSWSession;
|
||||
@class GSWRequest;
|
||||
@class GSWResponse;
|
||||
@class GSWDynamicURLString;
|
||||
|
||||
typedef struct _GSWContextIMPs
|
||||
{
|
||||
|
@ -85,6 +91,8 @@ GSWEB_EXPORT BOOL GSWContext_isSenderIDSearchOver(GSWContext* aContext);
|
|||
GSWComponent* _currentComponent;
|
||||
GSWDynamicURLString* _url;
|
||||
NSMutableArray* _awakePageComponents;
|
||||
int _secureMode;
|
||||
|
||||
int _urlApplicationNumber;
|
||||
int _isClientComponentRequest;
|
||||
BOOL _distributionEnabled;
|
||||
|
@ -347,9 +355,15 @@ If none, try request languages
|
|||
-(void)_setUserInfo:(NSMutableDictionary*)userInfo;
|
||||
|
||||
// context can add key/values in query dictionary
|
||||
-(NSDictionary*)computeQueryDictionary:(NSDictionary*)queryDictionary;
|
||||
//-(NSDictionary*)computeQueryDictionary:(NSDictionary*)queryDictionary;
|
||||
-(NSDictionary*)computePathQueryDictionary:(NSDictionary*)queryDictionary;
|
||||
|
||||
// computeQueryDictionary
|
||||
-(NSDictionary*) computeQueryDictionaryWithPath:(NSString*) aRequestHandlerPath
|
||||
queryDictionary:(NSDictionary*) queryDictionary
|
||||
otherQueryDictionary:(NSDictionary*) otherQueryDictionary;
|
||||
|
||||
|
||||
-(void)deleteAllElementIDComponents;
|
||||
-(void)deleteLastElementIDComponent;
|
||||
-(void)incrementLastElementIDComponent;
|
||||
|
@ -372,6 +386,10 @@ If none, try request languages
|
|||
|
||||
-(BOOL)isValidate;
|
||||
-(void)setValidate:(BOOL)isValidate;
|
||||
|
||||
-(BOOL)secureMode;
|
||||
-(void)setSecureMode:(BOOL) value;
|
||||
|
||||
@end
|
||||
|
||||
#endif //_GSWContext_h__
|
||||
|
|
|
@ -201,6 +201,26 @@ GSWEB_EXPORT BOOL GSWContext_isSenderIDSearchOver(GSWContext* aContext)
|
|||
return NO;
|
||||
}
|
||||
|
||||
@implementation NSMutableDictionary (GSWContextAdditions)
|
||||
|
||||
// sessionIDInQueryDictionary
|
||||
- (id) sessionID
|
||||
{
|
||||
id value = nil;
|
||||
|
||||
value = [self objectForKey:[GSWApp sessionIdKey]];
|
||||
if (!value) {
|
||||
value = [self objectForKey:@"wosid"];
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface NSMutableDictionary (GSWContextAdditions)
|
||||
- (id) sessionID;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWContext
|
||||
|
||||
|
@ -281,6 +301,7 @@ GSWEB_EXPORT BOOL GSWContext_isSenderIDSearchOver(GSWContext* aContext)
|
|||
_componentName = nil;
|
||||
_formSubmitted = NO;
|
||||
_inForm = NO;
|
||||
_secureMode = -2;
|
||||
|
||||
DESTROY(_resourceManager);
|
||||
_resourceManager = RETAIN([GSWApp resourceManager]);
|
||||
|
@ -413,6 +434,14 @@ GSWEB_EXPORT BOOL GSWContext_isSenderIDSearchOver(GSWContext* aContext)
|
|||
return desc;
|
||||
};
|
||||
|
||||
- (BOOL) _sessionIDInURL
|
||||
{
|
||||
GSWRequest * aReq = [self request];
|
||||
|
||||
return ((aReq != nil) && ([aReq stringFormValueForKey:[GSWApp sessionIdKey]] != nil));
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)_isRefusingThisRequest
|
||||
{
|
||||
|
@ -431,14 +460,14 @@ GSWEB_EXPORT BOOL GSWContext_isSenderIDSearchOver(GSWContext* aContext)
|
|||
-(void)setInForm:(BOOL)flag
|
||||
{
|
||||
_inForm=flag;
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// wo4
|
||||
-(BOOL)isInForm
|
||||
{
|
||||
return _inForm;
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)setInEnabledForm:(BOOL)flag
|
||||
|
@ -450,10 +479,14 @@ GSWEB_EXPORT BOOL GSWContext_isSenderIDSearchOver(GSWContext* aContext)
|
|||
-(BOOL)isInEnabledForm
|
||||
{
|
||||
return _isInEnabledForm;
|
||||
};
|
||||
}
|
||||
|
||||
- (GSWDynamicURLString*) _url
|
||||
{
|
||||
if(_url == nil) {
|
||||
_url = [GSWDynamicURLString new];
|
||||
}
|
||||
|
||||
return _url;
|
||||
}
|
||||
|
||||
|
@ -1420,7 +1453,6 @@ GSWEB_EXPORT BOOL GSWContext_isSenderIDSearchOver(GSWContext* aContext)
|
|||
|
||||
-(GSWDynamicURLString*) _componentActionURL
|
||||
{
|
||||
id obj = nil;
|
||||
GSWSession * session = [self session];
|
||||
NSString * s = [self contextID];
|
||||
NSString * s1 = [self elementID];
|
||||
|
@ -1461,6 +1493,48 @@ GSWEB_EXPORT BOOL GSWContext_isSenderIDSearchOver(GSWContext* aContext)
|
|||
|
||||
}
|
||||
|
||||
|
||||
// new
|
||||
//_directActionURL in wo 5
|
||||
|
||||
-(GSWDynamicURLString*) _directActionURLForActionNamed:(NSString*) anActionName
|
||||
queryDictionary:(NSDictionary*)queryDictionary
|
||||
isSecure:(BOOL)isSecure
|
||||
port:(int)port
|
||||
escapeQueryDictionary:(BOOL)escapeQueryDict
|
||||
{
|
||||
GSWDynamicURLString * url = nil;
|
||||
NSString * aQueryString = nil;
|
||||
|
||||
BOOL forceLoadBalancing;
|
||||
NSString *savedApplicationNumber;
|
||||
BOOL isInDevelopment = ((_request) && ([_request applicationNumber] < -1));
|
||||
|
||||
forceLoadBalancing = ((_session == nil) && ((_requestSessionID == nil)) && (!isInDevelopment));
|
||||
savedApplicationNumber = [[self _url] applicationNumber];
|
||||
|
||||
if (forceLoadBalancing) {
|
||||
[_url setApplicationNumber:@"-1"];
|
||||
}
|
||||
|
||||
if ((queryDictionary != nil) && ([queryDictionary count] > 0)) {
|
||||
aQueryString = [queryDictionary encodeAsCGIFormValuesEscpaeAmpersand:escapeQueryDict];
|
||||
}
|
||||
|
||||
url = [self _urlWithRequestHandlerKey:[[GSWApp class] directActionRequestHandlerKey]
|
||||
requestHandlerPath:anActionName
|
||||
queryString:aQueryString
|
||||
isSecure:isSecure
|
||||
port:port];
|
||||
|
||||
if(forceLoadBalancing) {
|
||||
[_url setApplicationNumber:savedApplicationNumber];
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
/** Returns array of languages
|
||||
First try session languages, if none, try self language
|
||||
|
@ -1741,13 +1815,121 @@ If none, try request languages
|
|||
ASSIGN(_userInfo,userInfo);
|
||||
};
|
||||
|
||||
|
||||
-(void) _stripSessionIDFromURL
|
||||
{
|
||||
NSString * handlerPath = [[self _url] requestHandlerPath];
|
||||
if ((!handlerPath) || ([handlerPath isEqual:@""])) {
|
||||
return;
|
||||
}
|
||||
|
||||
NSRange range;
|
||||
unsigned handlerPathlength;
|
||||
|
||||
range = [handlerPath rangeOfString:[GSWApp sessionIdKey]];
|
||||
|
||||
if (range.location > 0) {
|
||||
NSRange endRange;
|
||||
NSRange totalRange;
|
||||
|
||||
handlerPathlength = [handlerPath length];
|
||||
|
||||
totalRange = NSMakeRange(range.location, handlerPathlength-range.location);
|
||||
|
||||
endRange = [handlerPath rangeOfString:@"&"
|
||||
options:0
|
||||
range:totalRange];
|
||||
|
||||
if(endRange.location == NSNotFound) {
|
||||
[[self _url] setRequestHandlerPath: [handlerPath substringWithRange:NSMakeRange(0, range.location)]];
|
||||
} else {
|
||||
[[self _url] setRequestHandlerPath:[[handlerPath substringWithRange:NSMakeRange(0, range.location)]
|
||||
stringByAppendingString:[handlerPath substringWithRange:NSMakeRange(range.location + 1, handlerPathlength)]]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// context can add key/values in query dictionary
|
||||
-(NSDictionary*)computeQueryDictionary:(NSDictionary*)queryDictionary
|
||||
//-(NSDictionary*)computeQueryDictionary:(NSDictionary*)queryDictionary
|
||||
//{
|
||||
// //Do nothing
|
||||
// return queryDictionary;
|
||||
//};
|
||||
|
||||
// computeQueryDictionary
|
||||
-(NSDictionary*) computeQueryDictionaryWithPath:(NSString*) aRequestHandlerPath
|
||||
queryDictionary:(NSDictionary*) queryDictionary
|
||||
otherQueryDictionary:(NSDictionary*) otherQueryDictionary
|
||||
{
|
||||
//Do nothing
|
||||
return queryDictionary;
|
||||
};
|
||||
NSMutableDictionary * newQueryDictionary;
|
||||
NSString * sessionId = nil;
|
||||
GSWSession * sess = nil;
|
||||
if (queryDictionary != nil) {
|
||||
newQueryDictionary = [[queryDictionary mutableCopy] autorelease];
|
||||
} else {
|
||||
newQueryDictionary = [NSMutableDictionary dictionary];
|
||||
}
|
||||
|
||||
if ([self hasSession]) {
|
||||
sess = [self session];
|
||||
if ((![sess isTerminating]) && [sess storesIDsInURLs]) {
|
||||
sessionId = [sess sessionID];
|
||||
}
|
||||
} else {
|
||||
if ([self _sessionIDInURL]) {
|
||||
sessionId = _requestSessionID;
|
||||
}
|
||||
}
|
||||
|
||||
// CHECKME: can [newQueryDictionary sessionID] be a NO/FALSE value?
|
||||
if ((sessionId != nil) && ([newQueryDictionary sessionID] == nil)) {
|
||||
[newQueryDictionary setObject:sessionId
|
||||
forKey:[GSWApp sessionIdKey]];
|
||||
} else {
|
||||
if ([newQueryDictionary count] > 0) {
|
||||
[newQueryDictionary removeObjectForKey:[GSWApp sessionIdKey]];
|
||||
[newQueryDictionary removeObjectForKey:@"wosid"];
|
||||
}
|
||||
}
|
||||
if (otherQueryDictionary != nil) {
|
||||
NSEnumerator * keyEnumerator = [otherQueryDictionary keyEnumerator];
|
||||
NSString * aKey = nil;
|
||||
|
||||
while ((aKey = [keyEnumerator nextObject])) {
|
||||
id aValue = [otherQueryDictionary objectForKey:aKey];
|
||||
|
||||
if (([aKey isEqual:[GSWApp sessionIdKey]]) || ([aKey isEqual:@"wosid"])) {
|
||||
// CHECKME!
|
||||
if ([aValue boolValue] == NO) {
|
||||
[newQueryDictionary removeObjectForKey:aKey];
|
||||
}
|
||||
} else {
|
||||
[newQueryDictionary setObject:aValue forKey:aKey];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
sessionId = [newQueryDictionary objectForKey:[GSWApp sessionIdKey]];
|
||||
|
||||
if (sessionId) {
|
||||
NSRange range;
|
||||
NSRange range2;
|
||||
|
||||
range = [aRequestHandlerPath rangeOfString:sessionId];
|
||||
range2 = [aRequestHandlerPath rangeOfString:[GSWApp sessionIdKey]];
|
||||
|
||||
if ((range.location != NSNotFound) || (range.location != NSNotFound))
|
||||
{
|
||||
[newQueryDictionary removeObjectForKey:[GSWApp sessionIdKey]];
|
||||
[newQueryDictionary removeObjectForKey:@"wosid"];
|
||||
}
|
||||
} else {
|
||||
[self _stripSessionIDFromURL];
|
||||
}
|
||||
return newQueryDictionary;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// context can add key/values in query dictionary
|
||||
|
@ -1931,7 +2113,83 @@ If none, try request languages
|
|||
-(void)setValidate:(BOOL)isValidate
|
||||
{
|
||||
_isValidate = isValidate;
|
||||
};
|
||||
}
|
||||
|
||||
- (BOOL) secureRequest
|
||||
{
|
||||
BOOL isSecure = NO;
|
||||
|
||||
if (_request != nil) {
|
||||
isSecure = [_request isSecure];
|
||||
}
|
||||
|
||||
return isSecure;
|
||||
}
|
||||
|
||||
- (BOOL) secureMode
|
||||
{
|
||||
if ((_secureMode == -2)) {
|
||||
return [self secureRequest];
|
||||
}
|
||||
return ((_secureMode == YES));
|
||||
}
|
||||
|
||||
- (void) setSecureMode:(BOOL) value
|
||||
{
|
||||
_secureMode = (int) value;
|
||||
}
|
||||
|
||||
|
||||
- (GSWDynamicURLString*) relativeURLWithRequestHandlerKey:(NSString*) requestHandlerKey
|
||||
path:(NSString*) requestHandlerPath
|
||||
queryString:(NSString*) queryString
|
||||
{
|
||||
GSWDynamicURLString * url = [self _url];
|
||||
|
||||
// CHECKME: rename to setRequestHandlerKey: ?? -- dw
|
||||
[url setURLRequestHandlerKey:requestHandlerKey];
|
||||
[url setRequestHandlerPath:requestHandlerPath];
|
||||
[url setQueryString:queryString];
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
- (GSWDynamicURLString*) _urlWithRequestHandlerKey:(NSString*) requestHandlerKey
|
||||
requestHandlerPath:(NSString*) aRequestHandlerPath
|
||||
queryString:(NSString*) aQueryString
|
||||
isSecure:(BOOL) isSecure
|
||||
port:(int) somePort
|
||||
{
|
||||
GSWDynamicURLString * url = nil;
|
||||
|
||||
if (_generateCompleteURLs || ((_request != nil) && (isSecure != [_request isSecure]))) {
|
||||
url = [self completeURLWithRequestHandlerKey:requestHandlerKey
|
||||
path:aRequestHandlerPath
|
||||
queryString:aQueryString
|
||||
isSecure:isSecure
|
||||
port:somePort];
|
||||
} else {
|
||||
url = [self relativeURLWithRequestHandlerKey:requestHandlerKey
|
||||
path:aRequestHandlerPath
|
||||
queryString:aQueryString];
|
||||
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
- (GSWDynamicURLString*) _urlWithRequestHandlerKey:(NSString*) requestHandlerKey
|
||||
requestHandlerPath:(NSString*) requestHandlerPath
|
||||
queryString:(NSString*) queryString
|
||||
isSecure:(BOOL) isSecure
|
||||
{
|
||||
return [self _urlWithRequestHandlerKey:requestHandlerKey
|
||||
requestHandlerPath:requestHandlerPath
|
||||
queryString:queryString
|
||||
isSecure:isSecure
|
||||
port:0];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
@ -160,17 +160,12 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(NSString*)headerValue
|
||||
{
|
||||
NSString* header=nil;
|
||||
NSString* domainString=nil;
|
||||
NSString* pathString=nil;
|
||||
NSDate* expires=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"low",@"name:%@",_name);
|
||||
NSDebugMLLog(@"low",@"value:%@",_value);
|
||||
NSDebugMLLog(@"low",@"path:%@",_path);
|
||||
NSDebugMLLog(@"low",@"domain:%@",_domain);
|
||||
NSDebugMLLog(@"low",@"expires:%@",_expires);
|
||||
NSDebugMLLog(@"low",@"isSecure:%d",_isSecure);
|
||||
NSString* header = nil;
|
||||
NSString* domainString = nil;
|
||||
NSString* pathString = nil;
|
||||
NSString* valueStr;
|
||||
NSDate* expires = nil;
|
||||
|
||||
if (_domain)
|
||||
domainString=[NSString stringWithFormat:@" domain=%@;",_domain];
|
||||
else
|
||||
|
@ -183,12 +178,16 @@ RCS_ID("$Id$")
|
|||
expires=_expires;
|
||||
else
|
||||
expires=[NSDate dateWithTimeIntervalSinceNow:24L*60L*60L*365L];//1 Year
|
||||
NSDebugMLLog(@"low",@"pathString:%@",pathString);
|
||||
NSDebugMLLog(@"low",@"domainString:%@",domainString);
|
||||
NSDebugMLLog(@"low",@"expires:%@",expires);
|
||||
|
||||
if ((_value != nil)) {
|
||||
valueStr = _value;
|
||||
} else {
|
||||
valueStr = @"";
|
||||
}
|
||||
|
||||
header=[NSString stringWithFormat:@"%@=%@; expires=%@;%@%@%@",
|
||||
_name,
|
||||
(_value ? _value : @""),
|
||||
valueStr,
|
||||
[expires htmlDescription],
|
||||
pathString,
|
||||
domainString,
|
||||
|
|
|
@ -320,39 +320,46 @@ void DumpIVar(id object,struct objc_ivar* ivar,int deep)
|
|||
//Dump object
|
||||
void GSWLogDumpObjectFn(CONST char* file,int line,id object,int deep)
|
||||
{
|
||||
USTART
|
||||
if (object && deep>0)
|
||||
{
|
||||
struct objc_ivar_list *ivars=NULL;
|
||||
Class class = [object class];
|
||||
if (class)
|
||||
{
|
||||
NSDebugFLog(@"--%s %d [%d] Dumping object %p of Class %s "
|
||||
@"Description:%@",
|
||||
((file && isalpha(*file) && line>=0 && line<=20000)
|
||||
? file : ""),
|
||||
line,
|
||||
deep,
|
||||
(void*)object,
|
||||
class->name,
|
||||
objectDescription(object));
|
||||
while (class)
|
||||
{
|
||||
ivars = class->ivars;
|
||||
class = class->super_class;
|
||||
if (ivars)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < ivars->ivar_count; i++)
|
||||
{
|
||||
DumpIVar(object,&ivars->ivar_list[i],deep-1);
|
||||
};
|
||||
}
|
||||
};
|
||||
};
|
||||
};
|
||||
USTOP
|
||||
};
|
||||
static BOOL beenHere = NO;
|
||||
if (beenHere == NO) {
|
||||
|
||||
NSLog(@"%s is deprecated", __PRETTY_FUNCTION__);
|
||||
beenHere = YES;
|
||||
}
|
||||
}
|
||||
// USTART
|
||||
// if (object && deep>0)
|
||||
// {
|
||||
// struct objc_ivar_list *ivars=NULL;
|
||||
// Class class = [object class];
|
||||
// if (class)
|
||||
// {
|
||||
// NSDebugFLog(@"--%s %d [%d] Dumping object %p of Class %s "
|
||||
// @"Description:%@",
|
||||
// ((file && isalpha(*file) && line>=0 && line<=20000)
|
||||
// ? file : ""),
|
||||
// line,
|
||||
// deep,
|
||||
// (void*)object,
|
||||
// class->name,
|
||||
// objectDescription(object));
|
||||
// while (class)
|
||||
// {
|
||||
// ivars = class->ivars;
|
||||
// class = class->super_class;
|
||||
// if (ivars)
|
||||
// {
|
||||
// int i;
|
||||
// for (i = 0; i < ivars->ivar_count; i++)
|
||||
// {
|
||||
// DumpIVar(object,&ivars->ivar_list[i],deep-1);
|
||||
// };
|
||||
// }
|
||||
// };
|
||||
// };
|
||||
// };
|
||||
// USTOP
|
||||
// }
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
void GSWLogAssertGoodFn(CONST char* file,int line,id object)
|
||||
|
|
|
@ -73,12 +73,13 @@ GSWEB_EXPORT int iBlock;
|
|||
-(void)registerForEvents;
|
||||
-(void)unregisterForEvents;
|
||||
|
||||
-(void)runOnce;
|
||||
//-(void)runOnce;
|
||||
-(BOOL)doesBusyRunOnce;
|
||||
-(BOOL)dispatchesRequestsConcurrently;
|
||||
-(int)port;
|
||||
-(NSString*)host;
|
||||
-(void)unlock;
|
||||
// no lock, why unlock? -- dw
|
||||
//-(void)unlock;
|
||||
|
||||
-(void)setWorkerThreadCount:(id)workerThreadCount;
|
||||
-(id)workerThreadCount;
|
||||
|
@ -86,17 +87,16 @@ GSWEB_EXPORT int iBlock;
|
|||
-(id)workerThreadCountMin;
|
||||
-(void)setWorkerThreadCountMax:(id)workerThreadCount;
|
||||
-(id)workerThreadCountMax;
|
||||
|
||||
// WO 5:Use the system property WOListenQueueSize instead
|
||||
-(void)setListenQueueSize:(id)listenQueueSize;
|
||||
|
||||
-(BOOL)isMultiThreadEnabled;
|
||||
-(BOOL)isConnectionAllowedWithHandle:(NSFileHandle*)handle
|
||||
returnedMessage:(NSString**)retMessage;
|
||||
|
||||
- (void) workerThreadWillExit:(GSWWorkerThread*) thread;
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWDefaultAdaptor (GSWDefaultAdaptorA)
|
||||
-(void)stop;
|
||||
-(void)run;
|
||||
-(void)_runOnce;
|
||||
|
|
|
@ -372,11 +372,6 @@ void _queueWorkOnHandle(NSFileHandle* handle, NSMutableArray* waitingThreadArray
|
|||
return _isMultiThreadEnabled;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWDefaultAdaptor (GSWDefaultAdaptorA)
|
||||
-(void)stop
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
|
@ -392,5 +387,40 @@ void _queueWorkOnHandle(NSFileHandle* handle, NSMutableArray* waitingThreadArray
|
|||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
// WO 5:Use the user default WOListenQueueSize instead
|
||||
// we did not have it. added to make compiler happy.
|
||||
-(void)setListenQueueSize:(id)listenQueueSize;
|
||||
{
|
||||
NSLog(@"%s is depricated. Use the user default WOListenQueueSize instead.",__PRETTY_FUNCTION__);
|
||||
}
|
||||
|
||||
// CHECKME: find out if we really need this. -- dw
|
||||
-(void)setWorkerThreadCountMax:(id)workerThreadCount
|
||||
{
|
||||
}
|
||||
|
||||
// CHECKME: find out if we really need this. -- dw
|
||||
-(id)workerThreadCountMax
|
||||
{
|
||||
return [NSNumber numberWithInt:1000];
|
||||
}
|
||||
|
||||
// CHECKME: find out if we really need this. -- dw
|
||||
-(void)setWorkerThreadCountMin:(id)workerThreadCount
|
||||
{
|
||||
}
|
||||
|
||||
// CHECKME: find out if we really need this. -- dw
|
||||
-(id)workerThreadCountMin
|
||||
{
|
||||
return [NSNumber numberWithInt:1];
|
||||
}
|
||||
|
||||
// CHECKME: find out if we really need this. -- dw
|
||||
-(void)setWorkerThreadCount:(id)workerThreadCount
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
@ -100,9 +100,6 @@ if it was not cached **/
|
|||
-(void)lock;
|
||||
-(void)unlock;
|
||||
|
||||
@end
|
||||
|
||||
@interface GSWDeployedBundle (GSWDeployedBundleA)
|
||||
+(id)bundleWithPath:(NSString*)aPath;
|
||||
@end
|
||||
|
||||
|
|
|
@ -342,7 +342,7 @@ RCS_ID("$Id$")
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)lockedRelativePathForResourceNamed:(NSString*)aName
|
||||
inDirectory:(id)aDirectory
|
||||
inDirectory:(NSString*)aDirectory
|
||||
languages:(NSArray*)someLanguages
|
||||
{
|
||||
//OK
|
||||
|
@ -727,10 +727,6 @@ if it was not cached **/
|
|||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWDeployedBundle (GSWDeployedBundleA)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(id)bundleWithPath:(NSString*)aPath
|
||||
|
|
|
@ -36,15 +36,13 @@
|
|||
//====================================================================
|
||||
@interface GSWDirectAction : GSWAction
|
||||
{
|
||||
};
|
||||
}
|
||||
|
||||
-(id)initWithRequest:(GSWRequest*)aRequest;
|
||||
-(id <GSWActionResults>)performActionNamed:(NSString*)actionName;
|
||||
-(id)defaultAction;
|
||||
-(id<GSWActionResults>)defaultAction;
|
||||
-(NSString*)sessionIDForRequest:(GSWRequest*)aRequest;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWDirectAction (GSWTakeValuesConvenience)
|
||||
-(NSArray*)additionalRequestPathArray;
|
||||
-(void)takeFormValueArraysForKeyArray:(NSArray*)keys;
|
||||
-(void)takeFormValuesForKeyArray:(NSArray*)keys;
|
||||
|
|
|
@ -111,12 +111,10 @@ RCS_ID("$Id$")
|
|||
GSWResponse* response=[component generateResponse];
|
||||
[response disableClientCaching];
|
||||
return response;
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWDirectAction (GSWTakeValuesConvenience)
|
||||
// GSWTakeValuesConvenience
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//NDFN: return additional path elements
|
||||
|
|
|
@ -45,16 +45,12 @@
|
|||
-(GSWResponse*)generateRequestRefusalResponseForRequest:(GSWRequest*)aRequest;
|
||||
-(GSWResponse*)generateErrorResponseWithException:(NSException*)exception
|
||||
inContext:(GSWContext*)aContext;
|
||||
-(id)submitButtonsActionPathFromRequest:(GSWRequest*)aRequest;
|
||||
+(NSArray*)additionalRequestPathArrayFromRequest:(GSWRequest*)aRequest;
|
||||
-(void)setAllowsContentInputStream:(BOOL)yn;
|
||||
-(BOOL)allowsContentInputStream;
|
||||
-(void)setDisplayExceptionPages:(BOOL)yn;
|
||||
-(BOOL)displayExceptionPages;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWDirectActionRequestHandler (GSWRequestHandlerClassA)
|
||||
+(id)handler;
|
||||
+(GSWDirectActionRequestHandler*)handlerWithDefaultActionClassName:(NSString*)defaultActionClassName
|
||||
defaultActionName:(NSString*)defaultActionName
|
||||
|
|
|
@ -196,10 +196,6 @@ RCS_ID("$Id$")
|
|||
return _displayExceptionPages;
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWDirectActionRequestHandler (GSWRequestHandlerClassA)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(id)handler
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
#ifndef _GSWDynamicElement_h__
|
||||
#define _GSWDynamicElement_h__
|
||||
|
||||
#import "GSWElement.h"
|
||||
|
||||
GSWEB_EXPORT SEL evaluateConditionInContextSEL;
|
||||
|
||||
//====================================================================
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#ifndef _GSWDynamicGroup_h__
|
||||
#define _GSWDynamicGroup_h__
|
||||
|
||||
#include "GSWDynamicElement.h"
|
||||
|
||||
@interface GSWDynamicGroup: GSWDynamicElement
|
||||
{
|
||||
|
|
|
@ -92,9 +92,18 @@
|
|||
-(void)_parse;
|
||||
|
||||
-(NSString*)urlRequestHandlerPath;
|
||||
// 5.0 also in 4.5?
|
||||
-(NSString*)requestHandlerPath;
|
||||
|
||||
-(NSString*)urlQueryString;
|
||||
-(NSString*)queryString;
|
||||
|
||||
-(NSString*)urlRequestHandlerKey;
|
||||
-(int)urlApplicationNumber;
|
||||
|
||||
- (NSString*) applicationNumber;
|
||||
- (void) setApplicationNumber: (NSString*) newNr;
|
||||
|
||||
-(NSString*)urlApplicationName;
|
||||
-(NSString*)urlPrefix;
|
||||
-(NSString*)urlProtocol;//NDFN
|
||||
|
@ -105,8 +114,15 @@
|
|||
-(void)checkURL;
|
||||
|
||||
-(void)setURLRequestHandlerPath:(NSString*)aString;
|
||||
// 5.0 also in 4.5?
|
||||
-(void)setRequestHandlerPath:(NSString*)aString;
|
||||
|
||||
-(void)setURLQueryString:(NSString*)aString;
|
||||
-(void)setQueryString:(NSString*)aString;
|
||||
|
||||
-(void)setURLRequestHandlerKey:(NSString*)aString;
|
||||
-(void)setRequestHandlerKey:(NSString*)aString;
|
||||
|
||||
-(void)setURLApplicationNumber:(int)applicationNumber;
|
||||
-(void)setURLApplicationName:(NSString*)aString;
|
||||
-(void)setURLPrefix:(NSString*)aString;
|
||||
|
|
|
@ -41,210 +41,163 @@ static SEL appendStringSel = NULL;
|
|||
+ (void) initialize
|
||||
{
|
||||
if (self == [GSWDynamicURLString class])
|
||||
{
|
||||
appendStringSel = @selector(appendString:);
|
||||
};
|
||||
};
|
||||
{
|
||||
appendStringSel = @selector(appendString:);
|
||||
}
|
||||
}
|
||||
|
||||
+ (id) string
|
||||
{
|
||||
return [[[self alloc] init] autorelease];
|
||||
}
|
||||
|
||||
+ (id)stringWithString:(NSString *)aString
|
||||
{
|
||||
return [[[self alloc] initWithString:aString] autorelease];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)init
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
//NSDebugMLLog(@"low",@"new GSWDynamicURLString %p",self);
|
||||
if ((self=[super init]))
|
||||
{
|
||||
_url=[NSMutableString new];
|
||||
//NSDebugMLLog(@"low",@"url class=%@",[_url class]);
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
{
|
||||
_url=[NSMutableString new];
|
||||
}
|
||||
|
||||
return self;
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithCharactersNoCopy:(unichar*)chars
|
||||
length:(unsigned int)length
|
||||
freeWhenDone:(BOOL)flag
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
//NSDebugMLLog(@"low",@"new GSWDynamicURLString %p",self);
|
||||
//We are a primitive ! if ((self=[super init]))
|
||||
{
|
||||
_url=[[NSMutableString alloc]initWithCharactersNoCopy:chars
|
||||
length:length
|
||||
freeWhenDone:flag];
|
||||
if (chars)
|
||||
[self _parse];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
_url=[[NSMutableString alloc]initWithCharactersNoCopy:chars
|
||||
length:length
|
||||
freeWhenDone:flag];
|
||||
if (chars) {
|
||||
[self _parse];
|
||||
}
|
||||
return self;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithCharacters:(const unichar*)chars
|
||||
length:(unsigned int)length
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
//NSDebugMLLog(@"low",@"new GSWDynamicURLString %p",self);
|
||||
//We are a primitive ! if ((self=[super init]))
|
||||
{
|
||||
_url=[[NSMutableString alloc]initWithCharacters:chars
|
||||
length:length];
|
||||
if (chars)
|
||||
[self _parse];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
_url = [[NSMutableString alloc] initWithCharacters:chars
|
||||
length:length];
|
||||
if (chars) {
|
||||
[self _parse];
|
||||
}
|
||||
return self;
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithCStringNoCopy:(char*)byteString
|
||||
length:(unsigned int)length
|
||||
freeWhenDone:(BOOL)flag
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
//NSDebugMLLog(@"low",@"new GSWDynamicURLString %p",self);
|
||||
//We are a primitive ! if ((self=[super init]))
|
||||
{
|
||||
_url=[[NSMutableString alloc]initWithCStringNoCopy:byteString
|
||||
length:length
|
||||
freeWhenDone:flag];
|
||||
if (byteString)
|
||||
[self _parse];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
_url = [[NSMutableString alloc] initWithCStringNoCopy:byteString
|
||||
length:length
|
||||
freeWhenDone:flag];
|
||||
if (byteString) {
|
||||
[self _parse];
|
||||
}
|
||||
return self;
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithCString:(const char*)byteString
|
||||
length:(unsigned int)length;
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
//NSDebugMLLog(@"low",@"new GSWDynamicURLString %p",self);
|
||||
//We are a primitive ! if ((self=[super init]))
|
||||
{
|
||||
_url=[[NSMutableString alloc]initWithCString:byteString
|
||||
length:length];
|
||||
//NSDebugMLLog(@"low",@"url=%@",_url);
|
||||
//NSDebugMLLog(@"low",@"url class=%@",[_url class]);
|
||||
if (byteString)
|
||||
[self _parse];
|
||||
//NSDebugMLLog(@"low",@"url=%@",_url);
|
||||
//NSDebugMLLog(@"low",@"url class=%@",[_url class]);
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
_url = [[NSMutableString alloc] initWithCString:byteString
|
||||
length:length];
|
||||
if (byteString) {
|
||||
[self _parse];
|
||||
}
|
||||
|
||||
return self;
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithCString:(const char*)byteString;
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
//NSDebugMLLog(@"low",@"new GSWDynamicURLString %p",self);
|
||||
//We are a primitive ! if ((self=[super init]))
|
||||
{
|
||||
//NSDebugMLLog(@"low",@"byteString=%s",byteString);
|
||||
_url=[[NSMutableString alloc]initWithCString:byteString];
|
||||
if (byteString)
|
||||
[self _parse];
|
||||
//NSDebugMLLog(@"low",@"url=%@",_url);
|
||||
//NSDebugMLLog(@"low",@"url class=%@",[_url class]);
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
_url = [[NSMutableString alloc] initWithCString:byteString];
|
||||
if (byteString) {
|
||||
[self _parse];
|
||||
}
|
||||
|
||||
return self;
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithString:(NSString*)string
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
//NSDebugMLLog(@"low",@"new GSWDynamicURLString %p",self);
|
||||
//We are a primitive ! if ((self=[super init]))
|
||||
{
|
||||
_url=[[NSMutableString alloc]initWithString:string];
|
||||
if (string)
|
||||
[self _parse];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
_url = [[NSMutableString alloc] initWithString:string];
|
||||
if (string) {
|
||||
[self _parse];
|
||||
}
|
||||
return self;
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithFormat:(NSString*)format,...
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
//NSDebugMLLog(@"low",@"new GSWDynamicURLString %p",self);
|
||||
//We are a primitive ! if ((self=[super init]))
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap,format);
|
||||
_url=[[NSMutableString alloc]initWithFormat:format
|
||||
arguments:ap];
|
||||
va_end(ap);
|
||||
[self _parse];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
va_list ap;
|
||||
va_start(ap,format);
|
||||
_url = [[NSMutableString alloc] initWithFormat:format
|
||||
arguments:ap];
|
||||
va_end(ap);
|
||||
[self _parse];
|
||||
|
||||
return self;
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithFormat:(NSString*)format
|
||||
arguments:(va_list)argList
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
//NSDebugMLLog(@"low",@"new GSWDynamicURLString %p",self);
|
||||
//We are a primitive ! if ((self=[super init]))
|
||||
{
|
||||
_url=[[NSMutableString alloc]initWithFormat:format
|
||||
arguments:argList];
|
||||
[self _parse];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
_url = [[NSMutableString alloc] initWithFormat:format
|
||||
arguments:argList];
|
||||
[self _parse];
|
||||
|
||||
return self;
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithData:(NSData*)data
|
||||
encoding:(NSStringEncoding)encoding
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
//NSDebugMLLog(@"low",@"new GSWDynamicURLString %p",self);
|
||||
//We are a primitive ! if ((self=[super init]))
|
||||
{
|
||||
_url=[[NSMutableString alloc]initWithData:data
|
||||
encoding:encoding];
|
||||
if (data)
|
||||
[self _parse];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
_url = [[NSMutableString alloc] initWithData:data
|
||||
encoding:encoding];
|
||||
if (data) {
|
||||
[self _parse];
|
||||
}
|
||||
return self;
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithContentsOfFile:(NSString*)path
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
//NSDebugMLLog(@"low",@"new GSWDynamicURLString %p",self);
|
||||
//We are a primitive ! if ((self=[super init]))
|
||||
{
|
||||
_url=[[NSMutableString alloc]initWithContentsOfFile:path];
|
||||
[self _parse];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
_url=[[NSMutableString alloc]initWithContentsOfFile:path];
|
||||
[self _parse];
|
||||
|
||||
return self;
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithCoder:(NSCoder*)coder
|
||||
{
|
||||
[coder decodeValueOfObjCType:@encode(id)
|
||||
at:&_url];
|
||||
_urlASImp=NULL;
|
||||
_flags.composed=YES;
|
||||
[self _parse];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
|
@ -277,21 +230,6 @@ static SEL appendStringSel = NULL;
|
|||
return [_url dataUsingEncoding: encoding allowLossyConversion: flag];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithCoder:(NSCoder*)coder
|
||||
{
|
||||
//NSDebugMLLog(@"low",@"new GSWDynamicURLString %p",self);
|
||||
//We are a primitive ! if ((self = [self init]))
|
||||
{
|
||||
[coder decodeValueOfObjCType:@encode(id)
|
||||
at:&_url];
|
||||
_urlASImp=NULL;
|
||||
_flags.composed=YES;
|
||||
[self _parse];
|
||||
};
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)encodeWithCoder:(NSCoder*)coder
|
||||
{
|
||||
|
@ -323,21 +261,18 @@ static SEL appendStringSel = NULL;
|
|||
- (void) replaceCharactersInRange: (NSRange)range
|
||||
withString: (NSString*)aString
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
if (!_flags.composed)
|
||||
{
|
||||
[self _compose];
|
||||
}
|
||||
[_url replaceCharactersInRange:range
|
||||
withString:aString];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)copyWithZone:(NSZone*)zone
|
||||
{
|
||||
GSWDynamicURLString* clone = nil;
|
||||
LOGObjectFnStart();
|
||||
//NSDebugMLLog(@"low",@"url class=%@",[_url class]);
|
||||
clone=[[isa allocWithZone:zone] init];
|
||||
//NSDebugMLLog(@"low",@"new clone GSWDynamicURLString %p => %p",self,clone);
|
||||
|
@ -363,7 +298,6 @@ static SEL appendStringSel = NULL;
|
|||
clone->_flags.composed=_flags.composed;
|
||||
clone->_flags.beginningComposed=_flags.beginningComposed;
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return clone;
|
||||
};
|
||||
|
||||
|
@ -728,11 +662,21 @@ static SEL appendStringSel = NULL;
|
|||
return _requestHandlerPath;
|
||||
};
|
||||
|
||||
-(NSString*)requestHandlerPath
|
||||
{
|
||||
return _requestHandlerPath;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)urlQueryString
|
||||
{
|
||||
return _queryString;
|
||||
};
|
||||
}
|
||||
|
||||
-(NSString*)queryString
|
||||
{
|
||||
return _queryString;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)urlRequestHandlerKey
|
||||
|
@ -852,40 +796,54 @@ static SEL appendStringSel = NULL;
|
|||
return [NSString stringWithString:url];
|
||||
};
|
||||
|
||||
// CHECKME: depricate?
|
||||
-(void)setURLRequestHandlerPath:(NSString*)aString
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
ASSIGN(_requestHandlerPath,aString);
|
||||
_flags.composed=NO;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
-(void)setRequestHandlerPath:(NSString*)aString
|
||||
{
|
||||
ASSIGN(_requestHandlerPath,aString);
|
||||
_flags.composed=NO;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// CHECKME: depricate?
|
||||
-(void)setURLQueryString:(NSString*)aString
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
ASSIGN(_queryString,aString);
|
||||
_flags.composed=NO;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
-(void)setQueryString:(NSString*)aString
|
||||
{
|
||||
ASSIGN(_queryString,aString);
|
||||
_flags.composed=NO;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// CHECKME: rename to setRequestHandlerKey: ?? -- dw
|
||||
|
||||
-(void)setURLRequestHandlerKey:(NSString*)aString
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
ASSIGN(_requestHandlerKey,aString);
|
||||
_flags.composed=NO;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
-(void)setRequestHandlerKey:(NSString*)aString
|
||||
{
|
||||
ASSIGN(_requestHandlerKey,aString);
|
||||
_flags.composed=NO;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)setURLApplicationNumber:(int)applicationNumber
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
_applicationNumber=applicationNumber;
|
||||
_flags.beginningComposed=NO;
|
||||
_flags.composed=NO;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -895,11 +853,9 @@ static SEL appendStringSel = NULL;
|
|||
return;
|
||||
}
|
||||
|
||||
LOGObjectFnStart();
|
||||
ASSIGN(_applicationName,aString);
|
||||
_flags.beginningComposed=NO;
|
||||
_flags.composed=NO;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -909,11 +865,9 @@ static SEL appendStringSel = NULL;
|
|||
return;
|
||||
}
|
||||
|
||||
LOGObjectFnStart();
|
||||
ASSIGN(_prefix,aString);
|
||||
_flags.beginningComposed=NO;
|
||||
_flags.composed=NO;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -924,11 +878,9 @@ static SEL appendStringSel = NULL;
|
|||
return;
|
||||
}
|
||||
|
||||
LOGObjectFnStart();
|
||||
ASSIGN(_protocol,aString);
|
||||
_flags.beginningComposed=NO;
|
||||
_flags.composed=NO;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -939,11 +891,9 @@ static SEL appendStringSel = NULL;
|
|||
return;
|
||||
}
|
||||
|
||||
LOGObjectFnStart();
|
||||
ASSIGN(_host,aString);
|
||||
_flags.beginningComposed=NO;
|
||||
_flags.composed=NO;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -952,14 +902,12 @@ static SEL appendStringSel = NULL;
|
|||
{
|
||||
int myport = [aString intValue];
|
||||
|
||||
LOGObjectFnStart();
|
||||
if (_port==myport) {
|
||||
return;
|
||||
}
|
||||
_port=myport;
|
||||
_flags.beginningComposed=NO;
|
||||
_flags.composed=NO;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -969,11 +917,10 @@ static SEL appendStringSel = NULL;
|
|||
if (_port==port) {
|
||||
return;
|
||||
}
|
||||
LOGObjectFnStart();
|
||||
|
||||
_port=port;
|
||||
_flags.beginningComposed=NO;
|
||||
_flags.composed=NO;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
@end
|
||||
|
|
|
@ -32,11 +32,19 @@
|
|||
#ifndef _GSWElement_h__
|
||||
#define _GSWElement_h__
|
||||
|
||||
#include "GSWDefines.h"
|
||||
#include "GSWConstants.h"
|
||||
#include "GSWUtils.h"
|
||||
|
||||
GSWEB_EXPORT BYTE ElementsMap_htmlBareString;
|
||||
GSWEB_EXPORT BYTE ElementsMap_gswebElement;
|
||||
GSWEB_EXPORT BYTE ElementsMap_dynamicElement;
|
||||
GSWEB_EXPORT BYTE ElementsMap_attributeElement;
|
||||
|
||||
@class GSWResponse;
|
||||
@class GSWContext;
|
||||
@class GSWRequest;
|
||||
|
||||
#ifndef NDEBBUG
|
||||
#define GSWELEMENT_HAS_DECLARATION_NAME
|
||||
#endif
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#ifndef _GSWElementID_h__
|
||||
#define _GSWElementID_h__
|
||||
|
||||
@class GSWElementID;
|
||||
|
||||
typedef struct _GSWElementIDPart
|
||||
{
|
||||
|
@ -128,7 +129,7 @@ partsCount is the number of parts to allocate
|
|||
/** Append 'element' element ID after last elementID part
|
||||
You should avoid element ending with digits.
|
||||
**/
|
||||
-(void)appendElementIDComponent:(id)_element;
|
||||
-(void)appendElementIDComponent:(NSString*)element;
|
||||
|
||||
/** Returns parent element ID **/
|
||||
-(NSString*)parentElementIDString;
|
||||
|
|
|
@ -796,33 +796,20 @@ elements **/
|
|||
/** Increments last elementID part **/
|
||||
-(void)incrementLastElementIDComponent
|
||||
{
|
||||
|
||||
//NSLog(@"ELEMENTID: [elementID incrementLastElementIDComponent];");
|
||||
|
||||
if (_partsCount<1)
|
||||
{
|
||||
#warning checkme!
|
||||
if (_partsCount == 0) {
|
||||
return;
|
||||
|
||||
// NSWarnLog(@"Can't incrementLastElementIDComponent on an empty elementID");
|
||||
[NSException raise:NSInvalidArgumentException
|
||||
format:@"Can't incrementLastElementIDComponent on an empty elementID. In %s",
|
||||
__PRETTY_FUNCTION__];
|
||||
}
|
||||
else
|
||||
{
|
||||
GSWElementIDPart* part=NULL;
|
||||
|
||||
// Update part number
|
||||
part=_parts+_partsCount-1;
|
||||
part->_number++;
|
||||
|
||||
// update cache state information
|
||||
if (_builtPartCount>=_partsCount)
|
||||
_builtPartCount=_partsCount-1;
|
||||
DESTROY(_elementIDString);
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
GSWElementIDPart* part=NULL;
|
||||
|
||||
// Update part number
|
||||
part=_parts+_partsCount-1;
|
||||
part->_number++;
|
||||
|
||||
// update cache state information
|
||||
if (_builtPartCount>=_partsCount)
|
||||
_builtPartCount=_partsCount-1;
|
||||
DESTROY(_elementIDString);
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
@ -47,11 +47,7 @@
|
|||
GSWAssociation* _overwrite;
|
||||
GSWAssociation* _finalFilePath;
|
||||
|
||||
};
|
||||
|
||||
-(id)initWithName:(NSString*)name
|
||||
associations:(NSDictionary*)associations
|
||||
contentElements:(NSArray*)elements;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -996,7 +996,8 @@ BOOL canBeOnSegment(NSPoint m,NSPoint a,NSPoint b)
|
|||
-(void)dealloc
|
||||
{
|
||||
DESTROY(_points);
|
||||
};
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)description
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#ifndef _GSWHTMLDynamicElement_h__
|
||||
#define _GSWHTMLDynamicElement_h__
|
||||
|
||||
#include "GSWDynamicGroup.h"
|
||||
|
||||
//====================================================================
|
||||
@interface GSWHTMLDynamicElement: GSWDynamicGroup
|
||||
|
@ -44,6 +45,7 @@
|
|||
NSString * _constantAttributesRepresentation;
|
||||
NSMutableDictionary * _associations;
|
||||
BOOL _finishedInitialization;
|
||||
GSWAssociation * _secure;
|
||||
}
|
||||
|
||||
- (NSDictionary*) computeQueryDictionaryWithActionClassAssociation: (GSWAssociation*)actionClass
|
||||
|
@ -52,6 +54,11 @@
|
|||
otherQueryAssociations: (NSDictionary*)otherQueryAssociations
|
||||
inContext: (GSWContext*)context;
|
||||
|
||||
- (NSDictionary*) computeQueryDictionaryWithRequestHandlerPath: (NSString*) aRequestHandlerPath
|
||||
queryDictionaryAssociation: (GSWAssociation*) queryDictionary
|
||||
otherQueryAssociations: (NSDictionary*) otherQueryAssociations
|
||||
inContext: (GSWContext*) context;
|
||||
|
||||
-(NSString*)computeActionStringWithActionClassAssociation:(GSWAssociation*)actionClass
|
||||
directActionNameAssociation:(GSWAssociation*)directActionName
|
||||
inContext:(GSWContext*)context;
|
||||
|
@ -80,5 +87,7 @@
|
|||
inComponent: (GSWComponent *) component;
|
||||
- (NSString*) elementName;
|
||||
|
||||
- (BOOL) secureInContext:(GSWContext*) context;
|
||||
|
||||
@end
|
||||
#endif
|
||||
|
|
|
@ -38,7 +38,7 @@ RCS_ID("$Id$")
|
|||
#include "GSWPrivate.h"
|
||||
|
||||
|
||||
static Class standardClass = Nil;
|
||||
//static Class standardClass = Nil;
|
||||
static Class NSStringClass = Nil;
|
||||
static Class NSNumberClass = Nil;
|
||||
static Class NSMutableDictionaryClass = Nil;
|
||||
|
@ -111,6 +111,7 @@ static inline BOOL _needQuote(NSString* str_needQuote)
|
|||
DESTROY(_urlAttributeAssociations);
|
||||
DESTROY(_constantAttributesRepresentation);
|
||||
DESTROY(_associations);
|
||||
DESTROY(_secure);
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
@ -136,7 +137,7 @@ static inline BOOL _needQuote(NSString* str_needQuote)
|
|||
__PRETTY_FUNCTION__];
|
||||
}
|
||||
DESTROY(_associations);
|
||||
_associations = [associations mutableCopyWithZone:nil];
|
||||
_associations = [associations mutableCopyWithZone:[self zone]];
|
||||
_finishedInitialization = NO;
|
||||
|
||||
return self;
|
||||
|
@ -187,11 +188,16 @@ static inline BOOL _needQuote(NSString* str_needQuote)
|
|||
if ((_elementName != nil) && ((_associations != nil) && ([_associations count] > 0))) {
|
||||
NSEnumerator * enumer = [[NSArray arrayWithArray:[_associations allKeys]] objectEnumerator];
|
||||
|
||||
while (str = [enumer nextObject]) {
|
||||
while ((str = [enumer nextObject])) {
|
||||
association = [_associations objectForKey: str];
|
||||
if (([association isKindOfClass:[GSWConstantValueAssociation class]]) && ([self escapeHTML] == NO)) {
|
||||
aValue = [association valueInComponent:nil];
|
||||
s1 = (aValue == nil) ? @"" : aValue; // stringValue??
|
||||
if ((aValue == nil)) {
|
||||
s1 = @"";
|
||||
} else {
|
||||
s1 = (NSString*)aValue;
|
||||
}
|
||||
|
||||
if ([s1 isKindOfClass:NSStringClass] == NO) {
|
||||
s1 = [(NSNumber*)s1 stringValue];
|
||||
}
|
||||
|
@ -319,9 +325,16 @@ static inline BOOL _needQuote(NSString* str_needQuote)
|
|||
{
|
||||
s = [component frameworkName];
|
||||
}
|
||||
NSString * tmpStr;
|
||||
|
||||
if ((s != nil)) {
|
||||
tmpStr = s;
|
||||
} else {
|
||||
tmpStr = @"app";
|
||||
}
|
||||
[GSWApp debugWithFormat:@"%s evaluated to nil. Defaulting to %@",
|
||||
__PRETTY_FUNCTION__,
|
||||
(s != nil ? s : @"app")];
|
||||
tmpStr];
|
||||
}
|
||||
} else {
|
||||
if (component != nil) {
|
||||
|
@ -388,7 +401,64 @@ static inline BOOL _needQuote(NSString* str_needQuote)
|
|||
}
|
||||
|
||||
|
||||
// computeQueryDictionaryInContext
|
||||
- (NSDictionary*) __queryDictionary:(GSWAssociation*) queryDictionary
|
||||
inContext:(GSWContext*) context
|
||||
{
|
||||
NSDictionary* aQueryDict = nil;
|
||||
|
||||
if (queryDictionary != nil) {
|
||||
aQueryDict = [queryDictionary valueInComponent:[context component]];
|
||||
}
|
||||
|
||||
if(aQueryDict != nil) {
|
||||
return aQueryDict;
|
||||
} else {
|
||||
// or a nil? -- dw
|
||||
return [NSDictionary dictionary];
|
||||
}
|
||||
}
|
||||
|
||||
- (NSDictionary*) __otherQueryDictionary:(NSDictionary*) otherQueryAssociations
|
||||
inContext:(GSWContext*) context
|
||||
{
|
||||
NSMutableDictionary * queryDict = [NSMutableDictionary dictionary];
|
||||
|
||||
if (otherQueryAssociations != nil) {
|
||||
NSEnumerator *keyEnumerator = [otherQueryAssociations keyEnumerator];
|
||||
NSString *key;
|
||||
|
||||
while ((key = [keyEnumerator nextObject])) {
|
||||
GSWAssociation * association = [otherQueryAssociations objectForKey:key];
|
||||
id value = [association valueInComponent:[context component]];
|
||||
|
||||
if (value) {
|
||||
[queryDict setObject:value forKey:key];
|
||||
}
|
||||
}
|
||||
}
|
||||
// is it really faster/better to copy this here? -- dw
|
||||
return [NSDictionary dictionaryWithDictionary:queryDict];
|
||||
}
|
||||
|
||||
|
||||
- (NSDictionary*) computeQueryDictionaryWithRequestHandlerPath: (NSString*) aRequestHandlerPath
|
||||
queryDictionaryAssociation: (GSWAssociation*) queryDictionary
|
||||
otherQueryAssociations: (NSDictionary*) otherQueryAssociations
|
||||
inContext: (GSWContext*) context
|
||||
{
|
||||
NSDictionary * aQueryDict = [self __queryDictionary:queryDictionary
|
||||
inContext: context];
|
||||
|
||||
NSDictionary * anotherQueryDict = [self __otherQueryDictionary:otherQueryAssociations
|
||||
inContext: context];
|
||||
|
||||
return [context computeQueryDictionaryWithPath:aRequestHandlerPath
|
||||
queryDictionary:aQueryDict
|
||||
otherQueryDictionary:anotherQueryDict];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
- (NSDictionary*) computeQueryDictionaryWithActionClassAssociation: (GSWAssociation*)actionClass
|
||||
directActionNameAssociation: (GSWAssociation*)directActionName
|
||||
|
@ -408,9 +478,9 @@ static inline BOOL _needQuote(NSString* str_needQuote)
|
|||
if (queryDictionary != nil) {
|
||||
NSDictionary * nsdictionary1 = [queryDictionary valueInComponent:component];
|
||||
if ([nsdictionary1 isKindOfClass:NSMutableDictionaryClass]) {
|
||||
nsmutabledictionary = nsdictionary1;
|
||||
nsmutabledictionary = (NSMutableDictionary*) nsdictionary1;
|
||||
} else {
|
||||
nsmutabledictionary = AUTORELEASE([nsdictionary1 mutableCopyWithZone:nil]);
|
||||
nsmutabledictionary = (NSMutableDictionary*) AUTORELEASE([nsdictionary1 mutableCopyWithZone:[self zone]]);
|
||||
}
|
||||
}
|
||||
if (nsmutabledictionary == nil) {
|
||||
|
@ -429,7 +499,7 @@ static inline BOOL _needQuote(NSString* str_needQuote)
|
|||
if (otherQueryAssociations != nil) {
|
||||
keyEnumerator = [otherQueryAssociations keyEnumerator];
|
||||
|
||||
while (key = [keyEnumerator nextObject]) {
|
||||
while ((key = [keyEnumerator nextObject])) {
|
||||
otherAssociations = [otherQueryAssociations objectForKey:key];
|
||||
otherValue = [otherAssociations valueInComponent:component];
|
||||
if (otherValue != nil && ([key isEqual:@"wosid"] || ([otherValue boolValue] == YES))) {
|
||||
|
@ -465,7 +535,7 @@ static inline BOOL _needQuote(NSString* str_needQuote)
|
|||
GSWAssociation * currentAssociation = nil;
|
||||
id obj = nil;
|
||||
|
||||
while (key = [enumer nextObject]) {
|
||||
while ((key = [enumer nextObject])) {
|
||||
currentAssociation = [associations objectForKey:key];
|
||||
obj = [currentAssociation valueInComponent:component];
|
||||
if (obj != nil) {
|
||||
|
@ -515,10 +585,9 @@ static inline BOOL _needQuote(NSString* str_needQuote)
|
|||
|
||||
NSString * key = nil;
|
||||
|
||||
NSString * s = nil;
|
||||
NSString * s1 = nil;
|
||||
|
||||
while (key = [enumer nextObject]) {
|
||||
while ((key = [enumer nextObject])) {
|
||||
association = [attributeDict objectForKey:key];
|
||||
value = [association valueInComponent:component];
|
||||
if (value != nil) {
|
||||
|
@ -600,5 +669,13 @@ static inline BOOL _needQuote(NSString* str_needQuote)
|
|||
}
|
||||
}
|
||||
|
||||
- (BOOL) secureInContext:(GSWContext*) context
|
||||
{
|
||||
if (_secure != nil) {
|
||||
return [_secure boolValueInComponent:[context component]];
|
||||
} else {
|
||||
return [context secureMode];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -544,7 +544,6 @@ May raise exception.
|
|||
else
|
||||
{
|
||||
BOOL stopTag=NO;
|
||||
int tagStopIndex=_index;
|
||||
int tagPropertiesStopIndex=_index;
|
||||
|
||||
if (isClosingTag)
|
||||
|
|
|
@ -44,9 +44,7 @@ RCS_ID("$Id$")
|
|||
-(id)initWithContentElements:(NSArray*)elements
|
||||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"gswdync",@"elements:%@",elements);
|
||||
#warning checkme!
|
||||
// checkme
|
||||
/* if ([elements count]==1 && [[elements objectAtIndex:0] class]==[GSWHTMLStaticGroup class])
|
||||
self=[super initWithName:nil
|
||||
attributeDictionary:nil
|
||||
|
@ -56,9 +54,8 @@ RCS_ID("$Id$")
|
|||
self=[super initWithName:nil
|
||||
attributeDictionary:nil
|
||||
contentElements:elements];
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
}
|
||||
|
||||
-(NSString*)description
|
||||
{
|
||||
|
@ -86,16 +83,13 @@ RCS_ID("$Id$")
|
|||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
GSWStartElement(aContext);
|
||||
if (_documentTypeString)
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"added documentTypeString = %@",_documentTypeString);
|
||||
GSWResponse_appendContentString(aResponse,_documentTypeString);
|
||||
};
|
||||
|
||||
[super appendToResponse:aResponse
|
||||
inContext:aContext];
|
||||
GSWStopElement(aContext);
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
@class NSFileHandle;
|
||||
@class GSWRequest;
|
||||
@class GSWResponse;
|
||||
|
||||
|
||||
@interface GSWHTTPIO : NSObject {
|
||||
|
@ -37,6 +38,10 @@
|
|||
|
||||
+ (GSWRequest*) readRequestFromFromHandle:(NSFileHandle*) fh;
|
||||
|
||||
+ (void) sendResponse:(GSWResponse*) response
|
||||
toHandle:(NSFileHandle*) fh
|
||||
request:(GSWRequest*) request;
|
||||
|
||||
@end
|
||||
|
||||
#endif // _GSWHTTPIO_h__
|
||||
|
|
|
@ -56,7 +56,7 @@ static NSString *NEWLINE2 = @"\r\n";
|
|||
static NSString *HTTP11 = @"HTTP/1.1";
|
||||
static NSString *CONNECTION = @"connection";
|
||||
static NSString *KEEP_ALIVE = @"keep-alive";
|
||||
static NSString *CLOSE = @"close";
|
||||
//static NSString *CLOSE = @"close";
|
||||
|
||||
|
||||
/* Get error information.
|
||||
|
@ -66,6 +66,7 @@ static NSString *CLOSE = @"close";
|
|||
@end
|
||||
|
||||
@interface NSFileHandle (GSWFileHandleExtensions)
|
||||
//- (void) setNonBlocking: (BOOL)flag;
|
||||
|
||||
- (NSData*) readDataLine;
|
||||
@end
|
||||
|
@ -76,7 +77,6 @@ static NSString *CLOSE = @"close";
|
|||
{
|
||||
NSMutableData *d;
|
||||
int got,pos=0;
|
||||
int total = 0;
|
||||
char buf[READ_SIZE];
|
||||
int fileDescriptor = [(GSFileHandle*)self fileDescriptor];
|
||||
|
||||
|
@ -236,8 +236,6 @@ void _sendMessage(GSWMessage * message, NSFileHandle* fh, NSString * httpVersion
|
|||
|
||||
+ (NSDictionary*) readHeadersFromHandle:(NSFileHandle*) fh
|
||||
{
|
||||
BOOL headersDone=NO;
|
||||
NSArray *lines = [NSMutableArray array];
|
||||
NSData *currentLineData = nil;
|
||||
unsigned int length = 0;
|
||||
NSMutableDictionary *headers = [NSMutableDictionary dictionary];
|
||||
|
@ -327,7 +325,7 @@ void _sendMessage(GSWMessage * message, NSFileHandle* fh, NSString * httpVersion
|
|||
NSData * contentData = nil;
|
||||
GSWRequest * request = nil;
|
||||
|
||||
[fh setNonBlocking: NO];
|
||||
[(GSFileHandle*) fh setNonBlocking: NO];
|
||||
|
||||
requestArray = [self readRequestLineFromHandle:fh];
|
||||
if ((!requestArray) || ([requestArray count] <3)) {
|
||||
|
|
|
@ -89,8 +89,8 @@ static Class NSStringClass = Nil;
|
|||
DESTROY(_otherQueryAssociations);
|
||||
_otherQueryAssociations = RETAIN([_associations extractObjectsForKeysWithPrefix:@"?" removePrefix: YES]);
|
||||
|
||||
_otherQueryAssociations = _otherQueryAssociations == nil ||
|
||||
([_otherQueryAssociations count] <= 0) ? nil : _otherQueryAssociations;
|
||||
// _otherQueryAssociations = (((_otherQueryAssociations == nil) ||
|
||||
// ([_otherQueryAssociations count] <= 0)) ? nil : _otherQueryAssociations);
|
||||
|
||||
if ((_otherQueryAssociations != nil) && ([_otherQueryAssociations count] == 0)) {
|
||||
DESTROY(_otherQueryAssociations);
|
||||
|
@ -143,10 +143,10 @@ static Class NSStringClass = Nil;
|
|||
format:@"%s: Missing required attribute: 'action' or 'href' or 'pageName' or 'directActionName' or 'actionClass'",
|
||||
__PRETTY_FUNCTION__];
|
||||
}
|
||||
if ((_action != nil) && (_href != nil) || (_action != nil) && (_pageName != nil) ||
|
||||
(_href != nil) && (_pageName != nil) || (_action != nil) &&
|
||||
(_directActionName != nil) || (_href != nil) && (_directActionName != nil) || (_pageName != nil) &&
|
||||
(_directActionName != nil) || (_action != nil) && (_actionClass != nil)) {
|
||||
if (((_action != nil) && (_href != nil)) || ((_action != nil) && (_pageName != nil)) ||
|
||||
((_href != nil) && (_pageName != nil)) || ((_action != nil) &&
|
||||
(_directActionName != nil)) || ((_href != nil) && (_directActionName != nil)) || ((_pageName != nil) &&
|
||||
(_directActionName != nil)) || ((_action != nil) && (_actionClass != nil))) {
|
||||
|
||||
[NSException raise:NSInvalidArgumentException
|
||||
format:@"%s: At least two of these conflicting attributes are present: 'action', 'href', 'pageName', 'directActionName', 'actionClass'.",
|
||||
|
@ -210,7 +210,7 @@ static Class NSStringClass = Nil;
|
|||
}
|
||||
}
|
||||
} else {
|
||||
#warning TODO GSWNoContentElement
|
||||
//TODO GSWNoContentElement
|
||||
obj = nil;
|
||||
}
|
||||
if (obj == nil) {
|
||||
|
@ -242,6 +242,9 @@ static Class NSStringClass = Nil;
|
|||
inContext:(GSWContext*) context
|
||||
{
|
||||
NSString * str = nil;
|
||||
|
||||
GSOnceMLog(@"%s is deprecated, use _appendQueryStringToResponse: inContext: requestHandlerPath: htmlEscapeURL:", __PRETTY_FUNCTION__);
|
||||
|
||||
NSDictionary * queryDict = [self computeQueryDictionaryWithActionClassAssociation: _actionClass
|
||||
directActionNameAssociation: _directActionName
|
||||
queryDictionaryAssociation: _queryDictionary
|
||||
|
@ -255,6 +258,34 @@ static Class NSStringClass = Nil;
|
|||
}
|
||||
}
|
||||
|
||||
-(void) _appendQueryStringToResponse:(GSWResponse*) response
|
||||
inContext:(GSWContext*) context
|
||||
requestHandlerPath: (NSString*) aRequestHandlerPath
|
||||
htmlEscapeURL: (BOOL) htmlEscapeURL
|
||||
{
|
||||
NSString * str = nil;
|
||||
NSString * path;
|
||||
|
||||
if ((aRequestHandlerPath == nil)) {
|
||||
path = @"";
|
||||
} else {
|
||||
path = aRequestHandlerPath;
|
||||
}
|
||||
|
||||
NSDictionary * queryDict = [self computeQueryDictionaryWithRequestHandlerPath: path
|
||||
queryDictionaryAssociation: _queryDictionary
|
||||
otherQueryAssociations: _otherQueryAssociations
|
||||
inContext: context];
|
||||
|
||||
if ((queryDict != nil) && ([queryDict count] > 0)) {
|
||||
// CHECKME: we should pass htmlEscapeURL to encodeAsCGIFormValues ?? -- dw
|
||||
str = [queryDict encodeAsCGIFormValues];
|
||||
GSWResponse_appendContentCharacter(response,'?');
|
||||
GSWResponse_appendContentHTMLAttributeValue(response, str);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-(void) _appendFragmentToResponse:(GSWResponse*) response
|
||||
inContext:(GSWContext*) context
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#ifndef _GSWImage_h__
|
||||
#define _GSWImage_h__
|
||||
|
||||
#include "GSWHTMLURLValuedElement.h"
|
||||
|
||||
@interface GSWImage: GSWHTMLURLValuedElement
|
||||
{
|
||||
|
|
|
@ -249,12 +249,18 @@ RCS_ID("$Id$")
|
|||
if (_width != nil || _height != nil) {
|
||||
if (_width != nil) {
|
||||
widthValue = [_width valueInComponent:component];
|
||||
widthStr = widthValue != nil ? NSStringWithObject(widthValue) : nil;
|
||||
if (widthValue != nil) {
|
||||
widthStr = NSStringWithObject(widthValue);
|
||||
}
|
||||
|
||||
hasNoWidth = (widthStr == nil || [widthStr isEqual:@"*"]);
|
||||
}
|
||||
if (_height != nil) {
|
||||
heightValue = [_height valueInComponent:component];
|
||||
heightStr = heightValue != nil ? NSStringWithObject(heightValue) : nil; // stringValue?
|
||||
if (heightValue != nil) {
|
||||
heightStr = NSStringWithObject(heightValue);
|
||||
}
|
||||
|
||||
hasNoHeight = (heightStr == nil || [heightStr isEqual:@"*"]);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
-(void)takeValuesFromRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)context;
|
||||
|
||||
-(NSString*)frameworkNameInContext:(GSWContext*)context;
|
||||
//-(NSString*)frameworkNameInContext:(GSWContext*)context;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -555,18 +555,18 @@ RCS_ID("$Id$")
|
|||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(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;
|
||||
};
|
||||
//-(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
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#ifndef _GSWInput_h__
|
||||
#define _GSWInput_h__
|
||||
|
||||
#include "GSWHTMLDynamicElement.h"
|
||||
|
||||
//====================================================================
|
||||
@interface GSWInput: GSWHTMLDynamicElement
|
||||
|
@ -44,30 +45,17 @@
|
|||
GSWAssociation * _escapeHTML;
|
||||
}
|
||||
|
||||
+ (void) _appendImageSizetoResponse:(GSWResponse *) response
|
||||
inContext:(GSWContext *) context
|
||||
width:(GSWAssociation *) width
|
||||
height:(GSWAssociation *) height;
|
||||
|
||||
-(id)initWithName:(NSString*)aName
|
||||
associations:(NSDictionary*)associations
|
||||
contentElements:(NSMutableArray*) elements;
|
||||
|
||||
-(void)dealloc;
|
||||
|
||||
- (BOOL) disabledInComponent:(GSWComponent*) component;
|
||||
|
||||
|
||||
/** Return the name for html output.
|
||||
If no name is binded, it return the context id **/
|
||||
If no name is binded, it return the context id **/
|
||||
-(NSString*)nameInContext:(GSWContext*)context;
|
||||
|
||||
|
||||
/** Return YES if element is disabled, NO otherwise,
|
||||
depending on disabled/enabled binding
|
||||
**/
|
||||
-(BOOL)disabledInContext:(GSWContext*)context;
|
||||
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)context;
|
||||
|
||||
|
|
|
@ -160,12 +160,13 @@ static Class standardClass = Nil;
|
|||
format:@"%s: Cannot evaluate 'name' attribute, and context element ID is nil.",
|
||||
__PRETTY_FUNCTION__];
|
||||
}
|
||||
// make the compiler happy ;)
|
||||
return nil;
|
||||
}
|
||||
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)context
|
||||
{
|
||||
id obj = nil;
|
||||
GSWComponent * component = GSWContext_component(context);
|
||||
|
||||
if ((![self disabledInComponent: component]) && ([context _wasFormSubmitted])) {
|
||||
|
@ -208,7 +209,6 @@ static Class standardClass = Nil;
|
|||
if (_value != nil)
|
||||
{
|
||||
id obj = [_value valueInComponent:component];
|
||||
id obj1 = nil;
|
||||
if (obj != nil) {
|
||||
NSString * s = obj; // stringValue??
|
||||
[response _appendTagAttribute: value__Key
|
||||
|
|
|
@ -141,10 +141,6 @@ RCS_ID("$Id$")
|
|||
return dscr;
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWKeyValueAssociation (GSWAssociationB)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)keyPath
|
||||
|
|
|
@ -72,7 +72,6 @@
|
|||
destroyLast:(BOOL)destroy;
|
||||
|
||||
-(void)threadExited;
|
||||
+(id)threadExited:(NSNotification*)notif;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -812,7 +812,7 @@ static __inline__ NSMutableData *_checkBody(GSWMessage *self) {
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSWarnLog(@"Can't convert contentData to Strong: %@",localException);
|
||||
NSWarnLog(@"Can't convert contentData to String: %@",localException);
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
|
||||
|
|
|
@ -39,7 +39,8 @@ RCS_ID("$Id$")
|
|||
-(void)dealloc
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -45,14 +45,14 @@
|
|||
|
||||
-(id)initWithName:(NSString*)name
|
||||
associations:(NSDictionary*)associations
|
||||
contentElements:(NSArray*)elements
|
||||
contentElements:(NSMutableArray*)elements
|
||||
target:(id)target
|
||||
key:(NSString*)key
|
||||
treatNilValueAsGSWNull:(BOOL)treatNilValueAsGSWNull;
|
||||
|
||||
-(id)initWithName:(NSString*)name
|
||||
associations:(NSDictionary*)associations
|
||||
contentElements:(NSArray*)elements;
|
||||
contentElements:(NSMutableArray*)elements;
|
||||
|
||||
-(NSString*)elementName;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ RCS_ID("$Id$")
|
|||
|
||||
-(id)initWithName:(NSString*)aName
|
||||
associations:(NSDictionary*)inAssociations
|
||||
contentElements:(NSArray*)elements
|
||||
contentElements:(NSMutableArray*)elements
|
||||
target:(id)target
|
||||
key:(NSString*)key
|
||||
treatNilValueAsGSWNull:(BOOL)treatNilValueAsGSWNull
|
||||
|
@ -91,7 +91,7 @@ treatNilValueAsGSWNull:(BOOL)treatNilValueAsGSWNull
|
|||
|
||||
-(id)initWithName:(NSString*)aName
|
||||
associations:(NSDictionary*)associations
|
||||
contentElements:(NSArray*)elements
|
||||
contentElements:(NSMutableArray*)elements
|
||||
{
|
||||
return [self initWithName:aName
|
||||
associations:associations
|
||||
|
|
|
@ -42,15 +42,9 @@
|
|||
GSWAssociation * _selectedValue;
|
||||
GSWAssociation * _noSelectionString;
|
||||
BOOL _loggedSlow;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
-(id)initWithName:(NSString*)name
|
||||
associations:(NSDictionary*)associations
|
||||
contentElements:(NSArray*)elements;
|
||||
|
||||
-(NSString*)elementName;
|
||||
|
||||
@end
|
||||
|
||||
#endif //_GSWPopUpButton_h__
|
||||
|
|
|
@ -29,9 +29,31 @@
|
|||
|
||||
// $Id$
|
||||
|
||||
|
||||
/*
|
||||
* Private declarations of private methods in GSWeb.
|
||||
*
|
||||
* If you use them outside the GSW Framework you should keep in mind that they may
|
||||
* change any time. This is no public API and may be incompatible with any WebObjects
|
||||
* Version.
|
||||
*
|
||||
* Actually this is bad. We should have separate CLASSNAME_Private.h files
|
||||
*/
|
||||
|
||||
#ifndef _GSWPrivate_h__
|
||||
#define _GSWPrivate_h__
|
||||
|
||||
#include "GSWComponentDefinition.h"
|
||||
#include "GSWComponent.h"
|
||||
#include "GSWApplication.h"
|
||||
#include "GSWAssociation.h"
|
||||
#include "GSWInput.h"
|
||||
#include "GSWHyperlink.h"
|
||||
#include "GSWImage.h"
|
||||
#include "GSWContext.h"
|
||||
#include "GSWSession.h"
|
||||
#include "GSWMessage.h"
|
||||
#include "GSWDefaultAdaptor.h"
|
||||
|
||||
/** append string to object using appendString: impPtr.
|
||||
If *impPtr is NULL, the method assign it **/
|
||||
|
@ -45,6 +67,7 @@ static inline void GSWeb_appendStringWithImpPtr(NSMutableString* object,IMP* imp
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
@interface GSWComponentDefinition (PrivateDeclarations)
|
||||
|
||||
- (void) _checkInComponentInstance:(GSWComponent*) component;
|
||||
|
@ -55,6 +78,12 @@ static inline void GSWeb_appendStringWithImpPtr(NSMutableString* object,IMP* imp
|
|||
|
||||
@end
|
||||
|
||||
@interface GSWComponent (PrivateDeclarations)
|
||||
|
||||
-(GSWComponent*) _subcomponentForElementWithID:(NSString*) str;
|
||||
|
||||
@end
|
||||
|
||||
@interface GSWApplication (PrivateDeclarations)
|
||||
|
||||
-(GSWComponentDefinition*) _componentDefinitionWithName:(NSString*)aName
|
||||
|
@ -83,5 +112,57 @@ static inline void GSWeb_appendStringWithImpPtr(NSMutableString* object,IMP* imp
|
|||
|
||||
@end
|
||||
|
||||
@interface GSWHyperlink (PrivateDeclarations)
|
||||
|
||||
-(void) _appendQueryStringToResponse:(GSWResponse*) response
|
||||
inContext:(GSWContext*) context
|
||||
requestHandlerPath:(NSString*) aRequestHandlerPath
|
||||
htmlEscapeURL:(BOOL) htmlEscapeURL;
|
||||
|
||||
@end
|
||||
|
||||
@interface GSWMessage (PrivateDeclarations)
|
||||
|
||||
-(void)_finalizeCookiesInContext:(GSWContext*)aContext;
|
||||
|
||||
@end
|
||||
|
||||
@interface GSWImage (PrivateDeclarations)
|
||||
|
||||
+ (void) _appendImageSizetoResponse:(GSWResponse *) response
|
||||
inContext:(GSWContext *) context
|
||||
width:(GSWAssociation *) width
|
||||
height:(GSWAssociation *) height;
|
||||
|
||||
@end
|
||||
|
||||
@interface GSWContext (PrivateDeclarations)
|
||||
|
||||
- (GSWDynamicURLString*) _urlWithRequestHandlerKey:(NSString*) requestHandlerKey
|
||||
requestHandlerPath:(NSString*) aRequestHandlerPath
|
||||
queryString:(NSString*) aQueryString
|
||||
isSecure:(BOOL) isSecure
|
||||
port:(int) somePort;
|
||||
|
||||
|
||||
-(GSWDynamicURLString*) _directActionURLForActionNamed:(NSString*) anActionName
|
||||
queryDictionary:(NSDictionary*)queryDictionary
|
||||
isSecure:(BOOL)isSecure
|
||||
port:(int)port
|
||||
escapeQueryDictionary:(BOOL)escapeQueryDict;
|
||||
|
||||
@end
|
||||
|
||||
@interface GSWSession (PrivateDeclarations)
|
||||
|
||||
-(void) _clearCookieFromResponse:(GSWResponse*) aResponse;
|
||||
|
||||
@end
|
||||
|
||||
@interface GSWDefaultAdaptor (PrivateDeclarations)
|
||||
|
||||
+(GSWResponse*) _lastDitchErrorResponse;
|
||||
|
||||
@end
|
||||
|
||||
#endif // _GSWPrivate_h__
|
||||
|
|
|
@ -36,7 +36,7 @@ typedef enum _GSWProcState
|
|||
GSWProcState__SleepWait
|
||||
|
||||
} GSWProcState;
|
||||
@interface GSWProcFSProcInfo : NSObject <NSCoding,NSCopying>
|
||||
@interface GSWProcFSProcInfo : NSObject //<NSCoding,NSCopying>
|
||||
{
|
||||
NSString* _user; // user name corresponding to owner of process [/proc/#/stat]
|
||||
NSString* _command; // basename of executable file in call to exec(2) [/proc/#/stat]
|
||||
|
|
|
@ -65,7 +65,7 @@ Bindings
|
|||
isDisplayStringBefore If evaluated to yes, displayString is displayed before radio button
|
||||
**/
|
||||
|
||||
static GSWIMP_BOOL standardEvaluateConditionInContextIMP = NULL;
|
||||
//static GSWIMP_BOOL standardEvaluateConditionInContextIMP = NULL;
|
||||
|
||||
static Class standardClass = Nil;
|
||||
|
||||
|
@ -146,9 +146,9 @@ static Class standardClass = Nil;
|
|||
} else {
|
||||
_defaultEscapeHTML = YES;
|
||||
}
|
||||
if ((_list == nil) || (_displayString != nil || _value != nil) &&
|
||||
(_item == nil || (![_item isValueSettable])) ||
|
||||
(_selection != nil && (![_selection isValueSettable])))
|
||||
if ((((_list == nil) || (_displayString != nil || _value != nil)) &&
|
||||
((_item == nil) || (![_item isValueSettable]))) ||
|
||||
((_selection != nil) && (![_selection isValueSettable])))
|
||||
{
|
||||
[NSException raise:NSInvalidArgumentException
|
||||
format:@"%s: 'list' must be present. 'item' must not be a constant if 'displayString' or 'value' is present. 'selections' must not be a constant if present.",
|
||||
|
@ -244,7 +244,6 @@ static Class standardClass = Nil;
|
|||
|
||||
if ((_selection != nil) && ((![self disabledInComponent:component]) && ([context _wasFormSubmitted]))) {
|
||||
|
||||
NSArray* listValue = nil;
|
||||
id selValue = nil;
|
||||
NSString * ctxName = [self nameInContext:context];
|
||||
NSString * formValue = [request stringFormValueForKey: ctxName];
|
||||
|
@ -270,7 +269,6 @@ static Class standardClass = Nil;
|
|||
inContext:(GSWContext*)context
|
||||
{
|
||||
id selectionsValue = nil;
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
BOOL doEscape;
|
||||
int count = 0;
|
||||
|
@ -301,12 +299,21 @@ static Class standardClass = Nil;
|
|||
[_index setValue:GSWIntToNSString(j)
|
||||
inComponent:component];
|
||||
}
|
||||
NSString * prefixStr = _prefix == nil ? nil : NSStringWithObject([_prefix valueInComponent:component]);
|
||||
NSString * suffixStr = _suffix == nil ? nil : NSStringWithObject([_suffix valueInComponent:component]);
|
||||
NSString * prefixStr = nil;
|
||||
NSString * suffixStr = nil;
|
||||
id displayValue = nil;
|
||||
NSString * dispStr = nil;
|
||||
|
||||
valueValue = nil;
|
||||
|
||||
if (_prefix != nil) {
|
||||
prefixStr = NSStringWithObject([_prefix valueInComponent:component]);
|
||||
}
|
||||
|
||||
if (_suffix != nil) {
|
||||
suffixStr = NSStringWithObject([_suffix valueInComponent:component]);
|
||||
}
|
||||
|
||||
currentValue = [listValue objectAtIndex:j];
|
||||
|
||||
if ((_item != nil) && (_displayString != nil)) {
|
||||
|
|
|
@ -230,7 +230,7 @@ RCS_ID("$Id$")
|
|||
{
|
||||
NSString* headerString=nil;
|
||||
NSString* requestString=nil;
|
||||
GSWApplication* application=[GSWApplication application];
|
||||
|
||||
NSString* requestURI=[_request uri];
|
||||
NSString* filePath= [_recordingPath stringByAppendingPathComponent:
|
||||
[NSString stringWithFormat:@"%0.6d-request",_recordingStep]];
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
RCS_ID("$Id$")
|
||||
|
||||
#include "GSWeb.h"
|
||||
#include "GSWPrivate.h"
|
||||
|
||||
static SEL prepareIterationSEL=NULL;
|
||||
static SEL objectAtIndexSEL = NULL;
|
||||
|
|
|
@ -109,10 +109,6 @@ Cf RFC 2616 (http://www.rfc-editor.org/rfc/rfc2616.txt)
|
|||
-(NSString*)referer;//NDFN
|
||||
-(NSString*)description;
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWRequest (GSWFormValueReporting)
|
||||
|
||||
-(void)setDefaultFormValueEncoding:(NSStringEncoding)encoding;
|
||||
-(NSStringEncoding)defaultFormValueEncoding;
|
||||
|
@ -135,22 +131,13 @@ Cf RFC 2616 (http://www.rfc-editor.org/rfc/rfc2616.txt)
|
|||
forKey:(NSString*)key;
|
||||
-(void)appendFormValues:(NSArray*)values
|
||||
forKey:(NSString*)key;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWRequest (GSWURIElementReporting)
|
||||
-(NSArray*)uriElementKeys;
|
||||
-(NSString*)uriElementForKey:(NSString*)key;
|
||||
-(NSDictionary*)uriElements;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWRequest (GSWRequestTypeReporting)
|
||||
-(BOOL)isFromClientComponent;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWRequest (Cookies)
|
||||
|
||||
//NDFN
|
||||
-(void)setCookieFromHeaders;
|
||||
|
@ -162,10 +149,6 @@ Cf RFC 2616 (http://www.rfc-editor.org/rfc/rfc2616.txt)
|
|||
-(NSDictionary*)_initCookieDictionary;
|
||||
-(NSString*)_cookieDescription;
|
||||
|
||||
@end
|
||||
//====================================================================
|
||||
@interface GSWRequest (GSWRequestA)
|
||||
|
||||
-(NSString*)sessionIDFromValuesOrCookieByLookingForCookieFirst:(BOOL)lookCookieFirst;
|
||||
-(NSString*)sessionID;
|
||||
-(NSString*)requestHandlerPath;
|
||||
|
@ -174,24 +157,18 @@ Cf RFC 2616 (http://www.rfc-editor.org/rfc/rfc2616.txt)
|
|||
-(int)applicationNumber;
|
||||
-(NSString*)requestHandlerKey;
|
||||
|
||||
@end
|
||||
//====================================================================
|
||||
@interface GSWRequest (GSWRequestB)
|
||||
-(NSDictionary*)_extractValuesFromFormData:(NSData*)formData
|
||||
withEncoding:(NSStringEncoding)encoding;
|
||||
-(NSStringEncoding)_formValueEncodingFromFormData:(NSData*)formData;
|
||||
-(NSData*)_formData;
|
||||
-(NSString*)_contentType;
|
||||
-(NSString*)_urlQueryString;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWRequest (GSWRequestF)
|
||||
-(BOOL)_isUsingWebServer;
|
||||
-(BOOL)isUsingWebServer;
|
||||
|
||||
-(void)_setIsUsingWebServer:(BOOL)_flag;
|
||||
@end
|
||||
//====================================================================
|
||||
@interface GSWRequest (GSWRequestG)
|
||||
|
||||
-(BOOL)_isSessionIDInRequest;
|
||||
-(BOOL)_isSessionIDInCookies;
|
||||
-(BOOL)_isSessionIDInFormValues;
|
||||
|
@ -216,21 +193,14 @@ Cf RFC 2616 (http://www.rfc-editor.org/rfc/rfc2616.txt)
|
|||
+(BOOL)_lookForIDsInCookiesFirst;
|
||||
-(BOOL)_hasFormValues;
|
||||
|
||||
@end
|
||||
//====================================================================
|
||||
@interface GSWRequest (GSWRequestH)
|
||||
-(void)_getFormValuesFromMultipartFormData;
|
||||
-(NSArray*)_decodeMultipartBody:(NSData*)body
|
||||
boundary:(NSString*)boundary;
|
||||
-(NSArray*)_parseData:(NSData*)data;
|
||||
-(NSDictionary*)_parseOneHeader:(NSString*)header;
|
||||
@end
|
||||
//====================================================================
|
||||
@interface GSWRequest (GSWRequestI)
|
||||
|
||||
-(id)nonNilFormValueForKey:(NSString*)key;
|
||||
@end
|
||||
//====================================================================
|
||||
@interface GSWRequest (GSWRequestJ)
|
||||
|
||||
-(id)dictionaryWithKeys:(id)unknown;
|
||||
-(NSString*)selectedButtonName;
|
||||
-(id)valueFromImageMapNamed:(NSString*)aName;
|
||||
|
@ -240,9 +210,7 @@ Cf RFC 2616 (http://www.rfc-editor.org/rfc/rfc2616.txt)
|
|||
-(id)yCoord;
|
||||
-(id)xCoord;
|
||||
-(id)formKeyWithSuffix:(NSString*)suffix;
|
||||
@end
|
||||
//====================================================================
|
||||
@interface GSWRequest (GSWRequestK)
|
||||
|
||||
-(NSString*)applicationHost;
|
||||
-(NSString*)pageName;
|
||||
-(NSString*)contextID;
|
||||
|
@ -251,11 +219,8 @@ Cf RFC 2616 (http://www.rfc-editor.org/rfc/rfc2616.txt)
|
|||
-(NSDictionary*)uriOrFormOrCookiesElementsByLookingForCookieFirst:(BOOL)lookCookieFirst;
|
||||
-(id)uriOrFormOrCookiesElementForKey:(NSString*)key
|
||||
byLookingForCookieFirst:(BOOL)lookCookieFirst;
|
||||
-(NSMutableDictionary*)uriOrFormOrCookiesElements;
|
||||
-(NSMutableDictionary*)_uriElements;
|
||||
@end
|
||||
//====================================================================
|
||||
@interface GSWRequest (GSWRequestL)
|
||||
-(NSDictionary*)uriOrFormOrCookiesElements;
|
||||
|
||||
-(void)_validateAPI;
|
||||
@end
|
||||
|
||||
|
|
|
@ -182,10 +182,16 @@ RCS_ID("$Id$")
|
|||
return NSOrderedDescending;
|
||||
else
|
||||
return NSOrderedSame;
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface GSWRequest (Internal)
|
||||
|
||||
-(NSDictionary*)_uriElements;
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWRequest
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -1252,7 +1258,7 @@ RCS_ID("$Id$")
|
|||
int allKeysCount=0;
|
||||
|
||||
|
||||
#warning we should use ACSII encoding here? dave@turbocat.de
|
||||
// CHECKME: we should use ACSII encoding here? dave@turbocat.de
|
||||
// according to the the standard http://www.w3.org/International/O-URL-code.html,
|
||||
// URIs are encoded in NSASCIIStringEncoding with escape sequences cooresponding
|
||||
// to the hexadecimal value of the UTF-8 encoding. Therefore the encoding should
|
||||
|
@ -1365,16 +1371,17 @@ RCS_ID("$Id$")
|
|||
return _isUsingWebServer;
|
||||
}
|
||||
|
||||
// this is legal at least in some versions of WO. -- dw
|
||||
-(BOOL)isUsingWebServer
|
||||
{
|
||||
return _isUsingWebServer;
|
||||
}
|
||||
|
||||
-(void)_setIsUsingWebServer:(BOOL)flag
|
||||
{
|
||||
_isUsingWebServer=flag;
|
||||
}
|
||||
|
||||
-(BOOL) isUsingWebServer
|
||||
{
|
||||
return _isUsingWebServer;
|
||||
}
|
||||
|
||||
-(void)setIsUsingWebServer:(BOOL)flag
|
||||
{
|
||||
_isUsingWebServer=flag;
|
||||
|
|
|
@ -35,6 +35,7 @@ RCS_ID("$Id$")
|
|||
|
||||
#include "GSWeb.h"
|
||||
|
||||
static NSString * emptyStr=@"";
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWResourceManager
|
||||
|
@ -490,7 +491,7 @@ NSString* localNotFoundMarker=@"NOTFOUND";
|
|||
if (!WOStrictFlag && [aFrameworkName isEqualToString:GSWFramework_all])
|
||||
{
|
||||
frameworks=[_frameworkProjectBundlesCache allKeys];
|
||||
frameworks=[frameworks arrayByAddingObject:@""];
|
||||
frameworks=[frameworks arrayByAddingObject:emptyStr];
|
||||
}
|
||||
count=[languages count];
|
||||
frameworksCount=[frameworks count];
|
||||
|
@ -546,10 +547,10 @@ NSString* localNotFoundMarker=@"NOTFOUND";
|
|||
if (!WOStrictFlag && [aFrameworkName isEqualToString:GSWFramework_all])
|
||||
{
|
||||
frameworks=[_frameworkProjectBundlesCache allKeys];
|
||||
frameworks=[frameworks arrayByAddingObject:@""];
|
||||
frameworks=[frameworks arrayByAddingObject:emptyStr];
|
||||
}
|
||||
else
|
||||
frameworks=[NSArray arrayWithObject:aFrameworkName ? aFrameworkName : @""];
|
||||
frameworks = [NSArray arrayWithObject:aFrameworkName ? aFrameworkName : emptyStr];
|
||||
|
||||
frameworksCount=[frameworks count];
|
||||
|
||||
|
@ -630,10 +631,10 @@ NSString* localNotFoundMarker=@"NOTFOUND";
|
|||
if (!WOStrictFlag && [aFrameworkName isEqualToString:GSWFramework_all])
|
||||
{
|
||||
frameworks=[_frameworkProjectBundlesCache allKeys];
|
||||
frameworks=[frameworks arrayByAddingObject:@""];
|
||||
frameworks=[frameworks arrayByAddingObject:emptyStr];
|
||||
}
|
||||
else
|
||||
frameworks=[NSArray arrayWithObject:aFrameworkName ? aFrameworkName : @""];
|
||||
frameworks=[NSArray arrayWithObject:aFrameworkName ? aFrameworkName : emptyStr];
|
||||
|
||||
frameworksCount=[frameworks count];
|
||||
|
||||
|
@ -775,10 +776,10 @@ NSString* localNotFoundMarker=@"NOTFOUND";
|
|||
if (!WOStrictFlag && [aFrameworkName isEqualToString:GSWFramework_all])
|
||||
{
|
||||
frameworks=[_frameworkProjectBundlesCache allKeys];
|
||||
frameworks=[frameworks arrayByAddingObject:@""];
|
||||
frameworks=[frameworks arrayByAddingObject:emptyStr];
|
||||
}
|
||||
else
|
||||
frameworks=[NSArray arrayWithObject:aFrameworkName ? aFrameworkName : @""];
|
||||
frameworks=[NSArray arrayWithObject:aFrameworkName ? aFrameworkName : emptyStr];
|
||||
|
||||
frameworksCount=[frameworks count];
|
||||
|
||||
|
@ -840,7 +841,7 @@ NSString* localNotFoundMarker=@"NOTFOUND";
|
|||
{
|
||||
frameworkDict=(NSMutableDictionary*)[NSMutableDictionary dictionary];
|
||||
if (!aFrameworkName)
|
||||
aFrameworkName=@"";//Global
|
||||
aFrameworkName=emptyStr;//Global
|
||||
[_stringsTablesByFrameworkByLanguageByName setObject:frameworkDict
|
||||
forKey:aFrameworkName];
|
||||
};
|
||||
|
@ -849,7 +850,7 @@ NSString* localNotFoundMarker=@"NOTFOUND";
|
|||
{
|
||||
languageDict=(NSMutableDictionary*)[NSMutableDictionary dictionary];
|
||||
if (!aLanguage)
|
||||
aLanguage=@"";
|
||||
aLanguage=emptyStr;
|
||||
[frameworkDict setObject:languageDict
|
||||
forKey:aLanguage];
|
||||
};
|
||||
|
@ -894,10 +895,10 @@ NSString* localNotFoundMarker=@"NOTFOUND";
|
|||
if (!WOStrictFlag && [aFrameworkName isEqualToString:GSWFramework_all])
|
||||
{
|
||||
frameworks=[_frameworkProjectBundlesCache allKeys];
|
||||
frameworks=[frameworks arrayByAddingObject:@""];
|
||||
frameworks=[frameworks arrayByAddingObject:emptyStr];
|
||||
}
|
||||
else
|
||||
frameworks=[NSArray arrayWithObject:aFrameworkName ? aFrameworkName : @""];
|
||||
frameworks=[NSArray arrayWithObject:aFrameworkName ? aFrameworkName : emptyStr];
|
||||
|
||||
frameworksCount=[frameworks count];
|
||||
|
||||
|
@ -955,7 +956,7 @@ NSString* localNotFoundMarker=@"NOTFOUND";
|
|||
{
|
||||
frameworkDict=(NSMutableDictionary*)[NSMutableDictionary dictionary];
|
||||
if (!aFrameworkName)
|
||||
aFrameworkName=@"";//Global
|
||||
aFrameworkName=emptyStr;//Global
|
||||
[_stringsTableArraysByFrameworkByLanguageByName setObject:frameworkDict
|
||||
forKey:aFrameworkName];
|
||||
};
|
||||
|
@ -964,7 +965,7 @@ NSString* localNotFoundMarker=@"NOTFOUND";
|
|||
{
|
||||
languageDict=(NSMutableDictionary*)[NSMutableDictionary dictionary];
|
||||
if (!aLanguage)
|
||||
aLanguage=@"";
|
||||
aLanguage=emptyStr;
|
||||
[frameworkDict setObject:languageDict
|
||||
forKey:aLanguage];
|
||||
};
|
||||
|
@ -1053,10 +1054,10 @@ NSString* localNotFoundMarker=@"NOTFOUND";
|
|||
if (!WOStrictFlag && [aFrameworkName isEqualToString:GSWFramework_all])
|
||||
{
|
||||
frameworks=[_frameworkProjectBundlesCache allKeys];
|
||||
frameworks=[frameworks arrayByAddingObject:@""];
|
||||
frameworks=[frameworks arrayByAddingObject:emptyStr];
|
||||
}
|
||||
else
|
||||
frameworks=[NSArray arrayWithObject:aFrameworkName ? aFrameworkName : @""];
|
||||
frameworks=[NSArray arrayWithObject:aFrameworkName ? aFrameworkName : emptyStr];
|
||||
|
||||
frameworksCount=[frameworks count];
|
||||
|
||||
|
@ -1104,10 +1105,10 @@ NSString* localNotFoundMarker=@"NOTFOUND";
|
|||
if (!WOStrictFlag && [aFrameworkName isEqualToString:GSWFramework_all])
|
||||
{
|
||||
frameworks=[_frameworkProjectBundlesCache allKeys];
|
||||
frameworks=[frameworks arrayByAddingObject:@""];
|
||||
frameworks=[frameworks arrayByAddingObject:emptyStr];
|
||||
}
|
||||
else
|
||||
frameworks=[NSArray arrayWithObject:aFrameworkName ? aFrameworkName : @""];
|
||||
frameworks=[NSArray arrayWithObject:aFrameworkName ? aFrameworkName : emptyStr];
|
||||
NSDebugMLLog(@"resmanager",@"frameworks=%@",frameworks);
|
||||
|
||||
frameworksCount=[frameworks count];
|
||||
|
@ -1378,10 +1379,10 @@ bundle if none is found
|
|||
if (!WOStrictFlag && [aFrameworkName isEqualToString:GSWFramework_all])
|
||||
{
|
||||
frameworks=[_frameworkProjectBundlesCache allKeys];
|
||||
frameworks=[frameworks arrayByAddingObject:@""];
|
||||
frameworks=[frameworks arrayByAddingObject:emptyStr];
|
||||
}
|
||||
else
|
||||
frameworks=[NSArray arrayWithObject:aFrameworkName ? aFrameworkName : @""];
|
||||
frameworks=[NSArray arrayWithObject:aFrameworkName ? aFrameworkName : emptyStr];
|
||||
|
||||
frameworksCount=[frameworks count];
|
||||
|
||||
|
@ -1458,11 +1459,11 @@ bundle if none is found
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)_absolutePathForJavaClassPath:(NSString*)path
|
||||
-(NSString *) _absolutePathForJavaClassPath:(NSString*)path
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWURLValuedElementData*)_cachedDataForKey:(NSString*)key
|
||||
|
|
|
@ -34,14 +34,10 @@
|
|||
|
||||
@interface GSWResourceURL: GSWHTMLURLValuedElement
|
||||
-(NSString*)elementName;
|
||||
@end
|
||||
|
||||
@interface GSWResourceURL (GSWResourceURLA)
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)context;
|
||||
-(NSString*)valueAttributeName;
|
||||
-(NSString*)urlAttributeName;
|
||||
+(BOOL)hasGSWebObjectsAssociations;
|
||||
|
||||
@end
|
||||
|
||||
#endif // _GSWResourceURL_h__
|
||||
|
|
|
@ -48,20 +48,6 @@ RCS_ID("$Id$")
|
|||
return nil;
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWResourceURL (GSWResourceURLA)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)context
|
||||
{
|
||||
LOGObjectFnStartC("GSWResourceURL");
|
||||
[self appendURLToResponse:response
|
||||
inContext:context];
|
||||
LOGObjectFnStopC("GSWResourceURL");
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)valueAttributeName
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
@class GSWContext;
|
||||
@class GSWRequest;
|
||||
|
||||
#include "GSWMessage.h"
|
||||
|
||||
typedef struct _GSWResponseIMPs
|
||||
{
|
||||
// Instance IMPs
|
||||
|
|
|
@ -93,7 +93,7 @@ RCS_ID("$Id$")
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
/** Should be Locked **/
|
||||
-(id)restoreSessionWithID:(NSString*)aSessionID
|
||||
-(GSWSession*)restoreSessionWithID:(NSString*)aSessionID
|
||||
request:(GSWRequest*)aRequest
|
||||
{
|
||||
GSWSession* session=nil;
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
#ifndef _GSWSession_h__
|
||||
#define _GSWSession_h__
|
||||
|
||||
@class EOEditingContext;
|
||||
|
||||
@interface GSWSession : NSObject <NSCoding,NSCopying>
|
||||
{
|
||||
@private
|
||||
|
|
|
@ -1592,6 +1592,35 @@ Returns first element of languages or nil if languages is empty
|
|||
_isAllowedToViewEvents=flag;
|
||||
};
|
||||
|
||||
-(void) _clearCookieFromResponse:(GSWResponse*) aResponse
|
||||
{
|
||||
NSString *cookiePath = [self domainForIDCookies];
|
||||
NSCalendarDate *today = [NSCalendarDate date];
|
||||
GSWCookie * instanceCookie;
|
||||
GSWCookie * sessionIDCookie;
|
||||
|
||||
NSCalendarDate *dateInThePast = [today dateByAddingYears:0 months:-1 days:0 hours:0 minutes:0 seconds:0];
|
||||
|
||||
sessionIDCookie = [GSWCookie cookieWithName:[GSWApp sessionIdKey]
|
||||
value:_sessionID
|
||||
path:cookiePath
|
||||
domain:nil
|
||||
expires:dateInThePast
|
||||
isSecure:NO];
|
||||
|
||||
[aResponse addCookie:sessionIDCookie];
|
||||
|
||||
instanceCookie = [GSWCookie cookieWithName:[GSWApp instanceIdKey]
|
||||
value:@"-1"
|
||||
path:cookiePath
|
||||
domain:nil
|
||||
expires:dateInThePast
|
||||
isSecure:NO];
|
||||
|
||||
[aResponse addCookie:instanceCookie];
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)validateEventsLogin:(NSString*)login
|
||||
withPassword:(NSString*)password
|
||||
|
|
|
@ -114,7 +114,7 @@ RCS_ID("$Id$")
|
|||
BOOL isCheckedOut = YES;
|
||||
|
||||
GSWSessionTimeOut* entry = [_timeOutManager sessionTimeOutForSessionID:aSessionID];
|
||||
int expirationTime=(int)[entry sessionTimeOutValue];//seconds
|
||||
//int expirationTime=(int)[entry sessionTimeOutValue];//seconds
|
||||
|
||||
isCheckedOut=[entry isCheckedOut]; // See if session is used
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
timeOut:(NSTimeInterval)timeOut;
|
||||
-(void)handleTimer:(NSTimer*)timer;
|
||||
-(NSTimer*)resetTimer;
|
||||
-(void)addTimer:(id)timer;
|
||||
-(void)addTimer:(NSTimer*)timer;
|
||||
-(void)removeCallBack;
|
||||
-(void)setCallBack:(SEL)callback
|
||||
target:(id)target;
|
||||
|
@ -70,3 +70,4 @@
|
|||
|
||||
@end
|
||||
#endif //_GSWSessionTimeOutManager_h__
|
||||
|
||||
|
|
|
@ -220,7 +220,7 @@ RCS_ID("$Id$")
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)handleTimer:(id)aTimer
|
||||
-(void)handleTimer:(NSTimer*)aTimer
|
||||
{
|
||||
//OK
|
||||
BOOL requestHandlingLocked=NO;
|
||||
|
@ -479,13 +479,8 @@ RCS_ID("$Id$")
|
|||
//--------------------------------------------------------------------
|
||||
-(void)addTimer:(NSTimer*)timer
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"sessions",@"timer=%@",timer);
|
||||
NSDebugMLLog(@"sessions",@"timer fireDate=%@",[timer fireDate]);
|
||||
NSDebugMLLog(@"sessions",@"timer tisn=%f",[[timer fireDate]timeIntervalSinceNow]);
|
||||
[GSWApp addTimer:timer];
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)removeCallBack
|
||||
|
|
|
@ -753,14 +753,11 @@ RCS_ID("$Id$")
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void) setLogFile:(id)logFile
|
||||
rotationFrequencyInDays:(double)rotationFrequency
|
||||
-(void) setLogFile:(NSString *)logFile rotationFrequencyInDays:(NSTimeInterval)rotationFrequency
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
ASSIGN(_logPath,logFile);
|
||||
_logRotation=rotationFrequency;
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(NSString*)formatDescription:(NSString*)description
|
||||
|
|
|
@ -84,8 +84,8 @@ static Class standardClass = Nil;
|
|||
} else {
|
||||
_shouldFormat = NO;
|
||||
}
|
||||
if ((_dateFormat != nil) && (_numberFormat != nil) || (_formatter != nil) &&
|
||||
(_dateFormat != nil) || (_formatter != nil) && (_numberFormat != nil)) {
|
||||
if (((_dateFormat != nil) && (_numberFormat != nil)) || ((_formatter != nil) &&
|
||||
(_dateFormat != nil)) || ((_formatter != nil) && (_numberFormat != nil))) {
|
||||
|
||||
[NSException raise:NSInvalidArgumentException
|
||||
format:@"%s: Cannot have 'dateFormat' and 'numberFormat' attributes at the same time.",
|
||||
|
@ -165,7 +165,6 @@ static Class standardClass = Nil;
|
|||
GSWComponent* component = GSWContext_component(context);
|
||||
NSString* formattedValue=nil;
|
||||
id valueValue = nil;
|
||||
NSString * errorDscr = nil;
|
||||
BOOL flag = YES;
|
||||
|
||||
if (_value != nil) {
|
||||
|
|
|
@ -73,12 +73,11 @@ RCS_ID("$Id$")
|
|||
-(NSString*)elementName
|
||||
{
|
||||
return @"textarea";
|
||||
};
|
||||
}
|
||||
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)context
|
||||
{
|
||||
id resultValue = nil;
|
||||
|
||||
GSWComponent * component = GSWContext_component(context);
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ RCS_ID("$Id$")
|
|||
reason:errorDscr
|
||||
userInfo:[NSDictionary
|
||||
dictionaryWithObjectsAndKeys:
|
||||
(resultValue ? resultValue : @"nil"),@"EOValidatedObjectUserInfoKey",
|
||||
(resultValue ? resultValue : (id)@"nil"), @"EOValidatedObjectUserInfoKey",
|
||||
valueKeyPath,@"EOValidatedPropertyUserInfoKey",
|
||||
nil,nil]];
|
||||
[component validationFailedWithException:exception
|
||||
|
|
|
@ -49,6 +49,43 @@ static Class NSStringClass = Nil;
|
|||
}
|
||||
}
|
||||
|
||||
// checkme if 0 is the right value in GSW for unused applicationNumber
|
||||
// checkme: does this exists in WO4.5?
|
||||
// dataURL
|
||||
- (NSString*) dataURLInContext:(GSWContext *) context
|
||||
{
|
||||
int appNr = 0;
|
||||
NSString * appNrStr = nil;
|
||||
GSWDynamicURLString * url = nil;
|
||||
GSWDynamicURLString * url2 = nil;
|
||||
NSMutableString * myStr = [NSMutableString stringWithCapacity:80];
|
||||
|
||||
NSLog(@"is this code ever used? -- dw (%s)",__PRETTY_FUNCTION__ );
|
||||
|
||||
|
||||
[myStr appendString: GSWKey_Data[GSWebNamingConv]]; //wodata
|
||||
[myStr appendString:@"="];
|
||||
[myStr appendString:[[self key] encodeURL]];
|
||||
|
||||
appNr = [[context request] applicationNumber];
|
||||
if (appNr > 0) {
|
||||
url = [context _url];
|
||||
appNrStr = [url applicationNumber];
|
||||
// with our current URLString it is a bit waste of time but that is how others to it.
|
||||
[url setApplicationNumber: GSWIntToNSString(appNr)];
|
||||
}
|
||||
|
||||
url2 = [context urlWithRequestHandlerKey:[[GSWApp class] resourceRequestHandlerKey]
|
||||
path: nil
|
||||
queryString: myStr];
|
||||
|
||||
if (appNr > 0) {
|
||||
[url setApplicationNumber:appNrStr];
|
||||
}
|
||||
return url2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+ (NSString*) _dataURLInContext: (GSWContext*) context
|
||||
key:(GSWAssociation*) key
|
||||
|
@ -118,40 +155,6 @@ static Class NSStringClass = Nil;
|
|||
GSWResponse_appendTagAttributeValueEscapingHTMLAttributeValue(response, urlAttribute, dataURL, NO);
|
||||
}
|
||||
|
||||
// checkme if 0 is the right value in GSW for unused applicationNumber
|
||||
|
||||
// dataURL
|
||||
- (NSString*) dataURLInContext:(GSWContext *) context
|
||||
{
|
||||
int appNr = 0;
|
||||
NSString * appNrStr = nil;
|
||||
GSWDynamicURLString * url = nil;
|
||||
GSWDynamicURLString * url2 = nil;
|
||||
NSMutableString * myStr = [NSMutableString stringWithCapacity:80];
|
||||
|
||||
[myStr appendString: GSWKey_Data[GSWebNamingConv]]; //wodata
|
||||
[myStr appendString:@"="];
|
||||
[myStr appendString:[[self key] encodeURL]];
|
||||
|
||||
appNr = [[context request] applicationNumber];
|
||||
if (appNr > 0) {
|
||||
url = [context _url];
|
||||
appNrStr = [url applicationNumber];
|
||||
// with our current URLString it is a bit waste of time but that is how others to it.
|
||||
[url setApplicationNumber: GSWIntToNSString(appNr)];
|
||||
}
|
||||
|
||||
url2 = [context urlWithRequestHandlerKey:[GSWApp resourceRequestHandlerKey]
|
||||
path: nil
|
||||
queryString: myStr];
|
||||
|
||||
if (appNr > 0) {
|
||||
[url setApplicationNumber:appNrStr];
|
||||
}
|
||||
return url2;
|
||||
}
|
||||
|
||||
|
||||
-(id)initWithData:(NSData*)data
|
||||
mimeType:(NSString*)type
|
||||
key:(NSString*)key
|
||||
|
|
|
@ -135,6 +135,12 @@ void GSWInitializeAllMisc()
|
|||
NSMapInsert(encodingsByName,
|
||||
@"NSNonLossyASCIIStringEncoding",
|
||||
(const void*)NSNonLossyASCIIStringEncoding);
|
||||
|
||||
// we might need this for compatibility. -- dw
|
||||
NSMapInsert(encodingsByName,
|
||||
@"UTF-8",
|
||||
(const void*)NSUTF8StringEncoding);
|
||||
|
||||
NSMapInsert(encodingsByName,
|
||||
@"NSUTF8StringEncoding",
|
||||
(const void*)NSUTF8StringEncoding);
|
||||
|
@ -2110,7 +2116,9 @@ NSString* NSStringWithObject(id object)
|
|||
if (object)
|
||||
{
|
||||
if ([object isKindOfClass:nsMutableStringClass])
|
||||
string=AUTORELEASE([object copy]);
|
||||
// why wasting memory? -- dw
|
||||
// string=AUTORELEASE([object copy]);
|
||||
string=(NSString*)object;
|
||||
else if ([object isKindOfClass:nsStringClass])
|
||||
string=(NSString*)object;
|
||||
#ifdef HAVE_GDL2
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "GSWWorkerThread.h"
|
||||
|
||||
|
||||
#include "GSWPrivate.h"
|
||||
#include "GSWDefines.h"
|
||||
#include "GSWConstants.h"
|
||||
#include "GSWUtils.h"
|
||||
|
@ -42,7 +43,7 @@
|
|||
#include "GSWResponse.h"
|
||||
#include "GSWHTTPIO.h"
|
||||
|
||||
static NSData* lineFeedData=nil;
|
||||
//static NSData* lineFeedData=nil;
|
||||
static NSString *REQUEST_ID = @"x-webobjects-request-id";
|
||||
|
||||
@interface NSThread (WeKnowWhatWeDo)
|
||||
|
@ -129,7 +130,6 @@ static NSString *REQUEST_ID = @"x-webobjects-request-id";
|
|||
-(void)runOnce
|
||||
{
|
||||
GSWRequest *request = nil;
|
||||
BOOL ok = NO;
|
||||
struct timeval timeout;
|
||||
GSWResponse *response;
|
||||
|
||||
|
@ -178,9 +178,9 @@ static NSString *REQUEST_ID = @"x-webobjects-request-id";
|
|||
}
|
||||
NS_DURING {
|
||||
// request = [GSWHTTPIO readRequestFromFromHandle: _serverSocket];
|
||||
ok = [GSWHTTPIO sendResponse:response
|
||||
toHandle: _serverSocket
|
||||
request:request];
|
||||
[GSWHTTPIO sendResponse:response
|
||||
toHandle: _serverSocket
|
||||
request:request];
|
||||
} NS_HANDLER {
|
||||
NSLog(@"%s -- Exception while sending response: %@",
|
||||
__PRETTY_FUNCTION__, [localException description]);
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
|
||||
@interface NSDictionary (HTML)
|
||||
- (NSString*) encodeAsCGIFormValues;
|
||||
- (NSString*) encodeAsCGIFormValuesEscpaeAmpersand:(BOOL) doEscapeAmpersand;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -37,9 +37,8 @@ RCS_ID("$Id: GSWDynamicGroup.m,v 1.17 2004/12/31 14:33:16 mguesdon Exp $")
|
|||
|
||||
//====================================================================
|
||||
|
||||
static Class NSDictionaryClass = Nil;
|
||||
static Class NSArrayClass = Nil;
|
||||
|
||||
//static Class NSDictionaryClass = Nil;
|
||||
//static Class NSArrayClass = Nil;
|
||||
|
||||
@implementation NSDictionary (GSWHTML)
|
||||
|
||||
|
@ -75,10 +74,10 @@ static NSMutableArray* _encodeAsCGIFormValuesInDictionaryUsingEncoding(NSDiction
|
|||
NSString * codeStr = nil;
|
||||
id obj = nil;
|
||||
|
||||
while (key = [enumer nextObject]) {
|
||||
while ((key = [enumer nextObject])) {
|
||||
obj = [dict objectForKey:key];
|
||||
codeStr = [key encodeURL]; // give encoding to method?
|
||||
if (subCodeStr = _encodeObjectAndKeyUsingEncoding(obj, codeStr, encoding)) {
|
||||
if ((subCodeStr = _encodeObjectAndKeyUsingEncoding(obj, codeStr, encoding))) {
|
||||
[array addObject: subCodeStr];
|
||||
}
|
||||
}
|
||||
|
@ -86,6 +85,26 @@ static NSMutableArray* _encodeAsCGIFormValuesInDictionaryUsingEncoding(NSDiction
|
|||
return array;
|
||||
}
|
||||
|
||||
// encodeAsCGIFormValues
|
||||
- (NSString*) encodeAsCGIFormValuesEscpaeAmpersand:(BOOL) doEscapeAmpersand
|
||||
{
|
||||
NSMutableArray * stringArray = nil;
|
||||
NSString * encodingStr = [self objectForKey:@"WOURLEncoding"];
|
||||
NSStringEncoding encoding = NSUTF8StringEncoding;
|
||||
|
||||
if (encodingStr) {
|
||||
encoding =[NSString encodingNamed:encodingStr];
|
||||
}
|
||||
|
||||
stringArray = _encodeAsCGIFormValuesInDictionaryUsingEncoding(self, encoding);
|
||||
|
||||
if (doEscapeAmpersand) {
|
||||
return [stringArray componentsJoinedByString:@"&"];
|
||||
}
|
||||
|
||||
return [stringArray componentsJoinedByString:@"&"];
|
||||
}
|
||||
|
||||
|
||||
// encodeAsCGIFormValues
|
||||
- (NSString*) encodeAsCGIFormValues
|
||||
|
|
|
@ -63,6 +63,7 @@ GSWEB_EXPORT NSString* baseStringByConvertingFromHTML(NSString* string,
|
|||
#define stringByEscapingHTMLString(string) \
|
||||
baseStringByConvertingToHTML(string,&htmlConvertHTMLString,NO)
|
||||
|
||||
|
||||
#define stringByEscapingHTMLAttributeValue(string) \
|
||||
baseStringByConvertingToHTML(string,&htmlConvertAttributeValueStruct,NO)
|
||||
|
||||
|
|
|
@ -30,7 +30,9 @@
|
|||
* - Added a missing 'quit' command for OSF dbx
|
||||
*
|
||||
************************************************************************/
|
||||
#ifndef USE_BUILTIN
|
||||
#define USE_BUILTIN
|
||||
#endif
|
||||
|
||||
#if defined(unix) || defined(__unix) || defined(__xlC__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
# define PLATFORM_UNIX
|
||||
|
@ -225,7 +227,7 @@ static void GCC_DumpStack(void)
|
|||
unsigned long highestAddress;
|
||||
unsigned long lowestAddress;
|
||||
char type;
|
||||
char *pname;
|
||||
//char *pname;
|
||||
char name[MAX_BUFFER_SIZE];
|
||||
int number;
|
||||
write(global_output,
|
||||
|
|
Loading…
Reference in a new issue