diff dstep/foundation/NSURLCredentialStorage.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 7ff919f595d5
children b9de51448c6b
line wrap: on
line diff
--- a/dstep/foundation/NSURLCredentialStorage.d	Mon Aug 03 15:31:48 2009 +0200
+++ b/dstep/foundation/NSURLCredentialStorage.d	Sun Jan 03 22:06:11 2010 +0100
@@ -6,32 +6,45 @@
  */
 module dstep.foundation.NSURLCredentialStorage;
 
-import dstep.AvailabilityMacros;
 import dstep.foundation.NSDictionary;
 import dstep.foundation.NSObject;
 import dstep.foundation.NSString;
 import dstep.foundation.NSURLCredential;
-import dstep.foundation.NSURLCredentialStorageInternal;
 import dstep.foundation.NSURLProtectionSpace;
 import dstep.objc.bridge.Bridge;
-import dstep.objc.objc : id;
+import dstep.objc.objc;
+
+
 
 import bindings = dstep.foundation.NSURLCredentialStorage_bindings;
 
-const NSString NSURLCredentialStorageChangedNotification;
+private NSString NSURLCredentialStorageChangedNotification_;
 
-static this ()
+NSString NSURLCredentialStorageChangedNotification ()
 {
-	NSURLCredentialStorageChangedNotification = new NSString(bindings.NSURLCredentialStorageChangedNotification);
+	if (NSURLCredentialStorageChangedNotification_)
+		return NSURLCredentialStorageChangedNotification_;
+	
+	return NSURLCredentialStorageChangedNotification_ = new NSString(bindings.NSURLCredentialStorageChangedNotification);
 }
 
 class NSURLCredentialStorage : NSObject
 {
-	mixin ObjcWrap;
+	mixin (ObjcWrap);
+	
+	this ()
+	{
+		super(typeof(this).alloc.init.objcObject);
+	}
+	
+	typeof(this) init ()
+	{
+		return invokeObjcSelf!(typeof(this), "init");
+	}
 
 	static NSURLCredentialStorage sharedCredentialStorage ()
 	{
-		return invokeObjcSelfClass!(NSURLCredentialStorage, "sharedCredentialStorage");
+		return invokeObjcSuperClass!(NSURLCredentialStorage, "sharedCredentialStorage");
 	}
 
 	NSDictionary credentialsForProtectionSpace (NSURLProtectionSpace space)