def parse(self, node): blob = node.child if len(blob.children) == 0: raise ValueError, "Blob has no children" self.option_id = struct.unpack("<l", node.key)[0] self.description = node[1].data self.command_line = node[2].data self.icon_index = node[3].data self.no_desktop_shortcut = bytes_as_bool(node[4].data) self.no_start_menu_shortcut = bytes_as_bool(node[5].data) self.long_running_unattended = bytes_as_bool(node[6].data)
def parse(self, node): self.app_id = node.smart_key self.app_name = node[2].data self.install_dir = node[3].data self.min_cache, = struct.unpack("<l", node[4].data) self.max_cache, = struct.unpack("<l", node[5].data) self.on_first_launch, = struct.unpack("<l", node[8].data) self.is_bandwidth_greedy, = bytes_as_bool(node[9].data) self.current_version_id, = struct.unpack("<l", node[11].data) self.trickle_version_id, = struct.unpack("<l", node[13].data) self.beta_version_password = node[15].data self.beta_version_id, = struct.unpack("<l", node[16].data) self.install_dir_legacy = node[17].data self.use_filesystem_dvr = bytes_as_bool(node[19].data) self.manifest_only_app = bytes_as_bool(node[20].data) self.app_of_manifest_only_cache = bytes_as_bool(node[21].data) self.launch_records = [] self.version_records = [] self.fs_records = [] self.user_defined_records = [] for n in node[6]: tempblob = ApplicationLaunchOptionRecord() tempblob.owner = self tempblob.parse(n) self.launch_records.append(tempblob) for n in node[10]: tempblob = ApplicationVersionRecord() tempblob.owner = self tempblob.parse(n) self.version_records.append(tempblob) for n in node[12]: tempblob = ApplicationFilesystemRecord() tempblob.owner = self tempblob.parse(n) self.fs_records.append(tempblob) for n in node[14]: tempblob = ApplicationUserDefinedRecord() tempblob.owner = self tempblob.parse(n) self.user_defined_records.append(tempblob)
def parse(self, node): self.version_id = struct.unpack("<l", node.key)[0] self.description = node[1].data #temp_version_id = struct.unpack("<l", tempnode.data)[0] #if temp_version_id != self.version_id: # raise ParseError("Version ID mismatch: %d and %d" % (temp_version_id, self.version_id)) self.is_not_available = bytes_as_bool(node[3].data) self.depot_encryption_key = node[5].data self.is_encryption_key_available = bytes_as_bool(node[6].data) self.is_rebased = bytes_as_bool(node[7].data) self.is_long_version_roll = bytes_as_bool(node[8].data) for n in node[4]: tempblob = ApplicationVersionLaunchRecord() tempblob.owner = self tempblob.parse(n)
def parse(self, node): self.app_id = struct.unpack("<l", node[1].data)[0] self.mount_name = node[2].data self.is_optional = bytes_as_bool(node[3].data)