| 1 | n/a | """Suite Special Events: Commands for mounting Disk Copy images |
|---|
| 2 | n/a | Level 1, version 1 |
|---|
| 3 | n/a | |
|---|
| 4 | n/a | Generated from Macintosh HD:Hulpprogramma's:Disk Copy |
|---|
| 5 | n/a | AETE/AEUT resource version 1/0, language 0, script 0 |
|---|
| 6 | n/a | """ |
|---|
| 7 | n/a | |
|---|
| 8 | n/a | import aetools |
|---|
| 9 | n/a | import MacOS |
|---|
| 10 | n/a | |
|---|
| 11 | n/a | _code = 'ddsk' |
|---|
| 12 | n/a | |
|---|
| 13 | n/a | class Special_Events_Events: |
|---|
| 14 | n/a | |
|---|
| 15 | n/a | _argmap_mount = { |
|---|
| 16 | n/a | 'access_mode' : 'Acss', |
|---|
| 17 | n/a | 'checksum_verification' : 'VChk', |
|---|
| 18 | n/a | 'signature_verification' : 'VSig', |
|---|
| 19 | n/a | 'RAM_caching' : 'Cach', |
|---|
| 20 | n/a | } |
|---|
| 21 | n/a | |
|---|
| 22 | n/a | def mount(self, _object, _attributes={}, **_arguments): |
|---|
| 23 | n/a | """mount: Mounts an Disk Copy image as a disk volume |
|---|
| 24 | n/a | Required argument: a reference to the disk image to be mounted |
|---|
| 25 | n/a | Keyword argument access_mode: the access mode for mounted volume (default is "any", i.e. best possible) |
|---|
| 26 | n/a | Keyword argument checksum_verification: Verify the checksum before mounting? |
|---|
| 27 | n/a | Keyword argument signature_verification: Verify the DigiSign signature before mounting? |
|---|
| 28 | n/a | Keyword argument RAM_caching: Cache the disk image in RAM? (if omitted, don't cache) |
|---|
| 29 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 30 | n/a | Returns: a reference to mounted disk |
|---|
| 31 | n/a | """ |
|---|
| 32 | n/a | _code = 'ddsk' |
|---|
| 33 | n/a | _subcode = 'Moun' |
|---|
| 34 | n/a | |
|---|
| 35 | n/a | aetools.keysubst(_arguments, self._argmap_mount) |
|---|
| 36 | n/a | _arguments['----'] = _object |
|---|
| 37 | n/a | |
|---|
| 38 | n/a | aetools.enumsubst(_arguments, 'Acss', _Enum_Acss) |
|---|
| 39 | n/a | aetools.enumsubst(_arguments, 'VChk', _Enum_bool) |
|---|
| 40 | n/a | aetools.enumsubst(_arguments, 'VSig', _Enum_bool) |
|---|
| 41 | n/a | aetools.enumsubst(_arguments, 'Cach', _Enum_bool) |
|---|
| 42 | n/a | |
|---|
| 43 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 44 | n/a | _arguments, _attributes) |
|---|
| 45 | n/a | if _arguments.has_key('errn'): |
|---|
| 46 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 47 | n/a | # XXXX Optionally decode result |
|---|
| 48 | n/a | if _arguments.has_key('----'): |
|---|
| 49 | n/a | return _arguments['----'] |
|---|
| 50 | n/a | |
|---|
| 51 | n/a | _argmap_execute_DiskScript = { |
|---|
| 52 | n/a | 'checksum_verification' : 'VChk', |
|---|
| 53 | n/a | 'signature_verification' : 'VSig', |
|---|
| 54 | n/a | } |
|---|
| 55 | n/a | |
|---|
| 56 | n/a | def execute_DiskScript(self, _object, _attributes={}, **_arguments): |
|---|
| 57 | n/a | """execute DiskScript: Executes a Disk Copy-specific DiskScript |
|---|
| 58 | n/a | Required argument: a reference to the DiskScript to execute |
|---|
| 59 | n/a | Keyword argument checksum_verification: Should checksums be verified when mounting images referenced in the DiskScript? |
|---|
| 60 | n/a | Keyword argument signature_verification: Should the DigiSign signature of the DiskScript and the images it references be verified? |
|---|
| 61 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 62 | n/a | """ |
|---|
| 63 | n/a | _code = 'ddsk' |
|---|
| 64 | n/a | _subcode = 'XEQd' |
|---|
| 65 | n/a | |
|---|
| 66 | n/a | aetools.keysubst(_arguments, self._argmap_execute_DiskScript) |
|---|
| 67 | n/a | _arguments['----'] = _object |
|---|
| 68 | n/a | |
|---|
| 69 | n/a | aetools.enumsubst(_arguments, 'VChk', _Enum_bool) |
|---|
| 70 | n/a | aetools.enumsubst(_arguments, 'VSig', _Enum_bool) |
|---|
| 71 | n/a | |
|---|
| 72 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 73 | n/a | _arguments, _attributes) |
|---|
| 74 | n/a | if _arguments.has_key('errn'): |
|---|
| 75 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 76 | n/a | # XXXX Optionally decode result |
|---|
| 77 | n/a | if _arguments.has_key('----'): |
|---|
| 78 | n/a | return _arguments['----'] |
|---|
| 79 | n/a | |
|---|
| 80 | n/a | def unmount(self, _object, _attributes={}, **_arguments): |
|---|
| 81 | n/a | """unmount: Unmount and eject (if necessary) a volume |
|---|
| 82 | n/a | Required argument: a reference to disk to be unmounted (and ejected) |
|---|
| 83 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 84 | n/a | """ |
|---|
| 85 | n/a | _code = 'ddsk' |
|---|
| 86 | n/a | _subcode = 'Umnt' |
|---|
| 87 | n/a | |
|---|
| 88 | n/a | if _arguments: raise TypeError, 'No optional args expected' |
|---|
| 89 | n/a | _arguments['----'] = _object |
|---|
| 90 | n/a | |
|---|
| 91 | n/a | |
|---|
| 92 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 93 | n/a | _arguments, _attributes) |
|---|
| 94 | n/a | if _arguments.has_key('errn'): |
|---|
| 95 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 96 | n/a | # XXXX Optionally decode result |
|---|
| 97 | n/a | if _arguments.has_key('----'): |
|---|
| 98 | n/a | return _arguments['----'] |
|---|
| 99 | n/a | |
|---|
| 100 | n/a | _argmap_create = { |
|---|
| 101 | n/a | 'saving_as' : 'SvAs', |
|---|
| 102 | n/a | 'logical_blocks' : 'Blks', |
|---|
| 103 | n/a | 'zeroing' : 'Zero', |
|---|
| 104 | n/a | 'leave_image_mounted' : 'Moun', |
|---|
| 105 | n/a | 'filesystem' : 'Fsys', |
|---|
| 106 | n/a | } |
|---|
| 107 | n/a | |
|---|
| 108 | n/a | def create(self, _object, _attributes={}, **_arguments): |
|---|
| 109 | n/a | """create: Create a new Disk Copy document |
|---|
| 110 | n/a | Required argument: the name of the volume to create |
|---|
| 111 | n/a | Keyword argument saving_as: the disk image to be created |
|---|
| 112 | n/a | Keyword argument logical_blocks: the number of logical blocks |
|---|
| 113 | n/a | Keyword argument zeroing: Should all blocks on the disk be set to zero? |
|---|
| 114 | n/a | Keyword argument leave_image_mounted: Should the image be mounted after it is created? |
|---|
| 115 | n/a | Keyword argument filesystem: file system to use (Mac OS Standard/compatible, Mac OS Enhanced) |
|---|
| 116 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 117 | n/a | Returns: a reference to newly created disk image (or newly mounted disk) |
|---|
| 118 | n/a | """ |
|---|
| 119 | n/a | _code = 'ddsk' |
|---|
| 120 | n/a | _subcode = 'Crea' |
|---|
| 121 | n/a | |
|---|
| 122 | n/a | aetools.keysubst(_arguments, self._argmap_create) |
|---|
| 123 | n/a | _arguments['----'] = _object |
|---|
| 124 | n/a | |
|---|
| 125 | n/a | aetools.enumsubst(_arguments, 'SvAs', _Enum_fss_) |
|---|
| 126 | n/a | aetools.enumsubst(_arguments, 'Blks', _Enum_long) |
|---|
| 127 | n/a | aetools.enumsubst(_arguments, 'Zero', _Enum_bool) |
|---|
| 128 | n/a | aetools.enumsubst(_arguments, 'Moun', _Enum_bool) |
|---|
| 129 | n/a | aetools.enumsubst(_arguments, 'Fsys', _Enum_Fsys) |
|---|
| 130 | n/a | |
|---|
| 131 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 132 | n/a | _arguments, _attributes) |
|---|
| 133 | n/a | if _arguments.has_key('errn'): |
|---|
| 134 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 135 | n/a | # XXXX Optionally decode result |
|---|
| 136 | n/a | if _arguments.has_key('----'): |
|---|
| 137 | n/a | return _arguments['----'] |
|---|
| 138 | n/a | |
|---|
| 139 | n/a | def verify_checksum(self, _object, _attributes={}, **_arguments): |
|---|
| 140 | n/a | """verify checksum: Verify the checksum of a Disk Copy 4.2 or a Disk Copy 6.0 read-only document |
|---|
| 141 | n/a | Required argument: the disk image to be verified |
|---|
| 142 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 143 | n/a | Returns: the result of the checksum verification |
|---|
| 144 | n/a | """ |
|---|
| 145 | n/a | _code = 'ddsk' |
|---|
| 146 | n/a | _subcode = 'Vcrc' |
|---|
| 147 | n/a | |
|---|
| 148 | n/a | if _arguments: raise TypeError, 'No optional args expected' |
|---|
| 149 | n/a | _arguments['----'] = _object |
|---|
| 150 | n/a | |
|---|
| 151 | n/a | |
|---|
| 152 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 153 | n/a | _arguments, _attributes) |
|---|
| 154 | n/a | if _arguments.has_key('errn'): |
|---|
| 155 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 156 | n/a | # XXXX Optionally decode result |
|---|
| 157 | n/a | if _arguments.has_key('----'): |
|---|
| 158 | n/a | return _arguments['----'] |
|---|
| 159 | n/a | |
|---|
| 160 | n/a | def verify_signature(self, _object, _attributes={}, **_arguments): |
|---|
| 161 | n/a | """verify signature: Verify the DigiSign signature for a Disk Copy document |
|---|
| 162 | n/a | Required argument: the disk image to be verified |
|---|
| 163 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 164 | n/a | Returns: Is the DigiSign signature valid? |
|---|
| 165 | n/a | """ |
|---|
| 166 | n/a | _code = 'ddsk' |
|---|
| 167 | n/a | _subcode = 'Vsig' |
|---|
| 168 | n/a | |
|---|
| 169 | n/a | if _arguments: raise TypeError, 'No optional args expected' |
|---|
| 170 | n/a | _arguments['----'] = _object |
|---|
| 171 | n/a | |
|---|
| 172 | n/a | |
|---|
| 173 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 174 | n/a | _arguments, _attributes) |
|---|
| 175 | n/a | if _arguments.has_key('errn'): |
|---|
| 176 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 177 | n/a | # XXXX Optionally decode result |
|---|
| 178 | n/a | if _arguments.has_key('----'): |
|---|
| 179 | n/a | return _arguments['----'] |
|---|
| 180 | n/a | |
|---|
| 181 | n/a | _argmap_sign_image = { |
|---|
| 182 | n/a | 'using_signer' : 'Sinr', |
|---|
| 183 | n/a | } |
|---|
| 184 | n/a | |
|---|
| 185 | n/a | def sign_image(self, _object, _attributes={}, **_arguments): |
|---|
| 186 | n/a | """sign image: Add a DigiSign signature to a Disk Copy document |
|---|
| 187 | n/a | Required argument: the disk image to be signed |
|---|
| 188 | n/a | Keyword argument using_signer: a reference to signer file to use |
|---|
| 189 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 190 | n/a | """ |
|---|
| 191 | n/a | _code = 'ddsk' |
|---|
| 192 | n/a | _subcode = 'Asig' |
|---|
| 193 | n/a | |
|---|
| 194 | n/a | aetools.keysubst(_arguments, self._argmap_sign_image) |
|---|
| 195 | n/a | _arguments['----'] = _object |
|---|
| 196 | n/a | |
|---|
| 197 | n/a | aetools.enumsubst(_arguments, 'Sinr', _Enum_alis) |
|---|
| 198 | n/a | |
|---|
| 199 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 200 | n/a | _arguments, _attributes) |
|---|
| 201 | n/a | if _arguments.has_key('errn'): |
|---|
| 202 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 203 | n/a | # XXXX Optionally decode result |
|---|
| 204 | n/a | if _arguments.has_key('----'): |
|---|
| 205 | n/a | return _arguments['----'] |
|---|
| 206 | n/a | |
|---|
| 207 | n/a | _argmap_create_a_floppy_from = { |
|---|
| 208 | n/a | 'signature_verification' : 'VSig', |
|---|
| 209 | n/a | 'erase_confirmation' : 'Cfrm', |
|---|
| 210 | n/a | 'make_multiple_floppies' : 'Mult', |
|---|
| 211 | n/a | } |
|---|
| 212 | n/a | |
|---|
| 213 | n/a | def create_a_floppy_from(self, _object, _attributes={}, **_arguments): |
|---|
| 214 | n/a | """create a floppy from: create a floppy disk from a Disk Copy document |
|---|
| 215 | n/a | Required argument: the disk image to make a floppy from |
|---|
| 216 | n/a | Keyword argument signature_verification: Should the DigiSign signature be verified before creating a floppy disk? |
|---|
| 217 | n/a | Keyword argument erase_confirmation: Should the user be asked to confirm the erasure of the previous contents of floppy disks? |
|---|
| 218 | n/a | Keyword argument make_multiple_floppies: Should the user be prompted to create multiple floppy disks? |
|---|
| 219 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 220 | n/a | """ |
|---|
| 221 | n/a | _code = 'ddsk' |
|---|
| 222 | n/a | _subcode = 'Bfpy' |
|---|
| 223 | n/a | |
|---|
| 224 | n/a | aetools.keysubst(_arguments, self._argmap_create_a_floppy_from) |
|---|
| 225 | n/a | _arguments['----'] = _object |
|---|
| 226 | n/a | |
|---|
| 227 | n/a | aetools.enumsubst(_arguments, 'VSig', _Enum_bool) |
|---|
| 228 | n/a | aetools.enumsubst(_arguments, 'Cfrm', _Enum_bool) |
|---|
| 229 | n/a | aetools.enumsubst(_arguments, 'Mult', _Enum_bool) |
|---|
| 230 | n/a | |
|---|
| 231 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 232 | n/a | _arguments, _attributes) |
|---|
| 233 | n/a | if _arguments.has_key('errn'): |
|---|
| 234 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 235 | n/a | # XXXX Optionally decode result |
|---|
| 236 | n/a | if _arguments.has_key('----'): |
|---|
| 237 | n/a | return _arguments['----'] |
|---|
| 238 | n/a | |
|---|
| 239 | n/a | _argmap_check_image = { |
|---|
| 240 | n/a | 'details' : 'ChDe', |
|---|
| 241 | n/a | } |
|---|
| 242 | n/a | |
|---|
| 243 | n/a | def check_image(self, _object, _attributes={}, **_arguments): |
|---|
| 244 | n/a | """check image: Check the disk imageÕs internal data structures for any inconsistencies. Works on NDIF, Disk Copy 4.2, DART, or DiskSet images. |
|---|
| 245 | n/a | Required argument: the disk image to be verified |
|---|
| 246 | n/a | Keyword argument details: Should the disk image details be displayed? |
|---|
| 247 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 248 | n/a | Returns: a record containing a boolean (true/false) value if the image passes consistency tests, and the numbers of warnings and errors |
|---|
| 249 | n/a | """ |
|---|
| 250 | n/a | _code = 'ddsk' |
|---|
| 251 | n/a | _subcode = 'Chek' |
|---|
| 252 | n/a | |
|---|
| 253 | n/a | aetools.keysubst(_arguments, self._argmap_check_image) |
|---|
| 254 | n/a | _arguments['----'] = _object |
|---|
| 255 | n/a | |
|---|
| 256 | n/a | aetools.enumsubst(_arguments, 'ChDe', _Enum_bool) |
|---|
| 257 | n/a | |
|---|
| 258 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 259 | n/a | _arguments, _attributes) |
|---|
| 260 | n/a | if _arguments.has_key('errn'): |
|---|
| 261 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 262 | n/a | # XXXX Optionally decode result |
|---|
| 263 | n/a | if _arguments.has_key('----'): |
|---|
| 264 | n/a | return _arguments['----'] |
|---|
| 265 | n/a | |
|---|
| 266 | n/a | _argmap_segment_image = { |
|---|
| 267 | n/a | 'segment_count' : 'SGCT', |
|---|
| 268 | n/a | 'segment_size' : 'SGSZ', |
|---|
| 269 | n/a | 'segment_name' : 'SGNM', |
|---|
| 270 | n/a | 'image_ID' : 'SGID', |
|---|
| 271 | n/a | } |
|---|
| 272 | n/a | |
|---|
| 273 | n/a | def segment_image(self, _object, _attributes={}, **_arguments): |
|---|
| 274 | n/a | """segment image: Segment a NDIF R/W or R/O image into smaller pieces |
|---|
| 275 | n/a | Required argument: the disk image to be segmented |
|---|
| 276 | n/a | Keyword argument segment_count: the number of image segments to create |
|---|
| 277 | n/a | Keyword argument segment_size: the size of image segments (in blocks) to create |
|---|
| 278 | n/a | Keyword argument segment_name: the root name for each image segment file |
|---|
| 279 | n/a | Keyword argument image_ID: string used to generate a unique image ID to group the segments |
|---|
| 280 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 281 | n/a | Returns: a list of references to the image segments created |
|---|
| 282 | n/a | """ |
|---|
| 283 | n/a | _code = 'ddsk' |
|---|
| 284 | n/a | _subcode = 'SGMT' |
|---|
| 285 | n/a | |
|---|
| 286 | n/a | aetools.keysubst(_arguments, self._argmap_segment_image) |
|---|
| 287 | n/a | _arguments['----'] = _object |
|---|
| 288 | n/a | |
|---|
| 289 | n/a | |
|---|
| 290 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 291 | n/a | _arguments, _attributes) |
|---|
| 292 | n/a | if _arguments.has_key('errn'): |
|---|
| 293 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 294 | n/a | # XXXX Optionally decode result |
|---|
| 295 | n/a | if _arguments.has_key('----'): |
|---|
| 296 | n/a | return _arguments['----'] |
|---|
| 297 | n/a | |
|---|
| 298 | n/a | _argmap_create_SMI = { |
|---|
| 299 | n/a | 'source_images' : 'SMI1', |
|---|
| 300 | n/a | 'launching_application' : 'SMI2', |
|---|
| 301 | n/a | 'launching_document' : 'SMI3', |
|---|
| 302 | n/a | 'version_string' : 'SMI4', |
|---|
| 303 | n/a | 'checksum_verification' : 'VChk', |
|---|
| 304 | n/a | 'signature_verification' : 'VSig', |
|---|
| 305 | n/a | 'image_signing' : 'SImg', |
|---|
| 306 | n/a | } |
|---|
| 307 | n/a | |
|---|
| 308 | n/a | def create_SMI(self, _object, _attributes={}, **_arguments): |
|---|
| 309 | n/a | """create SMI: Creates a self-mounting image (SMI) from a list of NDIF disk images |
|---|
| 310 | n/a | Required argument: the self-mounting image to create |
|---|
| 311 | n/a | Keyword argument source_images: a list of references to sources images |
|---|
| 312 | n/a | Keyword argument launching_application: the path to an application to launch |
|---|
| 313 | n/a | Keyword argument launching_document: the path to a document to open |
|---|
| 314 | n/a | Keyword argument version_string: sets the 'vers' 1 resource of the self-mounting image |
|---|
| 315 | n/a | Keyword argument checksum_verification: Should the checksum of the source images be verified before creating the SMI? |
|---|
| 316 | n/a | Keyword argument signature_verification: Should the DigiSign signature of the source images be verified before creating the SMI? |
|---|
| 317 | n/a | Keyword argument image_signing: Should the SMI be given a digital signature when it is created? |
|---|
| 318 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 319 | n/a | Returns: a reference to the self-mounting image created |
|---|
| 320 | n/a | """ |
|---|
| 321 | n/a | _code = 'ddsk' |
|---|
| 322 | n/a | _subcode = 'MSMI' |
|---|
| 323 | n/a | |
|---|
| 324 | n/a | aetools.keysubst(_arguments, self._argmap_create_SMI) |
|---|
| 325 | n/a | _arguments['----'] = _object |
|---|
| 326 | n/a | |
|---|
| 327 | n/a | aetools.enumsubst(_arguments, 'VChk', _Enum_bool) |
|---|
| 328 | n/a | aetools.enumsubst(_arguments, 'VSig', _Enum_bool) |
|---|
| 329 | n/a | aetools.enumsubst(_arguments, 'SImg', _Enum_bool) |
|---|
| 330 | n/a | |
|---|
| 331 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 332 | n/a | _arguments, _attributes) |
|---|
| 333 | n/a | if _arguments.has_key('errn'): |
|---|
| 334 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 335 | n/a | # XXXX Optionally decode result |
|---|
| 336 | n/a | if _arguments.has_key('----'): |
|---|
| 337 | n/a | return _arguments['----'] |
|---|
| 338 | n/a | |
|---|
| 339 | n/a | |
|---|
| 340 | n/a | class Verify_Checksum_reply_record(aetools.ComponentItem): |
|---|
| 341 | n/a | """Verify Checksum reply record - """ |
|---|
| 342 | n/a | want = 'Rcrc' |
|---|
| 343 | n/a | class validity(aetools.NProperty): |
|---|
| 344 | n/a | """validity - true if checksum is valid """ |
|---|
| 345 | n/a | which = 'Vlid' |
|---|
| 346 | n/a | want = 'bool' |
|---|
| 347 | n/a | class expected_checksum(aetools.NProperty): |
|---|
| 348 | n/a | """expected checksum - checksum value stored in the image header (in hexadecimal) """ |
|---|
| 349 | n/a | which = 'crcE' |
|---|
| 350 | n/a | want = 'TEXT' |
|---|
| 351 | n/a | class calculated_checksum(aetools.NProperty): |
|---|
| 352 | n/a | """calculated checksum - checksum value actually calculated (in hexadecimal) """ |
|---|
| 353 | n/a | which = 'crcA' |
|---|
| 354 | n/a | want = 'TEXT' |
|---|
| 355 | n/a | |
|---|
| 356 | n/a | class Check_Image_reply_record(aetools.ComponentItem): |
|---|
| 357 | n/a | """Check Image reply record - """ |
|---|
| 358 | n/a | want = 'Rchk' |
|---|
| 359 | n/a | class consistency(aetools.NProperty): |
|---|
| 360 | n/a | """consistency - Does the image pass consistency checks? """ |
|---|
| 361 | n/a | which = 'Rch1' |
|---|
| 362 | n/a | want = 'bool' |
|---|
| 363 | n/a | class error_count(aetools.NProperty): |
|---|
| 364 | n/a | """error count - the number of errors recorded """ |
|---|
| 365 | n/a | which = 'Rch2' |
|---|
| 366 | n/a | want = 'long' |
|---|
| 367 | n/a | class warning_count(aetools.NProperty): |
|---|
| 368 | n/a | """warning count - the number of warnings recorded """ |
|---|
| 369 | n/a | which = 'Rch3' |
|---|
| 370 | n/a | want = 'long' |
|---|
| 371 | n/a | Verify_Checksum_reply_record._propdict = { |
|---|
| 372 | n/a | 'validity' : validity, |
|---|
| 373 | n/a | 'expected_checksum' : expected_checksum, |
|---|
| 374 | n/a | 'calculated_checksum' : calculated_checksum, |
|---|
| 375 | n/a | } |
|---|
| 376 | n/a | Verify_Checksum_reply_record._elemdict = { |
|---|
| 377 | n/a | } |
|---|
| 378 | n/a | Check_Image_reply_record._propdict = { |
|---|
| 379 | n/a | 'consistency' : consistency, |
|---|
| 380 | n/a | 'error_count' : error_count, |
|---|
| 381 | n/a | 'warning_count' : warning_count, |
|---|
| 382 | n/a | } |
|---|
| 383 | n/a | Check_Image_reply_record._elemdict = { |
|---|
| 384 | n/a | } |
|---|
| 385 | n/a | _Enum_Acss = { |
|---|
| 386 | n/a | 'read_and_write' : 'RdWr', # read/write access |
|---|
| 387 | n/a | 'read_only' : 'Rdxx', # read-only access |
|---|
| 388 | n/a | 'any' : 'Anyx', # best possible access |
|---|
| 389 | n/a | } |
|---|
| 390 | n/a | |
|---|
| 391 | n/a | _Enum_Fsys = { |
|---|
| 392 | n/a | 'Mac_OS_Standard' : 'Fhfs', # classic HFS file system |
|---|
| 393 | n/a | 'compatible_Mac_OS_Extended' : 'Fhf+', # new HFS+ file system |
|---|
| 394 | n/a | } |
|---|
| 395 | n/a | |
|---|
| 396 | n/a | _Enum_alis = None # XXXX enum alis not found!! |
|---|
| 397 | n/a | _Enum_fss_ = None # XXXX enum fss not found!! |
|---|
| 398 | n/a | _Enum_long = None # XXXX enum long not found!! |
|---|
| 399 | n/a | _Enum_bool = None # XXXX enum bool not found!! |
|---|
| 400 | n/a | |
|---|
| 401 | n/a | # |
|---|
| 402 | n/a | # Indices of types declared in this module |
|---|
| 403 | n/a | # |
|---|
| 404 | n/a | _classdeclarations = { |
|---|
| 405 | n/a | 'Rchk' : Check_Image_reply_record, |
|---|
| 406 | n/a | 'Rcrc' : Verify_Checksum_reply_record, |
|---|
| 407 | n/a | } |
|---|
| 408 | n/a | |
|---|
| 409 | n/a | _propdeclarations = { |
|---|
| 410 | n/a | 'crcE' : expected_checksum, |
|---|
| 411 | n/a | 'Rch2' : error_count, |
|---|
| 412 | n/a | 'crcA' : calculated_checksum, |
|---|
| 413 | n/a | 'Rch3' : warning_count, |
|---|
| 414 | n/a | 'Vlid' : validity, |
|---|
| 415 | n/a | 'Rch1' : consistency, |
|---|
| 416 | n/a | } |
|---|
| 417 | n/a | |
|---|
| 418 | n/a | _compdeclarations = { |
|---|
| 419 | n/a | } |
|---|
| 420 | n/a | |
|---|
| 421 | n/a | _enumdeclarations = { |
|---|
| 422 | n/a | 'Acss' : _Enum_Acss, |
|---|
| 423 | n/a | 'Fsys' : _Enum_Fsys, |
|---|
| 424 | n/a | } |
|---|