OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "entry.h" | 5 #include "entry.h" |
6 #include "messaging.h" | 6 #include "messaging.h" |
7 | 7 |
8 #define DART_TIMESTAMP(name) \ | 8 #define DART_TIMESTAMP(name) \ |
9 Dart_CObject name; \ | 9 Dart_CObject name; \ |
10 if (archive_entry_ ## name ## _is_set(e)) { \ | 10 if (archive_entry_ ## name ## _is_set(e)) { \ |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 } | 149 } |
150 | 150 |
151 void archiveEntrySetPathname(Dart_Port p, struct archive_entry* e, | 151 void archiveEntrySetPathname(Dart_Port p, struct archive_entry* e, |
152 Dart_CObject* request) { | 152 Dart_CObject* request) { |
153 Dart_CObject* value = getNullableStringArgument(p, request, 0); | 153 Dart_CObject* value = getNullableStringArgument(p, request, 0); |
154 if (value == NULL) return; | 154 if (value == NULL) return; |
155 archive_entry_set_pathname(e, getNullableString(value)); | 155 archive_entry_set_pathname(e, getNullableString(value)); |
156 postSuccess(p, NULL); | 156 postSuccess(p, NULL); |
157 } | 157 } |
158 | 158 |
159 void archiveEntrySetSourcepath(Dart_Port p, struct archive_entry* e, | |
160 Dart_CObject* request) { | |
161 Dart_CObject* value = getNullableStringArgument(p, request, 0); | |
162 if (value == NULL) return; | |
163 archive_entry_set_sourcepath(e, getNullableString(value)); | |
164 postSuccess(p, NULL); | |
165 } | |
166 | |
167 void archiveEntrySetSymlink(Dart_Port p, struct archive_entry* e, | 159 void archiveEntrySetSymlink(Dart_Port p, struct archive_entry* e, |
168 Dart_CObject* request) { | 160 Dart_CObject* request) { |
169 Dart_CObject* value = getNullableStringArgument(p, request, 0); | 161 Dart_CObject* value = getNullableStringArgument(p, request, 0); |
170 if (value == NULL) return; | 162 if (value == NULL) return; |
171 archive_entry_set_symlink(e, getNullableString(value)); | 163 archive_entry_set_symlink(e, getNullableString(value)); |
172 postSuccess(p, NULL); | 164 postSuccess(p, NULL); |
173 } | 165 } |
174 | 166 |
175 void archiveEntrySetGid(Dart_Port p, struct archive_entry* e, | 167 void archiveEntrySetGid(Dart_Port p, struct archive_entry* e, |
176 Dart_CObject* request) { | 168 Dart_CObject* request) { |
177 Dart_CObject* value = getIntArgument(p, request, 0); | 169 Dart_CObject* value = getIntArgument(p, request, 0); |
178 if (value == NULL) return; | 170 if (value == NULL) return; |
179 archive_entry_set_gid(e, getInteger(value)); | 171 archive_entry_set_gid(e, getInteger(value)); |
180 postSuccess(p, NULL); | 172 postSuccess(p, NULL); |
181 } | 173 } |
182 | 174 |
183 void archiveEntrySetUid(Dart_Port p, struct archive_entry* e, | 175 void archiveEntrySetUid(Dart_Port p, struct archive_entry* e, |
184 Dart_CObject* request) { | 176 Dart_CObject* request) { |
185 Dart_CObject* value = getIntArgument(p, request, 0); | 177 Dart_CObject* value = getIntArgument(p, request, 0); |
186 if (value == NULL) return; | 178 if (value == NULL) return; |
187 archive_entry_set_uid(e, getInteger(value)); | 179 archive_entry_set_uid(e, getInteger(value)); |
188 postSuccess(p, NULL); | 180 postSuccess(p, NULL); |
189 } | 181 } |
190 | 182 |
191 void archiveEntrySetPerm(Dart_Port p, struct archive_entry* e, | 183 void archiveEntrySetPerm(Dart_Port p, struct archive_entry* e, |
192 Dart_CObject* request) { | 184 Dart_CObject* request) { |
193 Dart_CObject* value = getIntArgument(p, request, 0); | 185 Dart_CObject* value = getIntArgument(p, request, 0); |
194 if (value == NULL) return; | 186 if (value == NULL) return; |
195 archive_entry_set_perm_mask(e, getInteger(value)); | 187 archive_entry_set_perm(e, getInteger(value)); |
196 postSuccess(p, NULL); | 188 postSuccess(p, NULL); |
197 } | 189 } |
198 | 190 |
199 void archiveEntrySetGname(Dart_Port p, struct archive_entry* e, | 191 void archiveEntrySetGname(Dart_Port p, struct archive_entry* e, |
200 Dart_CObject* request) { | 192 Dart_CObject* request) { |
201 Dart_CObject* value = getNullableStringArgument(p, request, 0); | 193 Dart_CObject* value = getNullableStringArgument(p, request, 0); |
202 if (value == NULL) return; | 194 if (value == NULL) return; |
203 archive_entry_update_gname_utf8(e, getNullableString(value)); | 195 archive_entry_update_gname_utf8(e, getNullableString(value)); |
204 postSuccess(p, NULL); | 196 postSuccess(p, NULL); |
205 } | 197 } |
(...skipping 15 matching lines...) Expand all Loading... |
221 } | 213 } |
222 | 214 |
223 void archiveEntrySetFflagsClear(Dart_Port p, struct archive_entry* e, | 215 void archiveEntrySetFflagsClear(Dart_Port p, struct archive_entry* e, |
224 Dart_CObject* request) { | 216 Dart_CObject* request) { |
225 Dart_CObject* value = getIntArgument(p, request, 0); | 217 Dart_CObject* value = getIntArgument(p, request, 0); |
226 if (value == NULL) return; | 218 if (value == NULL) return; |
227 archive_entry_set_fflags(e, 0, getInteger(value)); | 219 archive_entry_set_fflags(e, 0, getInteger(value)); |
228 postSuccess(p, NULL); | 220 postSuccess(p, NULL); |
229 } | 221 } |
230 | 222 |
231 void archiveEntrySetFflagsText(Dart_Port p, struct archive_entry* e, | |
232 Dart_CObject* request) { | |
233 Dart_CObject* value = getNullableStringArgument(p, request, 0); | |
234 if (value == NULL) return; | |
235 archive_entry_set_fflags_text(e, getNullableString(value)); | |
236 postSuccess(p, NULL); | |
237 } | |
238 | |
239 void archiveEntrySetFiletype(Dart_Port p, struct archive_entry* e, | 223 void archiveEntrySetFiletype(Dart_Port p, struct archive_entry* e, |
240 Dart_CObject* request) { | 224 Dart_CObject* request) { |
241 Dart_CObject* value = getIntArgument(p, request, 0); | 225 Dart_CObject* value = getIntArgument(p, request, 0); |
242 if (value == NULL) return; | 226 if (value == NULL) return; |
243 archive_entry_set_filetype(e, getInteger(value)); | 227 archive_entry_set_filetype(e, getInteger(value)); |
244 postSuccess(p, NULL); | 228 postSuccess(p, NULL); |
245 } | 229 } |
246 | 230 |
247 void archiveEntrySetMode(Dart_Port p, struct archive_entry* e, | 231 void archiveEntrySetMode(Dart_Port p, struct archive_entry* e, |
248 Dart_CObject* request) { | 232 Dart_CObject* request) { |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 postSuccess(p, NULL); | 367 postSuccess(p, NULL); |
384 return; | 368 return; |
385 } | 369 } |
386 | 370 |
387 Dart_CObject* value = getIntArgument(p, request, 0); | 371 Dart_CObject* value = getIntArgument(p, request, 0); |
388 if (value == NULL) return; | 372 if (value == NULL) return; |
389 int64_t mtime = getInteger(value); | 373 int64_t mtime = getInteger(value); |
390 archive_entry_set_mtime(e, mtime / 1000, (mtime % 1000) * 1000000); | 374 archive_entry_set_mtime(e, mtime / 1000, (mtime % 1000) * 1000000); |
391 postSuccess(p, NULL); | 375 postSuccess(p, NULL); |
392 } | 376 } |
OLD | NEW |