Mercurial > projects > dstep
diff dstep/foundation/NSURLAuthenticationChallenge.d @ 16:19885b43130e
Huge update, the bridge actually works now
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 03 Jan 2010 22:06:11 +0100 |
parents | 89f3c3ef1fd2 |
children | b9de51448c6b |
line wrap: on
line diff
--- a/dstep/foundation/NSURLAuthenticationChallenge.d Mon Aug 03 15:31:48 2009 +0200 +++ b/dstep/foundation/NSURLAuthenticationChallenge.d Sun Jan 03 22:06:11 2010 +0100 @@ -6,20 +6,29 @@ */ module dstep.foundation.NSURLAuthenticationChallenge; -import dstep.AvailabilityMacros; import dstep.foundation.NSError; +import dstep.foundation.NSObjCRuntime; import dstep.foundation.NSObject; -import dstep.foundation.NSURLAuthenticationChallengeInternal; import dstep.foundation.NSURLCredential; import dstep.foundation.NSURLProtectionSpace; import dstep.foundation.NSURLResponse; import dstep.objc.bridge.Bridge; -import dstep.objc.objc : id; +import dstep.objc.objc; class NSURLAuthenticationChallenge : NSObject { - mixin ObjcWrap; - + mixin (ObjcWrap); + + this () + { + super(typeof(this).alloc.init.objcObject); + } + + typeof(this) init () + { + return invokeObjcSelf!(typeof(this), "init"); + } + Object initWithProtectionSpace (NSURLProtectionSpace space, NSURLCredential credential, NSInteger previousFailureCount, NSURLResponse response, NSError error, INSURLAuthenticationChallengeSender sender) { return invokeObjcSelf!(Object, "initWithProtectionSpace:proposedCredential:previousFailureCount:failureResponse:error:sender:", NSURLProtectionSpace, NSURLCredential, NSInteger, NSURLResponse, NSError, INSURLAuthenticationChallengeSender)(space, credential, previousFailureCount, response, error, sender); @@ -31,7 +40,7 @@ id result = Bridge.invokeObjcMethod!(id, "initWithProtectionSpace:proposedCredential:previousFailureCount:failureResponse:error:sender:", NSURLProtectionSpace, NSURLCredential, NSInteger, NSURLResponse, NSError, INSURLAuthenticationChallengeSender)(objcObject, space, credential, previousFailureCount, response, error, sender); if (result) - objcObject = ret; + objcObject = result; dObject = this; } @@ -47,7 +56,7 @@ id result = Bridge.invokeObjcMethod!(id, "initWithAuthenticationChallenge:sender:", NSURLAuthenticationChallenge, INSURLAuthenticationChallengeSender)(objcObject, challenge, sender); if (result) - objcObject = ret; + objcObject = result; dObject = this; }