comparison dwt/internal/cocoa/NSFileHandle.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
35 super(id); 35 super(id);
36 } 36 }
37 37
38 public void acceptConnectionInBackgroundAndNotify () 38 public void acceptConnectionInBackgroundAndNotify ()
39 { 39 {
40 OS.objc_msgSend(this.id, OS.sel_acceptConnectionInBackgroundAndNotify); 40 OS.objc_msgSend(this.id_, OS.sel_acceptConnectionInBackgroundAndNotify);
41 } 41 }
42 42
43 public void acceptConnectionInBackgroundAndNotifyForModes (NSArray modes) 43 public void acceptConnectionInBackgroundAndNotifyForModes (NSArray modes)
44 { 44 {
45 OS.objc_msgSend(this.id, OS.sel_acceptConnectionInBackgroundAndNotifyForModes_1, modes !is null ? modes.id : null); 45 OS.objc_msgSend(this.id_, OS.sel_acceptConnectionInBackgroundAndNotifyForModes_1, modes !is null ? modes.id_ : null);
46 } 46 }
47 47
48 public NSData availableData () 48 public NSData availableData ()
49 { 49 {
50 objc.id result = OS.objc_msgSend(this.id, OS.sel_availableData); 50 objc.id result = OS.objc_msgSend(this.id_, OS.sel_availableData);
51 return result !is null ? new NSData(result) : null; 51 return result !is null ? new NSData(result) : null;
52 } 52 }
53 53
54 public void closeFile () 54 public void closeFile ()
55 { 55 {
56 OS.objc_msgSend(this.id, OS.sel_closeFile); 56 OS.objc_msgSend(this.id_, OS.sel_closeFile);
57 } 57 }
58 58
59 public int fileDescriptor () 59 public int fileDescriptor ()
60 { 60 {
61 return OS.objc_msgSend(this.id, OS.sel_fileDescriptor); 61 return cast(int) OS.objc_msgSend(this.id_, OS.sel_fileDescriptor);
62 } 62 }
63 63
64 public static id fileHandleForReadingAtPath (NSString path) 64 public static id fileHandleForReadingAtPath (NSString path)
65 { 65 {
66 objc.id result = OS.objc_msgSend(OS.class_NSFileHandle, OS.sel_fileHandleForReadingAtPath_1, path !is null ? path.id : null); 66 objc.id result = OS.objc_msgSend(OS.class_NSFileHandle, OS.sel_fileHandleForReadingAtPath_1, path !is null ? path.id_ : null);
67 return result !is null ? new id(result) : null; 67 return result !is null ? new id(result) : null;
68 } 68 }
69 69
70 public static id fileHandleForUpdatingAtPath (NSString path) 70 public static id fileHandleForUpdatingAtPath (NSString path)
71 { 71 {
72 objc.id result = OS.objc_msgSend(OS.class_NSFileHandle, OS.sel_fileHandleForUpdatingAtPath_1, path !is null ? path.id : null); 72 objc.id result = OS.objc_msgSend(OS.class_NSFileHandle, OS.sel_fileHandleForUpdatingAtPath_1, path !is null ? path.id_ : null);
73 return result !is null ? new id(result) : null; 73 return result !is null ? new id(result) : null;
74 } 74 }
75 75
76 public static id fileHandleForWritingAtPath (NSString path) 76 public static id fileHandleForWritingAtPath (NSString path)
77 { 77 {
78 objc.id result = OS.objc_msgSend(OS.class_NSFileHandle, OS.sel_fileHandleForWritingAtPath_1, path !is null ? path.id : null); 78 objc.id result = OS.objc_msgSend(OS.class_NSFileHandle, OS.sel_fileHandleForWritingAtPath_1, path !is null ? path.id_ : null);
79 return result !is null ? new id(result) : null; 79 return result !is null ? new id(result) : null;
80 } 80 }
81 81
82 public static id fileHandleWithNullDevice () 82 public static id fileHandleWithNullDevice ()
83 { 83 {
103 return result !is null ? new id(result) : null; 103 return result !is null ? new id(result) : null;
104 } 104 }
105 105
106 public id initWithFileDescriptor_ (int fd) 106 public id initWithFileDescriptor_ (int fd)
107 { 107 {
108 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithFileDescriptor_1, fd); 108 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFileDescriptor_1, fd);
109 return result !is null ? new id(result) : null; 109 return result !is null ? new id(result) : null;
110 } 110 }
111 111
112 public id initWithFileDescriptor_closeOnDealloc_ (int fd, bool closeopt) 112 public id initWithFileDescriptor_closeOnDealloc_ (int fd, bool closeopt)
113 { 113 {
114 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithFileDescriptor_1closeOnDealloc_1, fd, closeopt); 114 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithFileDescriptor_1closeOnDealloc_1, fd, closeopt);
115 return result !is null ? new id(result) : null; 115 return result !is null ? new id(result) : null;
116 } 116 }
117 117
118 public long offsetInFile () 118 public long offsetInFile ()
119 { 119 {
120 return cast(long) OS.objc_msgSend(this.id, OS.sel_offsetInFile); 120 return cast(long) OS.objc_msgSend(this.id_, OS.sel_offsetInFile);
121 } 121 }
122 122
123 public NSData readDataOfLength (NSUInteger length) 123 public NSData readDataOfLength (NSUInteger length)
124 { 124 {
125 objc.id result = OS.objc_msgSend(this.id, OS.sel_readDataOfLength_1, length); 125 objc.id result = OS.objc_msgSend(this.id_, OS.sel_readDataOfLength_1, length);
126 return result !is null ? new NSData(result) : null; 126 return result !is null ? new NSData(result) : null;
127 } 127 }
128 128
129 public NSData readDataToEndOfFile () 129 public NSData readDataToEndOfFile ()
130 { 130 {
131 objc.id result = OS.objc_msgSend(this.id, OS.sel_readDataToEndOfFile); 131 objc.id result = OS.objc_msgSend(this.id_, OS.sel_readDataToEndOfFile);
132 return result !is null ? new NSData(result) : null; 132 return result !is null ? new NSData(result) : null;
133 } 133 }
134 134
135 public void readInBackgroundAndNotify () 135 public void readInBackgroundAndNotify ()
136 { 136 {
137 OS.objc_msgSend(this.id, OS.sel_readInBackgroundAndNotify); 137 OS.objc_msgSend(this.id_, OS.sel_readInBackgroundAndNotify);
138 } 138 }
139 139
140 public void readInBackgroundAndNotifyForModes (NSArray modes) 140 public void readInBackgroundAndNotifyForModes (NSArray modes)
141 { 141 {
142 OS.objc_msgSend(this.id, OS.sel_readInBackgroundAndNotifyForModes_1, modes !is null ? modes.id : null); 142 OS.objc_msgSend(this.id_, OS.sel_readInBackgroundAndNotifyForModes_1, modes !is null ? modes.id_ : null);
143 } 143 }
144 144
145 public void readToEndOfFileInBackgroundAndNotify () 145 public void readToEndOfFileInBackgroundAndNotify ()
146 { 146 {
147 OS.objc_msgSend(this.id, OS.sel_readToEndOfFileInBackgroundAndNotify); 147 OS.objc_msgSend(this.id_, OS.sel_readToEndOfFileInBackgroundAndNotify);
148 } 148 }
149 149
150 public void readToEndOfFileInBackgroundAndNotifyForModes (NSArray modes) 150 public void readToEndOfFileInBackgroundAndNotifyForModes (NSArray modes)
151 { 151 {
152 OS.objc_msgSend(this.id, OS.sel_readToEndOfFileInBackgroundAndNotifyForModes_1, modes !is null ? modes.id : null); 152 OS.objc_msgSend(this.id_, OS.sel_readToEndOfFileInBackgroundAndNotifyForModes_1, modes !is null ? modes.id_ : null);
153 } 153 }
154 154
155 public long seekToEndOfFile () 155 public long seekToEndOfFile ()
156 { 156 {
157 return cast(long) OS.objc_msgSend(this.id, OS.sel_seekToEndOfFile); 157 return cast(long) OS.objc_msgSend(this.id_, OS.sel_seekToEndOfFile);
158 } 158 }
159 159
160 public void seekToFileOffset (long offset) 160 public void seekToFileOffset (long offset)
161 { 161 {
162 OS.objc_msgSend(this.id, OS.sel_seekToFileOffset_1, offset); 162 OS.objc_msgSend(this.id_, OS.sel_seekToFileOffset_1, offset);
163 } 163 }
164 164
165 public void synchronizeFile () 165 public void synchronizeFile ()
166 { 166 {
167 OS.objc_msgSend(this.id, OS.sel_synchronizeFile); 167 OS.objc_msgSend(this.id_, OS.sel_synchronizeFile);
168 } 168 }
169 169
170 public void truncateFileAtOffset (long offset) 170 public void truncateFileAtOffset (long offset)
171 { 171 {
172 OS.objc_msgSend(this.id, OS.sel_truncateFileAtOffset_1, offset); 172 OS.objc_msgSend(this.id_, OS.sel_truncateFileAtOffset_1, offset);
173 } 173 }
174 174
175 public void waitForDataInBackgroundAndNotify () 175 public void waitForDataInBackgroundAndNotify ()
176 { 176 {
177 OS.objc_msgSend(this.id, OS.sel_waitForDataInBackgroundAndNotify); 177 OS.objc_msgSend(this.id_, OS.sel_waitForDataInBackgroundAndNotify);
178 } 178 }
179 179
180 public void waitForDataInBackgroundAndNotifyForModes (NSArray modes) 180 public void waitForDataInBackgroundAndNotifyForModes (NSArray modes)
181 { 181 {
182 OS.objc_msgSend(this.id, OS.sel_waitForDataInBackgroundAndNotifyForModes_1, modes !is null ? modes.id : null); 182 OS.objc_msgSend(this.id_, OS.sel_waitForDataInBackgroundAndNotifyForModes_1, modes !is null ? modes.id_ : null);
183 } 183 }
184 184
185 public void writeData (NSData data) 185 public void writeData (NSData data)
186 { 186 {
187 OS.objc_msgSend(this.id, OS.sel_writeData_1, data !is null ? data.id : null); 187 OS.objc_msgSend(this.id_, OS.sel_writeData_1, data !is null ? data.id_ : null);
188 } 188 }
189 189
190 } 190 }