comparison dwt/internal/cocoa/NSDistributedLock.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
comparison
equal deleted inserted replaced
0:380af2bdd8e5 1:8b48be5454ce
32 super(id); 32 super(id);
33 } 33 }
34 34
35 public void breakLock () 35 public void breakLock ()
36 { 36 {
37 OS.objc_msgSend(this.id, OS.sel_breakLock); 37 OS.objc_msgSend(this.id_, OS.sel_breakLock);
38 } 38 }
39 39
40 public id initWithPath (NSString path) 40 public id initWithPath (NSString path)
41 { 41 {
42 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithPath_1, path !is null ? path.id : null); 42 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithPath_1, path !is null ? path.id_ : null);
43 return result !is null ? new id(result) : null; 43 return result !is null ? new id(result) : null;
44 } 44 }
45 45
46 public NSDate lockDate () 46 public NSDate lockDate ()
47 { 47 {
48 objc.id result = OS.objc_msgSend(this.id, OS.sel_lockDate); 48 objc.id result = OS.objc_msgSend(this.id_, OS.sel_lockDate);
49 return result !is null ? new NSDate(result) : null; 49 return result !is null ? new NSDate(result) : null;
50 } 50 }
51 51
52 public static NSDistributedLock lockWithPath (NSString path) 52 public static NSDistributedLock lockWithPath (NSString path)
53 { 53 {
54 objc.id result = OS.objc_msgSend(OS.class_NSDistributedLock, OS.sel_lockWithPath_1, path !is null ? path.id : null); 54 objc.id result = OS.objc_msgSend(OS.class_NSDistributedLock, OS.sel_lockWithPath_1, path !is null ? path.id_ : null);
55 return result !is null ? new NSDistributedLock(result) : null; 55 return result !is null ? new NSDistributedLock(result) : null;
56 } 56 }
57 57
58 public bool tryLock () 58 public bool tryLock ()
59 { 59 {
60 return OS.objc_msgSend(this.id, OS.sel_tryLock) !is null; 60 return OS.objc_msgSend(this.id_, OS.sel_tryLock) !is null;
61 } 61 }
62 62
63 public void unlock () 63 public void unlock ()
64 { 64 {
65 OS.objc_msgSend(this.id, OS.sel_unlock); 65 OS.objc_msgSend(this.id_, OS.sel_unlock);
66 } 66 }
67 } 67 }