diff dwt/internal/cocoa/NSURLCache.d @ 1:8b48be5454ce

The internal cocoa classes compile now
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Tue, 19 Aug 2008 17:35:17 +0200
parents 380af2bdd8e5
children f565d3a95c0a
line wrap: on
line diff
--- a/dwt/internal/cocoa/NSURLCache.d	Sat Aug 09 17:00:02 2008 +0200
+++ b/dwt/internal/cocoa/NSURLCache.d	Tue Aug 19 17:35:17 2008 +0200
@@ -22,7 +22,7 @@
 import dwt.internal.cocoa.OS;
 import objc = dwt.internal.objc.runtime;
 
-enum NSURLCacheStoragePolicy
+enum NSURLCacheStoragePolicy : NSUInteger
 {
     NSURLCacheStorageAllowed,
     NSURLCacheStorageAllowedInMemoryOnly,
@@ -48,60 +48,60 @@
 
     public NSCachedURLResponse cachedResponseForRequest (NSURLRequest request)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_cachedResponseForRequest_1, request !is null ? request.id : null);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_cachedResponseForRequest_1, request !is null ? request.id_ : null);
         return result !is null ? new NSCachedURLResponse(result) : null;
     }
 
     public NSUInteger currentDiskUsage ()
     {
-        return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_currentDiskUsage);
+        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_currentDiskUsage);
     }
 
     public NSUInteger currentMemoryUsage ()
     {
-        return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_currentMemoryUsage);
+        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_currentMemoryUsage);
     }
 
     public NSUInteger diskCapacity ()
     {
-        return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_diskCapacity);
+        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_diskCapacity);
     }
 
     public id initWithMemoryCapacity (NSUInteger memoryCapacity, NSUInteger diskCapacity, NSString path)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithMemoryCapacity_1diskCapacity_1diskPath_1, memoryCapacity, diskCapacity,
-                path !is null ? path.id : null);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithMemoryCapacity_1diskCapacity_1diskPath_1, memoryCapacity, diskCapacity,
+                path !is null ? path.id_ : null);
         return result !is null ? new id(result) : null;
     }
 
     public NSUInteger memoryCapacity ()
     {
-        return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_memoryCapacity);
+        return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_memoryCapacity);
     }
 
     public void removeAllCachedResponses ()
     {
-        OS.objc_msgSend(this.id, OS.sel_removeAllCachedResponses);
+        OS.objc_msgSend(this.id_, OS.sel_removeAllCachedResponses);
     }
 
     public void removeCachedResponseForRequest (NSURLRequest request)
     {
-        OS.objc_msgSend(this.id, OS.sel_removeCachedResponseForRequest_1, request !is null ? request.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_removeCachedResponseForRequest_1, request !is null ? request.id_ : null);
     }
 
     public void setDiskCapacity (NSUInteger diskCapacity)
     {
-        OS.objc_msgSend(this.id, OS.sel_setDiskCapacity_1, diskCapacity);
+        OS.objc_msgSend(this.id_, OS.sel_setDiskCapacity_1, diskCapacity);
     }
 
     public void setMemoryCapacity (NSUInteger memoryCapacity)
     {
-        OS.objc_msgSend(this.id, OS.sel_setMemoryCapacity_1, memoryCapacity);
+        OS.objc_msgSend(this.id_, OS.sel_setMemoryCapacity_1, memoryCapacity);
     }
 
     public static void setSharedURLCache (NSURLCache cache)
     {
-        OS.objc_msgSend(OS.class_NSURLCache, OS.sel_setSharedURLCache_1, cache !is null ? cache.id : null);
+        OS.objc_msgSend(OS.class_NSURLCache, OS.sel_setSharedURLCache_1, cache !is null ? cache.id_ : null);
     }
 
     public static NSURLCache sharedURLCache ()
@@ -112,8 +112,8 @@
 
     public void storeCachedResponse (NSCachedURLResponse cachedResponse, NSURLRequest request)
     {
-        OS.objc_msgSend(this.id, OS.sel_storeCachedResponse_1forRequest_1, cachedResponse !is null ? cachedResponse.id : null,
-                request !is null ? request.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_storeCachedResponse_1forRequest_1, cachedResponse !is null ? cachedResponse.id_ : null,
+                request !is null ? request.id_ : null);
     }
 
 }