commit 8f1e58e23ebe8180dc4eed242e2b71fab055c9f3 Author: Natalia Portillo Date: Wed Sep 22 15:37:59 2021 +0100 Initial commit. diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..8b506da --- /dev/null +++ b/.editorconfig @@ -0,0 +1,632 @@ +root = true + +[*] +charset=utf-8 +next_line=crlf +insert_final_newline=false +indent_style=space +indent_size=4 + +# Generic non-language specific ones for Resharper and friends +brace_style=next_line +int_align=true +keep_existing_arrangement=false +place_simple_blocks_on_single_line=true +place_simple_declaration_blocks_on_single_line=true +place_attribute_on_same_line=false +space_after_unary_operator=false +space_after_comma=true +space_around_ternary_operator=true +space_around_binary_operator=true +space_around_member_access_operator=false +space_before_open_square_brackets=false +space_after_keywords_in_control_flow_statements=true +space_before_comma=false +space_between_method_call_name_and_opening_parenthesis=false +space_between_method_declaration_name_and_open_parenthesis=false +space_between_square_brackets=false +space_between_parentheses_of_control_flow_statements=false +accessor_owner_declaration_braces=next_line +accessor_declaration_braces=next_line +case_block_braces=next_line +initializer_braces=next_line +other_braces=next_line +allow_comment_after_lbrace=false +empty_block_style=together_same_line +braces_for_ifelse=not_required +braces_for_for=not_required +braces_for_foreach=not_required +braces_for_while=not_required +braces_for_dowhile=not_required +braces_for_using=not_required +braces_for_lock=not_required +braces_for_fixed=not_required +method_or_operator_body=expression_body +local_function_body=expression_body +constructor_or_destructor_body=expression_body +accessor_owner_body=expression_body +force_attribute_style=join +function_braces=next_line +force_control_statements_braces=always_remove +space_in_singleline_accessorholder=true +type_declaration_braces=next_line +invocable_declaration_braces=next_line +anonymous_method_declaration_braces=next_line +space_between_accessors_in_singleline_property=true +indent_nested_usings_stmt=true +space_within_empty_braces=false +indent_nested_fixed_stmt=true +indent_nested_lock_stmt=true +indent_nested_for_stmt=true +indent_nested_foreach_stmt=true +indent_nested_while_stmt=true +use_continuous_indent_inside_parens=true +indent_method_decl_pars=inside +indent_invocation_pars=inside +indent_statement_pars=inside +indent_typeparam_angles=inside +indent_typearg_angles=inside +indent_pars=inside +indent_preprocessor_if=outdent +indent_preprocessor_region=usual_indent +indent_preprocessor_other=usual_indent +indent_switch_labels=true +indent_type_constraints=true +stick_comment=false +alignment_tab_fill_style=use_spaces +align_multiline_parameter=true +align_multiline_extends_list=true +align_linq_query=true +align_multiline_binary_expressions_chain=true +outdent_binary_ops=true +align_multiline_calls_chain=true +outdent_dots=true +align_multiline_array_and_object_initializer=false +indent_anonymous_method_block=false +align_first_arg_by_paren=true +align_multiline_argument=true +align_tuple_components=true +align_multiline_expression=true +align_multiline_for_stmt=true +align_multiple_declaration=true +align_multline_type_parameter_list=true +align_multline_type_parameter_constrains=true +int_align_fields=true +int_align_properties=true +int_align_methods=true +int_align_parameters=false +int_align_variables=true +int_align_assignments=true +int_align_nested_ternary=true +int_align_invocations=false +int_align_binary_expressions=true +int_align_comments=true +int_align_switch_sections=true +keep_user_linebreaks=false +keep_existing_arrangement=false +keep_existing_linebreaks=false +max_line_length=120 +wrap_before_comma=false +special_else_if_treatment=true +place_type_attribute_on_same_line=never +place_method_attribute_on_same_line=never +place_accessorholder_attribute_on_same_line=never +place_attribute_on_same_line=never +place_accessor_attribute_on_same_line=never +place_attribute_on_same_line=never +place_field_attribute_on_same_line=never +place_attribute_on_same_line=never +wrap_parameters_style=wrap_if_long +keep_existing_declaration_parens_arrangement=false +wrap_before_declaration_lpar=false +wrap_after_declaration_lpar=false +wrap_before_declaration_rpar=false +place_constructor_initializer_on_same_line=true +keep_existing_expr_member_arrangement=false +place_expr_method_on_single_line=true +place_expr_property_on_single_line=true +place_expr_accessor_on_single_line=true +wrap_before_arrow_with_expressions=false +place_type_constraints_on_same_line=true +wrap_before_first_type_parameter_constraint=true +wrap_multiple_type_parameter_constraints_style=wrap_if_long +wrap_before_type_parameter_langle=true +wrap_before_extends_colon=false +wrap_extends_list_style=wrap_if_long +keep_existing_declaration_block_arrangement=false +place_abstract_accessorholder_on_single_line=true +place_simple_accessorholder_on_single_line=false +place_accessor_with_attrs_holder_on_single_line=false +place_simple_accessor_on_single_line=true +place_simple_method_on_single_line=false +keep_existing_enum_arrangement=false +place_simple_enum_on_single_line=false +wrap_enum_declaration=wrap_if_long +new_line_before_else=true +new_line_before_while=false +wrap_for_stmt_header_style=wrap_if_long +wrap_multiple_declaration_style=wrap_if_long +keep_existing_embedded_arrangement=false +place_simple_embedded_statement_on_same_line=false +place_simple_case_statement_on_same_line=true +keep_existing_embedded_block_arrangement=false +place_simple_embedded_block_on_same_line=false +place_simple_anonymousmethod_on_single_line=false +keep_existing_initializer_arrangement=false +place_simple_initializer_on_single_line=false +wrap_object_and_collection_initializer_style=chop_always +wrap_array_initializer_style=wrap_if_long +wrap_arguments_style=wrap_if_long +keep_existing_invocation_parens_arrangement=false +wrap_after_invocation_lpar=false +wrap_before_invocation_rpar=false +wrap_after_dot_in_method_calls=true +wrap_chained_method_calls=wrap_if_long +wrap_before_binary_opsign=false +wrap_chained_binary_expressions=wrap_if_long +force_chop_compound_if_expression=true +force_chop_compound_while_expression=true +force_chop_compound_do_expression=true +wrap_before_ternary_opsigns=true +wrap_ternary_expr_style=wrap_if_long +nested_ternary_style=expanded +wrap_linq_expressions=wrap_if_long +wrap_before_linq_expression=false +place_linq_into_on_new_line=false +wrap_verbatim_interpolated_strings=wrap_if_long +extra_spaces=remove_all +space_after_keywords_in_control_flow_statements=false +space_between_method_call_name_and_opening_parenthesis=false +space_between_method_declaration_name_and_open_parenthesis=false +space_before_typeof_parentheses=false +space_before_checked_parentheses=false +space_before_sizeof_parentheses=false +space_before_nameof_parentheses=false +space_between_keyword_and_expression=true +space_between_keyword_and_type=true +space_around_assignment_op=true +space_around_logical_op=true +space_around_binary_operator=true +space_around_equality_op=true +space_around_relational_op=true +space_around_bitwise_op=true +space_around_additive_op=true +space_around_multiplicative_op=true +space_around_shift_op=true +space_around_nullcoalescing_op=true +space_around_arrow_op=false +space_after_logical_not_op=false +space_after_unary_operator=false +space_after_cast=false +space_around_dot=false +space_around_lambda_arrow=true +space_before_pointer_asterik_declaration=false +space_before_nullable_mark=false +blank_lines_around_class_definition=1 +namespace_indentation=all +space_within_template_argument=false +align_union_type_usage=true +space_in_singleline_method=true +space_in_singleline_anonymous_method=true +space_within_single_line_array_initializer_braces=true +space_around_arrow_op=false + +# These are for markup languages (HTML, XML, etc) +spaces_around_eq_in_pi_attribute=false +space_after_last_pi_attribute=true +pi_attributes_indent=align_by_first_attribute +blank_line_after_pi=true +spaces_around_eq_in_attribute=false +space_after_last_attribute=false +space_before_self_closing=true +attribute_style=on_single_line +attribute_indent=align_by_first_attribute +sort_attributes=true +sort_class_selectors=true +max_blank_lines_between_tags=0 +linebreak_before_all_elements=true +linebreak_before_multiline_elements=true +quote_style=doublequoted +delete_quotes_from_solid_values=false +normalize_tag_names=true + + +[{.babelrc,.stylelintrc,jest.config,.eslintrc,.prettierrc,*.json,*.jsb3,*.jsb2,*.bowerrc}] +indent_size=2 + +[*.js.map] +indent_size=2 + +[*.{css,scss}] +indent_size=2 +declarations_style=separate_lines_for_nonsingle +media_query_style=separate_lines +selector_style=same_line +properties_style=separate_lines_for_nonsingle +brace_style=next_line + +[{.analysis_options,*.yml,*.yaml}] +indent_size=2 + +# Xml project files +[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}] +indent_size = 2 + +# Xml files +[*.{xml,stylecop,resx,ruleset}] +indent_size = 2 + +# Xml config files +[*.{props,targets,config,nuspec}] +indent_size = 2 + +# .net files +[*.{cs,vb}] +# These set the this. / Me. +dotnet_style_qualification_for_field=false:warning +dotnet_style_qualification_for_property=false:warning +dotnet_style_qualification_for_method=false:warning +dotnet_style_qualification_for_event=false:warning + +# These make it suggest Int32 instead of int, etc. +dotnet_style_predefined_type_for_locals_parameters_members=true:suggestion +dotnet_style_predefined_type_for_member_access=true:suggestion + +# This controls implicit access modifiers +dotnet_style_require_accessibility_modifiers=never:suggestion + +# Prefer non modified fields to be marked readonly +dotnet_style_readonly_field=true:warning + +# Parenthesis settings +dotnet_style_parentheses_in_arithmetic_binary_operators=always_for_clarity:warning +dotnet_style_parentheses_in_relational_binary_operators=always_for_clarity:warning +dotnet_style_parentheses_in_other_binary_operators=always_for_clarity:warning +dotnet_style_parentheses_in_other_operators=always_for_clarity:warning + +dotnet_style_object_initializer=true:suggestion +dotnet_style_collection_initializer=true:suggestion +dotnet_style_explicit_tuple_names=true:error +dotnet_style_prefer_inferred_tuple_names=true:warning +dotnet_style_prefer_inferred_anonymous_type_member_names=true:warning +dotnet_style_prefer_is_null_check_over_reference_equality_method=true:warning +dotnet_style_prefer_conditional_expression_over_return=true:warning +dotnet_style_coalesce_expression=true:warning +dotnet_style_null_propagation=true:error + +dotnet_sort_system_directives_first=true + +# Constants in C style, all-caps +dotnet_naming_rule.constant_fields_caps.symbols = constant_fields +dotnet_naming_rule.constant_fields_caps.severity = warning +dotnet_naming_rule.constant_fields_caps.style = caps_style +dotnet_naming_symbols.constant_fields.applicable_kinds = field +dotnet_naming_symbols.constant_fields.required_modifiers = const +dotnet_naming_style.caps_style.capitalization = all_upper + +# interfaces should be prefixed with I +dotnet_naming_rule.pascal_case_for_interface.severity = error +dotnet_naming_rule.pascal_case_for_interface.symbols = interfaces_fields +dotnet_naming_rule.pascal_case_for_interface.style = pascal_case_interface_style +dotnet_naming_symbols.interfaces_fields.applicable_kinds = interface +dotnet_naming_style.pascal_case_interface_style.required_prefix = I +dotnet_naming_style.pascal_case_interface_style.capitalization = pascal_case + +## internal and private fields should be _camelCase +dotnet_naming_rule.camel_case_for_private_internal_fields.severity = warning +dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields +dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style +dotnet_naming_symbols.private_internal_fields.applicable_kinds = field +dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal +dotnet_naming_style.camel_case_underscore_style.required_prefix = _ +dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case + +# 2018-12-07 NP: This is not yet working in VS2017 +# local variables should be camelCase +#dotnet_naming_rule.camel_case_for_locals.severity = suggestion +#dotnet_naming_rule.camel_case_for_locals.symbols = local_fields +#dotnet_naming_rule.camel_case_for_locals.style = camel_case_style +#dotnet_naming_symbols.local_fields.applicable_kinds = local +#dotnet_naming_style.camel_case_style.capitalization = camel_case + +[*.cs] +# var var var +csharp_style_var_for_built_in_types=false:warning +csharp_style_var_when_type_is_apparent=true:suggestion +csharp_style_var_elsewhere=false:warning + +csharp_style_expression_bodied_methods=when_on_single_line:suggestion +csharp_style_expression_bodied_constructors=when_on_single_line:suggestion +csharp_style_expression_bodied_operators=when_on_single_line:suggestion +csharp_style_expression_bodied_properties=when_on_single_line:suggestion +csharp_style_expression_bodied_indexers=when_on_single_line:suggestion +csharp_style_expression_bodied_accessors=when_on_single_line:suggestion + +csharp_style_pattern_matching_over_is_with_cast_check=true:warning +csharp_style_pattern_matching_over_as_with_null_check=when_on_single_line:warning + +csharp_style_inlined_variable_declaration=true:warning + +csharp_prefer_simple_default_expression=true:warning +csharp_style_deconstructed_variable_declaration=false:warning + +csharp_style_throw_expression=true:warning +csharp_style_conditional_delegate_call=true:warning + +csharp_prefer_braces=false + +csharp_new_line_before_open_brace=all +csharp_new_line_before_else=true +csharp_new_line_before_catch=true +csharp_new_line_before_finally=true +csharp_new_line_before_members_in_object_initializers=true +csharp_new_line_before_members_in_anonymous_types=true +csharp_new_line_between_query_expression_clauses=true + +csharp_indent_case_contents=true +csharp_indent_switch_labels=true +csharp_indent_labels=flush_left + +csharp_space_after_cast=false +csharp_space_after_keywords_in_control_flow_statements=false +csharp_space_between_method_declaration_parameter_list_parentheses=false +csharp_space_between_parentheses=none +csharp_space_before_colon_in_inheritance_clause=true +csharp_space_after_colon_in_inheritance_clause=true +csharp_space_around_binary_operators=before_and_after +csharp_space_between_method_declaration_empty_parameter_list_parentheses=false +csharp_space_between_method_call_name_and_opening_parenthesis=false +csharp_space_between_method_call_empty_parameter_list_parentheses=false + +csharp_preserve_single_line_statements=false +csharp_preserve_single_line_blocks=true + +csharp_blank_lines_around_region=0 +csharp_blank_lines_inside_region=0 +csharp_blank_lines_before_single_line_comment=1 +csharp_keep_blank_lines_in_declarations=1 +csharp_remove_blank_lines_near_braces_in_declarations=true +csharp_blank_lines_after_start_comment=false +csharp_blank_lines_between_using_groups=0 +csharp_blank_lines_after_using_list=1 +csharp_blank_lines_around_namespace=1 +csharp_blank_lines_inside_namespace=0 +csharp_blank_lines_around_type=1 +csharp_blank_lines_inside_type=0 +csharp_blank_lines_around_field=0 +csharp_blank_lines_around_single_line_field=0 +csharp_blank_lines_around_property=1 +csharp_blank_lines_around_single_line_property=0 +csharp_blank_lines_around_auto_property=0 +csharp_blank_lines_around_single_line_auto_property=0 +csharp_blank_lines_around_invocable=1 +csharp_blank_lines_around_single_line_invocable=1 +csharp_keep_blank_lines_in_code=1 +csharp_remove_blank_lines_near_braces_in_code=true +csharp_blank_lines_around_local_method=1 +csharp_blank_lines_around_single_line_local_method=1 +csharp_blank_lines_before_control_transfer_statements=1 +csharp_blank_lines_after_control_transfer_statements=1 +csharp_blank_lines_before_block_statements=1 +csharp_blank_lines_after_block_statements=1 +csharp_blank_lines_before_multiline_statements=1 +csharp_blank_lines_after_multiline_statements=1 + +csharp_type_declaration_braces=next_line +csharp_brace_style=next_line +csharp_indent_inside_namespace=true +csharp_invocable_declaration_braces=next_line +csharp_anonymous_method_declaration_braces=next_line +csharp_accessor_owner_declaration_braces=next_line +csharp_accessor_declaration_braces=next_line +csharp_case_block_braces=next_line +csharp_initializer_braces=next_line +csharp_other_braces=next_line +csharp_allow_comment_after_lbrace=false +csharp_empty_block_style=together_same_line + +csharp_for_built_in_types=use_explicit_type +csharp_for_simple_types=use_var_when_evident +csharp_for_other_types=use_explicit_type +csharp_prefer_separate_deconstructed_variables_declaration=true +csharp_prefer_explicit_discard_declaration=false + +csharp_instance_members_qualify_members=none +csharp_builtin_type_reference_style=use_keyword +csharp_prefer_qualified_reference=false +csharp_add_imports_to_deepest_scope=false +csharp_allow_alias=true +csharp_default_private_modifier=implicit +csharp_default_internal_modifier=explicit +csharp_arguments_literal=positional +csharp_arguments_string_literal=positional +csharp_arguments_named=positional +csharp_arguments_anonymous_function=positional +csharp_arguments_other=positional +csharp_braces_for_ifelse=not_required +csharp_braces_for_for=not_required +csharp_braces_for_foreach=not_required +csharp_braces_for_while=not_required +csharp_braces_for_dowhile=not_required +csharp_braces_for_using=not_required +csharp_braces_for_lock=not_required +csharp_braces_for_fixed=not_required +csharp_method_or_operator_body=expression_body +csharp_local_function_body=expression_body +csharp_constructor_or_destructor_body=expression_body +csharp_accessor_owner_body=expression_body +csharp_force_attribute_style=join +csharp_indent_nested_usings_stmt=true + +csharp_builtin_type_reference_for_member_access_style=use_keyword +csharp_indent_nested_fixed_stmt=true +csharp_indent_nested_lock_stmt=true +csharp_indent_nested_for_stmt=true +csharp_indent_nested_foreach_stmt=true +csharp_indent_nested_while_stmt=true +csharp_use_continuous_indent_inside_parens=true +csharp_indent_method_decl_pars=inside +csharp_indent_invocation_pars=inside +csharp_indent_statement_pars=inside +csharp_indent_typeparam_angles=inside +csharp_indent_typearg_angles=inside +csharp_indent_pars=inside +csharp_indent_preprocessor_if=outdent +csharp_indent_preprocessor_region=usual_indent +csharp_indent_preprocessor_other=usual_indent +csharp_indent_switch_labels=true +csharp_indent_type_constraints=true +csharp_stick_comment=false +csharp_alignment_tab_fill_style=use_spaces +csharp_align_multiline_parameter=true +csharp_align_multiline_extends_list=true +csharp_align_linq_query=true +csharp_align_multiline_binary_expressions_chain=true +csharp_outdent_binary_ops=true +csharp_align_multiline_calls_chain=true +csharp_outdent_dots=true +csharp_align_multiline_array_and_object_initializer=false +csharp_indent_anonymous_method_block=false +csharp_align_first_arg_by_paren=true +csharp_align_multiline_argument=true +csharp_align_tuple_components=true +csharp_align_multiline_expression=true +csharp_align_multiline_for_stmt=true +csharp_align_multiple_declaration=true +csharp_align_multline_type_parameter_list=true +csharp_align_multline_type_parameter_constrains=true +csharp_int_align_fields=true +csharp_int_align_properties=true +csharp_int_align_methods=true +csharp_int_align_parameters=false +csharp_int_align_variables=true +csharp_int_align_assignments=true +csharp_int_align_nested_ternary=true +csharp_int_align_invocations=false +csharp_int_align_binary_expressions=true +csharp_int_align_comments=true +csharp_int_align_switch_sections=true +csharp_int_align=true +csharp_keep_user_linebreaks=false +csharp_keep_existing_arrangement=false +csharp_keep_existing_linebreaks=false +csharp_max_line_length=120 +csharp_wrap_before_comma=false +csharp_special_else_if_treatment=true +csharp_insert_final_newline=false +csharp_place_type_attribute_on_same_line=never +csharp_place_method_attribute_on_same_line=never +csharp_place_accessorholder_attribute_on_same_line=never +csharp_place_attribute_on_same_line=never +csharp_place_accessor_attribute_on_same_line=never +csharp_place_attribute_on_same_line=never +csharp_place_field_attribute_on_same_line=never +csharp_place_attribute_on_same_line=never +csharp_wrap_parameters_style=wrap_if_long +csharp_keep_existing_declaration_parens_arrangement=false +csharp_wrap_before_declaration_lpar=false +csharp_wrap_after_declaration_lpar=false +csharp_wrap_before_declaration_rpar=false +csharp_place_constructor_initializer_on_same_line=true +csharp_keep_existing_expr_member_arrangement=false +csharp_place_expr_method_on_single_line=true +csharp_place_expr_property_on_single_line=true +csharp_place_expr_accessor_on_single_line=true +csharp_wrap_before_arrow_with_expressions=false +csharp_place_type_constraints_on_same_line=true +csharp_wrap_before_first_type_parameter_constraint=true +csharp_wrap_multiple_type_parameter_constraints_style=wrap_if_long +csharp_wrap_before_type_parameter_langle=true +csharp_wrap_before_extends_colon=false +csharp_wrap_extends_list_style=wrap_if_long +csharp_keep_existing_declaration_block_arrangement=false +csharp_place_abstract_accessorholder_on_single_line=true +csharp_place_simple_accessorholder_on_single_line=false +csharp_place_accessor_with_attrs_holder_on_single_line=false +csharp_place_simple_accessor_on_single_line=true +csharp_place_simple_method_on_single_line=false +csharp_keep_existing_enum_arrangement=false +csharp_place_simple_enum_on_single_line=false +csharp_wrap_enum_declaration=wrap_if_long +csharp_new_line_before_else=true +csharp_new_line_before_while=false +csharp_wrap_for_stmt_header_style=wrap_if_long +csharp_wrap_multiple_declaration_style=wrap_if_long +csharp_keep_existing_embedded_arrangement=false +csharp_place_simple_embedded_statement_on_same_line=false +csharp_place_simple_case_statement_on_same_line=true +csharp_keep_existing_embedded_block_arrangement=false +csharp_place_simple_embedded_block_on_same_line=false +csharp_place_simple_anonymousmethod_on_single_line=false +csharp_keep_existing_initializer_arrangement=false +csharp_place_simple_initializer_on_single_line=false +csharp_wrap_object_and_collection_initializer_style=chop_always +csharp_wrap_array_initializer_style=wrap_if_long +csharp_wrap_arguments_style=wrap_if_long +csharp_keep_existing_invocation_parens_arrangement=false +csharp_wrap_after_invocation_lpar=false +csharp_wrap_before_invocation_rpar=false +csharp_wrap_after_dot_in_method_calls=true +csharp_wrap_chained_method_calls=wrap_if_long +csharp_wrap_before_binary_opsign=false +csharp_wrap_chained_binary_expressions=wrap_if_long +csharp_force_chop_compound_if_expression=true +csharp_force_chop_compound_while_expression=true +csharp_force_chop_compound_do_expression=true +csharp_wrap_before_ternary_opsigns=true +csharp_wrap_ternary_expr_style=wrap_if_long +csharp_nested_ternary_style=expanded +csharp_wrap_linq_expressions=wrap_if_long +csharp_wrap_before_linq_expression=false +csharp_place_linq_into_on_new_line=false +csharp_wrap_verbatim_interpolated_strings=wrap_if_long +csharp_extra_spaces=remove_all +csharp_space_after_keywords_in_control_flow_statements=false +csharp_space_between_method_call_name_and_opening_parenthesis=false +csharp_space_between_method_declaration_name_and_open_parenthesis=false +csharp_space_before_typeof_parentheses=false +csharp_space_before_checked_parentheses=false +csharp_space_before_sizeof_parentheses=false +csharp_space_before_nameof_parentheses=false +csharp_space_between_keyword_and_expression=true +csharp_space_between_keyword_and_type=true +csharp_space_around_assignment_op=true +csharp_space_around_logical_op=true +csharp_space_around_binary_operator=true +csharp_space_around_equality_op=true +csharp_space_around_relational_op=true +csharp_space_around_bitwise_op=true +csharp_space_around_additive_op=true +csharp_space_around_multiplicative_op=true +csharp_space_around_shift_op=true +csharp_space_around_nullcoalescing_op=true +csharp_space_around_arrow_op=false +csharp_space_after_logical_not_op=false +csharp_space_after_unary_operator=false +csharp_space_after_cast=false +csharp_space_around_dot=false +csharp_space_around_lambda_arrow=true +csharp_space_before_pointer_asterik_declaration=false +csharp_space_before_nullable_mark=false + +[*.cshtml] +linebreaks_around_razor_statements=true +blank_lines_around_razor_functions=true +blank_lines_around_razor_helpers=true +blank_lines_around_razor_sections=true + +# C++ +[*.{cc,cpp,cxx,h,hpp,hxx}] +cpp_indent_access_specifiers_from_class=true +cpp_indent_wrapped_function_names=false +cpp_align_multiline_type_argument=true + +# C, C++ and ObjectiveC +[*.{c,h,cc,cpp,cxx,m,hpp,hxx}] +indent_preprocessor_directives=normal +indent_type_constraints=true + +# Javascript and Typescript +[*.{js,js.map,ts}] +quote_style=doublequoted +termination_style=ensure_semicolon \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..47d474d --- /dev/null +++ b/.gitignore @@ -0,0 +1,608 @@ +### VisualStudio template +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ +### Linux template + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* +### Xcode template +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +build/ +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +### VisualStudioCode template +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +### C++ template +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o + +# Precompiled Headers +*.gch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app +### MonoDevelop template +#User Specific +*.usertasks + +#Mono Project Files +*.resources +test-results/ +### GPG template +secring.* + +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### CMake template +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +### C template +# Object files +*.ko +*.elf + +# Linker output +*.map +*.exp + +*.so.* + +# Executables +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf +### Windows template +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# NuGet Packages Directory +packages/ +## TODO: If the tool you use requires repositories.config uncomment the next line +#!packages/repositories.config + +# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets +# This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented) +!packages/build/ + + +# Others +sql/ +*.Cache + +# Visual Studio 2017 +.vs + +workspace.xml +cmake-build-debug +### macOS template +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +pkg/**/pkg +pkg/**/src +pkg/**/*.asc +pkg/**/*.sig +pkg/**/*.tar.xz +pkg/**/*.zip +pkg/**/aaru + +.sonarqube + +build/* \ No newline at end of file diff --git a/.~lock.Benchmarks.ods# b/.~lock.Benchmarks.ods# new file mode 100644 index 0000000..195cfb6 --- /dev/null +++ b/.~lock.Benchmarks.ods# @@ -0,0 +1 @@ +,claunia,serket,22.09.2021 05:20,file:///home/claunia/.config/libreoffice/4; \ No newline at end of file diff --git a/Aaru.Checksums/.editorconfig b/Aaru.Checksums/.editorconfig new file mode 100644 index 0000000..9181fe5 --- /dev/null +++ b/Aaru.Checksums/.editorconfig @@ -0,0 +1,632 @@ +root = true + +[*] +charset = utf-8 +next_line = crlf +insert_final_newline = false +indent_style = space +indent_size = 4 + +# Generic non-language specific ones for Resharper and friends +brace_style = next_line +int_align = true +keep_existing_arrangement = false +place_simple_blocks_on_single_line = true +place_simple_declaration_blocks_on_single_line = true +place_attribute_on_same_line = false +space_after_unary_operator = false +space_after_comma = true +space_around_ternary_operator = true +space_around_binary_operator = true +space_around_member_access_operator = false +space_before_open_square_brackets = false +space_after_keywords_in_control_flow_statements = true +space_before_comma = false +space_between_method_call_name_and_opening_parenthesis = false +space_between_method_declaration_name_and_open_parenthesis = false +space_between_square_brackets = false +space_between_parentheses_of_control_flow_statements = false +accessor_owner_declaration_braces = next_line +accessor_declaration_braces = next_line +case_block_braces = next_line +initializer_braces = next_line +other_braces = next_line +allow_comment_after_lbrace = false +empty_block_style = together_same_line +braces_for_ifelse = not_required +braces_for_for = not_required +braces_for_foreach = not_required +braces_for_while = not_required +braces_for_dowhile = not_required +braces_for_using = not_required +braces_for_lock = not_required +braces_for_fixed = not_required +method_or_operator_body = expression_body +local_function_body = expression_body +constructor_or_destructor_body = expression_body +accessor_owner_body = expression_body +force_attribute_style = join +function_braces = next_line +force_control_statements_braces = always_remove +space_in_singleline_accessorholder = true +type_declaration_braces = next_line +invocable_declaration_braces = next_line +anonymous_method_declaration_braces = next_line +space_between_accessors_in_singleline_property = true +indent_nested_usings_stmt = true +space_within_empty_braces = false +indent_nested_fixed_stmt = true +indent_nested_lock_stmt = true +indent_nested_for_stmt = true +indent_nested_foreach_stmt = true +indent_nested_while_stmt = true +use_continuous_indent_inside_parens = true +indent_method_decl_pars = inside +indent_invocation_pars = inside +indent_statement_pars = inside +indent_typeparam_angles = inside +indent_typearg_angles = inside +indent_pars = inside +indent_preprocessor_if = outdent +indent_preprocessor_region = usual_indent +indent_preprocessor_other = usual_indent +indent_switch_labels = true +indent_type_constraints = true +stick_comment = false +alignment_tab_fill_style = use_spaces +align_multiline_parameter = true +align_multiline_extends_list = true +align_linq_query = true +align_multiline_binary_expressions_chain = true +outdent_binary_ops = true +align_multiline_calls_chain = true +outdent_dots = true +align_multiline_array_and_object_initializer = false +indent_anonymous_method_block = false +align_first_arg_by_paren = true +align_multiline_argument = true +align_tuple_components = true +align_multiline_expression = true +align_multiline_for_stmt = true +align_multiple_declaration = true +align_multline_type_parameter_list = true +align_multline_type_parameter_constrains = true +int_align_fields = true +int_align_properties = true +int_align_methods = true +int_align_parameters = false +int_align_variables = true +int_align_assignments = true +int_align_nested_ternary = true +int_align_invocations = false +int_align_binary_expressions = true +int_align_comments = true +int_align_switch_sections = true +keep_user_linebreaks = false +keep_existing_arrangement = false +keep_existing_linebreaks = false +max_line_length = 120 +wrap_before_comma = false +special_else_if_treatment = true +place_type_attribute_on_same_line = never +place_method_attribute_on_same_line = never +place_accessorholder_attribute_on_same_line = never +place_attribute_on_same_line = never +place_accessor_attribute_on_same_line = never +place_attribute_on_same_line = never +place_field_attribute_on_same_line = never +place_attribute_on_same_line = never +wrap_parameters_style = wrap_if_long +keep_existing_declaration_parens_arrangement = false +wrap_before_declaration_lpar = false +wrap_after_declaration_lpar = false +wrap_before_declaration_rpar = false +place_constructor_initializer_on_same_line = true +keep_existing_expr_member_arrangement = false +place_expr_method_on_single_line = true +place_expr_property_on_single_line = true +place_expr_accessor_on_single_line = true +wrap_before_arrow_with_expressions = false +place_type_constraints_on_same_line = true +wrap_before_first_type_parameter_constraint = true +wrap_multiple_type_parameter_constraints_style = wrap_if_long +wrap_before_type_parameter_langle = true +wrap_before_extends_colon = false +wrap_extends_list_style = wrap_if_long +keep_existing_declaration_block_arrangement = false +place_abstract_accessorholder_on_single_line = true +place_simple_accessorholder_on_single_line = false +place_accessor_with_attrs_holder_on_single_line = false +place_simple_accessor_on_single_line = true +place_simple_method_on_single_line = false +keep_existing_enum_arrangement = false +place_simple_enum_on_single_line = false +wrap_enum_declaration = wrap_if_long +new_line_before_else = true +new_line_before_while = false +wrap_for_stmt_header_style = wrap_if_long +wrap_multiple_declaration_style = wrap_if_long +keep_existing_embedded_arrangement = false +place_simple_embedded_statement_on_same_line = false +place_simple_case_statement_on_same_line = true +keep_existing_embedded_block_arrangement = false +place_simple_embedded_block_on_same_line = false +place_simple_anonymousmethod_on_single_line = false +keep_existing_initializer_arrangement = false +place_simple_initializer_on_single_line = false +wrap_object_and_collection_initializer_style = chop_always +wrap_array_initializer_style = wrap_if_long +wrap_arguments_style = wrap_if_long +keep_existing_invocation_parens_arrangement = false +wrap_after_invocation_lpar = false +wrap_before_invocation_rpar = false +wrap_after_dot_in_method_calls = true +wrap_chained_method_calls = wrap_if_long +wrap_before_binary_opsign = false +wrap_chained_binary_expressions = wrap_if_long +force_chop_compound_if_expression = true +force_chop_compound_while_expression = true +force_chop_compound_do_expression = true +wrap_before_ternary_opsigns = true +wrap_ternary_expr_style = wrap_if_long +nested_ternary_style = expanded +wrap_linq_expressions = wrap_if_long +wrap_before_linq_expression = false +place_linq_into_on_new_line = false +wrap_verbatim_interpolated_strings = wrap_if_long +extra_spaces = remove_all +space_after_keywords_in_control_flow_statements = false +space_between_method_call_name_and_opening_parenthesis = false +space_between_method_declaration_name_and_open_parenthesis = false +space_before_typeof_parentheses = false +space_before_checked_parentheses = false +space_before_sizeof_parentheses = false +space_before_nameof_parentheses = false +space_between_keyword_and_expression = true +space_between_keyword_and_type = true +space_around_assignment_op = true +space_around_logical_op = true +space_around_binary_operator = true +space_around_equality_op = true +space_around_relational_op = true +space_around_bitwise_op = true +space_around_additive_op = true +space_around_multiplicative_op = true +space_around_shift_op = true +space_around_nullcoalescing_op = true +space_around_arrow_op = false +space_after_logical_not_op = false +space_after_unary_operator = false +space_after_cast = false +space_around_dot = false +space_around_lambda_arrow = true +space_before_pointer_asterik_declaration = false +space_before_nullable_mark = false +blank_lines_around_class_definition = 1 +namespace_indentation = all +space_within_template_argument = false +align_union_type_usage = true +space_in_singleline_method = true +space_in_singleline_anonymous_method = true +space_within_single_line_array_initializer_braces = true +space_around_arrow_op = false + +# These are for markup languages (HTML, XML, etc) +spaces_around_eq_in_pi_attribute = false +space_after_last_pi_attribute = true +pi_attributes_indent = align_by_first_attribute +blank_line_after_pi = true +spaces_around_eq_in_attribute = false +space_after_last_attribute = false +space_before_self_closing = true +attribute_style = on_single_line +attribute_indent = align_by_first_attribute +sort_attributes = true +sort_class_selectors = true +max_blank_lines_between_tags = 0 +linebreak_before_all_elements = true +linebreak_before_multiline_elements = true +quote_style = doublequoted +delete_quotes_from_solid_values = false +normalize_tag_names = true + + +[{.babelrc,.stylelintrc,jest.config,.eslintrc,.prettierrc,*.json,*.jsb3,*.jsb2,*.bowerrc}] +indent_size = 2 + +[*.js.map] +indent_size = 2 + +[*.{css,scss}] +indent_size = 2 +declarations_style = separate_lines_for_nonsingle +media_query_style = separate_lines +selector_style = same_line +properties_style = separate_lines_for_nonsingle +brace_style = next_line + +[{.analysis_options,*.yml,*.yaml}] +indent_size = 2 + +# Xml project files +[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}] +indent_size = 2 + +# Xml files +[*.{xml,stylecop,resx,ruleset}] +indent_size = 2 + +# Xml config files +[*.{props,targets,config,nuspec}] +indent_size = 2 + +# .net files +[*.{cs,vb}] +# These set the this. / Me. +dotnet_style_qualification_for_field = false:warning +dotnet_style_qualification_for_property = false:warning +dotnet_style_qualification_for_method = false:warning +dotnet_style_qualification_for_event = false:warning + +# These make it suggest Int32 instead of int, etc. +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion +dotnet_style_predefined_type_for_member_access = true:suggestion + +# This controls implicit access modifiers +dotnet_style_require_accessibility_modifiers = never:suggestion + +# Prefer non modified fields to be marked readonly +dotnet_style_readonly_field = true:warning + +# Parenthesis settings +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning +dotnet_style_parentheses_in_other_operators = always_for_clarity:warning + +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:error +dotnet_style_prefer_inferred_tuple_names = true:warning +dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning +dotnet_style_prefer_conditional_expression_over_return = true:warning +dotnet_style_coalesce_expression = true:warning +dotnet_style_null_propagation = true:error + +dotnet_sort_system_directives_first = true + +# Constants in C style, all-caps +dotnet_naming_rule.constant_fields_caps.symbols = constant_fields +dotnet_naming_rule.constant_fields_caps.severity = warning +dotnet_naming_rule.constant_fields_caps.style = caps_style +dotnet_naming_symbols.constant_fields.applicable_kinds = field +dotnet_naming_symbols.constant_fields.required_modifiers = const +dotnet_naming_style.caps_style.capitalization = all_upper + +# interfaces should be prefixed with I +dotnet_naming_rule.pascal_case_for_interface.severity = error +dotnet_naming_rule.pascal_case_for_interface.symbols = interfaces_fields +dotnet_naming_rule.pascal_case_for_interface.style = pascal_case_interface_style +dotnet_naming_symbols.interfaces_fields.applicable_kinds = interface +dotnet_naming_style.pascal_case_interface_style.required_prefix = I +dotnet_naming_style.pascal_case_interface_style.capitalization = pascal_case + +## internal and private fields should be _camelCase +dotnet_naming_rule.camel_case_for_private_internal_fields.severity = warning +dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields +dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style +dotnet_naming_symbols.private_internal_fields.applicable_kinds = field +dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal +dotnet_naming_style.camel_case_underscore_style.required_prefix = _ +dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case + +# 2018-12-07 NP: This is not yet working in VS2017 +# local variables should be camelCase +#dotnet_naming_rule.camel_case_for_locals.severity = suggestion +#dotnet_naming_rule.camel_case_for_locals.symbols = local_fields +#dotnet_naming_rule.camel_case_for_locals.style = camel_case_style +#dotnet_naming_symbols.local_fields.applicable_kinds = local +#dotnet_naming_style.camel_case_style.capitalization = camel_case + +[*.cs] +# var var var +csharp_style_var_for_built_in_types = false:warning +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_var_elsewhere = false:warning + +csharp_style_expression_bodied_methods = when_on_single_line:suggestion +csharp_style_expression_bodied_constructors = when_on_single_line:suggestion +csharp_style_expression_bodied_operators = when_on_single_line:suggestion +csharp_style_expression_bodied_properties = when_on_single_line:suggestion +csharp_style_expression_bodied_indexers = when_on_single_line:suggestion +csharp_style_expression_bodied_accessors = when_on_single_line:suggestion + +csharp_style_pattern_matching_over_is_with_cast_check = true:warning +csharp_style_pattern_matching_over_as_with_null_check = when_on_single_line:warning + +csharp_style_inlined_variable_declaration = true:warning + +csharp_prefer_simple_default_expression = true:warning +csharp_style_deconstructed_variable_declaration = false:warning + +csharp_style_throw_expression = true:warning +csharp_style_conditional_delegate_call = true:warning + +csharp_prefer_braces = false + +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_between_query_expression_clauses = true + +csharp_indent_case_contents = true +csharp_indent_switch_labels = true +csharp_indent_labels = flush_left + +csharp_space_after_cast = false +csharp_space_after_keywords_in_control_flow_statements = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = none +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_around_binary_operators = before_and_after +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false + +csharp_preserve_single_line_statements = false +csharp_preserve_single_line_blocks = true + +csharp_blank_lines_around_region = 0 +csharp_blank_lines_inside_region = 0 +csharp_blank_lines_before_single_line_comment = 1 +csharp_keep_blank_lines_in_declarations = 1 +csharp_remove_blank_lines_near_braces_in_declarations = true +csharp_blank_lines_after_start_comment = false +csharp_blank_lines_between_using_groups = 0 +csharp_blank_lines_after_using_list = 1 +csharp_blank_lines_around_namespace = 1 +csharp_blank_lines_inside_namespace = 0 +csharp_blank_lines_around_type = 1 +csharp_blank_lines_inside_type = 0 +csharp_blank_lines_around_field = 0 +csharp_blank_lines_around_single_line_field = 0 +csharp_blank_lines_around_property = 1 +csharp_blank_lines_around_single_line_property = 0 +csharp_blank_lines_around_auto_property = 0 +csharp_blank_lines_around_single_line_auto_property = 0 +csharp_blank_lines_around_invocable = 1 +csharp_blank_lines_around_single_line_invocable = 1 +csharp_keep_blank_lines_in_code = 1 +csharp_remove_blank_lines_near_braces_in_code = true +csharp_blank_lines_around_local_method = 1 +csharp_blank_lines_around_single_line_local_method = 1 +csharp_blank_lines_before_control_transfer_statements = 1 +csharp_blank_lines_after_control_transfer_statements = 1 +csharp_blank_lines_before_block_statements = 1 +csharp_blank_lines_after_block_statements = 1 +csharp_blank_lines_before_multiline_statements = 1 +csharp_blank_lines_after_multiline_statements = 1 + +csharp_type_declaration_braces = next_line +csharp_brace_style = next_line +csharp_indent_inside_namespace = true +csharp_invocable_declaration_braces = next_line +csharp_anonymous_method_declaration_braces = next_line +csharp_accessor_owner_declaration_braces = next_line +csharp_accessor_declaration_braces = next_line +csharp_case_block_braces = next_line +csharp_initializer_braces = next_line +csharp_other_braces = next_line +csharp_allow_comment_after_lbrace = false +csharp_empty_block_style = together_same_line + +csharp_for_built_in_types = use_explicit_type +csharp_for_simple_types = use_var_when_evident +csharp_for_other_types = use_explicit_type +csharp_prefer_separate_deconstructed_variables_declaration = true +csharp_prefer_explicit_discard_declaration = false + +csharp_instance_members_qualify_members = none +csharp_builtin_type_reference_style = use_keyword +csharp_prefer_qualified_reference = false +csharp_add_imports_to_deepest_scope = false +csharp_allow_alias = true +csharp_default_private_modifier = implicit +csharp_default_internal_modifier = explicit +csharp_arguments_literal = positional +csharp_arguments_string_literal = positional +csharp_arguments_named = positional +csharp_arguments_anonymous_function = positional +csharp_arguments_other = positional +csharp_braces_for_ifelse = not_required +csharp_braces_for_for = not_required +csharp_braces_for_foreach = not_required +csharp_braces_for_while = not_required +csharp_braces_for_dowhile = not_required +csharp_braces_for_using = not_required +csharp_braces_for_lock = not_required +csharp_braces_for_fixed = not_required +csharp_method_or_operator_body = expression_body +csharp_local_function_body = expression_body +csharp_constructor_or_destructor_body = expression_body +csharp_accessor_owner_body = expression_body +csharp_force_attribute_style = join +csharp_indent_nested_usings_stmt = true + +csharp_builtin_type_reference_for_member_access_style = use_keyword +csharp_indent_nested_fixed_stmt = true +csharp_indent_nested_lock_stmt = true +csharp_indent_nested_for_stmt = true +csharp_indent_nested_foreach_stmt = true +csharp_indent_nested_while_stmt = true +csharp_use_continuous_indent_inside_parens = true +csharp_indent_method_decl_pars = inside +csharp_indent_invocation_pars = inside +csharp_indent_statement_pars = inside +csharp_indent_typeparam_angles = inside +csharp_indent_typearg_angles = inside +csharp_indent_pars = inside +csharp_indent_preprocessor_if = outdent +csharp_indent_preprocessor_region = usual_indent +csharp_indent_preprocessor_other = usual_indent +csharp_indent_switch_labels = true +csharp_indent_type_constraints = true +csharp_stick_comment = false +csharp_alignment_tab_fill_style = use_spaces +csharp_align_multiline_parameter = true +csharp_align_multiline_extends_list = true +csharp_align_linq_query = true +csharp_align_multiline_binary_expressions_chain = true +csharp_outdent_binary_ops = true +csharp_align_multiline_calls_chain = true +csharp_outdent_dots = true +csharp_align_multiline_array_and_object_initializer = false +csharp_indent_anonymous_method_block = false +csharp_align_first_arg_by_paren = true +csharp_align_multiline_argument = true +csharp_align_tuple_components = true +csharp_align_multiline_expression = true +csharp_align_multiline_for_stmt = true +csharp_align_multiple_declaration = true +csharp_align_multline_type_parameter_list = true +csharp_align_multline_type_parameter_constrains = true +csharp_int_align_fields = true +csharp_int_align_properties = true +csharp_int_align_methods = true +csharp_int_align_parameters = false +csharp_int_align_variables = true +csharp_int_align_assignments = true +csharp_int_align_nested_ternary = true +csharp_int_align_invocations = false +csharp_int_align_binary_expressions = true +csharp_int_align_comments = true +csharp_int_align_switch_sections = true +csharp_int_align = true +csharp_keep_user_linebreaks = false +csharp_keep_existing_arrangement = false +csharp_keep_existing_linebreaks = false +csharp_max_line_length = 120 +csharp_wrap_before_comma = false +csharp_special_else_if_treatment = true +csharp_insert_final_newline = false +csharp_place_type_attribute_on_same_line = never +csharp_place_method_attribute_on_same_line = never +csharp_place_accessorholder_attribute_on_same_line = never +csharp_place_attribute_on_same_line = never +csharp_place_accessor_attribute_on_same_line = never +csharp_place_attribute_on_same_line = never +csharp_place_field_attribute_on_same_line = never +csharp_place_attribute_on_same_line = never +csharp_wrap_parameters_style = wrap_if_long +csharp_keep_existing_declaration_parens_arrangement = false +csharp_wrap_before_declaration_lpar = false +csharp_wrap_after_declaration_lpar = false +csharp_wrap_before_declaration_rpar = false +csharp_place_constructor_initializer_on_same_line = true +csharp_keep_existing_expr_member_arrangement = false +csharp_place_expr_method_on_single_line = true +csharp_place_expr_property_on_single_line = true +csharp_place_expr_accessor_on_single_line = true +csharp_wrap_before_arrow_with_expressions = false +csharp_place_type_constraints_on_same_line = true +csharp_wrap_before_first_type_parameter_constraint = true +csharp_wrap_multiple_type_parameter_constraints_style = wrap_if_long +csharp_wrap_before_type_parameter_langle = true +csharp_wrap_before_extends_colon = false +csharp_wrap_extends_list_style = wrap_if_long +csharp_keep_existing_declaration_block_arrangement = false +csharp_place_abstract_accessorholder_on_single_line = true +csharp_place_simple_accessorholder_on_single_line = false +csharp_place_accessor_with_attrs_holder_on_single_line = false +csharp_place_simple_accessor_on_single_line = true +csharp_place_simple_method_on_single_line = false +csharp_keep_existing_enum_arrangement = false +csharp_place_simple_enum_on_single_line = false +csharp_wrap_enum_declaration = wrap_if_long +csharp_new_line_before_else = true +csharp_new_line_before_while = false +csharp_wrap_for_stmt_header_style = wrap_if_long +csharp_wrap_multiple_declaration_style = wrap_if_long +csharp_keep_existing_embedded_arrangement = false +csharp_place_simple_embedded_statement_on_same_line = false +csharp_place_simple_case_statement_on_same_line = true +csharp_keep_existing_embedded_block_arrangement = false +csharp_place_simple_embedded_block_on_same_line = false +csharp_place_simple_anonymousmethod_on_single_line = false +csharp_keep_existing_initializer_arrangement = false +csharp_place_simple_initializer_on_single_line = false +csharp_wrap_object_and_collection_initializer_style = chop_always +csharp_wrap_array_initializer_style = wrap_if_long +csharp_wrap_arguments_style = wrap_if_long +csharp_keep_existing_invocation_parens_arrangement = false +csharp_wrap_after_invocation_lpar = false +csharp_wrap_before_invocation_rpar = false +csharp_wrap_after_dot_in_method_calls = true +csharp_wrap_chained_method_calls = wrap_if_long +csharp_wrap_before_binary_opsign = false +csharp_wrap_chained_binary_expressions = wrap_if_long +csharp_force_chop_compound_if_expression = true +csharp_force_chop_compound_while_expression = true +csharp_force_chop_compound_do_expression = true +csharp_wrap_before_ternary_opsigns = true +csharp_wrap_ternary_expr_style = wrap_if_long +csharp_nested_ternary_style = expanded +csharp_wrap_linq_expressions = wrap_if_long +csharp_wrap_before_linq_expression = false +csharp_place_linq_into_on_new_line = false +csharp_wrap_verbatim_interpolated_strings = wrap_if_long +csharp_extra_spaces = remove_all +csharp_space_after_keywords_in_control_flow_statements = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_declaration_name_and_open_parenthesis = false +csharp_space_before_typeof_parentheses = false +csharp_space_before_checked_parentheses = false +csharp_space_before_sizeof_parentheses = false +csharp_space_before_nameof_parentheses = false +csharp_space_between_keyword_and_expression = true +csharp_space_between_keyword_and_type = true +csharp_space_around_assignment_op = true +csharp_space_around_logical_op = true +csharp_space_around_binary_operator = true +csharp_space_around_equality_op = true +csharp_space_around_relational_op = true +csharp_space_around_bitwise_op = true +csharp_space_around_additive_op = true +csharp_space_around_multiplicative_op = true +csharp_space_around_shift_op = true +csharp_space_around_nullcoalescing_op = true +csharp_space_around_arrow_op = false +csharp_space_after_logical_not_op = false +csharp_space_after_unary_operator = false +csharp_space_after_cast = false +csharp_space_around_dot = false +csharp_space_around_lambda_arrow = true +csharp_space_before_pointer_asterik_declaration = false +csharp_space_before_nullable_mark = false + +[*.cshtml] +linebreaks_around_razor_statements = true +blank_lines_around_razor_functions = true +blank_lines_around_razor_helpers = true +blank_lines_around_razor_sections = true + +# C++ +[*.{cc,cpp,cxx,h,hpp,hxx}] +cpp_indent_access_specifiers_from_class = true +cpp_indent_wrapped_function_names = false +cpp_align_multiline_type_argument = true + +# C, C++ and ObjectiveC +[*.{c,h,cc,cpp,cxx,m,hpp,hxx}] +indent_preprocessor_directives = normal +indent_type_constraints = true + +# Javascript and Typescript +[*.{js,js.map,ts}] +quote_style = doublequoted +termination_style = ensure_semicolon \ No newline at end of file diff --git a/Aaru.Checksums/.gitignore b/Aaru.Checksums/.gitignore new file mode 100644 index 0000000..05c540d --- /dev/null +++ b/Aaru.Checksums/.gitignore @@ -0,0 +1,595 @@ +### VisualStudio template +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ +### Linux template + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* +### Xcode template +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +build/ +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +### VisualStudioCode template +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +### C++ template +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o + +# Precompiled Headers +*.gch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app +### MonoDevelop template +#User Specific +*.usertasks + +#Mono Project Files +*.resources +test-results/ +### GPG template +secring.* + +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/modules.xml +# .idea/*.iml +# .idea/modules + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests +### CMake template +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +### C template +# Object files +*.ko +*.elf + +# Linker output +*.map +*.exp + +*.so.* + +# Executables +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf +### Windows template +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# NuGet Packages Directory +packages/ +## TODO: If the tool you use requires repositories.config uncomment the next line +#!packages/repositories.config + +# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets +# This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented) +!packages/build/ + + +# Others +sql/ +*.Cache + +# Visual Studio 2017 +.vs + +workspace.xml +cmake-build-debug +### macOS template +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +pkg/**/pkg +pkg/**/src +pkg/**/*.asc +pkg/**/*.sig +pkg/**/*.tar.xz +pkg/**/*.zip +pkg/**/aaru + +.sonarqube \ No newline at end of file diff --git a/Aaru.Checksums/Aaru.Checksums.csproj b/Aaru.Checksums/Aaru.Checksums.csproj new file mode 100644 index 0000000..9871672 --- /dev/null +++ b/Aaru.Checksums/Aaru.Checksums.csproj @@ -0,0 +1,132 @@ + + + + Debug + AnyCPU + 2.0 + {CC48B324-A532-4A45-87A6-6F91F7141E8D} + Library + Aaru.Checksums + Aaru.Checksums + $(Version) + false + true + 6.0.0-alpha6 + Claunia.com + Copyright © 2011-2021 Natalia Portillo + Aaru Data Preservation Suite + Aaru.Checksums + $(Version) + net6 + 10 + C# implementation of CRC16, CRC32, CRC64, Fletcher, MD5, SHA1, SHA2 and SpamSum. + https://github.com/aaru-dps/ + LGPL-2.1-only + https://github.com/aaru-dps/Aaru.Checksums + true + en-US + true + true + snupkg + Natalia Portillo <claunia@claunia.com> + true + + + $(Version)+{chash:8} + true + true + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + + + + + + + + + + + + + + + + + + + + + + + {F8BDF57B-1571-4CD0-84B3-B422088D359A} + Aaru.Helpers + + + {CCAA7AFE-C094-4D82-A66D-630DE8A3F545} + Aaru.Console + + + + + LICENSE.LGPL + + + LICENSE + + + + + + + + + + + + + + + + + + + + + /Library/Frameworks/Mono.framework/Versions/Current/lib/mono + /usr/lib/mono + /usr/local/lib/mono + + $(BaseFrameworkPathOverrideForMono)/4.0-api + $(BaseFrameworkPathOverrideForMono)/4.5-api + $(BaseFrameworkPathOverrideForMono)/4.5.1-api + $(BaseFrameworkPathOverrideForMono)/4.5.2-api + $(BaseFrameworkPathOverrideForMono)/4.6-api + $(BaseFrameworkPathOverrideForMono)/4.6.1-api + $(BaseFrameworkPathOverrideForMono)/4.6.2-api + $(BaseFrameworkPathOverrideForMono)/4.7-api + $(BaseFrameworkPathOverrideForMono)/4.7.1-api + true + + $(FrameworkPathOverride)/Facades;$(AssemblySearchPaths) + + \ No newline at end of file diff --git a/Aaru.Checksums/Adler32Context.cs b/Aaru.Checksums/Adler32Context.cs new file mode 100644 index 0000000..3b72244 --- /dev/null +++ b/Aaru.Checksums/Adler32Context.cs @@ -0,0 +1,165 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Adler32Context.cs +// Author(s) : Natalia Portillo +// +// Component : Checksums. +// +// --[ Description ] ---------------------------------------------------------- +// +// Implements an Adler-32 algorithm. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System.IO; +using System.Text; +using Aaru.CommonTypes.Interfaces; +using Aaru.Helpers; + +namespace Aaru.Checksums +{ + /// + /// Implements the Adler-32 algorithm + public sealed class Adler32Context : IChecksum + { + const ushort ADLER_MODULE = 65521; + ushort _sum1, _sum2; + + /// Initializes the Adler-32 sums + public Adler32Context() + { + _sum1 = 1; + _sum2 = 0; + } + + /// + /// Updates the hash with data. + /// Data buffer. + /// Length of buffer to hash. + public void Update(byte[] data, uint len) + { + for(int i = 0; i < len; i++) + { + _sum1 = (ushort)((_sum1 + data[i]) % ADLER_MODULE); + _sum2 = (ushort)((_sum2 + _sum1) % ADLER_MODULE); + } + } + + /// + /// Updates the hash with data. + /// Data buffer. + public void Update(byte[] data) => Update(data, (uint)data.Length); + + /// + /// Returns a byte array of the hash value. + public byte[] Final() + { + uint finalSum = (uint)((_sum2 << 16) | _sum1); + + return BigEndianBitConverter.GetBytes(finalSum); + } + + /// + /// Returns a hexadecimal representation of the hash value. + public string End() + { + uint finalSum = (uint)((_sum2 << 16) | _sum1); + var adlerOutput = new StringBuilder(); + + for(int i = 0; i < BigEndianBitConverter.GetBytes(finalSum).Length; i++) + adlerOutput.Append(BigEndianBitConverter.GetBytes(finalSum)[i].ToString("x2")); + + return adlerOutput.ToString(); + } + + /// Gets the hash of a file + /// File path. + public static byte[] File(string filename) + { + File(filename, out byte[] hash); + + return hash; + } + + /// Gets the hash of a file in hexadecimal and as a byte array. + /// File path. + /// Byte array of the hash value. + public static string File(string filename, out byte[] hash) + { + var fileStream = new FileStream(filename, FileMode.Open); + + ushort localSum1 = 1; + ushort localSum2 = 0; + + for(int i = 0; i < fileStream.Length; i++) + { + localSum1 = (ushort)((localSum1 + fileStream.ReadByte()) % ADLER_MODULE); + localSum2 = (ushort)((localSum2 + localSum1) % ADLER_MODULE); + } + + uint finalSum = (uint)((localSum2 << 16) | localSum1); + + hash = BigEndianBitConverter.GetBytes(finalSum); + + var adlerOutput = new StringBuilder(); + + foreach(byte h in hash) + adlerOutput.Append(h.ToString("x2")); + + fileStream.Close(); + + return adlerOutput.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Length of the data buffer to hash. + /// Byte array of the hash value. + public static string Data(byte[] data, uint len, out byte[] hash) + { + ushort localSum1 = 1; + ushort localSum2 = 0; + + for(int i = 0; i < len; i++) + { + localSum1 = (ushort)((localSum1 + data[i]) % ADLER_MODULE); + localSum2 = (ushort)((localSum2 + localSum1) % ADLER_MODULE); + } + + uint finalSum = (uint)((localSum2 << 16) | localSum1); + + hash = BigEndianBitConverter.GetBytes(finalSum); + + var adlerOutput = new StringBuilder(); + + foreach(byte h in hash) + adlerOutput.Append(h.ToString("x2")); + + return adlerOutput.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Byte array of the hash value. + public static string Data(byte[] data, out byte[] hash) => Data(data, (uint)data.Length, out hash); + } +} \ No newline at end of file diff --git a/Aaru.Checksums/CDChecksums.cs b/Aaru.Checksums/CDChecksums.cs new file mode 100644 index 0000000..cf57599 --- /dev/null +++ b/Aaru.Checksums/CDChecksums.cs @@ -0,0 +1,648 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : CDChecksums.cs +// Author(s) : Natalia Portillo +// +// Component : Checksums. +// +// --[ Description ] ---------------------------------------------------------- +// +// Implements CD checksums. +// +// --[ License ] -------------------------------------------------------------- +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program.If not, see. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ECC algorithm from ECM(c) 2002-2011 Neill Corlett +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using Aaru.Console; +using Aaru.Helpers; + +namespace Aaru.Checksums +{ + /// Implements ReedSolomon and CRC32 algorithms as used by CD-ROM + public static class CdChecksums + { + static byte[] _eccFTable; + static byte[] _eccBTable; + static uint[] _edcTable; + + /// Checks the EDC and ECC of a CD sector + /// CD sector + /// + /// true if all checks were correct, false if any of them weren't, and null if none of them + /// are present. + /// + public static bool? CheckCdSector(byte[] buffer) => CheckCdSector(buffer, out _, out _, out _); + + /// Checks the EDC and ECC of a CD sector + /// CD sector + /// + /// true if ECC P is correct, false if it isn't, and null if there is no ECC + /// P in sector. + /// + /// + /// true if ECC Q is correct, false if it isn't, and null if there is no ECC + /// Q in sector. + /// + /// + /// true if EDC is correct, false if it isn't, and null if there is no EDC in + /// sector. + /// + /// + /// true if all checks were correct, false if any of them weren't, and null if none of them + /// are present. + /// + public static bool? CheckCdSector(byte[] buffer, out bool? correctEccP, out bool? correctEccQ, + out bool? correctEdc) + { + correctEccP = null; + correctEccQ = null; + correctEdc = null; + + switch(buffer.Length) + { + case 2448: + { + byte[] subchannel = new byte[96]; + byte[] channel = new byte[2352]; + + Array.Copy(buffer, 0, channel, 0, 2352); + Array.Copy(buffer, 2352, subchannel, 0, 96); + + bool? channelStatus = + CheckCdSectorChannel(channel, out correctEccP, out correctEccQ, out correctEdc); + + bool? subchannelStatus = CheckCdSectorSubChannel(subchannel); + bool? status = null; + + if(channelStatus == false || + subchannelStatus == false) + status = false; + + switch(channelStatus) + { + case null when subchannelStatus == true: + status = true; + + break; + case true when subchannelStatus == null: + status = true; + + break; + } + + return status; + } + + case 2352: return CheckCdSectorChannel(buffer, out correctEccP, out correctEccQ, out correctEdc); + default: return null; + } + } + + static void EccInit() + { + _eccFTable = new byte[256]; + _eccBTable = new byte[256]; + _edcTable = new uint[256]; + + for(uint i = 0; i < 256; i++) + { + uint edc = i; + uint j = (uint)((i << 1) ^ ((i & 0x80) == 0x80 ? 0x11D : 0)); + _eccFTable[i] = (byte)j; + _eccBTable[i ^ j] = (byte)i; + + for(j = 0; j < 8; j++) + edc = (edc >> 1) ^ ((edc & 1) > 0 ? 0xD8018001 : 0); + + _edcTable[i] = edc; + } + } + + static bool CheckEcc(byte[] address, byte[] data, uint majorCount, uint minorCount, uint majorMult, + uint minorInc, byte[] ecc) + { + uint size = majorCount * minorCount; + uint major; + + for(major = 0; major < majorCount; major++) + { + uint index = ((major >> 1) * majorMult) + (major & 1); + byte eccA = 0; + byte eccB = 0; + uint minor; + + for(minor = 0; minor < minorCount; minor++) + { + byte temp = index < 4 ? address[index] : data[index - 4]; + index += minorInc; + + if(index >= size) + index -= size; + + eccA ^= temp; + eccB ^= temp; + eccA = _eccFTable[eccA]; + } + + eccA = _eccBTable[_eccFTable[eccA] ^ eccB]; + + if(ecc[major] != eccA || + ecc[major + majorCount] != (eccA ^ eccB)) + return false; + } + + return true; + } + + static bool? CheckCdSectorChannel(byte[] channel, out bool? correctEccP, out bool? correctEccQ, + out bool? correctEdc) + { + EccInit(); + + correctEccP = null; + correctEccQ = null; + correctEdc = null; + + if(channel[0x000] != 0x00 || + channel[0x001] != 0xFF || + channel[0x002] != 0xFF || + channel[0x003] != 0xFF || + channel[0x004] != 0xFF || + channel[0x005] != 0xFF || + channel[0x006] != 0xFF || + channel[0x007] != 0xFF || + channel[0x008] != 0xFF || + channel[0x009] != 0xFF || + channel[0x00A] != 0xFF || + channel[0x00B] != 0x00) + return null; + + //AaruConsole.DebugWriteLine("CD checksums", "Data sector, address {0:X2}:{1:X2}:{2:X2}", channel[0x00C], + // channel[0x00D], channel[0x00E]); + + if((channel[0x00F] & 0x03) == 0x00) // mode (1 byte) + { + //AaruConsole.DebugWriteLine("CD checksums", "Mode 0 sector at address {0:X2}:{1:X2}:{2:X2}", + // channel[0x00C], channel[0x00D], channel[0x00E]); + for(int i = 0x010; i < 0x930; i++) + if(channel[i] != 0x00) + { + AaruConsole.DebugWriteLine("CD checksums", + "Mode 0 sector with error at address: {0:X2}:{1:X2}:{2:X2}", + channel[0x00C], channel[0x00D], channel[0x00E]); + + return false; + } + + return true; + } + + if((channel[0x00F] & 0x03) == 0x01) // mode (1 byte) + { + //AaruConsole.DebugWriteLine("CD checksums", "Mode 1 sector at address {0:X2}:{1:X2}:{2:X2}", + // channel[0x00C], channel[0x00D], channel[0x00E]); + + if(channel[0x814] != 0x00 || // reserved (8 bytes) + channel[0x815] != 0x00 || + channel[0x816] != 0x00 || + channel[0x817] != 0x00 || + channel[0x818] != 0x00 || + channel[0x819] != 0x00 || + channel[0x81A] != 0x00 || + channel[0x81B] != 0x00) + { + AaruConsole.DebugWriteLine("CD checksums", + "Mode 1 sector with data in reserved bytes at address: {0:X2}:{1:X2}:{2:X2}", + channel[0x00C], channel[0x00D], channel[0x00E]); + + return false; + } + + byte[] address = new byte[4]; + byte[] data = new byte[2060]; + byte[] data2 = new byte[2232]; + byte[] eccP = new byte[172]; + byte[] eccQ = new byte[104]; + + Array.Copy(channel, 0x0C, address, 0, 4); + Array.Copy(channel, 0x10, data, 0, 2060); + Array.Copy(channel, 0x10, data2, 0, 2232); + Array.Copy(channel, 0x81C, eccP, 0, 172); + Array.Copy(channel, 0x8C8, eccQ, 0, 104); + + bool failedEccP = !CheckEcc(address, data, 86, 24, 2, 86, eccP); + bool failedEccQ = !CheckEcc(address, data2, 52, 43, 86, 88, eccQ); + + correctEccP = !failedEccP; + correctEccQ = !failedEccQ; + + if(failedEccP) + AaruConsole.DebugWriteLine("CD checksums", + "Mode 1 sector at address: {0:X2}:{1:X2}:{2:X2}, fails ECC P check", + channel[0x00C], channel[0x00D], channel[0x00E]); + + if(failedEccQ) + AaruConsole.DebugWriteLine("CD checksums", + "Mode 1 sector at address: {0:X2}:{1:X2}:{2:X2}, fails ECC Q check", + channel[0x00C], channel[0x00D], channel[0x00E]); + + uint storedEdc = BitConverter.ToUInt32(channel, 0x810); + uint calculatedEdc = ComputeEdc(0, channel, 0x810); + + correctEdc = calculatedEdc == storedEdc; + + if(calculatedEdc == storedEdc) + return !failedEccP && !failedEccQ; + + AaruConsole.DebugWriteLine("CD checksums", + "Mode 1 sector at address: {0:X2}:{1:X2}:{2:X2}, got CRC 0x{3:X8} expected 0x{4:X8}", + channel[0x00C], channel[0x00D], channel[0x00E], calculatedEdc, storedEdc); + + return false; + } + + if((channel[0x00F] & 0x03) == 0x02) // mode (1 byte) + { + //AaruConsole.DebugWriteLine("CD checksums", "Mode 2 sector at address {0:X2}:{1:X2}:{2:X2}", + // channel[0x00C], channel[0x00D], channel[0x00E]); + byte[] mode2Sector = new byte[channel.Length - 0x10]; + Array.Copy(channel, 0x10, mode2Sector, 0, mode2Sector.Length); + + if((channel[0x012] & 0x20) == 0x20) // mode 2 form 2 + { + if(channel[0x010] != channel[0x014] || + channel[0x011] != channel[0x015] || + channel[0x012] != channel[0x016] || + channel[0x013] != channel[0x017]) + AaruConsole.DebugWriteLine("CD checksums", + "Subheader copies differ in mode 2 form 2 sector at address: {0:X2}:{1:X2}:{2:X2}", + channel[0x00C], channel[0x00D], channel[0x00E]); + + uint storedEdc = BitConverter.ToUInt32(mode2Sector, 0x91C); + + // No CRC stored! + if(storedEdc == 0x00000000) + return true; + + uint calculatedEdc = ComputeEdc(0, mode2Sector, 0x91C); + + correctEdc = calculatedEdc == storedEdc || storedEdc == 0; + + if(calculatedEdc == storedEdc || + storedEdc == 0x00000000) + return true; + + AaruConsole.DebugWriteLine("CD checksums", + "Mode 2 form 2 sector at address: {0:X2}:{1:X2}:{2:X2}, got CRC 0x{3:X8} expected 0x{4:X8}", + channel[0x00C], channel[0x00D], channel[0x00E], calculatedEdc, + storedEdc); + + return false; + } + else + { + if(channel[0x010] != channel[0x014] || + channel[0x011] != channel[0x015] || + channel[0x012] != channel[0x016] || + channel[0x013] != channel[0x017]) + AaruConsole.DebugWriteLine("CD checksums", + "Subheader copies differ in mode 2 form 1 sector at address: {0:X2}:{1:X2}:{2:X2}", + channel[0x00C], channel[0x00D], channel[0x00E]); + + byte[] address = new byte[4]; + byte[] eccP = new byte[172]; + byte[] eccQ = new byte[104]; + + Array.Copy(mode2Sector, 0x80C, eccP, 0, 172); + Array.Copy(mode2Sector, 0x8B8, eccQ, 0, 104); + + bool failedEccP = !CheckEcc(address, mode2Sector, 86, 24, 2, 86, eccP); + bool failedEccQ = !CheckEcc(address, mode2Sector, 52, 43, 86, 88, eccQ); + + correctEccP = !failedEccP; + correctEccQ = !failedEccQ; + + if(failedEccP) + AaruConsole.DebugWriteLine("CD checksums", + "Mode 2 form 1 sector at address: {0:X2}:{1:X2}:{2:X2}, fails ECC P check", + channel[0x00C], channel[0x00D], channel[0x00E]); + + if(failedEccQ) + AaruConsole.DebugWriteLine("CD checksums", + "Mode 2 form 1 sector at address: {0:X2}:{1:X2}:{2:X2}, fails ECC Q check", + channel[0x00C], channel[0x00D], channel[0x00E]); + + uint storedEdc = BitConverter.ToUInt32(mode2Sector, 0x808); + uint calculatedEdc = ComputeEdc(0, mode2Sector, 0x808); + + correctEdc = calculatedEdc == storedEdc; + + if(calculatedEdc == storedEdc) + return !failedEccP && !failedEccQ; + + AaruConsole.DebugWriteLine("CD checksums", + "Mode 2 sector at address: {0:X2}:{1:X2}:{2:X2}, got CRC 0x{3:X8} expected 0x{4:X8}", + channel[0x00C], channel[0x00D], channel[0x00E], calculatedEdc, + storedEdc); + + return false; + } + } + + AaruConsole.DebugWriteLine("CD checksums", "Unknown mode {0} sector at address: {1:X2}:{2:X2}:{3:X2}", + channel[0x00F], channel[0x00C], channel[0x00D], channel[0x00E]); + + return null; + } + + static uint ComputeEdc(uint edc, IReadOnlyList src, int size) + { + int pos = 0; + + for(; size > 0; size--) + edc = (edc >> 8) ^ _edcTable[(edc ^ src[pos++]) & 0xFF]; + + return edc; + } + + static bool? CheckCdSectorSubChannel(IReadOnlyList subchannel) + { + bool? status = true; + byte[] qSubChannel = new byte[12]; + byte[] cdTextPack1 = new byte[18]; + byte[] cdTextPack2 = new byte[18]; + byte[] cdTextPack3 = new byte[18]; + byte[] cdTextPack4 = new byte[18]; + byte[] cdSubRwPack1 = new byte[24]; + byte[] cdSubRwPack2 = new byte[24]; + byte[] cdSubRwPack3 = new byte[24]; + byte[] cdSubRwPack4 = new byte[24]; + + int i = 0; + + for(int j = 0; j < 12; j++) + qSubChannel[j] = 0; + + for(int j = 0; j < 18; j++) + { + cdTextPack1[j] = 0; + cdTextPack2[j] = 0; + cdTextPack3[j] = 0; + cdTextPack4[j] = 0; + } + + for(int j = 0; j < 24; j++) + { + cdSubRwPack1[j] = 0; + cdSubRwPack2[j] = 0; + cdSubRwPack3[j] = 0; + cdSubRwPack4[j] = 0; + } + + for(int j = 0; j < 12; j++) + { + qSubChannel[j] = (byte)(qSubChannel[j] | ((subchannel[i++] & 0x40) << 1)); + qSubChannel[j] = (byte)(qSubChannel[j] | (subchannel[i++] & 0x40)); + qSubChannel[j] = (byte)(qSubChannel[j] | ((subchannel[i++] & 0x40) >> 1)); + qSubChannel[j] = (byte)(qSubChannel[j] | ((subchannel[i++] & 0x40) >> 2)); + qSubChannel[j] = (byte)(qSubChannel[j] | ((subchannel[i++] & 0x40) >> 3)); + qSubChannel[j] = (byte)(qSubChannel[j] | ((subchannel[i++] & 0x40) >> 4)); + qSubChannel[j] = (byte)(qSubChannel[j] | ((subchannel[i++] & 0x40) >> 5)); + qSubChannel[j] = (byte)(qSubChannel[j] | ((subchannel[i++] & 0x40) >> 6)); + } + + i = 0; + + for(int j = 0; j < 18; j++) + { + cdTextPack1[j] = (byte)(cdTextPack1[j] | ((subchannel[i++] & 0x3F) << 2)); + + if(j < 17) + cdTextPack1[j] = (byte)(cdTextPack1[j++] | ((subchannel[i] & 0xC0) >> 4)); + + cdTextPack1[j] = (byte)(cdTextPack1[j] | ((subchannel[i++] & 0x0F) << 4)); + + if(j < 17) + cdTextPack1[j] = (byte)(cdTextPack1[j++] | ((subchannel[i] & 0x3C) >> 2)); + + cdTextPack1[j] = (byte)(cdTextPack1[j] | ((subchannel[i++] & 0x03) << 6)); + + cdTextPack1[j] = (byte)(cdTextPack1[j] | (subchannel[i++] & 0x3F)); + } + + for(int j = 0; j < 18; j++) + { + cdTextPack2[j] = (byte)(cdTextPack2[j] | ((subchannel[i++] & 0x3F) << 2)); + + if(j < 17) + cdTextPack2[j] = (byte)(cdTextPack2[j++] | ((subchannel[i] & 0xC0) >> 4)); + + cdTextPack2[j] = (byte)(cdTextPack2[j] | ((subchannel[i++] & 0x0F) << 4)); + + if(j < 17) + cdTextPack2[j] = (byte)(cdTextPack2[j++] | ((subchannel[i] & 0x3C) >> 2)); + + cdTextPack2[j] = (byte)(cdTextPack2[j] | ((subchannel[i++] & 0x03) << 6)); + + cdTextPack2[j] = (byte)(cdTextPack2[j] | (subchannel[i++] & 0x3F)); + } + + for(int j = 0; j < 18; j++) + { + cdTextPack3[j] = (byte)(cdTextPack3[j] | ((subchannel[i++] & 0x3F) << 2)); + + if(j < 17) + cdTextPack3[j] = (byte)(cdTextPack3[j++] | ((subchannel[i] & 0xC0) >> 4)); + + cdTextPack3[j] = (byte)(cdTextPack3[j] | ((subchannel[i++] & 0x0F) << 4)); + + if(j < 17) + cdTextPack3[j] = (byte)(cdTextPack3[j++] | ((subchannel[i] & 0x3C) >> 2)); + + cdTextPack3[j] = (byte)(cdTextPack3[j] | ((subchannel[i++] & 0x03) << 6)); + + cdTextPack3[j] = (byte)(cdTextPack3[j] | (subchannel[i++] & 0x3F)); + } + + for(int j = 0; j < 18; j++) + { + cdTextPack4[j] = (byte)(cdTextPack4[j] | ((subchannel[i++] & 0x3F) << 2)); + + if(j < 17) + cdTextPack4[j] = (byte)(cdTextPack4[j++] | ((subchannel[i] & 0xC0) >> 4)); + + cdTextPack4[j] = (byte)(cdTextPack4[j] | ((subchannel[i++] & 0x0F) << 4)); + + if(j < 17) + cdTextPack4[j] = (byte)(cdTextPack4[j++] | ((subchannel[i] & 0x3C) >> 2)); + + cdTextPack4[j] = (byte)(cdTextPack4[j] | ((subchannel[i++] & 0x03) << 6)); + + cdTextPack4[j] = (byte)(cdTextPack4[j] | (subchannel[i++] & 0x3F)); + } + + i = 0; + + for(int j = 0; j < 24; j++) + cdSubRwPack1[j] = (byte)(subchannel[i++] & 0x3F); + + for(int j = 0; j < 24; j++) + cdSubRwPack2[j] = (byte)(subchannel[i++] & 0x3F); + + for(int j = 0; j < 24; j++) + cdSubRwPack3[j] = (byte)(subchannel[i++] & 0x3F); + + for(int j = 0; j < 24; j++) + cdSubRwPack4[j] = (byte)(subchannel[i++] & 0x3F); + + switch(cdSubRwPack1[0]) + { + case 0x00: + AaruConsole.DebugWriteLine("CD checksums", "Detected Zero Pack in subchannel"); + + break; + case 0x08: + AaruConsole.DebugWriteLine("CD checksums", "Detected Line Graphics Pack in subchannel"); + + break; + case 0x09: + AaruConsole.DebugWriteLine("CD checksums", "Detected CD+G Pack in subchannel"); + + break; + case 0x0A: + AaruConsole.DebugWriteLine("CD checksums", "Detected CD+EG Pack in subchannel"); + + break; + case 0x14: + AaruConsole.DebugWriteLine("CD checksums", "Detected CD-TEXT Pack in subchannel"); + + break; + case 0x18: + AaruConsole.DebugWriteLine("CD checksums", "Detected CD+MIDI Pack in subchannel"); + + break; + case 0x38: + AaruConsole.DebugWriteLine("CD checksums", "Detected User Pack in subchannel"); + + break; + default: + AaruConsole.DebugWriteLine("CD checksums", + "Detected unknown Pack type in subchannel: mode {0}, item {1}", + Convert.ToString(cdSubRwPack1[0] & 0x38, 2), + Convert.ToString(cdSubRwPack1[0] & 0x07, 2)); + + break; + } + + ushort qSubChannelCrc = BigEndianBitConverter.ToUInt16(qSubChannel, 10); + byte[] qSubChannelForCrc = new byte[10]; + Array.Copy(qSubChannel, 0, qSubChannelForCrc, 0, 10); + ushort calculatedQcrc = CRC16CCITTContext.Calculate(qSubChannelForCrc); + + if(qSubChannelCrc != calculatedQcrc) + { + AaruConsole.DebugWriteLine("CD checksums", "Q subchannel CRC 0x{0:X4}, expected 0x{1:X4}", + calculatedQcrc, qSubChannelCrc); + + status = false; + } + + if((cdTextPack1[0] & 0x80) == 0x80) + { + ushort cdTextPack1Crc = BigEndianBitConverter.ToUInt16(cdTextPack1, 16); + byte[] cdTextPack1ForCrc = new byte[16]; + Array.Copy(cdTextPack1, 0, cdTextPack1ForCrc, 0, 16); + ushort calculatedCdtp1Crc = CRC16CCITTContext.Calculate(cdTextPack1ForCrc); + + if(cdTextPack1Crc != calculatedCdtp1Crc && + cdTextPack1Crc != 0) + { + AaruConsole.DebugWriteLine("CD checksums", "CD-Text Pack 1 CRC 0x{0:X4}, expected 0x{1:X4}", + cdTextPack1Crc, calculatedCdtp1Crc); + + status = false; + } + } + + if((cdTextPack2[0] & 0x80) == 0x80) + { + ushort cdTextPack2Crc = BigEndianBitConverter.ToUInt16(cdTextPack2, 16); + byte[] cdTextPack2ForCrc = new byte[16]; + Array.Copy(cdTextPack2, 0, cdTextPack2ForCrc, 0, 16); + ushort calculatedCdtp2Crc = CRC16CCITTContext.Calculate(cdTextPack2ForCrc); + + AaruConsole.DebugWriteLine("CD checksums", "Cyclic CDTP2 0x{0:X4}, Calc CDTP2 0x{1:X4}", cdTextPack2Crc, + calculatedCdtp2Crc); + + if(cdTextPack2Crc != calculatedCdtp2Crc && + cdTextPack2Crc != 0) + { + AaruConsole.DebugWriteLine("CD checksums", "CD-Text Pack 2 CRC 0x{0:X4}, expected 0x{1:X4}", + cdTextPack2Crc, calculatedCdtp2Crc); + + status = false; + } + } + + if((cdTextPack3[0] & 0x80) == 0x80) + { + ushort cdTextPack3Crc = BigEndianBitConverter.ToUInt16(cdTextPack3, 16); + byte[] cdTextPack3ForCrc = new byte[16]; + Array.Copy(cdTextPack3, 0, cdTextPack3ForCrc, 0, 16); + ushort calculatedCdtp3Crc = CRC16CCITTContext.Calculate(cdTextPack3ForCrc); + + AaruConsole.DebugWriteLine("CD checksums", "Cyclic CDTP3 0x{0:X4}, Calc CDTP3 0x{1:X4}", cdTextPack3Crc, + calculatedCdtp3Crc); + + if(cdTextPack3Crc != calculatedCdtp3Crc && + cdTextPack3Crc != 0) + { + AaruConsole.DebugWriteLine("CD checksums", "CD-Text Pack 3 CRC 0x{0:X4}, expected 0x{1:X4}", + cdTextPack3Crc, calculatedCdtp3Crc); + + status = false; + } + } + + if((cdTextPack4[0] & 0x80) != 0x80) + return status; + + ushort cdTextPack4Crc = BigEndianBitConverter.ToUInt16(cdTextPack4, 16); + byte[] cdTextPack4ForCrc = new byte[16]; + Array.Copy(cdTextPack4, 0, cdTextPack4ForCrc, 0, 16); + ushort calculatedCdtp4Crc = CRC16CCITTContext.Calculate(cdTextPack4ForCrc); + + AaruConsole.DebugWriteLine("CD checksums", "Cyclic CDTP4 0x{0:X4}, Calc CDTP4 0x{1:X4}", cdTextPack4Crc, + calculatedCdtp4Crc); + + if(cdTextPack4Crc == calculatedCdtp4Crc || + cdTextPack4Crc == 0) + return status; + + AaruConsole.DebugWriteLine("CD checksums", "CD-Text Pack 4 CRC 0x{0:X4}, expected 0x{1:X4}", cdTextPack4Crc, + calculatedCdtp4Crc); + + return false; + } + } +} \ No newline at end of file diff --git a/Aaru.Checksums/CRC16CCITTContext.cs b/Aaru.Checksums/CRC16CCITTContext.cs new file mode 100644 index 0000000..486ba28 --- /dev/null +++ b/Aaru.Checksums/CRC16CCITTContext.cs @@ -0,0 +1,103 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : CRC16CCITTContext.cs +// Author(s) : Natalia Portillo +// +// Component : Checksums. +// +// --[ Description ] ---------------------------------------------------------- +// +// Implements a CRC16 algorithm with the CCITT polynomial. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +namespace Aaru.Checksums +{ + /// + /// Implements the CRC16 algorithm with CCITT polynomial and seed + public sealed class CRC16CCITTContext : Crc16Context + { + /// CCITT CRC16 polynomial + public const ushort CRC16_CCITT_POLY = 0x8408; + /// CCITT CRC16 seed + public const ushort CRC16_CCITT_SEED = 0x0000; + static readonly ushort[] _ccittCrc16Table = + { + 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, + 0xd1ad, 0xe1ce, 0xf1ef, 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, 0x9339, 0x8318, + 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff, 0xe3de, 0x2462, 0x3443, 0x0420, 0x1401, 0x64e6, 0x74c7, 0x44a4, + 0x5485, 0xa56a, 0xb54b, 0x8528, 0x9509, 0xe5ee, 0xf5cf, 0xc5ac, 0xd58d, 0x3653, 0x2672, 0x1611, 0x0630, + 0x76d7, 0x66f6, 0x5695, 0x46b4, 0xb75b, 0xa77a, 0x9719, 0x8738, 0xf7df, 0xe7fe, 0xd79d, 0xc7bc, 0x48c4, + 0x58e5, 0x6886, 0x78a7, 0x0840, 0x1861, 0x2802, 0x3823, 0xc9cc, 0xd9ed, 0xe98e, 0xf9af, 0x8948, 0x9969, + 0xa90a, 0xb92b, 0x5af5, 0x4ad4, 0x7ab7, 0x6a96, 0x1a71, 0x0a50, 0x3a33, 0x2a12, 0xdbfd, 0xcbdc, 0xfbbf, + 0xeb9e, 0x9b79, 0x8b58, 0xbb3b, 0xab1a, 0x6ca6, 0x7c87, 0x4ce4, 0x5cc5, 0x2c22, 0x3c03, 0x0c60, 0x1c41, + 0xedae, 0xfd8f, 0xcdec, 0xddcd, 0xad2a, 0xbd0b, 0x8d68, 0x9d49, 0x7e97, 0x6eb6, 0x5ed5, 0x4ef4, 0x3e13, + 0x2e32, 0x1e51, 0x0e70, 0xff9f, 0xefbe, 0xdfdd, 0xcffc, 0xbf1b, 0xaf3a, 0x9f59, 0x8f78, 0x9188, 0x81a9, + 0xb1ca, 0xa1eb, 0xd10c, 0xc12d, 0xf14e, 0xe16f, 0x1080, 0x00a1, 0x30c2, 0x20e3, 0x5004, 0x4025, 0x7046, + 0x6067, 0x83b9, 0x9398, 0xa3fb, 0xb3da, 0xc33d, 0xd31c, 0xe37f, 0xf35e, 0x02b1, 0x1290, 0x22f3, 0x32d2, + 0x4235, 0x5214, 0x6277, 0x7256, 0xb5ea, 0xa5cb, 0x95a8, 0x8589, 0xf56e, 0xe54f, 0xd52c, 0xc50d, 0x34e2, + 0x24c3, 0x14a0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, 0xa7db, 0xb7fa, 0x8799, 0x97b8, 0xe75f, 0xf77e, + 0xc71d, 0xd73c, 0x26d3, 0x36f2, 0x0691, 0x16b0, 0x6657, 0x7676, 0x4615, 0x5634, 0xd94c, 0xc96d, 0xf90e, + 0xe92f, 0x99c8, 0x89e9, 0xb98a, 0xa9ab, 0x5844, 0x4865, 0x7806, 0x6827, 0x18c0, 0x08e1, 0x3882, 0x28a3, + 0xcb7d, 0xdb5c, 0xeb3f, 0xfb1e, 0x8bf9, 0x9bd8, 0xabbb, 0xbb9a, 0x4a75, 0x5a54, 0x6a37, 0x7a16, 0x0af1, + 0x1ad0, 0x2ab3, 0x3a92, 0xfd2e, 0xed0f, 0xdd6c, 0xcd4d, 0xbdaa, 0xad8b, 0x9de8, 0x8dc9, 0x7c26, 0x6c07, + 0x5c64, 0x4c45, 0x3ca2, 0x2c83, 0x1ce0, 0x0cc1, 0xef1f, 0xff3e, 0xcf5d, 0xdf7c, 0xaf9b, 0xbfba, 0x8fd9, + 0x9ff8, 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0 + }; + + /// Initializes an instance of the CRC16 with CCITT polynomial and seed. + /// + public CRC16CCITTContext() : base(CRC16_CCITT_POLY, CRC16_CCITT_SEED, _ccittCrc16Table, true) {} + + /// Gets the hash of a file + /// File path. + public static byte[] File(string filename) + { + File(filename, out byte[] hash); + + return hash; + } + + /// Gets the hash of a file in hexadecimal and as a byte array. + /// File path. + /// Byte array of the hash value. + public static string File(string filename, out byte[] hash) => + File(filename, out hash, CRC16_CCITT_POLY, CRC16_CCITT_SEED, _ccittCrc16Table, true); + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Length of the data buffer to hash. + /// Byte array of the hash value. + public static string Data(byte[] data, uint len, out byte[] hash) => + Data(data, len, out hash, CRC16_CCITT_POLY, CRC16_CCITT_SEED, _ccittCrc16Table, true); + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Byte array of the hash value. + public static string Data(byte[] data, out byte[] hash) => Data(data, (uint)data.Length, out hash); + + /// Calculates the CCITT CRC16 of the specified buffer with the specified parameters + /// Buffer + public static ushort Calculate(byte[] buffer) => + Calculate(buffer, CRC16_CCITT_POLY, CRC16_CCITT_SEED, _ccittCrc16Table, true); + } +} \ No newline at end of file diff --git a/Aaru.Checksums/CRC16Context.cs b/Aaru.Checksums/CRC16Context.cs new file mode 100644 index 0000000..12ad0cf --- /dev/null +++ b/Aaru.Checksums/CRC16Context.cs @@ -0,0 +1,243 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : CRC16Context.cs +// Author(s) : Natalia Portillo +// +// Component : Checksums. +// +// --[ Description ] ---------------------------------------------------------- +// +// Implements a CRC16 algorithm. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System.IO; +using System.Linq; +using System.Text; +using Aaru.CommonTypes.Interfaces; +using Aaru.Helpers; + +namespace Aaru.Checksums +{ + /// + /// Implements a CRC16 algorithm + public class Crc16Context : IChecksum + { + readonly ushort _finalSeed; + readonly bool _inverse; + readonly ushort[] _table; + ushort _hashInt; + + /// Initializes the CRC16 table with a custom polynomial and seed + public Crc16Context(ushort polynomial, ushort seed, ushort[] table, bool inverse) + { + _hashInt = seed; + _finalSeed = seed; + _inverse = inverse; + + _table = table ?? GenerateTable(polynomial, inverse); + } + + /// + /// Updates the hash with data. + /// Data buffer. + /// Length of buffer to hash. + public void Update(byte[] data, uint len) + { + for(int i = 0; i < len; i++) + { + if(_inverse) + _hashInt = (ushort)(_table[(_hashInt >> 8) ^ data[i]] ^ (_hashInt << 8)); + else + _hashInt = (ushort)((_hashInt >> 8) ^ _table[data[i] ^ (_hashInt & 0xFF)]); + } + } + + /// + /// Updates the hash with data. + /// Data buffer. + public void Update(byte[] data) => Update(data, (uint)data.Length); + + /// + /// Returns a byte array of the hash value. + public byte[] Final() => BigEndianBitConverter.GetBytes((ushort)(_hashInt ^ _finalSeed)); + + /// + /// Returns a hexadecimal representation of the hash value. + public string End() + { + var crc16Output = new StringBuilder(); + + ushort final = (ushort)(_hashInt ^ _finalSeed); + + if(_inverse) + final = (ushort)~final; + + byte[] finalBytes = BigEndianBitConverter.GetBytes(final); + + for(int i = 0; i < finalBytes.Length; i++) + crc16Output.Append(finalBytes[i].ToString("x2")); + + return crc16Output.ToString(); + } + + static ushort[] GenerateTable(ushort polynomial, bool inverseTable) + { + ushort[] table = new ushort[256]; + + if(!inverseTable) + for(uint i = 0; i < 256; i++) + { + uint entry = i; + + for(int j = 0; j < 8; j++) + if((entry & 1) == 1) + entry = (entry >> 1) ^ polynomial; + else + entry >>= 1; + + table[i] = (ushort)entry; + } + else + { + for(uint i = 0; i < 256; i++) + { + uint entry = i << 8; + + for(uint j = 0; j < 8; j++) + { + if((entry & 0x8000) > 0) + entry = (entry << 1) ^ polynomial; + else + entry <<= 1; + + table[i] = (ushort)entry; + } + } + } + + return table; + } + + /// Gets the hash of a file in hexadecimal and as a byte array. + /// File path. + /// Byte array of the hash value. + /// CRC polynomial + /// CRC seed + /// CRC lookup table + /// Is CRC inverted? + public static string File(string filename, out byte[] hash, ushort polynomial, ushort seed, ushort[] table, + bool inverse) + { + var fileStream = new FileStream(filename, FileMode.Open); + + ushort localHashInt = seed; + + ushort[] localTable = table ?? GenerateTable(polynomial, inverse); + + for(int i = 0; i < fileStream.Length; i++) + if(inverse) + localHashInt = + (ushort)(localTable[(localHashInt >> 8) ^ fileStream.ReadByte()] ^ (localHashInt << 8)); + else + localHashInt = + (ushort)((localHashInt >> 8) ^ localTable[fileStream.ReadByte() ^ (localHashInt & 0xff)]); + + localHashInt ^= seed; + + if(inverse) + localHashInt = (ushort)~localHashInt; + + hash = BigEndianBitConverter.GetBytes(localHashInt); + + var crc16Output = new StringBuilder(); + + foreach(byte h in hash) + crc16Output.Append(h.ToString("x2")); + + fileStream.Close(); + + return crc16Output.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Length of the data buffer to hash. + /// Byte array of the hash value. + /// CRC polynomial + /// CRC seed + /// CRC lookup table + /// Is CRC inverted? + public static string Data(byte[] data, uint len, out byte[] hash, ushort polynomial, ushort seed, + ushort[] table, bool inverse) + { + ushort localHashInt = seed; + + ushort[] localTable = table ?? GenerateTable(polynomial, inverse); + + for(int i = 0; i < len; i++) + if(inverse) + localHashInt = (ushort)(localTable[(localHashInt >> 8) ^ data[i]] ^ (localHashInt << 8)); + else + localHashInt = (ushort)((localHashInt >> 8) ^ localTable[data[i] ^ (localHashInt & 0xff)]); + + localHashInt ^= seed; + + if(inverse) + localHashInt = (ushort)~localHashInt; + + hash = BigEndianBitConverter.GetBytes(localHashInt); + + var crc16Output = new StringBuilder(); + + foreach(byte h in hash) + crc16Output.Append(h.ToString("x2")); + + return crc16Output.ToString(); + } + + /// Calculates the CRC16 of the specified buffer with the specified parameters + /// Buffer + /// Polynomial + /// Seed + /// Pre-generated lookup table + /// Inverse CRC + /// CRC16 + public static ushort Calculate(byte[] buffer, ushort polynomial, ushort seed, ushort[] table, bool inverse) + { + ushort[] localTable = table ?? GenerateTable(polynomial, inverse); + + ushort crc16 = + buffer.Aggregate(0, + (current, b) => + inverse ? (ushort)(localTable[(current >> 8) ^ b] ^ (current << 8)) + : (ushort)((current >> 8) ^ localTable[b ^ (current & 0xff)])); + + crc16 ^= seed; + + if(inverse) + crc16 = (ushort)~crc16; + + return crc16; + } + } +} \ No newline at end of file diff --git a/Aaru.Checksums/CRC16IBMContext.cs b/Aaru.Checksums/CRC16IBMContext.cs new file mode 100644 index 0000000..82ae6f5 --- /dev/null +++ b/Aaru.Checksums/CRC16IBMContext.cs @@ -0,0 +1,102 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : CRC16IBMContext.cs +// Author(s) : Natalia Portillo +// +// Component : Checksums. +// +// --[ Description ] ---------------------------------------------------------- +// +// Implements a CRC16 algorithm with the IBM polynomial. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +namespace Aaru.Checksums +{ + /// + /// Implements the CRC16 algorithm with IBM polynomial and seed + public sealed class CRC16IBMContext : Crc16Context + { + const ushort CRC16_IBM_POLY = 0xA001; + const ushort CRC16_IBM_SEED = 0x0000; + + static readonly ushort[] _ibmCrc16Table = + { + 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, + 0xC5C1, 0xC481, 0x0440, 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40, 0x0A00, 0xCAC1, + 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841, 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, + 0x1A40, 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41, 0x1400, 0xD4C1, 0xD581, 0x1540, + 0xD701, 0x17C0, 0x1680, 0xD641, 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040, 0xF001, + 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240, 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, + 0x3480, 0xF441, 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41, 0xFA01, 0x3AC0, 0x3B80, + 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840, 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41, + 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40, 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, + 0xE7C1, 0xE681, 0x2640, 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041, 0xA001, 0x60C0, + 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240, 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, + 0xA441, 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41, 0xAA01, 0x6AC0, 0x6B80, 0xAB41, + 0x6900, 0xA9C1, 0xA881, 0x6840, 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41, 0xBE01, + 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40, 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, + 0xB681, 0x7640, 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041, 0x5000, 0x90C1, 0x9181, + 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241, 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440, + 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40, 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, + 0x59C0, 0x5880, 0x9841, 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40, 0x4E00, 0x8EC1, + 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41, 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, + 0x8641, 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040 + }; + + /// Initializes an instance of the CRC16 with IBM polynomial and seed. + /// + public CRC16IBMContext() : base(CRC16_IBM_POLY, CRC16_IBM_SEED, _ibmCrc16Table, false) {} + + /// Gets the hash of a file + /// File path. + public static byte[] File(string filename) + { + File(filename, out byte[] hash); + + return hash; + } + + /// Gets the hash of a file in hexadecimal and as a byte array. + /// File path. + /// Byte array of the hash value. + public static string File(string filename, out byte[] hash) => + File(filename, out hash, CRC16_IBM_POLY, CRC16_IBM_SEED, _ibmCrc16Table, false); + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Length of the data buffer to hash. + /// Byte array of the hash value. + public static string Data(byte[] data, uint len, out byte[] hash) => + Data(data, len, out hash, CRC16_IBM_POLY, CRC16_IBM_SEED, _ibmCrc16Table, false); + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Byte array of the hash value. + public static string Data(byte[] data, out byte[] hash) => Data(data, (uint)data.Length, out hash); + + /// Calculates the IBM CRC16 of the specified buffer with the specified parameters + /// Buffer + public static ushort Calculate(byte[] buffer) => + Calculate(buffer, CRC16_IBM_POLY, CRC16_IBM_SEED, _ibmCrc16Table, false); + } +} \ No newline at end of file diff --git a/Aaru.Checksums/CRC32Context.cs b/Aaru.Checksums/CRC32Context.cs new file mode 100644 index 0000000..988d622 --- /dev/null +++ b/Aaru.Checksums/CRC32Context.cs @@ -0,0 +1,234 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : CRC32Context.cs +// Author(s) : Natalia Portillo +// +// Component : Checksums. +// +// --[ Description ] ---------------------------------------------------------- +// +// Implements a CRC32 algorithm. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System.IO; +using System.Text; +using Aaru.CommonTypes.Interfaces; +using Aaru.Helpers; + +namespace Aaru.Checksums +{ + /// + /// Implements a CRC32 algorithm + public sealed class Crc32Context : IChecksum + { + const uint CRC32_ISO_POLY = 0xEDB88320; + const uint CRC32_ISO_SEED = 0xFFFFFFFF; + + readonly uint _finalSeed; + readonly uint[] _table; + uint _hashInt; + + /// Initializes the CRC32 table and seed as CRC32-ISO + public Crc32Context() + { + _hashInt = CRC32_ISO_SEED; + _finalSeed = CRC32_ISO_SEED; + + _table = new uint[256]; + + for(int i = 0; i < 256; i++) + { + uint entry = (uint)i; + + for(int j = 0; j < 8; j++) + if((entry & 1) == 1) + entry = (entry >> 1) ^ CRC32_ISO_POLY; + else + entry >>= 1; + + _table[i] = entry; + } + } + + /// Initializes the CRC32 table with a custom polynomial and seed + public Crc32Context(uint polynomial, uint seed) + { + _hashInt = seed; + _finalSeed = seed; + + _table = new uint[256]; + + for(int i = 0; i < 256; i++) + { + uint entry = (uint)i; + + for(int j = 0; j < 8; j++) + if((entry & 1) == 1) + entry = (entry >> 1) ^ polynomial; + else + entry >>= 1; + + _table[i] = entry; + } + } + + /// + /// Updates the hash with data. + /// Data buffer. + /// Length of buffer to hash. + public void Update(byte[] data, uint len) + { + for(int i = 0; i < len; i++) + _hashInt = (_hashInt >> 8) ^ _table[data[i] ^ (_hashInt & 0xff)]; + } + + /// + /// Updates the hash with data. + /// Data buffer. + public void Update(byte[] data) => Update(data, (uint)data.Length); + + /// + /// Returns a byte array of the hash value. + public byte[] Final() => BigEndianBitConverter.GetBytes(_hashInt ^ _finalSeed); + + /// + /// Returns a hexadecimal representation of the hash value. + public string End() + { + var crc32Output = new StringBuilder(); + + for(int i = 0; i < BigEndianBitConverter.GetBytes(_hashInt ^ _finalSeed).Length; i++) + crc32Output.Append(BigEndianBitConverter.GetBytes(_hashInt ^ _finalSeed)[i].ToString("x2")); + + return crc32Output.ToString(); + } + + /// Gets the hash of a file + /// File path. + public static byte[] File(string filename) + { + File(filename, out byte[] hash); + + return hash; + } + + /// Gets the hash of a file in hexadecimal and as a byte array. + /// File path. + /// Byte array of the hash value. + public static string File(string filename, out byte[] hash) => + File(filename, out hash, CRC32_ISO_POLY, CRC32_ISO_SEED); + + /// Gets the hash of a file in hexadecimal and as a byte array. + /// File path. + /// Byte array of the hash value. + /// CRC polynomial + /// CRC seed + public static string File(string filename, out byte[] hash, uint polynomial, uint seed) + { + var fileStream = new FileStream(filename, FileMode.Open); + + uint localHashInt = seed; + + uint[] localTable = new uint[256]; + + for(int i = 0; i < 256; i++) + { + uint entry = (uint)i; + + for(int j = 0; j < 8; j++) + if((entry & 1) == 1) + entry = (entry >> 1) ^ polynomial; + else + entry >>= 1; + + localTable[i] = entry; + } + + for(int i = 0; i < fileStream.Length; i++) + localHashInt = (localHashInt >> 8) ^ localTable[fileStream.ReadByte() ^ (localHashInt & 0xff)]; + + localHashInt ^= seed; + hash = BigEndianBitConverter.GetBytes(localHashInt); + + var crc32Output = new StringBuilder(); + + foreach(byte h in hash) + crc32Output.Append(h.ToString("x2")); + + fileStream.Close(); + + return crc32Output.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Length of the data buffer to hash. + /// Byte array of the hash value. + public static string Data(byte[] data, uint len, out byte[] hash) => + Data(data, len, out hash, CRC32_ISO_POLY, CRC32_ISO_SEED); + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Length of the data buffer to hash. + /// Byte array of the hash value. + /// CRC polynomial + /// CRC seed + public static string Data(byte[] data, uint len, out byte[] hash, uint polynomial, uint seed) + { + uint localHashInt = seed; + + uint[] localTable = new uint[256]; + + for(int i = 0; i < 256; i++) + { + uint entry = (uint)i; + + for(int j = 0; j < 8; j++) + if((entry & 1) == 1) + entry = (entry >> 1) ^ polynomial; + else + entry >>= 1; + + localTable[i] = entry; + } + + for(int i = 0; i < len; i++) + localHashInt = (localHashInt >> 8) ^ localTable[data[i] ^ (localHashInt & 0xff)]; + + localHashInt ^= seed; + hash = BigEndianBitConverter.GetBytes(localHashInt); + + var crc32Output = new StringBuilder(); + + foreach(byte h in hash) + crc32Output.Append(h.ToString("x2")); + + return crc32Output.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Byte array of the hash value. + public static string Data(byte[] data, out byte[] hash) => Data(data, (uint)data.Length, out hash); + } +} \ No newline at end of file diff --git a/Aaru.Checksums/CRC64Context.cs b/Aaru.Checksums/CRC64Context.cs new file mode 100644 index 0000000..0dc8732 --- /dev/null +++ b/Aaru.Checksums/CRC64Context.cs @@ -0,0 +1,238 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : CRC64Context.cs +// Author(s) : Natalia Portillo +// +// Component : Checksums. +// +// --[ Description ] ---------------------------------------------------------- +// +// Implements a CRC64 algorithm. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System.IO; +using System.Text; +using Aaru.CommonTypes.Interfaces; +using Aaru.Helpers; + +namespace Aaru.Checksums +{ + /// + /// Implements a CRC64 algorithm + public sealed class Crc64Context : IChecksum + { + /// ECMA CRC64 polynomial + public const ulong CRC64_ECMA_POLY = 0xC96C5795D7870F42; + /// ECMA CRC64 seed + public const ulong CRC64_ECMA_SEED = 0xFFFFFFFFFFFFFFFF; + + readonly ulong _finalSeed; + readonly ulong[] _table; + ulong _hashInt; + + /// Initializes the CRC64 table and seed as CRC64-ECMA + public Crc64Context() + { + _hashInt = CRC64_ECMA_SEED; + + _table = new ulong[256]; + + for(int i = 0; i < 256; i++) + { + ulong entry = (ulong)i; + + for(int j = 0; j < 8; j++) + if((entry & 1) == 1) + entry = (entry >> 1) ^ CRC64_ECMA_POLY; + else + entry >>= 1; + + _table[i] = entry; + } + + _finalSeed = CRC64_ECMA_SEED; + } + + /// Initializes the CRC16 table with a custom polynomial and seed + public Crc64Context(ulong polynomial, ulong seed) + { + _hashInt = seed; + + _table = new ulong[256]; + + for(int i = 0; i < 256; i++) + { + ulong entry = (ulong)i; + + for(int j = 0; j < 8; j++) + if((entry & 1) == 1) + entry = (entry >> 1) ^ polynomial; + else + entry >>= 1; + + _table[i] = entry; + } + + _finalSeed = seed; + } + + /// + /// Updates the hash with data. + /// Data buffer. + /// Length of buffer to hash. + public void Update(byte[] data, uint len) + { + for(int i = 0; i < len; i++) + _hashInt = (_hashInt >> 8) ^ _table[data[i] ^ (_hashInt & 0xff)]; + } + + /// + /// Updates the hash with data. + /// Data buffer. + public void Update(byte[] data) => Update(data, (uint)data.Length); + + /// + /// Returns a byte array of the hash value. + public byte[] Final() => BigEndianBitConverter.GetBytes(_hashInt ^= _finalSeed); + + /// + /// Returns a hexadecimal representation of the hash value. + public string End() + { + var crc64Output = new StringBuilder(); + + for(int i = 0; i < BigEndianBitConverter.GetBytes(_hashInt ^= _finalSeed).Length; i++) + crc64Output.Append(BigEndianBitConverter.GetBytes(_hashInt ^= _finalSeed)[i].ToString("x2")); + + return crc64Output.ToString(); + } + + /// Gets the hash of a file + /// File path. + public static byte[] File(string filename) + { + File(filename, out byte[] localHash); + + return localHash; + } + + /// Gets the hash of a file in hexadecimal and as a byte array. + /// File path. + /// Byte array of the hash value. + public static string File(string filename, out byte[] hash) => + File(filename, out hash, CRC64_ECMA_POLY, CRC64_ECMA_SEED); + + /// Gets the hash of a file in hexadecimal and as a byte array. + /// File path. + /// Byte array of the hash value. + /// CRC polynomial + /// CRC seed + public static string File(string filename, out byte[] hash, ulong polynomial, ulong seed) + { + var fileStream = new FileStream(filename, FileMode.Open); + + ulong localHashInt = seed; + + ulong[] localTable = new ulong[256]; + + for(int i = 0; i < 256; i++) + { + ulong entry = (ulong)i; + + for(int j = 0; j < 8; j++) + if((entry & 1) == 1) + entry = (entry >> 1) ^ polynomial; + else + entry >>= 1; + + localTable[i] = entry; + } + + for(int i = 0; i < fileStream.Length; i++) + localHashInt = (localHashInt >> 8) ^ localTable[(ulong)fileStream.ReadByte() ^ (localHashInt & 0xffL)]; + + localHashInt ^= seed; + hash = BigEndianBitConverter.GetBytes(localHashInt); + + var crc64Output = new StringBuilder(); + + foreach(byte h in hash) + crc64Output.Append(h.ToString("x2")); + + fileStream.Close(); + + return crc64Output.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Length of the data buffer to hash. + /// Byte array of the hash value. + public static string Data(byte[] data, uint len, out byte[] hash) => + Data(data, len, out hash, CRC64_ECMA_POLY, CRC64_ECMA_SEED); + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Length of the data buffer to hash. + /// Byte array of the hash value. + /// CRC polynomial + /// CRC seed + public static string Data(byte[] data, uint len, out byte[] hash, ulong polynomial, ulong seed) + { + ulong localHashInt = seed; + + ulong[] localTable = new ulong[256]; + + for(int i = 0; i < 256; i++) + { + ulong entry = (ulong)i; + + for(int j = 0; j < 8; j++) + if((entry & 1) == 1) + entry = (entry >> 1) ^ polynomial; + else + entry >>= 1; + + localTable[i] = entry; + } + + for(int i = 0; i < len; i++) + localHashInt = (localHashInt >> 8) ^ localTable[data[i] ^ (localHashInt & 0xff)]; + + localHashInt ^= seed; + hash = BigEndianBitConverter.GetBytes(localHashInt); + + var crc64Output = new StringBuilder(); + + foreach(byte h in hash) + crc64Output.Append(h.ToString("x2")); + + return crc64Output.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Byte array of the hash value. + public static string Data(byte[] data, out byte[] hash) => Data(data, (uint)data.Length, out hash); + } +} \ No newline at end of file diff --git a/Aaru.Checksums/FletcherContext.cs b/Aaru.Checksums/FletcherContext.cs new file mode 100644 index 0000000..480cca3 --- /dev/null +++ b/Aaru.Checksums/FletcherContext.cs @@ -0,0 +1,292 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : FletcherContext.cs +// Author(s) : Natalia Portillo +// +// Component : Checksums. +// +// --[ Description ] ---------------------------------------------------------- +// +// Implements Fletcher-32 and Fletcher-16 algorithms. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +// Disabled because the speed is abnormally slow + +using System.IO; +using System.Text; +using Aaru.CommonTypes.Interfaces; +using Aaru.Helpers; + +namespace Aaru.Checksums +{ + /// Implements the Fletcher-32 algorithm + public sealed class Fletcher32Context : IChecksum + { + const ushort FLETCHER_MODULE = 0xFFFF; + ushort _sum1, _sum2; + + /// Initializes the Fletcher-32 sums + public Fletcher32Context() + { + _sum1 = 0xFFFF; + _sum2 = 0xFFFF; + } + + /// + /// Updates the hash with data. + /// Data buffer. + /// Length of buffer to hash. + public void Update(byte[] data, uint len) + { + for(int i = 0; i < len; i++) + { + _sum1 = (ushort)((_sum1 + data[i]) % FLETCHER_MODULE); + _sum2 = (ushort)((_sum2 + _sum1) % FLETCHER_MODULE); + } + } + + /// + /// Updates the hash with data. + /// Data buffer. + public void Update(byte[] data) => Update(data, (uint)data.Length); + + /// + /// Returns a byte array of the hash value. + public byte[] Final() + { + uint finalSum = (uint)((_sum2 << 16) | _sum1); + + return BigEndianBitConverter.GetBytes(finalSum); + } + + /// + /// Returns a hexadecimal representation of the hash value. + public string End() + { + uint finalSum = (uint)((_sum2 << 16) | _sum1); + var fletcherOutput = new StringBuilder(); + + for(int i = 0; i < BigEndianBitConverter.GetBytes(finalSum).Length; i++) + fletcherOutput.Append(BigEndianBitConverter.GetBytes(finalSum)[i].ToString("x2")); + + return fletcherOutput.ToString(); + } + + /// Gets the hash of a file + /// File path. + public static byte[] File(string filename) + { + File(filename, out byte[] hash); + + return hash; + } + + /// Gets the hash of a file in hexadecimal and as a byte array. + /// File path. + /// Byte array of the hash value. + public static string File(string filename, out byte[] hash) + { + var fileStream = new FileStream(filename, FileMode.Open); + + ushort localSum1 = 0xFFFF; + ushort localSum2 = 0xFFFF; + + for(int i = 0; i < fileStream.Length; i++) + { + localSum1 = (ushort)((localSum1 + fileStream.ReadByte()) % FLETCHER_MODULE); + localSum2 = (ushort)((localSum2 + localSum1) % FLETCHER_MODULE); + } + + uint finalSum = (uint)((localSum2 << 16) | localSum1); + + hash = BigEndianBitConverter.GetBytes(finalSum); + + var fletcherOutput = new StringBuilder(); + + foreach(byte h in hash) + fletcherOutput.Append(h.ToString("x2")); + + fileStream.Close(); + + return fletcherOutput.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Length of the data buffer to hash. + /// Byte array of the hash value. + public static string Data(byte[] data, uint len, out byte[] hash) + { + ushort localSum1 = 0xFFFF; + ushort localSum2 = 0xFFFF; + + for(int i = 0; i < len; i++) + { + localSum1 = (ushort)((localSum1 + data[i]) % FLETCHER_MODULE); + localSum2 = (ushort)((localSum2 + localSum1) % FLETCHER_MODULE); + } + + uint finalSum = (uint)((localSum2 << 16) | localSum1); + + hash = BigEndianBitConverter.GetBytes(finalSum); + + var adlerOutput = new StringBuilder(); + + foreach(byte h in hash) + adlerOutput.Append(h.ToString("x2")); + + return adlerOutput.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Byte array of the hash value. + public static string Data(byte[] data, out byte[] hash) => Data(data, (uint)data.Length, out hash); + } + + /// + /// Implements the Fletcher-16 algorithm + public sealed class Fletcher16Context : IChecksum + { + const byte FLETCHER_MODULE = 0xFF; + byte _sum1, _sum2; + + /// Initializes the Fletcher-16 sums + public Fletcher16Context() + { + _sum1 = 0xFF; + _sum2 = 0xFF; + } + + /// + /// Updates the hash with data. + /// Data buffer. + /// Length of buffer to hash. + public void Update(byte[] data, uint len) + { + for(int i = 0; i < len; i++) + { + _sum1 = (byte)((_sum1 + data[i]) % FLETCHER_MODULE); + _sum2 = (byte)((_sum2 + _sum1) % FLETCHER_MODULE); + } + } + + /// + /// Updates the hash with data. + /// Data buffer. + public void Update(byte[] data) => Update(data, (uint)data.Length); + + /// + /// Returns a byte array of the hash value. + public byte[] Final() + { + ushort finalSum = (ushort)((_sum2 << 8) | _sum1); + + return BigEndianBitConverter.GetBytes(finalSum); + } + + /// + /// Returns a hexadecimal representation of the hash value. + public string End() + { + ushort finalSum = (ushort)((_sum2 << 8) | _sum1); + var fletcherOutput = new StringBuilder(); + + for(int i = 0; i < BigEndianBitConverter.GetBytes(finalSum).Length; i++) + fletcherOutput.Append(BigEndianBitConverter.GetBytes(finalSum)[i].ToString("x2")); + + return fletcherOutput.ToString(); + } + + /// Gets the hash of a file + /// File path. + public static byte[] File(string filename) + { + File(filename, out byte[] hash); + + return hash; + } + + /// Gets the hash of a file in hexadecimal and as a byte array. + /// File path. + /// Byte array of the hash value. + public static string File(string filename, out byte[] hash) + { + var fileStream = new FileStream(filename, FileMode.Open); + + byte localSum1 = 0xFF; + byte localSum2 = 0xFF; + + for(int i = 0; i < fileStream.Length; i++) + { + localSum1 = (byte)((localSum1 + fileStream.ReadByte()) % FLETCHER_MODULE); + localSum2 = (byte)((localSum2 + localSum1) % FLETCHER_MODULE); + } + + ushort finalSum = (ushort)((localSum2 << 8) | localSum1); + + hash = BigEndianBitConverter.GetBytes(finalSum); + + var fletcherOutput = new StringBuilder(); + + foreach(byte h in hash) + fletcherOutput.Append(h.ToString("x2")); + + fileStream.Close(); + + return fletcherOutput.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Length of the data buffer to hash. + /// Byte array of the hash value. + public static string Data(byte[] data, uint len, out byte[] hash) + { + byte localSum1 = 0xFF; + byte localSum2 = 0xFF; + + for(int i = 0; i < len; i++) + { + localSum1 = (byte)((localSum1 + data[i]) % FLETCHER_MODULE); + localSum2 = (byte)((localSum2 + localSum1) % FLETCHER_MODULE); + } + + ushort finalSum = (ushort)((localSum2 << 8) | localSum1); + + hash = BigEndianBitConverter.GetBytes(finalSum); + + var adlerOutput = new StringBuilder(); + + foreach(byte h in hash) + adlerOutput.Append(h.ToString("x2")); + + return adlerOutput.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Byte array of the hash value. + public static string Data(byte[] data, out byte[] hash) => Data(data, (uint)data.Length, out hash); + } +} \ No newline at end of file diff --git a/Aaru.Checksums/MD5Context.cs b/Aaru.Checksums/MD5Context.cs new file mode 100644 index 0000000..7bb2285 --- /dev/null +++ b/Aaru.Checksums/MD5Context.cs @@ -0,0 +1,133 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : MD5Context.cs +// Author(s) : Natalia Portillo +// +// Component : Checksums. +// +// --[ Description ] ---------------------------------------------------------- +// +// Wraps up .NET MD5 implementation to a Init(), Update(), Final() context. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.IO; +using System.Security.Cryptography; +using System.Text; +using Aaru.CommonTypes.Interfaces; + +namespace Aaru.Checksums +{ + /// Wraps up .NET MD5 implementation to a Init(), Update(), Final() context. + public sealed class Md5Context : IChecksum + { + readonly MD5 _provider; + + /// Initializes the MD5 hash provider + public Md5Context() => _provider = MD5.Create(); + + /// + /// Updates the hash with data. + /// Data buffer. + /// Length of buffer to hash. + public void Update(byte[] data, uint len) => _provider.TransformBlock(data, 0, (int)len, data, 0); + + /// + /// Updates the hash with data. + /// Data buffer. + public void Update(byte[] data) => Update(data, (uint)data.Length); + + /// + /// Returns a byte array of the hash value. + public byte[] Final() + { + _provider.TransformFinalBlock(Array.Empty(), 0, 0); + + return _provider.Hash; + } + + /// + /// Returns a hexadecimal representation of the hash value. + public string End() + { + _provider.TransformFinalBlock(Array.Empty(), 0, 0); + var md5Output = new StringBuilder(); + + foreach(byte h in _provider.Hash) + md5Output.Append(h.ToString("x2")); + + return md5Output.ToString(); + } + + /// Gets the hash of a file + /// File path. + public static byte[] File(string filename) + { + var localMd5Provider = MD5.Create(); + var fileStream = new FileStream(filename, FileMode.Open); + byte[] result = localMd5Provider.ComputeHash(fileStream); + fileStream.Close(); + + return result; + } + + /// Gets the hash of a file in hexadecimal and as a byte array. + /// File path. + /// Byte array of the hash value. + public static string File(string filename, out byte[] hash) + { + var localMd5Provider = MD5.Create(); + var fileStream = new FileStream(filename, FileMode.Open); + hash = localMd5Provider.ComputeHash(fileStream); + var md5Output = new StringBuilder(); + + foreach(byte h in hash) + md5Output.Append(h.ToString("x2")); + + fileStream.Close(); + + return md5Output.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Length of the data buffer to hash. + /// Byte array of the hash value. + public static string Data(byte[] data, uint len, out byte[] hash) + { + var localMd5Provider = MD5.Create(); + hash = localMd5Provider.ComputeHash(data, 0, (int)len); + var md5Output = new StringBuilder(); + + foreach(byte h in hash) + md5Output.Append(h.ToString("x2")); + + return md5Output.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Byte array of the hash value. + public static string Data(byte[] data, out byte[] hash) => Data(data, (uint)data.Length, out hash); + } +} \ No newline at end of file diff --git a/Aaru.Checksums/ReedSolomon.cs b/Aaru.Checksums/ReedSolomon.cs new file mode 100644 index 0000000..537e04e --- /dev/null +++ b/Aaru.Checksums/ReedSolomon.cs @@ -0,0 +1,730 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : ReedSolomon.cs +// Author(s) : Natalia Portillo +// +// Component : Checksums. +// +// --[ Description ] ---------------------------------------------------------- +// +// Calculates a Reed-Solomon. +// +// --[ License ] -------------------------------------------------------------- +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// Copyright (C) 1996 Phil Karn +// Copyright (C) 1995 Robert Morelos-Zaragoza +// Copyright (C) 1995 Hari Thirumoorthy +// ****************************************************************************/ + +/* + * Reed-Solomon coding and decoding + * Phil Karn (karn at ka9q.ampr.org) September 1996 + * + * This file is derived from the program "new_rs_erasures.c" by Robert + * Morelos-Zaragoza (robert at spectra.eng.hawaii.edu) and Hari Thirumoorthy + * (harit at spectra.eng.hawaii.edu), Aug 1995 + * + * I've made changes to improve performance, clean up the code and make it + * easier to follow. Data is now passed to the encoding and decoding functions + * through arguments rather than in global arrays. The decode function returns + * the number of corrected symbols, or -1 if the word is uncorrectable. + * + * This code supports a symbol size from 2 bits up to 16 bits, + * implying a block size of 3 2-bit symbols (6 bits) up to 65535 + * 16-bit symbols (1,048,560 bits). The code parameters are set in rs.h. + * + * Note that if symbols larger than 8 bits are used, the type of each + * data array element switches from unsigned char to unsigned int. The + * caller must ensure that elements larger than the symbol range are + * not passed to the encoder or decoder. + * + */ + +using System; +using Aaru.Console; + +namespace Aaru.Checksums +{ + /// Implements the Reed-Solomon algorithm + public class ReedSolomon + { + /// Alpha exponent for the first root of the generator polynomial + const int B0 = 1; + /// No legal value in index form represents zero, so we need a special value for this purpose + int _a0; + /// index->polynomial form conversion table + int[] _alphaTo; + /// Generator polynomial g(x) Degree of g(x) = 2*TT has roots @**B0, @**(B0+1), ... ,@^(B0+2*TT-1) + int[] _gg; + /// Polynomial->index form conversion table + int[] _indexOf; + bool _initialized; + int _mm, _kk, _nn; + /// + /// Primitive polynomials - see Lin & Costello, Error Control Coding Appendix A, and Lee & Messerschmitt, Digital + /// Communication p. 453. + /// + int[] _pp; + + /// Initializes the Reed-Solomon with RS(n,k) with GF(2^m) + public void InitRs(int n, int k, int m) + { + switch(m) + { + case 2: + _pp = new[] + { + 1, 1, 1 + }; + + break; + case 3: + _pp = new[] + { + 1, 1, 0, 1 + }; + + break; + case 4: + _pp = new[] + { + 1, 1, 0, 0, 1 + }; + + break; + case 5: + _pp = new[] + { + 1, 0, 1, 0, 0, 1 + }; + + break; + case 6: + _pp = new[] + { + 1, 1, 0, 0, 0, 0, 1 + }; + + break; + case 7: + _pp = new[] + { + 1, 0, 0, 1, 0, 0, 0, 1 + }; + + break; + case 8: + _pp = new[] + { + 1, 0, 1, 1, 1, 0, 0, 0, 1 + }; + + break; + case 9: + _pp = new[] + { + 1, 0, 0, 0, 1, 0, 0, 0, 0, 1 + }; + + break; + case 10: + _pp = new[] + { + 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1 + }; + + break; + case 11: + _pp = new[] + { + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1 + }; + + break; + case 12: + _pp = new[] + { + 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1 + }; + + break; + case 13: + _pp = new[] + { + 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1 + }; + + break; + case 14: + _pp = new[] + { + 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1 + }; + + break; + case 15: + _pp = new[] + { + 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 + }; + + break; + case 16: + _pp = new[] + { + 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1 + }; + + break; + default: throw new ArgumentOutOfRangeException(nameof(m), "m must be between 2 and 16 inclusive"); + } + + _mm = m; + _kk = k; + _nn = n; + _a0 = n; + _alphaTo = new int[n + 1]; + _indexOf = new int[n + 1]; + + _gg = new int[_nn - _kk + 1]; + + generate_gf(); + gen_poly(); + + _initialized = true; + } + + int Modnn(int x) + { + while(x >= _nn) + { + x -= _nn; + x = (x >> _mm) + (x & _nn); + } + + return x; + } + + static int Min(int a, int b) => a < b ? a : b; + + static void Clear(ref int[] a, int n) + { + int ci; + + for(ci = n - 1; ci >= 0; ci--) + a[ci] = 0; + } + + static void Copy(ref int[] a, ref int[] b, int n) + { + int ci; + + for(ci = n - 1; ci >= 0; ci--) + a[ci] = b[ci]; + } + + static void Copydown(ref int[] a, ref int[] b, int n) + { + int ci; + + for(ci = n - 1; ci >= 0; ci--) + a[ci] = b[ci]; + } + + /* generate GF(2**m) from the irreducible polynomial p(X) in p[0]..p[m] + lookup tables: index->polynomial form alpha_to[] contains j=alpha**i; + polynomial form -> index form index_of[j=alpha**i] = i + alpha=2 is the primitive element of GF(2**m) + HARI's COMMENT: (4/13/94) alpha_to[] can be used as follows: + Let @ represent the primitive element commonly called "alpha" that + is the root of the primitive polynomial p(x). Then in GF(2^m), for any + 0 <= i <= 2^m-2, + @^i = a(0) + a(1) @ + a(2) @^2 + ... + a(m-1) @^(m-1) + where the binary vector (a(0),a(1),a(2),...,a(m-1)) is the representation + of the integer "alpha_to[i]" with a(0) being the LSB and a(m-1) the MSB. Thus for + example the polynomial representation of @^5 would be given by the binary + representation of the integer "alpha_to[5]". + Similarily, index_of[] can be used as follows: + As above, let @ represent the primitive element of GF(2^m) that is + the root of the primitive polynomial p(x). In order to find the power + of @ (alpha) that has the polynomial representation + a(0) + a(1) @ + a(2) @^2 + ... + a(m-1) @^(m-1) + we consider the integer "i" whose binary representation with a(0) being LSB + and a(m-1) MSB is (a(0),a(1),...,a(m-1)) and locate the entry + "index_of[i]". Now, @^index_of[i] is that element whose polynomial + representation is (a(0),a(1),a(2),...,a(m-1)). + NOTE: + The element alpha_to[2^m-1] = 0 always signifying that the + representation of "@^infinity" = 0 is (0,0,0,...,0). + Similarily, the element index_of[0] = A0 always signifying + that the power of alpha which has the polynomial representation + (0,0,...,0) is "infinity". + + */ + void generate_gf() + { + int i; + + int mask = 1; + _alphaTo[_mm] = 0; + + for(i = 0; i < _mm; i++) + { + _alphaTo[i] = mask; + _indexOf[_alphaTo[i]] = i; + + /* If Pp[i] == 1 then, term @^i occurs in poly-repr of @^MM */ + if(_pp[i] != 0) + _alphaTo[_mm] ^= mask; /* Bit-wise EXOR operation */ + + mask <<= 1; /* single left-shift */ + } + + _indexOf[_alphaTo[_mm]] = _mm; + /* + * Have obtained poly-repr of @^MM. Poly-repr of @^(i+1) is given by + * poly-repr of @^i shifted left one-bit and accounting for any @^MM + * term that may occur when poly-repr of @^i is shifted. + */ + mask >>= 1; + + for(i = _mm + 1; i < _nn; i++) + { + if(_alphaTo[i - 1] >= mask) + _alphaTo[i] = _alphaTo[_mm] ^ ((_alphaTo[i - 1] ^ mask) << 1); + else + _alphaTo[i] = _alphaTo[i - 1] << 1; + + _indexOf[_alphaTo[i]] = i; + } + + _indexOf[0] = _a0; + _alphaTo[_nn] = 0; + } + + /* + * Obtain the generator polynomial of the TT-error correcting, length + * NN=(2**MM -1) Reed Solomon code from the product of (X+@**(B0+i)), i = 0, + * ... ,(2*TT-1) + * + * Examples: + * + * If B0 = 1, TT = 1. deg(g(x)) = 2*TT = 2. + * g(x) = (x+@) (x+@**2) + * + * If B0 = 0, TT = 2. deg(g(x)) = 2*TT = 4. + * g(x) = (x+1) (x+@) (x+@**2) (x+@**3) + */ + void gen_poly() + { + int i; + + _gg[0] = _alphaTo[B0]; + _gg[1] = 1; /* g(x) = (X+@**B0) initially */ + + for(i = 2; i <= _nn - _kk; i++) + { + _gg[i] = 1; + + /* + * Below multiply (Gg[0]+Gg[1]*x + ... +Gg[i]x^i) by + * (@**(B0+i-1) + x) + */ + for(int j = i - 1; j > 0; j--) + if(_gg[j] != 0) + _gg[j] = _gg[j - 1] ^ _alphaTo[Modnn(_indexOf[_gg[j]] + B0 + i - 1)]; + else + _gg[j] = _gg[j - 1]; + + /* Gg[0] can never be zero */ + _gg[0] = _alphaTo[Modnn(_indexOf[_gg[0]] + B0 + i - 1)]; + } + + /* convert Gg[] to index form for quicker encoding */ + for(i = 0; i <= _nn - _kk; i++) + _gg[i] = _indexOf[_gg[i]]; + } + + /* + * take the string of symbols in data[i], i=0..(k-1) and encode + * systematically to produce NN-KK parity symbols in bb[0]..bb[NN-KK-1] data[] + * is input and bb[] is output in polynomial form. Encoding is done by using + * a feedback shift register with appropriate connections specified by the + * elements of Gg[], which was generated above. Codeword is c(X) = + * data(X)*X**(NN-KK)+ b(X) + */ + /// Takes the symbols in data to output parity in bb. + /// Returns -1 if an illegal symbol is found. + /// Data symbols. + /// Outs parity symbols. + public int encode_rs(int[] data, out int[] bb) + { + if(!_initialized) + throw new UnauthorizedAccessException("Trying to calculate RS without initializing!"); + + int i; + bb = new int[_nn - _kk]; + + Clear(ref bb, _nn - _kk); + + for(i = _kk - 1; i >= 0; i--) + { + if(_mm != 8) + if(data[i] > _nn) + return -1; /* Illegal symbol */ + + int feedback = _indexOf[data[i] ^ bb[_nn - _kk - 1]]; + + if(feedback != _a0) + { + /* feedback term is non-zero */ + for(int j = _nn - _kk - 1; j > 0; j--) + if(_gg[j] != _a0) + bb[j] = bb[j - 1] ^ _alphaTo[Modnn(_gg[j] + feedback)]; + else + bb[j] = bb[j - 1]; + + bb[0] = _alphaTo[Modnn(_gg[0] + feedback)]; + } + else + { + /* feedback term is zero. encoder becomes a + * single-byte shifter */ + for(int j = _nn - _kk - 1; j > 0; j--) + bb[j] = bb[j - 1]; + + bb[0] = 0; + } + } + + return 0; + } + + /* + * Performs ERRORS+ERASURES decoding of RS codes. If decoding is successful, + * writes the codeword into data[] itself. Otherwise data[] is unaltered. + * + * Return number of symbols corrected, or -1 if codeword is illegal + * or uncorrectable. + * + * First "no_eras" erasures are declared by the calling program. Then, the + * maximum # of errors correctable is t_after_eras = floor((NN-KK-no_eras)/2). + * If the number of channel errors is not greater than "t_after_eras" the + * transmitted codeword will be recovered. Details of algorithm can be found + * in R. Blahut's "Theory ... of Error-Correcting Codes". + */ + /// Decodes the RS. If decoding is successful outputs corrected data symbols. + /// Returns corrected symbols, -1 if illegal or uncorrectable + /// Data symbols. + /// Position of erasures. + /// Number of erasures. + public int eras_dec_rs(ref int[] data, out int[] erasPos, int noEras) + { + if(!_initialized) + throw new UnauthorizedAccessException("Trying to calculate RS without initializing!"); + + erasPos = new int[_nn - _kk]; + int i, j; + int q, tmp; + int[] recd = new int[_nn]; + int[] lambda = new int[_nn - _kk + 1]; /* Err+Eras Locator poly */ + int[] s = new int[_nn - _kk + 1]; /* syndrome poly */ + int[] b = new int[_nn - _kk + 1]; + int[] t = new int[_nn - _kk + 1]; + int[] omega = new int[_nn - _kk + 1]; + int[] root = new int[_nn - _kk]; + int[] reg = new int[_nn - _kk + 1]; + int[] loc = new int[_nn - _kk]; + int count; + + /* data[] is in polynomial form, copy and convert to index form */ + for(i = _nn - 1; i >= 0; i--) + { + if(_mm != 8) + if(data[i] > _nn) + return -1; /* Illegal symbol */ + + recd[i] = _indexOf[data[i]]; + } + + /* first form the syndromes; i.e., evaluate recd(x) at roots of g(x) + * namely @**(B0+i), i = 0, ... ,(NN-KK-1) + */ + int synError = 0; + + for(i = 1; i <= _nn - _kk; i++) + { + tmp = 0; + + for(j = 0; j < _nn; j++) + if(recd[j] != _a0) /* recd[j] in index form */ + tmp ^= _alphaTo[Modnn(recd[j] + ((B0 + i - 1) * j))]; + + synError |= tmp; /* set flag if non-zero syndrome => + * error */ + + /* store syndrome in index form */ + s[i] = _indexOf[tmp]; + } + + if(synError == 0) + return 0; + + Clear(ref lambda, _nn - _kk); + lambda[0] = 1; + + if(noEras > 0) + { + /* Init lambda to be the erasure locator polynomial */ + lambda[1] = _alphaTo[erasPos[0]]; + + for(i = 1; i < noEras; i++) + { + int u = erasPos[i]; + + for(j = i + 1; j > 0; j--) + { + tmp = _indexOf[lambda[j - 1]]; + + if(tmp != _a0) + lambda[j] ^= _alphaTo[Modnn(u + tmp)]; + } + } + + #if DEBUG + /* find roots of the erasure location polynomial */ + for(i = 1; i <= noEras; i++) + reg[i] = _indexOf[lambda[i]]; + + count = 0; + + for(i = 1; i <= _nn; i++) + { + q = 1; + + for(j = 1; j <= noEras; j++) + if(reg[j] != _a0) + { + reg[j] = Modnn(reg[j] + j); + q ^= _alphaTo[reg[j]]; + } + + if(q != 0) + continue; + + /* store root and error location + * number indices + */ + root[count] = i; + loc[count] = _nn - i; + count++; + } + + if(count != noEras) + { + AaruConsole.DebugWriteLine("Reed Solomon", "\n lambda(x) is WRONG\n"); + + return -1; + } + + AaruConsole.DebugWriteLine("Reed Solomon", + "\n Erasure positions as determined by roots of Eras Loc Poly:\n"); + + for(i = 0; i < count; i++) + AaruConsole.DebugWriteLine("Reed Solomon", "{0} ", loc[i]); + + AaruConsole.DebugWriteLine("Reed Solomon", "\n"); + #endif + } + + for(i = 0; i < _nn - _kk + 1; i++) + b[i] = _indexOf[lambda[i]]; + + /* + * Begin Berlekamp-Massey algorithm to determine error+erasure + * locator polynomial + */ + int r = noEras; + int el = noEras; + + while(++r <= _nn - _kk) + { + /* r is the step number */ + /* Compute discrepancy at the r-th step in poly-form */ + int discrR = 0; + + for(i = 0; i < r; i++) + if(lambda[i] != 0 && + s[r - i] != _a0) + discrR ^= _alphaTo[Modnn(_indexOf[lambda[i]] + s[r - i])]; + + discrR = _indexOf[discrR]; /* Index form */ + + if(discrR == _a0) + { + /* 2 lines below: B(x) <-- x*B(x) */ + Copydown(ref b, ref b, _nn - _kk); + b[0] = _a0; + } + else + { + /* 7 lines below: T(x) <-- lambda(x) - discr_r*x*b(x) */ + t[0] = lambda[0]; + + for(i = 0; i < _nn - _kk; i++) + if(b[i] != _a0) + t[i + 1] = lambda[i + 1] ^ _alphaTo[Modnn(discrR + b[i])]; + else + t[i + 1] = lambda[i + 1]; + + if(2 * el <= r + noEras - 1) + { + el = r + noEras - el; + + /* + * 2 lines below: B(x) <-- inv(discr_r) * + * lambda(x) + */ + for(i = 0; i <= _nn - _kk; i++) + b[i] = lambda[i] == 0 ? _a0 : Modnn(_indexOf[lambda[i]] - discrR + _nn); + } + else + { + /* 2 lines below: B(x) <-- x*B(x) */ + Copydown(ref b, ref b, _nn - _kk); + b[0] = _a0; + } + + Copy(ref lambda, ref t, _nn - _kk + 1); + } + } + + /* Convert lambda to index form and compute deg(lambda(x)) */ + int degLambda = 0; + + for(i = 0; i < _nn - _kk + 1; i++) + { + lambda[i] = _indexOf[lambda[i]]; + + if(lambda[i] != _a0) + degLambda = i; + } + + /* + * Find roots of the error+erasure locator polynomial. By Chien + * Search + */ + int temp = reg[0]; + Copy(ref reg, ref lambda, _nn - _kk); + reg[0] = temp; + count = 0; /* Number of roots of lambda(x) */ + + for(i = 1; i <= _nn; i++) + { + q = 1; + + for(j = degLambda; j > 0; j--) + if(reg[j] != _a0) + { + reg[j] = Modnn(reg[j] + j); + q ^= _alphaTo[reg[j]]; + } + + if(q != 0) + continue; + + /* store root (index-form) and error location number */ + root[count] = i; + loc[count] = _nn - i; + count++; + } + + #if DEBUG + AaruConsole.DebugWriteLine("Reed Solomon", "\n Final error positions:\t"); + + for(i = 0; i < count; i++) + AaruConsole.DebugWriteLine("Reed Solomon", "{0} ", loc[i]); + + AaruConsole.DebugWriteLine("Reed Solomon", "\n"); + #endif + + if(degLambda != count) + return -1; + + /* + * Compute err+eras evaluator poly omega(x) = s(x)*lambda(x) (modulo + * x**(NN-KK)). in index form. Also find deg(omega). + */ + int degOmega = 0; + + for(i = 0; i < _nn - _kk; i++) + { + tmp = 0; + j = degLambda < i ? degLambda : i; + + for(; j >= 0; j--) + if(s[i + 1 - j] != _a0 && + lambda[j] != _a0) + tmp ^= _alphaTo[Modnn(s[i + 1 - j] + lambda[j])]; + + if(tmp != 0) + degOmega = i; + + omega[i] = _indexOf[tmp]; + } + + omega[_nn - _kk] = _a0; + + /* + * Compute error values in poly-form. num1 = omega(inv(X(l))), num2 = + * inv(X(l))**(B0-1) and den = lambda_pr(inv(X(l))) all in poly-form + */ + for(j = count - 1; j >= 0; j--) + { + int num1 = 0; + + for(i = degOmega; i >= 0; i--) + if(omega[i] != _a0) + num1 ^= _alphaTo[Modnn(omega[i] + (i * root[j]))]; + + int num2 = _alphaTo[Modnn((root[j] * (B0 - 1)) + _nn)]; + int den = 0; + + /* lambda[i+1] for i even is the formal derivative lambda_pr of lambda[i] */ + for(i = Min(degLambda, _nn - _kk - 1) & ~1; i >= 0; i -= 2) + if(lambda[i + 1] != _a0) + den ^= _alphaTo[Modnn(lambda[i + 1] + (i * root[j]))]; + + if(den == 0) + { + AaruConsole.DebugWriteLine("Reed Solomon", "\n ERROR: denominator = 0\n"); + + return -1; + } + + /* Apply error to data */ + if(num1 != 0) + data[loc[j]] ^= _alphaTo[Modnn(_indexOf[num1] + _indexOf[num2] + _nn - _indexOf[den])]; + } + + return count; + } + } +} \ No newline at end of file diff --git a/Aaru.Checksums/Register.cs b/Aaru.Checksums/Register.cs new file mode 100644 index 0000000..c56e12a --- /dev/null +++ b/Aaru.Checksums/Register.cs @@ -0,0 +1,82 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Register.cs +// Author(s) : Natalia Portillo +// +// Component : Core algorithms. +// +// --[ Description ] ---------------------------------------------------------- +// +// Registers all plugins in this assembly. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using Aaru.CommonTypes.Interfaces; + +namespace Aaru.Checksums +{ + /// + public sealed class Register : IPluginRegister + { + /// + public List GetAllChecksumPlugins() => Assembly.GetExecutingAssembly().GetTypes(). + Where(t => t.GetInterfaces().Contains(typeof(IChecksum))). + Where(t => t.IsClass).ToList(); + + /// + public List GetAllFilesystemPlugins() => null; + + /// + public List GetAllFilterPlugins() => null; + + /// + public List GetAllFloppyImagePlugins() => null; + + /// + public List GetAllMediaImagePlugins() => null; + + /// + public List GetAllPartitionPlugins() => null; + + /// + public List GetAllReadOnlyFilesystemPlugins() => null; + + /// + public List GetAllWritableFloppyImagePlugins() => null; + + /// + public List GetAllWritableImagePlugins() => null; + + /// + public List GetAllArchivePlugins() => null; + } +} \ No newline at end of file diff --git a/Aaru.Checksums/SHA1Context.cs b/Aaru.Checksums/SHA1Context.cs new file mode 100644 index 0000000..daf24a5 --- /dev/null +++ b/Aaru.Checksums/SHA1Context.cs @@ -0,0 +1,134 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : SHA1Context.cs +// Author(s) : Natalia Portillo +// +// Component : Checksums. +// +// --[ Description ] ---------------------------------------------------------- +// +// Wraps up .NET SHA1 implementation to a Init(), Update(), Final() context. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.IO; +using System.Security.Cryptography; +using System.Text; +using Aaru.CommonTypes.Interfaces; + +namespace Aaru.Checksums +{ + /// + /// Wraps up .NET SHA1 implementation to a Init(), Update(), Final() context. + public sealed class Sha1Context : IChecksum + { + readonly SHA1 _provider; + + /// Initializes the SHA1 hash provider + public Sha1Context() => _provider = SHA1.Create(); + + /// + /// Updates the hash with data. + /// Data buffer. + /// Length of buffer to hash. + public void Update(byte[] data, uint len) => _provider.TransformBlock(data, 0, (int)len, data, 0); + + /// + /// Updates the hash with data. + /// Data buffer. + public void Update(byte[] data) => Update(data, (uint)data.Length); + + /// + /// Returns a byte array of the hash value. + public byte[] Final() + { + _provider.TransformFinalBlock(Array.Empty(), 0, 0); + + return _provider.Hash; + } + + /// + /// Returns a hexadecimal representation of the hash value. + public string End() + { + _provider.TransformFinalBlock(Array.Empty(), 0, 0); + var sha1Output = new StringBuilder(); + + foreach(byte h in _provider.Hash) + sha1Output.Append(h.ToString("x2")); + + return sha1Output.ToString(); + } + + /// Gets the hash of a file + /// File path. + public static byte[] File(string filename) + { + var localSha1Provider = SHA1.Create(); + var fileStream = new FileStream(filename, FileMode.Open); + byte[] result = localSha1Provider.ComputeHash(fileStream); + fileStream.Close(); + + return result; + } + + /// Gets the hash of a file in hexadecimal and as a byte array. + /// File path. + /// Byte array of the hash value. + public static string File(string filename, out byte[] hash) + { + var localSha1Provider = SHA1.Create(); + var fileStream = new FileStream(filename, FileMode.Open); + hash = localSha1Provider.ComputeHash(fileStream); + var sha1Output = new StringBuilder(); + + foreach(byte h in hash) + sha1Output.Append(h.ToString("x2")); + + fileStream.Close(); + + return sha1Output.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Length of the data buffer to hash. + /// Byte array of the hash value. + public static string Data(byte[] data, uint len, out byte[] hash) + { + var localSha1Provider = SHA1.Create(); + hash = localSha1Provider.ComputeHash(data, 0, (int)len); + var sha1Output = new StringBuilder(); + + foreach(byte h in hash) + sha1Output.Append(h.ToString("x2")); + + return sha1Output.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Byte array of the hash value. + public static string Data(byte[] data, out byte[] hash) => Data(data, (uint)data.Length, out hash); + } +} \ No newline at end of file diff --git a/Aaru.Checksums/SHA256Context.cs b/Aaru.Checksums/SHA256Context.cs new file mode 100644 index 0000000..3dbf10d --- /dev/null +++ b/Aaru.Checksums/SHA256Context.cs @@ -0,0 +1,134 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : SHA256Context.cs +// Author(s) : Natalia Portillo +// +// Component : Checksums. +// +// --[ Description ] ---------------------------------------------------------- +// +// Wraps up .NET SHA256 implementation to a Init(), Update(), Final() context. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.IO; +using System.Security.Cryptography; +using System.Text; +using Aaru.CommonTypes.Interfaces; + +namespace Aaru.Checksums +{ + /// + /// Wraps up .NET SHA256 implementation to a Init(), Update(), Final() context. + public sealed class Sha256Context : IChecksum + { + readonly SHA256 _provider; + + /// Initializes the SHA256 hash provider + public Sha256Context() => _provider = SHA256.Create(); + + /// + /// Updates the hash with data. + /// Data buffer. + /// Length of buffer to hash. + public void Update(byte[] data, uint len) => _provider.TransformBlock(data, 0, (int)len, data, 0); + + /// + /// Updates the hash with data. + /// Data buffer. + public void Update(byte[] data) => Update(data, (uint)data.Length); + + /// + /// Returns a byte array of the hash value. + public byte[] Final() + { + _provider.TransformFinalBlock(Array.Empty(), 0, 0); + + return _provider.Hash; + } + + /// + /// Returns a hexadecimal representation of the hash value. + public string End() + { + _provider.TransformFinalBlock(Array.Empty(), 0, 0); + var sha256Output = new StringBuilder(); + + foreach(byte h in _provider.Hash) + sha256Output.Append(h.ToString("x2")); + + return sha256Output.ToString(); + } + + /// Gets the hash of a file + /// File path. + public static byte[] File(string filename) + { + var localSha256Provider = SHA256.Create(); + var fileStream = new FileStream(filename, FileMode.Open); + byte[] result = localSha256Provider.ComputeHash(fileStream); + fileStream.Close(); + + return result; + } + + /// Gets the hash of a file in hexadecimal and as a byte array. + /// File path. + /// Byte array of the hash value. + public static string File(string filename, out byte[] hash) + { + var localSha256Provider = SHA256.Create(); + var fileStream = new FileStream(filename, FileMode.Open); + hash = localSha256Provider.ComputeHash(fileStream); + var sha256Output = new StringBuilder(); + + foreach(byte h in hash) + sha256Output.Append(h.ToString("x2")); + + fileStream.Close(); + + return sha256Output.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Length of the data buffer to hash. + /// Byte array of the hash value. + public static string Data(byte[] data, uint len, out byte[] hash) + { + var localSha256Provider = SHA256.Create(); + hash = localSha256Provider.ComputeHash(data, 0, (int)len); + var sha256Output = new StringBuilder(); + + foreach(byte h in hash) + sha256Output.Append(h.ToString("x2")); + + return sha256Output.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Byte array of the hash value. + public static string Data(byte[] data, out byte[] hash) => Data(data, (uint)data.Length, out hash); + } +} \ No newline at end of file diff --git a/Aaru.Checksums/SHA384Context.cs b/Aaru.Checksums/SHA384Context.cs new file mode 100644 index 0000000..4c5d522 --- /dev/null +++ b/Aaru.Checksums/SHA384Context.cs @@ -0,0 +1,134 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : SHA384Context.cs +// Author(s) : Natalia Portillo +// +// Component : Checksums. +// +// --[ Description ] ---------------------------------------------------------- +// +// Wraps up .NET SHA384 implementation to a Init(), Update(), Final() context. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.IO; +using System.Security.Cryptography; +using System.Text; +using Aaru.CommonTypes.Interfaces; + +namespace Aaru.Checksums +{ + /// + /// Wraps up .NET SHA384 implementation to a Init(), Update(), Final() context. + public sealed class Sha384Context : IChecksum + { + readonly SHA384 _provider; + + /// Initializes the SHA384 hash provider + public Sha384Context() => _provider = SHA384.Create(); + + /// + /// Updates the hash with data. + /// Data buffer. + /// Length of buffer to hash. + public void Update(byte[] data, uint len) => _provider.TransformBlock(data, 0, (int)len, data, 0); + + /// + /// Updates the hash with data. + /// Data buffer. + public void Update(byte[] data) => Update(data, (uint)data.Length); + + /// + /// Returns a byte array of the hash value. + public byte[] Final() + { + _provider.TransformFinalBlock(Array.Empty(), 0, 0); + + return _provider.Hash; + } + + /// + /// Returns a hexadecimal representation of the hash value. + public string End() + { + _provider.TransformFinalBlock(Array.Empty(), 0, 0); + var sha384Output = new StringBuilder(); + + foreach(byte h in _provider.Hash) + sha384Output.Append(h.ToString("x2")); + + return sha384Output.ToString(); + } + + /// Gets the hash of a file + /// File path. + public static byte[] File(string filename) + { + var localSha384Provider = SHA384.Create(); + var fileStream = new FileStream(filename, FileMode.Open); + byte[] result = localSha384Provider.ComputeHash(fileStream); + fileStream.Close(); + + return result; + } + + /// Gets the hash of a file in hexadecimal and as a byte array. + /// File path. + /// Byte array of the hash value. + public static string File(string filename, out byte[] hash) + { + var localSha384Provider = SHA384.Create(); + var fileStream = new FileStream(filename, FileMode.Open); + hash = localSha384Provider.ComputeHash(fileStream); + var sha384Output = new StringBuilder(); + + foreach(byte h in hash) + sha384Output.Append(h.ToString("x2")); + + fileStream.Close(); + + return sha384Output.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Length of the data buffer to hash. + /// Byte array of the hash value. + public static string Data(byte[] data, uint len, out byte[] hash) + { + var localSha384Provider = SHA384.Create(); + hash = localSha384Provider.ComputeHash(data, 0, (int)len); + var sha384Output = new StringBuilder(); + + foreach(byte h in hash) + sha384Output.Append(h.ToString("x2")); + + return sha384Output.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Byte array of the hash value. + public static string Data(byte[] data, out byte[] hash) => Data(data, (uint)data.Length, out hash); + } +} \ No newline at end of file diff --git a/Aaru.Checksums/SHA512Context.cs b/Aaru.Checksums/SHA512Context.cs new file mode 100644 index 0000000..bd4d4b9 --- /dev/null +++ b/Aaru.Checksums/SHA512Context.cs @@ -0,0 +1,134 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : SHA512Context.cs +// Author(s) : Natalia Portillo +// +// Component : Checksums. +// +// --[ Description ] ---------------------------------------------------------- +// +// Wraps up .NET SHA512 implementation to a Init(), Update(), Final() context. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.IO; +using System.Security.Cryptography; +using System.Text; +using Aaru.CommonTypes.Interfaces; + +namespace Aaru.Checksums +{ + /// + /// Wraps up .NET SHA512 implementation to a Init(), Update(), Final() context. + public sealed class Sha512Context : IChecksum + { + readonly SHA512 _provider; + + /// Initializes the SHA512 hash provider + public Sha512Context() => _provider = SHA512.Create(); + + /// + /// Updates the hash with data. + /// Data buffer. + /// Length of buffer to hash. + public void Update(byte[] data, uint len) => _provider.TransformBlock(data, 0, (int)len, data, 0); + + /// + /// Updates the hash with data. + /// Data buffer. + public void Update(byte[] data) => Update(data, (uint)data.Length); + + /// + /// Returns a byte array of the hash value. + public byte[] Final() + { + _provider.TransformFinalBlock(Array.Empty(), 0, 0); + + return _provider.Hash; + } + + /// + /// Returns a hexadecimal representation of the hash value. + public string End() + { + _provider.TransformFinalBlock(Array.Empty(), 0, 0); + var sha512Output = new StringBuilder(); + + foreach(byte h in _provider.Hash) + sha512Output.Append(h.ToString("x2")); + + return sha512Output.ToString(); + } + + /// Gets the hash of a file + /// File path. + public static byte[] File(string filename) + { + var localSha512Provider = SHA512.Create(); + var fileStream = new FileStream(filename, FileMode.Open); + byte[] result = localSha512Provider.ComputeHash(fileStream); + fileStream.Close(); + + return result; + } + + /// Gets the hash of a file in hexadecimal and as a byte array. + /// File path. + /// Byte array of the hash value. + public static string File(string filename, out byte[] hash) + { + var localSha512Provider = SHA512.Create(); + var fileStream = new FileStream(filename, FileMode.Open); + hash = localSha512Provider.ComputeHash(fileStream); + var sha512Output = new StringBuilder(); + + foreach(byte h in hash) + sha512Output.Append(h.ToString("x2")); + + fileStream.Close(); + + return sha512Output.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Length of the data buffer to hash. + /// Byte array of the hash value. + public static string Data(byte[] data, uint len, out byte[] hash) + { + var localSha512Provider = SHA512.Create(); + hash = localSha512Provider.ComputeHash(data, 0, (int)len); + var sha512Output = new StringBuilder(); + + foreach(byte h in hash) + sha512Output.Append(h.ToString("x2")); + + return sha512Output.ToString(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Byte array of the hash value. + public static string Data(byte[] data, out byte[] hash) => Data(data, (uint)data.Length, out hash); + } +} \ No newline at end of file diff --git a/Aaru.Checksums/SpamSumContext.cs b/Aaru.Checksums/SpamSumContext.cs new file mode 100644 index 0000000..16af49b --- /dev/null +++ b/Aaru.Checksums/SpamSumContext.cs @@ -0,0 +1,527 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : SpamSumContext.cs +// Author(s) : Natalia Portillo +// +// Component : Checksums. +// +// --[ Description ] ---------------------------------------------------------- +// +// Implements the SpamSum fuzzy hashing algorithm. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +// Based on ssdeep +// Copyright (C) 2002 Andrew Tridgell +// Copyright (C) 2006 ManTech International Corporation +// Copyright (C) 2013 Helmut Grohne +// +// Earlier versions of this code were named fuzzy.c and can be found at: +// http://www.samba.org/ftp/unpacked/junkcode/spamsum/ +// http://ssdeep.sf.net/ + +using System; +using System.Runtime.CompilerServices; +using System.Text; +using Aaru.CommonTypes.Interfaces; + +namespace Aaru.Checksums +{ + /// + /// Implements the SpamSum fuzzy hashing algorithm. + public sealed class SpamSumContext : IChecksum + { + const uint ROLLING_WINDOW = 7; + const uint MIN_BLOCKSIZE = 3; + const uint HASH_PRIME = 0x01000193; + const uint HASH_INIT = 0x28021967; + const uint NUM_BLOCKHASHES = 31; + const uint SPAMSUM_LENGTH = 64; + const uint FUZZY_MAX_RESULT = (2 * SPAMSUM_LENGTH) + 20; + + //"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + readonly byte[] _b64 = + { + 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, + 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, + 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x30, 0x31, + 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x2B, 0x2F + }; + + FuzzyState _self; + + /// Initializes the SpamSum structures + public SpamSumContext() + { + _self = new FuzzyState + { + Bh = new BlockhashContext[NUM_BLOCKHASHES] + }; + + for(int i = 0; i < NUM_BLOCKHASHES; i++) + _self.Bh[i].Digest = new byte[SPAMSUM_LENGTH]; + + _self.Bhstart = 0; + _self.Bhend = 1; + _self.Bh[0].H = HASH_INIT; + _self.Bh[0].Halfh = HASH_INIT; + _self.Bh[0].Digest[0] = 0; + _self.Bh[0].Halfdigest = 0; + _self.Bh[0].Dlen = 0; + _self.TotalSize = 0; + roll_init(); + } + + /// + /// Updates the hash with data. + /// Data buffer. + /// Length of buffer to hash. + public void Update(byte[] data, uint len) + { + _self.TotalSize += len; + + for(int i = 0; i < len; i++) + fuzzy_engine_step(data[i]); + } + + /// + /// Updates the hash with data. + /// Data buffer. + public void Update(byte[] data) => Update(data, (uint)data.Length); + + /// + /// Returns a byte array of the hash value. + public byte[] Final() => throw new NotImplementedException("SpamSum does not have a binary representation."); + + /// + /// Returns a base64 representation of the hash value. + public string End() + { + FuzzyDigest(out byte[] result); + + return CToString(result); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + void roll_init() => _self.Roll = new RollState + { + Window = new byte[ROLLING_WINDOW] + }; + + /* + * a rolling hash, based on the Adler checksum. By using a rolling hash + * we can perform auto resynchronisation after inserts/deletes + + * internally, h1 is the sum of the bytes in the window and h2 + * is the sum of the bytes times the index + + * h3 is a shift/xor based rolling hash, and is mostly needed to ensure that + * we can cope with large blocksize values + */ + [MethodImpl(MethodImplOptions.AggressiveInlining)] + void roll_hash(byte c) + { + _self.Roll.H2 -= _self.Roll.H1; + _self.Roll.H2 += ROLLING_WINDOW * c; + + _self.Roll.H1 += c; + _self.Roll.H1 -= _self.Roll.Window[_self.Roll.N % ROLLING_WINDOW]; + + _self.Roll.Window[_self.Roll.N % ROLLING_WINDOW] = c; + _self.Roll.N++; + + /* The original spamsum AND'ed this value with 0xFFFFFFFF which + * in theory should have no effect. This AND has been removed + * for performance (jk) */ + _self.Roll.H3 <<= 5; + _self.Roll.H3 ^= c; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + uint roll_sum() => _self.Roll.H1 + _self.Roll.H2 + _self.Roll.H3; + + /* A simple non-rolling hash, based on the FNV hash. */ + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static uint sum_hash(byte c, uint h) => (h * HASH_PRIME) ^ c; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static uint SSDEEP_BS(uint index) => MIN_BLOCKSIZE << (int)index; + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + void fuzzy_try_fork_blockhash() + { + if(_self.Bhend >= NUM_BLOCKHASHES) + return; + + if(_self.Bhend == 0) // assert + throw new Exception("Assertion failed"); + + uint obh = _self.Bhend - 1; + uint nbh = _self.Bhend; + _self.Bh[nbh].H = _self.Bh[obh].H; + _self.Bh[nbh].Halfh = _self.Bh[obh].Halfh; + _self.Bh[nbh].Digest[0] = 0; + _self.Bh[nbh].Halfdigest = 0; + _self.Bh[nbh].Dlen = 0; + ++_self.Bhend; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + void fuzzy_try_reduce_blockhash() + { + if(_self.Bhstart >= _self.Bhend) + throw new Exception("Assertion failed"); + + if(_self.Bhend - _self.Bhstart < 2) + /* Need at least two working hashes. */ + return; + + if((ulong)SSDEEP_BS(_self.Bhstart) * SPAMSUM_LENGTH >= _self.TotalSize) + /* Initial blocksize estimate would select this or a smaller + * blocksize. */ + return; + + if(_self.Bh[_self.Bhstart + 1].Dlen < SPAMSUM_LENGTH / 2) + /* Estimate adjustment would select this blocksize. */ + return; + + /* At this point we are clearly no longer interested in the + * start_blocksize. Get rid of it. */ + ++_self.Bhstart; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + void fuzzy_engine_step(byte c) + { + uint i; + /* At each character we update the rolling hash and the normal hashes. + * When the rolling hash hits a reset value then we emit a normal hash + * as a element of the signature and reset the normal hash. */ + roll_hash(c); + ulong h = roll_sum(); + + for(i = _self.Bhstart; i < _self.Bhend; ++i) + { + _self.Bh[i].H = sum_hash(c, _self.Bh[i].H); + _self.Bh[i].Halfh = sum_hash(c, _self.Bh[i].Halfh); + } + + for(i = _self.Bhstart; i < _self.Bhend; ++i) + { + /* With growing blocksize almost no runs fail the next test. */ + if(h % SSDEEP_BS(i) != SSDEEP_BS(i) - 1) + /* Once this condition is false for one bs, it is + * automatically false for all further bs. I.e. if + * h === -1 (mod 2*bs) then h === -1 (mod bs). */ + break; + + /* We have hit a reset point. We now emit hashes which are + * based on all characters in the piece of the message between + * the last reset point and this one */ + if(0 == _self.Bh[i].Dlen) + fuzzy_try_fork_blockhash(); + + _self.Bh[i].Digest[_self.Bh[i].Dlen] = _b64[_self.Bh[i].H % 64]; + _self.Bh[i].Halfdigest = _b64[_self.Bh[i].Halfh % 64]; + + if(_self.Bh[i].Dlen < SPAMSUM_LENGTH - 1) + { + /* We can have a problem with the tail overflowing. The + * easiest way to cope with this is to only reset the + * normal hash if we have room for more characters in + * our signature. This has the effect of combining the + * last few pieces of the message into a single piece + * */ + _self.Bh[i].Digest[++_self.Bh[i].Dlen] = 0; + _self.Bh[i].H = HASH_INIT; + + if(_self.Bh[i].Dlen >= SPAMSUM_LENGTH / 2) + continue; + + _self.Bh[i].Halfh = HASH_INIT; + _self.Bh[i].Halfdigest = 0; + } + else + fuzzy_try_reduce_blockhash(); + } + } + + // CLAUNIA: Flags seems to never be used in ssdeep, so I just removed it for code simplicity + [MethodImpl(MethodImplOptions.AggressiveInlining)] + void FuzzyDigest(out byte[] result) + { + var sb = new StringBuilder(); + uint bi = _self.Bhstart; + uint h = roll_sum(); + int remain = (int)(FUZZY_MAX_RESULT - 1); /* Exclude terminating '\0'. */ + result = new byte[FUZZY_MAX_RESULT]; + + /* Verify that our elimination was not overeager. */ + if(!(bi == 0 || (ulong)SSDEEP_BS(bi) / 2 * SPAMSUM_LENGTH < _self.TotalSize)) + throw new Exception("Assertion failed"); + + int resultOff; + + /* Initial blocksize guess. */ + while((ulong)SSDEEP_BS(bi) * SPAMSUM_LENGTH < _self.TotalSize) + { + ++bi; + + if(bi >= NUM_BLOCKHASHES) + throw new OverflowException("The input exceeds data types."); + } + + /* Adapt blocksize guess to actual digest length. */ + while(bi >= _self.Bhend) + --bi; + + while(bi > _self.Bhstart && + _self.Bh[bi].Dlen < SPAMSUM_LENGTH / 2) + --bi; + + if(bi > 0 && + _self.Bh[bi].Dlen < SPAMSUM_LENGTH / 2) + throw new Exception("Assertion failed"); + + sb.AppendFormat("{0}:", SSDEEP_BS(bi)); + int i = Encoding.ASCII.GetBytes(sb.ToString()).Length; + + if(i <= 0) + /* Maybe snprintf has set errno here? */ + throw new OverflowException("The input exceeds data types."); + + if(i >= remain) + throw new Exception("Assertion failed"); + + remain -= i; + + Array.Copy(Encoding.ASCII.GetBytes(sb.ToString()), 0, result, 0, i); + + resultOff = i; + + i = (int)_self.Bh[bi].Dlen; + + if(i > remain) + throw new Exception("Assertion failed"); + + Array.Copy(_self.Bh[bi].Digest, 0, result, resultOff, i); + resultOff += i; + remain -= i; + + if(h != 0) + { + if(remain <= 0) + throw new Exception("Assertion failed"); + + result[resultOff] = _b64[_self.Bh[bi].H % 64]; + + if(i < 3 || + result[resultOff] != result[resultOff - 1] || + result[resultOff] != result[resultOff - 2] || + result[resultOff] != result[resultOff - 3]) + { + ++resultOff; + --remain; + } + } + else if(_self.Bh[bi].Digest[i] != 0) + { + if(remain <= 0) + throw new Exception("Assertion failed"); + + result[resultOff] = _self.Bh[bi].Digest[i]; + + if(i < 3 || + result[resultOff] != result[resultOff - 1] || + result[resultOff] != result[resultOff - 2] || + result[resultOff] != result[resultOff - 3]) + { + ++resultOff; + --remain; + } + } + + if(remain <= 0) + throw new Exception("Assertion failed"); + + result[resultOff++] = 0x3A; // ':' + --remain; + + if(bi < _self.Bhend - 1) + { + ++bi; + i = (int)_self.Bh[bi].Dlen; + + if(i > remain) + throw new Exception("Assertion failed"); + + Array.Copy(_self.Bh[bi].Digest, 0, result, resultOff, i); + resultOff += i; + remain -= i; + + if(h != 0) + { + if(remain <= 0) + throw new Exception("Assertion failed"); + + h = _self.Bh[bi].Halfh; + result[resultOff] = _b64[h % 64]; + + if(i < 3 || + result[resultOff] != result[resultOff - 1] || + result[resultOff] != result[resultOff - 2] || + result[resultOff] != result[resultOff - 3]) + { + ++resultOff; + --remain; + } + } + else + { + i = _self.Bh[bi].Halfdigest; + + if(i != 0) + { + if(remain <= 0) + throw new Exception("Assertion failed"); + + result[resultOff] = (byte)i; + + if(i < 3 || + result[resultOff] != result[resultOff - 1] || + result[resultOff] != result[resultOff - 2] || + result[resultOff] != result[resultOff - 3]) + { + ++resultOff; + --remain; + } + } + } + } + else if(h != 0) + { + if(_self.Bh[bi].Dlen != 0) + throw new Exception("Assertion failed"); + + if(remain <= 0) + throw new Exception("Assertion failed"); + + result[resultOff++] = _b64[_self.Bh[bi].H % 64]; + /* No need to bother with FUZZY_FLAG_ELIMSEQ, because this + * digest has length 1. */ + --remain; + } + + result[resultOff] = 0; + } + + /// Gets the hash of a file + /// File path. + public static byte[] File(string filename) => + throw new NotImplementedException("SpamSum does not have a binary representation."); + + /// Gets the hash of a file in hexadecimal and as a byte array. + /// File path. + /// Byte array of the hash value. + public static string File(string filename, out byte[] hash) => + throw new NotImplementedException("Not yet implemented."); + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// Length of the data buffer to hash. + /// null + /// Base64 representation of SpamSum $blocksize:$hash:$hash + public static string Data(byte[] data, uint len, out byte[] hash) + { + var fuzzyContext = new SpamSumContext(); + + fuzzyContext.Update(data, len); + + hash = null; + + return fuzzyContext.End(); + } + + /// Gets the hash of the specified data buffer. + /// Data buffer. + /// null + /// Base64 representation of SpamSum $blocksize:$hash:$hash + public static string Data(byte[] data, out byte[] hash) => Data(data, (uint)data.Length, out hash); + + // Converts an ASCII null-terminated string to .NET string + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static string CToString(byte[] cString) + { + int count = 0; + + // ReSharper disable once LoopCanBeConvertedToQuery + // LINQ is six times slower + foreach(byte c in cString) + { + if(c == 0) + break; + + count++; + } + + return Encoding.ASCII.GetString(cString, 0, count); + } + + struct RollState + { + public byte[] Window; + + // ROLLING_WINDOW + public uint H1; + public uint H2; + public uint H3; + public uint N; + } + + /* A blockhash contains a signature state for a specific (implicit) blocksize. + * The blocksize is given by SSDEEP_BS(index). The h and halfh members are the + * FNV hashes, where halfh stops to be reset after digest is SPAMSUM_LENGTH/2 + * long. The halfh hash is needed be able to truncate digest for the second + * output hash to stay compatible with ssdeep output. */ + struct BlockhashContext + { + public uint H; + public uint Halfh; + public byte[] Digest; + + // SPAMSUM_LENGTH + public byte Halfdigest; + public uint Dlen; + } + + struct FuzzyState + { + public uint Bhstart; + public uint Bhend; + public BlockhashContext[] Bh; + + //NUM_BLOCKHASHES + public ulong TotalSize; + public RollState Roll; + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/.editorconfig b/Aaru.CommonTypes/.editorconfig new file mode 100644 index 0000000..9181fe5 --- /dev/null +++ b/Aaru.CommonTypes/.editorconfig @@ -0,0 +1,632 @@ +root = true + +[*] +charset = utf-8 +next_line = crlf +insert_final_newline = false +indent_style = space +indent_size = 4 + +# Generic non-language specific ones for Resharper and friends +brace_style = next_line +int_align = true +keep_existing_arrangement = false +place_simple_blocks_on_single_line = true +place_simple_declaration_blocks_on_single_line = true +place_attribute_on_same_line = false +space_after_unary_operator = false +space_after_comma = true +space_around_ternary_operator = true +space_around_binary_operator = true +space_around_member_access_operator = false +space_before_open_square_brackets = false +space_after_keywords_in_control_flow_statements = true +space_before_comma = false +space_between_method_call_name_and_opening_parenthesis = false +space_between_method_declaration_name_and_open_parenthesis = false +space_between_square_brackets = false +space_between_parentheses_of_control_flow_statements = false +accessor_owner_declaration_braces = next_line +accessor_declaration_braces = next_line +case_block_braces = next_line +initializer_braces = next_line +other_braces = next_line +allow_comment_after_lbrace = false +empty_block_style = together_same_line +braces_for_ifelse = not_required +braces_for_for = not_required +braces_for_foreach = not_required +braces_for_while = not_required +braces_for_dowhile = not_required +braces_for_using = not_required +braces_for_lock = not_required +braces_for_fixed = not_required +method_or_operator_body = expression_body +local_function_body = expression_body +constructor_or_destructor_body = expression_body +accessor_owner_body = expression_body +force_attribute_style = join +function_braces = next_line +force_control_statements_braces = always_remove +space_in_singleline_accessorholder = true +type_declaration_braces = next_line +invocable_declaration_braces = next_line +anonymous_method_declaration_braces = next_line +space_between_accessors_in_singleline_property = true +indent_nested_usings_stmt = true +space_within_empty_braces = false +indent_nested_fixed_stmt = true +indent_nested_lock_stmt = true +indent_nested_for_stmt = true +indent_nested_foreach_stmt = true +indent_nested_while_stmt = true +use_continuous_indent_inside_parens = true +indent_method_decl_pars = inside +indent_invocation_pars = inside +indent_statement_pars = inside +indent_typeparam_angles = inside +indent_typearg_angles = inside +indent_pars = inside +indent_preprocessor_if = outdent +indent_preprocessor_region = usual_indent +indent_preprocessor_other = usual_indent +indent_switch_labels = true +indent_type_constraints = true +stick_comment = false +alignment_tab_fill_style = use_spaces +align_multiline_parameter = true +align_multiline_extends_list = true +align_linq_query = true +align_multiline_binary_expressions_chain = true +outdent_binary_ops = true +align_multiline_calls_chain = true +outdent_dots = true +align_multiline_array_and_object_initializer = false +indent_anonymous_method_block = false +align_first_arg_by_paren = true +align_multiline_argument = true +align_tuple_components = true +align_multiline_expression = true +align_multiline_for_stmt = true +align_multiple_declaration = true +align_multline_type_parameter_list = true +align_multline_type_parameter_constrains = true +int_align_fields = true +int_align_properties = true +int_align_methods = true +int_align_parameters = false +int_align_variables = true +int_align_assignments = true +int_align_nested_ternary = true +int_align_invocations = false +int_align_binary_expressions = true +int_align_comments = true +int_align_switch_sections = true +keep_user_linebreaks = false +keep_existing_arrangement = false +keep_existing_linebreaks = false +max_line_length = 120 +wrap_before_comma = false +special_else_if_treatment = true +place_type_attribute_on_same_line = never +place_method_attribute_on_same_line = never +place_accessorholder_attribute_on_same_line = never +place_attribute_on_same_line = never +place_accessor_attribute_on_same_line = never +place_attribute_on_same_line = never +place_field_attribute_on_same_line = never +place_attribute_on_same_line = never +wrap_parameters_style = wrap_if_long +keep_existing_declaration_parens_arrangement = false +wrap_before_declaration_lpar = false +wrap_after_declaration_lpar = false +wrap_before_declaration_rpar = false +place_constructor_initializer_on_same_line = true +keep_existing_expr_member_arrangement = false +place_expr_method_on_single_line = true +place_expr_property_on_single_line = true +place_expr_accessor_on_single_line = true +wrap_before_arrow_with_expressions = false +place_type_constraints_on_same_line = true +wrap_before_first_type_parameter_constraint = true +wrap_multiple_type_parameter_constraints_style = wrap_if_long +wrap_before_type_parameter_langle = true +wrap_before_extends_colon = false +wrap_extends_list_style = wrap_if_long +keep_existing_declaration_block_arrangement = false +place_abstract_accessorholder_on_single_line = true +place_simple_accessorholder_on_single_line = false +place_accessor_with_attrs_holder_on_single_line = false +place_simple_accessor_on_single_line = true +place_simple_method_on_single_line = false +keep_existing_enum_arrangement = false +place_simple_enum_on_single_line = false +wrap_enum_declaration = wrap_if_long +new_line_before_else = true +new_line_before_while = false +wrap_for_stmt_header_style = wrap_if_long +wrap_multiple_declaration_style = wrap_if_long +keep_existing_embedded_arrangement = false +place_simple_embedded_statement_on_same_line = false +place_simple_case_statement_on_same_line = true +keep_existing_embedded_block_arrangement = false +place_simple_embedded_block_on_same_line = false +place_simple_anonymousmethod_on_single_line = false +keep_existing_initializer_arrangement = false +place_simple_initializer_on_single_line = false +wrap_object_and_collection_initializer_style = chop_always +wrap_array_initializer_style = wrap_if_long +wrap_arguments_style = wrap_if_long +keep_existing_invocation_parens_arrangement = false +wrap_after_invocation_lpar = false +wrap_before_invocation_rpar = false +wrap_after_dot_in_method_calls = true +wrap_chained_method_calls = wrap_if_long +wrap_before_binary_opsign = false +wrap_chained_binary_expressions = wrap_if_long +force_chop_compound_if_expression = true +force_chop_compound_while_expression = true +force_chop_compound_do_expression = true +wrap_before_ternary_opsigns = true +wrap_ternary_expr_style = wrap_if_long +nested_ternary_style = expanded +wrap_linq_expressions = wrap_if_long +wrap_before_linq_expression = false +place_linq_into_on_new_line = false +wrap_verbatim_interpolated_strings = wrap_if_long +extra_spaces = remove_all +space_after_keywords_in_control_flow_statements = false +space_between_method_call_name_and_opening_parenthesis = false +space_between_method_declaration_name_and_open_parenthesis = false +space_before_typeof_parentheses = false +space_before_checked_parentheses = false +space_before_sizeof_parentheses = false +space_before_nameof_parentheses = false +space_between_keyword_and_expression = true +space_between_keyword_and_type = true +space_around_assignment_op = true +space_around_logical_op = true +space_around_binary_operator = true +space_around_equality_op = true +space_around_relational_op = true +space_around_bitwise_op = true +space_around_additive_op = true +space_around_multiplicative_op = true +space_around_shift_op = true +space_around_nullcoalescing_op = true +space_around_arrow_op = false +space_after_logical_not_op = false +space_after_unary_operator = false +space_after_cast = false +space_around_dot = false +space_around_lambda_arrow = true +space_before_pointer_asterik_declaration = false +space_before_nullable_mark = false +blank_lines_around_class_definition = 1 +namespace_indentation = all +space_within_template_argument = false +align_union_type_usage = true +space_in_singleline_method = true +space_in_singleline_anonymous_method = true +space_within_single_line_array_initializer_braces = true +space_around_arrow_op = false + +# These are for markup languages (HTML, XML, etc) +spaces_around_eq_in_pi_attribute = false +space_after_last_pi_attribute = true +pi_attributes_indent = align_by_first_attribute +blank_line_after_pi = true +spaces_around_eq_in_attribute = false +space_after_last_attribute = false +space_before_self_closing = true +attribute_style = on_single_line +attribute_indent = align_by_first_attribute +sort_attributes = true +sort_class_selectors = true +max_blank_lines_between_tags = 0 +linebreak_before_all_elements = true +linebreak_before_multiline_elements = true +quote_style = doublequoted +delete_quotes_from_solid_values = false +normalize_tag_names = true + + +[{.babelrc,.stylelintrc,jest.config,.eslintrc,.prettierrc,*.json,*.jsb3,*.jsb2,*.bowerrc}] +indent_size = 2 + +[*.js.map] +indent_size = 2 + +[*.{css,scss}] +indent_size = 2 +declarations_style = separate_lines_for_nonsingle +media_query_style = separate_lines +selector_style = same_line +properties_style = separate_lines_for_nonsingle +brace_style = next_line + +[{.analysis_options,*.yml,*.yaml}] +indent_size = 2 + +# Xml project files +[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}] +indent_size = 2 + +# Xml files +[*.{xml,stylecop,resx,ruleset}] +indent_size = 2 + +# Xml config files +[*.{props,targets,config,nuspec}] +indent_size = 2 + +# .net files +[*.{cs,vb}] +# These set the this. / Me. +dotnet_style_qualification_for_field = false:warning +dotnet_style_qualification_for_property = false:warning +dotnet_style_qualification_for_method = false:warning +dotnet_style_qualification_for_event = false:warning + +# These make it suggest Int32 instead of int, etc. +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion +dotnet_style_predefined_type_for_member_access = true:suggestion + +# This controls implicit access modifiers +dotnet_style_require_accessibility_modifiers = never:suggestion + +# Prefer non modified fields to be marked readonly +dotnet_style_readonly_field = true:warning + +# Parenthesis settings +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning +dotnet_style_parentheses_in_other_operators = always_for_clarity:warning + +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:error +dotnet_style_prefer_inferred_tuple_names = true:warning +dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning +dotnet_style_prefer_conditional_expression_over_return = true:warning +dotnet_style_coalesce_expression = true:warning +dotnet_style_null_propagation = true:error + +dotnet_sort_system_directives_first = true + +# Constants in C style, all-caps +dotnet_naming_rule.constant_fields_caps.symbols = constant_fields +dotnet_naming_rule.constant_fields_caps.severity = warning +dotnet_naming_rule.constant_fields_caps.style = caps_style +dotnet_naming_symbols.constant_fields.applicable_kinds = field +dotnet_naming_symbols.constant_fields.required_modifiers = const +dotnet_naming_style.caps_style.capitalization = all_upper + +# interfaces should be prefixed with I +dotnet_naming_rule.pascal_case_for_interface.severity = error +dotnet_naming_rule.pascal_case_for_interface.symbols = interfaces_fields +dotnet_naming_rule.pascal_case_for_interface.style = pascal_case_interface_style +dotnet_naming_symbols.interfaces_fields.applicable_kinds = interface +dotnet_naming_style.pascal_case_interface_style.required_prefix = I +dotnet_naming_style.pascal_case_interface_style.capitalization = pascal_case + +## internal and private fields should be _camelCase +dotnet_naming_rule.camel_case_for_private_internal_fields.severity = warning +dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields +dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style +dotnet_naming_symbols.private_internal_fields.applicable_kinds = field +dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal +dotnet_naming_style.camel_case_underscore_style.required_prefix = _ +dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case + +# 2018-12-07 NP: This is not yet working in VS2017 +# local variables should be camelCase +#dotnet_naming_rule.camel_case_for_locals.severity = suggestion +#dotnet_naming_rule.camel_case_for_locals.symbols = local_fields +#dotnet_naming_rule.camel_case_for_locals.style = camel_case_style +#dotnet_naming_symbols.local_fields.applicable_kinds = local +#dotnet_naming_style.camel_case_style.capitalization = camel_case + +[*.cs] +# var var var +csharp_style_var_for_built_in_types = false:warning +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_var_elsewhere = false:warning + +csharp_style_expression_bodied_methods = when_on_single_line:suggestion +csharp_style_expression_bodied_constructors = when_on_single_line:suggestion +csharp_style_expression_bodied_operators = when_on_single_line:suggestion +csharp_style_expression_bodied_properties = when_on_single_line:suggestion +csharp_style_expression_bodied_indexers = when_on_single_line:suggestion +csharp_style_expression_bodied_accessors = when_on_single_line:suggestion + +csharp_style_pattern_matching_over_is_with_cast_check = true:warning +csharp_style_pattern_matching_over_as_with_null_check = when_on_single_line:warning + +csharp_style_inlined_variable_declaration = true:warning + +csharp_prefer_simple_default_expression = true:warning +csharp_style_deconstructed_variable_declaration = false:warning + +csharp_style_throw_expression = true:warning +csharp_style_conditional_delegate_call = true:warning + +csharp_prefer_braces = false + +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_between_query_expression_clauses = true + +csharp_indent_case_contents = true +csharp_indent_switch_labels = true +csharp_indent_labels = flush_left + +csharp_space_after_cast = false +csharp_space_after_keywords_in_control_flow_statements = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = none +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_around_binary_operators = before_and_after +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false + +csharp_preserve_single_line_statements = false +csharp_preserve_single_line_blocks = true + +csharp_blank_lines_around_region = 0 +csharp_blank_lines_inside_region = 0 +csharp_blank_lines_before_single_line_comment = 1 +csharp_keep_blank_lines_in_declarations = 1 +csharp_remove_blank_lines_near_braces_in_declarations = true +csharp_blank_lines_after_start_comment = false +csharp_blank_lines_between_using_groups = 0 +csharp_blank_lines_after_using_list = 1 +csharp_blank_lines_around_namespace = 1 +csharp_blank_lines_inside_namespace = 0 +csharp_blank_lines_around_type = 1 +csharp_blank_lines_inside_type = 0 +csharp_blank_lines_around_field = 0 +csharp_blank_lines_around_single_line_field = 0 +csharp_blank_lines_around_property = 1 +csharp_blank_lines_around_single_line_property = 0 +csharp_blank_lines_around_auto_property = 0 +csharp_blank_lines_around_single_line_auto_property = 0 +csharp_blank_lines_around_invocable = 1 +csharp_blank_lines_around_single_line_invocable = 1 +csharp_keep_blank_lines_in_code = 1 +csharp_remove_blank_lines_near_braces_in_code = true +csharp_blank_lines_around_local_method = 1 +csharp_blank_lines_around_single_line_local_method = 1 +csharp_blank_lines_before_control_transfer_statements = 1 +csharp_blank_lines_after_control_transfer_statements = 1 +csharp_blank_lines_before_block_statements = 1 +csharp_blank_lines_after_block_statements = 1 +csharp_blank_lines_before_multiline_statements = 1 +csharp_blank_lines_after_multiline_statements = 1 + +csharp_type_declaration_braces = next_line +csharp_brace_style = next_line +csharp_indent_inside_namespace = true +csharp_invocable_declaration_braces = next_line +csharp_anonymous_method_declaration_braces = next_line +csharp_accessor_owner_declaration_braces = next_line +csharp_accessor_declaration_braces = next_line +csharp_case_block_braces = next_line +csharp_initializer_braces = next_line +csharp_other_braces = next_line +csharp_allow_comment_after_lbrace = false +csharp_empty_block_style = together_same_line + +csharp_for_built_in_types = use_explicit_type +csharp_for_simple_types = use_var_when_evident +csharp_for_other_types = use_explicit_type +csharp_prefer_separate_deconstructed_variables_declaration = true +csharp_prefer_explicit_discard_declaration = false + +csharp_instance_members_qualify_members = none +csharp_builtin_type_reference_style = use_keyword +csharp_prefer_qualified_reference = false +csharp_add_imports_to_deepest_scope = false +csharp_allow_alias = true +csharp_default_private_modifier = implicit +csharp_default_internal_modifier = explicit +csharp_arguments_literal = positional +csharp_arguments_string_literal = positional +csharp_arguments_named = positional +csharp_arguments_anonymous_function = positional +csharp_arguments_other = positional +csharp_braces_for_ifelse = not_required +csharp_braces_for_for = not_required +csharp_braces_for_foreach = not_required +csharp_braces_for_while = not_required +csharp_braces_for_dowhile = not_required +csharp_braces_for_using = not_required +csharp_braces_for_lock = not_required +csharp_braces_for_fixed = not_required +csharp_method_or_operator_body = expression_body +csharp_local_function_body = expression_body +csharp_constructor_or_destructor_body = expression_body +csharp_accessor_owner_body = expression_body +csharp_force_attribute_style = join +csharp_indent_nested_usings_stmt = true + +csharp_builtin_type_reference_for_member_access_style = use_keyword +csharp_indent_nested_fixed_stmt = true +csharp_indent_nested_lock_stmt = true +csharp_indent_nested_for_stmt = true +csharp_indent_nested_foreach_stmt = true +csharp_indent_nested_while_stmt = true +csharp_use_continuous_indent_inside_parens = true +csharp_indent_method_decl_pars = inside +csharp_indent_invocation_pars = inside +csharp_indent_statement_pars = inside +csharp_indent_typeparam_angles = inside +csharp_indent_typearg_angles = inside +csharp_indent_pars = inside +csharp_indent_preprocessor_if = outdent +csharp_indent_preprocessor_region = usual_indent +csharp_indent_preprocessor_other = usual_indent +csharp_indent_switch_labels = true +csharp_indent_type_constraints = true +csharp_stick_comment = false +csharp_alignment_tab_fill_style = use_spaces +csharp_align_multiline_parameter = true +csharp_align_multiline_extends_list = true +csharp_align_linq_query = true +csharp_align_multiline_binary_expressions_chain = true +csharp_outdent_binary_ops = true +csharp_align_multiline_calls_chain = true +csharp_outdent_dots = true +csharp_align_multiline_array_and_object_initializer = false +csharp_indent_anonymous_method_block = false +csharp_align_first_arg_by_paren = true +csharp_align_multiline_argument = true +csharp_align_tuple_components = true +csharp_align_multiline_expression = true +csharp_align_multiline_for_stmt = true +csharp_align_multiple_declaration = true +csharp_align_multline_type_parameter_list = true +csharp_align_multline_type_parameter_constrains = true +csharp_int_align_fields = true +csharp_int_align_properties = true +csharp_int_align_methods = true +csharp_int_align_parameters = false +csharp_int_align_variables = true +csharp_int_align_assignments = true +csharp_int_align_nested_ternary = true +csharp_int_align_invocations = false +csharp_int_align_binary_expressions = true +csharp_int_align_comments = true +csharp_int_align_switch_sections = true +csharp_int_align = true +csharp_keep_user_linebreaks = false +csharp_keep_existing_arrangement = false +csharp_keep_existing_linebreaks = false +csharp_max_line_length = 120 +csharp_wrap_before_comma = false +csharp_special_else_if_treatment = true +csharp_insert_final_newline = false +csharp_place_type_attribute_on_same_line = never +csharp_place_method_attribute_on_same_line = never +csharp_place_accessorholder_attribute_on_same_line = never +csharp_place_attribute_on_same_line = never +csharp_place_accessor_attribute_on_same_line = never +csharp_place_attribute_on_same_line = never +csharp_place_field_attribute_on_same_line = never +csharp_place_attribute_on_same_line = never +csharp_wrap_parameters_style = wrap_if_long +csharp_keep_existing_declaration_parens_arrangement = false +csharp_wrap_before_declaration_lpar = false +csharp_wrap_after_declaration_lpar = false +csharp_wrap_before_declaration_rpar = false +csharp_place_constructor_initializer_on_same_line = true +csharp_keep_existing_expr_member_arrangement = false +csharp_place_expr_method_on_single_line = true +csharp_place_expr_property_on_single_line = true +csharp_place_expr_accessor_on_single_line = true +csharp_wrap_before_arrow_with_expressions = false +csharp_place_type_constraints_on_same_line = true +csharp_wrap_before_first_type_parameter_constraint = true +csharp_wrap_multiple_type_parameter_constraints_style = wrap_if_long +csharp_wrap_before_type_parameter_langle = true +csharp_wrap_before_extends_colon = false +csharp_wrap_extends_list_style = wrap_if_long +csharp_keep_existing_declaration_block_arrangement = false +csharp_place_abstract_accessorholder_on_single_line = true +csharp_place_simple_accessorholder_on_single_line = false +csharp_place_accessor_with_attrs_holder_on_single_line = false +csharp_place_simple_accessor_on_single_line = true +csharp_place_simple_method_on_single_line = false +csharp_keep_existing_enum_arrangement = false +csharp_place_simple_enum_on_single_line = false +csharp_wrap_enum_declaration = wrap_if_long +csharp_new_line_before_else = true +csharp_new_line_before_while = false +csharp_wrap_for_stmt_header_style = wrap_if_long +csharp_wrap_multiple_declaration_style = wrap_if_long +csharp_keep_existing_embedded_arrangement = false +csharp_place_simple_embedded_statement_on_same_line = false +csharp_place_simple_case_statement_on_same_line = true +csharp_keep_existing_embedded_block_arrangement = false +csharp_place_simple_embedded_block_on_same_line = false +csharp_place_simple_anonymousmethod_on_single_line = false +csharp_keep_existing_initializer_arrangement = false +csharp_place_simple_initializer_on_single_line = false +csharp_wrap_object_and_collection_initializer_style = chop_always +csharp_wrap_array_initializer_style = wrap_if_long +csharp_wrap_arguments_style = wrap_if_long +csharp_keep_existing_invocation_parens_arrangement = false +csharp_wrap_after_invocation_lpar = false +csharp_wrap_before_invocation_rpar = false +csharp_wrap_after_dot_in_method_calls = true +csharp_wrap_chained_method_calls = wrap_if_long +csharp_wrap_before_binary_opsign = false +csharp_wrap_chained_binary_expressions = wrap_if_long +csharp_force_chop_compound_if_expression = true +csharp_force_chop_compound_while_expression = true +csharp_force_chop_compound_do_expression = true +csharp_wrap_before_ternary_opsigns = true +csharp_wrap_ternary_expr_style = wrap_if_long +csharp_nested_ternary_style = expanded +csharp_wrap_linq_expressions = wrap_if_long +csharp_wrap_before_linq_expression = false +csharp_place_linq_into_on_new_line = false +csharp_wrap_verbatim_interpolated_strings = wrap_if_long +csharp_extra_spaces = remove_all +csharp_space_after_keywords_in_control_flow_statements = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_declaration_name_and_open_parenthesis = false +csharp_space_before_typeof_parentheses = false +csharp_space_before_checked_parentheses = false +csharp_space_before_sizeof_parentheses = false +csharp_space_before_nameof_parentheses = false +csharp_space_between_keyword_and_expression = true +csharp_space_between_keyword_and_type = true +csharp_space_around_assignment_op = true +csharp_space_around_logical_op = true +csharp_space_around_binary_operator = true +csharp_space_around_equality_op = true +csharp_space_around_relational_op = true +csharp_space_around_bitwise_op = true +csharp_space_around_additive_op = true +csharp_space_around_multiplicative_op = true +csharp_space_around_shift_op = true +csharp_space_around_nullcoalescing_op = true +csharp_space_around_arrow_op = false +csharp_space_after_logical_not_op = false +csharp_space_after_unary_operator = false +csharp_space_after_cast = false +csharp_space_around_dot = false +csharp_space_around_lambda_arrow = true +csharp_space_before_pointer_asterik_declaration = false +csharp_space_before_nullable_mark = false + +[*.cshtml] +linebreaks_around_razor_statements = true +blank_lines_around_razor_functions = true +blank_lines_around_razor_helpers = true +blank_lines_around_razor_sections = true + +# C++ +[*.{cc,cpp,cxx,h,hpp,hxx}] +cpp_indent_access_specifiers_from_class = true +cpp_indent_wrapped_function_names = false +cpp_align_multiline_type_argument = true + +# C, C++ and ObjectiveC +[*.{c,h,cc,cpp,cxx,m,hpp,hxx}] +indent_preprocessor_directives = normal +indent_type_constraints = true + +# Javascript and Typescript +[*.{js,js.map,ts}] +quote_style = doublequoted +termination_style = ensure_semicolon \ No newline at end of file diff --git a/Aaru.CommonTypes/.gitignore b/Aaru.CommonTypes/.gitignore new file mode 100644 index 0000000..05c540d --- /dev/null +++ b/Aaru.CommonTypes/.gitignore @@ -0,0 +1,595 @@ +### VisualStudio template +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ +### Linux template + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* +### Xcode template +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +build/ +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +### VisualStudioCode template +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +### C++ template +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o + +# Precompiled Headers +*.gch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app +### MonoDevelop template +#User Specific +*.usertasks + +#Mono Project Files +*.resources +test-results/ +### GPG template +secring.* + +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/modules.xml +# .idea/*.iml +# .idea/modules + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests +### CMake template +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +### C template +# Object files +*.ko +*.elf + +# Linker output +*.map +*.exp + +*.so.* + +# Executables +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf +### Windows template +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# NuGet Packages Directory +packages/ +## TODO: If the tool you use requires repositories.config uncomment the next line +#!packages/repositories.config + +# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets +# This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented) +!packages/build/ + + +# Others +sql/ +*.Cache + +# Visual Studio 2017 +.vs + +workspace.xml +cmake-build-debug +### macOS template +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +pkg/**/pkg +pkg/**/src +pkg/**/*.asc +pkg/**/*.sig +pkg/**/*.tar.xz +pkg/**/*.zip +pkg/**/aaru + +.sonarqube \ No newline at end of file diff --git a/Aaru.CommonTypes/Aaru.CommonTypes.csproj b/Aaru.CommonTypes/Aaru.CommonTypes.csproj new file mode 100644 index 0000000..46c6893 --- /dev/null +++ b/Aaru.CommonTypes/Aaru.CommonTypes.csproj @@ -0,0 +1,174 @@ + + + + Debug + AnyCPU + 2.0 + {F2B84194-26EB-4227-B1C5-6602517E85AE} + Library + Aaru.CommonTypes + Aaru.CommonTypes + $(Version) + false + true + 6.0.0-alpha6 + Claunia.com + Copyright © 2011-2021 Natalia Portillo + Aaru Data Preservation Suite + Aaru.CommonTypes + $(Version) + net6 + 10 + Contains common types defined by the Aaru Data Preservation Suite. + https://github.com/aaru-dps/ + MIT + https://github.com/aaru-dps/Aaru.CommonTypes + true + en-US + true + true + snupkg + Natalia Portillo <claunia@claunia.com> + true + + + $(Version)+{chash:8} + true + true + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + + + + Metadata/cicm.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LICENSE.MIT + + + + + + + + + + + + + + + + + + + + + + /Library/Frameworks/Mono.framework/Versions/Current/lib/mono + /usr/lib/mono + /usr/local/lib/mono + + $(BaseFrameworkPathOverrideForMono)/4.0-api + $(BaseFrameworkPathOverrideForMono)/4.5-api + $(BaseFrameworkPathOverrideForMono)/4.5.1-api + $(BaseFrameworkPathOverrideForMono)/4.5.2-api + $(BaseFrameworkPathOverrideForMono)/4.6-api + $(BaseFrameworkPathOverrideForMono)/4.6.1-api + $(BaseFrameworkPathOverrideForMono)/4.6.2-api + $(BaseFrameworkPathOverrideForMono)/4.7-api + $(BaseFrameworkPathOverrideForMono)/4.7.1-api + true + + $(FrameworkPathOverride)/Facades;$(AssemblySearchPaths) + + diff --git a/Aaru.CommonTypes/Aaru.CommonTypes.csproj.DotSettings b/Aaru.CommonTypes/Aaru.CommonTypes.csproj.DotSettings new file mode 100644 index 0000000..b76a6ba --- /dev/null +++ b/Aaru.CommonTypes/Aaru.CommonTypes.csproj.DotSettings @@ -0,0 +1,2 @@ + + True \ No newline at end of file diff --git a/Aaru.CommonTypes/Delegates.cs b/Aaru.CommonTypes/Delegates.cs new file mode 100644 index 0000000..bbe39a9 --- /dev/null +++ b/Aaru.CommonTypes/Delegates.cs @@ -0,0 +1,90 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Delegates.cs +// Author(s) : Natalia Portillo +// +// Component : Common types. +// +// --[ Description ] ---------------------------------------------------------- +// +// Delegates to communicate with user interface. +// +// --[ License ] -------------------------------------------------------------- +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +namespace Aaru.CommonTypes +{ + /// Initializes a progress indicator (e.g. makes a progress bar visible) + public delegate void InitProgressHandler(); + + /// Updates a progress indicator with text + public delegate void UpdateProgressHandler(string text, long current, long maximum); + + /// Pulses a progress indicator with indeterminate boundaries + public delegate void PulseProgressHandler(string text); + + /// Uninitializes a progress indicator (e.g. adds a newline to the console) + public delegate void EndProgressHandler(); + + /// Initializes a secondary progress indicator (e.g. makes a progress bar visible) + public delegate void InitProgressHandler2(); + + /// Updates a secondary progress indicator with text + public delegate void UpdateProgressHandler2(string text, long current, long maximum); + + /// Pulses a secondary progress indicator with indeterminate boundaries + public delegate void PulseProgressHandler2(string text); + + /// Uninitializes a secondary progress indicator (e.g. adds a newline to the console) + public delegate void EndProgressHandler2(); + + /// Initializes two progress indicators (e.g. makes a progress bar visible) + public delegate void InitTwoProgressHandler(); + + /// Updates two progress indicators with text + public delegate void UpdateTwoProgressHandler(string text, long current, long maximum, string text2, long current2, + long maximum2); + + /// Pulses a progress indicator with indeterminate boundaries + public delegate void PulseTwoProgressHandler(string text, string text2); + + /// Uninitializes a progress indicator (e.g. adds a newline to the console) + public delegate void EndTwoProgressHandler(); + + /// Updates a status indicator + public delegate void UpdateStatusHandler(string text); + + /// Shows an error message + public delegate void ErrorMessageHandler(string text); + + /// Initializes a block map that's going to be filled with a media scan + public delegate void InitBlockMapHandler(ulong blocks, ulong blockSize, ulong blocksToRead, ushort currentProfile); + + /// Updates lists of time taken on scanning from the specified sector + /// Time in milliseconds + public delegate void ScanTimeHandler(ulong sector, double duration); + + /// Specified a number of blocks could not be read on scan + public delegate void ScanUnreadableHandler(ulong sector); + + /// Sends the speed of scanning a specific sector + public delegate void ScanSpeedHandler(ulong sector, double currentSpeed); +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Enums/DeviceType.cs b/Aaru.CommonTypes/Enums/DeviceType.cs new file mode 100644 index 0000000..a724755 --- /dev/null +++ b/Aaru.CommonTypes/Enums/DeviceType.cs @@ -0,0 +1,59 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : DeviceType.cs +// Author(s) : Natalia Portillo +// +// Component : Disc image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines enumerations of device types. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +namespace Aaru.CommonTypes.Enums +{ + /// Device types + public enum DeviceType + { + /// Unknown device type + Unknown = -1, + /// ATA device + ATA = 1, + /// ATA Packet device (aka SCSI over ATA) + ATAPI = 2, + /// SCSI device (or USB-MSC, SBP2, FC, UAS, etc) + SCSI = 3, + /// SecureDigital memory card + SecureDigital = 4, + /// MultiMediaCard memory card + MMC = 5, + /// NVMe device + NVMe = 6 + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Enums/ErrorNumber.cs b/Aaru.CommonTypes/Enums/ErrorNumber.cs new file mode 100644 index 0000000..12e9ef7 --- /dev/null +++ b/Aaru.CommonTypes/Enums/ErrorNumber.cs @@ -0,0 +1,176 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : ErrorNumber.cs +// Author(s) : Natalia Portillo +// +// Component : Common types. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines enumerations of error numbers. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +namespace Aaru.CommonTypes.Enums +{ + /// Enumerates error codes. Negative for UNIX error number equivalents, positive for Aaru error numbers. + public enum ErrorNumber + { + NotPermitted = -1, + /// No such file or directory + NoSuchFile = -2, NoSuchProcess = -3, InterruptedSyscall = -4, + /// I/O error + InOutError = -5, NoSuchDeviceOrAddress = -6, ArgumentListTooLong = -7, ExecutableFormatError = -8, + BadFileNumber = -9, NoChildProcess = -10, TryAgain = -11, + OutOfMemory = -12, + /// Access denied + AccessDenied = -13, BadAddress = -14, NotABlockDevice = -15, + /// Busy, cannot complete + Busy = -16, FileExists = -17, CrossDeviceLink = -18, + /// No such device + NoSuchDevice = -19, + /// Is not a directory (e.g.: trying to ReadDir() a file) + NotDirectory = -20, + /// Is a directory (e.g.: trying to Read() a dir) + IsDirectory = -21, + /// Invalid argument + InvalidArgument = -22, FileTableOverflow = -23, TooManyOpenFiles = -24, NotTypewriter = -25, + TextFileBusy = -26, + /// File is too large + FileTooLarge = -27, NoSpaceLeft = -28, IllegalSeek = -29, ReadOnly = -30, + TooManyLinks = -31, BrokenPipe = -32, OutOfDomain = -33, + OutOfRange = -34, DeadlockWouldOccur = -35, + /// Name is too long + NameTooLong = -36, NoLocksAvailable = -37, + /// Not implemented + NotImplemented = -38, + /// There is no data available + NoData = -61, + /// Link is severed + SeveredLink = -67, + /// There is no such attribute + NoSuchExtendedAttribute = NoData, + /// Not supported + NotSupported = -252, EPERM = NotPermitted, + /// No such file or directory + ENOENT = NoSuchFile, ESRCH = NoSuchProcess, EINTR = InterruptedSyscall, + /// I/O error + EIO = InOutError, ENXIO = NoSuchDeviceOrAddress, E2BIG = ArgumentListTooLong, ENOEXEC = ExecutableFormatError, + EBADF = BadFileNumber, ECHILD = NoChildProcess, EAGAIN = TryAgain, + ENOMEM = OutOfMemory, + /// Access denied + EACCES = AccessDenied, EFAULT = BadAddress, ENOTBLK = NotABlockDevice, + /// Busy, cannot complete + EBUSY = Busy, EEXIST = FileExists, EXDEV = CrossDeviceLink, + /// No such device + ENODEV = NoSuchDevice, + /// Is not a directory (e.g.: trying to ReadDir() a file) + ENOTDIR = NotDirectory, + /// Is a directory (e.g.: trying to Read() a dir) + EISDIR = IsDirectory, + /// Invalid argument + EINVAL = InvalidArgument, ENFILE = FileTableOverflow, EMFILE = TooManyOpenFiles, ENOTTY = NotTypewriter, + ETXTBSY = TextFileBusy, + /// File is too large + EFBIG = FileTooLarge, ENOSPC = NoSpaceLeft, ESPIPE = IllegalSeek, EROFS = ReadOnly, + EMLINK = TooManyLinks, EPIPE = BrokenPipe, EDOM = OutOfDomain, + ERANGE = OutOfRange, EDEADLK = DeadlockWouldOccur, + /// Name is too long + ENAMETOOLONG = NameTooLong, ENOLCK = NoLocksAvailable, + /// Not implemented + ENOSYS = NotImplemented, + /// Link is severed + ENOLINK = SeveredLink, + /// Not supported + ENOTSUP = NotSupported, DirectoryNotEmpty = -39, TooManySymbolicLinks = -40, ENOTEMPTY = DirectoryNotEmpty, + ELOOP = TooManySymbolicLinks, + /// There is no such attribute + ENOATTR = NoSuchExtendedAttribute, + /// There is no data available + ENODATA = NoData, + /// No error + NoError = 0, + /// User requested help to be shown + HelpRequested = 1, + /// Command found nothing + NothingFound = 2, + /// Media has been already dumped completely + AlreadyDumped = 3, + /// Image and its sectors cannot be verified + NotVerifiable = 4, + /// There are bad sectors and image cannot be verified + BadSectorsImageNotVerified = 5, + /// All sectors are good and image cannot be verified + CorrectSectorsImageNotVerified = 6, + /// Image is bad and sectors cannot be verified + BadImageSectorsNotVerified = 7, + /// Image is bad and there are bad sectors + BadImageBadSectors = 8, + /// All sectors are good and image is bad + CorrectSectorsBadImage = 9, + /// Image is good and sectors cannot be verified + CorrectImageSectorsNotVerified = 10, + /// Image is good and there are bad sectors + CorrectImageBadSectors = 11, + /// Exception has been raised + UnexpectedException = 12, + /// The number of arguments is not as expected + UnexpectedArgumentCount = 13, + /// A required argument is not present + MissingArgument = 14, + /// The specified file cannot be opened + CannotOpenFile = 15, + /// The specified encoding cannot be found + EncodingUnknown = 16, + /// The image format has not been recognized + UnrecognizedFormat = 17, + /// The image format failed to open + CannotOpenFormat = 18, + /// The specified metadata sidecar does not have the correct format + InvalidSidecar = 19, + /// The specified resume map does not have the correct format + InvalidResume = 20, + /// The specified image format cannot be found + FormatNotFound = 21, + /// More than one format found for the specified search criteria + TooManyFormats = 22, + /// The specified format does not support the specified media + UnsupportedMedia = 23, + /// Data will be lost writing the specified format + DataWillBeLost = 24, + /// Cannot create destination format + CannotCreateFormat = 25, + /// Error writing data + WriteError = 26, + /// Cannot open device + CannotOpenDevice = 27, + /// Cannot remove the existing database + CannotRemoveDatabase = 28, + SectorNotFound=29 + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Enums/Images.cs b/Aaru.CommonTypes/Enums/Images.cs new file mode 100644 index 0000000..ae1dea3 --- /dev/null +++ b/Aaru.CommonTypes/Enums/Images.cs @@ -0,0 +1,393 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Images.cs +// Author(s) : Natalia Portillo +// +// Component : Disc image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines enumerations to be used by disc image plugins. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// Copyright © 2020-2021 Rebecca Wallander +// ****************************************************************************/ + +using System; +using System.Diagnostics.CodeAnalysis; + +// ReSharper disable UnusedMember.Global + +namespace Aaru.CommonTypes.Enums +{ + /// Track (as partitioning element) types. + public enum TrackType : byte + { + /// Audio track + Audio = 0, + /// Data track (not any of the below defined ones) + Data = 1, + /// Data track, compact disc mode 1 + CdMode1 = 2, + /// Data track, compact disc mode 2, formless + CdMode2Formless = 3, + /// Data track, compact disc mode 2, form 1 + CdMode2Form1 = 4, + /// Data track, compact disc mode 2, form 2 + CdMode2Form2 = 5 + } + + /// Type of subchannel in track + public enum TrackSubchannelType : byte + { + /// Track does not has subchannel dumped, or it's not a CD + None = 0, + /// Subchannel is packed and error corrected + Packed = 1, + /// Subchannel is interleaved + Raw = 2, + /// Subchannel is packed and comes interleaved with main channel in same file + PackedInterleaved = 3, + /// Subchannel is interleaved and comes interleaved with main channel in same file + RawInterleaved = 4, + /// Only Q subchannel is stored as 16 bytes + Q16 = 5, + /// Only Q subchannel is stored as 16 bytes and comes interleaved with main channel in same file + Q16Interleaved = 6 + } + + /// Metadata present for each sector (aka, "tag"). + public enum SectorTagType + { + /// Apple's GCR sector tags, 12 bytes + AppleSectorTag = 0, + /// Sync frame from CD sector, 12 bytes + CdSectorSync = 1, + /// CD sector header, 4 bytes + CdSectorHeader = 2, + /// CD mode 2 sector subheader + CdSectorSubHeader = 3, + /// CD sector EDC, 4 bytes + CdSectorEdc = 4, + /// CD sector ECC P, 172 bytes + CdSectorEccP = 5, + /// CD sector ECC Q, 104 bytes + CdSectorEccQ = 6, + /// CD sector ECC (P and Q), 276 bytes + CdSectorEcc = 7, + /// CD sector subchannel, 96 bytes + CdSectorSubchannel = 8, + /// CD track ISRC, string, 12 bytes + CdTrackIsrc = 9, + /// CD track text, string, 13 bytes + CdTrackText = 10, + /// CD track flags, 1 byte + CdTrackFlags = 11, + /// DVD sector copyright information + DvdCmi = 12, + /// Floppy address mark (contents depend on underlying floppy format) + FloppyAddressMark = 13, + /// DVD sector title key, 5 bytes + DvdTitleKey = 14, + /// Decrypted DVD sector title key, 5 bytes + DvdTitleKeyDecrypted = 15 + } + + /// Metadata present for each media. + [SuppressMessage("ReSharper", "InconsistentNaming")] + public enum MediaTagType + { + /// CD table of contents + CD_TOC = 0, + /// CD session information + CD_SessionInfo = 1, + /// CD full table of contents + CD_FullTOC = 2, + /// CD PMA + CD_PMA = 3, + /// CD Address-Time-In-Pregroove + CD_ATIP = 4, + /// CD-Text + CD_TEXT = 5, + /// CD Media Catalogue Number + CD_MCN = 6, + /// DVD/HD DVD Physical Format Information + DVD_PFI = 7, + /// DVD Lead-in Copyright Management Information + DVD_CMI = 8, + /// DVD disc key + DVD_DiscKey = 9, + /// DVD/HD DVD Burst Cutting Area + DVD_BCA = 10, + /// DVD/HD DVD Lead-in Disc Manufacturer Information + DVD_DMI = 11, + /// Media identifier + DVD_MediaIdentifier = 12, + /// Media key block + DVD_MKB = 13, + /// DVD-RAM/HD DVD-RAM DDS information + DVDRAM_DDS = 14, + /// DVD-RAM/HD DVD-RAM Medium status + DVDRAM_MediumStatus = 15, + /// DVD-RAM/HD DVD-RAM Spare area information + DVDRAM_SpareArea = 16, + /// DVD-R/-RW/HD DVD-R RMD in last border-out + DVDR_RMD = 17, + /// Pre-recorded information from DVD-R/-RW lead-in + DVDR_PreRecordedInfo = 18, + /// DVD-R/-RW/HD DVD-R media identifier + DVDR_MediaIdentifier = 19, + /// DVD-R/-RW/HD DVD-R physical format information + DVDR_PFI = 20, + /// ADIP information + DVD_ADIP = 21, + /// HD DVD Lead-in copyright protection information + HDDVD_CPI = 22, + /// HD DVD-R Medium Status + HDDVD_MediumStatus = 23, + /// DVD+/-R DL Layer capacity + DVDDL_LayerCapacity = 24, + /// DVD-R DL Middle Zone start address + DVDDL_MiddleZoneAddress = 25, + /// DVD-R DL Jump Interval Size + DVDDL_JumpIntervalSize = 26, + /// DVD-R DL Start LBA of the manual layer jump + DVDDL_ManualLayerJumpLBA = 27, + /// Blu-ray Disc Information + BD_DI = 28, + /// Blu-ray Burst Cutting Area + BD_BCA = 29, + /// Blu-ray Disc Definition Structure + BD_DDS = 30, + /// Blu-ray Cartridge Status + BD_CartridgeStatus = 31, + /// Blu-ray Status of Spare Area + BD_SpareArea = 32, + /// AACS volume identifier + AACS_VolumeIdentifier = 33, + /// AACS pre-recorded media serial number + AACS_SerialNumber = 34, + /// AACS media identifier + AACS_MediaIdentifier = 35, + /// Lead-in AACS media key block + AACS_MKB = 36, + /// AACS data keys + AACS_DataKeys = 37, + /// LBA extents flagged for bus encryption by AACS + AACS_LBAExtents = 38, + /// CPRM media key block in Lead-in + AACS_CPRM_MKB = 39, + /// Recognized layer formats in hybrid discs + Hybrid_RecognizedLayers = 40, + /// Disc write protection status + MMC_WriteProtection = 41, + /// Disc standard information + MMC_DiscInformation = 42, + /// Disc track resources information + MMC_TrackResourcesInformation = 43, + /// BD-R Pseudo-overwrite information + MMC_POWResourcesInformation = 44, + /// SCSI INQUIRY response + SCSI_INQUIRY = 45, + /// SCSI MODE PAGE 2Ah + SCSI_MODEPAGE_2A = 46, + /// ATA IDENTIFY DEVICE response + ATA_IDENTIFY = 47, + /// ATA IDENTIFY PACKET DEVICE response + ATAPI_IDENTIFY = 48, + /// PCMCIA/CardBus Card Information Structure + PCMCIA_CIS = 49, + /// SecureDigital CID + SD_CID = 50, + /// SecureDigital CSD + SD_CSD = 51, + /// SecureDigital SCR + SD_SCR = 52, + /// SecureDigital OCR + SD_OCR = 53, + /// MultiMediaCard CID + MMC_CID = 54, + /// MultiMediaCard CSD + MMC_CSD = 55, + /// MultiMediaCard OCR + MMC_OCR = 56, + /// MultiMediaCard Extended CSD + MMC_ExtendedCSD = 57, + /// Xbox Security Sector + Xbox_SecuritySector = 58, + /// + /// On floppy disks, data in last cylinder usually in a different format that contains duplication or + /// manufacturing information + /// + Floppy_LeadOut = 59, + /// DVD Disc Control Blocks + DCB = 60, + /// Compact Disc First Track Pregap + CD_FirstTrackPregap = 61, + /// Compact Disc Lead-out + CD_LeadOut = 62, + /// SCSI MODE SENSE (6) + SCSI_MODESENSE_6 = 63, + /// SCSI MODE SENSE (10) + SCSI_MODESENSE_10 = 64, + /// USB descriptors + USB_Descriptors = 65, + /// XGD unlocked DMI + Xbox_DMI = 66, + /// XDG unlocked PFI + Xbox_PFI = 67, + /// Compact Disc Lead-in + CD_LeadIn = 68, + /// 8 bytes response that seems to define type of MiniDisc + MiniDiscType = 69, + /// 4 bytes response to vendor command D5h + MiniDiscD5 = 70, + /// User TOC, contains fragments, track names, and can be from 1 to 3 sectors of 2336 bytes + MiniDiscUTOC = 71, + /// Not entirely clear kind of TOC that only appears on MD-DATA discs + MiniDiscDTOC = 72, + /// Decrypted DVD disc key + DVD_DiscKey_Decrypted = 73 + } + + /// Enumeration of media types defined in CICM metadata + public enum XmlMediaType : byte + { + /// Purely optical discs + OpticalDisc = 0, + /// Media that is physically block-based or abstracted like that + BlockMedia = 1, + /// Media that can be accessed by-byte or by-bit, like chips + LinearMedia = 2, + /// Media that can only store data when it is modulated to audio + AudioMedia = 3 + } + + /// CD flags bitmask + [Flags] + public enum CdFlags : byte + { + /// Track is quadraphonic. + FourChannel = 0x08, + /// Track is non-audio (data). + DataTrack = 0x04, + /// Track is copy protected. + CopyPermitted = 0x02, + /// Track has pre-emphasis. + PreEmphasis = 0x01 + } + + /// Status of a requested floppy sector + [Flags] + public enum FloppySectorStatus : byte + { + /// Both address mark and data checksums are correct. + Correct = 0x01, + /// Data checksum is incorrect. + DataError = 0x02, + /// Address mark checksum is incorrect. + AddressMarkError = 0x04, + /// There is another sector in the same track/head with same sector id. + Duplicated = 0x08, + /// Sector data section is not magnetized. + Demagnetized = 0x10, + /// Sector data section has a physically visible hole. + Hole = 0x20, + /// There is no address mark containing the requested sector id in the track/head. + NotFound = 0x40 + } + + /// Types of floppy disks + public enum FloppyTypes : byte + { + /// 8" floppy + Floppy, + /// 5.25" floppy + MiniFloppy, + /// 3.5" floppy + MicroFloppy, + /// 3" floppy + CompactFloppy, + /// 5.25" twiggy + FileWare, + /// 2.5" quickdisk + QuickDisk + } + + /// Enumeration of floppy densities + public enum FloppyDensities : byte + { + /// Standard coercivity (about 300Oe as found in 8" and 5.25"-double-density disks). + Standard, + /// Double density coercivity (about 600Oe as found in 5.25" HD and 3.5" DD disks). + Double, + /// High density coercivity (about 700Oe as found in 3.5" HD disks). + High, + /// Extended density coercivity (about 750Oe as found in 3.5" ED disks). + Extended + } + + /// Capabilities for optical media image formats + [Flags] + public enum OpticalImageCapabilities : ulong + { + /// Can store Red Book audio tracks? + CanStoreAudioTracks = 0x01, + /// Can store CD-V analogue video tracks? + CanStoreVideoTracks = 0x02, + /// Can store Yellow Book data tracks? + CanStoreDataTracks = 0x03, + /// Can store pregaps without needing to interpret the subchannel? + CanStorePregaps = 0x04, + /// Can store indexes without needing to interpret the subchannel? + CanStoreIndexes = 0x08, + /// Can store raw P to W subchannel data? + CanStoreSubchannelRw = 0x10, + /// Can store more than one session? + CanStoreSessions = 0x20, + /// Can store track ISRCs without needing to interpret the subchannel? + CanStoreIsrc = 0x40, + /// Can store Lead-In's CD-TEXT? + CanStoreCdText = 0x80, + /// Can store the MCN without needing to interpret the subchannel? + CanStoreMcn = 0x100, + /// Can store the whole 2352 bytes of a sector? + CanStoreRawData = 0x200, + /// Can store more than 1 session in media that is not CD based (DVD et al)? + CanStoreNotCdSessions = 0x2000, + /// Can store more than 1 track in media that is not CD based (DVD et al)? + CanStoreNotCdTracks = 0x4000, + + // TODO: Implement + /// Can store scrambled data? + CanStoreScrambledData = 0x400, + /// Can store only the user area of a sector (2048, 2324, etc)? + CanStoreCookedData = 0x800, + /// Can store more than 1 track? + CanStoreMultipleTracks = 0x1000 + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Extents/ExtentsByte.cs b/Aaru.CommonTypes/Extents/ExtentsByte.cs new file mode 100644 index 0000000..c637b61 --- /dev/null +++ b/Aaru.CommonTypes/Extents/ExtentsByte.cs @@ -0,0 +1,254 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : ExtentsByte.cs +// Author(s) : Natalia Portillo +// +// Component : Extent helpers. +// +// --[ Description ] ---------------------------------------------------------- +// +// Provides extents for byte types. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Aaru.CommonTypes.Extents +{ + /// Implements extents for + public class ExtentsByte + { + List> _backend; + + /// Initialize an empty list of extents + public ExtentsByte() => _backend = new List>(); + + /// Initializes extents with an specific list + /// List of extents as tuples "start, end" + public ExtentsByte(IEnumerable> list) + { + _backend = new List>(); + + // This ensure no overlapping extents are added on creation + foreach(Tuple t in list) + Add(t.Item1, t.Item2); + } + + /// Gets a count of how many extents are stored + public int Count => _backend.Count; + + /// Adds the specified number to the corresponding extent, or creates a new one + /// + public void Add(byte item) + { + Tuple removeOne = null; + Tuple removeTwo = null; + Tuple itemToAdd = null; + + for(int i = 0; i < _backend.Count; i++) + { + // Already contained in an extent + if(item >= _backend[i].Item1 && + item <= _backend[i].Item2) + return; + + // Expands existing extent start + if(item == _backend[i].Item1 - 1) + { + removeOne = _backend[i]; + + if(i > 0 && + item == _backend[i - 1].Item2 + 1) + { + removeTwo = _backend[i - 1]; + itemToAdd = new Tuple(_backend[i - 1].Item1, _backend[i].Item2); + } + else + itemToAdd = new Tuple(item, _backend[i].Item2); + + break; + } + + // Expands existing extent end + if(item != _backend[i].Item2 + 1) + continue; + + removeOne = _backend[i]; + + if(i < _backend.Count - 1 && + item == _backend[i + 1].Item1 - 1) + { + removeTwo = _backend[i + 1]; + itemToAdd = new Tuple(_backend[i].Item1, _backend[i + 1].Item2); + } + else + itemToAdd = new Tuple(_backend[i].Item1, item); + + break; + } + + if(itemToAdd != null) + { + _backend.Remove(removeOne); + _backend.Remove(removeTwo); + _backend.Add(itemToAdd); + } + else + _backend.Add(new Tuple(item, item)); + + // Sort + _backend = _backend.OrderBy(t => t.Item1).ToList(); + } + + /// Adds a new extent + /// First element of the extent + /// + /// Last element of the extent or if is true how many elements the extent runs + /// for + /// + /// If set to true, indicates how many elements the extent runs for + public void Add(byte start, byte end, bool run = false) + { + byte realEnd; + + if(run) + realEnd = (byte)(start + end - 1); + else + realEnd = end; + + // TODO: Optimize this + for(byte t = start; t <= realEnd; t++) + Add(t); + } + + /// Checks if the specified item is contained by an extent on this instance + /// Item to search for + /// true if any of the extents on this instance contains the item + public bool Contains(byte item) => _backend.Any(extent => item >= extent.Item1 && item <= extent.Item2); + + /// Removes all extents from this instance + public void Clear() => _backend.Clear(); + + /// Removes an item from the extents in this instance + /// Item to remove + /// true if the item was contained in a known extent and removed, false otherwise + public bool Remove(byte item) + { + Tuple toRemove = null; + Tuple toAddOne = null; + Tuple toAddTwo = null; + + foreach(Tuple extent in _backend) + { + // Extent is contained and not a border + if(item > extent.Item1 && + item < extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(extent.Item1, (byte)(item - 1)); + toAddTwo = new Tuple((byte)(item + 1), extent.Item2); + + break; + } + + // Extent is left border, but not only element + if(item == extent.Item1 && + item != extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple((byte)(item + 1), extent.Item2); + + break; + } + + // Extent is right border, but not only element + if(item != extent.Item1 && + item == extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(extent.Item1, (byte)(item - 1)); + + break; + } + + // Extent is only element + if(item != extent.Item1 || + item != extent.Item2) + continue; + + toRemove = extent; + + break; + } + + // Item not found + if(toRemove == null) + return false; + + _backend.Remove(toRemove); + + if(toAddOne != null) + _backend.Add(toAddOne); + + if(toAddTwo != null) + _backend.Add(toAddTwo); + + // Sort + _backend = _backend.OrderBy(t => t.Item1).ToList(); + + return true; + } + + /// + /// Converts the list of extents to an array of where T1 is first element of the extent and + /// T2 is last element + /// + /// Array of + public Tuple[] ToArray() => _backend.ToArray(); + + /// Gets the first element of the extent that contains the specified item + /// Item + /// First element of extent + /// true if item was found in an extent, false otherwise + public bool GetStart(byte item, out byte start) + { + start = 0; + + foreach(Tuple extent in _backend.Where(extent => item >= extent.Item1 && item <= extent.Item2)) + { + start = extent.Item1; + + return true; + } + + return false; + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Extents/ExtentsConverter.cs b/Aaru.CommonTypes/Extents/ExtentsConverter.cs new file mode 100644 index 0000000..d8b879b --- /dev/null +++ b/Aaru.CommonTypes/Extents/ExtentsConverter.cs @@ -0,0 +1,84 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : ExtentsConverter.cs +// Author(s) : Natalia Portillo +// +// Component : XML metadata. +// +// --[ Description ] ---------------------------------------------------------- +// +// Converts extents to/from XML. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Linq; +using Schemas; + +namespace Aaru.CommonTypes.Extents +{ + /// Converts extents + public static class ExtentsConverter + { + /// Converts unsigned long integer extents into XML based extents + /// Extents + /// XML based extents + public static ExtentType[] ToMetadata(ExtentsULong extents) + { + if(extents == null) + return null; + + Tuple[] tuples = extents.ToArray(); + ExtentType[] array = new ExtentType[tuples.Length]; + + for(ulong i = 0; i < (ulong)array.LongLength; i++) + array[i] = new ExtentType + { + Start = tuples[i].Item1, + End = tuples[i].Item2 + }; + + return array; + } + + /// Converts XML based extents into unsigned long integer extents + /// XML based extents + /// Extents + public static ExtentsULong FromMetadata(ExtentType[] extents) + { + if(extents == null) + return null; + + List> tuples = + extents.Select(extent => new Tuple(extent.Start, extent.End)).ToList(); + + return new ExtentsULong(tuples); + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Extents/ExtentsInt.cs b/Aaru.CommonTypes/Extents/ExtentsInt.cs new file mode 100644 index 0000000..e2dd4b2 --- /dev/null +++ b/Aaru.CommonTypes/Extents/ExtentsInt.cs @@ -0,0 +1,254 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : ExtentsInt.cs +// Author(s) : Natalia Portillo +// +// Component : Extent helpers. +// +// --[ Description ] ---------------------------------------------------------- +// +// Provides extents for int types. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Aaru.CommonTypes.Extents +{ + /// Implements extents for + public class ExtentsInt + { + List> _backend; + + /// Initialize an empty list of extents + public ExtentsInt() => _backend = new List>(); + + /// Initializes extents with an specific list + /// List of extents as tuples "start, end" + public ExtentsInt(IEnumerable> list) + { + _backend = new List>(); + + // This ensure no overlapping extents are added on creation + foreach(Tuple t in list) + Add(t.Item1, t.Item2); + } + + /// Gets a count of how many extents are stored + public int Count => _backend.Count; + + /// Adds the specified number to the corresponding extent, or creates a new one + /// + public void Add(int item) + { + Tuple removeOne = null; + Tuple removeTwo = null; + Tuple itemToAdd = null; + + for(int i = 0; i < _backend.Count; i++) + { + // Already contained in an extent + if(item >= _backend[i].Item1 && + item <= _backend[i].Item2) + return; + + // Expands existing extent start + if(item == _backend[i].Item1 - 1) + { + removeOne = _backend[i]; + + if(i > 0 && + item == _backend[i - 1].Item2 + 1) + { + removeTwo = _backend[i - 1]; + itemToAdd = new Tuple(_backend[i - 1].Item1, _backend[i].Item2); + } + else + itemToAdd = new Tuple(item, _backend[i].Item2); + + break; + } + + // Expands existing extent end + if(item != _backend[i].Item2 + 1) + continue; + + removeOne = _backend[i]; + + if(i < _backend.Count - 1 && + item == _backend[i + 1].Item1 - 1) + { + removeTwo = _backend[i + 1]; + itemToAdd = new Tuple(_backend[i].Item1, _backend[i + 1].Item2); + } + else + itemToAdd = new Tuple(_backend[i].Item1, item); + + break; + } + + if(itemToAdd != null) + { + _backend.Remove(removeOne); + _backend.Remove(removeTwo); + _backend.Add(itemToAdd); + } + else + _backend.Add(new Tuple(item, item)); + + // Sort + _backend = _backend.OrderBy(t => t.Item1).ToList(); + } + + /// Adds a new extent + /// First element of the extent + /// + /// Last element of the extent or if is true how many elements the extent runs + /// for + /// + /// If set to true, indicates how many elements the extent runs for + public void Add(int start, int end, bool run = false) + { + int realEnd; + + if(run) + realEnd = start + end - 1; + else + realEnd = end; + + // TODO: Optimize this + for(int t = start; t <= realEnd; t++) + Add(t); + } + + /// Checks if the specified item is contained by an extent on this instance + /// Item to search for + /// true if any of the extents on this instance contains the item + public bool Contains(int item) => _backend.Any(extent => item >= extent.Item1 && item <= extent.Item2); + + /// Removes all extents from this instance + public void Clear() => _backend.Clear(); + + /// Removes an item from the extents in this instance + /// Item to remove + /// true if the item was contained in a known extent and removed, false otherwise + public bool Remove(int item) + { + Tuple toRemove = null; + Tuple toAddOne = null; + Tuple toAddTwo = null; + + foreach(Tuple extent in _backend) + { + // Extent is contained and not a border + if(item > extent.Item1 && + item < extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(extent.Item1, item - 1); + toAddTwo = new Tuple(item + 1, extent.Item2); + + break; + } + + // Extent is left border, but not only element + if(item == extent.Item1 && + item != extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(item + 1, extent.Item2); + + break; + } + + // Extent is right border, but not only element + if(item != extent.Item1 && + item == extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(extent.Item1, item - 1); + + break; + } + + // Extent is only element + if(item != extent.Item1 || + item != extent.Item2) + continue; + + toRemove = extent; + + break; + } + + // Item not found + if(toRemove == null) + return false; + + _backend.Remove(toRemove); + + if(toAddOne != null) + _backend.Add(toAddOne); + + if(toAddTwo != null) + _backend.Add(toAddTwo); + + // Sort + _backend = _backend.OrderBy(t => t.Item1).ToList(); + + return true; + } + + /// + /// Converts the list of extents to an array of where T1 is first element of the extent and + /// T2 is last element + /// + /// Array of + public Tuple[] ToArray() => _backend.ToArray(); + + /// Gets the first element of the extent that contains the specified item + /// Item + /// First element of extent + /// true if item was found in an extent, false otherwise + public bool GetStart(int item, out int start) + { + start = 0; + + foreach(Tuple extent in _backend.Where(extent => item >= extent.Item1 && item <= extent.Item2)) + { + start = extent.Item1; + + return true; + } + + return false; + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Extents/ExtentsLong.cs b/Aaru.CommonTypes/Extents/ExtentsLong.cs new file mode 100644 index 0000000..5ef9d4f --- /dev/null +++ b/Aaru.CommonTypes/Extents/ExtentsLong.cs @@ -0,0 +1,254 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : ExtentsLong.cs +// Author(s) : Natalia Portillo +// +// Component : Extent helpers. +// +// --[ Description ] ---------------------------------------------------------- +// +// Provides extents for long types. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Aaru.CommonTypes.Extents +{ + /// Implements extents for + public class ExtentsLong + { + List> _backend; + + /// Initialize an empty list of extents + public ExtentsLong() => _backend = new List>(); + + /// Initializes extents with an specific list + /// List of extents as tuples "start, end" + public ExtentsLong(IEnumerable> list) + { + _backend = new List>(); + + // This ensure no overlapping extents are added on creation + foreach(Tuple t in list) + Add(t.Item1, t.Item2); + } + + /// Gets a count of how many extents are stored + public int Count => _backend.Count; + + /// Adds the specified number to the corresponding extent, or creates a new one + /// + public void Add(long item) + { + Tuple removeOne = null; + Tuple removeTwo = null; + Tuple itemToAdd = null; + + for(int i = 0; i < _backend.Count; i++) + { + // Already contained in an extent + if(item >= _backend[i].Item1 && + item <= _backend[i].Item2) + return; + + // Expands existing extent start + if(item == _backend[i].Item1 - 1) + { + removeOne = _backend[i]; + + if(i > 0 && + item == _backend[i - 1].Item2 + 1) + { + removeTwo = _backend[i - 1]; + itemToAdd = new Tuple(_backend[i - 1].Item1, _backend[i].Item2); + } + else + itemToAdd = new Tuple(item, _backend[i].Item2); + + break; + } + + // Expands existing extent end + if(item != _backend[i].Item2 + 1) + continue; + + removeOne = _backend[i]; + + if(i < _backend.Count - 1 && + item == _backend[i + 1].Item1 - 1) + { + removeTwo = _backend[i + 1]; + itemToAdd = new Tuple(_backend[i].Item1, _backend[i + 1].Item2); + } + else + itemToAdd = new Tuple(_backend[i].Item1, item); + + break; + } + + if(itemToAdd != null) + { + _backend.Remove(removeOne); + _backend.Remove(removeTwo); + _backend.Add(itemToAdd); + } + else + _backend.Add(new Tuple(item, item)); + + // Sort + _backend = _backend.OrderBy(t => t.Item1).ToList(); + } + + /// Adds a new extent + /// First element of the extent + /// + /// Last element of the extent or if is true how many elements the extent runs + /// for + /// + /// If set to true, indicates how many elements the extent runs for + public void Add(long start, long end, bool run = false) + { + long realEnd; + + if(run) + realEnd = start + end - 1; + else + realEnd = end; + + // TODO: Optimize this + for(long t = start; t <= realEnd; t++) + Add(t); + } + + /// Checks if the specified item is contained by an extent on this instance + /// Item to search for + /// true if any of the extents on this instance contains the item + public bool Contains(long item) => _backend.Any(extent => item >= extent.Item1 && item <= extent.Item2); + + /// Removes all extents from this instance + public void Clear() => _backend.Clear(); + + /// Removes an item from the extents in this instance + /// Item to remove + /// true if the item was contained in a known extent and removed, false otherwise + public bool Remove(long item) + { + Tuple toRemove = null; + Tuple toAddOne = null; + Tuple toAddTwo = null; + + foreach(Tuple extent in _backend) + { + // Extent is contained and not a border + if(item > extent.Item1 && + item < extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(extent.Item1, item - 1); + toAddTwo = new Tuple(item + 1, extent.Item2); + + break; + } + + // Extent is left border, but not only element + if(item == extent.Item1 && + item != extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(item + 1, extent.Item2); + + break; + } + + // Extent is right border, but not only element + if(item != extent.Item1 && + item == extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(extent.Item1, item - 1); + + break; + } + + // Extent is only element + if(item != extent.Item1 || + item != extent.Item2) + continue; + + toRemove = extent; + + break; + } + + // Item not found + if(toRemove == null) + return false; + + _backend.Remove(toRemove); + + if(toAddOne != null) + _backend.Add(toAddOne); + + if(toAddTwo != null) + _backend.Add(toAddTwo); + + // Sort + _backend = _backend.OrderBy(t => t.Item1).ToList(); + + return true; + } + + /// + /// Converts the list of extents to an array of where T1 is first element of the extent and + /// T2 is last element + /// + /// Array of + public Tuple[] ToArray() => _backend.ToArray(); + + /// Gets the first element of the extent that contains the specified item + /// Item + /// First element of extent + /// true if item was found in an extent, false otherwise + public bool GetStart(long item, out long start) + { + start = 0; + + foreach(Tuple extent in _backend.Where(extent => item >= extent.Item1 && item <= extent.Item2)) + { + start = extent.Item1; + + return true; + } + + return false; + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Extents/ExtentsSByte.cs b/Aaru.CommonTypes/Extents/ExtentsSByte.cs new file mode 100644 index 0000000..8ed44c5 --- /dev/null +++ b/Aaru.CommonTypes/Extents/ExtentsSByte.cs @@ -0,0 +1,255 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : ExtentsSByte.cs +// Author(s) : Natalia Portillo +// +// Component : Extent helpers. +// +// --[ Description ] ---------------------------------------------------------- +// +// Provides extents for sbyte types. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Aaru.CommonTypes.Extents +{ + /// Implements extents for + public class ExtentsSByte + { + List> _backend; + + /// Initialize an empty list of extents + public ExtentsSByte() => _backend = new List>(); + + /// Initializes extents with an specific list + /// List of extents as tuples "start, end" + public ExtentsSByte(IEnumerable> list) + { + _backend = new List>(); + + // This ensure no overlapping extents are added on creation + foreach(Tuple t in list) + Add(t.Item1, t.Item2); + } + + /// Gets a count of how many extents are stored + public int Count => _backend.Count; + + /// Adds the specified number to the corresponding extent, or creates a new one + /// + public void Add(sbyte item) + { + Tuple removeOne = null; + Tuple removeTwo = null; + Tuple itemToAdd = null; + + for(int i = 0; i < _backend.Count; i++) + { + // Already contained in an extent + if(item >= _backend[i].Item1 && + item <= _backend[i].Item2) + return; + + // Expands existing extent start + if(item == _backend[i].Item1 - 1) + { + removeOne = _backend[i]; + + if(i > 0 && + item == _backend[i - 1].Item2 + 1) + { + removeTwo = _backend[i - 1]; + itemToAdd = new Tuple(_backend[i - 1].Item1, _backend[i].Item2); + } + else + itemToAdd = new Tuple(item, _backend[i].Item2); + + break; + } + + // Expands existing extent end + if(item != _backend[i].Item2 + 1) + continue; + + removeOne = _backend[i]; + + if(i < _backend.Count - 1 && + item == _backend[i + 1].Item1 - 1) + { + removeTwo = _backend[i + 1]; + itemToAdd = new Tuple(_backend[i].Item1, _backend[i + 1].Item2); + } + else + itemToAdd = new Tuple(_backend[i].Item1, item); + + break; + } + + if(itemToAdd != null) + { + _backend.Remove(removeOne); + _backend.Remove(removeTwo); + _backend.Add(itemToAdd); + } + else + _backend.Add(new Tuple(item, item)); + + // Sort + _backend = _backend.OrderBy(t => t.Item1).ToList(); + } + + /// Adds a new extent + /// First element of the extent + /// + /// Last element of the extent or if is true how many elements the extent runs + /// for + /// + /// If set to true, indicates how many elements the extent runs for + public void Add(sbyte start, sbyte end, bool run = false) + { + sbyte realEnd; + + if(run) + realEnd = (sbyte)(start + end - 1); + else + realEnd = end; + + // TODO: Optimize this + for(sbyte t = start; t <= realEnd; t++) + Add(t); + } + + /// Checks if the specified item is contained by an extent on this instance + /// Item to search for + /// true if any of the extents on this instance contains the item + public bool Contains(sbyte item) => _backend.Any(extent => item >= extent.Item1 && item <= extent.Item2); + + /// Removes all extents from this instance + public void Clear() => _backend.Clear(); + + /// Removes an item from the extents in this instance + /// Item to remove + /// true if the item was contained in a known extent and removed, false otherwise + public bool Remove(sbyte item) + { + Tuple toRemove = null; + Tuple toAddOne = null; + Tuple toAddTwo = null; + + foreach(Tuple extent in _backend) + { + // Extent is contained and not a border + if(item > extent.Item1 && + item < extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(extent.Item1, (sbyte)(item - 1)); + toAddTwo = new Tuple((sbyte)(item + 1), extent.Item2); + + break; + } + + // Extent is left border, but not only element + if(item == extent.Item1 && + item != extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple((sbyte)(item + 1), extent.Item2); + + break; + } + + // Extent is right border, but not only element + if(item != extent.Item1 && + item == extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(extent.Item1, (sbyte)(item - 1)); + + break; + } + + // Extent is only element + if(item != extent.Item1 || + item != extent.Item2) + continue; + + toRemove = extent; + + break; + } + + // Item not found + if(toRemove == null) + return false; + + _backend.Remove(toRemove); + + if(toAddOne != null) + _backend.Add(toAddOne); + + if(toAddTwo != null) + _backend.Add(toAddTwo); + + // Sort + _backend = _backend.OrderBy(t => t.Item1).ToList(); + + return true; + } + + /// + /// Converts the list of extents to an array of where T1 is first element of the extent and + /// T2 is last element + /// + /// Array of + public Tuple[] ToArray() => _backend.ToArray(); + + /// Gets the first element of the extent that contains the specified item + /// Item + /// First element of extent + /// true if item was found in an extent, false otherwise + public bool GetStart(sbyte item, out sbyte start) + { + start = 0; + + foreach(Tuple extent in + _backend.Where(extent => item >= extent.Item1 && item <= extent.Item2)) + { + start = extent.Item1; + + return true; + } + + return false; + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Extents/ExtentsShort.cs b/Aaru.CommonTypes/Extents/ExtentsShort.cs new file mode 100644 index 0000000..869f9dd --- /dev/null +++ b/Aaru.CommonTypes/Extents/ExtentsShort.cs @@ -0,0 +1,255 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : ExtentsShort.cs +// Author(s) : Natalia Portillo +// +// Component : Extent helpers. +// +// --[ Description ] ---------------------------------------------------------- +// +// Provides extents for short types. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Aaru.CommonTypes.Extents +{ + /// Implements extents for + public class ExtentsShort + { + List> _backend; + + /// Initialize an empty list of extents + public ExtentsShort() => _backend = new List>(); + + /// Initializes extents with an specific list + /// List of extents as tuples "start, end" + public ExtentsShort(IEnumerable> list) + { + _backend = new List>(); + + // This ensure no overlapping extents are added on creation + foreach(Tuple t in list) + Add(t.Item1, t.Item2); + } + + /// Gets a count of how many extents are stored + public int Count => _backend.Count; + + /// Adds the specified number to the corresponding extent, or creates a new one + /// + public void Add(short item) + { + Tuple removeOne = null; + Tuple removeTwo = null; + Tuple itemToAdd = null; + + for(int i = 0; i < _backend.Count; i++) + { + // Already contained in an extent + if(item >= _backend[i].Item1 && + item <= _backend[i].Item2) + return; + + // Expands existing extent start + if(item == _backend[i].Item1 - 1) + { + removeOne = _backend[i]; + + if(i > 0 && + item == _backend[i - 1].Item2 + 1) + { + removeTwo = _backend[i - 1]; + itemToAdd = new Tuple(_backend[i - 1].Item1, _backend[i].Item2); + } + else + itemToAdd = new Tuple(item, _backend[i].Item2); + + break; + } + + // Expands existing extent end + if(item != _backend[i].Item2 + 1) + continue; + + removeOne = _backend[i]; + + if(i < _backend.Count - 1 && + item == _backend[i + 1].Item1 - 1) + { + removeTwo = _backend[i + 1]; + itemToAdd = new Tuple(_backend[i].Item1, _backend[i + 1].Item2); + } + else + itemToAdd = new Tuple(_backend[i].Item1, item); + + break; + } + + if(itemToAdd != null) + { + _backend.Remove(removeOne); + _backend.Remove(removeTwo); + _backend.Add(itemToAdd); + } + else + _backend.Add(new Tuple(item, item)); + + // Sort + _backend = _backend.OrderBy(t => t.Item1).ToList(); + } + + /// Adds a new extent + /// First element of the extent + /// + /// Last element of the extent or if is true how many elements the extent runs + /// for + /// + /// If set to true, indicates how many elements the extent runs for + public void Add(short start, short end, bool run = false) + { + short realEnd; + + if(run) + realEnd = (short)(start + end - 1); + else + realEnd = end; + + // TODO: Optimize this + for(short t = start; t <= realEnd; t++) + Add(t); + } + + /// Checks if the specified item is contained by an extent on this instance + /// Item to search for + /// true if any of the extents on this instance contains the item + public bool Contains(short item) => _backend.Any(extent => item >= extent.Item1 && item <= extent.Item2); + + /// Removes all extents from this instance + public void Clear() => _backend.Clear(); + + /// Removes an item from the extents in this instance + /// Item to remove + /// true if the item was contained in a known extent and removed, false otherwise + public bool Remove(short item) + { + Tuple toRemove = null; + Tuple toAddOne = null; + Tuple toAddTwo = null; + + foreach(Tuple extent in _backend) + { + // Extent is contained and not a border + if(item > extent.Item1 && + item < extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(extent.Item1, (short)(item - 1)); + toAddTwo = new Tuple((short)(item + 1), extent.Item2); + + break; + } + + // Extent is left border, but not only element + if(item == extent.Item1 && + item != extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple((short)(item + 1), extent.Item2); + + break; + } + + // Extent is right border, but not only element + if(item != extent.Item1 && + item == extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(extent.Item1, (short)(item - 1)); + + break; + } + + // Extent is only element + if(item != extent.Item1 || + item != extent.Item2) + continue; + + toRemove = extent; + + break; + } + + // Item not found + if(toRemove == null) + return false; + + _backend.Remove(toRemove); + + if(toAddOne != null) + _backend.Add(toAddOne); + + if(toAddTwo != null) + _backend.Add(toAddTwo); + + // Sort + _backend = _backend.OrderBy(t => t.Item1).ToList(); + + return true; + } + + /// + /// Converts the list of extents to an array of where T1 is first element of the extent and + /// T2 is last element + /// + /// Array of + public Tuple[] ToArray() => _backend.ToArray(); + + /// Gets the first element of the extent that contains the specified item + /// Item + /// First element of extent + /// true if item was found in an extent, false otherwise + public bool GetStart(short item, out short start) + { + start = 0; + + foreach(Tuple extent in + _backend.Where(extent => item >= extent.Item1 && item <= extent.Item2)) + { + start = extent.Item1; + + return true; + } + + return false; + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Extents/ExtentsUInt.cs b/Aaru.CommonTypes/Extents/ExtentsUInt.cs new file mode 100644 index 0000000..4afaec5 --- /dev/null +++ b/Aaru.CommonTypes/Extents/ExtentsUInt.cs @@ -0,0 +1,254 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : ExtentsUInt.cs +// Author(s) : Natalia Portillo +// +// Component : Extent helpers. +// +// --[ Description ] ---------------------------------------------------------- +// +// Provides extents for uint types. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Aaru.CommonTypes.Extents +{ + /// Implements extents for + public class ExtentsUInt + { + List> _backend; + + /// Initialize an empty list of extents + public ExtentsUInt() => _backend = new List>(); + + /// Initializes extents with an specific list + /// List of extents as tuples "start, end" + public ExtentsUInt(IEnumerable> list) + { + _backend = new List>(); + + // This ensure no overlapping extents are added on creation + foreach(Tuple t in list) + Add(t.Item1, t.Item2); + } + + /// Gets a count of how many extents are stored + public int Count => _backend.Count; + + /// Adds the specified number to the corresponding extent, or creates a new one + /// + public void Add(uint item) + { + Tuple removeOne = null; + Tuple removeTwo = null; + Tuple itemToAdd = null; + + for(int i = 0; i < _backend.Count; i++) + { + // Already contained in an extent + if(item >= _backend[i].Item1 && + item <= _backend[i].Item2) + return; + + // Expands existing extent start + if(item == _backend[i].Item1 - 1) + { + removeOne = _backend[i]; + + if(i > 0 && + item == _backend[i - 1].Item2 + 1) + { + removeTwo = _backend[i - 1]; + itemToAdd = new Tuple(_backend[i - 1].Item1, _backend[i].Item2); + } + else + itemToAdd = new Tuple(item, _backend[i].Item2); + + break; + } + + // Expands existing extent end + if(item != _backend[i].Item2 + 1) + continue; + + removeOne = _backend[i]; + + if(i < _backend.Count - 1 && + item == _backend[i + 1].Item1 - 1) + { + removeTwo = _backend[i + 1]; + itemToAdd = new Tuple(_backend[i].Item1, _backend[i + 1].Item2); + } + else + itemToAdd = new Tuple(_backend[i].Item1, item); + + break; + } + + if(itemToAdd != null) + { + _backend.Remove(removeOne); + _backend.Remove(removeTwo); + _backend.Add(itemToAdd); + } + else + _backend.Add(new Tuple(item, item)); + + // Sort + _backend = _backend.OrderBy(t => t.Item1).ToList(); + } + + /// Adds a new extent + /// First element of the extent + /// + /// Last element of the extent or if is true how many elements the extent runs + /// for + /// + /// If set to true, indicates how many elements the extent runs for + public void Add(uint start, uint end, bool run = false) + { + uint realEnd; + + if(run) + realEnd = start + end - 1; + else + realEnd = end; + + // TODO: Optimize this + for(uint t = start; t <= realEnd; t++) + Add(t); + } + + /// Checks if the specified item is contained by an extent on this instance + /// Item to search for + /// true if any of the extents on this instance contains the item + public bool Contains(uint item) => _backend.Any(extent => item >= extent.Item1 && item <= extent.Item2); + + /// Removes all extents from this instance + public void Clear() => _backend.Clear(); + + /// Removes an item from the extents in this instance + /// Item to remove + /// true if the item was contained in a known extent and removed, false otherwise + public bool Remove(uint item) + { + Tuple toRemove = null; + Tuple toAddOne = null; + Tuple toAddTwo = null; + + foreach(Tuple extent in _backend) + { + // Extent is contained and not a border + if(item > extent.Item1 && + item < extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(extent.Item1, item - 1); + toAddTwo = new Tuple(item + 1, extent.Item2); + + break; + } + + // Extent is left border, but not only element + if(item == extent.Item1 && + item != extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(item + 1, extent.Item2); + + break; + } + + // Extent is right border, but not only element + if(item != extent.Item1 && + item == extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(extent.Item1, item - 1); + + break; + } + + // Extent is only element + if(item != extent.Item1 || + item != extent.Item2) + continue; + + toRemove = extent; + + break; + } + + // Item not found + if(toRemove == null) + return false; + + _backend.Remove(toRemove); + + if(toAddOne != null) + _backend.Add(toAddOne); + + if(toAddTwo != null) + _backend.Add(toAddTwo); + + // Sort + _backend = _backend.OrderBy(t => t.Item1).ToList(); + + return true; + } + + /// + /// Converts the list of extents to an array of where T1 is first element of the extent and + /// T2 is last element + /// + /// Array of + public Tuple[] ToArray() => _backend.ToArray(); + + /// Gets the first element of the extent that contains the specified item + /// Item + /// First element of extent + /// true if item was found in an extent, false otherwise + public bool GetStart(uint item, out uint start) + { + start = 0; + + foreach(Tuple extent in _backend.Where(extent => item >= extent.Item1 && item <= extent.Item2)) + { + start = extent.Item1; + + return true; + } + + return false; + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Extents/ExtentsULong.cs b/Aaru.CommonTypes/Extents/ExtentsULong.cs new file mode 100644 index 0000000..07af92b --- /dev/null +++ b/Aaru.CommonTypes/Extents/ExtentsULong.cs @@ -0,0 +1,255 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : ExtentsULong.cs +// Author(s) : Natalia Portillo +// +// Component : Extent helpers. +// +// --[ Description ] ---------------------------------------------------------- +// +// Provides extents for ulong types. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Aaru.CommonTypes.Extents +{ + /// Implements extents for + public class ExtentsULong + { + List> _backend; + + /// Initialize an empty list of extents + public ExtentsULong() => _backend = new List>(); + + /// Initializes extents with an specific list + /// List of extents as tuples "start, end" + public ExtentsULong(IEnumerable> list) + { + _backend = new List>(); + + // This ensure no overlapping extents are added on creation + foreach(Tuple t in list) + Add(t.Item1, t.Item2); + } + + /// Gets a count of how many extents are stored + public int Count => _backend.Count; + + /// Adds the specified number to the corresponding extent, or creates a new one + /// + public void Add(ulong item) + { + Tuple removeOne = null; + Tuple removeTwo = null; + Tuple itemToAdd = null; + + for(int i = 0; i < _backend.Count; i++) + { + // Already contained in an extent + if(item >= _backend[i].Item1 && + item <= _backend[i].Item2) + return; + + // Expands existing extent start + if(item == _backend[i].Item1 - 1) + { + removeOne = _backend[i]; + + if(i > 0 && + item == _backend[i - 1].Item2 + 1) + { + removeTwo = _backend[i - 1]; + itemToAdd = new Tuple(_backend[i - 1].Item1, _backend[i].Item2); + } + else + itemToAdd = new Tuple(item, _backend[i].Item2); + + break; + } + + // Expands existing extent end + if(item != _backend[i].Item2 + 1) + continue; + + removeOne = _backend[i]; + + if(i < _backend.Count - 1 && + item == _backend[i + 1].Item1 - 1) + { + removeTwo = _backend[i + 1]; + itemToAdd = new Tuple(_backend[i].Item1, _backend[i + 1].Item2); + } + else + itemToAdd = new Tuple(_backend[i].Item1, item); + + break; + } + + if(itemToAdd != null) + { + _backend.Remove(removeOne); + _backend.Remove(removeTwo); + _backend.Add(itemToAdd); + } + else + _backend.Add(new Tuple(item, item)); + + // Sort + _backend = _backend.OrderBy(t => t.Item1).ToList(); + } + + /// Adds a new extent + /// First element of the extent + /// + /// Last element of the extent or if is true how many elements the extent runs + /// for + /// + /// If set to true, indicates how many elements the extent runs for + public void Add(ulong start, ulong end, bool run = false) + { + ulong realEnd; + + if(run) + realEnd = start + end - 1; + else + realEnd = end; + + // TODO: Optimize this + for(ulong t = start; t <= realEnd; t++) + Add(t); + } + + /// Checks if the specified item is contained by an extent on this instance + /// Item to search for + /// true if any of the extents on this instance contains the item + public bool Contains(ulong item) => _backend.Any(extent => item >= extent.Item1 && item <= extent.Item2); + + /// Removes all extents from this instance + public void Clear() => _backend.Clear(); + + /// Removes an item from the extents in this instance + /// Item to remove + /// true if the item was contained in a known extent and removed, false otherwise + public bool Remove(ulong item) + { + Tuple toRemove = null; + Tuple toAddOne = null; + Tuple toAddTwo = null; + + foreach(Tuple extent in _backend) + { + // Extent is contained and not a border + if(item > extent.Item1 && + item < extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(extent.Item1, item - 1); + toAddTwo = new Tuple(item + 1, extent.Item2); + + break; + } + + // Extent is left border, but not only element + if(item == extent.Item1 && + item != extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(item + 1, extent.Item2); + + break; + } + + // Extent is right border, but not only element + if(item != extent.Item1 && + item == extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(extent.Item1, item - 1); + + break; + } + + // Extent is only element + if(item != extent.Item1 || + item != extent.Item2) + continue; + + toRemove = extent; + + break; + } + + // Item not found + if(toRemove == null) + return false; + + _backend.Remove(toRemove); + + if(toAddOne != null) + _backend.Add(toAddOne); + + if(toAddTwo != null) + _backend.Add(toAddTwo); + + // Sort + _backend = _backend.OrderBy(t => t.Item1).ToList(); + + return true; + } + + /// + /// Converts the list of extents to an array of where T1 is first element of the extent and + /// T2 is last element + /// + /// Array of + public Tuple[] ToArray() => _backend.ToArray(); + + /// Gets the first element of the extent that contains the specified item + /// Item + /// First element of extent + /// true if item was found in an extent, false otherwise + public bool GetStart(ulong item, out ulong start) + { + start = 0; + + foreach(Tuple extent in + _backend.Where(extent => item >= extent.Item1 && item <= extent.Item2)) + { + start = extent.Item1; + + return true; + } + + return false; + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Extents/ExtentsUShort.cs b/Aaru.CommonTypes/Extents/ExtentsUShort.cs new file mode 100644 index 0000000..103c8bd --- /dev/null +++ b/Aaru.CommonTypes/Extents/ExtentsUShort.cs @@ -0,0 +1,255 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : ExtentsUShort.cs +// Author(s) : Natalia Portillo +// +// Component : Extent helpers. +// +// --[ Description ] ---------------------------------------------------------- +// +// Provides extents for ushort types. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Aaru.CommonTypes.Extents +{ + /// Implements extents for + public class ExtentsUShort + { + List> _backend; + + /// Initialize an empty list of extents + public ExtentsUShort() => _backend = new List>(); + + /// Initializes extents with an specific list + /// List of extents as tuples "start, end" + public ExtentsUShort(IEnumerable> list) + { + _backend = new List>(); + + // This ensure no overlapping extents are added on creation + foreach(Tuple t in list) + Add(t.Item1, t.Item2); + } + + /// Gets a count of how many extents are stored + public int Count => _backend.Count; + + /// Adds the specified number to the corresponding extent, or creates a new one + /// + public void Add(ushort item) + { + Tuple removeOne = null; + Tuple removeTwo = null; + Tuple itemToAdd = null; + + for(int i = 0; i < _backend.Count; i++) + { + // Already contained in an extent + if(item >= _backend[i].Item1 && + item <= _backend[i].Item2) + return; + + // Expands existing extent start + if(item == _backend[i].Item1 - 1) + { + removeOne = _backend[i]; + + if(i > 0 && + item == _backend[i - 1].Item2 + 1) + { + removeTwo = _backend[i - 1]; + itemToAdd = new Tuple(_backend[i - 1].Item1, _backend[i].Item2); + } + else + itemToAdd = new Tuple(item, _backend[i].Item2); + + break; + } + + // Expands existing extent end + if(item != _backend[i].Item2 + 1) + continue; + + removeOne = _backend[i]; + + if(i < _backend.Count - 1 && + item == _backend[i + 1].Item1 - 1) + { + removeTwo = _backend[i + 1]; + itemToAdd = new Tuple(_backend[i].Item1, _backend[i + 1].Item2); + } + else + itemToAdd = new Tuple(_backend[i].Item1, item); + + break; + } + + if(itemToAdd != null) + { + _backend.Remove(removeOne); + _backend.Remove(removeTwo); + _backend.Add(itemToAdd); + } + else + _backend.Add(new Tuple(item, item)); + + // Sort + _backend = _backend.OrderBy(t => t.Item1).ToList(); + } + + /// Adds a new extent + /// First element of the extent + /// + /// Last element of the extent or if is true how many elements the extent runs + /// for + /// + /// If set to true, indicates how many elements the extent runs for + public void Add(ushort start, ushort end, bool run = false) + { + ushort realEnd; + + if(run) + realEnd = (ushort)(start + end - 1); + else + realEnd = end; + + // TODO: Optimize this + for(ushort t = start; t <= realEnd; t++) + Add(t); + } + + /// Checks if the specified item is contained by an extent on this instance + /// Item to search for + /// true if any of the extents on this instance contains the item + public bool Contains(ushort item) => _backend.Any(extent => item >= extent.Item1 && item <= extent.Item2); + + /// Removes all extents from this instance + public void Clear() => _backend.Clear(); + + /// Removes an item from the extents in this instance + /// Item to remove + /// true if the item was contained in a known extent and removed, false otherwise + public bool Remove(ushort item) + { + Tuple toRemove = null; + Tuple toAddOne = null; + Tuple toAddTwo = null; + + foreach(Tuple extent in _backend) + { + // Extent is contained and not a border + if(item > extent.Item1 && + item < extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(extent.Item1, (ushort)(item - 1)); + toAddTwo = new Tuple((ushort)(item + 1), extent.Item2); + + break; + } + + // Extent is left border, but not only element + if(item == extent.Item1 && + item != extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple((ushort)(item + 1), extent.Item2); + + break; + } + + // Extent is right border, but not only element + if(item != extent.Item1 && + item == extent.Item2) + { + toRemove = extent; + toAddOne = new Tuple(extent.Item1, (ushort)(item - 1)); + + break; + } + + // Extent is only element + if(item != extent.Item1 || + item != extent.Item2) + continue; + + toRemove = extent; + + break; + } + + // Item not found + if(toRemove == null) + return false; + + _backend.Remove(toRemove); + + if(toAddOne != null) + _backend.Add(toAddOne); + + if(toAddTwo != null) + _backend.Add(toAddTwo); + + // Sort + _backend = _backend.OrderBy(t => t.Item1).ToList(); + + return true; + } + + /// + /// Converts the list of extents to an array of where T1 is first element of the extent and + /// T2 is last element + /// + /// Array of + public Tuple[] ToArray() => _backend.ToArray(); + + /// Gets the first element of the extent that contains the specified item + /// Item + /// First element of extent + /// true if item was found in an extent, false otherwise + public bool GetStart(ushort item, out ushort start) + { + start = 0; + + foreach(Tuple extent in _backend.Where(extent => item >= extent.Item1 && + item <= extent.Item2)) + { + start = extent.Item1; + + return true; + } + + return false; + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Filters.cs b/Aaru.CommonTypes/Filters.cs new file mode 100644 index 0000000..47c2744 --- /dev/null +++ b/Aaru.CommonTypes/Filters.cs @@ -0,0 +1,117 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Filters.cs +// Author(s) : Natalia Portillo +// +// Component : Filters. +// +// --[ Description ] ---------------------------------------------------------- +// +// Enumerates all filters and instantiates the correct one. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using Aaru.CommonTypes.Enums; +using Aaru.CommonTypes.Interfaces; +using Aaru.Console; + +namespace Aaru.CommonTypes +{ + /// Manages the known filters + public sealed class FiltersList + { + /// List of known filters + public readonly SortedDictionary Filters; + + /// Fills the list of all known filters + public FiltersList() + { + var assembly = Assembly.Load("Aaru.Filters"); + Filters = new SortedDictionary(); + + foreach(Type type in assembly.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IFilter)))) + try + { + var filter = (IFilter)type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] + {}); + + if(filter != null && + !Filters.ContainsKey(filter.Name.ToLower())) + Filters.Add(filter.Name.ToLower(), filter); + } + catch(Exception exception) + { + AaruConsole.ErrorWriteLine("Exception {0}", exception); + } + } + + /// Gets the filter that allows to read the specified path + /// Path + /// The filter that allows reading the specified path + public IFilter GetFilter(string path) + { + IFilter noFilter = null; + + foreach(IFilter filter in Filters.Values) + { + try + { + if(filter.Id != new Guid("12345678-AAAA-BBBB-CCCC-123456789000")) + { + if(!filter.Identify(path)) + continue; + + var foundFilter = (IFilter)filter.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] + {}); + + if(foundFilter?.Open(path) == ErrorNumber.NoError) + return foundFilter; + } + else + noFilter = filter; + } + catch(IOException) + { + // Ignore and continue + } + } + + if(!noFilter?.Identify(path) == true) + return null; + + noFilter?.Open(path); + + return noFilter; + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Geometry.cs b/Aaru.CommonTypes/Geometry.cs new file mode 100644 index 0000000..bfc8bf8 --- /dev/null +++ b/Aaru.CommonTypes/Geometry.cs @@ -0,0 +1,143 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Geometry.cs +// Author(s) : Natalia Portillo +// +// Component : CommonTypes. +// +// --[ Description ] ---------------------------------------------------------- +// +// Includes geometry for several medias. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System.Linq; + +namespace Aaru.CommonTypes +{ + /// Handles CHS geometries + public static class Geometry + { + /// List of known disk geometries + public static readonly (ushort cylinders, byte heads, ushort sectorsPerTrack, uint bytesPerSector, MediaEncoding + encoding, bool variableSectorsPerTrack, MediaType type)[] KnownGeometries = + { + (32, 1, 8, 319, MediaEncoding.FM, false, MediaType.IBM23FD), + (35, 1, 9, 256, MediaEncoding.FM, false, MediaType.ECMA_66), + (35, 1, 13, 256, MediaEncoding.AppleGCR, false, MediaType.Apple32SS), + (35, 1, 16, 256, MediaEncoding.AppleGCR, false, MediaType.Apple33SS), + (35, 1, 19, 256, MediaEncoding.CommodoreGCR, false, MediaType.CBM_1540), + (35, 2, 13, 256, MediaEncoding.AppleGCR, false, MediaType.Apple32DS), + (35, 2, 16, 256, MediaEncoding.AppleGCR, false, MediaType.Apple33DS), + (35, 2, 19, 256, MediaEncoding.CommodoreGCR, false, MediaType.CBM_1571), + (40, 1, 8, 512, MediaEncoding.MFM, false, MediaType.DOS_525_SS_DD_8), + (40, 1, 9, 512, MediaEncoding.MFM, false, MediaType.DOS_525_SS_DD_9), + (40, 1, 10, 256, MediaEncoding.FM, false, MediaType.ACORN_525_SS_SD_40), + (40, 1, 16, 256, MediaEncoding.MFM, false, MediaType.ACORN_525_SS_DD_40), + (40, 1, 18, 128, MediaEncoding.FM, false, MediaType.ATARI_525_SD), + (40, 1, 18, 256, MediaEncoding.MFM, false, MediaType.ATARI_525_DD), + (40, 1, 19, 256, MediaEncoding.CommodoreGCR, false, MediaType.CBM_1540_Ext), + (40, 1, 26, 128, MediaEncoding.MFM, false, MediaType.ATARI_525_ED), + (40, 2, 8, 512, MediaEncoding.MFM, false, MediaType.DOS_525_DS_DD_8), + (40, 2, 9, 512, MediaEncoding.MFM, false, MediaType.DOS_525_DS_DD_9), + (40, 2, 16, 256, MediaEncoding.FM, false, MediaType.ECMA_70), + (70, 2, 9, 512, MediaEncoding.MFM, false, MediaType.Apricot_35), + (74, 1, 8, 512, MediaEncoding.FM, false, MediaType.IBM33FD_512), + (74, 1, 15, 256, MediaEncoding.FM, false, MediaType.IBM33FD_256), + (74, 1, 26, 128, MediaEncoding.FM, false, MediaType.IBM33FD_128), + (74, 2, 8, 1024, MediaEncoding.MFM, false, MediaType.IBM53FD_1024), + (74, 2, 15, 256, MediaEncoding.FM, false, MediaType.IBM43FD_256), + (74, 2, 15, 512, MediaEncoding.MFM, false, MediaType.IBM53FD_512), + (74, 2, 26, 128, MediaEncoding.FM, false, MediaType.IBM43FD_128), + (74, 2, 26, 256, MediaEncoding.MFM, false, MediaType.IBM53FD_256), + (77, 1, 26, 128, MediaEncoding.FM, false, MediaType.RX01), + (77, 1, 26, 256, MediaEncoding.MFM, false, MediaType.RX02), + (77, 2, 8, 1024, MediaEncoding.MFM, false, MediaType.NEC_525_HD), + (77, 2, 15, 512, MediaEncoding.MFM, false, MediaType.ECMA_99_15), + (77, 2, 26, 128, MediaEncoding.FM, false, MediaType.NEC_8_SD), + (77, 2, 26, 256, MediaEncoding.MFM, false, MediaType.RX03), + (80, 1, 8, 512, MediaEncoding.MFM, false, MediaType.DOS_35_SS_DD_8), + (80, 1, 9, 512, MediaEncoding.MFM, false, MediaType.DOS_35_SS_DD_9), + (80, 1, 10, 256, MediaEncoding.FM, false, MediaType.ACORN_525_SS_SD_80), + (80, 1, 10, 512, MediaEncoding.AppleGCR, true, MediaType.AppleSonySS), + (80, 1, 10, 512, MediaEncoding.MFM, false, MediaType.RX50), + (80, 1, 11, 512, MediaEncoding.MFM, false, MediaType.ATARI_35_SS_DD_11), + (80, 1, 16, 256, MediaEncoding.MFM, false, MediaType.ACORN_525_SS_DD_80), + (80, 2, 5, 1024, MediaEncoding.MFM, false, MediaType.ACORN_35_DS_DD), + (80, 2, 8, 512, MediaEncoding.MFM, false, MediaType.DOS_35_DS_DD_8), + (80, 2, 9, 512, MediaEncoding.MFM, false, MediaType.DOS_35_DS_DD_9), + (80, 2, 10, 512, MediaEncoding.AppleGCR, true, MediaType.AppleSonyDS), + (80, 2, 10, 512, MediaEncoding.MFM, false, MediaType.CBM_35_DD), + (80, 2, 10, 1024, MediaEncoding.MFM, false, MediaType.ACORN_35_DS_HD), + (80, 2, 11, 512, MediaEncoding.MFM, false, MediaType.CBM_AMIGA_35_DD), + (80, 2, 15, 512, MediaEncoding.MFM, false, MediaType.DOS_525_HD), + (80, 2, 16, 256, MediaEncoding.FM, false, MediaType.ECMA_78), + (80, 2, 16, 256, MediaEncoding.MFM, false, MediaType.ACORN_525_DS_DD), + (80, 2, 18, 512, MediaEncoding.MFM, false, MediaType.DOS_35_HD), + (80, 2, 19, 512, MediaEncoding.MFM, false, MediaType.XDF_525), + (80, 2, 21, 512, MediaEncoding.MFM, false, MediaType.DMF), + (80, 2, 22, 512, MediaEncoding.MFM, false, MediaType.CBM_AMIGA_35_HD), + (80, 2, 23, 512, MediaEncoding.MFM, false, MediaType.XDF_35), + (80, 2, 36, 512, MediaEncoding.MFM, false, MediaType.DOS_35_ED), + (82, 2, 10, 512, MediaEncoding.MFM, false, MediaType.FDFORMAT_35_DD), + (82, 2, 17, 512, MediaEncoding.MFM, false, MediaType.FDFORMAT_525_HD), + (82, 2, 21, 512, MediaEncoding.MFM, false, MediaType.FDFORMAT_35_HD), + (240, 2, 38, 512, MediaEncoding.MFM, false, MediaType.NEC_35_TD), + (753, 2, 27, 512, MediaEncoding.MFM, false, MediaType.Floptical), + + // Following ones are what the device itself report, not the physical geometry + (154, 16, 32, 512, MediaEncoding.MFM, false, MediaType.PocketZip), + (262, 32, 56, 512, MediaEncoding.MFM, false, MediaType.LS240), + (963, 8, 32, 512, MediaEncoding.MFM, false, MediaType.LS120), + (1021, 64, 32, 512, MediaEncoding.MFM, false, MediaType.Jaz), + (1024, 2, 32, 512, MediaEncoding.MFM, false, MediaType.FD32MB) + }; + + /// Gets the media type for a given geometry + /// Geometry + /// Media type + public static MediaType GetMediaType( + (ushort cylinders, byte heads, ushort sectorsPerTrack, uint bytesPerSector, MediaEncoding encoding, bool + variableSectorsPerTrack) geometry) => (from geom in KnownGeometries + where geom.cylinders == geometry.cylinders && + geom.heads == geometry.heads && + geom.sectorsPerTrack == geometry.sectorsPerTrack && + geom.bytesPerSector == geometry.bytesPerSector && + geom.encoding == geometry.encoding && + geom.variableSectorsPerTrack == + geometry.variableSectorsPerTrack select geom.type). + FirstOrDefault(); + + /// Gets the geometry for a given media type + /// Media type + /// Geometry + public static (ushort cylinders, byte heads, ushort sectorsPerTrack, uint bytesPerSector, MediaEncoding encoding + , bool variableSectorsPerTrack, MediaType type) GetGeometry(MediaType mediaType) => + (from geom in KnownGeometries where geom.type == mediaType select geom).FirstOrDefault(); + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interfaces/IArchive.cs b/Aaru.CommonTypes/Interfaces/IArchive.cs new file mode 100644 index 0000000..ebbb719 --- /dev/null +++ b/Aaru.CommonTypes/Interfaces/IArchive.cs @@ -0,0 +1,203 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : IArchive.cs +// Author(s) : Michael Drüing +// +// Component : Archives. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines the interface for implementing archive plugins. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2018-2019 Michael Drüing +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.IO; +using Aaru.CommonTypes.Enums; + +// ReSharper disable UnusedMember.Global + +namespace Aaru.CommonTypes.Interfaces +{ + /// Supported archive features + [Flags] + public enum ArchiveSupportedFeature : uint + { + /// The archive supports filenames for its entries. If this flag is not set, files can only be accessed by number. + SupportsFilenames = 1 << 0, + /// + /// The archive supports compression. If this flag is not set, compressed and uncompressed lengths are always the + /// same. + /// + SupportsCompression = 1 << 1, + /// + /// The archive supports subdirectories. If this flag is not set, all filenames are guaranteed to not contain any + /// "/" character. + /// + SupportsSubdirectories = 1 << 2, + /// + /// The archive supports explicit entries for directories (like Zip, for example). If this flag is not set, + /// directories are implicit by the relative name of the files. + /// + HasExplicitDirectories = 1 << 3, + /// The archive stores a timestamp with each entry if this flag is set. + HasEntryTimestamp = 1 << 4, + /// If this flag is set, individual files or the whole archive might be encrypted or password-protected. + SupportsProtection = 1 << 5, // TODO: not implemented yet + + /// If this flag is set, the archive supports returning extended attributes (Xattrs) for each entry. + SupportsXAttrs = 1 << 6 + } + + /// Defines the interface to handle an archive (e.g. ZIP, WAD, etc) + public interface IArchive + { + /// Descriptive name of the plugin + string Name { get; } + + /// Unique UUID of the plugin + Guid Id { get; } + + /// Identifies if the specified path contains data recognizable by this archive instance + /// Path. + bool Identify(string path); + + /// Identifies if the specified stream contains data recognizable by this archive instance + /// Stream. + bool Identify(Stream stream); + + /// Identifies if the specified buffer contains data recognizable by this archive instance + /// Buffer. + bool Identify(byte[] buffer); + + /// Opens the specified path with this archive instance + /// Path. + ErrorNumber Open(string path); + + /// Opens the specified stream with this archive instance + /// Stream. + ErrorNumber Open(Stream stream); + + /// Opens the specified buffer with this archive instance + /// Buffer. + ErrorNumber Open(byte[] buffer); + + /// + /// Returns true if the archive has a file/stream/buffer currently opened and no + /// has been issued. + /// + bool IsOpened(); + + /// Closes all opened streams. + void Close(); + + /// Return a bitfield indicating the features supported by this archive type. + /// The ArchiveSupportedFeature bitfield. + /// + /// This should be a constant, tied to the archive type, not to the particular features used by the + /// currently-opened archive file. + /// + ArchiveSupportedFeature GetArchiveFeatures(); + + /// Gets the number of entries (i.e. files) that are contained in this archive. + /// + /// Entries in this context can also mean directories or volume labels, for some types of archives that store + /// these explicitly. Do not rely on all entries being regular files! + /// + /// The number of files. + int GetNumberOfEntries(); + + /// Gets the file name (and path) of the given entry in the archive. + /// + /// The path components are separated by a forward slash "/".
The path should not start with a leading + /// slash (i.e. it should be relative, not absolute). + ///
+ /// + /// The entry in the archive for which to return the file name. + /// The file name, with (relative) path + string GetFilename(int entryNumber); + + /// + /// Gets the entry number for a particular file path in the archive. fileName is the relative path of the + /// file in the archive. If the file cannot be found, -1 is returned. + /// + /// + /// The path should be relative (no leading slash), using regular slashes as path separator, and be normalized, + /// i.e. no "foo//bar" or "foo/../bar" path components. + /// + /// The relative path for which to get the entry number. + /// If set, do a case insensitive matching and return the first file that matches. + /// The number of the entry corresponding to the given path, or -1 if the path does not exist. + int GetEntryNumber(string fileName, bool caseInsensitiveMatch); + + /// Gets the (compressed) size of the given entry. + /// The entry for which to get the compressed size. + /// The compressed size of the entry, or 0 if the entry is not a regular file. + /// The return value is equal to the return value of GetUncompressedSize() if the file is not compressed. + /// + long GetCompressedSize(int entryNumber); + + /// Gets the uncompressed size of the given entry. + /// The entry for which to get the uncompressed size. + /// The uncompressed size of the entry, or 0 if the entry is not a regular file. + /// The return value is equal to the return value of GetCompressedSize() if the file is not compressed. + /// + long GetUncompressedSize(int entryNumber); + + /// Gets the attributes of a file or directory. + /// + /// Error number. + /// The entry in the archive for which to retrieve the attributes. + /// File attributes, or zero if the archive does not support attributes. + FileAttributes GetAttributes(int entryNumber); + + /// Lists all extended attributes, alternate data streams and forks of the given file. + /// The entry in the archive for which to retrieve the list of attributes. + /// List of extended attributes, alternate data streams and forks. + List GetXAttrs(int entryNumber); + + /// Reads an extended attribute, alternate data stream or fork from the given file. + /// Error number. + /// The entry in the archive for which to retrieve the XAttr. + /// Extended attribute, alternate data stream or fork name. + /// Buffer with the XAttr data. + ErrorNumber GetXattr(int entryNumber, string xattr, out byte[] buffer); + + /// Gets information about an entry in the archive. + /// Note that some of the data might be incomplete or not available at all, depending on the type of archive. + /// + /// + /// The entry int he archive for which to get the information + /// The available information about the entry in the archive + FileSystemInfo Stat(int entryNumber); + + /// + /// Returns the Filter for the given entry. It will return null if the entry in question is not a regular + /// file (i.e. directory, volume label, etc.) + /// + /// The entry for which the Filter should be returned. + /// The Filter for the given entry. + IFilter GetEntry(int entryNumber); + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interfaces/IChecksum.cs b/Aaru.CommonTypes/Interfaces/IChecksum.cs new file mode 100644 index 0000000..2dcf130 --- /dev/null +++ b/Aaru.CommonTypes/Interfaces/IChecksum.cs @@ -0,0 +1,59 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : IChecksum.cs +// Author(s) : Natalia Portillo +// +// Component : Checksums. +// +// --[ Description ] ---------------------------------------------------------- +// +// Provides an interface for implementing checksums and hashes. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +namespace Aaru.CommonTypes.Interfaces +{ + /// Defines the interface to implement a checksum or hashing algorithm + public interface IChecksum + { + /// Updates the hash with data. + /// Data buffer. + /// Length of buffer to hash. + void Update(byte[] data, uint len); + + /// Updates the hash with data. + /// Data buffer. + void Update(byte[] data); + + /// Returns a byte array of the hash value. + byte[] Final(); + + /// Returns a hexadecimal representation of the hash value. + string End(); + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interfaces/IFilesystem.cs b/Aaru.CommonTypes/Interfaces/IFilesystem.cs new file mode 100644 index 0000000..aebe540 --- /dev/null +++ b/Aaru.CommonTypes/Interfaces/IFilesystem.cs @@ -0,0 +1,73 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : IFilesystem.cs +// Author(s) : Natalia Portillo +// +// Component : Filesystem plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Interface for filesystem plugins. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Text; +using Schemas; + +namespace Aaru.CommonTypes.Interfaces +{ + /// Interface to implement filesystem plugins. + public interface IFilesystem + { + /// Defines the encoding used to interpret strings in the filesystem + Encoding Encoding { get; } + /// Plugin name. + string Name { get; } + /// Plugin UUID. + Guid Id { get; } + /// Information about the filesystem as expected by CICM Metadata XML + /// Information about the filesystem as expected by CICM Metadata XML + FileSystemType XmlFsType { get; } + /// Plugin author + string Author { get; } + + /// Identifies the filesystem in the specified LBA + /// Disk image. + /// Partition. + /// true, if the filesystem is recognized, false otherwise. + bool Identify(IMediaImage imagePlugin, Partition partition); + + /// Gets information about the identified filesystem. + /// Disk image. + /// Partition. + /// Filesystem information. + /// Which encoding to use for this filesystem. + void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding); + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interfaces/IFilter.cs b/Aaru.CommonTypes/Interfaces/IFilter.cs new file mode 100644 index 0000000..f75ab10 --- /dev/null +++ b/Aaru.CommonTypes/Interfaces/IFilter.cs @@ -0,0 +1,147 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : IFilter.cs +// Author(s) : Natalia Portillo +// +// Component : Filters. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines the interface for a Filter. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.IO; +using Aaru.CommonTypes.Enums; + +namespace Aaru.CommonTypes.Interfaces +{ + /// + /// Defines a filter, that is, a transformation of the data from a file, like, for example, a compressor (e.g. + /// GZIP), or a container (e.g. AppleDouble) + /// + public interface IFilter + { + /// Descriptive name of the plugin + string Name { get; } + /// Unique UUID of the plugin + Guid Id { get; } + /// Plugin author + string Author { get; } + + /// + /// Gets the path used to open this filter.
UNIX: /path/to/archive.zip/path/to/file.bin => + /// /path/to/archive.zip/path/to/file.bin
Windows: C:\path\to\archive.zip\path\to\file.bin => + /// C:\path\to\archive.zip\path\to\file.bin + ///
+ /// Path used to open this filter. + string BasePath { get; } + + /// Gets creation time of file referenced by this filter. + /// The creation time. + DateTime CreationTime { get; } + + /// Gets length of this filter's data fork. + /// The data fork length. + long DataForkLength { get; } + + /// + /// Gets the filename for the file referenced by this filter.
UNIX: /path/to/archive.zip/path/to/file.bin = + /// > file.bin
Windows: C:\path\to\archive.zip\path\to\file.bin => file.bin + ///
+ /// The filename. + string Filename { get; } + + /// Gets last write time of file referenced by this filter. + /// The last write time. + DateTime LastWriteTime { get; } + + /// Gets length of file referenced by ths filter. + /// The length. + long Length { get; } + + /// + /// Gets full path to file referenced by this filter. If it's an archive, it's the path inside the archive.
+ /// UNIX: /path/to/archive.zip/path/to/file.bin => /path/to/file.bin
Windows: + /// C:\path\to\archive.zip\path\to\file.bin => \path\to\file.bin + ///
+ /// The path. + string Path { get; } + + /// + /// Gets path to parent folder to the file referenced by this filter. If it's an archive, it's the full path to + /// the archive itself.
UNIX: /path/to/archive.zip/path/to/file.bin => /path/to/archive.zip
Windows: + /// C:\path\to\archive.zip\path\to\file.bin => C:\path\to\archive.zip + ///
+ /// The parent folder. + string ParentFolder { get; } + + /// Gets length of this filter's resource fork. + /// The resource fork length. + long ResourceForkLength { get; } + + /// Returns true if the file referenced by this filter has a resource fork + bool HasResourceFork { get; } + + /// Closes all opened streams. + void Close(); + + /// Gets a stream to access the data fork contents. + /// The data fork stream. + Stream GetDataForkStream(); + + /// Gets a stream to access the resource fork contents. + /// The resource fork stream. + Stream GetResourceForkStream(); + + /// Identifies if the specified path contains data recognizable by this filter instance + /// Path. + bool Identify(string path); + + /// Identifies if the specified stream contains data recognizable by this filter instance + /// Stream. + bool Identify(Stream stream); + + /// Identifies if the specified buffer contains data recognizable by this filter instance + /// Buffer. + bool Identify(byte[] buffer); + + /// Opens the specified path with this filter instance + /// Path. + ErrorNumber Open(string path); + + /// Opens the specified stream with this filter instance + /// Stream. + ErrorNumber Open(Stream stream); + + /// Opens the specified buffer with this filter instance + /// Buffer. + ErrorNumber Open(byte[] buffer); + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interfaces/IFloppyImage.cs b/Aaru.CommonTypes/Interfaces/IFloppyImage.cs new file mode 100644 index 0000000..fa7a781 --- /dev/null +++ b/Aaru.CommonTypes/Interfaces/IFloppyImage.cs @@ -0,0 +1,124 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : IFloppyImage.cs +// Author(s) : Natalia Portillo +// +// Component : Disc image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines the interface to be implemented by floppy image plugins. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using Aaru.CommonTypes.Enums; +using Aaru.CommonTypes.Structs; + +namespace Aaru.CommonTypes.Interfaces +{ + /// + /// + /// Abstract class to implement disk image reading plugins that can contain floppy images. This interface is + /// needed because floppy formatting characteristics are not necesarily compatible with the whole. LBA-oriented + /// interface is defined by . All data returned by these + /// methods is already decoded from its corresponding bitstream. + /// + public interface IFloppyImage : IMediaImage + { + /// + /// Floppy info, contains information about physical characteristics of floppy, like size, bitrate, track density, + /// etc... + /// + FloppyInfo FloppyInfo { get; } + + /// Reads a sector's user data. + /// + /// If is one of the duplicates is returned + /// randomly. If is or + /// random data is returned. If is + /// null is returned. Otherwise, whatever is in the sector is + /// returned. + /// + /// Physical track (position of the heads over the floppy media, 0-based). + /// Physical head (0-based). + /// Logical sector ID. + /// Status of request. + ErrorNumber ReadSector(ushort track, byte head, ushort sector, out FloppySectorStatus status, + out byte[] buffer); + + /// Reads a sector's tag. + /// + /// If is one of the duplicates is returned + /// randomly. If is or + /// random data is returned. If is + /// null is returned. Otherwise, whatever tag is in the sector is + /// returned. + /// + /// Physical track (position of the heads over the floppy media, 0-based). + /// Physical head (0-based). + /// Logical sector ID. + /// Status of request. + /// Sector tag + ErrorNumber ReadSectorTag(ushort track, byte head, ushort sector, out FloppySectorStatus status, + SectorTagType tag, out byte[] buffer); + + /// Reads a whole track. It includes all gaps, address marks, sectors data, etc. + /// The track data. + /// Physical track (position of the heads over the floppy media, 0-based). + /// Physical head (0-based). + ErrorNumber ReadTrack(ushort track, byte head, out byte[] buffer); + + /// Reads a sector's data including all tags, address mark, and so, in a format dependent of represented media. + /// + /// If is one of the duplicates is returned + /// randomly. If is or + /// random data is returned. If is + /// null is returned. Otherwise, whatever is in the sector is + /// returned. + /// + /// Physical track (position of the heads over the floppy media, 0-based). + /// Physical head (0-based). + /// Logical sector ID. + /// Status of request. + ErrorNumber ReadSectorLong(ushort track, byte head, ushort sector, out FloppySectorStatus status, + out byte[] buffer); + + /// Verifies a track. + /// True if correct, false if incorrect, null if uncheckable. + /// Physical track (position of the heads over the floppy media, 0-based). + /// Physical head (0-based). + bool? VerifyTrack(ushort track, byte head); + + /// Verifies a sector, relative to track. + /// True if correct, false if incorrect, null if uncheckable. + /// Physical track (position of the heads over the floppy media, 0-based). + /// Physical head (0-based). + /// Logical sector ID. + bool? VerifySector(ushort track, byte head, ushort sector); + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interfaces/IMediaImage.cs b/Aaru.CommonTypes/Interfaces/IMediaImage.cs new file mode 100644 index 0000000..e18f95f --- /dev/null +++ b/Aaru.CommonTypes/Interfaces/IMediaImage.cs @@ -0,0 +1,124 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : IMediaImage.cs +// Author(s) : Natalia Portillo +// +// Component : Disc image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines interface to be implemented by block addressable disk image +// plugins. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using Aaru.CommonTypes.Enums; +using Aaru.CommonTypes.Structs; +using Schemas; + +namespace Aaru.CommonTypes.Interfaces +{ + /// Abstract class to implement disk image reading plugins. + public interface IMediaImage + { + /// Image information + ImageInfo Info { get; } + /// Plugin name. + string Name { get; } + /// Plugin UUID. + Guid Id { get; } + /// Plugin author + string Author { get; } + /// Gets the image format. + /// The image format. + string Format { get; } + /// List of dump hardware used to create the image from real media + List DumpHardware { get; } + /// Gets the CICM XML metadata for the image + CICMMetadataType CicmMetadata { get; } + + /// Identifies the image. + /// true, if image was identified, false otherwise. + /// Image filter. + bool Identify(IFilter imageFilter); + + /// Opens the image. + /// true, if image was opened, false otherwise. + /// Image filter. + ErrorNumber Open(IFilter imageFilter); + + /// Reads a disk tag. + /// + /// Tag type to read. + /// Disk tag + ErrorNumber ReadMediaTag(MediaTagType tag, out byte[] buffer); + + /// Reads a sector's user data. + /// The sector's user data. + /// Sector address (LBA). + /// + ErrorNumber ReadSector(ulong sectorAddress, out byte[] buffer); + + /// Reads a sector's tag. + /// The sector's tag. + /// Sector address (LBA). + /// Tag type. + /// + ErrorNumber ReadSectorTag(ulong sectorAddress, SectorTagType tag, out byte[] buffer); + + /// Reads user data from several sectors. + /// The sectors user data. + /// Starting sector address (LBA). + /// How many sectors to read. + /// + ErrorNumber ReadSectors(ulong sectorAddress, uint length, out byte[] buffer); + + /// Reads tag from several sectors. + /// The sectors tag. + /// Starting sector address (LBA). + /// How many sectors to read. + /// Tag type. + /// + ErrorNumber ReadSectorsTag(ulong sectorAddress, uint length, SectorTagType tag, out byte[] buffer); + + /// Reads a complete sector (user data + all tags). + /// The complete sector. Format depends on disk type. + /// Sector address (LBA). + /// + ErrorNumber ReadSectorLong(ulong sectorAddress, out byte[] buffer); + + /// Reads several complete sector (user data + all tags). + /// The complete sectors. Format depends on disk type. + /// Starting sector address (LBA). + /// How many sectors to read. + /// + ErrorNumber ReadSectorsLong(ulong sectorAddress, uint length, out byte[] buffer); + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interfaces/IOpticalMediaImage.cs b/Aaru.CommonTypes/Interfaces/IOpticalMediaImage.cs new file mode 100644 index 0000000..ab6e95c --- /dev/null +++ b/Aaru.CommonTypes/Interfaces/IOpticalMediaImage.cs @@ -0,0 +1,123 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : IOpticalMediaImage.cs +// Author(s) : Natalia Portillo +// +// Component : Disc image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines the interface to be implemented by optical disc image plugins. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System.Collections.Generic; +using Aaru.CommonTypes.Enums; +using Aaru.CommonTypes.Structs; + +namespace Aaru.CommonTypes.Interfaces +{ + /// + /// Abstract class to implement disk image reading plugins. + public interface IOpticalMediaImage : IMediaImage, IPartitionableMediaImage, IVerifiableSectorsImage + { + /// Gets the disc track extents (start, length). + /// The track extents. + List Tracks { get; } + /// Gets the sessions (optical discs only). + /// The sessions. + List Sessions { get; } + + /// Reads a sector's user data, relative to track. + /// The sector's user data. + /// Sector address (relative LBA). + /// Track. + /// + ErrorNumber ReadSector(ulong sectorAddress, uint track, out byte[] buffer); + + /// Reads a sector's tag, relative to track. + /// The sector's tag. + /// Sector address (relative LBA). + /// Track. + /// Tag type. + /// + ErrorNumber ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag, out byte[] buffer); + + /// Reads user data from several sectors, relative to track. + /// The sectors user data. + /// Starting sector address (relative LBA). + /// How many sectors to read. + /// Track. + /// + ErrorNumber ReadSectors(ulong sectorAddress, uint length, uint track, out byte[] buffer); + + /// Reads tag from several sectors, relative to track. + /// The sectors tag. + /// Starting sector address (relative LBA). + /// How many sectors to read. + /// Track. + /// Tag type. + /// + ErrorNumber ReadSectorsTag(ulong sectorAddress, uint length, uint track, SectorTagType tag, out byte[] buffer); + + /// Reads a complete sector (user data + all tags), relative to track. + /// The complete sector. Format depends on disk type. + /// Sector address (relative LBA). + /// Track. + /// + ErrorNumber ReadSectorLong(ulong sectorAddress, uint track, out byte[] buffer); + + /// Reads several complete sector (user data + all tags), relative to track. + /// The complete sectors. Format depends on disk type. + /// Starting sector address (relative LBA). + /// How many sectors to read. + /// Track. + /// + ErrorNumber ReadSectorsLong(ulong sectorAddress, uint length, uint track, out byte[] buffer); + + /// Gets the disc track extents for a specified session. + /// The track extents for that session. + /// Session. + List GetSessionTracks(Session session); + + /// Gets the disc track extents for a specified session. + /// The track extents for that session. + /// Session. + List GetSessionTracks(ushort session); + + /// Verifies several sectors, relative to track. + /// True if all are correct, false if any is incorrect, null if any is uncheckable. + /// Starting sector address (relative LBA). + /// How many sectors to read. + /// Track. + /// List of incorrect sectors + /// List of uncheckable sectors + bool? VerifySectors(ulong sectorAddress, uint length, uint track, out List failingLbas, + out List unknownLbas); + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interfaces/IPartition.cs b/Aaru.CommonTypes/Interfaces/IPartition.cs new file mode 100644 index 0000000..a7cac4e --- /dev/null +++ b/Aaru.CommonTypes/Interfaces/IPartition.cs @@ -0,0 +1,62 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : IPartition.cs +// Author(s) : Natalia Portillo +// +// Component : Partitioning scheme plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines methods to be used by partitioning scheme plugins and several +// constants. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; + +namespace Aaru.CommonTypes.Interfaces +{ + /// Abstract class to implement partitioning schemes interpreting plugins. + public interface IPartition + { + /// Plugin name. + string Name { get; } + /// Plugin UUID. + Guid Id { get; } + /// Plugin author + string Author { get; } + + /// Interprets a partitioning scheme. + /// true, if partitioning scheme is recognized, false otherwise. + /// Disk image. + /// Returns list of partitions. + /// At which sector to start searching for the partition scheme. + bool GetInformation(IMediaImage imagePlugin, out List partitions, ulong sectorOffset); + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interfaces/IPartitionableMediaImage.cs b/Aaru.CommonTypes/Interfaces/IPartitionableMediaImage.cs new file mode 100644 index 0000000..d4bd9be --- /dev/null +++ b/Aaru.CommonTypes/Interfaces/IPartitionableMediaImage.cs @@ -0,0 +1,54 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : IPartitionableMediaImage.cs +// Author(s) : Natalia Portillo +// +// Component : Media image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines the interface to be implemented by image plugins that can +// contain partitioned medias, usually optical discs and some newer tapes. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System.Collections.Generic; + +namespace Aaru.CommonTypes.Interfaces +{ + /// Defines an image that can contain partitions + public interface IPartitionableMediaImage + { + /// + /// Gets an array partitions. Typically only useful for optical disc images where each track and index means a + /// different partition, as reads can be relative to them. + /// + /// The partitions. + List Partitions { get; } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interfaces/IPluginRegister.cs b/Aaru.CommonTypes/Interfaces/IPluginRegister.cs new file mode 100644 index 0000000..f82f9d0 --- /dev/null +++ b/Aaru.CommonTypes/Interfaces/IPluginRegister.cs @@ -0,0 +1,87 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : IPluginsRegister.cs +// Author(s) : Natalia Portillo +// +// Component : Interfaces. +// +// --[ Description ] ---------------------------------------------------------- +// +// Interface that declares class and methods to call to register plugins. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; + +namespace Aaru.CommonTypes.Interfaces +{ + /// Defines a register of all known plugins + public interface IPluginRegister + { + /// Gets all checksum plugins + /// List of checksum plugins + List GetAllChecksumPlugins(); + + /// Gets all filesystem plugins + /// List of filesystem plugins + List GetAllFilesystemPlugins(); + + /// Gets all filter plugins + /// List of filter plugins + List GetAllFilterPlugins(); + + /// Gets all floppy image plugins + /// List of floppy image plugins + List GetAllFloppyImagePlugins(); + + /// Gets all media image plugins + /// List of media image plugins + List GetAllMediaImagePlugins(); + + /// Gets all partition plugins + /// List of partition plugins + List GetAllPartitionPlugins(); + + /// Gets all read-only filesystem plugins + /// List of read-only filesystem plugins + List GetAllReadOnlyFilesystemPlugins(); + + /// Gets all writable floppy image plugins + /// List of writable floppy image plugins + List GetAllWritableFloppyImagePlugins(); + + /// Gets all writable media image plugins + /// List of writable media image plugins + List GetAllWritableImagePlugins(); + + /// Gets all archive plugins + /// List of archive plugins + List GetAllArchivePlugins(); + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interfaces/IReadOnlyFilesystem.cs b/Aaru.CommonTypes/Interfaces/IReadOnlyFilesystem.cs new file mode 100644 index 0000000..72e3275 --- /dev/null +++ b/Aaru.CommonTypes/Interfaces/IReadOnlyFilesystem.cs @@ -0,0 +1,125 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : IReadOnlyFilesystem.cs +// Author(s) : Natalia Portillo +// +// Component : Filesystem plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Interface for filesystem plugins that offer read-only support of their +// contents. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Text; +using Aaru.CommonTypes.Enums; +using Aaru.CommonTypes.Structs; + +namespace Aaru.CommonTypes.Interfaces +{ + /// + /// Defines the interface to implement reading the contents of a filesystem + public interface IReadOnlyFilesystem : IFilesystem + { + /// Retrieves a list of options supported by the filesystem, with name, type and description + IEnumerable<(string name, Type type, string description)> SupportedOptions { get; } + + /// Supported namespaces + Dictionary Namespaces { get; } + + /// + /// Initializes whatever internal structures the filesystem plugin needs to be able to read files and directories + /// from the filesystem. + /// + /// + /// + /// Which encoding to use for this filesystem. + /// Dictionary of key=value pairs containing options to pass to the filesystem + /// Filename namespace + ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, + Dictionary options, string @namespace); + + /// Frees all internal structures created by + ErrorNumber Unmount(); + + /// Maps a filesystem block from a file to a block from the underlying device. + /// Error number. + /// File path. + /// File block. + /// Device block. + ErrorNumber MapBlock(string path, long fileBlock, out long deviceBlock); + + /// Gets the attributes of a file or directory + /// Error number. + /// File path. + /// File attributes. + ErrorNumber GetAttributes(string path, out FileAttributes attributes); + + /// Lists all extended attributes, alternate data streams and forks of the given file. + /// Error number. + /// Path. + /// List of extended attributes, alternate data streams and forks. + ErrorNumber ListXAttr(string path, out List xattrs); + + /// Reads an extended attribute, alternate data stream or fork from the given file. + /// Error number. + /// File path. + /// Extended attribute, alternate data stream or fork name. + /// Buffer. + ErrorNumber GetXattr(string path, string xattr, ref byte[] buf); + + /// Reads data from a file (main/only data stream or data fork). + /// File path. + /// Offset. + /// Bytes to read. + /// Buffer. + ErrorNumber Read(string path, long offset, long size, ref byte[] buf); + + /// Lists contents from a directory. + /// Directory path. + /// Directory contents. + ErrorNumber ReadDir(string path, out List contents); + + /// Gets information about the mounted volume. + /// Information about the mounted volume. + ErrorNumber StatFs(out FileSystemInfo stat); + + /// Gets information about a file or directory. + /// File path. + /// File information. + ErrorNumber Stat(string path, out FileEntryInfo stat); + + /// Solves a symbolic link. + /// Link path. + /// Link destination. + ErrorNumber ReadLink(string path, out string dest); + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interfaces/ITapeImage.cs b/Aaru.CommonTypes/Interfaces/ITapeImage.cs new file mode 100644 index 0000000..055fb54 --- /dev/null +++ b/Aaru.CommonTypes/Interfaces/ITapeImage.cs @@ -0,0 +1,56 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : ITapeImage.cs +// Author(s) : Natalia Portillo +// +// Component : Disc image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines the interface to be implemented by block addressable sequential +// tape image plugins. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System.Collections.Generic; +using Aaru.CommonTypes.Structs; + +namespace Aaru.CommonTypes.Interfaces +{ + /// + /// Defines an image that can store the information from streaming, digital, tapes + public interface ITapeImage : IMediaImage + { + /// Gets a list of all the files registered in the image + List Files { get; } + /// Gets a list of all the partitions registered in the image + List TapePartitions { get; } + /// If the media is a really a tape, as some formats can store non-tapes + bool IsTape { get; } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interfaces/IVerifiableImage.cs b/Aaru.CommonTypes/Interfaces/IVerifiableImage.cs new file mode 100644 index 0000000..028f8db --- /dev/null +++ b/Aaru.CommonTypes/Interfaces/IVerifiableImage.cs @@ -0,0 +1,49 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : IVerifiableImage.cs +// Author(s) : Natalia Portillo +// +// Component : Disc image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines interface to be implemented by image plugins that can verify the +// image itself. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +namespace Aaru.CommonTypes.Interfaces +{ + /// Defines an image that can verify the integrity of the image itself, but not its contents + public interface IVerifiableImage + { + /// Verifies media image internal checksum. + /// True if correct, false if incorrect, null if there is no internal checksum available + bool? VerifyMediaImage(); + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interfaces/IVerifiableSectorsImage.cs b/Aaru.CommonTypes/Interfaces/IVerifiableSectorsImage.cs new file mode 100644 index 0000000..049137f --- /dev/null +++ b/Aaru.CommonTypes/Interfaces/IVerifiableSectorsImage.cs @@ -0,0 +1,60 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : IVerifiableSectorsImage.cs +// Author(s) : Natalia Portillo +// +// Component : Disc image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines interface to be implemented by image plugins that can verify the +// sectors contained in the image. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System.Collections.Generic; + +namespace Aaru.CommonTypes.Interfaces +{ + /// Defines an image that can verify the integrity of the sectors it contains + public interface IVerifiableSectorsImage + { + /// Verifies a sector. + /// True if correct, false if incorrect, null if uncheckable. + /// Sector address (LBA). + bool? VerifySector(ulong sectorAddress); + + /// Verifies several sectors. + /// True if all are correct, false if any is incorrect, null if any is uncheckable. + /// Starting sector address (LBA). + /// How many sectors to read. + /// List of incorrect sectors + /// List of uncheckable sectors + bool? VerifySectors(ulong sectorAddress, uint length, out List failingLbas, out List unknownLbas); + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interfaces/IWritableFloppyImage.cs b/Aaru.CommonTypes/Interfaces/IWritableFloppyImage.cs new file mode 100644 index 0000000..b4872ae --- /dev/null +++ b/Aaru.CommonTypes/Interfaces/IWritableFloppyImage.cs @@ -0,0 +1,97 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : IFloppyImage.cs +// Author(s) : Natalia Portillo +// +// Component : Disc image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines the interface to be implemented by floppy image plugins. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using Aaru.CommonTypes.Enums; +using Aaru.CommonTypes.Structs; + +namespace Aaru.CommonTypes.Interfaces +{ + /// + /// + /// Abstract class to implement disk image reading plugins that can contain floppy images. This interface is + /// needed because floppy formatting characteristics are not necessarily compatible with the whole LBA-oriented + /// interface defined by . All data expected by these methods + /// is already decoded from its corresponding bitstream. + /// + public interface IWritableFloppyImage : IFloppyImage, IWritableImage + { + /// + /// Indicates the image plugin the floppy physical characteristics and must be called before following methods are + /// called. Once this is called, LBA-based methods should not be used. + /// + /// + /// Floppy info, contains information about physical characteristics of floppy, like size, bitrate, + /// track density, etc... + /// + /// true if operating completed successfully, false otherwise + bool SetFloppyCharacteristics(FloppyInfo info); + + /// Writes a sector's user data. + /// + /// If is one of the duplicates. If + /// is , , + /// it will be ignored. Otherwise, whatever data should be in the sector. + /// + /// Physical track (position of the heads over the floppy media, 0-based). + /// Physical head (0-based). + /// Logical sector ID. + /// Status of sector. + /// true if operating completed successfully, false otherwise + bool WriteSector(byte[] data, ushort track, byte head, ushort sector, FloppySectorStatus status); + + /// Writes a whole track, including all gaps, address marks, sectors data, etc. + /// The track data. + /// Physical track (position of the heads over the floppy media, 0-based). + /// Physical head (0-based). + /// true if operating completed successfully, false otherwise + bool WriteTrack(byte[] data, ushort track, byte head); + + /// Writes a sector's data including all tags, address mark, and so, in a format dependent of represented media. + /// + /// If is one of the duplicates. If + /// is , , + /// it will be ignored. Otherwise, whatever data should be in the sector. + /// + /// Physical track (position of the heads over the floppy media, 0-based). + /// Physical head (0-based). + /// Logical sector ID. + /// Status of request. + /// true if operating completed successfully, false otherwise + bool WriteSectorLong(byte[] data, ushort track, byte head, ushort sector, out FloppySectorStatus status); + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interfaces/IWritableImage.cs b/Aaru.CommonTypes/Interfaces/IWritableImage.cs new file mode 100644 index 0000000..f4be123 --- /dev/null +++ b/Aaru.CommonTypes/Interfaces/IWritableImage.cs @@ -0,0 +1,154 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : IWritableImage.cs +// Author(s) : Natalia Portillo +// +// Component : Disc image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines the interface to be implemented by writable image plugins. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using Aaru.CommonTypes.Enums; +using Aaru.CommonTypes.Structs; +using Schemas; + +namespace Aaru.CommonTypes.Interfaces +{ + /// + /// + /// Abstract class to implement disk image writing plugins. TODO: This interface is subject to change until + /// notice. + /// + public interface IWritableImage : IMediaImage + { + /// Gets a list of that are supported by the media image format + IEnumerable SupportedMediaTags { get; } + /// Gets a list of that are supported by the media image format + IEnumerable SupportedSectorTags { get; } + /// Gets a list of that are supported by the media image format + IEnumerable SupportedMediaTypes { get; } + /// Retrieves a list of options supported by the filesystem, with name, type and description + IEnumerable<(string name, Type type, string description, object @default)> SupportedOptions { get; } + /// Gets a list of known extensions for format auto-choosing + IEnumerable KnownExtensions { get; } + + /// If set to true means the image is opened for writing + bool IsWriting { get; } + /// Contains a description of the last error + string ErrorMessage { get; } + + /// + /// Creates a new image in the specified path, for the specified , with the specified + /// options to hold a media with the specified number of sectors + /// + /// Path to the new image, with extension + /// that will be written in the image + /// Options to be used when creating new image + /// How many sectors the media has. + /// + /// true if operating completed successfully, false otherwise + bool Create(string path, MediaType mediaType, Dictionary options, ulong sectors, + uint sectorSize); + + /// Writes a media tag to the image + /// Media tag + /// + /// + /// + /// true if operating completed successfully, false otherwise + bool WriteMediaTag(byte[] data, MediaTagType tag); + + /// Writes a sector to the image + /// Sector data + /// Sector address + /// true if operating completed successfully, false otherwise + bool WriteSector(byte[] data, ulong sectorAddress); + + /// Writes several sectors to the image + /// Sectors data + /// Sector starting address + /// How many sectors to write + /// true if operating completed successfully, false otherwise + bool WriteSectors(byte[] data, ulong sectorAddress, uint length); + + /// Writes a sector to the image with main channel tags attached + /// Sector data with its main channel tags attached + /// Sector address + /// true if operating completed successfully, false otherwise + bool WriteSectorLong(byte[] data, ulong sectorAddress); + + /// Writes several sectors to the image + /// Sector data with their main channel tags attached + /// Sector starting address + /// How many sectors to write + /// true if operating completed successfully, false otherwise + bool WriteSectorsLong(byte[] data, ulong sectorAddress, uint length); + + /// Closes and flushes to disk the image + /// true if operating completed successfully, false otherwise + bool Close(); + + /// Sets image metadata + /// containing image metadata + /// true if operating completed successfully, false otherwise + bool SetMetadata(ImageInfo metadata); + + /// Sets media geometry + /// Cylinders + /// Heads + /// Sectors per track + /// true if operating completed successfully, false otherwise + bool SetGeometry(uint cylinders, uint heads, uint sectorsPerTrack); + + /// Writes parallel or subchannel sector tag for one sector + /// Tag data to write + /// Sector address + /// Tag type + /// true if operating completed successfully, false otherwise + bool WriteSectorTag(byte[] data, ulong sectorAddress, SectorTagType tag); + + /// Writes parallel or subchannel sector tag for several sector + /// Tag data to write + /// Starting sector address + /// How many sectors to write + /// Tag type + /// true if operating completed successfully, false otherwise + bool WriteSectorsTag(byte[] data, ulong sectorAddress, uint length, SectorTagType tag); + + /// Sets the list of dump hardware used to create the image from real media + bool SetDumpHardware(List dumpHardware); + + /// Sets the CICM XML metadata for the image + bool SetCicmMetadata(CICMMetadataType metadata); + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interfaces/IWritableOpticalImage.cs b/Aaru.CommonTypes/Interfaces/IWritableOpticalImage.cs new file mode 100644 index 0000000..6318534 --- /dev/null +++ b/Aaru.CommonTypes/Interfaces/IWritableOpticalImage.cs @@ -0,0 +1,56 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : IWritableOpticalImage.cs +// Author(s) : Natalia Portillo +// +// Component : Disc image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines the interface to be implemented by writable image plugins. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System.Collections.Generic; +using Aaru.CommonTypes.Enums; +using Aaru.CommonTypes.Structs; + +namespace Aaru.CommonTypes.Interfaces +{ + /// Defines an image that is writable and can store an optical disc (CD, DVD, etc) + public interface IWritableOpticalImage : IWritableImage, IOpticalMediaImage + { + /// Image format capabilities + OpticalImageCapabilities OpticalCapabilities { get; } + + /// Sets tracks for optical media + /// List of tracks + /// true if operating completed successfully, false otherwise + bool SetTracks(List tracks); + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interfaces/IWritableTapeImage.cs b/Aaru.CommonTypes/Interfaces/IWritableTapeImage.cs new file mode 100644 index 0000000..ee9f300 --- /dev/null +++ b/Aaru.CommonTypes/Interfaces/IWritableTapeImage.cs @@ -0,0 +1,64 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : IWritableTapeImage.cs +// Author(s) : Natalia Portillo +// +// Component : Disc image plugins. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines the interface to be implemented by writable block addressable +// sequential tape image plugins. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using Aaru.CommonTypes.Structs; + +namespace Aaru.CommonTypes.Interfaces +{ + /// Defines an image that is writable and can store information about a streaming, digital, tape + public interface IWritableTapeImage : ITapeImage, IWritableImage + { + /// Registers a new file in the image + /// Tape file descriptor + /// true if successful, false otherwise + bool AddFile(TapeFile file); + + /// Registers a new partition + /// Tape partition descriptor + /// true if successful, false otherwise + bool AddPartition(TapePartition partition); + + /// + /// Tells the image plugin to set the internal structures to expect a tape (e.g. unknown block count and size). + /// Must be called before + /// + /// true if successful, false otherwise + bool SetTape(); + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interop/DetectOS.cs b/Aaru.CommonTypes/Interop/DetectOS.cs new file mode 100644 index 0000000..27e933f --- /dev/null +++ b/Aaru.CommonTypes/Interop/DetectOS.cs @@ -0,0 +1,390 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : DetectOS.cs +// Author(s) : Natalia Portillo +// +// Component : Interop services. +// +// --[ Description ] ---------------------------------------------------------- +// +// Detects underlying operating system. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Diagnostics; +using System.IO; +using System.Runtime.InteropServices; +using System.Security.Principal; + +namespace Aaru.CommonTypes.Interop +{ + /// Detects the underlying execution framework and operating system + public static class DetectOS + { + /// Are we running under Mono? + public static readonly bool IsMono = + RuntimeInformation.FrameworkDescription.StartsWith("Mono", StringComparison.Ordinal); + /// Are we running under .NET Framework? + public static readonly bool IsNetFramework = + RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.Ordinal); + /// Are we running under .NET Core? + public static readonly bool IsNetCore = + RuntimeInformation.FrameworkDescription.StartsWith(".NET Core", StringComparison.Ordinal); + /// Are we running under .NET Native? + public static readonly bool IsNetNative = + RuntimeInformation.FrameworkDescription.StartsWith(".NET Native", StringComparison.Ordinal); + + /// Checks if the underlying runtime runs in 64-bit mode + public static readonly bool Is64Bit = IntPtr.Size == 8; + + /// Checks if the underlying runtime runs in 32-bit mode + public static readonly bool Is32Bit = IntPtr.Size == 4; + + /// Are we running under Windows? + public static bool IsWindows => GetRealPlatformID() == PlatformID.Win32NT || + GetRealPlatformID() == PlatformID.Win32S || + GetRealPlatformID() == PlatformID.Win32Windows || + GetRealPlatformID() == PlatformID.WinCE || + GetRealPlatformID() == PlatformID.WindowsPhone || + GetRealPlatformID() == PlatformID.Xbox; + + /// Are we running with administrative (root) privileges? + public static bool IsAdmin + { + get + { + if(!IsWindows) + return Environment.UserName == "root"; + + bool isAdmin; + WindowsIdentity user = null; + + try + { + user = WindowsIdentity.GetCurrent(); + var principal = new WindowsPrincipal(user); + isAdmin = principal.IsInRole(WindowsBuiltInRole.Administrator); + } + catch(UnauthorizedAccessException) + { + isAdmin = false; + } + catch(Exception) + { + isAdmin = false; + } + finally + { + user?.Dispose(); + } + + return isAdmin; + } + } + + [DllImport("libc", SetLastError = true)] + static extern int uname(out utsname name); + + [DllImport("libc", SetLastError = true, EntryPoint = "sysctlbyname", CharSet = CharSet.Ansi)] + static extern int OSX_sysctlbyname(string name, IntPtr oldp, IntPtr oldlenp, IntPtr newp, uint newlen); + + /// Gets the real platform ID, not the incomplete .NET framework one + /// Platform ID + /// Unhandled exception + public static PlatformID GetRealPlatformID() + { + if((int)Environment.OSVersion.Platform < 4 || + (int)Environment.OSVersion.Platform == 5) + return (PlatformID)(int)Environment.OSVersion.Platform; + + int error = uname(out utsname unixname); + + if(error != 0) + throw new Exception($"Unhandled exception calling uname: {Marshal.GetLastWin32Error()}"); + + switch(unixname.sysname) + { + // TODO: Differentiate Linux, Android, Tizen + case "Linux": + { + #if __ANDROID__ + return PlatformID.Android; + #else + return PlatformID.Linux; + #endif + } + + case "Darwin": + { + IntPtr pLen = Marshal.AllocHGlobal(sizeof(int)); + int osxError = OSX_sysctlbyname("hw.machine", IntPtr.Zero, pLen, IntPtr.Zero, 0); + + if(osxError != 0) + { + Marshal.FreeHGlobal(pLen); + + throw new Exception($"Unhandled exception calling uname: {Marshal.GetLastWin32Error()}"); + } + + int length = Marshal.ReadInt32(pLen); + IntPtr pStr = Marshal.AllocHGlobal(length); + osxError = OSX_sysctlbyname("hw.machine", pStr, pLen, IntPtr.Zero, 0); + + if(osxError != 0) + { + Marshal.FreeHGlobal(pStr); + Marshal.FreeHGlobal(pLen); + + throw new Exception($"Unhandled exception calling uname: {Marshal.GetLastWin32Error()}"); + } + + string machine = Marshal.PtrToStringAnsi(pStr); + + Marshal.FreeHGlobal(pStr); + Marshal.FreeHGlobal(pLen); + + if(machine != null && + (machine.StartsWith("iPad", StringComparison.Ordinal) || + machine.StartsWith("iPod", StringComparison.Ordinal) || + machine.StartsWith("iPhone", StringComparison.Ordinal))) + return PlatformID.iOS; + + return PlatformID.MacOSX; + } + + case "GNU": return PlatformID.Hurd; + case "FreeBSD": + case "GNU/kFreeBSD": return PlatformID.FreeBSD; + case "DragonFly": return PlatformID.DragonFly; + case "Haiku": return PlatformID.Haiku; + case "HP-UX": return PlatformID.HPUX; + case "AIX": return PlatformID.AIX; + case "OS400": return PlatformID.OS400; + case "IRIX": + case "IRIX64": return PlatformID.IRIX; + case "Minix": return PlatformID.Minix; + case "NetBSD": return PlatformID.NetBSD; + case "NONSTOP_KERNEL": return PlatformID.NonStop; + case "OpenBSD": return PlatformID.OpenBSD; + case "QNX": return PlatformID.QNX; + case "SINIX-Y": return PlatformID.SINIX; + case "SunOS": return PlatformID.Solaris; + case "OSF1": return PlatformID.Tru64; + case "ULTRIX": return PlatformID.Ultrix; + case "SCO_SV": return PlatformID.OpenServer; + case "UnixWare": return PlatformID.UnixWare; + case "Interix": + case "UWIN-W7": return PlatformID.Win32NT; + default: + { + if(unixname.sysname.StartsWith("CYGWIN_NT", StringComparison.Ordinal) || + unixname.sysname.StartsWith("MINGW32_NT", StringComparison.Ordinal) || + unixname.sysname.StartsWith("MSYS_NT", StringComparison.Ordinal) || + unixname.sysname.StartsWith("UWIN", StringComparison.Ordinal)) + return PlatformID.Win32NT; + + return PlatformID.Unknown; + } + } + } + + /// Gets a string for the current operating system REAL version (handles Darwin 1.4 and Windows 10 falsifying) + /// Current operating system version + public static string GetVersion() + { + string environ = Environment.OSVersion.Version.ToString(); + + switch(GetRealPlatformID()) + { + case PlatformID.MacOSX: + if(Environment.OSVersion.Version.Major != 1) + return $"10.{Environment.OSVersion.Version.Major - 4}.{Environment.OSVersion.Version.Minor}"; + + switch(Environment.OSVersion.Version.Minor) + { + case 3: return "10.0"; + case 4: return "10.1"; + } + + goto default; + case PlatformID.Win32NT: + // From Windows 8.1 the reported version is simply falsified... + if((Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Major >= 2) || + Environment.OSVersion.Version.Major > 6) + return FileVersionInfo. + GetVersionInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), + "KERNEL32.DLL")).ProductVersion; + + return environ; + default: return environ; + } + } + + /// From a platform ID and version returns a human-readable version + /// Platform ID + /// Version number + /// Operating system name + public static string GetPlatformName(PlatformID id, string version = null) + { + switch(id) + { + case PlatformID.AIX: return "AIX"; + case PlatformID.Android: return "Android"; + case PlatformID.DragonFly: return "DragonFly BSD"; + case PlatformID.FreeBSD: return "FreeBSD"; + case PlatformID.Haiku: return "Haiku"; + case PlatformID.HPUX: return "HP/UX"; + case PlatformID.Hurd: return "Hurd"; + case PlatformID.iOS: return "iOS"; + case PlatformID.IRIX: return "IRIX"; + case PlatformID.Linux: + if(!File.Exists("/proc/version")) + return "Linux"; + + string s = File.ReadAllText("/proc/version"); + + return s.Contains("Microsoft") || s.Contains("WSL") ? "Windows Subsystem for Linux" : "Linux"; + + case PlatformID.MacOSX: + if(string.IsNullOrEmpty(version)) + return "macOS"; + + string[] pieces = version.Split('.'); + + if(pieces.Length < 2 || + !int.TryParse(pieces[1], out int minor)) + return "macOS"; + + if(minor >= 12) + return "macOS"; + + if(minor >= 8) + return "OS X"; + + return "Mac OS X"; + + case PlatformID.Minix: return "MINIX"; + case PlatformID.NetBSD: return "NetBSD"; + case PlatformID.NonStop: return "NonStop OS"; + case PlatformID.OpenBSD: return "OpenBSD"; + case PlatformID.OpenServer: return "SCO OpenServer"; + case PlatformID.OS400: return "OS/400"; + case PlatformID.PlayStation3: return "Sony CellOS"; + case PlatformID.PlayStation4: return "Sony Orbis OS"; + case PlatformID.QNX: return "QNX"; + case PlatformID.SINIX: return "SINIX"; + case PlatformID.Solaris: return "Sun Solaris"; + case PlatformID.Tizen: return "Samsung Tizen"; + case PlatformID.Tru64: return "Tru64 UNIX"; + case PlatformID.Ultrix: return "Ultrix"; + case PlatformID.Unix: return "UNIX"; + case PlatformID.UnixWare: return "SCO UnixWare"; + case PlatformID.Wii: return "Nintendo Wii"; + case PlatformID.WiiU: return "Nintendo Wii U"; + case PlatformID.Win32NT: + if(string.IsNullOrEmpty(version)) + return "Windows NT/2000/XP/Vista/7/10"; + + if(version.StartsWith("3.", StringComparison.Ordinal) || + version.StartsWith("4.", StringComparison.Ordinal)) + return "Windows NT"; + + if(version.StartsWith("5.0", StringComparison.Ordinal)) + return "Windows 2000"; + + if(version.StartsWith("5.1", StringComparison.Ordinal)) + return "Windows XP"; + + if(version.StartsWith("5.2", StringComparison.Ordinal)) + return "Windows 2003"; + + if(version.StartsWith("6.0", StringComparison.Ordinal)) + return "Windows Vista"; + + if(version.StartsWith("6.1", StringComparison.Ordinal)) + return "Windows 7"; + + if(version.StartsWith("6.2", StringComparison.Ordinal)) + return "Windows 8"; + + if(version.StartsWith("6.3", StringComparison.Ordinal)) + return "Windows 8.1"; + + if(version.StartsWith("10.0", StringComparison.Ordinal)) + return "Windows 10"; + + return "Windows NT/2000/XP/Vista/7/10"; + case PlatformID.Win32S: return "Windows 3.x with win32s"; + case PlatformID.Win32Windows: + if(string.IsNullOrEmpty(version)) + return "Windows 9x/Me"; + + if(version.StartsWith("4.0", StringComparison.Ordinal)) + return "Windows 95"; + + if(version.StartsWith("4.10.2222", StringComparison.Ordinal)) + return "Windows 98 SE"; + + if(version.StartsWith("4.1", StringComparison.Ordinal)) + return "Windows 98"; + + if(version.StartsWith("4.9", StringComparison.Ordinal)) + return "Windows Me"; + + return "Windows 9x/Me"; + case PlatformID.WinCE: return "Windows CE/Mobile"; + case PlatformID.WindowsPhone: return "Windows Phone"; + case PlatformID.Xbox: return "Xbox OS"; + case PlatformID.zOS: return "z/OS"; + default: return id.ToString(); + } + } + + /// POSIX uname structure, size from OSX, big enough to handle extra fields + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] + struct utsname + { + /// System name + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public readonly string sysname; + /// Node name + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public readonly string nodename; + /// Release level + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public readonly string release; + /// Version level + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public readonly string version; + /// Hardware level + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public readonly string machine; + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interop/PlatformID.cs b/Aaru.CommonTypes/Interop/PlatformID.cs new file mode 100644 index 0000000..ed76eb3 --- /dev/null +++ b/Aaru.CommonTypes/Interop/PlatformID.cs @@ -0,0 +1,122 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : PlatformID.cs +// Author(s) : Natalia Portillo +// +// Component : Interop services. +// +// --[ Description ] ---------------------------------------------------------- +// +// Contains an enhanced PlatformID enumeration. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System.Diagnostics.CodeAnalysis; + +namespace Aaru.CommonTypes.Interop +{ + /// Contains an arbitrary list of OSes, even if .NET does not run on them + [SuppressMessage("ReSharper", "InconsistentNaming")] + public enum PlatformID + { + /// Win32s + Win32S = 0, + /// Win32 (Windows 9x) + Win32Windows = 1, + /// Windows NT + Win32NT = 2, + /// Windows Mobile + WinCE = 3, + /// UNIX (do not use, too generic) + Unix = 4, + /// Xbox 360 + Xbox = 5, + /// OS X + MacOSX = 6, + /// iOS is not OS X + iOS = 7, + /// Linux + Linux = 8, + /// Sun Solaris + Solaris = 9, + /// NetBSD + NetBSD = 10, + /// OpenBSD + OpenBSD = 11, + /// FreeBSD + FreeBSD = 12, + /// DragonFly BSD + DragonFly = 13, + /// Nintendo Wii + Wii = 14, + /// Nintendo Wii U + WiiU = 15, + /// Sony PlayStation 3 + PlayStation3 = 16, + /// Sony Playstation 4 + PlayStation4 = 17, + /// Google Android + Android = 18, + /// Samsung Tizen + Tizen = 19, + /// Windows Phone + WindowsPhone = 20, + /// GNU/Hurd + Hurd = 21, + /// Haiku + Haiku = 22, + /// HP-UX + HPUX = 23, + /// AIX + AIX = 24, + /// OS/400 + OS400 = 25, + /// IRIX + IRIX = 26, + /// Minix + Minix = 27, + /// NonStop + NonStop = 28, + /// QNX + QNX = 29, + /// SINIX + SINIX = 30, + /// Tru64 UNIX + Tru64 = 31, + /// Ultrix + Ultrix = 32, + /// SCO OpenServer / SCO UNIX + OpenServer = 33, + /// SCO UnixWare + UnixWare = 34, + /// IBM z/OS + zOS = 35, + /// Unknown + Unknown = -1 + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Interop/Version.cs b/Aaru.CommonTypes/Interop/Version.cs new file mode 100644 index 0000000..5182028 --- /dev/null +++ b/Aaru.CommonTypes/Interop/Version.cs @@ -0,0 +1,91 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Version.cs +// Author(s) : Natalia Portillo +// +// Component : Interop services. +// +// --[ Description ] ---------------------------------------------------------- +// +// Returns Aaru version. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Reflection; +using System.Runtime; + +namespace Aaru.CommonTypes.Interop +{ + /// Gets our own, or the runtime's version + public static class Version + { + /// Gets version string + /// Version + public static string GetVersion() => typeof(Version).Assembly.GetName().Version?.ToString(); + + /// Gets .NET Core version + /// Version + public static string GetNetCoreVersion() + { + Assembly assembly = typeof(GCSettings).Assembly; + + string[] assemblyPath = assembly.CodeBase?.Split(new[] + { + '/', '\\' + }, StringSplitOptions.RemoveEmptyEntries); + + if(assemblyPath is null) + return null; + + int netCoreAppIndex = Array.IndexOf(assemblyPath, "Microsoft.NETCore.App"); + + if(netCoreAppIndex > 0 && + netCoreAppIndex < assemblyPath.Length - 2) + return assemblyPath[netCoreAppIndex + 1]; + + return null; + } + + /// Gets Mono version + /// Version + public static string GetMonoVersion() + { + if(!DetectOS.IsMono) + return null; + + MethodInfo monoDisplayName = Type.GetType("Mono.Runtime")?. + GetMethod("GetDisplayName", BindingFlags.NonPublic | BindingFlags.Static); + + if(monoDisplayName != null) + return (string)monoDisplayName.Invoke(null, null); + + return null; + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/MediaType.cs b/Aaru.CommonTypes/MediaType.cs new file mode 100644 index 0000000..2510db0 --- /dev/null +++ b/Aaru.CommonTypes/MediaType.cs @@ -0,0 +1,1034 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : MediaType.cs +// Author(s) : Natalia Portillo +// +// Component : Aaru common types. +// +// --[ Description ] ---------------------------------------------------------- +// +// Contains common media types. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +// ReSharper disable InconsistentNaming +// TODO: Rename contents + +using System; + +#pragma warning disable 1591 + +// ReSharper disable UnusedMember.Global +// ReSharper disable IdentifierTypo + +namespace Aaru.CommonTypes +{ + public enum MediaEncoding + { + Unknown, FM, MFM, + M2FM, AppleGCR, CommodoreGCR + } + + /// Contains an enumeration of all known types of media. + public enum MediaType : uint + { + #region Generics, types 0 to 9 + /// Unknown disk type + Unknown = 0, + /// Unknown magneto-optical + UnknownMO = 1, + /// Generic hard disk + GENERIC_HDD = 2, + /// Microdrive type hard disk + Microdrive = 3, + /// Zoned hard disk + Zone_HDD = 4, + /// USB flash drives + FlashDrive = 5, + /// Unknown data tape + UnknownTape = 6, + #endregion Generics, types 0 to 9 + + #region Somewhat standard Compact Disc formats, types 10 to 39 + /// Any unknown or standard violating CD + CD = 10, + /// CD Digital Audio (Red Book) + CDDA = 11, + /// CD+G (Red Book) + CDG = 12, + /// CD+EG (Red Book) + CDEG = 13, + /// CD-i (Green Book) + CDI = 14, + /// CD-ROM (Yellow Book) + CDROM = 15, + /// CD-ROM XA (Yellow Book) + CDROMXA = 16, + /// CD+ (Blue Book) + CDPLUS = 17, + /// CD-MO (Orange Book) + CDMO = 18, + /// CD-Recordable (Orange Book) + CDR = 19, + /// CD-ReWritable (Orange Book) + CDRW = 20, + /// Mount-Rainier CD-RW + CDMRW = 21, + /// Video CD (White Book) + VCD = 22, + /// Super Video CD (White Book) + SVCD = 23, + /// Photo CD (Beige Book) + PCD = 24, + /// Super Audio CD (Scarlet Book) + SACD = 25, + /// Double-Density CD-ROM (Purple Book) + DDCD = 26, + /// DD CD-R (Purple Book) + DDCDR = 27, + /// DD CD-RW (Purple Book) + DDCDRW = 28, + /// DTS audio CD (non-standard) + DTSCD = 29, + /// CD-MIDI (Red Book) + CDMIDI = 30, + /// CD-Video (ISO/IEC 61104) + CDV = 31, + /// 120mm, Phase-Change, 1298496 sectors, 512 bytes/sector, PD650, ECMA-240, ISO 15485 + PD650 = 32, + /// 120mm, Write-Once, 1281856 sectors, 512 bytes/sector, PD650, ECMA-240, ISO 15485 + PD650_WORM = 33, + /// + /// CD-i Ready, contains a track before the first TOC track, in mode 2, and all TOC tracks are Audio. Subchannel + /// marks track as audio pause. + /// + CDIREADY = 34, FMTOWNS = 35, + #endregion Somewhat standard Compact Disc formats, types 10 to 39 + + #region Standard DVD formats, types 40 to 50 + /// DVD-ROM (applies to DVD Video and DVD Audio) + DVDROM = 40, + /// DVD-R + DVDR = 41, + /// DVD-RW + DVDRW = 42, + /// DVD+R + DVDPR = 43, + /// DVD+RW + DVDPRW = 44, + /// DVD+RW DL + DVDPRWDL = 45, + /// DVD-R DL + DVDRDL = 46, + /// DVD+R DL + DVDPRDL = 47, + /// DVD-RAM + DVDRAM = 48, + /// DVD-RW DL + DVDRWDL = 49, + /// DVD-Download + DVDDownload = 50, + #endregion Standard DVD formats, types 40 to 50 + + #region Standard HD-DVD formats, types 51 to 59 + /// HD DVD-ROM (applies to HD DVD Video) + HDDVDROM = 51, + /// HD DVD-RAM + HDDVDRAM = 52, + /// HD DVD-R + HDDVDR = 53, + /// HD DVD-RW + HDDVDRW = 54, + /// HD DVD-R DL + HDDVDRDL = 55, + /// HD DVD-RW DL + HDDVDRWDL = 56, + #endregion Standard HD-DVD formats, types 51 to 59 + + #region Standard Blu-ray formats, types 60 to 69 + /// BD-ROM (and BD Video) + BDROM = 60, + /// BD-R + BDR = 61, + /// BD-RE + BDRE = 62, + /// BD-R XL + BDRXL = 63, + /// BD-RE XL + BDREXL = 64, + /// Ultra HD Blu-ray + UHDBD = 65, + #endregion Standard Blu-ray formats, types 60 to 69 + + #region Rare or uncommon optical standards, types 70 to 79 + /// Enhanced Versatile Disc + EVD = 70, + /// Forward Versatile Disc + FVD = 71, + /// Holographic Versatile Disc + HVD = 72, + /// China Blue High Definition + CBHD = 73, + /// High Definition Versatile Multilayer Disc + HDVMD = 74, + /// Versatile Compact Disc High Density + VCDHD = 75, + /// Stacked Volumetric Optical Disc + SVOD = 76, + /// Five Dimensional disc + FDDVD = 77, + /// China Video Disc + CVD = 78, + #endregion Rare or uncommon optical standards, types 70 to 79 + + #region LaserDisc based, types 80 to 89 + /// Pioneer LaserDisc + LD = 80, + /// Pioneer LaserDisc data + LDROM = 81, LDROM2 = 82, LVROM = 83, MegaLD = 84, + #endregion LaserDisc based, types 80 to 89 + + #region MiniDisc based, types 90 to 99 + /// Sony Hi-MD + HiMD = 90, + /// Sony MiniDisc + MD = 91, + /// Sony MD-Data + MDData = 92, + /// Sony MD-Data2 + MDData2 = 93, + /// Sony MiniDisc, 60 minutes, formatted with Hi-MD format + MD60 = 94, + /// Sony MiniDisc, 74 minutes, formatted with Hi-MD format + MD74 = 95, + /// Sony MiniDisc, 80 minutes, formatted with Hi-MD format + MD80 = 96, + #endregion MiniDisc based, types 90 to 99 + + #region Plasmon UDO, types 100 to 109 + /// 5.25", Phase-Change, 1834348 sectors, 8192 bytes/sector, Ultra Density Optical, ECMA-350, ISO 17345 + UDO = 100, + /// 5.25", Phase-Change, 3669724 sectors, 8192 bytes/sector, Ultra Density Optical 2, ECMA-380, ISO 11976 + UDO2 = 101, + /// 5.25", Write-Once, 3668759 sectors, 8192 bytes/sector, Ultra Density Optical 2, ECMA-380, ISO 11976 + UDO2_WORM = 102, + #endregion Plasmon UDO, types 100 to 109 + + #region Sony game media, types 110 to 129 + PlayStationMemoryCard = 110, PlayStationMemoryCard2 = 111, + /// Sony PlayStation game CD + PS1CD = 112, + /// Sony PlayStation 2 game CD + PS2CD = 113, + /// Sony PlayStation 2 game DVD + PS2DVD = 114, + /// Sony PlayStation 3 game DVD + PS3DVD = 115, + /// Sony PlayStation 3 game Blu-ray + PS3BD = 116, + /// Sony PlayStation 4 game Blu-ray + PS4BD = 117, + /// Sony PlayStation Portable Universal Media Disc (ECMA-365) + UMD = 118, PlayStationVitaGameCard = 119, + /// Sony PlayStation 5 game Ultra HD Blu-ray + PS5BD = 120, + #endregion Sony game media, types 110 to 129 + + #region Microsoft game media, types 130 to 149 + /// Microsoft X-box Game Disc + XGD = 130, + /// Microsoft X-box 360 Game Disc + XGD2 = 131, + /// Microsoft X-box 360 Game Disc + XGD3 = 132, + /// Microsoft X-box One Game Disc + XGD4 = 133, + #endregion Microsoft game media, types 130 to 149 + + #region Sega game media, types 150 to 169 + /// Sega MegaCD + MEGACD = 150, + /// Sega Saturn disc + SATURNCD = 151, + /// Sega/Yamaha Gigabyte Disc + GDROM = 152, + /// Sega/Yamaha recordable Gigabyte Disc + GDR = 153, SegaCard = 154, MilCD = 155, + #endregion Sega game media, types 150 to 169 + + #region Other game media, types 170 to 179 + /// PC-Engine / TurboGrafx cartridge + HuCard = 170, + /// PC-Engine / TurboGrafx CD + SuperCDROM2 = 171, + /// Atari Jaguar CD + JaguarCD = 172, + /// 3DO CD + ThreeDO = 173, + /// NEC PC-FX + PCFX = 174, + /// NEO-GEO CD + NeoGeoCD = 175, + /// Commodore CDTV + CDTV = 176, + /// Amiga CD32 + CD32 = 177, + /// Nuon (DVD based videogame console) + Nuon = 178, + /// Bandai Playdia + Playdia = 179, + #endregion Other game media, types 170 to 179 + + #region Apple standard floppy format, types 180 to 189 + /// 5.25", SS, DD, 35 tracks, 13 spt, 256 bytes/sector, GCR + Apple32SS = 180, + /// 5.25", DS, DD, 35 tracks, 13 spt, 256 bytes/sector, GCR + Apple32DS = 181, + /// 5.25", SS, DD, 35 tracks, 16 spt, 256 bytes/sector, GCR + Apple33SS = 182, + /// 5.25", DS, DD, 35 tracks, 16 spt, 256 bytes/sector, GCR + Apple33DS = 183, + /// 3.5", SS, DD, 80 tracks, 8 to 12 spt, 512 bytes/sector, GCR + AppleSonySS = 184, + /// 3.5", DS, DD, 80 tracks, 8 to 12 spt, 512 bytes/sector, GCR + AppleSonyDS = 185, + /// 5.25", DS, ?D, ?? tracks, ?? spt, 512 bytes/sector, GCR, opposite side heads, aka Twiggy + AppleFileWare = 186, + #endregion Apple standard floppy format + + #region IBM/Microsoft PC floppy formats, types 190 to 209 + /// 5.25", SS, DD, 40 tracks, 8 spt, 512 bytes/sector, MFM + DOS_525_SS_DD_8 = 190, + /// 5.25", SS, DD, 40 tracks, 9 spt, 512 bytes/sector, MFM + DOS_525_SS_DD_9 = 191, + /// 5.25", DS, DD, 40 tracks, 8 spt, 512 bytes/sector, MFM + DOS_525_DS_DD_8 = 192, + /// 5.25", DS, DD, 40 tracks, 9 spt, 512 bytes/sector, MFM + DOS_525_DS_DD_9 = 193, + /// 5.25", DS, HD, 80 tracks, 15 spt, 512 bytes/sector, MFM + DOS_525_HD = 194, + /// 3.5", SS, DD, 80 tracks, 8 spt, 512 bytes/sector, MFM + DOS_35_SS_DD_8 = 195, + /// 3.5", SS, DD, 80 tracks, 9 spt, 512 bytes/sector, MFM + DOS_35_SS_DD_9 = 196, + /// 3.5", DS, DD, 80 tracks, 8 spt, 512 bytes/sector, MFM + DOS_35_DS_DD_8 = 197, + /// 3.5", DS, DD, 80 tracks, 9 spt, 512 bytes/sector, MFM + DOS_35_DS_DD_9 = 198, + /// 3.5", DS, HD, 80 tracks, 18 spt, 512 bytes/sector, MFM + DOS_35_HD = 199, + /// 3.5", DS, ED, 80 tracks, 36 spt, 512 bytes/sector, MFM + DOS_35_ED = 200, + /// 3.5", DS, HD, 80 tracks, 21 spt, 512 bytes/sector, MFM + DMF = 201, + /// 3.5", DS, HD, 82 tracks, 21 spt, 512 bytes/sector, MFM + DMF_82 = 202, + /// + /// 5.25", DS, HD, 80 tracks, ? spt, ??? + ??? + ??? bytes/sector, MFM track 0 = ??15 sectors, 512 bytes/sector, + /// falsified to DOS as 19 spt, 512 bps + /// + XDF_525 = 203, + /// + /// 3.5", DS, HD, 80 tracks, 4 spt, 8192 + 2048 + 1024 + 512 bytes/sector, MFM track 0 = 19 sectors, 512 + /// bytes/sector, falsified to DOS as 23 spt, 512 bps + /// + XDF_35 = 204, + #endregion IBM/Microsoft PC standard floppy formats, types 190 to 209 + + #region IBM standard floppy formats, types 210 to 219 + /// 8", SS, SD, 32 tracks, 8 spt, 319 bytes/sector, FM + IBM23FD = 210, + /// 8", SS, SD, 73 tracks, 26 spt, 128 bytes/sector, FM + IBM33FD_128 = 211, + /// 8", SS, SD, 74 tracks, 15 spt, 256 bytes/sector, FM, track 0 = 26 sectors, 128 bytes/sector + IBM33FD_256 = 212, + /// 8", SS, SD, 74 tracks, 8 spt, 512 bytes/sector, FM, track 0 = 26 sectors, 128 bytes/sector + IBM33FD_512 = 213, + /// 8", DS, SD, 74 tracks, 26 spt, 128 bytes/sector, FM, track 0 = 26 sectors, 128 bytes/sector + IBM43FD_128 = 214, + /// 8", DS, SD, 74 tracks, 26 spt, 256 bytes/sector, FM, track 0 = 26 sectors, 128 bytes/sector + IBM43FD_256 = 215, + /// + /// 8", DS, DD, 74 tracks, 26 spt, 256 bytes/sector, MFM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 + /// side 1 = 26 sectors, 256 bytes/sector + /// + IBM53FD_256 = 216, + /// + /// 8", DS, DD, 74 tracks, 15 spt, 512 bytes/sector, MFM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 + /// side 1 = 26 sectors, 256 bytes/sector + /// + IBM53FD_512 = 217, + /// + /// 8", DS, DD, 74 tracks, 8 spt, 1024 bytes/sector, MFM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 + /// side 1 = 26 sectors, 256 bytes/sector + /// + IBM53FD_1024 = 218, + #endregion IBM standard floppy formats, types 210 to 219 + + #region DEC standard floppy formats, types 220 to 229 + /// 8", SS, DD, 77 tracks, 26 spt, 128 bytes/sector, FM + RX01 = 220, + /// 8", SS, DD, 77 tracks, 26 spt, 256 bytes/sector, FM/MFM + RX02 = 221, + /// 8", DS, DD, 77 tracks, 26 spt, 256 bytes/sector, FM/MFM + RX03 = 222, + /// 5.25", SS, DD, 80 tracks, 10 spt, 512 bytes/sector, MFM + RX50 = 223, + #endregion DEC standard floppy formats, types 220 to 229 + + #region Acorn standard floppy formats, types 230 to 239 + /// 5,25", SS, SD, 40 tracks, 10 spt, 256 bytes/sector, FM + ACORN_525_SS_SD_40 = 230, + /// 5,25", SS, SD, 80 tracks, 10 spt, 256 bytes/sector, FM + ACORN_525_SS_SD_80 = 231, + /// 5,25", SS, DD, 40 tracks, 16 spt, 256 bytes/sector, MFM + ACORN_525_SS_DD_40 = 232, + /// 5,25", SS, DD, 80 tracks, 16 spt, 256 bytes/sector, MFM + ACORN_525_SS_DD_80 = 233, + /// 5,25", DS, DD, 80 tracks, 16 spt, 256 bytes/sector, MFM + ACORN_525_DS_DD = 234, + /// 3,5", DS, DD, 80 tracks, 5 spt, 1024 bytes/sector, MFM + ACORN_35_DS_DD = 235, + /// 3,5", DS, HD, 80 tracks, 10 spt, 1024 bytes/sector, MFM + ACORN_35_DS_HD = 236, + #endregion Acorn standard floppy formats, types 230 to 239 + + #region Atari standard floppy formats, types 240 to 249 + /// 5,25", SS, SD, 40 tracks, 18 spt, 128 bytes/sector, FM + ATARI_525_SD = 240, + /// 5,25", SS, ED, 40 tracks, 26 spt, 128 bytes/sector, MFM + ATARI_525_ED = 241, + /// 5,25", SS, DD, 40 tracks, 18 spt, 256 bytes/sector, MFM + ATARI_525_DD = 242, + /// 3,5", SS, DD, 80 tracks, 10 spt, 512 bytes/sector, MFM + ATARI_35_SS_DD = 243, + /// 3,5", DS, DD, 80 tracks, 10 spt, 512 bytes/sector, MFM + ATARI_35_DS_DD = 244, + /// 3,5", SS, DD, 80 tracks, 11 spt, 512 bytes/sector, MFM + ATARI_35_SS_DD_11 = 245, + /// 3,5", DS, DD, 80 tracks, 11 spt, 512 bytes/sector, MFM + ATARI_35_DS_DD_11 = 246, + #endregion Atari standard floppy formats, types 240 to 249 + + #region Commodore standard floppy formats, types 250 to 259 + /// 3,5", DS, DD, 80 tracks, 10 spt, 512 bytes/sector, MFM (1581) + CBM_35_DD = 250, + /// 3,5", DS, DD, 80 tracks, 11 spt, 512 bytes/sector, MFM (Amiga) + CBM_AMIGA_35_DD = 251, + /// 3,5", DS, HD, 80 tracks, 22 spt, 512 bytes/sector, MFM (Amiga) + CBM_AMIGA_35_HD = 252, + /// 5,25", SS, DD, 35 tracks, GCR + CBM_1540 = 253, + /// 5,25", SS, DD, 40 tracks, GCR + CBM_1540_Ext = 254, + /// 5,25", DS, DD, 35 tracks, GCR + CBM_1571 = 255, + #endregion Commodore standard floppy formats, types 250 to 259 + + #region NEC/SHARP standard floppy formats, types 260 to 269 + /// 8", DS, SD, 77 tracks, 26 spt, 128 bytes/sector, FM + NEC_8_SD = 260, + /// 8", DS, DD, 77 tracks, 26 spt, 256 bytes/sector, MFM + NEC_8_DD = 261, + /// 5.25", SS, SD, 80 tracks, 16 spt, 256 bytes/sector, FM + NEC_525_SS = 262, + /// 5.25", DS, SD, 80 tracks, 16 spt, 256 bytes/sector, MFM + NEC_525_DS = 263, + /// 5,25", DS, HD, 77 tracks, 8 spt, 1024 bytes/sector, MFM + NEC_525_HD = 264, + /// 3,5", DS, HD, 77 tracks, 8 spt, 1024 bytes/sector, MFM, aka mode 3 + NEC_35_HD_8 = 265, + /// 3,5", DS, HD, 80 tracks, 15 spt, 512 bytes/sector, MFM + NEC_35_HD_15 = 266, + /// 3,5", DS, TD, 240 tracks, 38 spt, 512 bytes/sector, MFM + NEC_35_TD = 267, + /// 5,25", DS, HD, 77 tracks, 8 spt, 1024 bytes/sector, MFM + SHARP_525 = NEC_525_HD, + /// 3,5", DS, HD, 80 tracks, 9 spt, 1024 bytes/sector, MFM + SHARP_525_9 = 268, + /// 3,5", DS, HD, 77 tracks, 8 spt, 1024 bytes/sector, MFM + SHARP_35 = NEC_35_HD_8, + /// 3,5", DS, HD, 80 tracks, 9 spt, 1024 bytes/sector, MFM + SHARP_35_9 = 269, + #endregion NEC/SHARP standard floppy formats, types 260 to 269 + + #region ECMA floppy standards, types 270 to 289 + /// + /// 5,25", DS, DD, 80 tracks, 8 spt, 1024 bytes/sector, MFM, track 0 side 0 = 26 sectors, 128 bytes/sector, track + /// 0 side 1 = 26 sectors, 256 bytes/sector + /// + ECMA_99_8 = 270, + /// + /// 5,25", DS, DD, 77 tracks, 15 spt, 512 bytes/sector, MFM, track 0 side 0 = 26 sectors, 128 bytes/sector, track + /// 0 side 1 = 26 sectors, 256 bytes/sector + /// + ECMA_99_15 = 271, + /// + /// 5,25", DS, DD, 77 tracks, 26 spt, 256 bytes/sector, MFM, track 0 side 0 = 26 sectors, 128 bytes/sector, track + /// 0 side 1 = 26 sectors, 256 bytes/sector + /// + ECMA_99_26 = 272, + /// 3,5", DS, DD, 80 tracks, 9 spt, 512 bytes/sector, MFM + ECMA_100 = DOS_35_DS_DD_9, + /// 3,5", DS, HD, 80 tracks, 18 spt, 512 bytes/sector, MFM + ECMA_125 = DOS_35_HD, + /// 3,5", DS, ED, 80 tracks, 36 spt, 512 bytes/sector, MFM + ECMA_147 = DOS_35_ED, + /// 8", SS, SD, 77 tracks, 26 spt, 128 bytes/sector, FM + ECMA_54 = 273, + /// 8", DS, SD, 77 tracks, 26 spt, 128 bytes/sector, FM + ECMA_59 = 274, + /// 5,25", SS, DD, 35 tracks, 9 spt, 256 bytes/sector, FM, track 0 side 0 = 16 sectors, 128 bytes/sector + ECMA_66 = 275, + /// + /// 8", DS, DD, 77 tracks, 8 spt, 1024 bytes/sector, FM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 + /// side 1 = 26 sectors, 256 bytes/sector + /// + ECMA_69_8 = 276, + /// + /// 8", DS, DD, 77 tracks, 15 spt, 512 bytes/sector, FM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 + /// side 1 = 26 sectors, 256 bytes/sector + /// + ECMA_69_15 = 277, + /// + /// 8", DS, DD, 77 tracks, 26 spt, 256 bytes/sector, FM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 + /// side 1 = 26 sectors, 256 bytes/sector + /// + ECMA_69_26 = 278, + /// + /// 5,25", DS, DD, 40 tracks, 16 spt, 256 bytes/sector, FM, track 0 side 0 = 16 sectors, 128 bytes/sector, track 0 + /// side 1 = 16 sectors, 256 bytes/sector + /// + ECMA_70 = 279, + /// + /// 5,25", DS, DD, 80 tracks, 16 spt, 256 bytes/sector, FM, track 0 side 0 = 16 sectors, 128 bytes/sector, track 0 + /// side 1 = 16 sectors, 256 bytes/sector + /// + ECMA_78 = 280, + /// 5,25", DS, DD, 80 tracks, 9 spt, 512 bytes/sector, FM + ECMA_78_2 = 281, + #endregion ECMA floppy standards, types 270 to 289 + + #region Non-standard PC formats (FDFORMAT, 2M, etc), types 290 to 308 + /// 5,25", DS, DD, 82 tracks, 10 spt, 512 bytes/sector, MFM + FDFORMAT_525_DD = 290, + /// 5,25", DS, HD, 82 tracks, 17 spt, 512 bytes/sector, MFM + FDFORMAT_525_HD = 291, + /// 3,5", DS, DD, 82 tracks, 10 spt, 512 bytes/sector, MFM + FDFORMAT_35_DD = 292, + /// 3,5", DS, HD, 82 tracks, 21 spt, 512 bytes/sector, MFM + FDFORMAT_35_HD = 293, + #endregion Non-standard PC formats (FDFORMAT, 2M, etc), types 290 to 308 + + #region Apricot ACT standard floppy formats, type 309 + /// 3.5", DS, DD, 70 tracks, 9 spt, 512 bytes/sector, MFM + Apricot_35 = 309, + #endregion Apricot ACT standard floppy formats, type 309 + + #region OnStream ADR, types 310 to 319 + ADR2120 = 310, ADR260 = 311, ADR30 = 312, + ADR50 = 313, + #endregion OnStream ADR, types 310 to 319 + + #region Advanced Intelligent Tape, types 320 to 339 + AIT1 = 320, AIT1Turbo = 321, AIT2 = 322, + AIT2Turbo = 323, AIT3 = 324, AIT3Ex = 325, + AIT3Turbo = 326, AIT4 = 327, AIT5 = 328, + AITETurbo = 329, SAIT1 = 330, SAIT2 = 331, + #endregion Advanced Intelligent Tape, types 320 to 339 + + #region Iomega, types 340 to 359 + /// Obsolete type for 8"x11" Bernoulli Box disk + [Obsolete] + Bernoulli = 340, + /// Obsolete type for 5⅓" Bernoulli Box II disks + [Obsolete] + Bernoulli2 = 341, Ditto = 342, DittoMax = 343, Jaz = 344, + Jaz2 = 345, PocketZip = 346, REV120 = 347, + REV35 = 348, REV70 = 349, ZIP100 = 350, + ZIP250 = 351, ZIP750 = 352, + /// 5⅓" Bernoulli Box II disk with 35Mb capacity + Bernoulli35 = 353, + /// 5⅓" Bernoulli Box II disk with 44Mb capacity + Bernoulli44 = 354, + /// 5⅓" Bernoulli Box II disk with 65Mb capacity + Bernoulli65 = 355, + /// 5⅓" Bernoulli Box II disk with 90Mb capacity + Bernoulli90 = 356, + /// 5⅓" Bernoulli Box II disk with 105Mb capacity + Bernoulli105 = 357, + /// 5⅓" Bernoulli Box II disk with 150Mb capacity + Bernoulli150 = 358, + /// 5⅓" Bernoulli Box II disk with 230Mb capacity + Bernoulli230 = 359, + #endregion Iomega, types 340 to 359 + + #region Audio or video media, types 360 to 369 + CompactCassette = 360, Data8 = 361, MiniDV = 362, + /// D/CAS-25: Digital data on Compact Cassette form factor, special magnetic media, 9-track + Dcas25 = 363, + /// D/CAS-85: Digital data on Compact Cassette form factor, special magnetic media, 17-track + Dcas85 = 364, + /// D/CAS-103: Digital data on Compact Cassette form factor, special magnetic media, 21-track + Dcas103 = 365, + #endregion Audio media, types 360 to 369 + + #region CompactFlash Association, types 370 to 379 + CFast = 370, CompactFlash = 371, CompactFlashType2 = 372, + #endregion CompactFlash Association, types 370 to 379 + + #region Digital Audio Tape / Digital Data Storage, types 380 to 389 + DigitalAudioTape = 380, DAT160 = 381, DAT320 = 382, + DAT72 = 383, DDS1 = 384, DDS2 = 385, + DDS3 = 386, DDS4 = 387, + #endregion Digital Audio Tape / Digital Data Storage, types 380 to 389 + + #region DEC, types 390 to 399 + CompactTapeI = 390, CompactTapeII = 391, DECtapeII = 392, + DLTtapeIII = 393, DLTtapeIIIxt = 394, DLTtapeIV = 395, + DLTtapeS4 = 396, SDLT1 = 397, SDLT2 = 398, + VStapeI = 399, + #endregion DEC, types 390 to 399 + + #region Exatape, types 400 to 419 + Exatape15m = 400, Exatape22m = 401, Exatape22mAME = 402, + Exatape28m = 403, Exatape40m = 404, Exatape45m = 405, + Exatape54m = 406, Exatape75m = 407, Exatape76m = 408, + Exatape80m = 409, Exatape106m = 410, Exatape160mXL = 411, + Exatape112m = 412, Exatape125m = 413, Exatape150m = 414, + Exatape170m = 415, Exatape225m = 416, + #endregion Exatape, types 400 to 419 + + #region PCMCIA / ExpressCard, types 420 to 429 + ExpressCard34 = 420, ExpressCard54 = 421, PCCardTypeI = 422, + PCCardTypeII = 423, PCCardTypeIII = 424, PCCardTypeIV = 425, + #endregion PCMCIA / ExpressCard, types 420 to 429 + + #region SyQuest, types 430 to 449 + /// SyQuest 135Mb cartridge for use in EZ135 and EZFlyer drives + EZ135 = 430, + /// SyQuest EZFlyer 230Mb cartridge for use in EZFlyer drive + EZ230 = 431, + /// SyQuest 4.7Gb for use in Quest drive + Quest = 432, + /// SyQuest SparQ 1Gb cartridge + SparQ = 433, + /// SyQuest 5Mb cartridge for SQ306RD drive + SQ100 = 434, + /// SyQuest 10Mb cartridge for SQ312RD drive + SQ200 = 435, + /// SyQuest 15Mb cartridge for SQ319RD drive + SQ300 = 436, + /// SyQuest 105Mb cartridge for SQ3105 and SQ3270 drives + SQ310 = 437, + /// SyQuest 270Mb cartridge for SQ3270 drive + SQ327 = 438, + /// SyQuest 44Mb cartridge for SQ555, SQ5110 and SQ5200C/SQ200 drives + SQ400 = 439, + /// SyQuest 88Mb cartridge for SQ5110 and SQ5200C/SQ200 drives + SQ800 = 440, + /// SyQuest 1.5Gb cartridge for SyJet drive + [Obsolete] + SQ1500 = 441, + /// SyQuest 200Mb cartridge for use in SQ5200C drive + SQ2000 = 442, + /// SyQuest 1.5Gb cartridge for SyJet drive + SyJet = 443, + #endregion SyQuest, types 430 to 449 + + #region Nintendo, types 450 to 469 + FamicomGamePak = 450, GameBoyAdvanceGamePak = 451, GameBoyGamePak = 452, + /// Nintendo GameCube Optical Disc + GOD = 453, N64DD = 454, N64GamePak = 455, NESGamePak = 456, + Nintendo3DSGameCard = 457, NintendoDiskCard = 458, NintendoDSGameCard = 459, + NintendoDSiGameCard = 460, SNESGamePak = 461, SNESGamePakUS = 462, + /// Nintendo Wii Optical Disc + WOD = 463, + /// Nintendo Wii U Optical Disc + WUOD = 464, SwitchGameCard = 465, + #endregion Nintendo, types 450 to 469 + + #region IBM Tapes, types 470 to 479 + IBM3470 = 470, IBM3480 = 471, IBM3490 = 472, + IBM3490E = 473, IBM3592 = 474, + #endregion IBM Tapes, types 470 to 479 + + #region LTO Ultrium, types 480 to 509 + LTO = 480, LTO2 = 481, LTO3 = 482, + LTO3WORM = 483, LTO4 = 484, LTO4WORM = 485, + LTO5 = 486, LTO5WORM = 487, LTO6 = 488, + LTO6WORM = 489, LTO7 = 490, LTO7WORM = 491, + #endregion LTO Ultrium, types 480 to 509 + + #region MemoryStick, types 510 to 519 + MemoryStick = 510, MemoryStickDuo = 511, MemoryStickMicro = 512, + MemoryStickPro = 513, MemoryStickProDuo = 514, + #endregion MemoryStick, types 510 to 519 + + #region SecureDigital, types 520 to 529 + microSD = 520, miniSD = 521, SecureDigital = 522, + #endregion SecureDigital, types 520 to 529 + + #region MultiMediaCard, types 530 to 539 + MMC = 530, MMCmicro = 531, RSMMC = 532, + MMCplus = 533, MMCmobile = 534, + #endregion MultiMediaCard, types 530 to 539 + + #region SLR, types 540 to 569 + MLR1 = 540, MLR1SL = 541, MLR3 = 542, + SLR1 = 543, SLR2 = 544, SLR3 = 545, + SLR32 = 546, SLR32SL = 547, SLR4 = 548, + SLR5 = 549, SLR5SL = 550, SLR6 = 551, + SLRtape7 = 552, SLRtape7SL = 553, SLRtape24 = 554, + SLRtape24SL = 555, SLRtape40 = 556, SLRtape50 = 557, + SLRtape60 = 558, SLRtape75 = 559, SLRtape100 = 560, + SLRtape140 = 561, + #endregion SLR, types 540 to 569 + + #region QIC, types 570 to 589 + QIC11 = 570, QIC120 = 571, QIC1350 = 572, + QIC150 = 573, QIC24 = 574, QIC3010 = 575, + QIC3020 = 576, QIC3080 = 577, QIC3095 = 578, + QIC320 = 579, QIC40 = 580, QIC525 = 581, + QIC80 = 582, + #endregion QIC, types 570 to 589 + + #region StorageTek tapes, types 590 to 609 + STK4480 = 590, STK4490 = 591, STK9490 = 592, + T9840A = 593, T9840B = 594, T9840C = 595, + T9840D = 596, T9940A = 597, T9940B = 598, + T10000A = 599, T10000B = 600, T10000C = 601, + T10000D = 602, + #endregion StorageTek tapes, types 590 to 609 + + #region Travan, types 610 to 619 + Travan = 610, Travan1Ex = 611, Travan3 = 612, + Travan3Ex = 613, Travan4 = 614, Travan5 = 615, + Travan7 = 616, + #endregion Travan, types 610 to 619 + + #region VXA, types 620 to 629 + VXA1 = 620, VXA2 = 621, VXA3 = 622, + #endregion VXA, types 620 to 629 + + #region Magneto-optical, types 630 to 659 + /// 5,25", M.O., WORM, 650Mb, 318750 sectors, 1024 bytes/sector, ECMA-153, ISO 11560 + ECMA_153 = 630, + /// 5,25", M.O., WORM, 600Mb, 581250 sectors, 512 bytes/sector, ECMA-153, ISO 11560 + ECMA_153_512 = 631, + /// 3,5", M.O., RW, 128Mb, 248826 sectors, 512 bytes/sector, ECMA-154, ISO 10090 + ECMA_154 = 632, + /// 5,25", M.O., RW/WORM, 1Gb, 904995 sectors, 512 bytes/sector, ECMA-183, ISO 13481 + ECMA_183_512 = 633, + /// 5,25", M.O., RW/WORM, 1Gb, 498526 sectors, 1024 bytes/sector, ECMA-183, ISO 13481 + ECMA_183 = 634, + /// 5,25", M.O., RW/WORM, 1.2Gb, 1165600 sectors, 512 bytes/sector, ECMA-184, ISO 13549 + ECMA_184_512 = 635, + /// 5,25", M.O., RW/WORM, 1.3Gb, 639200 sectors, 1024 bytes/sector, ECMA-184, ISO 13549 + ECMA_184 = 636, + /// 300mm, M.O., WORM, ??? sectors, 1024 bytes/sector, ECMA-189, ISO 13614 + ECMA_189 = 637, + /// 300mm, M.O., WORM, ??? sectors, 1024 bytes/sector, ECMA-190, ISO 13403 + ECMA_190 = 638, + /// 5,25", M.O., RW/WORM, 936921 or 948770 sectors, 1024 bytes/sector, ECMA-195, ISO 13842 + ECMA_195 = 639, + /// 5,25", M.O., RW/WORM, 1644581 or 1647371 sectors, 512 bytes/sector, ECMA-195, ISO 13842 + ECMA_195_512 = 640, + /// 3,5", M.O., 446325 sectors, 512 bytes/sector, ECMA-201, ISO 13963 + ECMA_201 = 641, + /// 3,5", M.O., 429975 sectors, 512 bytes/sector, embossed, ISO 13963 + ECMA_201_ROM = 642, + /// 3,5", M.O., 371371 sectors, 1024 bytes/sector, ECMA-223 + ECMA_223 = 643, + /// 3,5", M.O., 694929 sectors, 512 bytes/sector, ECMA-223 + ECMA_223_512 = 644, + /// 5,25", M.O., 1244621 sectors, 1024 bytes/sector, ECMA-238, ISO 15486 + ECMA_238 = 645, + /// 3,5", M.O., 310352, 320332 or 321100 sectors, 2048 bytes/sector, ECMA-239, ISO 15498 + ECMA_239 = 646, + /// 356mm, M.O., 14476734 sectors, 1024 bytes/sector, ECMA-260, ISO 15898 + ECMA_260 = 647, + /// 356mm, M.O., 24445990 sectors, 1024 bytes/sector, ECMA-260, ISO 15898 + ECMA_260_Double = 648, + /// 5,25", M.O., 1128134 sectors, 2048 bytes/sector, ECMA-280, ISO 18093 + ECMA_280 = 649, + /// 300mm, M.O., 7355716 sectors, 2048 bytes/sector, ECMA-317, ISO 20162 + ECMA_317 = 650, + /// 5,25", M.O., 1095840 sectors, 4096 bytes/sector, ECMA-322, ISO 22092, 9.1Gb/cart + ECMA_322 = 651, + /// 5,25", M.O., 2043664 sectors, 2048 bytes/sector, ECMA-322, ISO 22092, 8.6Gb/cart + ECMA_322_2k = 652, + /// 3,5", M.O., 605846 sectors, 2048 bytes/sector, Cherry Book, GigaMo, ECMA-351, ISO 17346 + GigaMo = 653, + /// 3,5", M.O., 1063146 sectors, 2048 bytes/sector, Cherry Book 2, GigaMo 2, ECMA-353, ISO 22533 + GigaMo2 = 654, + /// 5,25", M.O., 1263472 sectors, 2048 bytes/sector, ISO 15286, 5.2Gb/cart + ISO_15286 = 655, + /// 5,25", M.O., 2319786 sectors, 1024 bytes/sector, ISO 15286, 4.8Gb/cart + ISO_15286_1024 = 656, + /// 5,25", M.O., ??????? sectors, 512 bytes/sector, ISO 15286, 4.1Gb/cart + ISO_15286_512 = 657, + /// 5,25", M.O., 314569 sectors, 1024 bytes/sector, ISO 10089, 650Mb/cart + ISO_10089 = 658, + /// 5,25", M.O., ?????? sectors, 512 bytes/sector, ISO 10089, 594Mb/cart + ISO_10089_512 = 659, + #endregion Magneto-optical, types 630 to 659 + + #region Other floppy standards, types 660 to 689 + CompactFloppy = 660, DemiDiskette = 661, + /// 3.5", 652 tracks, 2 sides, 512 bytes/sector, Floptical, ECMA-207, ISO 14169 + Floptical = 662, HiFD = 663, QuickDisk = 664, UHD144 = 665, + VideoFloppy = 666, Wafer = 667, ZXMicrodrive = 668, + #endregion Other floppy standards, types 660 to 669 + + #region Miscellaneous, types 670 to 689 + BeeCard = 670, Borsu = 671, DataStore = 672, + DIR = 673, DST = 674, DTF = 675, + DTF2 = 676, Flextra3020 = 677, Flextra3225 = 678, + HiTC1 = 679, HiTC2 = 680, LT1 = 681, + MiniCard = 872, Orb = 683, Orb5 = 684, + SmartMedia = 685, xD = 686, XQD = 687, + DataPlay = 688, + #endregion Miscellaneous, types 670 to 689 + + #region Apple specific media, types 690 to 699 + AppleProfile = 690, AppleWidget = 691, AppleHD20 = 692, + PriamDataTower = 693, Pippin = 694, + #endregion Apple specific media, types 690 to 699 + + #region DEC hard disks, types 700 to 729 + /// + /// 2382 cylinders, 4 tracks/cylinder, 42 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, + /// 204890112 bytes + /// + RA60 = 700, + /// + /// 546 cylinders, 14 tracks/cylinder, 31 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, + /// 121325568 bytes + /// + RA80 = 701, + /// + /// 1248 cylinders, 14 tracks/cylinder, 51 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, + /// 456228864 bytes + /// + RA81 = 702, + /// + /// 302 cylinders, 4 tracks/cylinder, 42 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 25976832 + /// bytes + /// + RC25 = 703, + /// + /// 615 cylinders, 4 tracks/cylinder, 17 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 21411840 + /// bytes + /// + RD31 = 704, + /// + /// 820 cylinders, 6 tracks/cylinder, 17 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 42823680 + /// bytes + /// + RD32 = 705, + /// + /// 306 cylinders, 4 tracks/cylinder, 17 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 10653696 + /// bytes + /// + RD51 = 706, + /// + /// 480 cylinders, 7 tracks/cylinder, 18 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 30965760 + /// bytes + /// + RD52 = 707, + /// + /// 1024 cylinders, 7 tracks/cylinder, 18 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, + /// 75497472 bytes + /// + RD53 = 708, + /// + /// 1225 cylinders, 8 tracks/cylinder, 18 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, + /// 159936000 bytes + /// + RD54 = 709, + /// + /// 411 cylinders, 3 tracks/cylinder, 22 sectors/track, 256 words/sector, 16 bits/word, 512 bytes/sector, 13888512 + /// bytes + /// + RK06 = 710, + /// + /// 411 cylinders, 3 tracks/cylinder, 20 sectors/track, 256 words/sector, 18 bits/word, 576 bytes/sector, 14204160 + /// bytes + /// + RK06_18 = 711, + /// + /// 815 cylinders, 3 tracks/cylinder, 22 sectors/track, 256 words/sector, 16 bits/word, 512 bytes/sector, 27540480 + /// bytes + /// + RK07 = 712, + /// + /// 815 cylinders, 3 tracks/cylinder, 20 sectors/track, 256 words/sector, 18 bits/word, 576 bytes/sector, 28166400 + /// bytes + /// + RK07_18 = 713, + /// + /// 823 cylinders, 5 tracks/cylinder, 32 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 67420160 + /// bytes + /// + RM02 = 714, + /// + /// 823 cylinders, 5 tracks/cylinder, 32 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 67420160 + /// bytes + /// + RM03 = 715, + /// + /// 823 cylinders, 19 tracks/cylinder, 32 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, + /// 256196608 bytes + /// + RM05 = 716, + /// + /// 203 cylinders, 10 tracks/cylinder, 22 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, + /// 22865920 bytes + /// + RP02 = 717, + /// + /// 203 cylinders, 10 tracks/cylinder, 20 sectors/track, 128 words/sector, 36 bits/word, 576 bytes/sector, + /// 23385600 bytes + /// + RP02_18 = 718, + /// + /// 400 cylinders, 10 tracks/cylinder, 22 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, + /// 45056000 bytes + /// + RP03 = 719, + /// + /// 400 cylinders, 10 tracks/cylinder, 20 sectors/track, 128 words/sector, 36 bits/word, 576 bytes/sector, + /// 46080000 bytes + /// + RP03_18 = 720, + /// + /// 411 cylinders, 19 tracks/cylinder, 22 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, + /// 87960576 bytes + /// + RP04 = 721, + /// + /// 411 cylinders, 19 tracks/cylinder, 20 sectors/track, 128 words/sector, 36 bits/word, 576 bytes/sector, + /// 89959680 bytes + /// + RP04_18 = 722, + /// + /// 411 cylinders, 19 tracks/cylinder, 22 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, + /// 87960576 bytes + /// + RP05 = 723, + /// + /// 411 cylinders, 19 tracks/cylinder, 20 sectors/track, 128 words/sector, 36 bits/word, 576 bytes/sector, + /// 89959680 bytes + /// + RP05_18 = 724, + /// + /// 815 cylinders, 19 tracks/cylinder, 22 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, + /// 174423040 bytes + /// + RP06 = 725, + /// + /// 815 cylinders, 19 tracks/cylinder, 20 sectors/track, 128 words/sector, 36 bits/word, 576 bytes/sector, + /// 178387200 bytes + /// + RP06_18 = 726, + #endregion DEC hard disks, types 700 to 729 + + #region Imation, types 730 to 739 + LS120 = 730, LS240 = 731, FD32MB = 732, + RDX = 733, + /// Imation 320Gb RDX + RDX320 = 734, + #endregion Imation, types 730 to 739 + + #region VideoNow, types 740 to 749 + VideoNow = 740, VideoNowColor = 741, VideoNowXp = 742, + #endregion + + #region Iomega, types 750 to 759 + /// 8"x11" Bernoulli Box disk with 10Mb capacity + Bernoulli10 = 750, + /// 8"x11" Bernoulli Box disk with 20Mb capacity + Bernoulli20 = 751, + /// 5⅓" Bernoulli Box II disk with 20Mb capacity + BernoulliBox2_20 = 752, + #endregion Iomega, types 750 to 759 + + #region Kodak, types 760 to 769 + KodakVerbatim3 = 760, KodakVerbatim6 = 761, KodakVerbatim12 = 762, + #endregion Kodak, types 760 to 769 + + #region Sony and Panasonic Blu-ray derived, types 770 to 799 + /// Professional Disc for video, single layer, rewritable, 23Gb + ProfessionalDisc = 770, + /// Professional Disc for video, dual layer, rewritable, 50Gb + ProfessionalDiscDual = 771, + /// Professional Disc for video, triple layer, rewritable, 100Gb + ProfessionalDiscTriple = 772, + /// Professional Disc for video, quad layer, write once, 128Gb + ProfessionalDiscQuad = 773, + /// Professional Disc for DATA, single layer, rewritable, 23Gb + PDD = 774, + /// Professional Disc for DATA, single layer, write once, 23Gb + PDD_WORM = 775, + /// Archival Disc, 1st gen., 300Gb + ArchivalDisc = 776, + /// Archival Disc, 2nd gen., 500Gb + ArchivalDisc2 = 777, + /// Archival Disc, 3rd gen., 1Tb + ArchivalDisc3 = 778, + /// Optical Disc archive, 1st gen., write once, 300Gb + ODC300R = 779, + /// Optical Disc archive, 1st gen., rewritable, 300Gb + ODC300RE = 780, + /// Optical Disc archive, 2nd gen., write once, 600Gb + ODC600R = 781, + /// Optical Disc archive, 2nd gen., rewritable, 600Gb + ODC600RE = 782, + /// Optical Disc archive, 3rd gen., rewritable, 1200Gb + ODC1200RE = 783, + /// Optical Disc archive, 3rd gen., write once, 1500Gb + ODC1500R = 784, + /// Optical Disc archive, 4th gen., write once, 3300Gb + ODC3300R = 785, + /// Optical Disc archive, 5th gen., write once, 5500Gb + ODC5500R = 786, + #endregion Sony and Panasonic Blu-ray derived, types 770 to 799 + + #region Magneto-optical, types 800 to 819 + /// 5,25", M.O., 4383356 sectors, 1024 bytes/sector, ECMA-322, ISO 22092, 9.1Gb/cart + ECMA_322_1k = 800, + /// 5,25", M.O., ??????? sectors, 512 bytes/sector, ECMA-322, ISO 22092, 9.1Gb/cart + ECMA_322_512 = 801, + /// 5,25", M.O., 1273011 sectors, 1024 bytes/sector, ISO 14517, 2.6Gb/cart + ISO_14517 = 802, + /// 5,25", M.O., 2244958 sectors, 512 bytes/sector, ISO 14517, 2.3Gb/cart + ISO_14517_512 = 803, + #endregion Magneto-optical, types 800 to 819 + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/MediaType.csv b/Aaru.CommonTypes/MediaType.csv new file mode 100644 index 0000000..42210bd --- /dev/null +++ b/Aaru.CommonTypes/MediaType.csv @@ -0,0 +1,528 @@ +Enum,Value,Summary +"Unknown",0,"Unknown disk type" +"UnknownMO",1,"Unknown magneto-optical" +"GENERIC_HDD",2,"Generic hard disk" +"Microdrive",3,"Microdrive type hard disk" +"Zone_HDD",4,"Zoned hard disk" +"FlashDrive",5,"USB flash drives" +"UnknownTape",6,"Unknown data tape" +"CD",10,"Any unknown or standard violating CD" +"CDDA",11,"CD Digital Audio (Red Book)" +"CDG",12,"CD+G (Red Book)" +"CDEG",13,"CD+EG (Red Book)" +"CDI",14,"CD-i (Green Book)" +"CDROM",15,"CD-ROM (Yellow Book)" +"CDROMXA",16,"CD-ROM XA (Yellow Book)" +"CDPLUS",17,"CD+ (Blue Book)" +"CDMO",18,"CD-MO (Orange Book)" +"CDR",19,"CD-Recordable (Orange Book)" +"CDRW",20,"CD-ReWritable (Orange Book)" +"CDMRW",21,"Mount-Rainier CD-RW" +"VCD",22,"Video CD (White Book)" +"SVCD",23,"Super Video CD (White Book)" +"PCD",24,"Photo CD (Beige Book)" +"SACD",25,"Super Audio CD (Scarlet Book)" +"DDCD",26,"Double-Density CD-ROM (Purple Book)" +"DDCDR",27,"DD CD-R (Purple Book)" +"DDCDRW",28,"DD CD-RW (Purple Book)" +"DTSCD",29,"DTS audio CD (non-standard)" +"CDMIDI",30,"CD-MIDI (Red Book)" +"CDV",31,"CD-Video (ISO/IEC 61104)" +"PD650",32,"120mm, Phase-Change, 1298496 sectors, 512 bytes/sector, PD650, ECMA-240, ISO 15485" +"PD650_WORM",33,"120mm, Write-Once, 1281856 sectors, 512 bytes/sector, PD650, ECMA-240, ISO 15485" +"CDIREADY",34,"CD-i Ready, contains a track before the first TOC track, in mode 2, and all TOC tracks are Audio. Subchannel marks track as audio pause." +"FMTOWNS",35, +"DVDROM",40,"DVD-ROM (applies to DVD Video and DVD Audio)" +"DVDR",41,"DVD-R" +"DVDRW",42,"DVD-RW" +"DVDPR",43,"DVD+R" +"DVDPRW",44,"DVD+RW" +"DVDPRWDL",45,"DVD+RW DL" +"DVDRDL",46,"DVD-R DL" +"DVDPRDL",47,"DVD+R DL" +"DVDRAM",48,"DVD-RAM" +"DVDRWDL",49,"DVD-RW DL" +"DVDDownload",50,"DVD-Download" +"HDDVDROM",51,"HD DVD-ROM (applies to HD DVD Video)" +"HDDVDRAM",52,"HD DVD-RAM" +"HDDVDR",53,"HD DVD-R" +"HDDVDRW",54,"HD DVD-RW" +"HDDVDRDL",55,"HD DVD-R DL" +"HDDVDRWDL",56,"HD DVD-RW DL" +"BDROM",60,"BD-ROM (and BD Video)" +"BDR",61,"BD-R" +"BDRE",62,"BD-RE" +"BDRXL",63,"BD-R XL" +"BDREXL",64,"BD-RE XL" +"UHDBD",65,"Ultra HD Blu-ray" +"EVD",70,"Enhanced Versatile Disc" +"FVD",71,"Forward Versatile Disc" +"HVD",72,"Holographic Versatile Disc" +"CBHD",73,"China Blue High Definition" +"HDVMD",74,"High Definition Versatile Multilayer Disc" +"VCDHD",75,"Versatile Compact Disc High Density" +"SVOD",76,"Stacked Volumetric Optical Disc" +"FDDVD",77,"Five Dimensional disc" +"CVD",78,"China Video Disc" +"LD",80,"Pioneer LaserDisc" +"LDROM",81,"Pioneer LaserDisc data" +"LDROM2",82, +"LVROM",83, +"MegaLD",84, +"HiMD",90,"Sony Hi-MD" +"MD",91,"Sony MiniDisc" +"MDData",92,"Sony MD-Data" +"MDData2",93,"Sony MD-Data2" +"MD60",94,"Sony MiniDisc, 60 minutes, formatted with Hi-MD format" +"MD74",95,"Sony MiniDisc, 74 minutes, formatted with Hi-MD format" +"MD80",96,"Sony MiniDisc, 80 minutes, formatted with Hi-MD format" +"UDO",100,"5.25"", Phase-Change, 1834348 sectors, 8192 bytes/sector, Ultra Density Optical, ECMA-350, ISO 17345" +"UDO2",101,"5.25"", Phase-Change, 3669724 sectors, 8192 bytes/sector, Ultra Density Optical 2, ECMA-380, ISO 11976" +"UDO2_WORM",102,"5.25"", Write-Once, 3668759 sectors, 8192 bytes/sector, Ultra Density Optical 2, ECMA-380, ISO 11976" +"PlayStationMemoryCard",110, +"PlayStationMemoryCard2",111, +"PS1CD",112,"Sony PlayStation game CD" +"PS2CD",113,"Sony PlayStation 2 game CD" +"PS2DVD",114,"Sony PlayStation 2 game DVD" +"PS3DVD",115,"Sony PlayStation 3 game DVD" +"PS3BD",116,"Sony PlayStation 3 game Blu-ray" +"PS4BD",117,"Sony PlayStation 4 game Blu-ray" +"UMD",118,"Sony PlayStation Portable Universal Media Disc (ECMA-365)" +"PlayStationVitaGameCard",119, +"PS5BD",120,"Sony PlayStation 5 game Ultra HD Blu-ray" +"XGD",130,"Microsoft X-box Game Disc" +"XGD2",131,"Microsoft X-box 360 Game Disc" +"XGD3",132,"Microsoft X-box 360 Game Disc" +"XGD4",133,"Microsoft X-box One Game Disc" +"MEGACD",150,"Sega MegaCD" +"SATURNCD",151,"Sega Saturn disc" +"GDROM",152,"Sega/Yamaha Gigabyte Disc" +"GDR",153,"Sega/Yamaha recordable Gigabyte Disc" +"SegaCard",154, +"MilCD",155, +"HuCard",170,"PC-Engine / TurboGrafx cartridge" +"SuperCDROM2",171,"PC-Engine / TurboGrafx CD" +"JaguarCD",172,"Atari Jaguar CD" +"ThreeDO",173,"3DO CD" +"PCFX",174,"NEC PC-FX" +"NeoGeoCD",175,"NEO-GEO CD" +"CDTV",176,"Commodore CDTV" +"CD32",177,"Amiga CD32" +"Nuon",178,"Nuon (DVD based videogame console)" +"Playdia",179,"Bandai Playdia" +"Apple32SS",180,"5.25"", SS, DD, 35 tracks, 13 spt, 256 bytes/sector, GCR" +"Apple32DS",181,"5.25"", DS, DD, 35 tracks, 13 spt, 256 bytes/sector, GCR" +"Apple33SS",182,"5.25"", SS, DD, 35 tracks, 16 spt, 256 bytes/sector, GCR" +"Apple33DS",183,"5.25"", DS, DD, 35 tracks, 16 spt, 256 bytes/sector, GCR" +"AppleSonySS",184,"3.5"", SS, DD, 80 tracks, 8 to 12 spt, 512 bytes/sector, GCR" +"AppleSonyDS",185,"3.5"", DS, DD, 80 tracks, 8 to 12 spt, 512 bytes/sector, GCR" +"AppleFileWare",186,"5.25"", DS, ?D, ?? tracks, ?? spt, 512 bytes/sector, GCR, opposite side heads, aka Twiggy" +"DOS_525_SS_DD_8",190,"5.25"", SS, DD, 40 tracks, 8 spt, 512 bytes/sector, MFM" +"DOS_525_SS_DD_9",191,"5.25"", SS, DD, 40 tracks, 9 spt, 512 bytes/sector, MFM" +"DOS_525_DS_DD_8",192,"5.25"", DS, DD, 40 tracks, 8 spt, 512 bytes/sector, MFM" +"DOS_525_DS_DD_9",193,"5.25"", DS, DD, 40 tracks, 9 spt, 512 bytes/sector, MFM" +"DOS_525_HD",194,"5.25"", DS, HD, 80 tracks, 15 spt, 512 bytes/sector, MFM" +"DOS_35_SS_DD_8",195,"3.5"", SS, DD, 80 tracks, 8 spt, 512 bytes/sector, MFM" +"DOS_35_SS_DD_9",196,"3.5"", SS, DD, 80 tracks, 9 spt, 512 bytes/sector, MFM" +"DOS_35_DS_DD_8",197,"3.5"", DS, DD, 80 tracks, 8 spt, 512 bytes/sector, MFM" +"DOS_35_DS_DD_9",198,"3.5"", DS, DD, 80 tracks, 9 spt, 512 bytes/sector, MFM" +"DOS_35_HD",199,"3.5"", DS, HD, 80 tracks, 18 spt, 512 bytes/sector, MFM" +"DOS_35_ED",200,"3.5"", DS, ED, 80 tracks, 36 spt, 512 bytes/sector, MFM" +"DMF",201,"3.5"", DS, HD, 80 tracks, 21 spt, 512 bytes/sector, MFM" +"DMF_82",202,"3.5"", DS, HD, 82 tracks, 21 spt, 512 bytes/sector, MFM" +"XDF_525",203,"5.25"", DS, HD, 80 tracks, ? spt, ??? + ??? + ??? bytes/sector, MFM track 0 = ??15 sectors, 512 bytes/sector, falsified to DOS as 19 spt, 512 bps" +"XDF_35",204,"3.5"", DS, HD, 80 tracks, 4 spt, 8192 + 2048 + 1024 + 512 bytes/sector, MFM track 0 = 19 sectors, 512 bytes/sector, falsified to DOS as 23 spt, 512 bps" +"IBM23FD",210,"8"", SS, SD, 32 tracks, 8 spt, 319 bytes/sector, FM" +"IBM33FD_128",211,"8"", SS, SD, 73 tracks, 26 spt, 128 bytes/sector, FM" +"IBM33FD_256",212,"8"", SS, SD, 74 tracks, 15 spt, 256 bytes/sector, FM, track 0 = 26 sectors, 128 bytes/sector" +"IBM33FD_512",213,"8"", SS, SD, 74 tracks, 8 spt, 512 bytes/sector, FM, track 0 = 26 sectors, 128 bytes/sector" +"IBM43FD_128",214,"8"", DS, SD, 74 tracks, 26 spt, 128 bytes/sector, FM, track 0 = 26 sectors, 128 bytes/sector" +"IBM43FD_256",215,"8"", DS, SD, 74 tracks, 26 spt, 256 bytes/sector, FM, track 0 = 26 sectors, 128 bytes/sector" +"IBM53FD_256",216,"8"", DS, DD, 74 tracks, 26 spt, 256 bytes/sector, MFM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 side 1 = 26 sectors, 256 bytes/sector" +"IBM53FD_512",217,"8"", DS, DD, 74 tracks, 15 spt, 512 bytes/sector, MFM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 side 1 = 26 sectors, 256 bytes/sector" +"IBM53FD_1024",218,"8"", DS, DD, 74 tracks, 8 spt, 1024 bytes/sector, MFM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 side 1 = 26 sectors, 256 bytes/sector" +"RX01",220,"8"", SS, DD, 77 tracks, 26 spt, 128 bytes/sector, FM" +"RX02",221,"8"", SS, DD, 77 tracks, 26 spt, 256 bytes/sector, FM/MFM" +"RX03",222,"8"", DS, DD, 77 tracks, 26 spt, 256 bytes/sector, FM/MFM" +"RX50",223,"5.25"", SS, DD, 80 tracks, 10 spt, 512 bytes/sector, MFM" +"ACORN_525_SS_SD_40",230,"5,25"", SS, SD, 40 tracks, 10 spt, 256 bytes/sector, FM" +"ACORN_525_SS_SD_80",231,"5,25"", SS, SD, 80 tracks, 10 spt, 256 bytes/sector, FM" +"ACORN_525_SS_DD_40",232,"5,25"", SS, DD, 40 tracks, 16 spt, 256 bytes/sector, MFM" +"ACORN_525_SS_DD_80",233,"5,25"", SS, DD, 80 tracks, 16 spt, 256 bytes/sector, MFM" +"ACORN_525_DS_DD",234,"5,25"", DS, DD, 80 tracks, 16 spt, 256 bytes/sector, MFM" +"ACORN_35_DS_DD",235,"3,5"", DS, DD, 80 tracks, 5 spt, 1024 bytes/sector, MFM" +"ACORN_35_DS_HD",236,"3,5"", DS, HD, 80 tracks, 10 spt, 1024 bytes/sector, MFM" +"ATARI_525_SD",240,"5,25"", SS, SD, 40 tracks, 18 spt, 128 bytes/sector, FM" +"ATARI_525_ED",241,"5,25"", SS, ED, 40 tracks, 26 spt, 128 bytes/sector, MFM" +"ATARI_525_DD",242,"5,25"", SS, DD, 40 tracks, 18 spt, 256 bytes/sector, MFM" +"ATARI_35_SS_DD",243,"3,5"", SS, DD, 80 tracks, 10 spt, 512 bytes/sector, MFM" +"ATARI_35_DS_DD",244,"3,5"", DS, DD, 80 tracks, 10 spt, 512 bytes/sector, MFM" +"ATARI_35_SS_DD_11",245,"3,5"", SS, DD, 80 tracks, 11 spt, 512 bytes/sector, MFM" +"ATARI_35_DS_DD_11",246,"3,5"", DS, DD, 80 tracks, 11 spt, 512 bytes/sector, MFM" +"CBM_35_DD",250,"3,5"", DS, DD, 80 tracks, 10 spt, 512 bytes/sector, MFM (1581)" +"CBM_AMIGA_35_DD",251,"3,5"", DS, DD, 80 tracks, 11 spt, 512 bytes/sector, MFM (Amiga)" +"CBM_AMIGA_35_HD",252,"3,5"", DS, HD, 80 tracks, 22 spt, 512 bytes/sector, MFM (Amiga)" +"CBM_1540",253,"5,25"", SS, DD, 35 tracks, GCR" +"CBM_1540_Ext",254,"5,25"", SS, DD, 40 tracks, GCR" +"CBM_1571",255,"5,25"", DS, DD, 35 tracks, GCR" +"NEC_8_SD",260,"8"", DS, SD, 77 tracks, 26 spt, 128 bytes/sector, FM" +"NEC_8_DD",261,"8"", DS, DD, 77 tracks, 26 spt, 256 bytes/sector, MFM" +"NEC_525_SS",262,"5.25"", SS, SD, 80 tracks, 16 spt, 256 bytes/sector, FM" +"NEC_525_DS",263,"5.25"", DS, SD, 80 tracks, 16 spt, 256 bytes/sector, MFM" +"NEC_525_HD",264,"5,25"", DS, HD, 77 tracks, 8 spt, 1024 bytes/sector, MFM" +"NEC_35_HD_8",265,"3,5"", DS, HD, 77 tracks, 8 spt, 1024 bytes/sector, MFM, aka mode 3" +"NEC_35_HD_15",266,"3,5"", DS, HD, 80 tracks, 15 spt, 512 bytes/sector, MFM" +"NEC_35_TD",267,"3,5"", DS, TD, 240 tracks, 38 spt, 512 bytes/sector, MFM" +"SHARP_525",NEC_525_HD,"5,25"", DS, HD, 77 tracks, 8 spt, 1024 bytes/sector, MFM" +"SHARP_525_9",268,"3,5"", DS, HD, 80 tracks, 9 spt, 1024 bytes/sector, MFM" +"SHARP_35",NEC_35_HD_8,"3,5"", DS, HD, 77 tracks, 8 spt, 1024 bytes/sector, MFM" +"SHARP_35_9",269,"3,5"", DS, HD, 80 tracks, 9 spt, 1024 bytes/sector, MFM" +"ECMA_99_8",270,"5,25"", DS, DD, 80 tracks, 8 spt, 1024 bytes/sector, MFM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 side 1 = 26 sectors, 256 bytes/sector" +"ECMA_99_15",271,"5,25"", DS, DD, 77 tracks, 15 spt, 512 bytes/sector, MFM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 side 1 = 26 sectors, 256 bytes/sector" +"ECMA_99_26",272,"5,25"", DS, DD, 77 tracks, 26 spt, 256 bytes/sector, MFM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 side 1 = 26 sectors, 256 bytes/sector" +"ECMA_100",DOS_35_DS_DD_9,"3,5"", DS, DD, 80 tracks, 9 spt, 512 bytes/sector, MFM" +"ECMA_125",DOS_35_HD,"3,5"", DS, HD, 80 tracks, 18 spt, 512 bytes/sector, MFM" +"ECMA_147",DOS_35_ED,"3,5"", DS, ED, 80 tracks, 36 spt, 512 bytes/sector, MFM" +"ECMA_54",273,"8"", SS, SD, 77 tracks, 26 spt, 128 bytes/sector, FM" +"ECMA_59",274,"8"", DS, SD, 77 tracks, 26 spt, 128 bytes/sector, FM" +"ECMA_66",275,"5,25"", SS, DD, 35 tracks, 9 spt, 256 bytes/sector, FM, track 0 side 0 = 16 sectors, 128 bytes/sector" +"ECMA_69_8",276,"8"", DS, DD, 77 tracks, 8 spt, 1024 bytes/sector, FM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 side 1 = 26 sectors, 256 bytes/sector" +"ECMA_69_15",277,"8"", DS, DD, 77 tracks, 15 spt, 512 bytes/sector, FM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 side 1 = 26 sectors, 256 bytes/sector" +"ECMA_69_26",278,"8"", DS, DD, 77 tracks, 26 spt, 256 bytes/sector, FM, track 0 side 0 = 26 sectors, 128 bytes/sector, track 0 side 1 = 26 sectors, 256 bytes/sector" +"ECMA_70",279,"5,25"", DS, DD, 40 tracks, 16 spt, 256 bytes/sector, FM, track 0 side 0 = 16 sectors, 128 bytes/sector, track 0 side 1 = 16 sectors, 256 bytes/sector" +"ECMA_78",280,"5,25"", DS, DD, 80 tracks, 16 spt, 256 bytes/sector, FM, track 0 side 0 = 16 sectors, 128 bytes/sector, track 0 side 1 = 16 sectors, 256 bytes/sector" +"ECMA_78_2",281,"5,25"", DS, DD, 80 tracks, 9 spt, 512 bytes/sector, FM" +"FDFORMAT_525_DD",290,"5,25"", DS, DD, 82 tracks, 10 spt, 512 bytes/sector, MFM" +"FDFORMAT_525_HD",291,"5,25"", DS, HD, 82 tracks, 17 spt, 512 bytes/sector, MFM" +"FDFORMAT_35_DD",292,"3,5"", DS, DD, 82 tracks, 10 spt, 512 bytes/sector, MFM" +"FDFORMAT_35_HD",293,"3,5"", DS, HD, 82 tracks, 21 spt, 512 bytes/sector, MFM" +"Apricot_35",309,"3.5"", DS, DD, 70 tracks, 9 spt, 512 bytes/sector, MFM" +"ADR2120",310, +"ADR260",311, +"ADR30",312, +"ADR50",313, +"AIT1",320, +"AIT1Turbo",321, +"AIT2",322, +"AIT2Turbo",323, +"AIT3",324, +"AIT3Ex",325, +"AIT3Turbo",326, +"AIT4",327, +"AIT5",328, +"AITETurbo",329, +"SAIT1",330, +"SAIT2",331, +"Bernoulli",340,"Obsolete type for 8""x11"" Bernoulli Box disk" +"Bernoulli2",341,"Obsolete type for 5⅓"" Bernoulli Box II disks" +"Ditto",342, +"DittoMax",343, +"Jaz",344, +"Jaz2",345, +"PocketZip",346, +"REV120",347, +"REV35",348, +"REV70",349, +"ZIP100",350, +"ZIP250",351, +"ZIP750",352, +"Bernoulli35",353,"5⅓"" Bernoulli Box II disk with 35Mb capacity" +"Bernoulli44",354,"5⅓"" Bernoulli Box II disk with 44Mb capacity" +"Bernoulli65",355,"5⅓"" Bernoulli Box II disk with 65Mb capacity" +"Bernoulli90",356,"5⅓"" Bernoulli Box II disk with 90Mb capacity" +"Bernoulli105",357,"5⅓"" Bernoulli Box II disk with 105Mb capacity" +"Bernoulli150",358,"5⅓"" Bernoulli Box II disk with 150Mb capacity" +"Bernoulli230",359,"5⅓"" Bernoulli Box II disk with 230Mb capacity" +"CompactCassette",360, +"Data8",361, +"MiniDV",362, +"Dcas25",363,"D/CAS-25: Digital data on Compact Cassette form factor, special magnetic media, 9-track" +"Dcas85",364,"D/CAS-85: Digital data on Compact Cassette form factor, special magnetic media, 17-track" +"Dcas103",365,"D/CAS-103: Digital data on Compact Cassette form factor, special magnetic media, 21-track" +"CFast",370, +"CompactFlash",371, +"CompactFlashType2",372, +"DigitalAudioTape",380, +"DAT160",381, +"DAT320",382, +"DAT72",383, +"DDS1",384, +"DDS2",385, +"DDS3",386, +"DDS4",387, +"CompactTapeI",390, +"CompactTapeII",391, +"DECtapeII",392, +"DLTtapeIII",393, +"DLTtapeIIIxt",394, +"DLTtapeIV",395, +"DLTtapeS4",396, +"SDLT1",397, +"SDLT2",398, +"VStapeI",399, +"Exatape15m",400, +"Exatape22m",401, +"Exatape22mAME",402, +"Exatape28m",403, +"Exatape40m",404, +"Exatape45m",405, +"Exatape54m",406, +"Exatape75m",407, +"Exatape76m",408, +"Exatape80m",409, +"Exatape106m",410, +"Exatape160mXL",411, +"Exatape112m",412, +"Exatape125m",413, +"Exatape150m",414, +"Exatape170m",415, +"Exatape225m",416, +"ExpressCard34",420, +"ExpressCard54",421, +"PCCardTypeI",422, +"PCCardTypeII",423, +"PCCardTypeIII",424, +"PCCardTypeIV",425, +"EZ135",430,"SyQuest 135Mb cartridge for use in EZ135 and EZFlyer drives" +"EZ230",431,"SyQuest EZFlyer 230Mb cartridge for use in EZFlyer drive" +"Quest",432,"SyQuest 4.7Gb for use in Quest drive" +"SparQ",433,"SyQuest SparQ 1Gb cartridge" +"SQ100",434,"SyQuest 5Mb cartridge for SQ306RD drive" +"SQ200",435,"SyQuest 10Mb cartridge for SQ312RD drive" +"SQ300",436,"SyQuest 15Mb cartridge for SQ319RD drive" +"SQ310",437,"SyQuest 105Mb cartridge for SQ3105 and SQ3270 drives" +"SQ327",438,"SyQuest 270Mb cartridge for SQ3270 drive" +"SQ400",439,"SyQuest 44Mb cartridge for SQ555, SQ5110 and SQ5200C/SQ200 drives" +"SQ800",440,"SyQuest 88Mb cartridge for SQ5110 and SQ5200C/SQ200 drives" +"SQ1500",441,"SyQuest 1.5Gb cartridge for SyJet drive" +"SQ2000",442,"SyQuest 200Mb cartridge for use in SQ5200C drive" +"SyJet",443,"SyQuest 1.5Gb cartridge for SyJet drive" +"FamicomGamePak",450, +"GameBoyAdvanceGamePak",451, +"GameBoyGamePak",452, +"GOD",453,"Nintendo GameCube Optical Disc" +"N64DD",454, +"N64GamePak",455, +"NESGamePak",456, +"Nintendo3DSGameCard",457, +"NintendoDiskCard",458, +"NintendoDSGameCard",459, +"NintendoDSiGameCard",460, +"SNESGamePak",461, +"SNESGamePakUS",462, +"WOD",463,"Nintendo Wii Optical Disc" +"WUOD",464,"Nintendo Wii U Optical Disc" +"SwitchGameCard",465, +"IBM3470",470, +"IBM3480",471, +"IBM3490",472, +"IBM3490E",473, +"IBM3592",474, +"LTO",480, +"LTO2",481, +"LTO3",482, +"LTO3WORM",483, +"LTO4",484, +"LTO4WORM",485, +"LTO5",486, +"LTO5WORM",487, +"LTO6",488, +"LTO6WORM",489, +"LTO7",490, +"LTO7WORM",491, +"MemoryStick",510, +"MemoryStickDuo",511, +"MemoryStickMicro",512, +"MemoryStickPro",513, +"MemoryStickProDuo",514, +"microSD",520, +"miniSD",521, +"SecureDigital",522, +"MMC",530, +"MMCmicro",531, +"RSMMC",532, +"MMCplus",533, +"MMCmobile",534, +"MLR1",540, +"MLR1SL",541, +"MLR3",542, +"SLR1",543, +"SLR2",544, +"SLR3",545, +"SLR32",546, +"SLR32SL",547, +"SLR4",548, +"SLR5",549, +"SLR5SL",550, +"SLR6",551, +"SLRtape7",552, +"SLRtape7SL",553, +"SLRtape24",554, +"SLRtape24SL",555, +"SLRtape40",556, +"SLRtape50",557, +"SLRtape60",558, +"SLRtape75",559, +"SLRtape100",560, +"SLRtape140",561, +"QIC11",570, +"QIC120",571, +"QIC1350",572, +"QIC150",573, +"QIC24",574, +"QIC3010",575, +"QIC3020",576, +"QIC3080",577, +"QIC3095",578, +"QIC320",579, +"QIC40",580, +"QIC525",581, +"QIC80",582, +"STK4480",590, +"STK4490",591, +"STK9490",592, +"T9840A",593, +"T9840B",594, +"T9840C",595, +"T9840D",596, +"T9940A",597, +"T9940B",598, +"T10000A",599, +"T10000B",600, +"T10000C",601, +"T10000D",602, +"Travan",610, +"Travan1Ex",611, +"Travan3",612, +"Travan3Ex",613, +"Travan4",614, +"Travan5",615, +"Travan7",616, +"VXA1",620, +"VXA2",621, +"VXA3",622, +"ECMA_153",630,"5,25"", M.O., WORM, 650Mb, 318750 sectors, 1024 bytes/sector, ECMA-153, ISO 11560" +"ECMA_153_512",631,"5,25"", M.O., WORM, 600Mb, 581250 sectors, 512 bytes/sector, ECMA-153, ISO 11560" +"ECMA_154",632,"3,5"", M.O., RW, 128Mb, 248826 sectors, 512 bytes/sector, ECMA-154, ISO 10090" +"ECMA_183_512",633,"5,25"", M.O., RW/WORM, 1Gb, 904995 sectors, 512 bytes/sector, ECMA-183, ISO 13481" +"ECMA_183",634,"5,25"", M.O., RW/WORM, 1Gb, 498526 sectors, 1024 bytes/sector, ECMA-183, ISO 13481" +"ECMA_184_512",635,"5,25"", M.O., RW/WORM, 1.2Gb, 1165600 sectors, 512 bytes/sector, ECMA-184, ISO 13549" +"ECMA_184",636,"5,25"", M.O., RW/WORM, 1.3Gb, 639200 sectors, 1024 bytes/sector, ECMA-184, ISO 13549" +"ECMA_189",637,"300mm, M.O., WORM, ??? sectors, 1024 bytes/sector, ECMA-189, ISO 13614" +"ECMA_190",638,"300mm, M.O., WORM, ??? sectors, 1024 bytes/sector, ECMA-190, ISO 13403" +"ECMA_195",639,"5,25"", M.O., RW/WORM, 936921 or 948770 sectors, 1024 bytes/sector, ECMA-195, ISO 13842" +"ECMA_195_512",640,"5,25"", M.O., RW/WORM, 1644581 or 1647371 sectors, 512 bytes/sector, ECMA-195, ISO 13842" +"ECMA_201",641,"3,5"", M.O., 446325 sectors, 512 bytes/sector, ECMA-201, ISO 13963" +"ECMA_201_ROM",642,"3,5"", M.O., 429975 sectors, 512 bytes/sector, embossed, ISO 13963" +"ECMA_223",643,"3,5"", M.O., 371371 sectors, 1024 bytes/sector, ECMA-223" +"ECMA_223_512",644,"3,5"", M.O., 694929 sectors, 512 bytes/sector, ECMA-223" +"ECMA_238",645,"5,25"", M.O., 1244621 sectors, 1024 bytes/sector, ECMA-238, ISO 15486" +"ECMA_239",646,"3,5"", M.O., 310352, 320332 or 321100 sectors, 2048 bytes/sector, ECMA-239, ISO 15498" +"ECMA_260",647,"356mm, M.O., 14476734 sectors, 1024 bytes/sector, ECMA-260, ISO 15898" +"ECMA_260_Double",648,"356mm, M.O., 24445990 sectors, 1024 bytes/sector, ECMA-260, ISO 15898" +"ECMA_280",649,"5,25"", M.O., 1128134 sectors, 2048 bytes/sector, ECMA-280, ISO 18093" +"ECMA_317",650,"300mm, M.O., 7355716 sectors, 2048 bytes/sector, ECMA-317, ISO 20162" +"ECMA_322",651,"5,25"", M.O., 1095840 sectors, 4096 bytes/sector, ECMA-322, ISO 22092, 9.1Gb/cart" +"ECMA_322_2k",652,"5,25"", M.O., 2043664 sectors, 2048 bytes/sector, ECMA-322, ISO 22092, 8.6Gb/cart" +"GigaMo",653,"3,5"", M.O., 605846 sectors, 2048 bytes/sector, Cherry Book, GigaMo, ECMA-351, ISO 17346" +"GigaMo2",654,"3,5"", M.O., 1063146 sectors, 2048 bytes/sector, Cherry Book 2, GigaMo 2, ECMA-353, ISO 22533" +"ISO_15286",655,"5,25"", M.O., 1263472 sectors, 2048 bytes/sector, ISO 15286, 5.2Gb/cart" +"ISO_15286_1024",656,"5,25"", M.O., 2319786 sectors, 1024 bytes/sector, ISO 15286, 4.8Gb/cart" +"ISO_15286_512",657,"5,25"", M.O., ??????? sectors, 512 bytes/sector, ISO 15286, 4.1Gb/cart" +"ISO_10089",658,"5,25"", M.O., 314569 sectors, 1024 bytes/sector, ISO 10089, 650Mb/cart" +"ISO_10089_512",659,"5,25"", M.O., ?????? sectors, 512 bytes/sector, ISO 10089, 594Mb/cart" +"CompactFloppy",660, +"DemiDiskette",661, +"Floptical",662,"3.5"", 652 tracks, 2 sides, 512 bytes/sector, Floptical, ECMA-207, ISO 14169" +"HiFD",663, +"QuickDisk",664, +"UHD144",665, +"VideoFloppy",666, +"Wafer",667, +"ZXMicrodrive",668, +"BeeCard",670, +"Borsu",671, +"DataStore",672, +"DIR",673, +"DST",674, +"DTF",675, +"DTF2",676, +"Flextra3020",677, +"Flextra3225",678, +"HiTC1",679, +"HiTC2",680, +"LT1",681, +"MiniCard",872, +"Orb",683, +"Orb5",684, +"SmartMedia",685, +"xD",686, +"XQD",687, +"DataPlay",688, +"AppleProfile",690, +"AppleWidget",691, +"AppleHD20",692, +"PriamDataTower",693, +"Pippin",694, +"RA60",700,"2382 cylinders, 4 tracks/cylinder, 42 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 204890112 bytes" +"RA80",701,"546 cylinders, 14 tracks/cylinder, 31 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 121325568 bytes" +"RA81",702,"1248 cylinders, 14 tracks/cylinder, 51 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 456228864 bytes" +"RC25",703,"302 cylinders, 4 tracks/cylinder, 42 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 25976832 bytes" +"RD31",704,"615 cylinders, 4 tracks/cylinder, 17 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 21411840 bytes" +"RD32",705,"820 cylinders, 6 tracks/cylinder, 17 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 42823680 bytes" +"RD51",706,"306 cylinders, 4 tracks/cylinder, 17 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 10653696 bytes" +"RD52",707,"480 cylinders, 7 tracks/cylinder, 18 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 30965760 bytes" +"RD53",708,"1024 cylinders, 7 tracks/cylinder, 18 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 75497472 bytes" +"RD54",709,"1225 cylinders, 8 tracks/cylinder, 18 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 159936000 bytes" +"RK06",710,"411 cylinders, 3 tracks/cylinder, 22 sectors/track, 256 words/sector, 16 bits/word, 512 bytes/sector, 13888512 bytes" +"RK06_18",711,"411 cylinders, 3 tracks/cylinder, 20 sectors/track, 256 words/sector, 18 bits/word, 576 bytes/sector, 14204160 bytes" +"RK07",712,"815 cylinders, 3 tracks/cylinder, 22 sectors/track, 256 words/sector, 16 bits/word, 512 bytes/sector, 27540480 bytes" +"RK07_18",713,"815 cylinders, 3 tracks/cylinder, 20 sectors/track, 256 words/sector, 18 bits/word, 576 bytes/sector, 28166400 bytes" +"RM02",714,"823 cylinders, 5 tracks/cylinder, 32 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 67420160 bytes" +"RM03",715,"823 cylinders, 5 tracks/cylinder, 32 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 67420160 bytes" +"RM05",716,"823 cylinders, 19 tracks/cylinder, 32 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 256196608 bytes" +"RP02",717,"203 cylinders, 10 tracks/cylinder, 22 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 22865920 bytes" +"RP02_18",718,"203 cylinders, 10 tracks/cylinder, 20 sectors/track, 128 words/sector, 36 bits/word, 576 bytes/sector, 23385600 bytes" +"RP03",719,"400 cylinders, 10 tracks/cylinder, 22 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 45056000 bytes" +"RP03_18",720,"400 cylinders, 10 tracks/cylinder, 20 sectors/track, 128 words/sector, 36 bits/word, 576 bytes/sector, 46080000 bytes" +"RP04",721,"411 cylinders, 19 tracks/cylinder, 22 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 87960576 bytes" +"RP04_18",722,"411 cylinders, 19 tracks/cylinder, 20 sectors/track, 128 words/sector, 36 bits/word, 576 bytes/sector, 89959680 bytes" +"RP05",723,"411 cylinders, 19 tracks/cylinder, 22 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 87960576 bytes" +"RP05_18",724,"411 cylinders, 19 tracks/cylinder, 20 sectors/track, 128 words/sector, 36 bits/word, 576 bytes/sector, 89959680 bytes" +"RP06",725,"815 cylinders, 19 tracks/cylinder, 22 sectors/track, 128 words/sector, 32 bits/word, 512 bytes/sector, 174423040 bytes" +"RP06_18",726,"815 cylinders, 19 tracks/cylinder, 20 sectors/track, 128 words/sector, 36 bits/word, 576 bytes/sector, 178387200 bytes" +"LS120",730, +"LS240",731, +"FD32MB",732, +"RDX",733, +"RDX320",734,"Imation 320Gb RDX" +"VideoNow",740, +"VideoNowColor",741, +"VideoNowXp",742, +"Bernoulli10",750,"8""x11"" Bernoulli Box disk with 10Mb capacity" +"Bernoulli20",751,"8""x11"" Bernoulli Box disk with 20Mb capacity" +"BernoulliBox2_20",752,"5⅓"" Bernoulli Box II disk with 20Mb capacity" +"KodakVerbatim3",760, +"KodakVerbatim6",761, +"KodakVerbatim12",762, +"ProfessionalDisc",770,"Professional Disc for video, single layer, rewritable, 23Gb" +"ProfessionalDiscDual",771,"Professional Disc for video, dual layer, rewritable, 50Gb" +"ProfessionalDiscTriple",772,"Professional Disc for video, triple layer, rewritable, 100Gb" +"ProfessionalDiscQuad",773,"Professional Disc for video, quad layer, write once, 128Gb" +"PDD",774,"Professional Disc for DATA, single layer, rewritable, 23Gb" +"PDD_WORM",775,"Professional Disc for DATA, single layer, write once, 23Gb" +"ArchivalDisc",776,"Archival Disc, 1st gen., 300Gb" +"ArchivalDisc2",777,"Archival Disc, 2nd gen., 500Gb" +"ArchivalDisc3",778,"Archival Disc, 3rd gen., 1Tb" +"ODC300R",779,"Optical Disc archive, 1st gen., write once, 300Gb" +"ODC300RE",780,"Optical Disc archive, 1st gen., rewritable, 300Gb" +"ODC600R",781,"Optical Disc archive, 2nd gen., write once, 600Gb" +"ODC600RE",782,"Optical Disc archive, 2nd gen., rewritable, 600Gb" +"ODC1200RE",783,"Optical Disc archive, 3rd gen., rewritable, 1200Gb" +"ODC1500R",784,"Optical Disc archive, 3rd gen., write once, 1500Gb" +"ODC3300R",785,"Optical Disc archive, 4th gen., write once, 3300Gb" +"ODC5500R",786,"Optical Disc archive, 5th gen., write once, 5500Gb" +"ECMA_322_1k",800,"5,25"", M.O., 4383356 sectors, 1024 bytes/sector, ECMA-322, ISO 22092, 9.1Gb/cart" +"ECMA_322_512",801,"5,25"", M.O., ??????? sectors, 512 bytes/sector, ECMA-322, ISO 22092, 9.1Gb/cart" +"ISO_14517",802,"5,25"", M.O., 1273011 sectors, 1024 bytes/sector, ISO 14517, 2.6Gb/cart" +"ISO_14517_512",803,"5,25"", M.O., 2244958 sectors, 512 bytes/sector, ISO 14517, 2.3Gb/cart" diff --git a/Aaru.CommonTypes/MediaType.ods b/Aaru.CommonTypes/MediaType.ods new file mode 100644 index 0000000..3581ea6 Binary files /dev/null and b/Aaru.CommonTypes/MediaType.ods differ diff --git a/Aaru.CommonTypes/MediaTypeFromDevice/FromAta.cs b/Aaru.CommonTypes/MediaTypeFromDevice/FromAta.cs new file mode 100644 index 0000000..0716e43 --- /dev/null +++ b/Aaru.CommonTypes/MediaTypeFromDevice/FromAta.cs @@ -0,0 +1,73 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : FromAta.cs +// Author(s) : Natalia Portillo +// +// Component : Aaru common types. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using Aaru.Console; + +namespace Aaru.CommonTypes +{ + public static partial class MediaTypeFromDevice + { + /// Gets the media type from an ATA (not ATAPI) device + /// Manufacturer string + /// Model string + /// Is the device removable? + /// Does the device self-identify as CompactFlash? + /// Is the device attached thru PCMCIA or CardBus? + /// Number of blocks in device + /// The media type + public static MediaType GetFromAta(string manufacturer, string model, bool removable, bool compactFlash, + bool pcmcia, ulong blocks) + { + if(!removable) + { + if(compactFlash) + return MediaType.CompactFlash; + + return pcmcia ? MediaType.PCCardTypeI : MediaType.GENERIC_HDD; + } + + if(manufacturer.ToLowerInvariant() == "syquest" && + model.ToLowerInvariant() == "sparq" && + blocks == 1961069) + { + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is SyQuest, media has 1961069 blocks of 512 bytes, setting media type to SparQ."); + + return MediaType.SparQ; + } + + return MediaType.Unknown; + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/MediaTypeFromDevice/FromMmc.cs b/Aaru.CommonTypes/MediaTypeFromDevice/FromMmc.cs new file mode 100644 index 0000000..acc7c1b --- /dev/null +++ b/Aaru.CommonTypes/MediaTypeFromDevice/FromMmc.cs @@ -0,0 +1,179 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : FromMmc.cs +// Author(s) : Natalia Portillo +// +// Component : Aaru common types. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using Aaru.Console; + +namespace Aaru.CommonTypes +{ + /// Gets the media type from a real device + public static partial class MediaTypeFromDevice + { + /// Gets the media type from an SCSI MultiMedia Commands compliant device + /// Model string + /// Medium type from MODE SENSE + /// Density code from MODE SENSE + /// Number of blocks in media + /// Size of a block in bytes + /// Is the device USB attached + /// Is the media an optical disc + /// Media type + static MediaType GetFromMmc(string model, byte mediumType, byte densityCode, ulong blocks, uint blockSize, + bool isUsb, bool opticalDisc) + { + switch(mediumType) + { + case 0x00: + if(blockSize == 512) + if(blocks == 1281856) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to WORM PD-650.", + mediumType, blocks, blockSize); + + return MediaType.PD650_WORM; + } + else + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to PD-650.", + mediumType, blocks, blockSize); + + return MediaType.PD650; + } + else + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, setting media type to Compact Disc.", + mediumType); + + return MediaType.CD; + } + case 0x01: + case 0x05: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, setting media type to CD-ROM.", + mediumType); + + return MediaType.CDROM; + case 0x02: + case 0x06: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, setting media type to Compact Disc Digital Audio.", + mediumType); + + return MediaType.CDDA; + case 0x03: + case 0x07: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, setting media type to CD+.", mediumType); + + return MediaType.CDPLUS; + case 0x04: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, setting media type to Photo CD.", + mediumType); + + return MediaType.PCD; + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, setting media type to CD-R.", mediumType); + + return MediaType.CDR; + case 0x20: + case 0x21: + case 0x22: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, setting media type to CD-RW.", mediumType); + + return MediaType.CDRW; + case 0x40 when isUsb && !opticalDisc: + case 0x41 when isUsb && !opticalDisc: + case 0x42 when isUsb && !opticalDisc: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h and device is USB, setting media type to Flash Drive.", + mediumType); + + return MediaType.FlashDrive; + case 0x80: + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + switch(densityCode) + { + case 0x42: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive starts with \"ult\", setting media type to LTO-2.", + mediumType, densityCode); + + return MediaType.LTO2; + case 0x44: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive starts with \"ult\", setting media type to LTO-2.", + mediumType, densityCode); + + return MediaType.LTO3; + case 0x46: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive starts with \"ult\", setting media type to LTO-2.", + mediumType, densityCode); + + return MediaType.LTO4; + case 0x58: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive starts with \"ult\", setting media type to LTO-2.", + mediumType, densityCode); + + return MediaType.LTO5; + } + + break; + } + + return MediaType.Unknown; + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/MediaTypeFromDevice/FromOdc.cs b/Aaru.CommonTypes/MediaTypeFromDevice/FromOdc.cs new file mode 100644 index 0000000..757a878 --- /dev/null +++ b/Aaru.CommonTypes/MediaTypeFromDevice/FromOdc.cs @@ -0,0 +1,336 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : FromOdc.cs +// Author(s) : Natalia Portillo +// +// Component : Aaru common types. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using Aaru.Console; + +namespace Aaru.CommonTypes +{ + public static partial class MediaTypeFromDevice + { + /// Gets the device type from a SCSI Optical Device + /// Medium type from MODE SENSE + /// Number of blocks in device + /// Size in bytes of a block + /// Media type + static MediaType GetFromOdc(byte mediumType, ulong blocks, uint blockSize) + { + if(mediumType != 0x01 && + mediumType != 0x02 && + mediumType != 0x03 && + mediumType != 0x05 && + mediumType != 0x07) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, setting media type to unknown magneto-optical.", + mediumType); + + return MediaType.UnknownMO; + } + + switch(blockSize) + { + case 512: + { + switch(blocks) + { + case 248826: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-154 / ISO 10090 conforming 3½\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_154; + case 429975: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-201 / ISO 13963 conforming 3½\" embossed magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_201_ROM; + case 446325: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-201 / ISO 13963 conforming 3½\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_201; + case 694929: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-223 conforming 3½\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_223_512; + case 904995: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-183 / ISO 13481 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_183_512; + case 1128772: + case 1163337: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-184 / ISO 13549 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_184_512; + case 1281856: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to WORM PD-650.", + mediumType, blocks, blockSize); + + return MediaType.PD650_WORM; + case 1298496: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to PD-650.", + mediumType, blocks, blockSize); + + return MediaType.PD650; + case 1644581: + case 1647371: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-195 / ISO 13842 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_195_512; + case 2244958: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ISO 14517 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ISO_14517_512; + default: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to unknown magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.UnknownMO; + } + } + + case 1024: + { + switch(blocks) + { + case 314569: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ISO 10089 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ISO_10089; + case 371371: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-223 conforming 3½\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_223; + case 498526: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-184 / ISO 13549 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_183; + case 603466: + case 637041: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-184 / ISO 13549 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_184; + case 936921: + case 948770: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-195 / ISO 13842 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_195; + case 1244621: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-238 / ISO 15486 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_238; + case 1273011: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ISO 14517 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ISO_14517; + case 2319786: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ISO 15286 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ISO_15286_1024; + case 4383356: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-322 / ISO 22092 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_322_1k; + case 14476734: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-260 / ISO 15898 conforming 356mm magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_260; + case 24445990: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-260 / ISO 15898 conforming 356mm magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_260_Double; + default: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to unknown magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.UnknownMO; + } + } + + case 2048: + { + switch(blocks) + { + case 310352: // Found in real media + case 318988: + case 320332: + case 321100: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-239 / ISO 15498 conforming 3½\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_239; + case 605846: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to GigaMO 3½\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.GigaMo; + case 1063146: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to GigaMO 2 3½\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.GigaMo2; + case 1128134: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-280 / ISO 18093 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_280; + case 1263472: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ISO 15286 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ISO_15286; + case 2043664: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-322 / ISO 22092 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_322_2k; + case 7355716: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-317 / ISO 20162 conforming 300mm magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_317; + default: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to unknown magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.UnknownMO; + } + } + + case 4096: + { + switch(blocks) + { + case 1095840: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-322 / ISO 22092 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_322; + default: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to unknown magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.UnknownMO; + } + } + + case 8192: + { + switch(blocks) + { + case 1834348: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to UDO.", + mediumType, blocks, blockSize); + + return MediaType.UDO; + case 3668759: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to WORM UDO2.", + mediumType, blocks, blockSize); + + return MediaType.UDO2_WORM; + case 3669724: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to UDO2.", + mediumType, blocks, blockSize); + + return MediaType.UDO2; + default: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to unknown magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.UnknownMO; + } + } + + default: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to unknown magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.UnknownMO; + } + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/MediaTypeFromDevice/FromSbc.cs b/Aaru.CommonTypes/MediaTypeFromDevice/FromSbc.cs new file mode 100644 index 0000000..2e6ba70 --- /dev/null +++ b/Aaru.CommonTypes/MediaTypeFromDevice/FromSbc.cs @@ -0,0 +1,943 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : FromSbc.cs +// Author(s) : Natalia Portillo +// +// Component : Aaru common types. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using Aaru.Console; + +namespace Aaru.CommonTypes +{ + public static partial class MediaTypeFromDevice + { + /// Gets the media type from a SCSI Block Commands compliant device + /// Vendor string + /// Model string + /// Medium type from MODE SENSE + /// Number of blocks in device + /// Size of a block in bytes + /// Media type + static MediaType GetFromSbc(string vendor, string model, byte mediumType, ulong blocks, uint blockSize) + { + if(vendor.ToLowerInvariant() == "syquest" && + model.StartsWith("syjet", StringComparison.OrdinalIgnoreCase)) + { + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is SyQuest, drive model is SyJet, setting media type to SyJet."); + + return MediaType.SyJet; + } + + switch(mediumType) + { + case 0x09: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-54 formatted 8\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_54; + case 0x0A: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-59 formatted 8\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_59; + case 0x0B: + switch(blockSize) + { + case 256: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-69 formatted 8\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_69_26; + case 512: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-69 formatted 8\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_69_15; + case 1024: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-69 formatted 8\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_69_8; + } + + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to unknown.", + mediumType, blocks, blockSize); + + return MediaType.Unknown; + case 0x0E: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-66 formatted 5¼\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_66; + case 0x12: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-70 formatted 5¼\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_70; + case 0x16: + switch(blockSize) + { + case 256: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-78 formatted 5¼\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_78; + case 512: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-78 formatted 5¼\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_78_2; + } + + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to unknown.", + mediumType, blocks, blockSize); + + return MediaType.Unknown; + case 0x1A: + switch(blockSize) + { + case 256: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-99 formatted 5¼\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_99_26; + case 512: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-99 formatted 5¼\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_99_15; + case 1024: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-99 formatted 5¼\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_99_8; + } + + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to unknown.", + mediumType, blocks, blockSize); + + return MediaType.Unknown; + case 0x1E: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 3½\" double density floppy.", + mediumType, blocks, blockSize); + + return MediaType.DOS_35_DS_DD_9; + case 0x41: + switch(blocks) + { + case 58620544: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to 120Gb REV.", + mediumType, blocks, blockSize); + + return MediaType.REV120; + case 34185728: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to 70Gb REV.", + mediumType, blocks, blockSize); + + return MediaType.REV70; + case 17090880: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to 35Gb REV.", + mediumType, blocks, blockSize); + + return MediaType.REV35; + } + + break; + case 0x93: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to PC-98 formatted 3½\" high density floppy (15 sectors).", + mediumType, blocks, blockSize); + + return MediaType.NEC_35_HD_15; + case 0x94: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 3½\" high density floppy.", + mediumType, blocks, blockSize); + + return MediaType.DOS_35_HD; + } + + switch(blockSize) + { + case 128: + switch(blocks) + { + case 720: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Atari formatted 5¼\" single density floppy.", + mediumType, blocks, blockSize); + + return MediaType.ATARI_525_SD; + case 1040: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Atari formatted 5¼\" double density floppy.", + mediumType, blocks, blockSize); + + return MediaType.ATARI_525_DD; + case 1898: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 8\" (33FD) floppy.", + mediumType, blocks, blockSize); + + return MediaType.IBM33FD_128; + case 2002: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-54 formatted 8\" single density floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_54; + case 3848: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 8\" (43FD) floppy.", + mediumType, blocks, blockSize); + + return MediaType.IBM43FD_128; + case 4004: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-59 formatted 8\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_59; + } + + break; + case 256: + switch(blocks) + { + case 322: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-56 formatted 5¼\" double density floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_66; + case 400: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Acorn formatted 5¼\" single density floppy.", + mediumType, blocks, blockSize); + + return MediaType.ACORN_525_SS_SD_40; + case 455: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Apple DOS 3.2 formatted 5¼\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.Apple32SS; + case 560: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Apple DOS 3.3 formatted 5¼\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.Apple33SS; + case 640: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Acorn formatted 5¼\" double density floppy.", + mediumType, blocks, blockSize); + + return MediaType.ACORN_525_SS_DD_40; + case 720: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Atari formatted 5¼\" double density floppy.", + mediumType, blocks, blockSize); + + return MediaType.ATARI_525_DD; + case 800: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Acorn formatted 5¼\" double density floppy (80 tracks).", + mediumType, blocks, blockSize); + + return MediaType.ACORN_525_SS_SD_80; + case 910: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Apple DOS 3.2 formatted 5¼\" double sided floppy.", + mediumType, blocks, blockSize); + + return MediaType.Apple32DS; + case 1120: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Apple DOS 3.3 formatted 5¼\" double sided floppy.", + mediumType, blocks, blockSize); + + return MediaType.Apple33DS; + case 1121: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 8\" (33FD) floppy.", + mediumType, blocks, blockSize); + + return MediaType.IBM33FD_256; + case 1280 when mediumType == 0x01: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Acorn formatted 5¼\" double density floppy with 80 tracks.", + mediumType, blocks, blockSize); + + return MediaType.ACORN_525_SS_DD_80; + case 1280: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-70 formatted 5¼\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_70; + case 2002: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to DEC RX02 floppy.", + mediumType, blocks, blockSize); + + return MediaType.RX02; + case 2560: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-78 formatted 5¼\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_78; + case 3848: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 8\" (53FD) floppy.", + mediumType, blocks, blockSize); + + return MediaType.IBM53FD_256; + case 4004: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-99 formatted 5¼\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_99_26; + case 39168 when vendor.StartsWith("iomega", StringComparison.OrdinalIgnoreCase): + case 41004 when vendor.StartsWith("iomega", StringComparison.OrdinalIgnoreCase): + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is IOMEGA, media has {0} blocks of 256 bytes, setting media type to 10Mb Bernoulli Box.", + blocks); + + return MediaType.Bernoulli10; + } + + break; + case 319: + switch(blocks) + { + case 256: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 8\" (23FD) floppy.", + mediumType, blocks, blockSize); + + return MediaType.IBM23FD; + } + + break; + case 512: + switch(blocks) + { + case 320: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 5¼\" double density single sided floppy (8 sectors).", + mediumType, blocks, blockSize); + + return MediaType.DOS_525_SS_DD_8; + case 360: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 5¼\" double density single sided floppy.", + mediumType, blocks, blockSize); + + return MediaType.DOS_525_SS_DD_9; + case 610: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 8\" (33FD) floppy.", + mediumType, blocks, blockSize); + + return MediaType.IBM33FD_512; + case 630 when mediumType == 0x01: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Apricot formatted 3½\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.Apricot_35; + case 640 when mediumType == 0x01: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 3½\" double density single sided floppy (8 sectors).", + mediumType, blocks, blockSize); + + return MediaType.DOS_35_SS_DD_8; + case 640: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 5¼\" double density floppy (8 sectors).", + mediumType, blocks, blockSize); + + return MediaType.DOS_525_DS_DD_8; + case 720 when mediumType == 0x01: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 3½\" double density single sided floppy.", + mediumType, blocks, blockSize); + + return MediaType.DOS_35_SS_DD_9; + case 720: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 5¼\" double density floppy.", + mediumType, blocks, blockSize); + + return MediaType.DOS_525_DS_DD_9; + case 800: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Apple formatted 3½\" double density single sided floppy.", + mediumType, blocks, blockSize); + + return MediaType.AppleSonySS; + case 1280: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 3½\" double density floppy (8 sectors).", + mediumType, blocks, blockSize); + + return MediaType.DOS_35_DS_DD_8; + case 1440: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 3½\" double density floppy.", + mediumType, blocks, blockSize); + + return MediaType.DOS_35_DS_DD_9; + case 1640: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to FDFORMAT formatted 3½\" double density floppy.", + mediumType, blocks, blockSize); + + return MediaType.FDFORMAT_35_DD; + case 1760: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Amiga formatted 3½\" double density floppy.", + mediumType, blocks, blockSize); + + return MediaType.CBM_AMIGA_35_DD; + case 2242: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 8\" (53FD) floppy.", + mediumType, blocks, blockSize); + + return MediaType.IBM53FD_512; + case 2332: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-99 formatted 5¼\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_99_15; + case 2400: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 5¼\" high density floppy.", + mediumType, blocks, blockSize); + + return MediaType.DOS_525_HD; + case 2788: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to FDFORMAT formatted 5¼\" high density floppy.", + mediumType, blocks, blockSize); + + return MediaType.FDFORMAT_525_HD; + case 2880: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 3½\" high density floppy.", + mediumType, blocks, blockSize); + + return MediaType.DOS_35_HD; + case 3360: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Microsoft DMF formatted 3½\" high density floppy.", + mediumType, blocks, blockSize); + + return MediaType.DMF; + case 3444: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to FDFORMAT formatted 3½\" high density floppy.", + mediumType, blocks, blockSize); + + return MediaType.FDFORMAT_35_HD; + case 3520: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Amiga formatted 3½\" high density floppy.", + mediumType, blocks, blockSize); + + return MediaType.CBM_AMIGA_35_HD; + case 5760: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 3½\" extra density floppy.", + mediumType, blocks, blockSize); + + return MediaType.DOS_35_ED; + case 40662 when mediumType == 0x20: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Floptical.", + mediumType, blocks, blockSize); + + return MediaType.Floptical; + case 65536 when model.ToLowerInvariant().StartsWith("ls-", StringComparison.Ordinal): + AaruConsole.DebugWriteLine("Media detection", + "Drive model is LS (SuperDisk), media has 65536 blocks of 512 bytes, setting media type to FD32MB."); + + return MediaType.FD32MB; + case 78882 when vendor.StartsWith("iomega", StringComparison.OrdinalIgnoreCase): + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is IOMEGA, media has 78882 blocks of 512 bytes, setting media type to PocketZIP."); + + return MediaType.PocketZip; + case 86700 when vendor.ToLowerInvariant() == "syquest": + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is SyQuest, media has 86700 blocks of 512 bytes, setting media type to SQ400."); + + return MediaType.SQ400; + case 87040 when vendor.StartsWith("iomega", StringComparison.OrdinalIgnoreCase): + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is IOMEGA, media has 87040 blocks of 512 bytes, setting media type to 44Mb Bernoulli Box II."); + + return MediaType.Bernoulli44; + case 173456 when vendor.ToLowerInvariant() == "syquest": + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is SyQuest, media has 173456 blocks of 512 bytes, setting media type to SQ800."); + + return MediaType.SQ800; + case 175856 when vendor.StartsWith("iomega", StringComparison.OrdinalIgnoreCase): + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is IOMEGA, media has 175856 blocks of 512 bytes, setting media type to 90Mb Bernoulli Box II."); + + return MediaType.Bernoulli90; + case 196608 when model.ToLowerInvariant().StartsWith("zip", StringComparison.OrdinalIgnoreCase): + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is IOMEGA, drive model is ZIP, media has 196608 blocks of 512 bytes, setting media type to 100Mb ZIP."); + + return MediaType.ZIP100; + + case 215440 when vendor.ToLowerInvariant() == "syquest": + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is SyQuest, media has 215440 blocks of 512 bytes, setting media type to SQ310."); + + return MediaType.SQ310; + case 246528 when model.ToLowerInvariant().StartsWith("ls-", StringComparison.Ordinal): + AaruConsole.DebugWriteLine("Media detection", + "Drive model is LS (SuperDisk), media has 246528 blocks of 512 bytes, setting media type to LS-120."); + + return MediaType.LS120; + case 248826 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-154 / ISO 10090 conforming 3½\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_154; + case 262144 when vendor.ToLowerInvariant() == "syquest": + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is SyQuest, media has 262144 blocks of 512 bytes, setting media type to EZ135."); + + return MediaType.EZ135; + case 294918 when vendor.StartsWith("iomega", StringComparison.OrdinalIgnoreCase): + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is IOMEGA, media has 294918 blocks of 512 bytes, setting media type to 150Mb Bernoulli Box II."); + + return MediaType.Bernoulli150; + case 390696 when vendor.ToLowerInvariant() == "syquest": + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is SyQuest, media has 390696 blocks of 512 bytes, setting media type to SQ2000."); + + return MediaType.SQ2000; + case 393380 when model.ToLowerInvariant().StartsWith("hifd", StringComparison.Ordinal): + AaruConsole.DebugWriteLine("Media detection", + "Drive model is HiFD, media has 393380 blocks of 512 bytes, setting media type to HiFD.", + blocks, blockSize); + + return MediaType.HiFD; + case 429975 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-201 / ISO 13963 conforming 3½\" embossed magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_201_ROM; + case 446325 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-201 / ISO 13963 conforming 3½\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_201; + case 450560 when vendor.ToLowerInvariant() == "syquest": + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is SyQuest, media has 450560 blocks of 512 bytes, setting media type to EZ230."); + + return MediaType.EZ230; + case 469504 when model.ToLowerInvariant().StartsWith("ls-", StringComparison.Ordinal): + AaruConsole.DebugWriteLine("Media detection", + "Drive model is LS (SuperDisk), media has 469504 blocks of 512 bytes, setting media type to LS-240."); + + return MediaType.LS240; + case 489532 when model.ToLowerInvariant().StartsWith("zip", StringComparison.OrdinalIgnoreCase): + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is IOMEGA, drive model is ZIP, media has 489532 blocks of 512 bytes, setting media type to 250Mb ZIP."); + + return MediaType.ZIP250; + case 524288 when vendor.ToLowerInvariant() == "syquest": + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is SyQuest, media has 524288 blocks of 512 bytes, setting media type to SQ327."); + + return MediaType.SQ327; + case 694929 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-223 conforming 3½\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_223_512; + case 904995 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-183 / ISO 13481 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_183_512; + case 1128772 when mediumType == 0x01 || mediumType == 0x02: + case 1163337 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-184 / ISO 13549 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_184_512; + case 1281856 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to WORM PD-650.", + mediumType, blocks, blockSize); + + return MediaType.PD650_WORM; + case 1298496 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to PD-650.", + mediumType, blocks, blockSize); + + return MediaType.PD650; + case 1470500 + when model.ToLowerInvariant().StartsWith("zip", StringComparison.OrdinalIgnoreCase): + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is IOMEGA, drive model is ZIP, media has 489532 blocks of 512 bytes, setting media type to 250Mb ZIP."); + + return MediaType.ZIP750; + case 1644581 when mediumType == 0x01 || mediumType == 0x02: + case 1647371 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-195 / ISO 13842 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_195_512; + case 1961069 when vendor.ToLowerInvariant() == "syquest": + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is SyQuest, media has 1961069 blocks of 512 bytes, setting media type to SparQ."); + + return MediaType.SparQ; + case 2091050 when model.ToLowerInvariant().StartsWith("jaz", StringComparison.Ordinal): + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is IOMEGA, drive model is JAZ, media has 2091050 blocks of 512 bytes, setting media type to 1Gb JAZ."); + + return MediaType.Jaz; + case 2244958 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ISO 14517 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ISO_14517_512; + case 3915600 when model.ToLowerInvariant().StartsWith("jaz", StringComparison.Ordinal): + AaruConsole.DebugWriteLine("Media detection", + "Drive manufacturer is IOMEGA, drive model is JAZ, media has 3915600 blocks of 512 bytes, setting media type to 2Gb JAZ."); + + return MediaType.Jaz2; + case 4307184 when vendor.ToLowerInvariant().StartsWith("cws orb", StringComparison.Ordinal): + AaruConsole.DebugWriteLine("Media detection", + "Drive model is Castlewood Orb, media has 4307184 blocks of 512 bytes, setting media type to Orb."); + + return MediaType.Orb; + case 625134256 when model.ToLowerInvariant().StartsWith("rdx", StringComparison.Ordinal): + AaruConsole.DebugWriteLine("Media detection", + "Drive model is LS (SuperDisk), media has {0} blocks of {1} bytes, setting media type to unknown.", + blocks, blockSize); + + return MediaType.RDX320; + } + + break; + case 1024: + { + switch(blocks) + { + case 800 when mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Acorn formatted 3½\" double density floppy.", + mediumType, blocks, blockSize); + + return MediaType.ACORN_35_DS_DD; + case 1220: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to IBM formatted 8\" (53FD) floppy.", + mediumType, blocks, blockSize); + + return MediaType.IBM53FD_1024; + case 1232 when model.ToLowerInvariant().StartsWith("ls-", StringComparison.Ordinal): + AaruConsole.DebugWriteLine("Media detection", + "Drive model is LS (SuperDisk), media has 2880 blocks of 512 bytes, setting media type to PC-98 formatted 3½\" high density floppy."); + + return MediaType.NEC_35_HD_8; + case 1232: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Sharp formatted 3½\" high density floppy.", + mediumType, blocks, blockSize); + + return MediaType.SHARP_35; + case 1268: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-69 formatted 8\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_69_8; + case 1280: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to PC-98 formatted 5¼\" high density floppy.", + mediumType, blocks, blockSize); + + return MediaType.NEC_525_HD; + case 1316: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-99 formatted 5¼\" floppy.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_99_8; + case 1600 when mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Acorn formatted 3½\" high density floppy.", + mediumType, blocks, blockSize); + + return MediaType.ACORN_35_DS_HD; + case 314569 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ISO 10089 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ISO_10089; + case 371371 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-223 conforming 3½\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_223; + case 498526 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-183 / ISO 13481 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_183; + case 603466 when mediumType == 0x01 || mediumType == 0x02: + case 637041 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-184 / ISO 13549 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_184; + case 936921 when mediumType == 0x01 || mediumType == 0x02: + case 948770 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-195 / ISO 13842 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_195; + case 1244621 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-238 / ISO 15486 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_238; + case 1273011 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ISO 14517 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ISO_14517; + case 2319786 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ISO 15286 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ISO_15286_1024; + case 4383356 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-322 / ISO 22092 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_322_1k; + case 14476734 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-260 / ISO 15898 conforming 356mm magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_260; + case 24445990 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-260 / ISO 15898 conforming 356mm magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_260_Double; + } + } + + break; + case 2048: + { + switch(blocks) + { + case 112311: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to 60 minute MiniDisc.", + mediumType, blocks, blockSize); + + return MediaType.MD60; + case 138363: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to 74 minute MiniDisc.", + mediumType, blocks, blockSize); + + return MediaType.MD74; + case 149373: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to 80 minute MiniDisc.", + mediumType, blocks, blockSize); + + return MediaType.MD80; + case 310352 when mediumType == 0x01 || mediumType == 0x02: // Found in real media + case 318988 when mediumType == 0x01 || mediumType == 0x02: + case 320332 when mediumType == 0x01 || mediumType == 0x02: + case 321100 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-239 / ISO 15498 conforming 3½\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_239; + case 494023: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to Sony HiMD.", + mediumType, blocks, blockSize); + + return MediaType.HiMD; + case 605846 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to GigaMO 3½\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.GigaMo; + case 1063146 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to GigaMO 2 3½\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.GigaMo2; + case 1128134 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-280 / ISO 18093 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_280; + case 1263472 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ISO 15286 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ISO_15286; + case 2043664 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-322 / ISO 22092 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_322_2k; + case 7355716 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-317 / ISO 20162 conforming 300mm magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_317; + } + } + + break; + case 4096: + { + switch(blocks) + { + case 1095840 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to ECMA-322 / ISO 22092 conforming 5¼\" magneto-optical.", + mediumType, blocks, blockSize); + + return MediaType.ECMA_322; + } + } + + break; + case 8192: + { + switch(blocks) + { + case 1834348 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to UDO.", + mediumType, blocks, blockSize); + + return MediaType.UDO; + case 3668759 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to WORM UDO2.", + mediumType, blocks, blockSize); + + return MediaType.UDO2_WORM; + case 3669724 when mediumType == 0x01 || mediumType == 0x02: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to UDO2.", + mediumType, blocks, blockSize); + + return MediaType.UDO2; + } + } + + break; + } + + return MediaType.Unknown; + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/MediaTypeFromDevice/FromScsi.cs b/Aaru.CommonTypes/MediaTypeFromDevice/FromScsi.cs new file mode 100644 index 0000000..6571977 --- /dev/null +++ b/Aaru.CommonTypes/MediaTypeFromDevice/FromScsi.cs @@ -0,0 +1,134 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : FromScsi.cs +// Author(s) : Natalia Portillo +// +// Component : Aaru common types. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using Aaru.Console; + +namespace Aaru.CommonTypes +{ + public static partial class MediaTypeFromDevice + { + /// Tries to guess, from SCSI information, the media type of a device and/or its inserted media + /// The SCSI Peripheral Type as indicated in the INQUIRY response + /// The vendor string of the device + /// The model string of the device + /// The medium type byte from MODE SENSE + /// The density type byte from MODE SENSE + /// How many blocks are on the media + /// Size in bytes of each block + /// Device is USB + /// Is media an optical disc? + /// The media type + public static MediaType GetFromScsi(byte scsiPeripheralType, string vendor, string model, byte mediumType, + byte densityCode, ulong blocks, uint blockSize, bool isUsb, + bool opticalDisc) + { + switch(scsiPeripheralType) + { + // Direct access device + case 0x00: + // Simplified access device + case 0x0E: + if(mediumType == 0x03 || + mediumType == 0x05 || + mediumType == 0x07) + goto case 0x07; + + return GetFromSbc(vendor, model, mediumType, blocks, blockSize); + + // Sequential access device + case 0x01: + return GetFromSsc(scsiPeripheralType, vendor, model, mediumType, densityCode, blocks, blockSize); + + // Write-once device + case 0x04: + // Optical device + case 0x07: return GetFromOdc(mediumType, blocks, blockSize); + + // MultiMedia Device + case 0x05: return GetFromMmc(model, mediumType, densityCode, blocks, blockSize, isUsb, opticalDisc); + + // MD DATA drives + case 0x10 when model.StartsWith("MDM", StringComparison.Ordinal) || + model.StartsWith("MDH", StringComparison.Ordinal): + if(blockSize == 2048) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI peripheral type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to MiniDisc for Data.", + scsiPeripheralType, blocks, blockSize); + + return MediaType.MDData; + } + + switch(blocks) + { + case 57312: + AaruConsole.DebugWriteLine("Media detection", + "SCSI peripheral type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to 60 minute MiniDisc.", + scsiPeripheralType, blocks, blockSize); + + return MediaType.MD60; + case 70464: + AaruConsole.DebugWriteLine("Media detection", + "SCSI peripheral type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to 74 minute MiniDisc.", + scsiPeripheralType, blocks, blockSize); + + return MediaType.MD74; + case 76096: + AaruConsole.DebugWriteLine("Media detection", + "SCSI peripheral type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to 80 minute MiniDisc.", + scsiPeripheralType, blocks, blockSize); + + return MediaType.MD80; + } + + AaruConsole.DebugWriteLine("Media detection", + "SCSI peripheral type is {0:X2}h, media has {1} blocks of {2} bytes, setting media type to 60 minute MiniDisc.", + scsiPeripheralType, blocks, blockSize); + + return MediaType.MD; + + // Host managed zoned block device + case 0x14: + AaruConsole.DebugWriteLine("Media detection", + "SCSI peripheral type is {0:X2}h, setting media type to host managed zoned block device.", + scsiPeripheralType, blocks, blockSize); + + return MediaType.Zone_HDD; + } + + return MediaType.Unknown; + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/MediaTypeFromDevice/FromSsc.cs b/Aaru.CommonTypes/MediaTypeFromDevice/FromSsc.cs new file mode 100644 index 0000000..ef4b08c --- /dev/null +++ b/Aaru.CommonTypes/MediaTypeFromDevice/FromSsc.cs @@ -0,0 +1,1611 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : FromSsc.cs +// Author(s) : Natalia Portillo +// +// Component : Aaru common types. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using Aaru.Console; + +namespace Aaru.CommonTypes +{ + public static partial class MediaTypeFromDevice + { + /// Gets the media type from an SCSI Streaming Commands compliant device + /// Peripheral type + /// Vendor string + /// Model string + /// Medium type from MODE SENSE + /// Density code from MODE SENSE + /// Number of blocks in media + /// Size of a block in bytes + /// Media type + public static MediaType GetFromSsc(byte scsiPeripheralType, string vendor, string model, byte mediumType, + byte densityCode, ulong blocks, uint blockSize) + { + switch(mediumType) + { + case 0x00: + switch(densityCode) + { + case 0x04: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, setting media type to QIC-11.", + mediumType, densityCode); + + return MediaType.QIC11; + case 0x05: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, setting media type to QIC-24.", + mediumType, densityCode); + + return MediaType.QIC24; + case 0x09: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, setting media type to IBM 3490.", + mediumType, densityCode); + + return MediaType.IBM3490; + case 0x0F: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, setting media type to QIC-120.", + mediumType, densityCode); + + return MediaType.QIC120; + case 0x10: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, setting media type to QIC-150.", + mediumType, densityCode); + + return MediaType.QIC150; + case 0x13: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, setting media type to DDS.", + mediumType, densityCode); + + return MediaType.DDS1; + case 0x24: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, setting media type to DDS-2.", + mediumType, densityCode); + + return MediaType.DDS2; + case 0x25: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, setting media type to DDS-3.", + mediumType, densityCode); + + return MediaType.DDS3; + case 0x26: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, setting media type to DDS-4.", + mediumType, densityCode); + + return MediaType.DDS4; + case 0x28: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, setting media type to IBM 3490E.", + mediumType, densityCode); + + return MediaType.IBM3490E; + case 0x40: + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to LTO.", + mediumType, densityCode); + + return MediaType.LTO; + } + + if(model.ToLowerInvariant().StartsWith("sdz", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"sdz\" setting media type to Super AIT.", + mediumType, densityCode); + + return MediaType.SAIT1; + } + + break; + + case 0x41: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to LTO-2.", + mediumType, densityCode); + + return MediaType.LTO2; + } + + break; + } + + case 0x42: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to LTO-2.", + mediumType, densityCode); + + return MediaType.LTO2; + } + + if(vendor.ToLowerInvariant() == "stk") + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive manufacturer is StorageTek, setting media type to T9840A.", + mediumType, densityCode); + + return MediaType.T9840A; + } + + break; + } + + case 0x43: + { + if(vendor.ToLowerInvariant() == "stk") + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive manufacturer is StorageTek, setting media type to T9940A.", + mediumType, densityCode); + + return MediaType.T9940A; + } + + break; + } + + case 0x44: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to LTO-3.", + mediumType, densityCode); + + return MediaType.LTO3; + } + + if(vendor.ToLowerInvariant() == "stk") + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive manufacturer is StorageTek, setting media type to T9940B.", + mediumType, densityCode); + + return MediaType.T9940B; + } + + break; + } + + case 0x45: + { + if(vendor.ToLowerInvariant() == "stk") + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive manufacturer is StorageTek, setting media type to T9840C.", + mediumType, densityCode); + + return MediaType.T9840C; + } + + break; + } + + case 0x46: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to LTO-4.", + mediumType, densityCode); + + return MediaType.LTO4; + } + + if(vendor.ToLowerInvariant() == "stk") + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive manufacturer is StorageTek, setting media type to T9840D.", + mediumType, densityCode); + + return MediaType.T9840D; + } + + break; + } + + case 0x4A: + { + if(vendor.ToLowerInvariant() == "stk") + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive manufacturer is StorageTek, setting media type to T10000A.", + mediumType, densityCode); + + return MediaType.T10000A; + } + + break; + } + + case 0x4B: + { + if(vendor.ToLowerInvariant() == "stk") + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive manufacturer is StorageTek, setting media type to T10000B.", + mediumType, densityCode); + + return MediaType.T10000B; + } + + break; + } + + case 0x4C: + { + if(vendor.ToLowerInvariant() == "stk") + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive manufacturer is StorageTek, setting media type to T10000C.", + mediumType, densityCode); + + return MediaType.T10000C; + } + + break; + } + + case 0x4D: + { + if(vendor.ToLowerInvariant() == "stk") + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive manufacturer is StorageTek, setting media type to T10000D.", + mediumType, densityCode); + + return MediaType.T10000D; + } + + break; + } + + case 0x58: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to LTO-5.", + mediumType, densityCode); + + return MediaType.LTO5; + } + + break; + } + + // Used by some HP drives for all generations + case 0x8C: + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, setting media type to DDS.", + mediumType, densityCode); + + return MediaType.DDS1; + } + } + + break; + case 0x01: + { + switch(densityCode) + { + case 0x44: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to WORM LTO-3.", + mediumType, densityCode); + + return MediaType.LTO3WORM; + } + + break; + } + + case 0x46: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to WORM LTO-4.", + mediumType, densityCode); + + return MediaType.LTO4WORM; + } + + break; + } + + case 0x58: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to WORM LTO-5.", + mediumType, densityCode); + + return MediaType.LTO5WORM; + } + + break; + } + } + } + + break; + case 0x18: + { + switch(densityCode) + { + case 0x00: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to LTO.", + mediumType, densityCode); + + return MediaType.LTO; + } + + break; + } + + case 0x40: + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, setting media type to LTO.", + mediumType, densityCode); + + return MediaType.LTO; + } + } + } + + break; + case 0x28: + { + switch(densityCode) + { + case 0x00: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to LTO-2.", + mediumType, densityCode); + + return MediaType.LTO2; + } + + break; + } + + case 0x42: + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, setting media type to LTO-2.", + mediumType, densityCode); + + return MediaType.LTO2; + } + } + } + + break; + case 0x33: + { + switch(densityCode) + { + case 0x00: + case 0x25: + { + if(model.ToLowerInvariant().StartsWith("dat", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to DDS-3.", + mediumType, densityCode); + + return MediaType.DDS3; + } + + break; + } + } + } + + break; + case 0x34: + { + switch(densityCode) + { + case 0x00: + case 0x26: + { + if(model.ToLowerInvariant().StartsWith("dat", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to DDS-4.", + mediumType, densityCode); + + return MediaType.DDS4; + } + + break; + } + } + } + + break; + case 0x35: + { + switch(densityCode) + { + case 0x00: + case 0x47: + { + if(model.ToLowerInvariant().StartsWith("dat", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to DAT72.", + mediumType, densityCode); + + return MediaType.DAT72; + } + + break; + } + } + } + + break; + case 0x38: + { + switch(densityCode) + { + case 0x00: + case 0x44: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to LTO-3.", + mediumType, densityCode); + + return MediaType.LTO3; + } + + break; + } + } + } + + break; + case 0x3C: + { + switch(densityCode) + { + case 0x00: + case 0x44: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to WORM LTO-3.", + mediumType, densityCode); + + return MediaType.LTO3WORM; + } + + break; + } + } + } + + break; + case 0x48: + { + switch(densityCode) + { + case 0x00: + case 0x46: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to LTO-4.", + mediumType, densityCode); + + return MediaType.LTO4; + } + + break; + } + } + } + + break; + case 0x4C: + { + switch(densityCode) + { + case 0x00: + case 0x46: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to WORM LTO-4.", + mediumType, densityCode); + + return MediaType.LTO4WORM; + } + + break; + } + } + } + + break; + case 0x50: + { + switch(densityCode) + { + case 0x00: + case 0x24: + { + if(model.ToLowerInvariant().StartsWith("dat", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to DDS-2.", + mediumType, densityCode); + + return MediaType.DDS2; + } + + break; + } + } + } + + break; + case 0x58: + { + switch(densityCode) + { + case 0x00: + case 0x58: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to LTO-5.", + mediumType, densityCode); + + return MediaType.LTO5; + } + + break; + } + } + } + + break; + case 0x5C: + { + switch(densityCode) + { + case 0x00: + case 0x58: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to WORM LTO-5.", + mediumType, densityCode); + + return MediaType.LTO5WORM; + } + + break; + } + } + } + + break; + case 0x68: + { + switch(densityCode) + { + case 0x00: + case 0x5A: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to LTO-6.", + mediumType, densityCode); + + return MediaType.LTO6; + } + + break; + } + } + } + + break; + case 0x6C: + { + switch(densityCode) + { + case 0x00: + case 0x5A: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to WORM LTO-6.", + mediumType, densityCode); + + return MediaType.LTO6WORM; + } + + break; + } + } + } + + break; + case 0x78: + { + switch(densityCode) + { + case 0x00: + case 0x5C: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to LTO-7.", + mediumType, densityCode); + + return MediaType.LTO7; + } + + break; + } + } + } + + break; + case 0x7C: + { + switch(densityCode) + { + case 0x00: + case 0x5C: + { + if(model.ToLowerInvariant().StartsWith("ult", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"ult\" setting media type to WORM LTO-7.", + mediumType, densityCode); + + return MediaType.LTO7WORM; + } + + break; + } + } + } + + break; + case 0x81: + { + switch(densityCode) + { + case 0x00: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 15m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape15m; + } + + if(vendor.ToLowerInvariant() == "ibm") + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive manufacturer is IBM, setting media type to IBM 3592.", + mediumType, densityCode); + + return MediaType.IBM3592; + } + + if(model.ToLowerInvariant().StartsWith("vxa", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"vxa\" setting media type to VXA.", + mediumType, densityCode); + + return MediaType.VXA1; + } + + break; + } + + case 0x14: + case 0x15: + case 0x27: + case 0x8C: + case 0x90: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 15m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape15m; + } + + break; + } + + case 0x29: + case 0x2A: + { + if(vendor.ToLowerInvariant() == "ibm") + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive manufacturer is IBM, setting media type to IBM 3592.", + mediumType, densityCode); + + return MediaType.IBM3592; + } + + break; + } + + case 0x80: + { + if(model.ToLowerInvariant().StartsWith("vxa", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"vxa\" setting media type to VXA.", + mediumType, densityCode); + + return MediaType.VXA1; + } + + break; + } + } + } + + break; + case 0x82: + { + switch(densityCode) + { + case 0x00: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 28m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape28m; + } + + if(vendor.ToLowerInvariant() == "ibm") + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive manufacturer is IBM, setting media type to IBM 3592.", + mediumType, densityCode); + + return MediaType.IBM3592; + } + + break; + } + + case 0x0A: + { + if(model.ToLowerInvariant().StartsWith("dlt", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"dlt\" setting media type to CompactTape.", + mediumType, densityCode); + + return MediaType.CompactTapeI; + } + + break; + } + + case 0x14: + case 0x15: + case 0x27: + case 0x8C: + case 0x90: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 28m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape28m; + } + + break; + } + + case 0x16: + { + if(model.ToLowerInvariant().StartsWith("dlt", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"dlt\" setting media type to CompactTape II.", + mediumType, densityCode); + + return MediaType.CompactTapeII; + } + + break; + } + + case 0x29: + case 0x2A: + { + if(vendor.ToLowerInvariant() == "ibm") + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive manufacturer is IBM, setting media type to IBM 3592.", + mediumType, densityCode); + + return MediaType.IBM3592; + } + + break; + } + + case 0x81: + { + if(model.ToLowerInvariant().StartsWith("vxa", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"vxa\" setting media type to VXA 2.", + mediumType, densityCode); + + return MediaType.VXA2; + } + + break; + } + + case 0x82: + { + if(model.ToLowerInvariant().StartsWith("vxa", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"vxa\" setting media type to VXA 3.", + mediumType, densityCode); + + return MediaType.VXA3; + } + + break; + } + } + } + + break; + case 0x83: + { + switch(densityCode) + { + case 0x00: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 54m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape54m; + } + + if(model.ToLowerInvariant().StartsWith("dlt", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"dlt\" setting media type to DLTtape III.", + mediumType, densityCode); + + return MediaType.DLTtapeIII; + } + + break; + } + + case 0x14: + case 0x15: + case 0x27: + case 0x8C: + case 0x90: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 54m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape54m; + } + + break; + } + + case 0x17: + case 0x18: + case 0x19: + case 0x80: + case 0x81: + { + if(model.ToLowerInvariant().StartsWith("dlt", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"dlt\" setting media type to DLTtape III.", + mediumType, densityCode); + + return MediaType.DLTtapeIII; + } + + break; + } + } + } + + break; + case 0x84: + { + switch(densityCode) + { + case 0x00: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 80m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape80m; + } + + if(model.ToLowerInvariant().StartsWith("dlt", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"dlt\" setting media type to DLTtape IIIxt.", + mediumType, densityCode); + + return MediaType.DLTtapeIIIxt; + } + + break; + } + + case 0x14: + case 0x15: + case 0x27: + case 0x8C: + case 0x90: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 80m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape80m; + } + + break; + } + + case 0x19: + case 0x80: + case 0x81: + { + if(model.ToLowerInvariant().StartsWith("dlt", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"dlt\" setting media type to DLTtape IIIxt.", + mediumType, densityCode); + + return MediaType.DLTtapeIIIxt; + } + + break; + } + } + } + + break; + case 0x85: + { + switch(densityCode) + { + case 0x00: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 106m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape106m; + } + + if(model.ToLowerInvariant().StartsWith("dlt", StringComparison.Ordinal) || + model.ToLowerInvariant().StartsWith("sdlt", StringComparison.Ordinal) || + model.ToLowerInvariant().StartsWith("superdlt", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"dlt\" setting media type to DLTtape IV.", + mediumType, densityCode); + + return MediaType.DLTtapeIV; + } + + if(model.ToLowerInvariant().StartsWith("stt", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"stt\" setting media type to Travan 5.", + mediumType, densityCode); + + return MediaType.Travan5; + } + + break; + } + + case 0x14: + case 0x15: + case 0x27: + case 0x8C: + case 0x90: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 106m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape106m; + } + + break; + } + + case 0x1A: + case 0x1B: + case 0x40: + case 0x41: + case 0x82: + case 0x83: + case 0x84: + case 0x85: + case 0x86: + case 0x87: + case 0x88: + case 0x89: + { + if(model.ToLowerInvariant().StartsWith("dlt", StringComparison.Ordinal) || + model.ToLowerInvariant().StartsWith("sdlt", StringComparison.Ordinal) || + model.ToLowerInvariant().StartsWith("superdlt", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"dlt\" setting media type to DLTtape IV.", + mediumType, densityCode); + + return MediaType.DLTtapeIV; + } + + break; + } + + case 0x46: + { + if(model.ToLowerInvariant().StartsWith("stt", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"stt\" setting media type to Travan 5.", + mediumType, densityCode); + + return MediaType.Travan5; + } + + break; + } + } + } + + break; + case 0x86: + { + switch(densityCode) + { + case 0x00: + case 0x90: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 160m Exatape XL.", + mediumType, densityCode); + + return MediaType.Exatape160mXL; + } + + if(model.ToLowerInvariant().StartsWith("dlt", StringComparison.Ordinal) || + model.ToLowerInvariant().StartsWith("sdlt", StringComparison.Ordinal) || + model.ToLowerInvariant().StartsWith("superdlt", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"dlt\" setting media type to SuperDLT.", + mediumType, densityCode); + + return MediaType.SDLT1; + } + + break; + } + + case 0x8C: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 160m Exatape XL.", + mediumType, densityCode); + + return MediaType.Exatape160mXL; + } + + break; + } + + case 0x91: + case 0x92: + case 0x93: + { + if(model.ToLowerInvariant().StartsWith("dlt", StringComparison.Ordinal) || + model.ToLowerInvariant().StartsWith("sdlt", StringComparison.Ordinal) || + model.ToLowerInvariant().StartsWith("superdlt", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"dlt\" setting media type to SuperDLT.", + mediumType, densityCode); + + return MediaType.SDLT1; + } + + break; + } + } + } + + break; + case 0x87: + { + switch(densityCode) + { + case 0x00: + case 0x4A: + { + if(model.ToLowerInvariant().StartsWith("dlt", StringComparison.Ordinal) || + model.ToLowerInvariant().StartsWith("sdlt", StringComparison.Ordinal) || + model.ToLowerInvariant().StartsWith("superdlt", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"dlt\" setting media type to SuperDLT 2.", + mediumType, densityCode); + + return MediaType.SDLT2; + } + + break; + } + } + } + + break; + case 0x90: + { + switch(densityCode) + { + case 0x00: + case 0x50: + case 0x98: + case 0x99: + { + if(model.ToLowerInvariant().StartsWith("dlt", StringComparison.Ordinal) || + model.ToLowerInvariant().StartsWith("sdlt", StringComparison.Ordinal) || + model.ToLowerInvariant().StartsWith("superdlt", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"dlt\" setting media type to VStape I.", + mediumType, densityCode); + + return MediaType.VStapeI; + } + + break; + } + } + } + + break; + case 0x95: + { + if(model.ToLowerInvariant().StartsWith("stt", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"stt\" setting media type to Travan 7.", + mediumType, densityCode); + + return MediaType.Travan7; + } + } + + break; + case 0xB6: + { + switch(densityCode) + { + case 0x45: + // HP Colorado tapes have a different capacity but return same density code at least in Seagate drives + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, setting media type to Travan 4.", + mediumType, densityCode); + + return MediaType.Travan4; + } + } + + break; + case 0xB7: + { + switch(densityCode) + { + case 0x47: + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, setting media type to Travan 5.", + mediumType, densityCode); + + return MediaType.Travan5; + } + } + + break; + case 0xC1: + { + switch(densityCode) + { + case 0x00: + case 0x14: + case 0x15: + case 0x8C: + case 0x90: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 22m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape22m; + } + + break; + } + } + } + + break; + case 0xC2: + { + switch(densityCode) + { + case 0x00: + case 0x14: + case 0x15: + case 0x27: + case 0x8C: + case 0x90: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 40m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape40m; + } + + break; + } + } + } + + break; + case 0xC3: + { + switch(densityCode) + { + case 0x00: + case 0x14: + case 0x15: + case 0x27: + case 0x8C: + case 0x90: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 76m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape76m; + } + + break; + } + } + } + + break; + case 0xC4: + { + switch(densityCode) + { + case 0x00: + case 0x14: + case 0x15: + case 0x27: + case 0x8C: + case 0x90: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 112m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape112m; + } + + break; + } + } + } + + break; + case 0xD1: + { + switch(densityCode) + { + case 0x00: + case 0x27: + case 0x28: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 22m Exatape AME.", + mediumType, densityCode); + + return MediaType.Exatape22mAME; + } + + break; + } + } + } + + break; + case 0xD2: + { + switch(densityCode) + { + case 0x00: + case 0x27: + case 0x28: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 170m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape170m; + } + + break; + } + } + } + + break; + case 0xD3: + { + switch(densityCode) + { + case 0x00: + case 0x27: + case 0x28: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 125m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape125m; + } + + break; + } + } + } + + break; + case 0xD4: + { + switch(densityCode) + { + case 0x00: + case 0x27: + case 0x28: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 45m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape45m; + } + + break; + } + } + } + + break; + case 0xD5: + { + switch(densityCode) + { + case 0x00: + case 0x27: + case 0x28: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 225m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape225m; + } + + break; + } + } + } + + break; + case 0xD6: + { + switch(densityCode) + { + case 0x00: + case 0x27: + case 0x28: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 150m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape150m; + } + + break; + } + } + } + + break; + case 0xD7: + { + switch(densityCode) + { + case 0x00: + case 0x27: + case 0x28: + { + if(model.ToLowerInvariant().StartsWith("exb", StringComparison.Ordinal)) + { + AaruConsole.DebugWriteLine("Media detection", + "SCSI medium type is {0:X2}h, density code is {1:X2}h, drive model starts with \"exb\" setting media type to 75m Exatape.", + mediumType, densityCode); + + return MediaType.Exatape75m; + } + + break; + } + } + } + + break; + } + + return MediaType.Unknown; + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Metadata/CdOffset.cs b/Aaru.CommonTypes/Metadata/CdOffset.cs new file mode 100644 index 0000000..3598e5b --- /dev/null +++ b/Aaru.CommonTypes/Metadata/CdOffset.cs @@ -0,0 +1,58 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : CdOffset.cs +// Author(s) : Natalia Portillo +// +// Component : Device database. +// +// --[ Description ] ---------------------------------------------------------- +// +// Models Compact Disc read offset entries from AccurateRip database. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System.ComponentModel.DataAnnotations; + +namespace Aaru.CommonTypes.Metadata +{ + /// Describes CD reading offset + public class CdOffset + { + /// Drive manufacturer + public string Manufacturer { get; set; } + /// Drive model + public string Model { get; set; } + /// Reading offset + public short Offset { get; set; } + /// Number of times this offset has been submitted + public int Submissions { get; set; } + /// Percentage of submissions in agreement with this offset + [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:P0}")] + public float Agreement { get; set; } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Metadata/DeviceReport.cs b/Aaru.CommonTypes/Metadata/DeviceReport.cs new file mode 100644 index 0000000..d4abfe5 --- /dev/null +++ b/Aaru.CommonTypes/Metadata/DeviceReport.cs @@ -0,0 +1,1070 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : DeviceReport.cs +// Author(s) : Natalia Portillo +// +// Component : XML metadata. +// +// --[ Description ] ---------------------------------------------------------- +// +// Contains classes for an XML device report. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.ComponentModel; +using System.Xml.Serialization; +using Aaru.CommonTypes.Structs.Devices.ATA; +using Aaru.CommonTypes.Structs.Devices.SCSI; +using Aaru.CommonTypes.Structs.Devices.SCSI.Modes; +using Newtonsoft.Json; + +// This is obsolete +#pragma warning disable 1591 + +// ReSharper disable InconsistentNaming +// ReSharper disable UnusedAutoPropertyAccessor.Global + +namespace Aaru.CommonTypes.Metadata +{ + [Serializable, XmlRoot("DicDeviceReport", Namespace = "", IsNullable = false)] + public class DeviceReport + { + public usbType USB { get; set; } + public firewireType FireWire { get; set; } + public pcmciaType PCMCIA { get; set; } + public bool CompactFlash { get; set; } + public ataType ATA { get; set; } + public ataType ATAPI { get; set; } + public scsiType SCSI { get; set; } + public mmcsdType MultiMediaCard { get; set; } + public mmcsdType SecureDigital { get; set; } + + [XmlIgnore] + public bool CompactFlashSpecified { get; set; } + } + + public class usbType + { + public ushort VendorID { get; set; } + public ushort ProductID { get; set; } + public string Manufacturer { get; set; } + public string Product { get; set; } + public bool RemovableMedia { get; set; } + public byte[] Descriptors { get; set; } + } + + public class firewireType + { + public uint VendorID { get; set; } + public uint ProductID { get; set; } + public string Manufacturer { get; set; } + public string Product { get; set; } + public bool RemovableMedia { get; set; } + } + + public class ataType + { + public string AdditionalPID { get; set; } + public Identify.TransferMode APIOSupported { get; set; } + public ushort ATAPIByteCount { get; set; } + public ushort BufferType { get; set; } + public ushort BufferSize { get; set; } + public Identify.CapabilitiesBit Capabilities { get; set; } + public Identify.CapabilitiesBit2 Capabilities2 { get; set; } + public Identify.CapabilitiesBit3 Capabilities3 { get; set; } + public ushort CFAPowerMode { get; set; } + public Identify.CommandSetBit CommandSet { get; set; } + public Identify.CommandSetBit2 CommandSet2 { get; set; } + public Identify.CommandSetBit3 CommandSet3 { get; set; } + public Identify.CommandSetBit4 CommandSet4 { get; set; } + public Identify.CommandSetBit5 CommandSet5 { get; set; } + public byte CurrentAAM { get; set; } + public ushort CurrentAPM { get; set; } + public Identify.DataSetMgmtBit DataSetMgmt { get; set; } + public ushort DataSetMgmtSize { get; set; } + public Identify.DeviceFormFactorEnum DeviceFormFactor { get; set; } + public Identify.TransferMode DMAActive { get; set; } + public Identify.TransferMode DMASupported { get; set; } + public byte DMATransferTimingMode { get; set; } + public ushort EnhancedSecurityEraseTime { get; set; } + public Identify.CommandSetBit EnabledCommandSet { get; set; } + public Identify.CommandSetBit2 EnabledCommandSet2 { get; set; } + public Identify.CommandSetBit3 EnabledCommandSet3 { get; set; } + public Identify.CommandSetBit4 EnabledCommandSet4 { get; set; } + public Identify.SATAFeaturesBit EnabledSATAFeatures { get; set; } + public ulong ExtendedUserSectors { get; set; } + public byte FreeFallSensitivity { get; set; } + public string FirmwareRevision { get; set; } + public Identify.GeneralConfigurationBit GeneralConfiguration { get; set; } + public ushort HardwareResetResult { get; set; } + public ushort InterseekDelay { get; set; } + public Identify.MajorVersionBit MajorVersion { get; set; } + public ushort MasterPasswordRevisionCode { get; set; } + public ushort MaxDownloadMicroMode3 { get; set; } + public ushort MaxQueueDepth { get; set; } + public Identify.TransferMode MDMAActive { get; set; } + public Identify.TransferMode MDMASupported { get; set; } + public ushort MinDownloadMicroMode3 { get; set; } + public ushort MinMDMACycleTime { get; set; } + public ushort MinorVersion { get; set; } + public ushort MinPIOCycleTimeNoFlow { get; set; } + public ushort MinPIOCycleTimeFlow { get; set; } + public string Model { get; set; } + public byte MultipleMaxSectors { get; set; } + public byte MultipleSectorNumber { get; set; } + public ushort NVCacheCaps { get; set; } + public uint NVCacheSize { get; set; } + public ushort NVCacheWriteSpeed { get; set; } + public byte NVEstimatedSpinUp { get; set; } + public ushort PacketBusRelease { get; set; } + public byte PIOTransferTimingMode { get; set; } + public byte RecommendedAAM { get; set; } + public ushort RecommendedMDMACycleTime { get; set; } + public ushort RemovableStatusSet { get; set; } + public Identify.SATACapabilitiesBit SATACapabilities { get; set; } + public Identify.SATACapabilitiesBit2 SATACapabilities2 { get; set; } + public Identify.SATAFeaturesBit SATAFeatures { get; set; } + public Identify.SCTCommandTransportBit SCTCommandTransport { get; set; } + public uint SectorsPerCard { get; set; } + public ushort SecurityEraseTime { get; set; } + public Identify.SecurityStatusBit SecurityStatus { get; set; } + public ushort ServiceBusyClear { get; set; } + public Identify.SpecificConfigurationEnum SpecificConfiguration { get; set; } + public ushort StreamAccessLatency { get; set; } + public ushort StreamMinReqSize { get; set; } + public uint StreamPerformanceGranularity { get; set; } + public ushort StreamTransferTimeDMA { get; set; } + public ushort StreamTransferTimePIO { get; set; } + public ushort TransportMajorVersion { get; set; } + public ushort TransportMinorVersion { get; set; } + public Identify.TrustedComputingBit TrustedComputing { get; set; } + public Identify.TransferMode UDMAActive { get; set; } + public Identify.TransferMode UDMASupported { get; set; } + public byte WRVMode { get; set; } + public uint WRVSectorCountMode3 { get; set; } + public uint WRVSectorCountMode2 { get; set; } + + public byte[] Identify { get; set; } + + public testedMediaType ReadCapabilities { get; set; } + public testedMediaType[] RemovableMedias { get; set; } + + [XmlIgnore] + public bool AdditionalPIDSpecified { get; set; } + [XmlIgnore] + public bool APIOSupportedSpecified { get; set; } + [XmlIgnore] + public bool ATAPIByteCountSpecified { get; set; } + [XmlIgnore] + public bool BufferTypeSpecified { get; set; } + [XmlIgnore] + public bool BufferSizeSpecified { get; set; } + [XmlIgnore] + public bool CapabilitiesSpecified { get; set; } + [XmlIgnore] + public bool Capabilities2Specified { get; set; } + [XmlIgnore] + public bool Capabilities3Specified { get; set; } + [XmlIgnore] + public bool CFAPowerModeSpecified { get; set; } + [XmlIgnore] + public bool CommandSetSpecified { get; set; } + [XmlIgnore] + public bool CommandSet2Specified { get; set; } + [XmlIgnore] + public bool CommandSet3Specified { get; set; } + [XmlIgnore] + public bool CommandSet4Specified { get; set; } + [XmlIgnore] + public bool CommandSet5Specified { get; set; } + [XmlIgnore] + public bool CurrentAAMSpecified { get; set; } + [XmlIgnore] + public bool CurrentAPMSpecified { get; set; } + [XmlIgnore] + public bool DataSetMgmtSpecified { get; set; } + [XmlIgnore] + public bool DataSetMgmtSizeSpecified { get; set; } + [XmlIgnore] + public bool DeviceFormFactorSpecified { get; set; } + [XmlIgnore] + public bool DMAActiveSpecified { get; set; } + [XmlIgnore] + public bool DMASupportedSpecified { get; set; } + [XmlIgnore] + public bool DMATransferTimingModeSpecified { get; set; } + [XmlIgnore] + public bool EnhancedSecurityEraseTimeSpecified { get; set; } + [XmlIgnore] + public bool EnabledCommandSetSpecified { get; set; } + [XmlIgnore] + public bool EnabledCommandSet2Specified { get; set; } + [XmlIgnore] + public bool EnabledCommandSet3Specified { get; set; } + [XmlIgnore] + public bool EnabledCommandSet4Specified { get; set; } + [XmlIgnore] + public bool EnabledSATAFeaturesSpecified { get; set; } + [XmlIgnore] + public bool ExtendedIdentifySpecified { get; set; } + [XmlIgnore] + public bool ExtendedUserSectorsSpecified { get; set; } + [XmlIgnore] + public bool FreeFallSensitivitySpecified { get; set; } + [XmlIgnore] + public bool FirmwareRevisionSpecified { get; set; } + [XmlIgnore] + public bool GeneralConfigurationSpecified { get; set; } + [XmlIgnore] + public bool HardwareResetResultSpecified { get; set; } + [XmlIgnore] + public bool InterseekDelaySpecified { get; set; } + [XmlIgnore] + public bool MajorVersionSpecified { get; set; } + [XmlIgnore] + public bool MasterPasswordRevisionCodeSpecified { get; set; } + [XmlIgnore] + public bool MaxDownloadMicroMode3Specified { get; set; } + [XmlIgnore] + public bool MaxQueueDepthSpecified { get; set; } + [XmlIgnore] + public bool MDMAActiveSpecified { get; set; } + [XmlIgnore] + public bool MDMASupportedSpecified { get; set; } + [XmlIgnore] + public bool MinDownloadMicroMode3Specified { get; set; } + [XmlIgnore] + public bool MinMDMACycleTimeSpecified { get; set; } + [XmlIgnore] + public bool MinorVersionSpecified { get; set; } + [XmlIgnore] + public bool MinPIOCycleTimeNoFlowSpecified { get; set; } + [XmlIgnore] + public bool MinPIOCycleTimeFlowSpecified { get; set; } + [XmlIgnore] + public bool ModelSpecified { get; set; } + [XmlIgnore] + public bool MultipleMaxSectorsSpecified { get; set; } + [XmlIgnore] + public bool MultipleSectorNumberSpecified { get; set; } + [XmlIgnore] + public bool NVCacheCapsSpecified { get; set; } + [XmlIgnore] + public bool NVCacheSizeSpecified { get; set; } + [XmlIgnore] + public bool NVCacheWriteSpeedSpecified { get; set; } + [XmlIgnore] + public bool NVEstimatedSpinUpSpecified { get; set; } + [XmlIgnore] + public bool PacketBusReleaseSpecified { get; set; } + [XmlIgnore] + public bool PIOTransferTimingModeSpecified { get; set; } + [XmlIgnore] + public bool RecommendedAAMSpecified { get; set; } + [XmlIgnore] + public bool RecommendedMDMACycleTimeSpecified { get; set; } + [XmlIgnore] + public bool RemovableStatusSetSpecified { get; set; } + [XmlIgnore] + public bool SATACapabilitiesSpecified { get; set; } + [XmlIgnore] + public bool SATACapabilities2Specified { get; set; } + [XmlIgnore] + public bool SATAFeaturesSpecified { get; set; } + [XmlIgnore] + public bool SCTCommandTransportSpecified { get; set; } + [XmlIgnore] + public bool SectorsPerCardSpecified { get; set; } + [XmlIgnore] + public bool SecurityEraseTimeSpecified { get; set; } + [XmlIgnore] + public bool SecurityStatusSpecified { get; set; } + [XmlIgnore] + public bool ServiceBusyClearSpecified { get; set; } + [XmlIgnore] + public bool SpecificConfigurationSpecified { get; set; } + [XmlIgnore] + public bool StreamAccessLatencySpecified { get; set; } + [XmlIgnore] + public bool StreamMinReqSizeSpecified { get; set; } + [XmlIgnore] + public bool StreamPerformanceGranularitySpecified { get; set; } + [XmlIgnore] + public bool StreamTransferTimeDMASpecified { get; set; } + [XmlIgnore] + public bool StreamTransferTimePIOSpecified { get; set; } + [XmlIgnore] + public bool TransportMajorVersionSpecified { get; set; } + [XmlIgnore] + public bool TransportMinorVersionSpecified { get; set; } + [XmlIgnore] + public bool TrustedComputingSpecified { get; set; } + [XmlIgnore] + public bool UDMAActiveSpecified { get; set; } + [XmlIgnore] + public bool UDMASupportedSpecified { get; set; } + [XmlIgnore] + public bool WRVModeSpecified { get; set; } + [XmlIgnore] + public bool WRVSectorCountMode3Specified { get; set; } + [XmlIgnore] + public bool WRVSectorCountMode2Specified { get; set; } + } + + public class chsType + { + public ushort Cylinders { get; set; } + public ushort Heads { get; set; } + public ushort Sectors { get; set; } + } + + public class scsiType + { + public scsiInquiryType Inquiry { get; set; } + public pageType[] EVPDPages { get; set; } + public bool SupportsModeSense6 { get; set; } + public bool SupportsModeSense10 { get; set; } + public bool SupportsModeSubpages { get; set; } + public modeType ModeSense { get; set; } + public mmcType MultiMediaDevice { get; set; } + public testedMediaType ReadCapabilities { get; set; } + public testedMediaType[] RemovableMedias { get; set; } + public sscType SequentialDevice { get; set; } + public byte[] ModeSense6Data { get; set; } + public byte[] ModeSense10Data { get; set; } + + [XmlIgnore] + public bool ReadCapabilitiesSpecified { get; set; } + } + + public class scsiInquiryType + { + public bool AccessControlCoordinator { get; set; } + public bool ACKRequests { get; set; } + public bool AERCSupported { get; set; } + public bool Address16 { get; set; } + public bool Address32 { get; set; } + public byte ANSIVersion { get; set; } + public TGPSValues AsymmetricalLUNAccess { get; set; } + public bool BasicQueueing { get; set; } + public byte DeviceTypeModifier { get; set; } + public byte ECMAVersion { get; set; } + public bool EnclosureServices { get; set; } + public bool HierarchicalLUN { get; set; } + public bool IUS { get; set; } + public byte ISOVersion { get; set; } + public bool LinkedCommands { get; set; } + public bool MediumChanger { get; set; } + public bool MultiPortDevice { get; set; } + public bool NormalACA { get; set; } + public PeripheralDeviceTypes PeripheralDeviceType { get; set; } + public PeripheralQualifiers PeripheralQualifier { get; set; } + public string ProductIdentification { get; set; } + public string ProductRevisionLevel { get; set; } + public bool Protection { get; set; } + public bool QAS { get; set; } + public bool RelativeAddressing { get; set; } + public bool Removable { get; set; } + public byte ResponseDataFormat { get; set; } + public bool TaggedCommandQueue { get; set; } + public bool TerminateTaskSupported { get; set; } + public bool ThirdPartyCopy { get; set; } + public bool TranferDisable { get; set; } + public bool SoftReset { get; set; } + public SPIClocking SPIClocking { get; set; } + public bool StorageArrayController { get; set; } + public bool SyncTransfer { get; set; } + public string VendorIdentification { get; set; } + public ushort[] VersionDescriptors { get; set; } + public bool WideBus16 { get; set; } + public bool WideBus32 { get; set; } + public byte[] Data { get; set; } + + [XmlIgnore] + public bool ANSIVersionSpecified { get; set; } + [XmlIgnore] + public bool ECMAVersionSpecified { get; set; } + [XmlIgnore] + public bool DeviceTypeModifierSpecified { get; set; } + [XmlIgnore] + public bool ISOVersionSpecified { get; set; } + [XmlIgnore] + public bool ProductIdentificationSpecified { get; set; } + [XmlIgnore] + public bool ProductRevisionLevelSpecified { get; set; } + [XmlIgnore] + public bool ResponseDataFormatSpecified { get; set; } + [XmlIgnore] + public bool VendorIdentificationSpecified { get; set; } + } + + [Serializable] + public class pageType + { + [XmlAttribute] + public byte page { get; set; } + + [XmlText] + public byte[] value { get; set; } + } + + public class modeType + { + public byte MediumType { get; set; } + public bool WriteProtected { get; set; } + public blockDescriptorType[] BlockDescriptors { get; set; } + public byte Speed { get; set; } + public byte BufferedMode { get; set; } + public bool BlankCheckEnabled { get; set; } + public bool DPOandFUA { get; set; } + public modePageType[] ModePages { get; set; } + + [XmlIgnore] + public bool MediumTypeSpecified { get; set; } + [XmlIgnore] + public bool SpeedSpecified { get; set; } + [XmlIgnore] + public bool BufferedModeSpecified { get; set; } + } + + public class blockDescriptorType + { + public byte Density { get; set; } + public ulong Blocks { get; set; } + public uint BlockLength { get; set; } + + [XmlIgnore] + public bool BlocksSpecified { get; set; } + [XmlIgnore] + public bool BlockLengthSpecified { get; set; } + } + + [Serializable] + public class modePageType + { + [XmlAttribute] + public byte page { get; set; } + + [XmlAttribute] + public byte subpage { get; set; } + + [XmlText] + public byte[] value { get; set; } + } + + public class mmcType + { + public mmcModeType ModeSense2A { get; set; } + public mmcFeaturesType Features { get; set; } + public testedMediaType[] TestedMedia { get; set; } + } + + public class mmcModeType + { + public bool AccurateCDDA { get; set; } + public bool BCK { get; set; } + public ushort BufferSize { get; set; } + public bool BufferUnderRunProtection { get; set; } + public bool CanEject { get; set; } + public bool CanLockMedia { get; set; } + public bool CDDACommand { get; set; } + public bool CompositeAudioVideo { get; set; } + public bool CSSandCPPMSupported { get; set; } + public ushort CurrentSpeed { get; set; } + public ushort CurrentWriteSpeed { get; set; } + public ushort CurrentWriteSpeedSelected { get; set; } + public bool DeterministicSlotChanger { get; set; } + public bool DigitalPort1 { get; set; } + public bool DigitalPort2 { get; set; } + public bool LeadInPW { get; set; } + public byte LoadingMechanismType { get; set; } + public bool LockStatus { get; set; } + public bool LSBF { get; set; } + public ushort MaximumSpeed { get; set; } + public ushort MaximumWriteSpeed { get; set; } + public bool PlaysAudio { get; set; } + public bool PreventJumperStatus { get; set; } + public bool RCK { get; set; } + public bool ReadsBarcode { get; set; } + public bool ReadsBothSides { get; set; } + public bool ReadsCDR { get; set; } + public bool ReadsCDRW { get; set; } + public bool ReadsDeinterlavedSubchannel { get; set; } + public bool ReadsDVDR { get; set; } + public bool ReadsDVDRAM { get; set; } + public bool ReadsDVDROM { get; set; } + public bool ReadsISRC { get; set; } + public bool ReadsMode2Form2 { get; set; } + public bool ReadsMode2Form1 { get; set; } + public bool ReadsPacketCDR { get; set; } + public bool ReadsSubchannel { get; set; } + public bool ReadsUPC { get; set; } + public bool ReturnsC2Pointers { get; set; } + public byte RotationControlSelected { get; set; } + public bool SeparateChannelMute { get; set; } + public bool SeparateChannelVolume { get; set; } + public bool SSS { get; set; } + public bool SupportsMultiSession { get; set; } + public ushort SupportedVolumeLevels { get; set; } + public bool TestWrite { get; set; } + public bool WritesCDR { get; set; } + public bool WritesCDRW { get; set; } + public bool WritesDVDR { get; set; } + public bool WritesDVDRAM { get; set; } + public ModePage_2A_WriteDescriptor[] WriteSpeedPerformanceDescriptors { get; set; } + + [XmlIgnore] + public bool MaximumSpeedSpecified { get; set; } + [XmlIgnore] + public bool SupportedVolumeLevelsSpecified { get; set; } + [XmlIgnore] + public bool BufferSizeSpecified { get; set; } + [XmlIgnore] + public bool CurrentSpeedSpecified { get; set; } + [XmlIgnore] + public bool MaximumWriteSpeedSpecified { get; set; } + [XmlIgnore] + public bool CurrentWriteSpeedSpecified { get; set; } + [XmlIgnore] + public bool RotationControlSelectedSpecified { get; set; } + [XmlIgnore] + public bool CurrentWriteSpeedSelectedSpecified { get; set; } + } + + public class mmcFeaturesType + { + public byte AACSVersion { get; set; } + public byte AGIDs { get; set; } + public byte BindingNonceBlocks { get; set; } + public ushort BlocksPerReadableUnit { get; set; } + public bool BufferUnderrunFreeInDVD { get; set; } + public bool BufferUnderrunFreeInSAO { get; set; } + public bool BufferUnderrunFreeInTAO { get; set; } + public bool CanAudioScan { get; set; } + public bool CanEject { get; set; } + public bool CanEraseSector { get; set; } + public bool CanExpandBDRESpareArea { get; set; } + public bool CanFormat { get; set; } + public bool CanFormatBDREWithoutSpare { get; set; } + public bool CanFormatCert { get; set; } + public bool CanFormatFRF { get; set; } + public bool CanFormatQCert { get; set; } + public bool CanFormatRRM { get; set; } + public bool CanGenerateBindingNonce { get; set; } + public bool CanLoad { get; set; } + public bool CanMuteSeparateChannels { get; set; } + public bool CanOverwriteSAOTrack { get; set; } + public bool CanOverwriteTAOTrack { get; set; } + public bool CanPlayCDAudio { get; set; } + public bool CanPseudoOverwriteBDR { get; set; } + public bool CanReadAllDualR { get; set; } + public bool CanReadAllDualRW { get; set; } + public bool CanReadBD { get; set; } + public bool CanReadBDR { get; set; } + public bool CanReadBDRE1 { get; set; } + public bool CanReadBDRE2 { get; set; } + public bool CanReadBDROM { get; set; } + public bool CanReadBluBCA { get; set; } + public bool CanReadCD { get; set; } + public bool CanReadCDMRW { get; set; } + public bool CanReadCPRM_MKB { get; set; } + public bool CanReadDDCD { get; set; } + public bool CanReadDVD { get; set; } + public bool CanReadDVDPlusMRW { get; set; } + public bool CanReadDVDPlusR { get; set; } + public bool CanReadDVDPlusRDL { get; set; } + public bool CanReadDVDPlusRW { get; set; } + public bool CanReadDVDPlusRWDL { get; set; } + public bool CanReadDriveAACSCertificate { get; set; } + public bool CanReadHDDVD { get; set; } + public bool CanReadHDDVDR { get; set; } + public bool CanReadHDDVDRAM { get; set; } + public bool CanReadLeadInCDText { get; set; } + public bool CanReadOldBDR { get; set; } + public bool CanReadOldBDRE { get; set; } + public bool CanReadOldBDROM { get; set; } + public bool CanReadSpareAreaInformation { get; set; } + public bool CanReportDriveSerial { get; set; } + public bool CanReportMediaSerial { get; set; } + public bool CanTestWriteDDCDR { get; set; } + public bool CanTestWriteDVD { get; set; } + public bool CanTestWriteInSAO { get; set; } + public bool CanTestWriteInTAO { get; set; } + public bool CanUpgradeFirmware { get; set; } + public bool CanWriteBD { get; set; } + public bool CanWriteBDR { get; set; } + public bool CanWriteBDRE1 { get; set; } + public bool CanWriteBDRE2 { get; set; } + public bool CanWriteBusEncryptedBlocks { get; set; } + public bool CanWriteCDMRW { get; set; } + public bool CanWriteCDRW { get; set; } + public bool CanWriteCDRWCAV { get; set; } + public bool CanWriteCDSAO { get; set; } + public bool CanWriteCDTAO { get; set; } + public bool CanWriteCSSManagedDVD { get; set; } + public bool CanWriteDDCDR { get; set; } + public bool CanWriteDDCDRW { get; set; } + public bool CanWriteDVDPlusMRW { get; set; } + public bool CanWriteDVDPlusR { get; set; } + public bool CanWriteDVDPlusRDL { get; set; } + public bool CanWriteDVDPlusRW { get; set; } + public bool CanWriteDVDPlusRWDL { get; set; } + public bool CanWriteDVDR { get; set; } + public bool CanWriteDVDRDL { get; set; } + public bool CanWriteDVDRW { get; set; } + public bool CanWriteHDDVDR { get; set; } + public bool CanWriteHDDVDRAM { get; set; } + public bool CanWriteOldBDR { get; set; } + public bool CanWriteOldBDRE { get; set; } + public bool CanWritePackedSubchannelInTAO { get; set; } + public bool CanWriteRWSubchannelInSAO { get; set; } + public bool CanWriteRWSubchannelInTAO { get; set; } + public bool CanWriteRaw { get; set; } + public bool CanWriteRawMultiSession { get; set; } + public bool CanWriteRawSubchannelInTAO { get; set; } + public bool ChangerIsSideChangeCapable { get; set; } + public byte ChangerSlots { get; set; } + public bool ChangerSupportsDiscPresent { get; set; } + public byte CPRMVersion { get; set; } + public byte CSSVersion { get; set; } + public bool DBML { get; set; } + public bool DVDMultiRead { get; set; } + public bool EmbeddedChanger { get; set; } + public bool ErrorRecoveryPage { get; set; } + [XmlElement(DataType = "date")] + public DateTime FirmwareDate { get; set; } + public byte LoadingMechanismType { get; set; } + public bool Locked { get; set; } + public uint LogicalBlockSize { get; set; } + public bool MultiRead { get; set; } + public PhysicalInterfaces PhysicalInterfaceStandard { get; set; } + public uint PhysicalInterfaceStandardNumber { get; set; } + public bool PreventJumper { get; set; } + public bool SupportsAACS { get; set; } + public bool SupportsBusEncryption { get; set; } + public bool SupportsC2 { get; set; } + public bool SupportsCPRM { get; set; } + public bool SupportsCSS { get; set; } + public bool SupportsDAP { get; set; } + public bool SupportsDeviceBusyEvent { get; set; } + public bool SupportsHybridDiscs { get; set; } + public bool SupportsModePage1Ch { get; set; } + public bool SupportsOSSC { get; set; } + public bool SupportsPWP { get; set; } + public bool SupportsSWPP { get; set; } + public bool SupportsSecurDisc { get; set; } + public bool SupportsSeparateVolume { get; set; } + public bool SupportsVCPS { get; set; } + public bool SupportsWriteInhibitDCB { get; set; } + public bool SupportsWriteProtectPAC { get; set; } + public ushort VolumeLevels { get; set; } + + [XmlIgnore] + public bool PhysicalInterfaceStandardSpecified { get; set; } + [XmlIgnore] + public bool PhysicalInterfaceStandardNumberSpecified { get; set; } + [XmlIgnore] + public bool AACSVersionSpecified { get; set; } + [XmlIgnore] + public bool AGIDsSpecified { get; set; } + [XmlIgnore] + public bool BindingNonceBlocksSpecified { get; set; } + [XmlIgnore] + public bool CPRMVersionSpecified { get; set; } + [XmlIgnore] + public bool CSSVersionSpecified { get; set; } + [XmlIgnore] + public bool ChangerHighestSlotNumberSpecified { get; set; } + [XmlIgnore] + public bool LoadingMechanismTypeSpecified { get; set; } + [XmlIgnore] + public bool LogicalBlockSizeSpecified { get; set; } + [XmlIgnore] + public bool BlocksPerReadableUnitSpecified { get; set; } + [XmlIgnore] + public bool FirmwareDateSpecified { get; set; } + [XmlIgnore] + public bool VolumeLevelsSpecified { get; set; } + } + + public class testedMediaType + { + public ulong Blocks { get; set; } + public uint BlockSize { get; set; } + public bool CanReadAACS { get; set; } + public bool CanReadADIP { get; set; } + public bool CanReadATIP { get; set; } + public bool CanReadBCA { get; set; } + public bool CanReadC2Pointers { get; set; } + public bool CanReadCMI { get; set; } + public bool CanReadCorrectedSubchannel { get; set; } + public bool CanReadCorrectedSubchannelWithC2 { get; set; } + public bool CanReadDCB { get; set; } + public bool CanReadDDS { get; set; } + public bool CanReadDMI { get; set; } + public bool CanReadDiscInformation { get; set; } + public bool CanReadFullTOC { get; set; } + public bool CanReadHDCMI { get; set; } + public bool CanReadLayerCapacity { get; set; } + public bool CanReadLeadIn { get; set; } + public bool CanReadLeadOut { get; set; } + public bool CanReadMediaID { get; set; } + public bool CanReadMediaSerial { get; set; } + public bool CanReadPAC { get; set; } + public bool CanReadPFI { get; set; } + public bool CanReadPMA { get; set; } + public bool CanReadPQSubchannel { get; set; } + public bool CanReadPQSubchannelWithC2 { get; set; } + public bool CanReadPRI { get; set; } + public bool CanReadRWSubchannel { get; set; } + public bool CanReadRWSubchannelWithC2 { get; set; } + public bool CanReadRecordablePFI { get; set; } + public bool CanReadSpareAreaInformation { get; set; } + public bool CanReadTOC { get; set; } + public byte Density { get; set; } + public uint LongBlockSize { get; set; } + public string Manufacturer { get; set; } + public bool MediaIsRecognized { get; set; } + public byte MediumType { get; set; } + public string MediumTypeName { get; set; } + public string Model { get; set; } + public bool SupportsHLDTSTReadRawDVD { get; set; } + public bool SupportsNECReadCDDA { get; set; } + public bool SupportsPioneerReadCDDA { get; set; } + public bool SupportsPioneerReadCDDAMSF { get; set; } + public bool SupportsPlextorReadCDDA { get; set; } + public bool SupportsPlextorReadRawDVD { get; set; } + public bool SupportsRead10 { get; set; } + public bool SupportsRead12 { get; set; } + public bool SupportsRead16 { get; set; } + public bool SupportsRead { get; set; } + public bool SupportsReadCapacity16 { get; set; } + public bool SupportsReadCapacity { get; set; } + public bool SupportsReadCd { get; set; } + public bool SupportsReadCdMsf { get; set; } + public bool SupportsReadCdRaw { get; set; } + public bool SupportsReadCdMsfRaw { get; set; } + public bool SupportsReadLong16 { get; set; } + public bool SupportsReadLong { get; set; } + + public byte[] ModeSense6Data { get; set; } + public byte[] ModeSense10Data { get; set; } + + [XmlIgnore] + public bool BlocksSpecified { get; set; } + [XmlIgnore] + public bool BlockSizeSpecified { get; set; } + [XmlIgnore] + public bool CanReadAACSSpecified { get; set; } + [XmlIgnore] + public bool CanReadADIPSpecified { get; set; } + [XmlIgnore] + public bool CanReadATIPSpecified { get; set; } + [XmlIgnore] + public bool CanReadBCASpecified { get; set; } + [XmlIgnore] + public bool CanReadC2PointersSpecified { get; set; } + [XmlIgnore] + public bool CanReadCMISpecified { get; set; } + [XmlIgnore] + public bool CanReadCorrectedSubchannelSpecified { get; set; } + [XmlIgnore] + public bool CanReadCorrectedSubchannelWithC2Specified { get; set; } + [XmlIgnore] + public bool CanReadDCBSpecified { get; set; } + [XmlIgnore] + public bool CanReadDDSSpecified { get; set; } + [XmlIgnore] + public bool CanReadDMISpecified { get; set; } + [XmlIgnore] + public bool CanReadDiscInformationSpecified { get; set; } + [XmlIgnore] + public bool CanReadFullTOCSpecified { get; set; } + [XmlIgnore] + public bool CanReadHDCMISpecified { get; set; } + [XmlIgnore] + public bool CanReadLayerCapacitySpecified { get; set; } + [XmlIgnore] + public bool CanReadLeadInSpecified { get; set; } + [XmlIgnore] + public bool CanReadLeadOutSpecified { get; set; } + [XmlIgnore] + public bool CanReadMediaIDSpecified { get; set; } + [XmlIgnore] + public bool CanReadMediaSerialSpecified { get; set; } + [XmlIgnore] + public bool CanReadPACSpecified { get; set; } + [XmlIgnore] + public bool CanReadPFISpecified { get; set; } + [XmlIgnore] + public bool CanReadPMASpecified { get; set; } + [XmlIgnore] + public bool CanReadPQSubchannelSpecified { get; set; } + [XmlIgnore] + public bool CanReadPQSubchannelWithC2Specified { get; set; } + [XmlIgnore] + public bool CanReadPRISpecified { get; set; } + [XmlIgnore] + public bool CanReadRWSubchannelSpecified { get; set; } + [XmlIgnore] + public bool CanReadRWSubchannelWithC2Specified { get; set; } + [XmlIgnore] + public bool CanReadRecordablePFISpecified { get; set; } + [XmlIgnore] + public bool CanReadSpareAreaInformationSpecified { get; set; } + [XmlIgnore] + public bool CanReadTOCSpecified { get; set; } + [XmlIgnore] + public bool DensitySpecified { get; set; } + [XmlIgnore] + public bool LongBlockSizeSpecified { get; set; } + [XmlIgnore] + public bool ManufacturerSpecified { get; set; } + [XmlIgnore] + public bool MediumTypeSpecified { get; set; } + [XmlIgnore] + public bool ModelSpecified { get; set; } + [XmlIgnore] + public bool SupportsHLDTSTReadRawDVDSpecified { get; set; } + [XmlIgnore] + public bool SupportsNECReadCDDASpecified { get; set; } + [XmlIgnore] + public bool SupportsPioneerReadCDDASpecified { get; set; } + [XmlIgnore] + public bool SupportsPioneerReadCDDAMSFSpecified { get; set; } + [XmlIgnore] + public bool SupportsPlextorReadCDDASpecified { get; set; } + [XmlIgnore] + public bool SupportsPlextorReadRawDVDSpecified { get; set; } + [XmlIgnore] + public bool SupportsRead10Specified { get; set; } + [XmlIgnore] + public bool SupportsRead12Specified { get; set; } + [XmlIgnore] + public bool SupportsRead16Specified { get; set; } + [XmlIgnore] + public bool SupportsReadSpecified { get; set; } + [XmlIgnore] + public bool SupportsReadCapacity16Specified { get; set; } + [XmlIgnore] + public bool SupportsReadCapacitySpecified { get; set; } + [XmlIgnore] + public bool SupportsReadCdSpecified { get; set; } + [XmlIgnore] + public bool SupportsReadCdMsfSpecified { get; set; } + [XmlIgnore] + public bool SupportsReadCdRawSpecified { get; set; } + [XmlIgnore] + public bool SupportsReadCdMsfRawSpecified { get; set; } + [XmlIgnore] + public bool SupportsReadLong16Specified { get; set; } + [XmlIgnore] + public bool SupportsReadLongSpecified { get; set; } + + public chsType CHS { get; set; } + public chsType CurrentCHS { get; set; } + public uint LBASectors { get; set; } + public ulong LBA48Sectors { get; set; } + public ushort LogicalAlignment { get; set; } + public ushort NominalRotationRate { get; set; } + public uint PhysicalBlockSize { get; set; } + public bool SolidStateDevice { get; set; } + public ushort UnformattedBPT { get; set; } + public ushort UnformattedBPS { get; set; } + + [XmlIgnore] + public bool LBASectorsSpecified { get; set; } + [XmlIgnore] + public bool LBA48SectorsSpecified { get; set; } + [XmlIgnore] + public bool LogicalAlignmentSpecified { get; set; } + [XmlIgnore] + public bool NominalRotationRateSpecified { get; set; } + [XmlIgnore] + public bool PhysicalBlockSizeSpecified { get; set; } + [XmlIgnore] + public bool SolidStateDeviceSpecified { get; set; } + [XmlIgnore] + public bool UnformattedBPTSpecified { get; set; } + [XmlIgnore] + public bool UnformattedBPSSpecified { get; set; } + + public bool SupportsReadDmaLba { get; set; } + public bool SupportsReadDmaRetryLba { get; set; } + public bool SupportsReadLba { get; set; } + public bool SupportsReadRetryLba { get; set; } + public bool SupportsReadLongLba { get; set; } + public bool SupportsReadLongRetryLba { get; set; } + public bool SupportsSeekLba { get; set; } + + public bool SupportsReadDmaLba48 { get; set; } + public bool SupportsReadLba48 { get; set; } + + public bool SupportsReadDma { get; set; } + public bool SupportsReadDmaRetry { get; set; } + public bool SupportsReadRetry { get; set; } + public bool SupportsReadLongRetry { get; set; } + public bool SupportsSeek { get; set; } + + [XmlIgnore] + public bool SupportsReadDmaLbaSpecified { get; set; } + [XmlIgnore] + public bool SupportsReadDmaRetryLbaSpecified { get; set; } + [XmlIgnore] + public bool SupportsReadLbaSpecified { get; set; } + [XmlIgnore] + public bool SupportsReadRetryLbaSpecified { get; set; } + [XmlIgnore] + public bool SupportsReadLongLbaSpecified { get; set; } + [XmlIgnore] + public bool SupportsReadLongRetryLbaSpecified { get; set; } + [XmlIgnore] + public bool SupportsSeekLbaSpecified { get; set; } + + [XmlIgnore] + public bool SupportsReadDmaLba48Specified { get; set; } + [XmlIgnore] + public bool SupportsReadLba48Specified { get; set; } + + [XmlIgnore] + public bool SupportsReadDmaSpecified { get; set; } + [XmlIgnore] + public bool SupportsReadDmaRetrySpecified { get; set; } + [XmlIgnore] + public bool SupportsReadRetrySpecified { get; set; } + [XmlIgnore] + public bool SupportsReadLongRetrySpecified { get; set; } + [XmlIgnore] + public bool SupportsSeekSpecified { get; set; } + } + + public class sscType + { + public byte BlockSizeGranularity { get; set; } + public uint MaxBlockLength { get; set; } + public uint MinBlockLength { get; set; } + + public SupportedDensity[] SupportedDensities { get; set; } + public SupportedMedia[] SupportedMediaTypes { get; set; } + public SequentialMedia[] TestedMedia { get; set; } + + [XmlIgnore] + public bool BlockSizeGranularitySpecified { get; set; } + [XmlIgnore] + public bool MaxBlockLengthSpecified { get; set; } + [XmlIgnore] + public bool MinBlockLengthSpecified { get; set; } + } + + public class SupportedDensity + { + [XmlIgnore, JsonIgnore] + public int Id { get; set; } + [DisplayName("Primary density code")] + public byte PrimaryCode { get; set; } + [DisplayName("Secondary density code")] + public byte SecondaryCode { get; set; } + public bool Writable { get; set; } + public bool Duplicate { get; set; } + [DisplayName("Default density code")] + public bool DefaultDensity { get; set; } + [DisplayName("Bits per mm")] + public uint BitsPerMm { get; set; } + public ushort Width { get; set; } + public ushort Tracks { get; set; } + [DisplayName("Nominal capacity (MiB)")] + public uint Capacity { get; set; } + public string Organization { get; set; } + public string Name { get; set; } + public string Description { get; set; } + } + + public class SupportedMedia + { + [XmlIgnore, JsonIgnore] + public int Id { get; set; } + public byte MediumType { get; set; } + public int[] DensityCodes { get; set; } + public ushort Width { get; set; } + public ushort Length { get; set; } + public string Organization { get; set; } + public string Name { get; set; } + public string Description { get; set; } + } + + public struct SequentialMedia + { + public bool CanReadMediaSerial { get; set; } + public byte Density { get; set; } + public string Manufacturer { get; set; } + public bool MediaIsRecognized { get; set; } + public byte MediumType { get; set; } + public string MediumTypeName { get; set; } + public string Model { get; set; } + public SupportedDensity[] SupportedDensities { get; set; } + public SupportedMedia[] SupportedMediaTypes { get; set; } + + public byte[] ModeSense6Data { get; set; } + public byte[] ModeSense10Data { get; set; } + + [XmlIgnore] + public bool CanReadMediaSerialSpecified { get; set; } + [XmlIgnore] + public bool DensitySpecified { get; set; } + [XmlIgnore] + public bool MediumTypeSpecified { get; set; } + } + + [Serializable] + public class pcmciaType + { + public byte[] CIS { get; set; } + public string Compliance { get; set; } + public ushort ManufacturerCode { get; set; } + public ushort CardCode { get; set; } + public string Manufacturer { get; set; } + public string ProductName { get; set; } + public string[] AdditionalInformation { get; set; } + + [XmlIgnore] + public bool ManufacturerCodeSpecified { get; set; } + [XmlIgnore] + public bool CardCodeSpecified { get; set; } + } + + [Serializable] + public class mmcsdType + { + public byte[] CID { get; set; } + public byte[] CSD { get; set; } + public byte[] OCR { get; set; } + public byte[] SCR { get; set; } + public byte[] ExtendedCSD { get; set; } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Metadata/DeviceReportV2.cs b/Aaru.CommonTypes/Metadata/DeviceReportV2.cs new file mode 100644 index 0000000..11711cf --- /dev/null +++ b/Aaru.CommonTypes/Metadata/DeviceReportV2.cs @@ -0,0 +1,2307 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : DeviceReportV2.cs +// Author(s) : Natalia Portillo +// +// Component : JSON metadata. +// +// --[ Description ] ---------------------------------------------------------- +// +// Contains classes for a JSON device report. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using Aaru.CommonTypes.Enums; +using Aaru.CommonTypes.Structs.Devices.ATA; +using Aaru.CommonTypes.Structs.Devices.SCSI; +using Aaru.CommonTypes.Structs.Devices.SCSI.Modes; +using Newtonsoft.Json; + +// TODO: Re-enable CS1591 in this file +#pragma warning disable 1591 + +// ReSharper disable VirtualMemberNeverOverridden.Global +// ReSharper disable VirtualMemberCallInConstructor + +// ReSharper disable InconsistentNaming +// ReSharper disable UnusedAutoPropertyAccessor.Global + +namespace Aaru.CommonTypes.Metadata +{ + public class DeviceReportV2 + { + public DeviceReportV2() {} + + public DeviceReportV2(DeviceReport reportV1) + { + if(reportV1.USB != null) + USB = new Usb(reportV1.USB); + + if(reportV1.FireWire != null) + FireWire = new FireWire(reportV1.FireWire); + + if(reportV1.PCMCIA != null) + PCMCIA = new Pcmcia(reportV1.PCMCIA); + + if(reportV1.CompactFlashSpecified) + CompactFlash = reportV1.CompactFlash; + + if(reportV1.ATA != null) + { + ATA = new Ata(reportV1.ATA); + Type = DeviceType.ATA; + } + + if(reportV1.SCSI != null) + { + SCSI = new Scsi(reportV1.SCSI); + Type = DeviceType.SCSI; + + if(SCSI.ModeSense?.ModePages?.FirstOrDefault(p => p.page == 0x2A)?.value != null) + { + if(SCSI.MultiMediaDevice != null) + SCSI.MultiMediaDevice.ModeSense2AData = + SCSI.ModeSense?.ModePages?.FirstOrDefault(p => p.page == 0x2A)?.value; + else if(SCSI.Inquiry?.PeripheralDeviceType == (byte)PeripheralDeviceTypes.MultiMediaDevice) + SCSI.MultiMediaDevice = new Mmc + { + ModeSense2AData = SCSI.ModeSense?.ModePages?.FirstOrDefault(p => p.page == 0x2A)?.value + }; + } + } + + if(reportV1.ATAPI != null) + { + ATAPI = new Ata(reportV1.ATAPI); + Type = DeviceType.ATAPI; + } + + if(reportV1.MultiMediaCard != null) + { + MultiMediaCard = new MmcSd(reportV1.MultiMediaCard); + Type = DeviceType.MMC; + } + + if(reportV1.SecureDigital != null) + { + SecureDigital = new MmcSd(reportV1.SecureDigital); + Type = DeviceType.SecureDigital; + } + + if(reportV1.SCSI?.Inquiry != null) + { + Manufacturer = reportV1.SCSI.Inquiry.VendorIdentification; + Model = reportV1.SCSI.Inquiry.ProductIdentification; + Revision = reportV1.SCSI.Inquiry.ProductRevisionLevel; + } + else if(reportV1.ATA != null || + reportV1.ATAPI != null) + { + ataType ata = reportV1.ATA ?? reportV1.ATAPI; + + string[] split = ata.Model.Split(' '); + + if(split.Length > 1) + { + Manufacturer = split[0]; + Model = string.Join(" ", split, 1, split.Length - 1); + } + else + Model = ata.Model; + + Revision = ata.FirmwareRevision; + } + } + + [JsonIgnore] + public int Id { get; set; } + public virtual Usb USB { get; set; } + public virtual FireWire FireWire { get; set; } + public virtual Pcmcia PCMCIA { get; set; } + public bool CompactFlash { get; set; } + public virtual Ata ATA { get; set; } + public virtual Ata ATAPI { get; set; } + public virtual Scsi SCSI { get; set; } + public virtual MmcSd MultiMediaCard { get; set; } + public virtual MmcSd SecureDigital { get; set; } + public virtual GdRomSwapDiscCapabilities GdRomSwapDiscCapabilities { get; set; } + + public string Manufacturer { get; set; } + public string Model { get; set; } + public string Revision { get; set; } + public DeviceType Type { get; set; } + } + + public class Usb + { + public Usb() {} + + public Usb(usbType usb) + { + VendorID = usb.VendorID; + ProductID = usb.ProductID; + Manufacturer = usb.Manufacturer; + Product = usb.Product; + RemovableMedia = usb.RemovableMedia; + Descriptors = usb.Descriptors; + } + + [JsonIgnore] + public int Id { get; set; } + [DisplayName("Vendor ID"), DisplayFormat(DataFormatString = "0x{0:X4}")] + public ushort VendorID { get; set; } + [DisplayName("Product ID"), DisplayFormat(DataFormatString = "0x{0:X4}")] + public ushort ProductID { get; set; } + public string Manufacturer { get; set; } + public string Product { get; set; } + [DisplayName("Removable media")] + public bool RemovableMedia { get; set; } + public byte[] Descriptors { get; set; } + } + + public class FireWire + { + public FireWire() {} + + public FireWire(firewireType firewire) + { + VendorID = firewire.VendorID; + ProductID = firewire.ProductID; + Manufacturer = firewire.Manufacturer; + Product = firewire.Product; + RemovableMedia = firewire.RemovableMedia; + } + + [JsonIgnore] + public int Id { get; set; } + [DisplayName("Vendor ID"), DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "0x{0:X8}")] + public uint VendorID { get; set; } + [DisplayName("Product ID"), DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "0x{0:X8}")] + public uint ProductID { get; set; } + [DisplayFormat(NullDisplayText = "Unknown")] + public string Manufacturer { get; set; } + [DisplayFormat(NullDisplayText = "Unknown")] + public string Product { get; set; } + [DisplayName("Is media removable?")] + public bool RemovableMedia { get; set; } + } + + public class Ata + { + public Ata() {} + + public Ata(ataType ata) + { + Identify = ata.Identify; + + if(ata.ReadCapabilities != null) + ReadCapabilities = new TestedMedia(ata.ReadCapabilities, true); + + if(ata.RemovableMedias != null) + { + RemovableMedias = new List(); + + foreach(testedMediaType ataRemovableMedia in ata.RemovableMedias) + RemovableMedias.Add(new TestedMedia(ataRemovableMedia, true)); + } + + if(Identify != null) + return; + + var identifyDevice = new Identify.IdentifyDevice(); + + if(ata.AdditionalPIDSpecified) + identifyDevice.AdditionalPID = ata.AdditionalPID; + + if(ata.APIOSupportedSpecified) + identifyDevice.APIOSupported = ata.APIOSupported; + + if(ata.ATAPIByteCountSpecified) + identifyDevice.ATAPIByteCount = ata.ATAPIByteCount; + + if(ata.BufferTypeSpecified) + identifyDevice.BufferType = ata.BufferType; + + if(ata.BufferSizeSpecified) + identifyDevice.BufferSize = ata.BufferSize; + + if(ata.CapabilitiesSpecified) + identifyDevice.Capabilities = ata.Capabilities; + + if(ata.Capabilities2Specified) + identifyDevice.Capabilities2 = ata.Capabilities2; + + if(ata.Capabilities3Specified) + identifyDevice.Capabilities3 = ata.Capabilities3; + + if(ata.CFAPowerModeSpecified) + identifyDevice.CFAPowerMode = ata.CFAPowerMode; + + if(ata.CommandSetSpecified) + identifyDevice.CommandSet = ata.CommandSet; + + if(ata.CommandSet2Specified) + identifyDevice.CommandSet2 = ata.CommandSet2; + + if(ata.CommandSet3Specified) + identifyDevice.CommandSet3 = ata.CommandSet3; + + if(ata.CommandSet4Specified) + identifyDevice.CommandSet4 = ata.CommandSet4; + + if(ata.CommandSet5Specified) + identifyDevice.CommandSet4 = ata.CommandSet4; + + if(ata.CurrentAAMSpecified) + identifyDevice.CurrentAAM = ata.CurrentAAM; + + if(ata.CurrentAPMSpecified) + identifyDevice.CurrentAPM = ata.CurrentAPM; + + if(ata.DataSetMgmtSpecified) + identifyDevice.DataSetMgmt = ata.DataSetMgmt; + + if(ata.DataSetMgmtSizeSpecified) + identifyDevice.DataSetMgmtSize = ata.DataSetMgmtSize; + + if(ata.DeviceFormFactorSpecified) + identifyDevice.DeviceFormFactor = ata.DeviceFormFactor; + + if(ata.DMAActiveSpecified) + identifyDevice.DMAActive = ata.DMAActive; + + if(ata.DMASupportedSpecified) + identifyDevice.DMASupported = ata.DMASupported; + + if(ata.DMATransferTimingModeSpecified) + identifyDevice.DMATransferTimingMode = ata.DMATransferTimingMode; + + if(ata.EnhancedSecurityEraseTimeSpecified) + identifyDevice.EnhancedSecurityEraseTime = ata.EnhancedSecurityEraseTime; + + if(ata.EnabledCommandSetSpecified) + identifyDevice.EnabledCommandSet = ata.EnabledCommandSet; + + if(ata.EnabledCommandSet2Specified) + identifyDevice.EnabledCommandSet2 = ata.EnabledCommandSet2; + + if(ata.EnabledCommandSet3Specified) + identifyDevice.EnabledCommandSet3 = ata.EnabledCommandSet3; + + if(ata.EnabledCommandSet4Specified) + identifyDevice.EnabledCommandSet4 = ata.EnabledCommandSet4; + + if(ata.EnabledSATAFeaturesSpecified) + identifyDevice.EnabledSATAFeatures = ata.EnabledSATAFeatures; + + if(ata.ExtendedUserSectorsSpecified) + identifyDevice.ExtendedUserSectors = ata.ExtendedUserSectors; + + if(ata.FreeFallSensitivitySpecified) + identifyDevice.FreeFallSensitivity = ata.FreeFallSensitivity; + + if(ata.FirmwareRevisionSpecified) + identifyDevice.FirmwareRevision = ata.FirmwareRevision; + + if(ata.GeneralConfigurationSpecified) + identifyDevice.GeneralConfiguration = ata.GeneralConfiguration; + + if(ata.HardwareResetResultSpecified) + identifyDevice.HardwareResetResult = ata.HardwareResetResult; + + if(ata.InterseekDelaySpecified) + identifyDevice.InterseekDelay = ata.InterseekDelay; + + if(ata.MajorVersionSpecified) + identifyDevice.MajorVersion = ata.MajorVersion; + + if(ata.MasterPasswordRevisionCodeSpecified) + identifyDevice.MasterPasswordRevisionCode = ata.MasterPasswordRevisionCode; + + if(ata.MaxDownloadMicroMode3Specified) + identifyDevice.MaxDownloadMicroMode3 = ata.MaxDownloadMicroMode3; + + if(ata.MaxQueueDepthSpecified) + identifyDevice.MaxQueueDepth = ata.MaxQueueDepth; + + if(ata.MDMAActiveSpecified) + identifyDevice.MDMAActive = ata.MDMAActive; + + if(ata.MDMASupportedSpecified) + identifyDevice.MDMASupported = ata.MDMASupported; + + if(ata.MinDownloadMicroMode3Specified) + identifyDevice.MinDownloadMicroMode3 = ata.MinDownloadMicroMode3; + + if(ata.MinMDMACycleTimeSpecified) + identifyDevice.MinMDMACycleTime = ata.MinMDMACycleTime; + + if(ata.MinorVersionSpecified) + identifyDevice.MinorVersion = ata.MinorVersion; + + if(ata.MinPIOCycleTimeNoFlowSpecified) + identifyDevice.MinPIOCycleTimeNoFlow = ata.MinPIOCycleTimeNoFlow; + + if(ata.MinPIOCycleTimeFlowSpecified) + identifyDevice.MinPIOCycleTimeFlow = ata.MinPIOCycleTimeFlow; + + if(ata.ModelSpecified) + identifyDevice.Model = ata.Model; + + if(ata.MultipleMaxSectorsSpecified) + identifyDevice.MultipleMaxSectors = ata.MultipleMaxSectors; + + if(ata.MultipleSectorNumberSpecified) + identifyDevice.MultipleSectorNumber = ata.MultipleSectorNumber; + + if(ata.NVCacheCapsSpecified) + identifyDevice.NVCacheCaps = ata.NVCacheCaps; + + if(ata.NVCacheSizeSpecified) + identifyDevice.NVCacheSize = ata.NVCacheSize; + + if(ata.NVCacheWriteSpeedSpecified) + identifyDevice.NVCacheWriteSpeed = ata.NVCacheWriteSpeed; + + if(ata.NVEstimatedSpinUpSpecified) + identifyDevice.NVEstimatedSpinUp = ata.NVEstimatedSpinUp; + + if(ata.PacketBusReleaseSpecified) + identifyDevice.PacketBusRelease = ata.PacketBusRelease; + + if(ata.PIOTransferTimingModeSpecified) + identifyDevice.PIOTransferTimingMode = ata.PIOTransferTimingMode; + + if(ata.RecommendedAAMSpecified) + identifyDevice.RecommendedAAM = ata.RecommendedAAM; + + if(ata.RecommendedMDMACycleTimeSpecified) + identifyDevice.RecMDMACycleTime = ata.RecommendedMDMACycleTime; + + if(ata.RemovableStatusSetSpecified) + identifyDevice.RemovableStatusSet = ata.RemovableStatusSet; + + if(ata.SATACapabilitiesSpecified) + identifyDevice.SATACapabilities = ata.SATACapabilities; + + if(ata.SATACapabilities2Specified) + identifyDevice.SATACapabilities2 = ata.SATACapabilities2; + + if(ata.SATAFeaturesSpecified) + identifyDevice.SATAFeatures = ata.SATAFeatures; + + if(ata.SCTCommandTransportSpecified) + identifyDevice.SCTCommandTransport = ata.SCTCommandTransport; + + if(ata.SectorsPerCardSpecified) + identifyDevice.SectorsPerCard = ata.SectorsPerCard; + + if(ata.SecurityEraseTimeSpecified) + identifyDevice.SecurityEraseTime = ata.SecurityEraseTime; + + if(ata.SecurityStatusSpecified) + identifyDevice.SecurityStatus = ata.SecurityStatus; + + if(ata.ServiceBusyClearSpecified) + identifyDevice.ServiceBusyClear = ata.ServiceBusyClear; + + if(ata.SpecificConfigurationSpecified) + identifyDevice.SpecificConfiguration = ata.SpecificConfiguration; + + if(ata.StreamAccessLatencySpecified) + identifyDevice.StreamAccessLatency = ata.StreamAccessLatency; + + if(ata.StreamMinReqSizeSpecified) + identifyDevice.StreamMinReqSize = ata.StreamMinReqSize; + + if(ata.StreamPerformanceGranularitySpecified) + identifyDevice.StreamPerformanceGranularity = ata.StreamPerformanceGranularity; + + if(ata.StreamTransferTimeDMASpecified) + identifyDevice.StreamTransferTimeDMA = ata.StreamTransferTimeDMA; + + if(ata.StreamTransferTimePIOSpecified) + identifyDevice.StreamTransferTimePIO = ata.StreamTransferTimePIO; + + if(ata.TransportMajorVersionSpecified) + identifyDevice.TransportMajorVersion = ata.TransportMajorVersion; + + if(ata.TransportMinorVersionSpecified) + identifyDevice.TransportMinorVersion = ata.TransportMinorVersion; + + if(ata.TrustedComputingSpecified) + identifyDevice.TrustedComputing = ata.TrustedComputing; + + if(ata.UDMAActiveSpecified) + identifyDevice.UDMAActive = ata.UDMAActive; + + if(ata.UDMASupportedSpecified) + identifyDevice.UDMASupported = ata.UDMASupported; + + if(ata.WRVModeSpecified) + identifyDevice.WRVMode = ata.WRVMode; + + if(ata.WRVSectorCountMode3Specified) + identifyDevice.WRVSectorCountMode3 = ata.WRVSectorCountMode3; + + if(ata.WRVSectorCountMode2Specified) + identifyDevice.WRVSectorCountMode2 = ata.WRVSectorCountMode2; + + Identify = Structs.Devices.ATA.Identify.Encode(identifyDevice); + } + + public Identify.IdentifyDevice? IdentifyDevice => Structs.Devices.ATA.Identify.Decode(Identify); + + [JsonIgnore] + public int Id { get; set; } + public byte[] Identify { get; set; } + public virtual TestedMedia ReadCapabilities { get; set; } + public virtual List RemovableMedias { get; set; } + } + + public class Chs + { + public Chs() {} + + public Chs(chsType chs) + { + Cylinders = chs.Cylinders; + Heads = chs.Heads; + Sectors = chs.Sectors; + } + + [JsonIgnore] + public int Id { get; set; } + public ushort Cylinders { get; set; } + public ushort Heads { get; set; } + public ushort Sectors { get; set; } + } + + public class Scsi + { + public Scsi() {} + + public Scsi(scsiType scsi) + { + InquiryData = scsi.Inquiry.Data; + SupportsModeSense6 = scsi.SupportsModeSense6; + SupportsModeSense10 = scsi.SupportsModeSense10; + SupportsModeSubpages = scsi.SupportsModeSubpages; + + if(scsi.ReadCapabilitiesSpecified && + scsi.ReadCapabilities != null) + ReadCapabilities = new TestedMedia(scsi.ReadCapabilities, false); + + if(scsi.RemovableMedias != null) + { + RemovableMedias = new List(); + + foreach(testedMediaType scsiRemovableMedia in scsi.RemovableMedias) + RemovableMedias.Add(new TestedMedia(scsiRemovableMedia, false)); + } + + ModeSense6Data = scsi.ModeSense6Data; + ModeSense10Data = scsi.ModeSense10Data; + + if(scsi.EVPDPages != null) + { + EVPDPages = new List(); + + foreach(pageType evpdPage in scsi.EVPDPages) + EVPDPages.Add(new ScsiPage(evpdPage)); + } + + if(scsi.ModeSense != null) + ModeSense = new ScsiMode(scsi.ModeSense); + + if(scsi.MultiMediaDevice != null) + MultiMediaDevice = new Mmc(scsi.MultiMediaDevice); + + if(scsi.SequentialDevice != null) + SequentialDevice = new Ssc(scsi.SequentialDevice); + + if(InquiryData != null) + return; + + var inq = new Inquiry(); + + if(scsi.Inquiry.ANSIVersionSpecified) + inq.ANSIVersion = scsi.Inquiry.ANSIVersion; + + if(scsi.Inquiry.ECMAVersionSpecified) + inq.ECMAVersion = scsi.Inquiry.ECMAVersion; + + if(scsi.Inquiry.DeviceTypeModifierSpecified) + inq.DeviceTypeModifier = scsi.Inquiry.DeviceTypeModifier; + + if(scsi.Inquiry.ISOVersionSpecified) + inq.ISOVersion = scsi.Inquiry.ISOVersion; + + if(scsi.Inquiry.ProductIdentificationSpecified) + { + byte[] tmp = Encoding.ASCII.GetBytes(scsi.Inquiry.ProductIdentification); + inq.ProductIdentification = new byte[tmp.Length + 1]; + Array.Copy(tmp, 0, inq.ProductIdentification, 0, tmp.Length); + } + + if(scsi.Inquiry.ProductRevisionLevelSpecified) + { + byte[] tmp = Encoding.ASCII.GetBytes(scsi.Inquiry.ProductRevisionLevel); + inq.ProductRevisionLevel = new byte[tmp.Length + 1]; + Array.Copy(tmp, 0, inq.ProductRevisionLevel, 0, tmp.Length); + } + + if(scsi.Inquiry.ResponseDataFormatSpecified) + inq.ResponseDataFormat = scsi.Inquiry.ResponseDataFormat; + + if(scsi.Inquiry.VendorIdentificationSpecified) + { + byte[] tmp = Encoding.ASCII.GetBytes(scsi.Inquiry.VendorIdentification); + inq.VendorIdentification = new byte[tmp.Length + 1]; + Array.Copy(tmp, 0, inq.VendorIdentification, 0, tmp.Length); + } + + inq.ACC = scsi.Inquiry.AccessControlCoordinator; + inq.ACKREQQ = scsi.Inquiry.ACKRequests; + inq.AERC = scsi.Inquiry.AERCSupported; + inq.Addr16 = scsi.Inquiry.Address16; + inq.Addr32 = scsi.Inquiry.Address32; + inq.TPGS = (byte)scsi.Inquiry.AsymmetricalLUNAccess; + inq.BQue = scsi.Inquiry.BasicQueueing; + inq.EncServ = scsi.Inquiry.EnclosureServices; + inq.HiSup = scsi.Inquiry.HierarchicalLUN; + inq.IUS = scsi.Inquiry.IUS; + inq.Linked = scsi.Inquiry.LinkedCommands; + inq.MChngr = scsi.Inquiry.MediumChanger; + inq.MultiP = scsi.Inquiry.MultiPortDevice; + inq.NormACA = scsi.Inquiry.NormalACA; + inq.PeripheralDeviceType = (byte)scsi.Inquiry.PeripheralDeviceType; + inq.PeripheralQualifier = (byte)scsi.Inquiry.PeripheralQualifier; + inq.Protect = scsi.Inquiry.Protection; + inq.QAS = scsi.Inquiry.QAS; + inq.RelAddr = scsi.Inquiry.RelativeAddressing; + inq.RMB = scsi.Inquiry.Removable; + inq.CmdQue = scsi.Inquiry.TaggedCommandQueue; + inq.TrmTsk = scsi.Inquiry.TerminateTaskSupported; + inq.ThreePC = scsi.Inquiry.ThirdPartyCopy; + inq.TranDis = scsi.Inquiry.TranferDisable; + inq.SftRe = scsi.Inquiry.SoftReset; + inq.Clocking = (byte)scsi.Inquiry.SPIClocking; + inq.SCCS = scsi.Inquiry.StorageArrayController; + inq.Sync = scsi.Inquiry.SyncTransfer; + inq.VersionDescriptors = scsi.Inquiry.VersionDescriptors; + inq.WBus16 = scsi.Inquiry.WideBus16; + inq.WBus32 = scsi.Inquiry.WideBus32; + + InquiryData = Structs.Devices.SCSI.Inquiry.Encode(inq); + } + + public Inquiry? Inquiry => Structs.Devices.SCSI.Inquiry.Decode(InquiryData); + + [JsonIgnore] + public int Id { get; set; } + [DisplayName("Data from INQUIRY command")] + public byte[] InquiryData { get; set; } + public virtual List EVPDPages { get; set; } + [DisplayName("Supports MODE SENSE(6)")] + public bool SupportsModeSense6 { get; set; } + [DisplayName("Supports MODE SENSE(10)")] + public bool SupportsModeSense10 { get; set; } + [DisplayName("Supports MODE SENSE with subpages")] + public bool SupportsModeSubpages { get; set; } + public virtual ScsiMode ModeSense { get; set; } + public virtual Mmc MultiMediaDevice { get; set; } + public virtual TestedMedia ReadCapabilities { get; set; } + public virtual List RemovableMedias { get; set; } + public virtual Ssc SequentialDevice { get; set; } + [DisplayName("Data from MODE SENSE(6) command")] + public byte[] ModeSense6Data { get; set; } + [DisplayName("Data from MODE SENSE(10) command")] + public byte[] ModeSense10Data { get; set; } + [DisplayName("Data from MODE SENSE(6) command (current)")] + public byte[] ModeSense6CurrentData { get; set; } + [DisplayName("Data from MODE SENSE(10) command (current)")] + public byte[] ModeSense10CurrentData { get; set; } + [DisplayName("Data from MODE SENSE(6) command (changeable)")] + public byte[] ModeSense6ChangeableData { get; set; } + [DisplayName("Data from MODE SENSE(10) command (changeable)")] + public byte[] ModeSense10ChangeableData { get; set; } + + [JsonIgnore] + public int? SequentialDeviceId { get; set; } + } + + public class ScsiMode + { + public ScsiMode() {} + + public ScsiMode(modeType mode) + { + if(mode.MediumTypeSpecified) + MediumType = mode.MediumType; + + WriteProtected = mode.WriteProtected; + + if(mode.SpeedSpecified) + Speed = mode.Speed; + + if(mode.BufferedModeSpecified) + BufferedMode = mode.BufferedMode; + + BlankCheckEnabled = mode.BlankCheckEnabled; + DPOandFUA = mode.DPOandFUA; + + if(mode.ModePages != null) + { + ModePages = new List(); + + foreach(modePageType modePage in mode.ModePages) + ModePages.Add(new ScsiPage(modePage)); + } + + if(mode.BlockDescriptors == null) + return; + + BlockDescriptors = new List(); + + foreach(blockDescriptorType blockDescriptor in mode.BlockDescriptors) + BlockDescriptors.Add(new BlockDescriptor(blockDescriptor)); + } + + [JsonIgnore] + public int Id { get; set; } + [DisplayName("Medium type code")] + public byte? MediumType { get; set; } + [DisplayName("Write protected")] + public bool WriteProtected { get; set; } + public virtual List BlockDescriptors { get; set; } + public byte? Speed { get; set; } + [DisplayName("Buffered mode")] + public byte? BufferedMode { get; set; } + [DisplayName("Blank check enabled")] + public bool BlankCheckEnabled { get; set; } + [DisplayName("DPO and FUA")] + public bool DPOandFUA { get; set; } + public virtual List ModePages { get; set; } + } + + public class BlockDescriptor + { + public BlockDescriptor() {} + + public BlockDescriptor(blockDescriptorType descriptor) + { + Density = descriptor.Density; + + if(descriptor.BlocksSpecified) + Blocks = descriptor.Blocks; + + if(descriptor.BlockLengthSpecified) + BlockLength = descriptor.BlockLength; + } + + [JsonIgnore] + public int Id { get; set; } + public byte Density { get; set; } + public ulong? Blocks { get; set; } + [DisplayName("Block length (bytes)")] + public uint? BlockLength { get; set; } + } + + public class ScsiPage + { + public ScsiPage() {} + + public ScsiPage(pageType evpdPage) + { + page = evpdPage.page; + value = evpdPage.value; + } + + public ScsiPage(modePageType modePage) + { + page = modePage.page; + subpage = modePage.subpage; + value = modePage.value; + } + + [JsonIgnore] + public int Id { get; set; } + public byte page { get; set; } + public byte? subpage { get; set; } + public byte[] value { get; set; } + } + + public class Mmc + { + public Mmc() {} + + public Mmc(mmcType mmc) + { + if(mmc.ModeSense2A != null) + ModeSense2AData = ModePage_2A.Encode(new ModePage_2A + { + AccurateCDDA = mmc.ModeSense2A.AccurateCDDA, + BCK = mmc.ModeSense2A.BCK, + BufferSize = mmc.ModeSense2A.BufferSize, + BUF = mmc.ModeSense2A.BufferUnderRunProtection, + Eject = mmc.ModeSense2A.CanEject, + Lock = mmc.ModeSense2A.CanLockMedia, + CDDACommand = mmc.ModeSense2A.CDDACommand, + Composite = mmc.ModeSense2A.CompositeAudioVideo, + CMRSupported = (ushort)(mmc.ModeSense2A.CSSandCPPMSupported ? 1 : 0), + CurrentSpeed = mmc.ModeSense2A.CurrentSpeed, + CurrentWriteSpeed = mmc.ModeSense2A.CurrentWriteSpeed, + CurrentWriteSpeedSelected = mmc.ModeSense2A.CurrentWriteSpeedSelected, + SDP = mmc.ModeSense2A.DeterministicSlotChanger, + DigitalPort1 = mmc.ModeSense2A.DigitalPort1, + DigitalPort2 = mmc.ModeSense2A.DigitalPort2, + LeadInPW = mmc.ModeSense2A.LeadInPW, + LoadingMechanism = mmc.ModeSense2A.LoadingMechanismType, + LockState = mmc.ModeSense2A.LockStatus, + LSBF = mmc.ModeSense2A.LSBF, + MaximumSpeed = mmc.ModeSense2A.MaximumSpeed, + MaxWriteSpeed = mmc.ModeSense2A.MaximumWriteSpeed, + AudioPlay = mmc.ModeSense2A.PlaysAudio, + PreventJumper = mmc.ModeSense2A.PreventJumperStatus, + RCK = mmc.ModeSense2A.RCK, + ReadBarcode = mmc.ModeSense2A.ReadsBarcode, + SCC = mmc.ModeSense2A.ReadsBothSides, + ReadCDR = mmc.ModeSense2A.ReadsCDR, + ReadCDRW = mmc.ModeSense2A.ReadsCDRW, + DeinterlaveSubchannel = mmc.ModeSense2A.ReadsDeinterlavedSubchannel, + ReadDVDR = mmc.ModeSense2A.ReadsDVDR, + ReadDVDRAM = mmc.ModeSense2A.ReadsDVDRAM, + ReadDVDROM = mmc.ModeSense2A.ReadsDVDROM, + ISRC = mmc.ModeSense2A.ReadsISRC, + Mode2Form2 = mmc.ModeSense2A.ReadsMode2Form2, + Mode2Form1 = mmc.ModeSense2A.ReadsMode2Form1, + Method2 = mmc.ModeSense2A.ReadsPacketCDR, + Subchannel = mmc.ModeSense2A.ReadsSubchannel, + UPC = mmc.ModeSense2A.ReadsUPC, + C2Pointer = mmc.ModeSense2A.ReturnsC2Pointers, + RotationControlSelected = mmc.ModeSense2A.RotationControlSelected, + SeparateChannelMute = mmc.ModeSense2A.SeparateChannelMute, + SeparateChannelVolume = mmc.ModeSense2A.SeparateChannelVolume, + SSS = mmc.ModeSense2A.SSS, + MultiSession = mmc.ModeSense2A.SupportsMultiSession, + SupportedVolumeLevels = mmc.ModeSense2A.SupportedVolumeLevels, + TestWrite = mmc.ModeSense2A.TestWrite, + WriteCDR = mmc.ModeSense2A.WritesCDR, + WriteCDRW = mmc.ModeSense2A.WritesCDRW, + WriteDVDR = mmc.ModeSense2A.WritesDVDR, + WriteDVDRAM = mmc.ModeSense2A.WritesDVDRAM, + WriteSpeedPerformanceDescriptors = mmc.ModeSense2A.WriteSpeedPerformanceDescriptors + }); + + if(mmc.Features != null) + Features = new MmcFeatures(mmc.Features); + + if(mmc.TestedMedia == null) + return; + + TestedMedia = new List(); + + foreach(testedMediaType mediaType in mmc.TestedMedia) + TestedMedia.Add(new TestedMedia(mediaType, false)); + } + + [JsonIgnore] + public int Id { get; set; } + public virtual ModePage_2A ModeSense2A => ModePage_2A.Decode(ModeSense2AData); + public virtual MmcFeatures Features { get; set; } + public virtual List TestedMedia { get; set; } + public byte[] ModeSense2AData { get; set; } + [JsonIgnore] + public int? FeaturesId { get; set; } + } + + public class MmcFeatures + { + public MmcFeatures() {} + + public MmcFeatures(mmcFeaturesType features) + { + if(features.PhysicalInterfaceStandardSpecified && + !features.PhysicalInterfaceStandardNumberSpecified) + PhysicalInterfaceStandardNumber = (uint?)features.PhysicalInterfaceStandard; + + if(features.PhysicalInterfaceStandardNumberSpecified) + PhysicalInterfaceStandardNumber = features.PhysicalInterfaceStandardNumber; + + if(features.AACSVersionSpecified) + AACSVersion = features.AACSVersion; + + if(features.AGIDsSpecified) + AGIDs = features.AGIDs; + + if(features.BindingNonceBlocksSpecified) + BindingNonceBlocks = features.BindingNonceBlocks; + + if(features.CPRMVersionSpecified) + CPRMVersion = features.CPRMVersion; + + if(features.CSSVersionSpecified) + CSSVersion = features.CSSVersion; + + if(features.LoadingMechanismTypeSpecified) + LoadingMechanismType = features.LoadingMechanismType; + + if(features.LogicalBlockSizeSpecified) + LogicalBlockSize = features.LogicalBlockSize; + + if(features.BlocksPerReadableUnitSpecified) + BlocksPerReadableUnit = features.BlocksPerReadableUnit; + + if(features.FirmwareDateSpecified) + FirmwareDate = features.FirmwareDate; + + if(features.VolumeLevelsSpecified) + VolumeLevels = features.VolumeLevels; + + BufferUnderrunFreeInDVD = features.BufferUnderrunFreeInDVD; + BufferUnderrunFreeInSAO = features.BufferUnderrunFreeInSAO; + BufferUnderrunFreeInTAO = features.BufferUnderrunFreeInTAO; + CanAudioScan = features.CanAudioScan; + CanEject = features.CanEject; + CanEraseSector = features.CanEraseSector; + CanExpandBDRESpareArea = features.CanExpandBDRESpareArea; + CanFormat = features.CanFormat; + CanFormatBDREWithoutSpare = features.CanFormatBDREWithoutSpare; + CanFormatCert = features.CanFormatCert; + CanFormatFRF = features.CanFormatFRF; + CanFormatQCert = features.CanFormatQCert; + CanFormatRRM = features.CanFormatRRM; + CanGenerateBindingNonce = features.CanGenerateBindingNonce; + CanLoad = features.CanLoad; + CanMuteSeparateChannels = features.CanMuteSeparateChannels; + CanOverwriteSAOTrack = features.CanOverwriteSAOTrack; + CanOverwriteTAOTrack = features.CanOverwriteTAOTrack; + CanPlayCDAudio = features.CanPlayCDAudio; + CanPseudoOverwriteBDR = features.CanPseudoOverwriteBDR; + CanReadAllDualR = features.CanReadAllDualR; + CanReadAllDualRW = features.CanReadAllDualRW; + CanReadBD = features.CanReadBD; + CanReadBDR = features.CanReadBDR; + CanReadBDRE1 = features.CanReadBDRE1; + CanReadBDRE2 = features.CanReadBDRE2; + CanReadBDROM = features.CanReadBDROM; + CanReadBluBCA = features.CanReadBluBCA; + CanReadCD = features.CanReadCD; + CanReadCDMRW = features.CanReadCDMRW; + CanReadCPRM_MKB = features.CanReadCPRM_MKB; + CanReadDDCD = features.CanReadDDCD; + CanReadDVD = features.CanReadDVD; + CanReadDVDPlusMRW = features.CanReadDVDPlusMRW; + CanReadDVDPlusR = features.CanReadDVDPlusR; + CanReadDVDPlusRDL = features.CanReadDVDPlusRDL; + CanReadDVDPlusRW = features.CanReadDVDPlusRW; + CanReadDVDPlusRWDL = features.CanReadDVDPlusRWDL; + CanReadDriveAACSCertificate = features.CanReadDriveAACSCertificate; + CanReadHDDVD = features.CanReadHDDVD; + CanReadHDDVDR = features.CanReadHDDVDR; + CanReadHDDVDRAM = features.CanReadHDDVDRAM; + CanReadLeadInCDText = features.CanReadLeadInCDText; + CanReadOldBDR = features.CanReadOldBDR; + CanReadOldBDRE = features.CanReadOldBDRE; + CanReadOldBDROM = features.CanReadOldBDROM; + CanReadSpareAreaInformation = features.CanReadSpareAreaInformation; + CanReportDriveSerial = features.CanReportDriveSerial; + CanReportMediaSerial = features.CanReportMediaSerial; + CanTestWriteDDCDR = features.CanTestWriteDDCDR; + CanTestWriteDVD = features.CanTestWriteDVD; + CanTestWriteInSAO = features.CanTestWriteInSAO; + CanTestWriteInTAO = features.CanTestWriteInTAO; + CanUpgradeFirmware = features.CanUpgradeFirmware; + CanWriteBD = features.CanWriteBD; + CanWriteBDR = features.CanWriteBDR; + CanWriteBDRE1 = features.CanWriteBDRE1; + CanWriteBDRE2 = features.CanWriteBDRE2; + CanWriteBusEncryptedBlocks = features.CanWriteBusEncryptedBlocks; + CanWriteCDMRW = features.CanWriteCDMRW; + CanWriteCDRW = features.CanWriteCDRW; + CanWriteCDRWCAV = features.CanWriteCDRWCAV; + CanWriteCDSAO = features.CanWriteCDSAO; + CanWriteCDTAO = features.CanWriteCDTAO; + CanWriteCSSManagedDVD = features.CanWriteCSSManagedDVD; + CanWriteDDCDR = features.CanWriteDDCDR; + CanWriteDDCDRW = features.CanWriteDDCDRW; + CanWriteDVDPlusMRW = features.CanWriteDVDPlusMRW; + CanWriteDVDPlusR = features.CanWriteDVDPlusR; + CanWriteDVDPlusRDL = features.CanWriteDVDPlusRDL; + CanWriteDVDPlusRW = features.CanWriteDVDPlusRW; + CanWriteDVDPlusRWDL = features.CanWriteDVDPlusRWDL; + CanWriteDVDR = features.CanWriteDVDR; + CanWriteDVDRDL = features.CanWriteDVDRDL; + CanWriteDVDRW = features.CanWriteDVDRW; + CanWriteHDDVDR = features.CanWriteHDDVDR; + CanWriteHDDVDRAM = features.CanWriteHDDVDRAM; + CanWriteOldBDR = features.CanWriteOldBDR; + CanWriteOldBDRE = features.CanWriteOldBDRE; + CanWritePackedSubchannelInTAO = features.CanWritePackedSubchannelInTAO; + CanWriteRWSubchannelInSAO = features.CanWriteRWSubchannelInSAO; + CanWriteRWSubchannelInTAO = features.CanWriteRWSubchannelInTAO; + CanWriteRaw = features.CanWriteRaw; + CanWriteRawMultiSession = features.CanWriteRawMultiSession; + CanWriteRawSubchannelInTAO = features.CanWriteRawSubchannelInTAO; + ChangerIsSideChangeCapable = features.ChangerIsSideChangeCapable; + ChangerSlots = features.ChangerSlots; + ChangerSupportsDiscPresent = features.ChangerSupportsDiscPresent; + DBML = features.DBML; + DVDMultiRead = features.DVDMultiRead; + EmbeddedChanger = features.EmbeddedChanger; + ErrorRecoveryPage = features.ErrorRecoveryPage; + Locked = features.Locked; + MultiRead = features.MultiRead; + PreventJumper = features.PreventJumper; + SupportsAACS = features.SupportsAACS; + SupportsBusEncryption = features.SupportsBusEncryption; + SupportsC2 = features.SupportsC2; + SupportsCPRM = features.SupportsCPRM; + SupportsCSS = features.SupportsCSS; + SupportsDAP = features.SupportsDAP; + SupportsDeviceBusyEvent = features.SupportsDeviceBusyEvent; + SupportsHybridDiscs = features.SupportsHybridDiscs; + SupportsModePage1Ch = features.SupportsModePage1Ch; + SupportsOSSC = features.SupportsOSSC; + SupportsPWP = features.SupportsPWP; + SupportsSWPP = features.SupportsSWPP; + SupportsSecurDisc = features.SupportsSecurDisc; + SupportsSeparateVolume = features.SupportsSeparateVolume; + SupportsVCPS = features.SupportsVCPS; + SupportsWriteInhibitDCB = features.SupportsWriteInhibitDCB; + SupportsWriteProtectPAC = features.SupportsWriteProtectPAC; + } + + [JsonIgnore] + public int Id { get; set; } + [DisplayName("AACS version")] + public byte? AACSVersion { get; set; } + [DisplayName("AGIDs")] + public byte? AGIDs { get; set; } + [DisplayName("Binding nonce blocks")] + public byte? BindingNonceBlocks { get; set; } + [DisplayName("Blocks per redable unit")] + public ushort? BlocksPerReadableUnit { get; set; } + [DisplayName("Buffer under-run free in DVD writing")] + public bool BufferUnderrunFreeInDVD { get; set; } + [DisplayName("Buffer under-run free in SAO writing")] + public bool BufferUnderrunFreeInSAO { get; set; } + [DisplayName("Buffer under-run free in TAO writing")] + public bool BufferUnderrunFreeInTAO { get; set; } + [DisplayName("Can audio scan")] + public bool CanAudioScan { get; set; } + [DisplayName("Can eject")] + public bool CanEject { get; set; } + [DisplayName("Can erase sectors")] + public bool CanEraseSector { get; set; } + [DisplayName("Can expand BD-RE spare area")] + public bool CanExpandBDRESpareArea { get; set; } + [DisplayName("Can format media")] + public bool CanFormat { get; set; } + [DisplayName("Can format BD-RE without spare area")] + public bool CanFormatBDREWithoutSpare { get; set; } + [DisplayName("Can do a fully certified format")] + public bool CanFormatCert { get; set; } + [DisplayName("Can do a FRF format")] + public bool CanFormatFRF { get; set; } + [DisplayName("Can do a quick certified format")] + public bool CanFormatQCert { get; set; } + [DisplayName("Can do a RRM format")] + public bool CanFormatRRM { get; set; } + [DisplayName("Can generate binding nonce")] + public bool CanGenerateBindingNonce { get; set; } + [DisplayName("Can load")] + public bool CanLoad { get; set; } + [DisplayName("Can mute separate channels")] + public bool CanMuteSeparateChannels { get; set; } + [DisplayName("Can overwrite track in SAO")] + public bool CanOverwriteSAOTrack { get; set; } + [DisplayName("Can overwrite track in TAO")] + public bool CanOverwriteTAOTrack { get; set; } + [DisplayName("Can play CD-DA")] + public bool CanPlayCDAudio { get; set; } + [DisplayName("Can pseudo-overwrite BD-R")] + public bool CanPseudoOverwriteBDR { get; set; } + [DisplayName("Can read all dual-layer recordables")] + public bool CanReadAllDualR { get; set; } + [DisplayName("Can read all dual-layer rewritables")] + public bool CanReadAllDualRW { get; set; } + [DisplayName("Can read Blu-ray")] + public bool CanReadBD { get; set; } + [DisplayName("Can read BD-R")] + public bool CanReadBDR { get; set; } + [DisplayName("Can read BD-RE v1")] + public bool CanReadBDRE1 { get; set; } + [DisplayName("Can read BD-RE v2")] + public bool CanReadBDRE2 { get; set; } + [DisplayName("Can read BD-ROM")] + public bool CanReadBDROM { get; set; } + [DisplayName("Can read BCA from Blu-ray")] + public bool CanReadBluBCA { get; set; } + [DisplayName("Can read CD")] + public bool CanReadCD { get; set; } + [DisplayName("Can read CD-MRW")] + public bool CanReadCDMRW { get; set; } + [DisplayName("Can read CPRM's MKB")] + public bool CanReadCPRM_MKB { get; set; } + [DisplayName("Can read DDCD")] + public bool CanReadDDCD { get; set; } + [DisplayName("Can read DVD")] + public bool CanReadDVD { get; set; } + [DisplayName("Can read DVD+MRW")] + public bool CanReadDVDPlusMRW { get; set; } + [DisplayName("Can read DVD+R")] + public bool CanReadDVDPlusR { get; set; } + [DisplayName("Can read DVD+R DL")] + public bool CanReadDVDPlusRDL { get; set; } + [DisplayName("Can read DVD+RW")] + public bool CanReadDVDPlusRW { get; set; } + [DisplayName("Can read DVD+RW DL")] + public bool CanReadDVDPlusRWDL { get; set; } + [DisplayName("Can read drive's AACS certificate")] + public bool CanReadDriveAACSCertificate { get; set; } + [DisplayName("Can read HD DVD")] + public bool CanReadHDDVD { get; set; } + [DisplayName("Can read HD DVD-R")] + public bool CanReadHDDVDR { get; set; } + [DisplayName("Can read HD DVD-RAM")] + public bool CanReadHDDVDRAM { get; set; } + [DisplayName("Can read Lead-In's CD-TEXT")] + public bool CanReadLeadInCDText { get; set; } + [DisplayName("Can read old generation BD-R")] + public bool CanReadOldBDR { get; set; } + [DisplayName("Can read old generation BD-RE")] + public bool CanReadOldBDRE { get; set; } + [DisplayName("Can read old generation BD-ROM")] + public bool CanReadOldBDROM { get; set; } + [DisplayName("Can read spare area information")] + public bool CanReadSpareAreaInformation { get; set; } + [DisplayName("Can report drive serial number")] + public bool CanReportDriveSerial { get; set; } + [DisplayName("Can report media serial number")] + public bool CanReportMediaSerial { get; set; } + [DisplayName("Can test write DDCD-R")] + public bool CanTestWriteDDCDR { get; set; } + [DisplayName("Can test write DVD")] + public bool CanTestWriteDVD { get; set; } + [DisplayName("Can test write in SAO mode")] + public bool CanTestWriteInSAO { get; set; } + [DisplayName("Can test write in TAO mode")] + public bool CanTestWriteInTAO { get; set; } + [DisplayName("Can upgrade firmware")] + public bool CanUpgradeFirmware { get; set; } + [DisplayName("Can write Blu-ray")] + public bool CanWriteBD { get; set; } + [DisplayName("Can write BD-R")] + public bool CanWriteBDR { get; set; } + [DisplayName("Can write BD-RE v1")] + public bool CanWriteBDRE1 { get; set; } + [DisplayName("Can write BD-RE v2")] + public bool CanWriteBDRE2 { get; set; } + [DisplayName("Can write bus encrypted blocks")] + public bool CanWriteBusEncryptedBlocks { get; set; } + [DisplayName("Can write CD-MRW")] + public bool CanWriteCDMRW { get; set; } + [DisplayName("Can write CD-RW")] + public bool CanWriteCDRW { get; set; } + [DisplayName("Can write CD-RW CAV")] + public bool CanWriteCDRWCAV { get; set; } + [DisplayName("Can write CD in SAO mode")] + public bool CanWriteCDSAO { get; set; } + [DisplayName("Can write CD in TAO mode")] + public bool CanWriteCDTAO { get; set; } + [DisplayName("Can write CSS managed DVD")] + public bool CanWriteCSSManagedDVD { get; set; } + [DisplayName("Can write DDCD-R")] + public bool CanWriteDDCDR { get; set; } + [DisplayName("Can write DDCD-RW")] + public bool CanWriteDDCDRW { get; set; } + [DisplayName("Can write DVD+MRW")] + public bool CanWriteDVDPlusMRW { get; set; } + [DisplayName("Can write DVD+R")] + public bool CanWriteDVDPlusR { get; set; } + [DisplayName("Can write DVD+R DL")] + public bool CanWriteDVDPlusRDL { get; set; } + [DisplayName("Can write DVD+RW")] + public bool CanWriteDVDPlusRW { get; set; } + [DisplayName("Can write DVD+RW DL")] + public bool CanWriteDVDPlusRWDL { get; set; } + [DisplayName("Can write DVD-R")] + public bool CanWriteDVDR { get; set; } + [DisplayName("Can write DVD-R DL")] + public bool CanWriteDVDRDL { get; set; } + [DisplayName("Can write DVD-RW")] + public bool CanWriteDVDRW { get; set; } + [DisplayName("Can write HD DVD-R")] + public bool CanWriteHDDVDR { get; set; } + [DisplayName("Can write HD DVD-RAM")] + public bool CanWriteHDDVDRAM { get; set; } + [DisplayName("Can write old generation BD-R")] + public bool CanWriteOldBDR { get; set; } + [DisplayName("Can write old generation BD-RE")] + public bool CanWriteOldBDRE { get; set; } + [DisplayName("Can write packet subchannel in TAO")] + public bool CanWritePackedSubchannelInTAO { get; set; } + [DisplayName("Can write RW subchannel in SAO")] + public bool CanWriteRWSubchannelInSAO { get; set; } + [DisplayName("Can write RW subchannel in TAO")] + public bool CanWriteRWSubchannelInTAO { get; set; } + [DisplayName("Can write RAW-96 sectors")] + public bool CanWriteRaw { get; set; } + [DisplayName("Can write RAW-96 sectors in multisession")] + public bool CanWriteRawMultiSession { get; set; } + [DisplayName("Can write RAW-96 sectors in TAO")] + public bool CanWriteRawSubchannelInTAO { get; set; } + [DisplayName("Changer is side change capable")] + public bool ChangerIsSideChangeCapable { get; set; } + [DisplayName("Changer slots")] + public byte ChangerSlots { get; set; } + [DisplayName("Changer supports disc present")] + public bool ChangerSupportsDiscPresent { get; set; } + [DisplayName("CPRM version")] + public byte? CPRMVersion { get; set; } + [DisplayName("CSS version")] + public byte? CSSVersion { get; set; } + [DisplayName("DBML")] + public bool DBML { get; set; } + [DisplayName("DVD Multi-Read Specification")] + public bool DVDMultiRead { get; set; } + [DisplayName("Has an embedded changer")] + public bool EmbeddedChanger { get; set; } + [DisplayName("Has error recovery page")] + public bool ErrorRecoveryPage { get; set; } + [DisplayName("Firmware date")] + public DateTime? FirmwareDate { get; set; } + [DisplayName("Loading mechanism type")] + public byte? LoadingMechanismType { get; set; } + [DisplayName("Locked")] + public bool Locked { get; set; } + [DisplayName("Logical block size")] + public uint? LogicalBlockSize { get; set; } + [DisplayName("Multi-Read Specification")] + public bool MultiRead { get; set; } + [DisplayName("Physical interface standard")] + public PhysicalInterfaces? PhysicalInterfaceStandard => (PhysicalInterfaces?)PhysicalInterfaceStandardNumber; + [DisplayName("Physical interface standard number")] + public uint? PhysicalInterfaceStandardNumber { get; set; } + [DisplayName("Prevent eject jumper")] + public bool PreventJumper { get; set; } + [DisplayName("Supports AACS")] + public bool SupportsAACS { get; set; } + [DisplayName("Supports bus encryption")] + public bool SupportsBusEncryption { get; set; } + [DisplayName("Supports C2 pointers")] + public bool SupportsC2 { get; set; } + [DisplayName("Supports CPRM")] + public bool SupportsCPRM { get; set; } + [DisplayName("Supports CSS")] + public bool SupportsCSS { get; set; } + [DisplayName("Supports DAP")] + public bool SupportsDAP { get; set; } + [DisplayName("Supports device busy event")] + public bool SupportsDeviceBusyEvent { get; set; } + [DisplayName("Supports hybrid discs")] + public bool SupportsHybridDiscs { get; set; } + [DisplayName("Supports MODE PAGE 1Ch")] + public bool SupportsModePage1Ch { get; set; } + [DisplayName("Supports OSSC")] + public bool SupportsOSSC { get; set; } + [DisplayName("Supports PWP")] + public bool SupportsPWP { get; set; } + [DisplayName("Supports SWPP")] + public bool SupportsSWPP { get; set; } + [DisplayName("Supports SecurDisc")] + public bool SupportsSecurDisc { get; set; } + [DisplayName("Support separate volume levels")] + public bool SupportsSeparateVolume { get; set; } + [DisplayName("Supports VCPS")] + public bool SupportsVCPS { get; set; } + [DisplayName("Supports write inhibit DCB")] + public bool SupportsWriteInhibitDCB { get; set; } + [DisplayName("Supports write protect PAC")] + public bool SupportsWriteProtectPAC { get; set; } + [DisplayName("Volume levels")] + public ushort? VolumeLevels { get; set; } + [DisplayName("MMC FEATURES binary data")] + public byte[] BinaryData { get; set; } + } + + public class TestedMedia + { + public Identify.IdentifyDevice? IdentifyDevice; + + public TestedMedia() {} + + public TestedMedia(testedMediaType mediaType, bool ata) + { + if(mediaType.BlocksSpecified) + Blocks = mediaType.Blocks; + + if(mediaType.BlockSizeSpecified) + BlockSize = mediaType.BlockSize; + + if(mediaType.CanReadAACSSpecified) + CanReadAACS = mediaType.CanReadAACS; + + if(mediaType.CanReadADIPSpecified) + CanReadADIP = mediaType.CanReadADIP; + + if(mediaType.CanReadATIPSpecified) + CanReadATIP = mediaType.CanReadATIP; + + if(mediaType.CanReadBCASpecified) + CanReadBCA = mediaType.CanReadBCA; + + if(mediaType.CanReadC2PointersSpecified) + CanReadC2Pointers = mediaType.CanReadC2Pointers; + + if(mediaType.CanReadCMISpecified) + CanReadCMI = mediaType.CanReadCMI; + + if(mediaType.CanReadCorrectedSubchannelSpecified) + CanReadCorrectedSubchannel = mediaType.CanReadCorrectedSubchannel; + + if(mediaType.CanReadCorrectedSubchannelWithC2Specified) + CanReadCorrectedSubchannelWithC2 = mediaType.CanReadCorrectedSubchannelWithC2; + + if(mediaType.CanReadDCBSpecified) + CanReadDCB = mediaType.CanReadDCB; + + if(mediaType.CanReadDDSSpecified) + CanReadDDS = mediaType.CanReadDDS; + + if(mediaType.CanReadDMISpecified) + CanReadDMI = mediaType.CanReadDMI; + + if(mediaType.CanReadDiscInformationSpecified) + CanReadDiscInformation = mediaType.CanReadDiscInformation; + + if(mediaType.CanReadFullTOCSpecified) + CanReadFullTOC = mediaType.CanReadFullTOC; + + if(mediaType.CanReadHDCMISpecified) + CanReadHDCMI = mediaType.CanReadHDCMI; + + if(mediaType.CanReadLayerCapacitySpecified) + CanReadLayerCapacity = mediaType.CanReadLayerCapacity; + + if(mediaType.CanReadLeadInSpecified) + CanReadFirstTrackPreGap = mediaType.CanReadLeadIn; + + if(mediaType.CanReadLeadOutSpecified) + CanReadLeadOut = mediaType.CanReadLeadOut; + + if(mediaType.CanReadMediaIDSpecified) + CanReadMediaID = mediaType.CanReadMediaID; + + if(mediaType.CanReadMediaSerialSpecified) + CanReadMediaSerial = mediaType.CanReadMediaSerial; + + if(mediaType.CanReadPACSpecified) + CanReadPAC = mediaType.CanReadPAC; + + if(mediaType.CanReadPFISpecified) + CanReadPFI = mediaType.CanReadPFI; + + if(mediaType.CanReadPMASpecified) + CanReadPMA = mediaType.CanReadPMA; + + if(mediaType.CanReadPQSubchannelSpecified) + CanReadPQSubchannel = mediaType.CanReadPQSubchannel; + + if(mediaType.CanReadPQSubchannelWithC2Specified) + CanReadPQSubchannelWithC2 = mediaType.CanReadPQSubchannelWithC2; + + if(mediaType.CanReadPRISpecified) + CanReadPRI = mediaType.CanReadPRI; + + if(mediaType.CanReadRWSubchannelSpecified) + CanReadRWSubchannel = mediaType.CanReadRWSubchannel; + + if(mediaType.CanReadRWSubchannelWithC2Specified) + CanReadRWSubchannelWithC2 = mediaType.CanReadRWSubchannelWithC2; + + if(mediaType.CanReadRecordablePFISpecified) + CanReadRecordablePFI = mediaType.CanReadRecordablePFI; + + if(mediaType.CanReadSpareAreaInformationSpecified) + CanReadSpareAreaInformation = mediaType.CanReadSpareAreaInformation; + + if(mediaType.CanReadTOCSpecified) + CanReadTOC = mediaType.CanReadTOC; + + if(mediaType.DensitySpecified) + Density = mediaType.Density; + + if(mediaType.LongBlockSizeSpecified) + LongBlockSize = mediaType.LongBlockSize; + + if(mediaType.ManufacturerSpecified) + Manufacturer = mediaType.Manufacturer; + + if(mediaType.MediumTypeSpecified) + MediumType = mediaType.MediumType; + + if(mediaType.ModelSpecified) + Model = mediaType.Model; + + if(mediaType.SupportsHLDTSTReadRawDVDSpecified) + SupportsHLDTSTReadRawDVD = mediaType.SupportsHLDTSTReadRawDVD; + + if(mediaType.SupportsNECReadCDDASpecified) + SupportsNECReadCDDA = mediaType.SupportsNECReadCDDA; + + if(mediaType.SupportsPioneerReadCDDASpecified) + SupportsPioneerReadCDDA = mediaType.SupportsPioneerReadCDDA; + + if(mediaType.SupportsPioneerReadCDDAMSFSpecified) + SupportsPioneerReadCDDAMSF = mediaType.SupportsPioneerReadCDDAMSF; + + if(mediaType.SupportsPlextorReadCDDASpecified) + SupportsPlextorReadCDDA = mediaType.SupportsPlextorReadCDDA; + + if(mediaType.SupportsPlextorReadRawDVDSpecified) + SupportsPlextorReadRawDVD = mediaType.SupportsPlextorReadRawDVD; + + if(mediaType.SupportsRead10Specified) + SupportsRead10 = mediaType.SupportsRead10; + + if(mediaType.SupportsRead12Specified) + SupportsRead12 = mediaType.SupportsRead12; + + if(mediaType.SupportsRead16Specified) + SupportsRead16 = mediaType.SupportsRead16; + + if(mediaType.SupportsReadSpecified) + { + if(ata) + SupportsReadSectors = mediaType.SupportsRead; + else + SupportsRead6 = mediaType.SupportsRead; + } + + if(mediaType.SupportsReadCapacity16Specified) + SupportsReadCapacity16 = mediaType.SupportsReadCapacity16; + + if(mediaType.SupportsReadCapacitySpecified) + SupportsReadCapacity = mediaType.SupportsReadCapacity; + + if(mediaType.SupportsReadCdSpecified) + SupportsReadCd = mediaType.SupportsReadCd; + + if(mediaType.SupportsReadCdMsfSpecified) + SupportsReadCdMsf = mediaType.SupportsReadCdMsf; + + if(mediaType.SupportsReadCdRawSpecified) + SupportsReadCdRaw = mediaType.SupportsReadCdRaw; + + if(mediaType.SupportsReadCdMsfRawSpecified) + SupportsReadCdMsfRaw = mediaType.SupportsReadCdMsfRaw; + + if(mediaType.SupportsReadLong16Specified) + SupportsReadLong16 = mediaType.SupportsReadLong16; + + if(mediaType.SupportsReadLongSpecified) + SupportsReadLong = mediaType.SupportsReadLong; + + if(mediaType.LBASectorsSpecified) + LBASectors = mediaType.LBASectors; + + if(mediaType.LBA48SectorsSpecified) + LBA48Sectors = mediaType.LBA48Sectors; + + if(mediaType.LogicalAlignmentSpecified) + LogicalAlignment = mediaType.LogicalAlignment; + + if(mediaType.NominalRotationRateSpecified) + NominalRotationRate = mediaType.NominalRotationRate; + + if(mediaType.PhysicalBlockSizeSpecified) + PhysicalBlockSize = mediaType.PhysicalBlockSize; + + if(mediaType.SolidStateDeviceSpecified) + SolidStateDevice = mediaType.SolidStateDevice; + + if(mediaType.UnformattedBPTSpecified) + UnformattedBPT = mediaType.UnformattedBPT; + + if(mediaType.UnformattedBPSSpecified) + UnformattedBPS = mediaType.UnformattedBPS; + + if(mediaType.SupportsReadDmaLbaSpecified) + SupportsReadDmaLba = mediaType.SupportsReadDmaLba; + + if(mediaType.SupportsReadDmaRetryLbaSpecified) + SupportsReadDmaRetryLba = mediaType.SupportsReadDmaRetryLba; + + if(mediaType.SupportsReadLbaSpecified) + SupportsReadLba = mediaType.SupportsReadLba; + + if(mediaType.SupportsReadRetryLbaSpecified) + SupportsReadRetryLba = mediaType.SupportsReadRetryLba; + + if(mediaType.SupportsReadLongLbaSpecified) + SupportsReadLongLba = mediaType.SupportsReadLongLba; + + if(mediaType.SupportsReadLongRetryLbaSpecified) + SupportsReadLongRetryLba = mediaType.SupportsReadLongRetryLba; + + if(mediaType.SupportsSeekLbaSpecified) + SupportsSeekLba = mediaType.SupportsSeekLba; + + if(mediaType.SupportsReadDmaLba48Specified) + SupportsReadDmaLba48 = mediaType.SupportsReadDmaLba48; + + if(mediaType.SupportsReadLba48Specified) + SupportsReadLba48 = mediaType.SupportsReadLba48; + + if(mediaType.SupportsReadDmaSpecified) + SupportsReadDma = mediaType.SupportsReadDma; + + if(mediaType.SupportsReadDmaRetrySpecified) + SupportsReadDmaRetry = mediaType.SupportsReadDmaRetry; + + if(mediaType.SupportsReadRetrySpecified) + SupportsReadRetry = mediaType.SupportsReadRetry; + + if(mediaType.SupportsReadLongRetrySpecified) + SupportsReadLongRetry = mediaType.SupportsReadLongRetry; + + if(mediaType.SupportsSeekSpecified) + SupportsSeek = mediaType.SupportsSeek; + + if(mediaType.CHS != null) + CHS = new Chs(mediaType.CHS); + + if(mediaType.CurrentCHS != null) + CurrentCHS = new Chs(mediaType.CurrentCHS); + + MediaIsRecognized = mediaType.MediaIsRecognized; + MediumTypeName = mediaType.MediumTypeName; + ModeSense6Data = mediaType.ModeSense6Data; + ModeSense10Data = mediaType.ModeSense10Data; + } + + [JsonIgnore] + public int Id { get; set; } + [DisplayName("IDENTIFY DEVICE data")] + public byte[] IdentifyData { get; set; } + [DisplayName("Blocks")] + public ulong? Blocks { get; set; } + [DisplayName("Bytes per block")] + public uint? BlockSize { get; set; } + [DisplayName("Can read AACS")] + public bool? CanReadAACS { get; set; } + [DisplayName("Can read ADIP")] + public bool? CanReadADIP { get; set; } + [DisplayName("Can read ATIP")] + public bool? CanReadATIP { get; set; } + [DisplayName("Can read BCA")] + public bool? CanReadBCA { get; set; } + [DisplayName("Can read C2 pointers")] + public bool? CanReadC2Pointers { get; set; } + [DisplayName("Can read Copyright Management Information")] + public bool? CanReadCMI { get; set; } + [DisplayName("Can read corrected subchannel")] + public bool? CanReadCorrectedSubchannel { get; set; } + [DisplayName("Can read corrected subchannel with C2 pointers")] + public bool? CanReadCorrectedSubchannelWithC2 { get; set; } + [DisplayName("Can read DCBs")] + public bool? CanReadDCB { get; set; } + [DisplayName("Can read DDS")] + public bool? CanReadDDS { get; set; } + [DisplayName("Can read DMI")] + public bool? CanReadDMI { get; set; } + [DisplayName("Can read disc information")] + public bool? CanReadDiscInformation { get; set; } + [DisplayName("Can read full TOC")] + public bool? CanReadFullTOC { get; set; } + [DisplayName("Can read HD-DVD Copyright Management Information")] + public bool? CanReadHDCMI { get; set; } + [DisplayName("Can read layer capacity")] + public bool? CanReadLayerCapacity { get; set; } + [DisplayName("Can read into first track pregap")] + public bool? CanReadFirstTrackPreGap { get; set; } + [DisplayName("Can read into Lead-In")] + public bool? CanReadLeadIn { get; set; } + [DisplayName("Can read into Lead-Out")] + public bool? CanReadLeadOut { get; set; } + [DisplayName("Can read media ID")] + public bool? CanReadMediaID { get; set; } + [DisplayName("Can read media serial number")] + public bool? CanReadMediaSerial { get; set; } + [DisplayName("Can read PAC")] + public bool? CanReadPAC { get; set; } + [DisplayName("Can read PFI")] + public bool? CanReadPFI { get; set; } + [DisplayName("Can read PMA")] + public bool? CanReadPMA { get; set; } + [DisplayName("Can read PQ subchannel")] + public bool? CanReadPQSubchannel { get; set; } + [DisplayName("Can read PQ subchannel with C2 pointers")] + public bool? CanReadPQSubchannelWithC2 { get; set; } + [DisplayName("Can read pre-recorded information")] + public bool? CanReadPRI { get; set; } + [DisplayName("Can read RW subchannel")] + public bool? CanReadRWSubchannel { get; set; } + [DisplayName("Can read RW subchannel with C2 pointers")] + public bool? CanReadRWSubchannelWithC2 { get; set; } + [DisplayName("Can read recordable PFI")] + public bool? CanReadRecordablePFI { get; set; } + [DisplayName("Can read spare area information")] + public bool? CanReadSpareAreaInformation { get; set; } + [DisplayName("Can read TOC")] + public bool? CanReadTOC { get; set; } + [DisplayName("Density code")] + public byte? Density { get; set; } + [DisplayName("Bytes per block in READ LONG commands")] + public uint? LongBlockSize { get; set; } + [DisplayName("Media manufacturer")] + public string Manufacturer { get; set; } + [DisplayName("Media recognized by drive?")] + public bool MediaIsRecognized { get; set; } + [DisplayName("Medium type code")] + public byte? MediumType { get; set; } + [DisplayName("Media type")] + public string MediumTypeName { get; set; } + [DisplayName("Media model")] + public string Model { get; set; } + [DisplayName("Can read scrambled DVD sectors using HL-DT-ST cache trick")] + public bool? SupportsHLDTSTReadRawDVD { get; set; } + [DisplayName("Supports NEC READ CD-DA command")] + public bool? SupportsNECReadCDDA { get; set; } + [DisplayName("Supports Pioneer READ CD-DA command")] + public bool? SupportsPioneerReadCDDA { get; set; } + [DisplayName("Supports Pioneer READ CD-DA MSF command")] + public bool? SupportsPioneerReadCDDAMSF { get; set; } + [DisplayName("Supports Plextor READ CD-DA command")] + public bool? SupportsPlextorReadCDDA { get; set; } + [DisplayName("Can read scrambled DVD sectors using Plextor vendor command")] + public bool? SupportsPlextorReadRawDVD { get; set; } + [DisplayName("Supports READ(10) command")] + public bool? SupportsRead10 { get; set; } + [DisplayName("Supports READ(12) command")] + public bool? SupportsRead12 { get; set; } + [DisplayName("Supports READ(16) command")] + public bool? SupportsRead16 { get; set; } + [DisplayName("Supports READ(6) command")] + public bool? SupportsRead6 { get; set; } + [DisplayName("Supports READ CAPACITY(16) command")] + public bool? SupportsReadCapacity16 { get; set; } + [DisplayName("Supports READ CAPACITY command")] + public bool? SupportsReadCapacity { get; set; } + [DisplayName("Supports READ CD command")] + public bool? SupportsReadCd { get; set; } + [DisplayName("Supports READ CD MSF command")] + public bool? SupportsReadCdMsf { get; set; } + [DisplayName("Supports full sector in READ CD command")] + public bool? SupportsReadCdRaw { get; set; } + [DisplayName("Supports full sector in READ CD MSF command")] + public bool? SupportsReadCdMsfRaw { get; set; } + [DisplayName("Supports READ LONG(16) command")] + public bool? SupportsReadLong16 { get; set; } + [DisplayName("Supports READ LONG command")] + public bool? SupportsReadLong { get; set; } + + [DisplayName("Data from MODE SENSE(6) command")] + public byte[] ModeSense6Data { get; set; } + [DisplayName("Data from MODE SENSE(10) command")] + public byte[] ModeSense10Data { get; set; } + + public virtual Chs CHS { get; set; } + public virtual Chs CurrentCHS { get; set; } + [DisplayName("Sectors in 28-bit LBA mode")] + public uint? LBASectors { get; set; } + [DisplayName("Sectors in 48-bit LBA mode")] + public ulong? LBA48Sectors { get; set; } + [DisplayName("Logical alignment")] + public ushort? LogicalAlignment { get; set; } + [DisplayName("Nominal rotation rate")] + public ushort? NominalRotationRate { get; set; } + [DisplayName("Bytes per block, physical")] + public uint? PhysicalBlockSize { get; set; } + [DisplayName("Is it a SSD?")] + public bool? SolidStateDevice { get; set; } + [DisplayName("Bytes per unformatted track")] + public ushort? UnformattedBPT { get; set; } + [DisplayName("Bytes per unformatted sector")] + public ushort? UnformattedBPS { get; set; } + + [DisplayName("Supports READ DMA (LBA) command")] + public bool? SupportsReadDmaLba { get; set; } + [DisplayName("Supports READ DMA RETRY (LBA) command")] + public bool? SupportsReadDmaRetryLba { get; set; } + [DisplayName("Supports READ SECTORS (LBA) command")] + public bool? SupportsReadLba { get; set; } + [DisplayName("Supports READ SECTORS RETRY (LBA) command")] + public bool? SupportsReadRetryLba { get; set; } + [DisplayName("Supports READ SECTORS LONG (LBA) command")] + public bool? SupportsReadLongLba { get; set; } + [DisplayName("Supports READ SECTORS LONG RETRY (LBA) command")] + public bool? SupportsReadLongRetryLba { get; set; } + [DisplayName("Supports SEEK (LBA) command")] + public bool? SupportsSeekLba { get; set; } + + [DisplayName("Supports READ DMA EXT command")] + public bool? SupportsReadDmaLba48 { get; set; } + [DisplayName("Supports READ SECTORS EXT command")] + public bool? SupportsReadLba48 { get; set; } + + [DisplayName("Supports READ DMA command")] + public bool? SupportsReadDma { get; set; } + [DisplayName("Supports READ DMA RETRY command")] + public bool? SupportsReadDmaRetry { get; set; } + [DisplayName("Supports READ SECTORS RETRY command")] + public bool? SupportsReadRetry { get; set; } + [DisplayName("Supports READ SECTORS command")] + public bool? SupportsReadSectors { get; set; } + [DisplayName("Supports READ SECTORS LONG RETRY command")] + public bool? SupportsReadLongRetry { get; set; } + [DisplayName("Supports SEEK command")] + public bool? SupportsSeek { get; set; } + + [DisplayName("Can read into inter-session Lead-In")] + public bool? CanReadingIntersessionLeadIn { get; set; } + [DisplayName("Can read into inter-session Lead-Out")] + public bool? CanReadingIntersessionLeadOut { get; set; } + [DisplayName("Data from inter-session Lead-In")] + public byte[] IntersessionLeadInData { get; set; } + [DisplayName("Data from inter-session Lead-Out")] + public byte[] IntersessionLeadOutData { get; set; } + + [DisplayName("Can read scrambled data using READ CD command")] + public bool? CanReadCdScrambled { get; set; } + [DisplayName("Data from scrambled READ CD command")] + public byte[] ReadCdScrambledData { get; set; } + + [DisplayName("Can read from cache using F1h command subcommand 06h")] + public bool? CanReadF1_06 { get; set; } + [DisplayName("Can read from cache using F1h command subcommand 06h")] + public byte[] ReadF1_06Data { get; set; } + [DisplayName("Can read from cache using F1h command subcommand 06h targeting Lead-Out")] + public bool? CanReadF1_06LeadOut { get; set; } + [DisplayName("Can read from cache using F1h command subcommand 06h targeting Lead-Out")] + public byte[] ReadF1_06LeadOutData { get; set; } + + [JsonIgnore] + public int? AtaId { get; set; } + [JsonIgnore] + public int? ScsiId { get; set; } + [JsonIgnore] + public int? MmcId { get; set; } + + #region SCSI data + [DisplayName("Data from READ(6) command")] + public byte[] Read6Data { get; set; } + [DisplayName("Data from READ(10) command")] + public byte[] Read10Data { get; set; } + [DisplayName("Data from READ(12) command")] + public byte[] Read12Data { get; set; } + [DisplayName("Data from READ(16) command")] + public byte[] Read16Data { get; set; } + [DisplayName("Data from READ LONG(10) command")] + public byte[] ReadLong10Data { get; set; } + [DisplayName("Data from READ LONG(16) command")] + public byte[] ReadLong16Data { get; set; } + #endregion + + #region ATA data + [DisplayName("Data from READ SECTORS command")] + public byte[] ReadSectorsData { get; set; } + [DisplayName("Data from READ SECTORS RETRY command")] + public byte[] ReadSectorsRetryData { get; set; } + [DisplayName("Data from READ DMA command")] + public byte[] ReadDmaData { get; set; } + [DisplayName("Data from READ DMA RETRY command")] + public byte[] ReadDmaRetryData { get; set; } + [DisplayName("Data from READ SECTORS (LBA) command")] + public byte[] ReadLbaData { get; set; } + [DisplayName("Data from READ SECTORS RETRY (LBA) command")] + public byte[] ReadRetryLbaData { get; set; } + [DisplayName("Data from READ DMA (LBA) command")] + public byte[] ReadDmaLbaData { get; set; } + [DisplayName("Data from READ DMA RETRY (LBA) command")] + public byte[] ReadDmaRetryLbaData { get; set; } + [DisplayName("Data from READ SECTORS EXT command")] + public byte[] ReadLba48Data { get; set; } + [DisplayName("Data from READ DMA EXT command")] + public byte[] ReadDmaLba48Data { get; set; } + [DisplayName("Data from READ SECTORS LONG command")] + public byte[] ReadLongData { get; set; } + [DisplayName("Data from READ SECTORS LONG RETRY command")] + public byte[] ReadLongRetryData { get; set; } + [DisplayName("Data from READ SECTORS LONG (LBA) command")] + public byte[] ReadLongLbaData { get; set; } + [DisplayName("Data from READ SECTORS LONG RETRY (LBA) command")] + public byte[] ReadLongRetryLbaData { get; set; } + #endregion + + #region CompactDisc data + [DisplayName("Data from READ TOC command")] + public byte[] TocData { get; set; } + [DisplayName("Data from READ FULL TOC command")] + public byte[] FullTocData { get; set; } + [DisplayName("Data from READ ATIP command")] + public byte[] AtipData { get; set; } + [DisplayName("Data from READ PMA command")] + public byte[] PmaData { get; set; } + [DisplayName("Data from READ CD command")] + public byte[] ReadCdData { get; set; } + [DisplayName("Data from READ CD MSF command")] + public byte[] ReadCdMsfData { get; set; } + [DisplayName("Data from READ CD (full sector) command")] + public byte[] ReadCdFullData { get; set; } + [DisplayName("Data from READ CD MSF (full sector) command")] + public byte[] ReadCdMsfFullData { get; set; } + [DisplayName("Data from track 1 pregap")] + public byte[] Track1PregapData { get; set; } + [DisplayName("Data from Lead-In")] + public byte[] LeadInData { get; set; } + [DisplayName("Data from Lead-Out")] + public byte[] LeadOutData { get; set; } + [DisplayName("Data from reading C2 pointers")] + public byte[] C2PointersData { get; set; } + [DisplayName("Data from reading with PQ subchannels")] + public byte[] PQSubchannelData { get; set; } + [DisplayName("Data from reading with RW subchannels")] + public byte[] RWSubchannelData { get; set; } + [DisplayName("Data from reading with corrected subchannels")] + public byte[] CorrectedSubchannelData { get; set; } + [DisplayName("Data from reading with PQ subchannels and C2 pointers")] + public byte[] PQSubchannelWithC2Data { get; set; } + [DisplayName("Data from reading with RW subchannels and C2 pointers")] + public byte[] RWSubchannelWithC2Data { get; set; } + [DisplayName("Data from reading with corrected subchannels and C2 pointers")] + public byte[] CorrectedSubchannelWithC2Data { get; set; } + #endregion + + #region DVD data + [DisplayName("Data from PFI")] + public byte[] PfiData { get; set; } + [DisplayName("Data from DMI")] + public byte[] DmiData { get; set; } + [DisplayName("Data from DVD's Copyright Management Information")] + public byte[] CmiData { get; set; } + [DisplayName("Data from DVD's BCA")] + public byte[] DvdBcaData { get; set; } + [DisplayName("Data from DVD's AACS")] + public byte[] DvdAacsData { get; set; } + [DisplayName("Data from DVD's DDS")] + public byte[] DvdDdsData { get; set; } + [DisplayName("Data from DVD's Spare Area Information")] + public byte[] DvdSaiData { get; set; } + [DisplayName("Data from DVD's pre-recorded information")] + public byte[] PriData { get; set; } + [DisplayName("Data from embossed PFI")] + public byte[] EmbossedPfiData { get; set; } + [DisplayName("Data from ADIP")] + public byte[] AdipData { get; set; } + [DisplayName("Data from DCBs")] + public byte[] DcbData { get; set; } + [DisplayName("Data from HD-DVD's Copyright Management Information")] + public byte[] HdCmiData { get; set; } + [DisplayName("Data from DVD's layer information")] + public byte[] DvdLayerData { get; set; } + #endregion + + #region Blu-ray data + [DisplayName("Data from Blu-ray's BCA")] + public byte[] BluBcaData { get; set; } + [DisplayName("Data from Blu-ray's DDS")] + public byte[] BluDdsData { get; set; } + [DisplayName("Data from Blu-ray's Spare Area Information")] + public byte[] BluSaiData { get; set; } + [DisplayName("Data from Blu-ray's Disc Information")] + public byte[] BluDiData { get; set; } + [DisplayName("Data from Blu-ray's PAC")] + public byte[] BluPacData { get; set; } + #endregion + + #region Vendor data + [DisplayName("Data from Plextor's READ CD-DA command")] + public byte[] PlextorReadCddaData { get; set; } + [DisplayName("Data from Pioneer's READ CD-DA command")] + public byte[] PioneerReadCddaData { get; set; } + [DisplayName("Data from Pioneer's READ CD-DA MSF command")] + public byte[] PioneerReadCddaMsfData { get; set; } + [DisplayName("Data from NEC's READ CD-DA command")] + public byte[] NecReadCddaData { get; set; } + [DisplayName("Data from Plextor's scrambled DVD reading command")] + public byte[] PlextorReadRawDVDData { get; set; } + [DisplayName("Data from HL-DT-ST's scrambled DVD reading trick")] + public byte[] HLDTSTReadRawDVDData { get; set; } + #endregion + } + + public class Ssc + { + public Ssc() {} + + public Ssc(sscType ssc) + { + if(ssc.BlockSizeGranularitySpecified) + BlockSizeGranularity = ssc.BlockSizeGranularity; + + if(ssc.MaxBlockLengthSpecified) + MaxBlockLength = ssc.MaxBlockLength; + + if(ssc.MinBlockLengthSpecified) + MinBlockLength = ssc.MinBlockLength; + + if(ssc.SupportedDensities != null) + SupportedDensities = new List(ssc.SupportedDensities); + + if(ssc.SupportedMediaTypes != null) + { + SupportedMediaTypes = new List(); + + foreach(SupportedMedia mediaType in ssc.SupportedMediaTypes) + SupportedMediaTypes.Add(new SscSupportedMedia(mediaType)); + } + + if(ssc.TestedMedia == null) + return; + + TestedMedia = new List(); + + foreach(SequentialMedia testedMedia in ssc.TestedMedia) + TestedMedia.Add(new TestedSequentialMedia(testedMedia)); + } + + [JsonIgnore] + public int Id { get; set; } + [DisplayName("Block size granularity")] + public byte? BlockSizeGranularity { get; set; } + [DisplayName("Maximum block length")] + public uint? MaxBlockLength { get; set; } + [DisplayName("Minimum block length")] + public uint? MinBlockLength { get; set; } + + public virtual List SupportedDensities { get; set; } + public virtual List SupportedMediaTypes { get; set; } + public virtual List TestedMedia { get; set; } + } + + public class TestedSequentialMedia + { + public TestedSequentialMedia() {} + + public TestedSequentialMedia(SequentialMedia media) + { + if(media.CanReadMediaSerialSpecified) + CanReadMediaSerial = media.CanReadMediaSerial; + + if(media.DensitySpecified) + Density = media.Density; + + Manufacturer = media.Manufacturer; + MediaIsRecognized = media.MediaIsRecognized; + + if(media.MediumTypeSpecified) + MediumType = media.MediumType; + + MediumTypeName = media.MediumTypeName; + Model = media.Model; + + if(media.SupportedDensities != null) + SupportedDensities = new List(media.SupportedDensities); + + if(media.SupportedMediaTypes != null) + { + SupportedMediaTypes = new List(); + + foreach(SupportedMedia supportedMedia in media.SupportedMediaTypes) + SupportedMediaTypes.Add(new SscSupportedMedia(supportedMedia)); + } + + ModeSense6Data = media.ModeSense6Data; + ModeSense10Data = media.ModeSense10Data; + } + + [JsonIgnore] + public int Id { get; set; } + [DisplayName("Can read media serial?")] + public bool? CanReadMediaSerial { get; set; } + [DisplayName("Density code")] + public byte? Density { get; set; } + public string Manufacturer { get; set; } + [DisplayName("Media recognized by drive?")] + public bool MediaIsRecognized { get; set; } + [DisplayName("Medium type code")] + public byte? MediumType { get; set; } + [DisplayName("Medium type")] + public string MediumTypeName { get; set; } + public string Model { get; set; } + public virtual List SupportedDensities { get; set; } + public virtual List SupportedMediaTypes { get; set; } + + public byte[] ModeSense6Data { get; set; } + public byte[] ModeSense10Data { get; set; } + + [JsonIgnore] + public int? SscId { get; set; } + } + + public class Pcmcia + { + public string[] AdditionalInformation; + + public Pcmcia() {} + + public Pcmcia(pcmciaType pcmcia) + { + AdditionalInformation = pcmcia.AdditionalInformation; + CIS = pcmcia.CIS; + Compliance = pcmcia.Compliance; + + if(pcmcia.ManufacturerCodeSpecified) + ManufacturerCode = pcmcia.ManufacturerCode; + + if(pcmcia.CardCodeSpecified) + CardCode = pcmcia.CardCode; + + Manufacturer = pcmcia.Manufacturer; + ProductName = pcmcia.ProductName; + } + + [JsonIgnore] + public int Id { get; set; } + public byte[] CIS { get; set; } + public string Compliance { get; set; } + [DisplayName("Manufacturer code")] + public ushort? ManufacturerCode { get; set; } + [DisplayName("Card code")] + public ushort? CardCode { get; set; } + public string Manufacturer { get; set; } + [DisplayName("Product name")] + public string ProductName { get; set; } + } + + public class MmcSd + { + public MmcSd() {} + + public MmcSd(mmcsdType mmcSd) + { + CID = mmcSd.CID; + CSD = mmcSd.CSD; + OCR = mmcSd.OCR; + SCR = mmcSd.SCR; + ExtendedCSD = mmcSd.ExtendedCSD; + } + + [JsonIgnore] + public int Id { get; set; } + public byte[] CID { get; set; } + public byte[] CSD { get; set; } + public byte[] OCR { get; set; } + public byte[] SCR { get; set; } + public byte[] ExtendedCSD { get; set; } + } + + public class SscSupportedMedia + { + public SscSupportedMedia() {} + + public SscSupportedMedia(SupportedMedia media) + { + MediumType = media.MediumType; + Width = media.Width; + Length = media.Length; + Organization = media.Organization; + Name = media.Name; + Description = media.Description; + + if(media.DensityCodes == null) + return; + + DensityCodes = new List(); + + foreach(int densityCode in media.DensityCodes) + DensityCodes.Add(new DensityCode + { + Code = densityCode + }); + } + + [JsonIgnore] + public int Id { get; set; } + public byte MediumType { get; set; } + public virtual List DensityCodes { get; set; } + public ushort Width { get; set; } + public ushort Length { get; set; } + public string Organization { get; set; } + public string Name { get; set; } + public string Description { get; set; } + } + + public class DensityCode : IEquatable + { + [JsonIgnore, Key] + public int Id { get; set; } + + public int Code { get; set; } + + public bool Equals(DensityCode other) + { + if(ReferenceEquals(null, other)) + return false; + + if(ReferenceEquals(this, other)) + return true; + + return Code == other.Code; + } + + public override bool Equals(object obj) + { + if(ReferenceEquals(null, obj)) + return false; + + if(ReferenceEquals(this, obj)) + return true; + + return obj.GetType() == GetType() && Equals((DensityCode)obj); + } + + // ReSharper disable once NonReadonlyMemberInGetHashCode + public override int GetHashCode() => Code; + } + + public class GdRomSwapDiscCapabilities + { + [JsonIgnore, Key] + public int Id { get; set; } + + public bool RecognizedSwapDisc { get; set; } + public bool TestCrashed { get; set; } + public byte SwapDiscLeadOutPMIN { get; set; } + public byte SwapDiscLeadOutPSEC { get; set; } + public byte SwapDiscLeadOutPFRAM { get; set; } + public int SwapDiscLeadOutStart { get; set; } + public bool Lba0Readable { get; set; } + public byte[] Lba0Data { get; set; } + public byte[] Lba0Sense { get; set; } + public string Lba0DecodedSense { get; set; } + public bool Lba0ScrambledReadable { get; set; } + public byte[] Lba0ScrambledData { get; set; } + public byte[] Lba0ScrambledSense { get; set; } + public string Lba0ScrambledDecodedSense { get; set; } + public bool Lba44990Readable { get; set; } + public byte[] Lba44990Data { get; set; } + public byte[] Lba44990Sense { get; set; } + public string Lba44990DecodedSense { get; set; } + public int Lba44990ReadableCluster { get; set; } + public bool Lba45000Readable { get; set; } + public byte[] Lba45000Data { get; set; } + public byte[] Lba45000Sense { get; set; } + public string Lba45000DecodedSense { get; set; } + public int Lba45000ReadableCluster { get; set; } + public bool Lba50000Readable { get; set; } + public byte[] Lba50000Data { get; set; } + public byte[] Lba50000Sense { get; set; } + public string Lba50000DecodedSense { get; set; } + public int Lba50000ReadableCluster { get; set; } + public bool Lba100000Readable { get; set; } + public byte[] Lba100000Data { get; set; } + public byte[] Lba100000Sense { get; set; } + public string Lba100000DecodedSense { get; set; } + public int Lba100000ReadableCluster { get; set; } + public bool Lba400000Readable { get; set; } + public byte[] Lba400000Data { get; set; } + public byte[] Lba400000Sense { get; set; } + public string Lba400000DecodedSense { get; set; } + public int Lba400000ReadableCluster { get; set; } + public bool Lba450000Readable { get; set; } + public byte[] Lba450000Data { get; set; } + public byte[] Lba450000Sense { get; set; } + public string Lba450000DecodedSense { get; set; } + public int Lba450000ReadableCluster { get; set; } + public bool Lba44990PqReadable { get; set; } + public byte[] Lba44990PqData { get; set; } + public byte[] Lba44990PqSense { get; set; } + public string Lba44990PqDecodedSense { get; set; } + public int Lba44990PqReadableCluster { get; set; } + public bool Lba45000PqReadable { get; set; } + public byte[] Lba45000PqData { get; set; } + public byte[] Lba45000PqSense { get; set; } + public string Lba45000PqDecodedSense { get; set; } + public int Lba45000PqReadableCluster { get; set; } + public bool Lba50000PqReadable { get; set; } + public byte[] Lba50000PqData { get; set; } + public byte[] Lba50000PqSense { get; set; } + public string Lba50000PqDecodedSense { get; set; } + public int Lba50000PqReadableCluster { get; set; } + public bool Lba100000PqReadable { get; set; } + public byte[] Lba100000PqData { get; set; } + public byte[] Lba100000PqSense { get; set; } + public string Lba100000PqDecodedSense { get; set; } + public int Lba100000PqReadableCluster { get; set; } + public bool Lba400000PqReadable { get; set; } + public byte[] Lba400000PqData { get; set; } + public byte[] Lba400000PqSense { get; set; } + public string Lba400000PqDecodedSense { get; set; } + public int Lba400000PqReadableCluster { get; set; } + public bool Lba450000PqReadable { get; set; } + public byte[] Lba450000PqData { get; set; } + public byte[] Lba450000PqSense { get; set; } + public string Lba450000PqDecodedSense { get; set; } + public int Lba450000PqReadableCluster { get; set; } + public bool Lba44990RwReadable { get; set; } + public byte[] Lba44990RwData { get; set; } + public byte[] Lba44990RwSense { get; set; } + public string Lba44990RwDecodedSense { get; set; } + public int Lba44990RwReadableCluster { get; set; } + public bool Lba45000RwReadable { get; set; } + public byte[] Lba45000RwData { get; set; } + public byte[] Lba45000RwSense { get; set; } + public string Lba45000RwDecodedSense { get; set; } + public int Lba45000RwReadableCluster { get; set; } + public bool Lba50000RwReadable { get; set; } + public byte[] Lba50000RwData { get; set; } + public byte[] Lba50000RwSense { get; set; } + public string Lba50000RwDecodedSense { get; set; } + public int Lba50000RwReadableCluster { get; set; } + public bool Lba100000RwReadable { get; set; } + public byte[] Lba100000RwData { get; set; } + public byte[] Lba100000RwSense { get; set; } + public string Lba100000RwDecodedSense { get; set; } + public int Lba100000RwReadableCluster { get; set; } + public bool Lba400000RwReadable { get; set; } + public byte[] Lba400000RwData { get; set; } + public byte[] Lba400000RwSense { get; set; } + public string Lba400000RwDecodedSense { get; set; } + public int Lba400000RwReadableCluster { get; set; } + public bool Lba450000RwReadable { get; set; } + public byte[] Lba450000RwData { get; set; } + public byte[] Lba450000RwSense { get; set; } + public string Lba450000RwDecodedSense { get; set; } + public int Lba450000RwReadableCluster { get; set; } + public bool Lba44990AudioReadable { get; set; } + public byte[] Lba44990AudioData { get; set; } + public byte[] Lba44990AudioSense { get; set; } + public string Lba44990AudioDecodedSense { get; set; } + public int Lba44990AudioReadableCluster { get; set; } + public bool Lba45000AudioReadable { get; set; } + public byte[] Lba45000AudioData { get; set; } + public byte[] Lba45000AudioSense { get; set; } + public string Lba45000AudioDecodedSense { get; set; } + public int Lba45000AudioReadableCluster { get; set; } + public bool Lba50000AudioReadable { get; set; } + public byte[] Lba50000AudioData { get; set; } + public byte[] Lba50000AudioSense { get; set; } + public string Lba50000AudioDecodedSense { get; set; } + public int Lba50000AudioReadableCluster { get; set; } + public bool Lba100000AudioReadable { get; set; } + public byte[] Lba100000AudioData { get; set; } + public byte[] Lba100000AudioSense { get; set; } + public string Lba100000AudioDecodedSense { get; set; } + public int Lba100000AudioReadableCluster { get; set; } + public bool Lba400000AudioReadable { get; set; } + public byte[] Lba400000AudioData { get; set; } + public byte[] Lba400000AudioSense { get; set; } + public string Lba400000AudioDecodedSense { get; set; } + public int Lba400000AudioReadableCluster { get; set; } + public bool Lba450000AudioReadable { get; set; } + public byte[] Lba450000AudioData { get; set; } + public byte[] Lba450000AudioSense { get; set; } + public string Lba450000AudioDecodedSense { get; set; } + public int Lba450000AudioReadableCluster { get; set; } + public bool Lba44990AudioPqReadable { get; set; } + public byte[] Lba44990AudioPqData { get; set; } + public byte[] Lba44990AudioPqSense { get; set; } + public string Lba44990AudioPqDecodedSense { get; set; } + public int Lba44990AudioPqReadableCluster { get; set; } + public bool Lba45000AudioPqReadable { get; set; } + public byte[] Lba45000AudioPqData { get; set; } + public byte[] Lba45000AudioPqSense { get; set; } + public string Lba45000AudioPqDecodedSense { get; set; } + public int Lba45000AudioPqReadableCluster { get; set; } + public bool Lba50000AudioPqReadable { get; set; } + public byte[] Lba50000AudioPqData { get; set; } + public byte[] Lba50000AudioPqSense { get; set; } + public string Lba50000AudioPqDecodedSense { get; set; } + public int Lba50000AudioPqReadableCluster { get; set; } + public bool Lba100000AudioPqReadable { get; set; } + public byte[] Lba100000AudioPqData { get; set; } + public byte[] Lba100000AudioPqSense { get; set; } + public string Lba100000AudioPqDecodedSense { get; set; } + public int Lba100000AudioPqReadableCluster { get; set; } + public bool Lba400000AudioPqReadable { get; set; } + public byte[] Lba400000AudioPqData { get; set; } + public byte[] Lba400000AudioPqSense { get; set; } + public string Lba400000AudioPqDecodedSense { get; set; } + public int Lba400000AudioPqReadableCluster { get; set; } + public bool Lba450000AudioPqReadable { get; set; } + public byte[] Lba450000AudioPqData { get; set; } + public byte[] Lba450000AudioPqSense { get; set; } + public string Lba450000AudioPqDecodedSense { get; set; } + public int Lba450000AudioPqReadableCluster { get; set; } + public bool Lba44990AudioRwReadable { get; set; } + public byte[] Lba44990AudioRwData { get; set; } + public byte[] Lba44990AudioRwSense { get; set; } + public string Lba44990AudioRwDecodedSense { get; set; } + public int Lba44990AudioRwReadableCluster { get; set; } + public bool Lba45000AudioRwReadable { get; set; } + public byte[] Lba45000AudioRwData { get; set; } + public byte[] Lba45000AudioRwSense { get; set; } + public string Lba45000AudioRwDecodedSense { get; set; } + public int Lba45000AudioRwReadableCluster { get; set; } + public bool Lba50000AudioRwReadable { get; set; } + public byte[] Lba50000AudioRwData { get; set; } + public byte[] Lba50000AudioRwSense { get; set; } + public string Lba50000AudioRwDecodedSense { get; set; } + public int Lba50000AudioRwReadableCluster { get; set; } + public bool Lba100000AudioRwReadable { get; set; } + public byte[] Lba100000AudioRwData { get; set; } + public byte[] Lba100000AudioRwSense { get; set; } + public string Lba100000AudioRwDecodedSense { get; set; } + public int Lba100000AudioRwReadableCluster { get; set; } + public bool Lba400000AudioRwReadable { get; set; } + public byte[] Lba400000AudioRwData { get; set; } + public byte[] Lba400000AudioRwSense { get; set; } + public string Lba400000AudioRwDecodedSense { get; set; } + public int Lba400000AudioRwReadableCluster { get; set; } + public bool Lba450000AudioRwReadable { get; set; } + public byte[] Lba450000AudioRwData { get; set; } + public byte[] Lba450000AudioRwSense { get; set; } + public string Lba450000AudioRwDecodedSense { get; set; } + public int Lba450000AudioRwReadableCluster { get; set; } + public uint MinimumReadableSectorInHdArea { get; set; } + public uint MaximumReadableSectorInHdArea { get; set; } + public byte[] MaximumReadablePqInHdArea { get; set; } + public byte[] MaximumReadableRwInHdArea { get; set; } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Metadata/Dimensions.cs b/Aaru.CommonTypes/Metadata/Dimensions.cs new file mode 100644 index 0000000..8215c12 --- /dev/null +++ b/Aaru.CommonTypes/Metadata/Dimensions.cs @@ -0,0 +1,1094 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Dimensions.cs +// Author(s) : Natalia Portillo +// +// Component : XML metadata. +// +// --[ Description ] ---------------------------------------------------------- +// +// Gets physical dimensions of a device/media based on its media type. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using Schemas; + +#pragma warning disable 612 + +namespace Aaru.CommonTypes.Metadata +{ + /// Physical dimensions for media types + public static class Dimensions + { + /// Gets the physical dimensions, in metadata expected format, for a given media type + /// Media type + /// Dimensions metadata + public static DimensionsType DimensionsFromMediaType(CommonTypes.MediaType dskType) + { + var dmns = new DimensionsType(); + + switch(dskType) + { + #region 5.25" floppy disk + case CommonTypes.MediaType.Apple32SS: + case CommonTypes.MediaType.Apple32DS: + case CommonTypes.MediaType.Apple33SS: + case CommonTypes.MediaType.Apple33DS: + case CommonTypes.MediaType.AppleFileWare: + case CommonTypes.MediaType.DOS_525_SS_DD_8: + case CommonTypes.MediaType.DOS_525_SS_DD_9: + case CommonTypes.MediaType.DOS_525_DS_DD_8: + case CommonTypes.MediaType.DOS_525_DS_DD_9: + case CommonTypes.MediaType.DOS_525_HD: + case CommonTypes.MediaType.XDF_525: + case CommonTypes.MediaType.ACORN_525_SS_SD_40: + case CommonTypes.MediaType.ACORN_525_SS_SD_80: + case CommonTypes.MediaType.ACORN_525_SS_DD_40: + case CommonTypes.MediaType.ACORN_525_SS_DD_80: + case CommonTypes.MediaType.ACORN_525_DS_DD: + case CommonTypes.MediaType.ATARI_525_SD: + case CommonTypes.MediaType.ATARI_525_ED: + case CommonTypes.MediaType.ATARI_525_DD: + case CommonTypes.MediaType.CBM_1540: + case CommonTypes.MediaType.CBM_1540_Ext: + case CommonTypes.MediaType.CBM_1571: + case CommonTypes.MediaType.ECMA_66: + case CommonTypes.MediaType.ECMA_70: + case CommonTypes.MediaType.NEC_525_HD: + case CommonTypes.MediaType.ECMA_78: + case CommonTypes.MediaType.ECMA_78_2: + case CommonTypes.MediaType.ECMA_99_8: + case CommonTypes.MediaType.ECMA_99_15: + case CommonTypes.MediaType.ECMA_99_26: + case CommonTypes.MediaType.FDFORMAT_525_DD: + case CommonTypes.MediaType.FDFORMAT_525_HD: + // According to ECMA-99 et al + dmns.Height = 133.3; + dmns.HeightSpecified = true; + dmns.Width = 133.3; + dmns.WidthSpecified = true; + dmns.Thickness = 1.65; + + return dmns; + #endregion 5.25" floppy disk + + #region 3.5" floppy disk + case CommonTypes.MediaType.AppleSonySS: + case CommonTypes.MediaType.AppleSonyDS: + case CommonTypes.MediaType.DOS_35_SS_DD_8: + case CommonTypes.MediaType.DOS_35_SS_DD_9: + case CommonTypes.MediaType.DOS_35_DS_DD_8: + case CommonTypes.MediaType.DOS_35_DS_DD_9: + case CommonTypes.MediaType.DOS_35_HD: + case CommonTypes.MediaType.DOS_35_ED: + case CommonTypes.MediaType.DMF: + case CommonTypes.MediaType.DMF_82: + case CommonTypes.MediaType.XDF_35: + case CommonTypes.MediaType.ACORN_35_DS_DD: + case CommonTypes.MediaType.CBM_35_DD: + case CommonTypes.MediaType.CBM_AMIGA_35_DD: + case CommonTypes.MediaType.CBM_AMIGA_35_HD: + case CommonTypes.MediaType.FDFORMAT_35_DD: + case CommonTypes.MediaType.FDFORMAT_35_HD: + case CommonTypes.MediaType.NEC_35_HD_8: + case CommonTypes.MediaType.NEC_35_HD_15: + case CommonTypes.MediaType.Floptical: + case CommonTypes.MediaType.HiFD: + case CommonTypes.MediaType.UHD144: + case CommonTypes.MediaType.Apricot_35: + case CommonTypes.MediaType.FD32MB: + // According to ECMA-100 et al + dmns.Height = 94; + dmns.HeightSpecified = true; + dmns.Width = 90; + dmns.WidthSpecified = true; + dmns.Thickness = 3.3; + + return dmns; + #endregion 3.5" floppy disk + + #region 8" floppy disk + case CommonTypes.MediaType.IBM23FD: + case CommonTypes.MediaType.IBM33FD_128: + case CommonTypes.MediaType.IBM33FD_256: + case CommonTypes.MediaType.IBM33FD_512: + case CommonTypes.MediaType.IBM43FD_128: + case CommonTypes.MediaType.IBM43FD_256: + case CommonTypes.MediaType.IBM53FD_256: + case CommonTypes.MediaType.IBM53FD_512: + case CommonTypes.MediaType.IBM53FD_1024: + case CommonTypes.MediaType.RX01: + case CommonTypes.MediaType.RX02: + case CommonTypes.MediaType.NEC_8_SD: + case CommonTypes.MediaType.NEC_8_DD: + case CommonTypes.MediaType.ECMA_54: + case CommonTypes.MediaType.ECMA_59: + case CommonTypes.MediaType.ECMA_69_8: + case CommonTypes.MediaType.ECMA_69_15: + case CommonTypes.MediaType.ECMA_69_26: + // According to ECMA-59 et al + dmns.Height = 203.2; + dmns.HeightSpecified = true; + dmns.Width = 203.2; + dmns.WidthSpecified = true; + dmns.Thickness = 1.65; + + return dmns; + #endregion 8" floppy disk + + #region 356mm magneto optical + case CommonTypes.MediaType.ECMA_260: + case CommonTypes.MediaType.ECMA_260_Double: + // According to ECMA-260 et al + dmns.Height = 421.84; + dmns.HeightSpecified = true; + dmns.Width = 443.76; + dmns.WidthSpecified = true; + dmns.Thickness = 25.4; + + return dmns; + #endregion 356mm magneto optical + + #region 300mm magneto optical + case CommonTypes.MediaType.ECMA_189: + case CommonTypes.MediaType.ECMA_190: + case CommonTypes.MediaType.ECMA_317: + // According to ECMA-317 et al + dmns.Height = 340; + dmns.HeightSpecified = true; + dmns.Width = 320; + dmns.WidthSpecified = true; + dmns.Thickness = 17; + + return dmns; + #endregion 300mm magneto optical + + #region 5.25" magneto optical + case CommonTypes.MediaType.ECMA_153: + case CommonTypes.MediaType.ECMA_153_512: + case CommonTypes.MediaType.ECMA_183_512: + case CommonTypes.MediaType.ECMA_183: + case CommonTypes.MediaType.ECMA_184_512: + case CommonTypes.MediaType.ECMA_184: + case CommonTypes.MediaType.ECMA_195: + case CommonTypes.MediaType.ECMA_195_512: + case CommonTypes.MediaType.ECMA_238: + case CommonTypes.MediaType.ECMA_280: + case CommonTypes.MediaType.ECMA_322: + case CommonTypes.MediaType.ECMA_322_2k: + case CommonTypes.MediaType.UDO: + case CommonTypes.MediaType.UDO2: + case CommonTypes.MediaType.UDO2_WORM: + case CommonTypes.MediaType.ISO_15286: + case CommonTypes.MediaType.ISO_15286_1024: + case CommonTypes.MediaType.ISO_15286_512: + case CommonTypes.MediaType.ISO_10089: + case CommonTypes.MediaType.ISO_10089_512: + case CommonTypes.MediaType.ECMA_322_1k: + case CommonTypes.MediaType.ECMA_322_512: + case CommonTypes.MediaType.ISO_14517: + case CommonTypes.MediaType.ISO_14517_512: + // According to ECMA-183 et al + dmns.Height = 153; + dmns.HeightSpecified = true; + dmns.Width = 135; + dmns.WidthSpecified = true; + dmns.Thickness = 11; + + return dmns; + #endregion 5.25" magneto optical + + #region 3.5" magneto optical + case CommonTypes.MediaType.ECMA_154: + case CommonTypes.MediaType.ECMA_201: + case CommonTypes.MediaType.ECMA_201_ROM: + case CommonTypes.MediaType.ECMA_223: + case CommonTypes.MediaType.ECMA_223_512: + case CommonTypes.MediaType.GigaMo: + case CommonTypes.MediaType.GigaMo2: + // According to ECMA-154 et al + dmns.Height = 94; + dmns.HeightSpecified = true; + dmns.Width = 90; + dmns.WidthSpecified = true; + dmns.Thickness = 6; + + return dmns; + #endregion 3.5" magneto optical + + case CommonTypes.MediaType.PD650: + case CommonTypes.MediaType.PD650_WORM: + dmns.Height = 135; + dmns.HeightSpecified = true; + dmns.Width = 124; + dmns.WidthSpecified = true; + dmns.Thickness = 7.8; + + return dmns; + case CommonTypes.MediaType.ECMA_239: + dmns.Height = 97; + dmns.HeightSpecified = true; + dmns.Width = 92; + dmns.WidthSpecified = true; + dmns.Thickness = 5; + + return dmns; + case CommonTypes.MediaType.MMCmicro: + dmns.Height = 14; + dmns.HeightSpecified = true; + dmns.Width = 12; + dmns.WidthSpecified = true; + dmns.Thickness = 1.1; + + return dmns; + case CommonTypes.MediaType.MemoryStickMicro: + dmns.Height = 15; + dmns.HeightSpecified = true; + dmns.Width = 12.5; + dmns.WidthSpecified = true; + dmns.Thickness = 1.2; + + return dmns; + case CommonTypes.MediaType.microSD: + dmns.Height = 11; + dmns.HeightSpecified = true; + dmns.Width = 15; + dmns.WidthSpecified = true; + dmns.Thickness = 1; + + return dmns; + case CommonTypes.MediaType.miniSD: + dmns.Height = 21.5; + dmns.HeightSpecified = true; + dmns.Width = 20; + dmns.WidthSpecified = true; + dmns.Thickness = 1.4; + + return dmns; + case CommonTypes.MediaType.QIC3010: + case CommonTypes.MediaType.QIC3020: + case CommonTypes.MediaType.QIC3080: + case CommonTypes.MediaType.QIC3095: + case CommonTypes.MediaType.QIC320: + case CommonTypes.MediaType.QIC40: + case CommonTypes.MediaType.QIC80: + dmns.Height = 20; + dmns.HeightSpecified = true; + dmns.Width = 21.5; + dmns.WidthSpecified = true; + dmns.Thickness = 1.6; + + return dmns; + case CommonTypes.MediaType.RSMMC: + dmns.Height = 18; + dmns.HeightSpecified = true; + dmns.Width = 24; + dmns.WidthSpecified = true; + dmns.Thickness = 1.4; + + return dmns; + case CommonTypes.MediaType.MMC: + dmns.Height = 32; + dmns.HeightSpecified = true; + dmns.Width = 24; + dmns.WidthSpecified = true; + dmns.Thickness = 1.4; + + return dmns; + case CommonTypes.MediaType.SecureDigital: + dmns.Height = 32; + dmns.HeightSpecified = true; + dmns.Width = 24; + dmns.WidthSpecified = true; + dmns.Thickness = 2.1; + + return dmns; + case CommonTypes.MediaType.xD: + dmns.Height = 20; + dmns.HeightSpecified = true; + dmns.Width = 25; + dmns.WidthSpecified = true; + dmns.Thickness = 1.78; + + return dmns; + case CommonTypes.MediaType.XQD: + dmns.Height = 38.5; + dmns.HeightSpecified = true; + dmns.Width = 29.8; + dmns.WidthSpecified = true; + dmns.Thickness = 3.8; + + return dmns; + case CommonTypes.MediaType.MemoryStickDuo: + case CommonTypes.MediaType.MemoryStickProDuo: + dmns.Height = 20; + dmns.HeightSpecified = true; + dmns.Width = 31; + dmns.WidthSpecified = true; + dmns.Thickness = 1.6; + + return dmns; + case CommonTypes.MediaType.Nintendo3DSGameCard: + case CommonTypes.MediaType.NintendoDSGameCard: + case CommonTypes.MediaType.NintendoDSiGameCard: + dmns.Height = 35; + dmns.HeightSpecified = true; + dmns.Width = 33; + dmns.WidthSpecified = true; + dmns.Thickness = 3.8; + + return dmns; + case CommonTypes.MediaType.DataPlay: + dmns.Height = 42; + dmns.HeightSpecified = true; + dmns.Width = 33.5; + dmns.WidthSpecified = true; + dmns.Thickness = 3; + + return dmns; + case CommonTypes.MediaType.Microdrive: + dmns.Height = 44; + dmns.HeightSpecified = true; + dmns.Width = 34; + dmns.WidthSpecified = true; + dmns.Thickness = 8; + + return dmns; + case CommonTypes.MediaType.ExpressCard34: + dmns.Height = 75; + dmns.HeightSpecified = true; + dmns.Width = 34; + dmns.WidthSpecified = true; + dmns.Thickness = 5; + + return dmns; + case CommonTypes.MediaType.SmartMedia: + dmns.Height = 45; + dmns.HeightSpecified = true; + dmns.Width = 37; + dmns.WidthSpecified = true; + dmns.Thickness = 0.76; + + return dmns; + case CommonTypes.MediaType.MiniCard: + dmns.Height = 45; + dmns.HeightSpecified = true; + dmns.Width = 37; + dmns.WidthSpecified = true; + dmns.Thickness = 3.5; + + return dmns; + case CommonTypes.MediaType.PlayStationMemoryCard: + case CommonTypes.MediaType.PlayStationMemoryCard2: + dmns.Height = 55.7; + dmns.HeightSpecified = true; + dmns.Width = 41.5; + dmns.WidthSpecified = true; + dmns.Thickness = 7; + + return dmns; + case CommonTypes.MediaType.CFast: + case CommonTypes.MediaType.CompactFlash: + dmns.Height = 36; + dmns.HeightSpecified = true; + dmns.Width = 43; + dmns.WidthSpecified = true; + dmns.Thickness = 3.3; + + return dmns; + case CommonTypes.MediaType.CompactFlashType2: + dmns.Height = 36; + dmns.HeightSpecified = true; + dmns.Width = 43; + dmns.WidthSpecified = true; + dmns.Thickness = 5; + + return dmns; + case CommonTypes.MediaType.ZXMicrodrive: + dmns.Height = 36; + dmns.HeightSpecified = true; + dmns.Width = 43; + dmns.WidthSpecified = true; + dmns.Thickness = 5; + + return dmns; + case CommonTypes.MediaType.MemoryStick: + case CommonTypes.MediaType.MemoryStickPro: + dmns.Height = 21; + dmns.HeightSpecified = true; + dmns.Width = 50; + dmns.WidthSpecified = true; + dmns.Thickness = 2.6; + + return dmns; + case CommonTypes.MediaType.PocketZip: + dmns.Height = 54.5; + dmns.HeightSpecified = true; + dmns.Width = 50; + dmns.WidthSpecified = true; + dmns.Thickness = 2; + + return dmns; + case CommonTypes.MediaType.ExpressCard54: + dmns.Height = 75; + dmns.HeightSpecified = true; + dmns.Width = 54; + dmns.WidthSpecified = true; + dmns.Thickness = 5; + + return dmns; + case CommonTypes.MediaType.PCCardTypeI: + dmns.Height = 85.6; + dmns.HeightSpecified = true; + dmns.Width = 54; + dmns.WidthSpecified = true; + dmns.Thickness = 3.3; + + return dmns; + case CommonTypes.MediaType.PCCardTypeII: + dmns.Height = 85.6; + dmns.HeightSpecified = true; + dmns.Width = 54; + dmns.WidthSpecified = true; + dmns.Thickness = 5; + + return dmns; + case CommonTypes.MediaType.PCCardTypeIII: + dmns.Height = 85.6; + dmns.HeightSpecified = true; + dmns.Width = 54; + dmns.WidthSpecified = true; + dmns.Thickness = 10.5; + + return dmns; + case CommonTypes.MediaType.PCCardTypeIV: + dmns.Height = 85.6; + dmns.HeightSpecified = true; + dmns.Width = 54; + dmns.WidthSpecified = true; + dmns.Thickness = 16; + + return dmns; + case CommonTypes.MediaType.DataStore: + dmns.Height = 86.5; + dmns.HeightSpecified = true; + dmns.Width = 54; + dmns.WidthSpecified = true; + dmns.Thickness = 2.5; + + return dmns; + case CommonTypes.MediaType.VideoFloppy: + dmns.Height = 54; + dmns.HeightSpecified = true; + dmns.Width = 60; + dmns.WidthSpecified = true; + dmns.Thickness = 3.5; + + return dmns; + case CommonTypes.MediaType.VXA1: + case CommonTypes.MediaType.VXA2: + case CommonTypes.MediaType.VXA3: + dmns.Height = 95; + dmns.HeightSpecified = true; + dmns.Width = 62.5; + dmns.WidthSpecified = true; + dmns.Thickness = 15; + + return dmns; + case CommonTypes.MediaType.MiniDV: + dmns.Height = 47.5; + dmns.HeightSpecified = true; + dmns.Width = 66; + dmns.WidthSpecified = true; + dmns.Thickness = 12; + + return dmns; + case CommonTypes.MediaType.Wafer: + dmns.Height = 46.8; + dmns.HeightSpecified = true; + dmns.Width = 67.1; + dmns.WidthSpecified = true; + dmns.Thickness = 7.9; + + return dmns; + case CommonTypes.MediaType.NintendoDiskCard: + dmns.Height = 76.2; + dmns.HeightSpecified = true; + dmns.Width = 71.12; + dmns.WidthSpecified = true; + dmns.Thickness = 0; + + return dmns; + case CommonTypes.MediaType.HiMD: + case CommonTypes.MediaType.MD: + case CommonTypes.MediaType.MDData: + case CommonTypes.MediaType.MDData2: + case CommonTypes.MediaType.MD60: + case CommonTypes.MediaType.MD74: + case CommonTypes.MediaType.MD80: + dmns.Height = 68; + dmns.HeightSpecified = true; + dmns.Width = 71.5; + dmns.WidthSpecified = true; + dmns.Thickness = 4.8; + + return dmns; + case CommonTypes.MediaType.DAT160: + case CommonTypes.MediaType.DAT320: + case CommonTypes.MediaType.DAT72: + case CommonTypes.MediaType.DDS1: + case CommonTypes.MediaType.DDS2: + case CommonTypes.MediaType.DDS3: + case CommonTypes.MediaType.DDS4: + case CommonTypes.MediaType.DigitalAudioTape: + dmns.Height = 54; + dmns.HeightSpecified = true; + dmns.Width = 73; + dmns.WidthSpecified = true; + dmns.Thickness = 10.5; + + return dmns; + case CommonTypes.MediaType.CompactFloppy: + dmns.Height = 100; + dmns.HeightSpecified = true; + dmns.Width = 80; + dmns.WidthSpecified = true; + dmns.Thickness = 5; + + return dmns; + case CommonTypes.MediaType.DECtapeII: + dmns.Height = 60; + dmns.HeightSpecified = true; + dmns.Width = 81; + dmns.WidthSpecified = true; + dmns.Thickness = 13; + + return dmns; + case CommonTypes.MediaType.Ditto: + dmns.Height = 60; + dmns.HeightSpecified = true; + dmns.Width = 81; + dmns.WidthSpecified = true; + dmns.Thickness = 14; + + return dmns; + case CommonTypes.MediaType.DittoMax: + dmns.Height = 126; + dmns.HeightSpecified = true; + dmns.Width = 81; + dmns.WidthSpecified = true; + dmns.Thickness = 14; + + return dmns; + case CommonTypes.MediaType.RDX: + case CommonTypes.MediaType.RDX320: + dmns.Height = 119; + dmns.HeightSpecified = true; + dmns.Width = 87; + dmns.WidthSpecified = true; + dmns.Thickness = 23; + + return dmns; + case CommonTypes.MediaType.LS120: + case CommonTypes.MediaType.LS240: + dmns.Height = 94; + dmns.HeightSpecified = true; + dmns.Width = 90; + dmns.WidthSpecified = true; + dmns.Thickness = 3.5; + + return dmns; + case CommonTypes.MediaType.Travan: + case CommonTypes.MediaType.Travan3: + case CommonTypes.MediaType.Travan4: + case CommonTypes.MediaType.Travan5: + case CommonTypes.MediaType.Travan7: + dmns.Height = 72; + dmns.HeightSpecified = true; + dmns.Width = 92; + dmns.WidthSpecified = true; + dmns.Thickness = 15; + + return dmns; + case CommonTypes.MediaType.Travan1Ex: + dmns.Height = 0; + dmns.HeightSpecified = true; + dmns.Width = 92; + dmns.WidthSpecified = true; + dmns.Thickness = 15; + + return dmns; + case CommonTypes.MediaType.Travan3Ex: + dmns.Height = 0; + dmns.HeightSpecified = true; + dmns.Width = 92; + dmns.WidthSpecified = true; + dmns.Thickness = 15; + + return dmns; + case CommonTypes.MediaType.ADR2120: + case CommonTypes.MediaType.ADR260: + case CommonTypes.MediaType.ADR30: + case CommonTypes.MediaType.ADR50: + dmns.Height = 129; + dmns.HeightSpecified = true; + dmns.Width = 93; + dmns.WidthSpecified = true; + dmns.Thickness = 14.5; + + return dmns; + case CommonTypes.MediaType.Data8: + case CommonTypes.MediaType.AIT1: + case CommonTypes.MediaType.AIT1Turbo: + case CommonTypes.MediaType.AIT2: + case CommonTypes.MediaType.AIT2Turbo: + case CommonTypes.MediaType.AIT3: + case CommonTypes.MediaType.AIT3Ex: + case CommonTypes.MediaType.AIT3Turbo: + case CommonTypes.MediaType.AIT4: + case CommonTypes.MediaType.AIT5: + case CommonTypes.MediaType.AITETurbo: + case CommonTypes.MediaType.Exatape106m: + case CommonTypes.MediaType.Exatape160mXL: + case CommonTypes.MediaType.Exatape112m: + case CommonTypes.MediaType.Exatape125m: + case CommonTypes.MediaType.Exatape150m: + case CommonTypes.MediaType.Exatape15m: + case CommonTypes.MediaType.Exatape170m: + case CommonTypes.MediaType.Exatape225m: + case CommonTypes.MediaType.Exatape22m: + case CommonTypes.MediaType.Exatape22mAME: + case CommonTypes.MediaType.Exatape28m: + case CommonTypes.MediaType.Exatape40m: + case CommonTypes.MediaType.Exatape45m: + case CommonTypes.MediaType.Exatape54m: + case CommonTypes.MediaType.Exatape75m: + case CommonTypes.MediaType.Exatape76m: + case CommonTypes.MediaType.Exatape80m: + dmns.Height = 62.5; + dmns.HeightSpecified = true; + dmns.Width = 95; + dmns.WidthSpecified = true; + dmns.Thickness = 15; + + return dmns; + case CommonTypes.MediaType.EZ135: + case CommonTypes.MediaType.EZ230: + case CommonTypes.MediaType.SQ327: + dmns.Height = 97; + dmns.HeightSpecified = true; + dmns.Width = 98; + dmns.WidthSpecified = true; + dmns.Thickness = 9.5; + + return dmns; + case CommonTypes.MediaType.SQ400: + case CommonTypes.MediaType.SQ800: + case CommonTypes.MediaType.SQ2000: + dmns.Height = 137; + dmns.HeightSpecified = true; + dmns.Width = 137; + dmns.WidthSpecified = true; + dmns.Thickness = 12; + + return dmns; + case CommonTypes.MediaType.ZIP100: + case CommonTypes.MediaType.ZIP250: + case CommonTypes.MediaType.ZIP750: + dmns.Height = 98.5; + dmns.HeightSpecified = true; + dmns.Width = 98; + dmns.WidthSpecified = true; + dmns.Thickness = 6.5; + + return dmns; + case CommonTypes.MediaType.Jaz: + case CommonTypes.MediaType.Jaz2: + dmns.Height = 102; + dmns.HeightSpecified = true; + dmns.Width = 98; + dmns.WidthSpecified = true; + dmns.Thickness = 12; + + return dmns; + case CommonTypes.MediaType.Orb: + case CommonTypes.MediaType.Orb5: + dmns.Height = 104; + dmns.HeightSpecified = true; + dmns.Width = 98; + dmns.WidthSpecified = true; + dmns.Thickness = 8; + + return dmns; + case CommonTypes.MediaType.SparQ: + dmns.Height = 98; + dmns.HeightSpecified = true; + dmns.Width = 100; + dmns.WidthSpecified = true; + dmns.Thickness = 9.7; + + return dmns; + case CommonTypes.MediaType.ProfessionalDisc: + case CommonTypes.MediaType.ProfessionalDiscDual: + case CommonTypes.MediaType.ProfessionalDiscTriple: + case CommonTypes.MediaType.ProfessionalDiscQuad: + case CommonTypes.MediaType.PDD: + case CommonTypes.MediaType.PDD_WORM: + dmns.Height = 130; + dmns.HeightSpecified = true; + dmns.Width = 128.5; + dmns.WidthSpecified = true; + dmns.Thickness = 9; + + return dmns; + case CommonTypes.MediaType.SLR1: + case CommonTypes.MediaType.SLR2: + case CommonTypes.MediaType.SLR3: + case CommonTypes.MediaType.SLR32: + case CommonTypes.MediaType.SLR32SL: + case CommonTypes.MediaType.SLR4: + case CommonTypes.MediaType.SLR5: + case CommonTypes.MediaType.SLR5SL: + case CommonTypes.MediaType.SLR6: + case CommonTypes.MediaType.SLRtape100: + case CommonTypes.MediaType.SLRtape140: + case CommonTypes.MediaType.SLRtape24: + case CommonTypes.MediaType.SLRtape24SL: + case CommonTypes.MediaType.SLRtape40: + case CommonTypes.MediaType.SLRtape50: + case CommonTypes.MediaType.SLRtape60: + case CommonTypes.MediaType.SLRtape7: + case CommonTypes.MediaType.SLRtape75: + case CommonTypes.MediaType.SLRtape7SL: + dmns.Height = 150; + dmns.HeightSpecified = true; + dmns.Width = 100; + dmns.WidthSpecified = true; + dmns.Thickness = 18; + + return dmns; + case CommonTypes.MediaType.N64DD: + dmns.Height = 103.124; + dmns.HeightSpecified = true; + dmns.Width = 101.092; + dmns.WidthSpecified = true; + dmns.Thickness = 10.16; + + return dmns; + case CommonTypes.MediaType.CompactTapeI: + case CommonTypes.MediaType.CompactTapeII: + case CommonTypes.MediaType.DLTtapeIII: + case CommonTypes.MediaType.DLTtapeIIIxt: + case CommonTypes.MediaType.DLTtapeIV: + case CommonTypes.MediaType.DLTtapeS4: + case CommonTypes.MediaType.SDLT1: + case CommonTypes.MediaType.SDLT2: + case CommonTypes.MediaType.VStapeI: + dmns.Height = 105; + dmns.HeightSpecified = true; + dmns.Width = 105; + dmns.WidthSpecified = true; + dmns.Thickness = 25; + + return dmns; + case CommonTypes.MediaType.LTO: + case CommonTypes.MediaType.LTO2: + case CommonTypes.MediaType.LTO3: + case CommonTypes.MediaType.LTO3WORM: + case CommonTypes.MediaType.LTO4: + case CommonTypes.MediaType.LTO4WORM: + case CommonTypes.MediaType.LTO5: + case CommonTypes.MediaType.LTO5WORM: + case CommonTypes.MediaType.LTO6: + case CommonTypes.MediaType.LTO6WORM: + case CommonTypes.MediaType.LTO7: + case CommonTypes.MediaType.LTO7WORM: + dmns.Height = 101.6; + dmns.HeightSpecified = true; + dmns.Width = 105.41; + dmns.WidthSpecified = true; + dmns.Thickness = 21.59; + + return dmns; + case CommonTypes.MediaType.IBM3480: + case CommonTypes.MediaType.IBM3490: + case CommonTypes.MediaType.IBM3490E: + case CommonTypes.MediaType.IBM3592: + dmns.Height = 125.73; + dmns.HeightSpecified = true; + dmns.Width = 107.95; + dmns.WidthSpecified = true; + dmns.Thickness = 25.4; + + return dmns; + case CommonTypes.MediaType.T9840A: + case CommonTypes.MediaType.T9840B: + case CommonTypes.MediaType.T9840C: + case CommonTypes.MediaType.T9840D: + case CommonTypes.MediaType.T9940A: + case CommonTypes.MediaType.T9940B: + dmns.Height = 124.46; + dmns.HeightSpecified = true; + dmns.Width = 109.22; + dmns.WidthSpecified = true; + dmns.Thickness = 25.4; + + return dmns; + case CommonTypes.MediaType.CompactCassette: + case CommonTypes.MediaType.Dcas25: + case CommonTypes.MediaType.Dcas85: + case CommonTypes.MediaType.Dcas103: + dmns.Height = 63.5; + dmns.HeightSpecified = true; + dmns.Width = 128; + dmns.WidthSpecified = true; + dmns.Thickness = 12; + + return dmns; + case CommonTypes.MediaType.IBM3470: + dmns.Height = 58.42; + dmns.HeightSpecified = true; + dmns.Width = 137.16; + dmns.WidthSpecified = true; + dmns.Thickness = 16.51; + + return dmns; + case CommonTypes.MediaType.MLR1: + case CommonTypes.MediaType.MLR3: + case CommonTypes.MediaType.MLR1SL: + dmns.Height = 101.6; + dmns.HeightSpecified = true; + dmns.Width = 152.4; + dmns.WidthSpecified = true; + dmns.Thickness = 15.24; + + return dmns; + case CommonTypes.MediaType.QIC11: + case CommonTypes.MediaType.QIC120: + case CommonTypes.MediaType.QIC1350: + case CommonTypes.MediaType.QIC150: + case CommonTypes.MediaType.QIC24: + case CommonTypes.MediaType.QIC525: + dmns.Height = 101.6; + dmns.HeightSpecified = true; + dmns.Width = 154.2; + dmns.WidthSpecified = true; + dmns.Thickness = 16.6; + + return dmns; + case CommonTypes.MediaType.Bernoulli: + case CommonTypes.MediaType.Bernoulli10: + case CommonTypes.MediaType.Bernoulli20: + dmns.Height = 280; + dmns.HeightSpecified = true; + dmns.Width = 209; + dmns.WidthSpecified = true; + dmns.Thickness = 18; + + return dmns; + case CommonTypes.MediaType.Bernoulli2: + case CommonTypes.MediaType.BernoulliBox2_20: + case CommonTypes.MediaType.Bernoulli35: + case CommonTypes.MediaType.Bernoulli44: + case CommonTypes.MediaType.Bernoulli65: + case CommonTypes.MediaType.Bernoulli90: + case CommonTypes.MediaType.Bernoulli105: + case CommonTypes.MediaType.Bernoulli150: + case CommonTypes.MediaType.Bernoulli230: + dmns.Height = 138; + dmns.HeightSpecified = true; + dmns.Width = 136; + dmns.WidthSpecified = true; + dmns.Thickness = 9; + + return dmns; + case CommonTypes.MediaType.DTF: + case CommonTypes.MediaType.DTF2: + dmns.Height = 144.78; + dmns.HeightSpecified = true; + dmns.Width = 254; + dmns.WidthSpecified = true; + dmns.Thickness = 25.4; + + return dmns; + case CommonTypes.MediaType.LD: + case CommonTypes.MediaType.LDROM: + case CommonTypes.MediaType.LDROM2: + case CommonTypes.MediaType.MegaLD: + case CommonTypes.MediaType.LVROM: + dmns.Diameter = 300; + dmns.DiameterSpecified = true; + dmns.Thickness = 2.5; + + return dmns; + case CommonTypes.MediaType.REV35: + case CommonTypes.MediaType.REV70: + case CommonTypes.MediaType.REV120: + dmns.Height = 74.8; + dmns.HeightSpecified = true; + dmns.Width = 76.8; + dmns.WidthSpecified = true; + dmns.Thickness = 10; + + return dmns; + + #region CD/DVD/BD + case CommonTypes.MediaType.CDDA: + case CommonTypes.MediaType.CDG: + case CommonTypes.MediaType.CDEG: + case CommonTypes.MediaType.CDI: + case CommonTypes.MediaType.CDROM: + case CommonTypes.MediaType.CDROMXA: + case CommonTypes.MediaType.CDPLUS: + case CommonTypes.MediaType.CDMO: + case CommonTypes.MediaType.CDR: + case CommonTypes.MediaType.CDRW: + case CommonTypes.MediaType.CDMRW: + case CommonTypes.MediaType.VCD: + case CommonTypes.MediaType.SVCD: + case CommonTypes.MediaType.PCD: + case CommonTypes.MediaType.SACD: + case CommonTypes.MediaType.DDCD: + case CommonTypes.MediaType.DDCDR: + case CommonTypes.MediaType.DDCDRW: + case CommonTypes.MediaType.DTSCD: + case CommonTypes.MediaType.CDMIDI: + case CommonTypes.MediaType.CDV: + case CommonTypes.MediaType.CD: + case CommonTypes.MediaType.DVDROM: + case CommonTypes.MediaType.DVDR: + case CommonTypes.MediaType.DVDRW: + case CommonTypes.MediaType.DVDPR: + case CommonTypes.MediaType.DVDPRW: + case CommonTypes.MediaType.DVDPRWDL: + case CommonTypes.MediaType.DVDRDL: + case CommonTypes.MediaType.DVDPRDL: + case CommonTypes.MediaType.DVDRAM: + case CommonTypes.MediaType.DVDRWDL: + case CommonTypes.MediaType.DVDDownload: + case CommonTypes.MediaType.HDDVDROM: + case CommonTypes.MediaType.HDDVDRAM: + case CommonTypes.MediaType.HDDVDR: + case CommonTypes.MediaType.HDDVDRW: + case CommonTypes.MediaType.HDDVDRDL: + case CommonTypes.MediaType.HDDVDRWDL: + case CommonTypes.MediaType.BDROM: + case CommonTypes.MediaType.BDR: + case CommonTypes.MediaType.BDRE: + case CommonTypes.MediaType.BDRXL: + case CommonTypes.MediaType.BDREXL: + case CommonTypes.MediaType.PS1CD: + case CommonTypes.MediaType.PS2CD: + case CommonTypes.MediaType.PS2DVD: + case CommonTypes.MediaType.PS3DVD: + case CommonTypes.MediaType.PS3BD: + case CommonTypes.MediaType.PS4BD: + case CommonTypes.MediaType.PS5BD: + case CommonTypes.MediaType.XGD: + case CommonTypes.MediaType.XGD2: + case CommonTypes.MediaType.XGD3: + case CommonTypes.MediaType.XGD4: + case CommonTypes.MediaType.MEGACD: + case CommonTypes.MediaType.SATURNCD: + case CommonTypes.MediaType.GDROM: + case CommonTypes.MediaType.GDR: + case CommonTypes.MediaType.SuperCDROM2: + case CommonTypes.MediaType.JaguarCD: + case CommonTypes.MediaType.ThreeDO: + case CommonTypes.MediaType.WOD: + case CommonTypes.MediaType.WUOD: + case CommonTypes.MediaType.PCFX: + case CommonTypes.MediaType.CDIREADY: + case CommonTypes.MediaType.FMTOWNS: + case CommonTypes.MediaType.CDTV: + case CommonTypes.MediaType.CD32: + case CommonTypes.MediaType.Nuon: + case CommonTypes.MediaType.Playdia: + case CommonTypes.MediaType.Pippin: + case CommonTypes.MediaType.MilCD: + case CommonTypes.MediaType.CVD: + case CommonTypes.MediaType.UHDBD: + dmns.Diameter = 120; + dmns.DiameterSpecified = true; + dmns.Thickness = 1.2; + + return dmns; + case CommonTypes.MediaType.GOD: + dmns.Diameter = 80; + dmns.DiameterSpecified = true; + dmns.Thickness = 1.2; + + return dmns; + case CommonTypes.MediaType.VideoNow: + dmns.Diameter = 85; + dmns.DiameterSpecified = true; + dmns.Thickness = 1.2; + + return dmns; + case CommonTypes.MediaType.VideoNowColor: + case CommonTypes.MediaType.VideoNowXp: + dmns.Diameter = 108; + dmns.DiameterSpecified = true; + dmns.Thickness = 1.2; + + return dmns; + #endregion CD/DVD/BD + + #region Apple Hard Disks + // TODO: Find Apple Widget size + case CommonTypes.MediaType.AppleProfile: + dmns.Height = 223.8; + dmns.HeightSpecified = true; + dmns.Width = 438.9; + dmns.WidthSpecified = true; + dmns.Thickness = 111.5; + + return dmns; + case CommonTypes.MediaType.AppleHD20: + dmns.Height = 246.4; + dmns.HeightSpecified = true; + dmns.Width = 266.7; + dmns.WidthSpecified = true; + dmns.Thickness = 78.7; + + return dmns; + #endregion Apple Hard Disks + + case CommonTypes.MediaType.UMD: + dmns.Height = 64; + dmns.HeightSpecified = true; + dmns.Width = 63; + dmns.WidthSpecified = true; + dmns.Thickness = 4; + + return dmns; + default: return null; + } + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Metadata/MediaType.cs b/Aaru.CommonTypes/Metadata/MediaType.cs new file mode 100644 index 0000000..95c1746 --- /dev/null +++ b/Aaru.CommonTypes/Metadata/MediaType.cs @@ -0,0 +1,2539 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : MediaType.cs +// Author(s) : Natalia Portillo +// +// Component : XML metadata. +// +// --[ Description ] ---------------------------------------------------------- +// +// Converts a common media type to the XML equivalent. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +#pragma warning disable 612 +namespace Aaru.CommonTypes.Metadata +{ + /// Handles media type for metadata + public static class MediaType + { + /// Converts a media type of a pair of type and subtype strings to use in metadata + /// Media type + /// Media type and subtype for metadata + public static (string type, string subType) MediaTypeToString(CommonTypes.MediaType dskType) + { + string discType; + string discSubType; + + switch(dskType) + { + case CommonTypes.MediaType.BDR: + discType = "Blu-ray"; + discSubType = "BD-R"; + + break; + case CommonTypes.MediaType.BDRE: + discType = "Blu-ray"; + discSubType = "BD-RE"; + + break; + case CommonTypes.MediaType.BDREXL: + discType = "Blu-ray"; + discSubType = "BD-RE XL"; + + break; + case CommonTypes.MediaType.BDROM: + discType = "Blu-ray"; + discSubType = "BD-ROM"; + + break; + case CommonTypes.MediaType.BDRXL: + discType = "Blu-ray"; + discSubType = "BD-R XL"; + + break; + case CommonTypes.MediaType.UHDBD: + discType = "Blu-ray"; + discSubType = "Ultra HD Blu-ray"; + + break; + case CommonTypes.MediaType.CBHD: + discType = "Blu-ray"; + discSubType = "CBHD"; + + break; + case CommonTypes.MediaType.CD: + discType = "Compact Disc"; + discSubType = "CD"; + + break; + case CommonTypes.MediaType.CDDA: + discType = "Compact Disc"; + discSubType = "CD Digital Audio"; + + break; + case CommonTypes.MediaType.CDEG: + discType = "Compact Disc"; + discSubType = "CD+EG"; + + break; + case CommonTypes.MediaType.CDG: + discType = "Compact Disc"; + discSubType = "CD+G"; + + break; + case CommonTypes.MediaType.CDI: + discType = "Compact Disc"; + discSubType = "CD-i"; + + break; + case CommonTypes.MediaType.CDIREADY: + discType = "Compact Disc"; + discSubType = "CD-i Ready"; + + break; + case CommonTypes.MediaType.CDMIDI: + discType = "Compact Disc"; + discSubType = "CD+MIDI"; + + break; + case CommonTypes.MediaType.CDMO: + discType = "Compact Disc"; + discSubType = "CD-MO"; + + break; + case CommonTypes.MediaType.CDMRW: + discType = "Compact Disc"; + discSubType = "CD-MRW"; + + break; + case CommonTypes.MediaType.CDPLUS: + discType = "Compact Disc"; + discSubType = "CD+"; + + break; + case CommonTypes.MediaType.CDR: + discType = "Compact Disc"; + discSubType = "CD-R"; + + break; + case CommonTypes.MediaType.CDROM: + discType = "Compact Disc"; + discSubType = "CD-ROM"; + + break; + case CommonTypes.MediaType.CDROMXA: + discType = "Compact Disc"; + discSubType = "CD-ROM XA"; + + break; + case CommonTypes.MediaType.CDRW: + discType = "Compact Disc"; + discSubType = "CD-RW"; + + break; + case CommonTypes.MediaType.CDV: + discType = "Compact Disc"; + discSubType = "CD-Video"; + + break; + case CommonTypes.MediaType.DDCD: + discType = "DDCD"; + discSubType = "DDCD"; + + break; + case CommonTypes.MediaType.DDCDR: + discType = "DDCD"; + discSubType = "DDCD-R"; + + break; + case CommonTypes.MediaType.DDCDRW: + discType = "DDCD"; + discSubType = "DDCD-RW"; + + break; + case CommonTypes.MediaType.DTSCD: + discType = "Compact Disc"; + discSubType = "DTS CD"; + + break; + case CommonTypes.MediaType.DVDDownload: + discType = "DVD"; + discSubType = "DVD-Download"; + + break; + case CommonTypes.MediaType.DVDPR: + discType = "DVD"; + discSubType = "DVD+R"; + + break; + case CommonTypes.MediaType.DVDPRDL: + discType = "DVD"; + discSubType = "DVD+R DL"; + + break; + case CommonTypes.MediaType.DVDPRW: + discType = "DVD"; + discSubType = "DVD+RW"; + + break; + case CommonTypes.MediaType.DVDPRWDL: + discType = "DVD"; + discSubType = "DVD+RW DL"; + + break; + case CommonTypes.MediaType.DVDR: + discType = "DVD"; + discSubType = "DVD-R"; + + break; + case CommonTypes.MediaType.DVDRAM: + discType = "DVD"; + discSubType = "DVD-RAM"; + + break; + case CommonTypes.MediaType.DVDRDL: + discType = "DVD"; + discSubType = "DVD-R DL"; + + break; + case CommonTypes.MediaType.DVDROM: + discType = "DVD"; + discSubType = "DVD-ROM"; + + break; + case CommonTypes.MediaType.DVDRW: + discType = "DVD"; + discSubType = "DVD-RW"; + + break; + case CommonTypes.MediaType.DVDRWDL: + discType = "DVD"; + discSubType = "DVD-RW DL"; + + break; + case CommonTypes.MediaType.EVD: + discType = "EVD"; + discSubType = "EVD"; + + break; + case CommonTypes.MediaType.FDDVD: + discType = "FDDVD"; + discSubType = "FDDVD"; + + break; + case CommonTypes.MediaType.FVD: + discType = "FVD"; + discSubType = "FVD"; + + break; + case CommonTypes.MediaType.GDR: + discType = "GD"; + discSubType = "GD-R"; + + break; + case CommonTypes.MediaType.GDROM: + discType = "GD"; + discSubType = "GD-ROM"; + + break; + case CommonTypes.MediaType.GOD: + discType = "DVD"; + discSubType = "GameCube Game Disc"; + + break; + case CommonTypes.MediaType.WOD: + discType = "DVD"; + discSubType = "Wii Optical Disc"; + + break; + case CommonTypes.MediaType.WUOD: + discType = "Blu-ray"; + discSubType = "Wii U Optical Disc"; + + break; + case CommonTypes.MediaType.HDDVDR: + discType = "HD DVD"; + discSubType = "HD DVD-R"; + + break; + case CommonTypes.MediaType.HDDVDRAM: + discType = "HD DVD"; + discSubType = "HD DVD-RAM"; + + break; + case CommonTypes.MediaType.HDDVDRDL: + discType = "HD DVD"; + discSubType = "HD DVD-R DL"; + + break; + case CommonTypes.MediaType.HDDVDROM: + discType = "HD DVD"; + discSubType = "HD DVD-ROM"; + + break; + case CommonTypes.MediaType.HDDVDRW: + discType = "HD DVD"; + discSubType = "HD DVD-RW"; + + break; + case CommonTypes.MediaType.HDDVDRWDL: + discType = "HD DVD"; + discSubType = "HD DVD-RW DL"; + + break; + case CommonTypes.MediaType.HDVMD: + discType = "HD VMD"; + discSubType = "HD VMD"; + + break; + case CommonTypes.MediaType.HiMD: + discType = "MiniDisc"; + discSubType = "Hi-MD"; + + break; + case CommonTypes.MediaType.HVD: + discType = "HVD"; + discSubType = "HVD"; + + break; + case CommonTypes.MediaType.LD: + discType = "LaserDisc"; + discSubType = "LaserDisc"; + + break; + case CommonTypes.MediaType.LDROM: + discType = "LaserDisc"; + discSubType = "LD-ROM"; + + break; + case CommonTypes.MediaType.LVROM: + discType = "LaserDisc"; + discSubType = "LV-ROM"; + + break; + case CommonTypes.MediaType.MegaLD: + discType = "LaserDisc"; + discSubType = "MegaLD"; + + break; + case CommonTypes.MediaType.MD: + discType = "MiniDisc"; + discSubType = "MiniDisc"; + + break; + case CommonTypes.MediaType.MD60: + discType = "MiniDisc"; + discSubType = "MiniDisc (60 minute)"; + + break; + case CommonTypes.MediaType.MD74: + discType = "MiniDisc"; + discSubType = "MiniDisc (74 minute)"; + + break; + case CommonTypes.MediaType.MD80: + discType = "MiniDisc"; + discSubType = "MiniDisc (80 minute)"; + + break; + case CommonTypes.MediaType.MEGACD: + discType = "Compact Disc"; + discSubType = "Sega Mega CD"; + + break; + case CommonTypes.MediaType.PCD: + discType = "Compact Disc"; + discSubType = "Photo CD"; + + break; + case CommonTypes.MediaType.PlayStationMemoryCard: + discType = "PlayStation Memory Card"; + discSubType = "PlayStation Memory Card"; + + break; + case CommonTypes.MediaType.PlayStationMemoryCard2: + discType = "PlayStation Memory Card"; + discSubType = "PlayStation 2 Memory Card"; + + break; + case CommonTypes.MediaType.PS1CD: + discType = "Compact Disc"; + discSubType = "PlayStation Game Disc"; + + break; + case CommonTypes.MediaType.PS2CD: + discType = "Compact Disc"; + discSubType = "PlayStation 2 Game Disc"; + + break; + case CommonTypes.MediaType.PS2DVD: + discType = "DVD"; + discSubType = "PlayStation 2 Game Disc"; + + break; + case CommonTypes.MediaType.PS3BD: + discType = "Blu-ray"; + discSubType = "PlayStation 3 Game Disc"; + + break; + case CommonTypes.MediaType.PS3DVD: + discType = "DVD"; + discSubType = "PlayStation 3 Game Disc"; + + break; + case CommonTypes.MediaType.PS4BD: + discType = "Blu-ray"; + discSubType = "PlayStation 4 Game Disc"; + + break; + case CommonTypes.MediaType.PS5BD: + discType = "Blu-ray"; + discSubType = "PlayStation 5 Game Disc"; + + break; + case CommonTypes.MediaType.SACD: + discType = "SACD"; + discSubType = "Super Audio CD"; + + break; + case CommonTypes.MediaType.SegaCard: + discType = "Sega Card"; + discSubType = "Sega Card"; + + break; + case CommonTypes.MediaType.SATURNCD: + discType = "Compact Disc"; + discSubType = "Sega Saturn CD"; + + break; + case CommonTypes.MediaType.SVCD: + discType = "Compact Disc"; + discSubType = "Super Video CD"; + + break; + case CommonTypes.MediaType.CVD: + discType = "Compact Disc"; + discSubType = "China Video Disc"; + + break; + case CommonTypes.MediaType.SVOD: + discType = "SVOD"; + discSubType = "SVOD"; + + break; + case CommonTypes.MediaType.UDO: + discType = "UDO"; + discSubType = "UDO"; + + break; + case CommonTypes.MediaType.UMD: + discType = "UMD"; + discSubType = "Universal Media Disc"; + + break; + case CommonTypes.MediaType.VCD: + discType = "Compact Disc"; + discSubType = "Video CD"; + + break; + case CommonTypes.MediaType.Nuon: + discType = "DVD"; + discSubType = "Nuon"; + + break; + case CommonTypes.MediaType.XGD: + discType = "DVD"; + discSubType = "Xbox Game Disc (XGD)"; + + break; + case CommonTypes.MediaType.XGD2: + discType = "DVD"; + discSubType = "Xbox 360 Game Disc (XGD2)"; + + break; + case CommonTypes.MediaType.XGD3: + discType = "DVD"; + discSubType = "Xbox 360 Game Disc (XGD3)"; + + break; + case CommonTypes.MediaType.XGD4: + discType = "Blu-ray"; + discSubType = "Xbox One Game Disc (XGD4)"; + + break; + case CommonTypes.MediaType.FMTOWNS: + discType = "Compact Disc"; + discSubType = "FM-Towns"; + + break; + case CommonTypes.MediaType.Apple32SS: + discType = "5.25\" floppy"; + discSubType = "Apple DOS 3.2"; + + break; + case CommonTypes.MediaType.Apple32DS: + discType = "5.25\" floppy"; + discSubType = "Apple DOS 3.2 (double-sided)"; + + break; + case CommonTypes.MediaType.Apple33SS: + discType = "5.25\" floppy"; + discSubType = "Apple DOS 3.3"; + + break; + case CommonTypes.MediaType.Apple33DS: + discType = "5.25\" floppy"; + discSubType = "Apple DOS 3.3 (double-sided)"; + + break; + case CommonTypes.MediaType.AppleSonySS: + discType = "3.5\" floppy"; + discSubType = "Apple 400K"; + + break; + case CommonTypes.MediaType.AppleSonyDS: + discType = "3.5\" floppy"; + discSubType = "Apple 800K"; + + break; + case CommonTypes.MediaType.AppleFileWare: + discType = "5.25\" floppy"; + discSubType = "Apple FileWare"; + + break; + case CommonTypes.MediaType.RX50: + discType = "5.25\" floppy"; + discSubType = "DEC RX50"; + + break; + case CommonTypes.MediaType.DOS_525_SS_DD_8: + discType = "5.25\" floppy"; + discSubType = "IBM double-density, single-sided, 8 sectors"; + + break; + case CommonTypes.MediaType.DOS_525_SS_DD_9: + discType = "5.25\" floppy"; + discSubType = "IBM double-density, single-sided, 9 sectors"; + + break; + case CommonTypes.MediaType.DOS_525_DS_DD_8: + discType = "5.25\" floppy"; + discSubType = "IBM double-density, double-sided, 8 sectors"; + + break; + case CommonTypes.MediaType.DOS_525_DS_DD_9: + discType = "5.25\" floppy"; + discSubType = "IBM double-density, double-sided, 9 sectors"; + + break; + case CommonTypes.MediaType.DOS_525_HD: + discType = "5.25\" floppy"; + discSubType = "IBM high-density"; + + break; + case CommonTypes.MediaType.DOS_35_SS_DD_8: + discType = "3.5\" floppy"; + discSubType = "IBM double-density, single-sided, 8 sectors"; + + break; + case CommonTypes.MediaType.DOS_35_SS_DD_9: + discType = "3.5\" floppy"; + discSubType = "IBM double-density, single-sided, 9 sectors"; + + break; + case CommonTypes.MediaType.DOS_35_DS_DD_8: + discType = "3.5\" floppy"; + discSubType = "IBM double-density, double-sided, 8 sectors"; + + break; + case CommonTypes.MediaType.DOS_35_DS_DD_9: + discType = "3.5\" floppy"; + discSubType = "IBM double-density, double-sided, 9 sectors"; + + break; + case CommonTypes.MediaType.DOS_35_HD: + discType = "3.5\" floppy"; + discSubType = "IBM high-density"; + + break; + case CommonTypes.MediaType.DOS_35_ED: + discType = "3.5\" floppy"; + discSubType = "IBM extra-density"; + + break; + case CommonTypes.MediaType.Apricot_35: + discType = "3.5\" floppy"; + discSubType = "Apricot double-density, single-sided, 70 tracks"; + + break; + case CommonTypes.MediaType.DMF: + discType = "3.5\" floppy"; + discSubType = "Microsoft DMF"; + + break; + case CommonTypes.MediaType.DMF_82: + discType = "3.5\" floppy"; + discSubType = "Microsoft DMF (82-track)"; + + break; + case CommonTypes.MediaType.XDF_35: + discType = "3.5\" floppy"; + discSubType = "IBM XDF"; + + break; + case CommonTypes.MediaType.XDF_525: + discType = "5.25\" floppy"; + discSubType = "IBM XDF"; + + break; + case CommonTypes.MediaType.IBM23FD: + discType = "8\" floppy"; + discSubType = "IBM 23FD"; + + break; + case CommonTypes.MediaType.IBM33FD_128: + discType = "8\" floppy"; + discSubType = "IBM 33FD (128 bytes/sector)"; + + break; + case CommonTypes.MediaType.IBM33FD_256: + discType = "8\" floppy"; + discSubType = "IBM 33FD (256 bytes/sector)"; + + break; + case CommonTypes.MediaType.IBM33FD_512: + discType = "8\" floppy"; + discSubType = "IBM 33FD (512 bytes/sector)"; + + break; + case CommonTypes.MediaType.IBM43FD_128: + discType = "8\" floppy"; + discSubType = "IBM 43FD (128 bytes/sector)"; + + break; + case CommonTypes.MediaType.IBM43FD_256: + discType = "8\" floppy"; + discSubType = "IBM 43FD (256 bytes/sector)"; + + break; + case CommonTypes.MediaType.IBM53FD_256: + discType = "8\" floppy"; + discSubType = "IBM 53FD (256 bytes/sector)"; + + break; + case CommonTypes.MediaType.IBM53FD_512: + discType = "8\" floppy"; + discSubType = "IBM 53FD (512 bytes/sector)"; + + break; + case CommonTypes.MediaType.IBM53FD_1024: + discType = "8\" floppy"; + discSubType = "IBM 53FD (1024 bytes/sector)"; + + break; + case CommonTypes.MediaType.RX01: + discType = "8\" floppy"; + discSubType = "DEC RX-01"; + + break; + case CommonTypes.MediaType.RX02: + discType = "8\" floppy"; + discSubType = "DEC RX-02"; + + break; + case CommonTypes.MediaType.RX03: + discType = "8\" floppy"; + discSubType = "DEC RX-03"; + + break; + case CommonTypes.MediaType.ACORN_525_SS_SD_40: + discType = "5.25\" floppy"; + discSubType = "BBC Micro 100K"; + + break; + case CommonTypes.MediaType.ACORN_525_SS_SD_80: + discType = "5.25\" floppy"; + discSubType = "BBC Micro 200K"; + + break; + case CommonTypes.MediaType.ACORN_525_SS_DD_40: + discType = "5.25\" floppy"; + discSubType = "Acorn S"; + + break; + case CommonTypes.MediaType.ACORN_525_SS_DD_80: + discType = "5.25\" floppy"; + discSubType = "Acorn M"; + + break; + case CommonTypes.MediaType.ACORN_525_DS_DD: + discType = "5.25\" floppy"; + discSubType = "Acorn L"; + + break; + case CommonTypes.MediaType.ACORN_35_DS_DD: + discType = "3.5\" floppy"; + discSubType = "Acorn Archimedes"; + + break; + case CommonTypes.MediaType.ACORN_35_DS_HD: + discType = "3.5\" floppy"; + discSubType = "Acorn Archimedes high-density"; + + break; + case CommonTypes.MediaType.ATARI_525_SD: + discType = "5.25\" floppy"; + discSubType = "Atari single-density"; + + break; + case CommonTypes.MediaType.ATARI_525_ED: + discType = "5.25\" floppy"; + discSubType = "Atari enhanced-density"; + + break; + case CommonTypes.MediaType.ATARI_525_DD: + discType = "5.25\" floppy"; + discSubType = "Atari double-density"; + + break; + case CommonTypes.MediaType.ATARI_35_SS_DD: + discType = "3.5\" floppy"; + discSubType = "Atari ST double-density, single-sided, 10 sectors"; + + break; + case CommonTypes.MediaType.ATARI_35_DS_DD: + discType = "3.5\" floppy"; + discSubType = "Atari ST double-density, double-sided, 10 sectors"; + + break; + case CommonTypes.MediaType.ATARI_35_SS_DD_11: + discType = "3.5\" floppy"; + discSubType = "Atari ST double-density, single-sided, 11 sectors"; + + break; + case CommonTypes.MediaType.ATARI_35_DS_DD_11: + discType = "3.5\" floppy"; + discSubType = "Atari ST double-density, double-sided, 11 sectors"; + + break; + case CommonTypes.MediaType.CBM_1540: + case CommonTypes.MediaType.CBM_1540_Ext: + discType = "5.25\" floppy"; + discSubType = "Commodore 1540/1541"; + + break; + case CommonTypes.MediaType.CBM_1571: + discType = "5.25\" floppy"; + discSubType = "Commodore 1571"; + + break; + case CommonTypes.MediaType.CBM_35_DD: + discType = "3.5\" floppy"; + discSubType = "Commodore 1581"; + + break; + case CommonTypes.MediaType.CBM_AMIGA_35_DD: + discType = "3.5\" floppy"; + discSubType = "Amiga double-density"; + + break; + case CommonTypes.MediaType.CBM_AMIGA_35_HD: + discType = "3.5\" floppy"; + discSubType = "Amiga high-density"; + + break; + case CommonTypes.MediaType.NEC_8_SD: + discType = "8\" floppy"; + discSubType = "NEC single-sided"; + + break; + case CommonTypes.MediaType.NEC_8_DD: + discType = "8\" floppy"; + discSubType = "NEC double-sided"; + + break; + case CommonTypes.MediaType.NEC_525_SS: + discType = "5.25\" floppy"; + discSubType = "NEC single-sided"; + + break; + case CommonTypes.MediaType.NEC_525_HD: + discType = "5.25\" floppy"; + discSubType = "NEC high-density"; + + break; + case CommonTypes.MediaType.NEC_35_HD_8: + discType = "3.5\" floppy"; + discSubType = "NEC high-density"; + + break; + case CommonTypes.MediaType.NEC_35_HD_15: + discType = "3.5\" floppy"; + discSubType = "NEC high-density"; + + break; + case CommonTypes.MediaType.NEC_35_TD: + discType = "3.5\" floppy"; + discSubType = "NEC triple-density"; + + break; + case CommonTypes.MediaType.SHARP_525_9: + discType = "5.25\" floppy"; + discSubType = "Sharp (9 sectors per track)"; + + break; + case CommonTypes.MediaType.SHARP_35_9: + discType = "3.5\" floppy"; + discSubType = "Sharp (9 sectors per track)"; + + break; + case CommonTypes.MediaType.ECMA_54: + discType = "8\" floppy"; + discSubType = "ECMA-54"; + + break; + case CommonTypes.MediaType.ECMA_59: + discType = "8\" floppy"; + discSubType = "ECMA-59"; + + break; + case CommonTypes.MediaType.ECMA_69_8: + case CommonTypes.MediaType.ECMA_69_15: + case CommonTypes.MediaType.ECMA_69_26: + discType = "8\" floppy"; + discSubType = "ECMA-69"; + + break; + case CommonTypes.MediaType.ECMA_66: + discType = "5.25\" floppy"; + discSubType = "ECMA-66"; + + break; + case CommonTypes.MediaType.ECMA_70: + discType = "5.25\" floppy"; + discSubType = "ECMA-70"; + + break; + case CommonTypes.MediaType.ECMA_78: + case CommonTypes.MediaType.ECMA_78_2: + discType = "5.25\" floppy"; + discSubType = "ECMA-78"; + + break; + case CommonTypes.MediaType.ECMA_99_8: + case CommonTypes.MediaType.ECMA_99_15: + case CommonTypes.MediaType.ECMA_99_26: + discType = "5.25\" floppy"; + discSubType = "ECMA-99"; + + break; + case CommonTypes.MediaType.FDFORMAT_525_DD: + discType = "5.25\" floppy"; + discSubType = "FDFORMAT double-density"; + + break; + case CommonTypes.MediaType.FDFORMAT_525_HD: + discType = "5.25\" floppy"; + discSubType = "FDFORMAT high-density"; + + break; + case CommonTypes.MediaType.FDFORMAT_35_DD: + discType = "3.5\" floppy"; + discSubType = "FDFORMAT double-density"; + + break; + case CommonTypes.MediaType.FDFORMAT_35_HD: + discType = "3.5\" floppy"; + discSubType = "FDFORMAT high-density"; + + break; + case CommonTypes.MediaType.ECMA_260: + case CommonTypes.MediaType.ECMA_260_Double: + discType = "356mm magneto-optical"; + discSubType = "ECMA-260 / ISO 15898"; + + break; + case CommonTypes.MediaType.ECMA_183_512: + case CommonTypes.MediaType.ECMA_183: + discType = "5.25\" magneto-optical"; + discSubType = "ECMA-183"; + + break; + case CommonTypes.MediaType.ISO_10089: + case CommonTypes.MediaType.ISO_10089_512: + discType = "5.25\" magneto-optical"; + discSubType = "ISO 10089"; + + break; + case CommonTypes.MediaType.ECMA_184_512: + case CommonTypes.MediaType.ECMA_184: + discType = "5.25\" magneto-optical"; + discSubType = "ECMA-184"; + + break; + case CommonTypes.MediaType.ECMA_154: + discType = "3.5\" magneto-optical"; + discSubType = "ECMA-154"; + + break; + case CommonTypes.MediaType.ECMA_201: + case CommonTypes.MediaType.ECMA_201_ROM: + discType = "3.5\" magneto-optical"; + discSubType = "ECMA-201"; + + break; + case CommonTypes.MediaType.FlashDrive: + discType = "USB flash drive"; + discSubType = "USB flash drive"; + + break; + case CommonTypes.MediaType.SuperCDROM2: + discType = "Compact Disc"; + discSubType = "Super CD-ROM²"; + + break; + case CommonTypes.MediaType.LDROM2: + discType = "LaserDisc"; + discSubType = "LD-ROM²"; + + break; + case CommonTypes.MediaType.JaguarCD: + discType = "Compact Disc"; + discSubType = "Atari Jaguar CD"; + + break; + case CommonTypes.MediaType.MilCD: + discType = "Compact Disc"; + discSubType = "Sega MilCD"; + + break; + case CommonTypes.MediaType.ThreeDO: + discType = "Compact Disc"; + discSubType = "3DO"; + + break; + case CommonTypes.MediaType.PCFX: + discType = "Compact Disc"; + discSubType = "PC-FX"; + + break; + case CommonTypes.MediaType.NeoGeoCD: + discType = "Compact Disc"; + discSubType = "NEO-GEO CD"; + + break; + case CommonTypes.MediaType.CDTV: + discType = "Compact Disc"; + discSubType = "Commodore CDTV"; + + break; + case CommonTypes.MediaType.CD32: + discType = "Compact Disc"; + discSubType = "Amiga CD32"; + + break; + case CommonTypes.MediaType.Playdia: + discType = "Compact Disc"; + discSubType = "Bandai Playdia"; + + break; + case CommonTypes.MediaType.Pippin: + discType = "Compact Disc"; + discSubType = "Apple Pippin"; + + break; + case CommonTypes.MediaType.ZIP100: + discType = "Iomega ZIP"; + discSubType = "Iomega ZIP100"; + + break; + case CommonTypes.MediaType.ZIP250: + discType = "Iomega ZIP"; + discSubType = "Iomega ZIP250"; + + break; + case CommonTypes.MediaType.ZIP750: + discType = "Iomega ZIP"; + discSubType = "Iomega ZIP750"; + + break; + case CommonTypes.MediaType.AppleProfile: + discType = "Hard Disk Drive"; + discSubType = "Apple Profile"; + + break; + case CommonTypes.MediaType.AppleWidget: + discType = "Hard Disk Drive"; + discSubType = "Apple Widget"; + + break; + case CommonTypes.MediaType.AppleHD20: + discType = "Hard Disk Drive"; + discSubType = "Apple HD20"; + + break; + case CommonTypes.MediaType.PriamDataTower: + discType = "Hard Disk Drive"; + discSubType = "Priam DataTower"; + + break; + case CommonTypes.MediaType.DDS1: + discType = "Digital Data Storage"; + discSubType = "DDS"; + + break; + case CommonTypes.MediaType.DDS2: + discType = "Digital Data Storage"; + discSubType = "DDS-2"; + + break; + case CommonTypes.MediaType.DDS3: + discType = "Digital Data Storage"; + discSubType = "DDS-3"; + + break; + case CommonTypes.MediaType.DDS4: + discType = "Digital Data Storage"; + discSubType = "DDS-4"; + + break; + case CommonTypes.MediaType.PocketZip: + discType = "Iomega PocketZip"; + discSubType = "Iomega PocketZip"; + + break; + case CommonTypes.MediaType.CompactFloppy: + discType = "3\" floppy"; + discSubType = "Compact Floppy"; + + break; + case CommonTypes.MediaType.GENERIC_HDD: + discType = "Hard Disk Drive"; + discSubType = "Unknown"; + + break; + case CommonTypes.MediaType.MDData: + discType = "MiniDisc"; + discSubType = "MD-DATA"; + + break; + case CommonTypes.MediaType.MDData2: + discType = "MiniDisc"; + discSubType = "MD-DATA2"; + + break; + case CommonTypes.MediaType.UDO2: + discType = "UDO"; + discSubType = "UDO2"; + + break; + case CommonTypes.MediaType.UDO2_WORM: + discType = "UDO"; + discSubType = "UDO2 (WORM)"; + + break; + case CommonTypes.MediaType.ADR30: + discType = "Advanced Digital Recording"; + discSubType = "ADR 30"; + + break; + case CommonTypes.MediaType.ADR50: + discType = "Advanced Digital Recording"; + discSubType = "ADR 50"; + + break; + case CommonTypes.MediaType.ADR260: + discType = "Advanced Digital Recording"; + discSubType = "ADR 2.60"; + + break; + case CommonTypes.MediaType.ADR2120: + discType = "Advanced Digital Recording"; + discSubType = "ADR 2.120"; + + break; + case CommonTypes.MediaType.AIT1: + discType = "Advanced Intelligent Tape"; + discSubType = "AIT-1"; + + break; + case CommonTypes.MediaType.AIT1Turbo: + discType = "Advanced Intelligent Tape"; + discSubType = "AIT-1 Turbo"; + + break; + case CommonTypes.MediaType.AIT2: + discType = "Advanced Intelligent Tape"; + discSubType = "AIT-2"; + + break; + case CommonTypes.MediaType.AIT2Turbo: + discType = "Advanced Intelligent Tape"; + discSubType = "AIT-2 Turbo"; + + break; + case CommonTypes.MediaType.AIT3: + discType = "Advanced Intelligent Tape"; + discSubType = "AIT-3"; + + break; + case CommonTypes.MediaType.AIT3Ex: + discType = "Advanced Intelligent Tape"; + discSubType = "AIT-3Ex"; + + break; + case CommonTypes.MediaType.AIT3Turbo: + discType = "Advanced Intelligent Tape"; + discSubType = "AIT-3 Turbo"; + + break; + case CommonTypes.MediaType.AIT4: + discType = "Advanced Intelligent Tape"; + discSubType = "AIT-4"; + + break; + case CommonTypes.MediaType.AIT5: + discType = "Advanced Intelligent Tape"; + discSubType = "AIT-5"; + + break; + case CommonTypes.MediaType.AITETurbo: + discType = "Advanced Intelligent Tape"; + discSubType = "AIT-E Turbo"; + + break; + case CommonTypes.MediaType.SAIT1: + discType = "Super Advanced Intelligent Tape"; + discSubType = "SAIT-1"; + + break; + case CommonTypes.MediaType.SAIT2: + discType = "Super Advanced Intelligent Tape"; + discSubType = "SAIT-2"; + + break; + case CommonTypes.MediaType.Bernoulli: + case CommonTypes.MediaType.Bernoulli10: + discType = "Iomega Bernoulli Box"; + discSubType = "Iomega Bernoulli Box 10Mb"; + + break; + case CommonTypes.MediaType.Bernoulli20: + discType = "Iomega Bernoulli Box"; + discSubType = "Iomega Bernoulli Box 20Mb"; + + break; + case CommonTypes.MediaType.BernoulliBox2_20: + case CommonTypes.MediaType.Bernoulli2: + discType = "Iomega Bernoulli Box II"; + discSubType = "Iomega Bernoulli Box II 20Mb"; + + break; + case CommonTypes.MediaType.Bernoulli35: + discType = "Iomega Bernoulli Box II"; + discSubType = "Iomega Bernoulli Box II 35Mb"; + + break; + case CommonTypes.MediaType.Bernoulli44: + discType = "Iomega Bernoulli Box II"; + discSubType = "Iomega Bernoulli Box II 44Mb"; + + break; + case CommonTypes.MediaType.Bernoulli65: + discType = "Iomega Bernoulli Box II"; + discSubType = "Iomega Bernoulli Box II 65Mb"; + + break; + case CommonTypes.MediaType.Bernoulli90: + discType = "Iomega Bernoulli Box II"; + discSubType = "Iomega Bernoulli Box II 90Mb"; + + break; + case CommonTypes.MediaType.Bernoulli105: + discType = "Iomega Bernoulli Box II"; + discSubType = "Iomega Bernoulli Box II 105Mb"; + + break; + case CommonTypes.MediaType.Bernoulli150: + discType = "Iomega Bernoulli Box II"; + discSubType = "Iomega Bernoulli Box II 150Mb"; + + break; + case CommonTypes.MediaType.Bernoulli230: + discType = "Iomega Bernoulli Box II"; + discSubType = "Iomega Bernoulli Box II 230Mb"; + + break; + case CommonTypes.MediaType.Ditto: + discType = "Iomega Ditto"; + discSubType = "Iomega Ditto"; + + break; + case CommonTypes.MediaType.DittoMax: + discType = "Iomega Ditto"; + discSubType = "Iomega Ditto Max"; + + break; + case CommonTypes.MediaType.Jaz: + discType = "Iomega Jaz"; + discSubType = "Iomega Jaz 1GB"; + + break; + case CommonTypes.MediaType.Jaz2: + discType = "Iomega Jaz"; + discSubType = "Iomega Jaz 2GB"; + + break; + case CommonTypes.MediaType.REV35: + discType = "Iomega REV"; + discSubType = "Iomega REV-35"; + + break; + case CommonTypes.MediaType.REV70: + discType = "Iomega REV"; + discSubType = "Iomega REV-70"; + + break; + case CommonTypes.MediaType.REV120: + discType = "Iomega REV"; + discSubType = "Iomega REV-120"; + + break; + case CommonTypes.MediaType.CompactFlash: + discType = "Compact Flash"; + discSubType = "Compact Flash"; + + break; + case CommonTypes.MediaType.CompactFlashType2: + discType = "Compact Flash"; + discSubType = "Compact Flash Type 2"; + + break; + case CommonTypes.MediaType.CFast: + discType = "Compact Flash"; + discSubType = "CFast"; + + break; + case CommonTypes.MediaType.DigitalAudioTape: + discType = "Digital Audio Tape"; + discSubType = "Digital Audio Tape"; + + break; + case CommonTypes.MediaType.DAT72: + discType = "Digital Data Storage"; + discSubType = "DAT-72"; + + break; + case CommonTypes.MediaType.DAT160: + discType = "Digital Data Storage"; + discSubType = "DAT-160"; + + break; + case CommonTypes.MediaType.DAT320: + discType = "Digital Data Storage"; + discSubType = "DAT-320"; + + break; + case CommonTypes.MediaType.DECtapeII: + discType = "DECtape"; + discSubType = "DECtape II"; + + break; + case CommonTypes.MediaType.CompactTapeI: + discType = "CompacTape"; + discSubType = "CompacTape"; + + break; + case CommonTypes.MediaType.CompactTapeII: + discType = "CompacTape"; + discSubType = "CompacTape II"; + + break; + case CommonTypes.MediaType.DLTtapeIII: + discType = "Digital Linear Tape"; + discSubType = "DLTtape III"; + + break; + case CommonTypes.MediaType.DLTtapeIIIxt: + discType = "Digital Linear Tape"; + discSubType = "DLTtape IIIXT"; + + break; + case CommonTypes.MediaType.DLTtapeIV: + discType = "Digital Linear Tape"; + discSubType = "DLTtape IV"; + + break; + case CommonTypes.MediaType.DLTtapeS4: + discType = "Digital Linear Tape"; + discSubType = "DLTtape S4"; + + break; + case CommonTypes.MediaType.SDLT1: + discType = "Super Digital Linear Tape"; + discSubType = "SDLTtape I"; + + break; + case CommonTypes.MediaType.SDLT2: + discType = "Super Digital Linear Tape"; + discSubType = "SDLTtape II"; + + break; + case CommonTypes.MediaType.VStapeI: + discType = "Digital Linear Tape"; + discSubType = "DLTtape VS1"; + + break; + case CommonTypes.MediaType.Data8: + discType = "Data8"; + discSubType = "Data8"; + + break; + case CommonTypes.MediaType.MiniDV: + discType = "DV tape"; + discSubType = "MiniDV"; + + break; + case CommonTypes.MediaType.Exatape15m: + discType = "Exatape"; + discSubType = "Exatape (15m)"; + + break; + case CommonTypes.MediaType.Exatape22m: + discType = "Exatape"; + discSubType = "Exatape (22m)"; + + break; + case CommonTypes.MediaType.Exatape22mAME: + discType = "Exatape"; + discSubType = "Exatape (22m AME)"; + + break; + case CommonTypes.MediaType.Exatape28m: + discType = "Exatape"; + discSubType = "Exatape (28m)"; + + break; + case CommonTypes.MediaType.Exatape40m: + discType = "Exatape"; + discSubType = "Exatape (40m)"; + + break; + case CommonTypes.MediaType.Exatape45m: + discType = "Exatape"; + discSubType = "Exatape (45m)"; + + break; + case CommonTypes.MediaType.Exatape54m: + discType = "Exatape"; + discSubType = "Exatape (54m)"; + + break; + case CommonTypes.MediaType.Exatape75m: + discType = "Exatape"; + discSubType = "Exatape (75m)"; + + break; + case CommonTypes.MediaType.Exatape76m: + discType = "Exatape"; + discSubType = "Exatape (76m)"; + + break; + case CommonTypes.MediaType.Exatape80m: + discType = "Exatape"; + discSubType = "Exatape (80m)"; + + break; + case CommonTypes.MediaType.Exatape106m: + discType = "Exatape"; + discSubType = "Exatape (106m)"; + + break; + case CommonTypes.MediaType.Exatape112m: + discType = "Exatape"; + discSubType = "Exatape (112m)"; + + break; + case CommonTypes.MediaType.Exatape125m: + discType = "Exatape"; + discSubType = "Exatape (125m)"; + + break; + case CommonTypes.MediaType.Exatape150m: + discType = "Exatape"; + discSubType = "Exatape (150m)"; + + break; + case CommonTypes.MediaType.Exatape160mXL: + discType = "Exatape"; + discSubType = "Exatape XL (160m)"; + + break; + case CommonTypes.MediaType.Exatape170m: + discType = "Exatape"; + discSubType = "Exatape (170m)"; + + break; + case CommonTypes.MediaType.Exatape225m: + discType = "Exatape"; + discSubType = "Exatape (225m)"; + + break; + case CommonTypes.MediaType.EZ135: + discType = "3.5\" SyQuest cartridge"; + discSubType = "EZ135"; + + break; + case CommonTypes.MediaType.EZ230: + discType = "3.5\" SyQuest cartridge"; + discSubType = "EZ230"; + + break; + case CommonTypes.MediaType.Quest: + discType = "3.5\" SyQuest cartridge"; + discSubType = "Quest"; + + break; + case CommonTypes.MediaType.SparQ: + discType = "3.5\" SyQuest cartridge"; + discSubType = "SparQ"; + + break; + case CommonTypes.MediaType.SQ100: + discType = "3.9\" SyQuest cartridge"; + discSubType = "SQ100"; + + break; + case CommonTypes.MediaType.SQ200: + discType = "3.9\" SyQuest cartridge"; + discSubType = "SQ200"; + + break; + case CommonTypes.MediaType.SQ300: + discType = "3.9\" SyQuest cartridge"; + discSubType = "SQ300"; + + break; + case CommonTypes.MediaType.SQ310: + discType = "3.5\" SyQuest cartridge"; + discSubType = "SQ310"; + + break; + case CommonTypes.MediaType.SQ327: + discType = "3.5\" SyQuest cartridge"; + discSubType = "SQ327"; + + break; + case CommonTypes.MediaType.SQ400: + discType = "5.25\" SyQuest cartridge"; + discSubType = "SQ400"; + + break; + case CommonTypes.MediaType.SQ800: + discType = "5.25\" SyQuest cartridge"; + discSubType = "SQ800"; + + break; + case CommonTypes.MediaType.SQ1500: + discType = "3.5\" SyQuest cartridge"; + discSubType = "SQ1500"; + + break; + case CommonTypes.MediaType.SQ2000: + discType = "5.25\" SyQuest cartridge"; + discSubType = "SQ2000"; + + break; + case CommonTypes.MediaType.SyJet: + discType = "3.5\" SyQuest cartridge"; + discSubType = "SyJet"; + + break; + case CommonTypes.MediaType.LTO: + discType = "Linear Tape-Open"; + discSubType = "LTO"; + + break; + case CommonTypes.MediaType.LTO2: + discType = "Linear Tape-Open"; + discSubType = "LTO-2"; + + break; + case CommonTypes.MediaType.LTO3: + discType = "Linear Tape-Open"; + discSubType = "LTO-3"; + + break; + case CommonTypes.MediaType.LTO3WORM: + discType = "Linear Tape-Open"; + discSubType = "LTO-3 (WORM)"; + + break; + case CommonTypes.MediaType.LTO4: + discType = "Linear Tape-Open"; + discSubType = "LTO-4"; + + break; + case CommonTypes.MediaType.LTO4WORM: + discType = "Linear Tape-Open"; + discSubType = "LTO-4 (WORM)"; + + break; + case CommonTypes.MediaType.LTO5: + discType = "Linear Tape-Open"; + discSubType = "LTO-5"; + + break; + case CommonTypes.MediaType.LTO5WORM: + discType = "Linear Tape-Open"; + discSubType = "LTO-5 (WORM)"; + + break; + case CommonTypes.MediaType.LTO6: + discType = "Linear Tape-Open"; + discSubType = "LTO-6"; + + break; + case CommonTypes.MediaType.LTO6WORM: + discType = "Linear Tape-Open"; + discSubType = "LTO-6 (WORM)"; + + break; + case CommonTypes.MediaType.LTO7: + discType = "Linear Tape-Open"; + discSubType = "LTO-7"; + + break; + case CommonTypes.MediaType.LTO7WORM: + discType = "Linear Tape-Open"; + discSubType = "LTO-7 (WORM)"; + + break; + case CommonTypes.MediaType.MemoryStick: + discType = "Memory Stick"; + discSubType = "Memory Stick"; + + break; + case CommonTypes.MediaType.MemoryStickDuo: + discType = "Memory Stick"; + discSubType = "Memory Stick Duo"; + + break; + case CommonTypes.MediaType.MemoryStickMicro: + discType = "Memory Stick"; + discSubType = "Memory Stick Micro"; + + break; + case CommonTypes.MediaType.MemoryStickPro: + discType = "Memory Stick"; + discSubType = "Memory Stick Pro"; + + break; + case CommonTypes.MediaType.MemoryStickProDuo: + discType = "Memory Stick"; + discSubType = "Memory Stick PRO Duo"; + + break; + case CommonTypes.MediaType.SecureDigital: + discType = "Secure Digital"; + discSubType = "Secure Digital"; + + break; + case CommonTypes.MediaType.miniSD: + discType = "Secure Digital"; + discSubType = "miniSD"; + + break; + case CommonTypes.MediaType.microSD: + discType = "Secure Digital"; + discSubType = "microSD"; + + break; + case CommonTypes.MediaType.MMC: + discType = "MultiMediaCard"; + discSubType = "MultiMediaCard"; + + break; + case CommonTypes.MediaType.MMCmicro: + discType = "MultiMediaCard"; + discSubType = "MMCmicro"; + + break; + case CommonTypes.MediaType.RSMMC: + discType = "MultiMediaCard"; + discSubType = "Reduced-Size MultiMediaCard"; + + break; + case CommonTypes.MediaType.MMCplus: + discType = "MultiMediaCard"; + discSubType = "MMCplus"; + + break; + case CommonTypes.MediaType.MMCmobile: + discType = "MultiMediaCard"; + discSubType = "MMCmobile"; + + break; + case CommonTypes.MediaType.MLR1: + discType = "Scalable Linear Recording"; + discSubType = "MLR1"; + + break; + case CommonTypes.MediaType.MLR1SL: + discType = "Scalable Linear Recording"; + discSubType = "MLR1 SL"; + + break; + case CommonTypes.MediaType.MLR3: + discType = "Scalable Linear Recording"; + discSubType = "MLR3"; + + break; + case CommonTypes.MediaType.SLR1: + discType = "Scalable Linear Recording"; + discSubType = "SLR1"; + + break; + case CommonTypes.MediaType.SLR2: + discType = "Scalable Linear Recording"; + discSubType = "SLR2"; + + break; + case CommonTypes.MediaType.SLR3: + discType = "Scalable Linear Recording"; + discSubType = "SLR3"; + + break; + case CommonTypes.MediaType.SLR32: + discType = "Scalable Linear Recording"; + discSubType = "SLR32"; + + break; + case CommonTypes.MediaType.SLR32SL: + discType = "Scalable Linear Recording"; + discSubType = "SLR32 SL"; + + break; + case CommonTypes.MediaType.SLR4: + discType = "Scalable Linear Recording"; + discSubType = "SLR4"; + + break; + case CommonTypes.MediaType.SLR5: + discType = "Scalable Linear Recording"; + discSubType = "SLR5"; + + break; + case CommonTypes.MediaType.SLR5SL: + discType = "Scalable Linear Recording"; + discSubType = "SLR5 SL"; + + break; + case CommonTypes.MediaType.SLR6: + discType = "Scalable Linear Recording"; + discSubType = "SLR6"; + + break; + case CommonTypes.MediaType.SLRtape7: + discType = "Scalable Linear Recording"; + discSubType = "SLRtape7"; + + break; + case CommonTypes.MediaType.SLRtape7SL: + discType = "Scalable Linear Recording"; + discSubType = "SLRtape7 SL"; + + break; + case CommonTypes.MediaType.SLRtape24: + discType = "Scalable Linear Recording"; + discSubType = "SLRtape24"; + + break; + case CommonTypes.MediaType.SLRtape24SL: + discType = "Scalable Linear Recording"; + discSubType = "SLRtape24 SL"; + + break; + case CommonTypes.MediaType.SLRtape40: + discType = "Scalable Linear Recording"; + discSubType = "SLRtape40"; + + break; + case CommonTypes.MediaType.SLRtape50: + discType = "Scalable Linear Recording"; + discSubType = "SLRtape50"; + + break; + case CommonTypes.MediaType.SLRtape60: + discType = "Scalable Linear Recording"; + discSubType = "SLRtape60"; + + break; + case CommonTypes.MediaType.SLRtape75: + discType = "Scalable Linear Recording"; + discSubType = "SLRtape75"; + + break; + case CommonTypes.MediaType.SLRtape100: + discType = "Scalable Linear Recording"; + discSubType = "SLRtape100"; + + break; + case CommonTypes.MediaType.SLRtape140: + discType = "Scalable Linear Recording"; + discSubType = "SLRtape140"; + + break; + case CommonTypes.MediaType.QIC11: + discType = "Quarter-inch cartridge"; + discSubType = "QIC-11"; + + break; + case CommonTypes.MediaType.QIC24: + discType = "Quarter-inch cartridge"; + discSubType = "QIC-24"; + + break; + case CommonTypes.MediaType.QIC40: + discType = "Quarter-inch mini cartridge"; + discSubType = "QIC-40"; + + break; + case CommonTypes.MediaType.QIC80: + discType = "Quarter-inch mini cartridge"; + discSubType = "QIC-80"; + + break; + case CommonTypes.MediaType.QIC120: + discType = "Quarter-inch cartridge"; + discSubType = "QIC-120"; + + break; + case CommonTypes.MediaType.QIC150: + discType = "Quarter-inch cartridge"; + discSubType = "QIC-150"; + + break; + case CommonTypes.MediaType.QIC320: + discType = "Quarter-inch cartridge"; + discSubType = "QIC-320"; + + break; + case CommonTypes.MediaType.QIC525: + discType = "Quarter-inch cartridge"; + discSubType = "QIC-525"; + + break; + case CommonTypes.MediaType.QIC1350: + discType = "Quarter-inch cartridge"; + discSubType = "QIC-1350"; + + break; + case CommonTypes.MediaType.QIC3010: + discType = "Quarter-inch cartridge"; + discSubType = "QIC-3010"; + + break; + case CommonTypes.MediaType.QIC3020: + discType = "Quarter-inch cartridge"; + discSubType = "QIC-3020"; + + break; + case CommonTypes.MediaType.QIC3080: + discType = "Quarter-inch cartridge"; + discSubType = "QIC-3080"; + + break; + case CommonTypes.MediaType.QIC3095: + discType = "Quarter-inch cartridge"; + discSubType = "QIC-3095"; + + break; + case CommonTypes.MediaType.Travan: + discType = "Travan"; + discSubType = "TR-1"; + + break; + case CommonTypes.MediaType.Travan1Ex: + discType = "Travan"; + discSubType = "TR-1 Ex"; + + break; + case CommonTypes.MediaType.Travan3: + discType = "Travan"; + discSubType = "TR-3"; + + break; + case CommonTypes.MediaType.Travan3Ex: + discType = "Travan"; + discSubType = "TR-3 Ex"; + + break; + case CommonTypes.MediaType.Travan4: + discType = "Travan"; + discSubType = "TR-4"; + + break; + case CommonTypes.MediaType.Travan5: + discType = "Travan"; + discSubType = "TR-5"; + + break; + case CommonTypes.MediaType.Travan7: + discType = "Travan"; + discSubType = "TR-7"; + + break; + case CommonTypes.MediaType.VXA1: + discType = "VXA"; + discSubType = "VXA-1"; + + break; + case CommonTypes.MediaType.VXA2: + discType = "VXA"; + discSubType = "VXA-2"; + + break; + case CommonTypes.MediaType.VXA3: + discType = "VXA"; + discSubType = "VXA-3"; + + break; + case CommonTypes.MediaType.ECMA_153: + case CommonTypes.MediaType.ECMA_153_512: + discType = "5.25\" magneto-optical"; + discSubType = "ECMA-153"; + + break; + case CommonTypes.MediaType.ECMA_189: + discType = "300mm magneto optical"; + discSubType = "ECMA-189"; + + break; + case CommonTypes.MediaType.ECMA_190: + discType = "300mm magneto optical"; + discSubType = "ECMA-190"; + + break; + case CommonTypes.MediaType.ECMA_195: + case CommonTypes.MediaType.ECMA_195_512: + discType = "5.25\" magneto-optical"; + discSubType = "ECMA-195"; + + break; + case CommonTypes.MediaType.ECMA_223: + case CommonTypes.MediaType.ECMA_223_512: + discType = "3.5\" magneto-optical"; + discSubType = "ECMA-223"; + + break; + case CommonTypes.MediaType.ECMA_238: + discType = "5.25\" magneto-optical"; + discSubType = "ECMA-238"; + + break; + case CommonTypes.MediaType.ECMA_239: + discType = "3.5\" magneto-optical"; + discSubType = "ECMA-239"; + + break; + case CommonTypes.MediaType.ECMA_280: + discType = "5.25\" magneto-optical"; + discSubType = "ECMA-280"; + + break; + case CommonTypes.MediaType.ECMA_317: + discType = "300mm magneto optical"; + discSubType = "ECMA-317"; + + break; + case CommonTypes.MediaType.ECMA_322: + case CommonTypes.MediaType.ECMA_322_512: + case CommonTypes.MediaType.ECMA_322_1k: + case CommonTypes.MediaType.ECMA_322_2k: + discType = "5.25\" magneto-optical"; + discSubType = "ECMA-322 / ISO 22092"; + + break; + case CommonTypes.MediaType.ISO_15286: + case CommonTypes.MediaType.ISO_15286_1024: + case CommonTypes.MediaType.ISO_15286_512: + discType = "5.25\" magneto-optical"; + discSubType = "ISO-15286"; + + break; + case CommonTypes.MediaType.ISO_14517: + case CommonTypes.MediaType.ISO_14517_512: + discType = "5.25\" magneto-optical"; + discSubType = "ISO-14517"; + + break; + case CommonTypes.MediaType.GigaMo: + discType = "3.5\" magneto-optical"; + discSubType = "GIGAMO"; + + break; + case CommonTypes.MediaType.GigaMo2: + discType = "3.5\" magneto-optical"; + discSubType = "2.3GB GIGAMO"; + + break; + case CommonTypes.MediaType.UnknownMO: + discType = "Magneto-optical"; + discSubType = "Unknown"; + + break; + case CommonTypes.MediaType.Floptical: + discType = "Floptical"; + discSubType = "Floptical"; + + break; + case CommonTypes.MediaType.HiFD: + discType = "HiFD"; + discSubType = "HiFD"; + + break; + case CommonTypes.MediaType.LS120: + discType = "SuperDisk"; + discSubType = "LS-120"; + + break; + case CommonTypes.MediaType.LS240: + discType = "SuperDisk"; + discSubType = "LS-240"; + + break; + case CommonTypes.MediaType.FD32MB: + discType = "3.5\" floppy"; + discSubType = "FD32MB"; + + break; + case CommonTypes.MediaType.UHD144: + discType = "UHD144"; + discSubType = "UHD144"; + + break; + case CommonTypes.MediaType.VCDHD: + discType = "VCDHD"; + discSubType = "VCDHD"; + + break; + case CommonTypes.MediaType.HuCard: + discType = "HuCard"; + discSubType = "HuCard"; + + break; + case CommonTypes.MediaType.CompactCassette: + discType = "Compact Cassette"; + discSubType = "Compact Cassette"; + + break; + case CommonTypes.MediaType.Dcas25: + discType = "Compact Cassette"; + discSubType = "D/CAS-25"; + + break; + case CommonTypes.MediaType.Dcas85: + discType = "Compact Cassette"; + discSubType = "D/CAS-85"; + + break; + case CommonTypes.MediaType.Dcas103: + discType = "Compact Cassette"; + discSubType = "D/CAS-103"; + + break; + case CommonTypes.MediaType.PCCardTypeI: + discType = "PCMCIA Card"; + discSubType = "PC-Card Type I"; + + break; + case CommonTypes.MediaType.PCCardTypeII: + discType = "PCMCIA Card"; + discSubType = "PC-Card Type II"; + + break; + case CommonTypes.MediaType.PCCardTypeIII: + discType = "PCMCIA Card"; + discSubType = "PC-Card Type III"; + + break; + case CommonTypes.MediaType.PCCardTypeIV: + discType = "PCMCIA Card"; + discSubType = "PC-Card Type IV"; + + break; + case CommonTypes.MediaType.ExpressCard34: + discType = "Express Card"; + discSubType = "Express Card (34mm)"; + + break; + case CommonTypes.MediaType.ExpressCard54: + discType = "Express Card"; + discSubType = "Express Card (54mm)"; + + break; + case CommonTypes.MediaType.FamicomGamePak: + discType = "Nintendo Famicom Game Pak"; + discSubType = "Nintendo Famicom Game Pak"; + + break; + case CommonTypes.MediaType.GameBoyAdvanceGamePak: + discType = "Nintendo Game Boy Advance Game Pak"; + discSubType = "Nintendo Game Boy Advance Game Pak"; + + break; + case CommonTypes.MediaType.GameBoyGamePak: + discType = "Nintendo Game Boy Game Pak"; + discSubType = "Nintendo Game Boy Game Pak"; + + break; + case CommonTypes.MediaType.N64DD: + discType = "Nintendo 64 Disk"; + discSubType = "Nintendo 64 Disk"; + + break; + case CommonTypes.MediaType.N64GamePak: + discType = "Nintendo 64 Game Pak"; + discSubType = "Nintendo 64 Game Pak"; + + break; + case CommonTypes.MediaType.NESGamePak: + discType = "Nintendo Entertainment System Game Pak"; + discSubType = "Nintendo Entertainment System Game Pak"; + + break; + case CommonTypes.MediaType.Nintendo3DSGameCard: + discType = "Nintendo 3DS Game Card"; + discSubType = "Nintendo 3DS Game Card"; + + break; + case CommonTypes.MediaType.NintendoDiskCard: + discType = "Nintendo Disk Card"; + discSubType = "Nintendo Disk Card"; + + break; + case CommonTypes.MediaType.NintendoDSGameCard: + discType = "Nintendo DS Game Card"; + discSubType = "Nintendo DS Game Card"; + + break; + case CommonTypes.MediaType.NintendoDSiGameCard: + discType = "Nintendo DSi Game Card"; + discSubType = "Nintendo DSi Game Card"; + + break; + case CommonTypes.MediaType.SNESGamePak: + discType = "Super Nintendo Game Pak"; + discSubType = "Super Nintendo Game Pak"; + + break; + case CommonTypes.MediaType.SNESGamePakUS: + discType = "Super Nintendo Game Pak (US)"; + discSubType = "Super Nintendo Game Pak (US)"; + + break; + case CommonTypes.MediaType.SwitchGameCard: + discType = "Nintendo Switch Game Card"; + discSubType = "Nintendo Switch Game Card"; + + break; + case CommonTypes.MediaType.IBM3470: + discType = "IBM 3470"; + discSubType = "IBM 3470"; + + break; + case CommonTypes.MediaType.IBM3480: + discType = "IBM 3480"; + discSubType = "IBM 3480"; + + break; + case CommonTypes.MediaType.IBM3490: + discType = "IBM 3490"; + discSubType = "IBM 3490"; + + break; + case CommonTypes.MediaType.IBM3490E: + discType = "IBM 3490E"; + discSubType = "IBM 3490E"; + + break; + case CommonTypes.MediaType.IBM3592: + discType = "IBM 3592"; + discSubType = "IBM 3592"; + + break; + case CommonTypes.MediaType.STK4480: + discType = "STK 4480"; + discSubType = "STK 4480"; + + break; + case CommonTypes.MediaType.STK4490: + discType = "STK 4490"; + discSubType = "STK 4490"; + + break; + case CommonTypes.MediaType.STK9490: + discType = "STK 9490"; + discSubType = "STK 9490"; + + break; + case CommonTypes.MediaType.T9840A: + discType = "STK T-9840"; + discSubType = "STK T-9840A"; + + break; + case CommonTypes.MediaType.T9840B: + discType = "STK T-9840"; + discSubType = "STK T-9840B"; + + break; + case CommonTypes.MediaType.T9840C: + discType = "STK T-9840"; + discSubType = "STK T-9840C"; + + break; + case CommonTypes.MediaType.T9840D: + discType = "STK T-9840"; + discSubType = "STK T-9840D"; + + break; + case CommonTypes.MediaType.T9940A: + discType = "STK T-9940"; + discSubType = "STK T-9940A"; + + break; + case CommonTypes.MediaType.T9940B: + discType = "STK T-9840"; + discSubType = "STK T-9840B"; + + break; + case CommonTypes.MediaType.T10000A: + discType = "STK T-10000"; + discSubType = "STK T-10000A"; + + break; + case CommonTypes.MediaType.T10000B: + discType = "STK T-10000"; + discSubType = "STK T-10000B"; + + break; + case CommonTypes.MediaType.T10000C: + discType = "STK T-10000"; + discSubType = "STK T-10000C"; + + break; + case CommonTypes.MediaType.T10000D: + discType = "STK T-10000"; + discSubType = "STK T-10000D"; + + break; + case CommonTypes.MediaType.DemiDiskette: + discType = "DemiDiskette"; + discSubType = "DemiDiskette"; + + break; + case CommonTypes.MediaType.QuickDisk: + discType = "QuickDisk"; + discSubType = "QuickDisk"; + + break; + case CommonTypes.MediaType.VideoFloppy: + discType = "VideoFloppy"; + discSubType = "VideoFloppy"; + + break; + case CommonTypes.MediaType.Wafer: + discType = "Wafer"; + discSubType = "Wafer"; + + break; + case CommonTypes.MediaType.ZXMicrodrive: + discType = "ZX Microdrive"; + discSubType = "ZX Microdrive"; + + break; + case CommonTypes.MediaType.BeeCard: + discType = "BeeCard"; + discSubType = "BeeCard"; + + break; + case CommonTypes.MediaType.Borsu: + discType = "Borsu"; + discSubType = "Borsu"; + + break; + case CommonTypes.MediaType.DataStore: + discType = "DataStore"; + discSubType = "DataStore"; + + break; + case CommonTypes.MediaType.DIR: + discType = "DIR"; + discSubType = "DIR"; + + break; + case CommonTypes.MediaType.DST: + discType = "DST"; + discSubType = "DST"; + + break; + case CommonTypes.MediaType.DTF: + discType = "DTF"; + discSubType = "DTF"; + + break; + case CommonTypes.MediaType.DTF2: + discType = "DTF2"; + discSubType = "DTF2"; + + break; + case CommonTypes.MediaType.Flextra3020: + discType = "Flextra"; + discSubType = "Flextra 3020"; + + break; + case CommonTypes.MediaType.Flextra3225: + discType = "Flextra"; + discSubType = "Flextra 3225"; + + break; + case CommonTypes.MediaType.HiTC1: + discType = "HiTC"; + discSubType = "HiTC1"; + + break; + case CommonTypes.MediaType.HiTC2: + discType = "HiTC"; + discSubType = "HiTC2"; + + break; + case CommonTypes.MediaType.LT1: + discType = "LT1"; + discSubType = "LT1"; + + break; + case CommonTypes.MediaType.MiniCard: + discType = "MiniCard"; + discSubType = "MiniCard"; + + break; + case CommonTypes.MediaType.Orb: + discType = "Orb"; + discSubType = "Orb"; + + break; + case CommonTypes.MediaType.Orb5: + discType = "Orb"; + discSubType = "Orb5"; + + break; + case CommonTypes.MediaType.SmartMedia: + discType = "SmartMedia"; + discSubType = "SmartMedia"; + + break; + case CommonTypes.MediaType.xD: + discType = "xD"; + discSubType = "xD"; + + break; + case CommonTypes.MediaType.XQD: + discType = "XQD"; + discSubType = "XQD"; + + break; + case CommonTypes.MediaType.DataPlay: + discType = "DataPlay"; + discSubType = "DataPlay"; + + break; + case CommonTypes.MediaType.PD650: + discType = "PD650"; + discSubType = "PD650"; + + break; + case CommonTypes.MediaType.PD650_WORM: + discType = "PD650"; + discSubType = "PD650 (WORM)"; + + break; + case CommonTypes.MediaType.RA60: + discType = "Hard Disk Drive"; + discSubType = "DEC RA-60"; + + break; + case CommonTypes.MediaType.RA80: + discType = "Hard Disk Drive"; + discSubType = "DEC RA-80"; + + break; + case CommonTypes.MediaType.RA81: + discType = "Hard Disk Drive"; + discSubType = "DEC RA-81"; + + break; + case CommonTypes.MediaType.RC25: + discType = "Hard Disk Drive"; + discSubType = "DEC RC-25"; + + break; + case CommonTypes.MediaType.RD31: + discType = "Hard Disk Drive"; + discSubType = "DEC RD-31"; + + break; + case CommonTypes.MediaType.RD32: + discType = "Hard Disk Drive"; + discSubType = "DEC RD-32"; + + break; + case CommonTypes.MediaType.RD51: + discType = "Hard Disk Drive"; + discSubType = "DEC RD-51"; + + break; + case CommonTypes.MediaType.RD52: + discType = "Hard Disk Drive"; + discSubType = "DEC RD-52"; + + break; + case CommonTypes.MediaType.RD53: + discType = "Hard Disk Drive"; + discSubType = "DEC RD-53"; + + break; + case CommonTypes.MediaType.RD54: + discType = "Hard Disk Drive"; + discSubType = "DEC RD-54"; + + break; + case CommonTypes.MediaType.RK06: + case CommonTypes.MediaType.RK06_18: + discType = "Hard Disk Drive"; + discSubType = "DEC RK-06"; + + break; + case CommonTypes.MediaType.RK07: + case CommonTypes.MediaType.RK07_18: + discType = "Hard Disk Drive"; + discSubType = "DEC RK-07"; + + break; + case CommonTypes.MediaType.RM02: + discType = "Hard Disk Drive"; + discSubType = "DEC RM-02"; + + break; + case CommonTypes.MediaType.RM03: + discType = "Hard Disk Drive"; + discSubType = "DEC RM-03"; + + break; + case CommonTypes.MediaType.RM05: + discType = "Hard Disk Drive"; + discSubType = "DEC RM-05"; + + break; + case CommonTypes.MediaType.RP02: + case CommonTypes.MediaType.RP02_18: + discType = "Hard Disk Drive"; + discSubType = "DEC RP-02"; + + break; + case CommonTypes.MediaType.RP03: + case CommonTypes.MediaType.RP03_18: + discType = "Hard Disk Drive"; + discSubType = "DEC RP-03"; + + break; + case CommonTypes.MediaType.RP04: + case CommonTypes.MediaType.RP04_18: + discType = "Hard Disk Drive"; + discSubType = "DEC RP-04"; + + break; + case CommonTypes.MediaType.RP05: + case CommonTypes.MediaType.RP05_18: + discType = "Hard Disk Drive"; + discSubType = "DEC RP-05"; + + break; + case CommonTypes.MediaType.RP06: + case CommonTypes.MediaType.RP06_18: + discType = "Hard Disk Drive"; + discSubType = "DEC RP-06"; + + break; + case CommonTypes.MediaType.RDX: + discType = "RDX"; + discSubType = "RDX"; + + break; + case CommonTypes.MediaType.RDX320: + discType = "RDX"; + discSubType = "RDX 320"; + + break; + case CommonTypes.MediaType.Zone_HDD: + discType = "Zoned Hard Disk Drive"; + discSubType = "Unknown"; + + break; + case CommonTypes.MediaType.Microdrive: + discType = "Hard Disk Drive"; + discSubType = "Microdrive"; + + break; + case CommonTypes.MediaType.VideoNow: + discType = "VideoNow"; + discSubType = "VideoNow"; + + break; + case CommonTypes.MediaType.VideoNowColor: + discType = "VideoNow"; + discSubType = "VideoNow Color"; + + break; + case CommonTypes.MediaType.VideoNowXp: + discType = "VideoNow"; + discSubType = "VideoNow XP"; + + break; + case CommonTypes.MediaType.KodakVerbatim3: + discType = "Kodak Verbatim"; + discSubType = "Kodak Verbatim (3 Mb)"; + + break; + case CommonTypes.MediaType.KodakVerbatim6: + discType = "Kodak Verbatim"; + discSubType = "Kodak Verbatim (6 Mb)"; + + break; + case CommonTypes.MediaType.KodakVerbatim12: + discType = "Kodak Verbatim"; + discSubType = "Kodak Verbatim (12 Mb)"; + + break; + case CommonTypes.MediaType.ProfessionalDisc: + discType = "Sony Professional Disc"; + discSubType = "Sony Professional Disc (single layer)"; + + break; + case CommonTypes.MediaType.ProfessionalDiscDual: + discType = "Sony Professional Disc"; + discSubType = "Sony Professional Disc (double layer)"; + + break; + case CommonTypes.MediaType.ProfessionalDiscTriple: + discType = "Sony Professional Disc"; + discSubType = "Sony Professional Disc (triple layer)"; + + break; + case CommonTypes.MediaType.ProfessionalDiscQuad: + discType = "Sony Professional Disc"; + discSubType = "Sony Professional Disc (quad layer)"; + + break; + case CommonTypes.MediaType.PDD: + discType = "Sony Professional Disc for DATA"; + discSubType = "Sony Professional Disc for DATA"; + + break; + case CommonTypes.MediaType.PDD_WORM: + discType = "Sony Professional Disc for DATA"; + discSubType = "Sony Professional Disc for DATA (write-once)"; + + break; + case CommonTypes.MediaType.ArchivalDisc: + discType = "Archival Disc"; + discSubType = "Archival Disc"; + + break; + case CommonTypes.MediaType.ArchivalDisc2: + discType = "Archival Disc"; + discSubType = "Archival Disc (2nd generation)"; + + break; + case CommonTypes.MediaType.ArchivalDisc3: + discType = "Archival Disc"; + discSubType = "Archival Disc (3rd generation)"; + + break; + case CommonTypes.MediaType.ODC300R: + discType = "Optical Disc Archive"; + discSubType = "ODC300R"; + + break; + case CommonTypes.MediaType.ODC300RE: + discType = "Optical Disc Archive"; + discSubType = "ODC300RE"; + + break; + case CommonTypes.MediaType.ODC600R: + discType = "Optical Disc Archive"; + discSubType = "ODC600R"; + + break; + case CommonTypes.MediaType.ODC600RE: + discType = "Optical Disc Archive"; + discSubType = "ODC600RE"; + + break; + case CommonTypes.MediaType.ODC1200RE: + discType = "Optical Disc Archive"; + discSubType = "ODC1200RE"; + + break; + case CommonTypes.MediaType.ODC1500R: + discType = "Optical Disc Archive"; + discSubType = "ODC1500R"; + + break; + case CommonTypes.MediaType.ODC3300R: + discType = "Optical Disc Archive"; + discSubType = "ODC3300R"; + + break; + case CommonTypes.MediaType.ODC5500R: + discType = "Optical Disc Archive"; + discSubType = "ODC5500R"; + + break; + default: + discType = "Unknown"; + discSubType = "Unknown"; + + break; + } + + return (discType, discSubType); + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Metadata/Resume.cs b/Aaru.CommonTypes/Metadata/Resume.cs new file mode 100644 index 0000000..6daab87 --- /dev/null +++ b/Aaru.CommonTypes/Metadata/Resume.cs @@ -0,0 +1,80 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Resume.cs +// Author(s) : Natalia Portillo +// +// Component : XML metadata. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines XML format of a dump resume file. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using Schemas; + +namespace Aaru.CommonTypes.Metadata +{ + /// Information that allows to resume a dump + [Serializable, XmlRoot("DicResume", Namespace = "", IsNullable = false)] + public class Resume + { + /// List of blocks that returned an error on reading + [XmlArrayItem("Block")] + public List BadBlocks; + /// Date/time this resume file was created + [XmlElement(DataType = "dateTime")] + public DateTime CreationDate; + /// Last block on media + public ulong LastBlock; + /// Date/time this resume file was last written to + [XmlElement(DataType = "dateTime")] + public DateTime LastWriteDate; + /// Next block to read + public ulong NextBlock; + /// Is media removable? + public bool Removable; + /// Is media a tape? + public bool Tape; + /// List of CD subchannels that did not read correctly + [XmlArrayItem("Block")] + public List BadSubchannels; + /// Extents of BLANK sectors for magneto-opticals + [XmlArrayItem("Extent")] + public ExtentType[] BlankExtents; + /// Title keys that has not been read + [XmlArrayItem("Block")] + public List MissingTitleKeys; + /// List of dump tries + [XmlArrayItem("DumpTry")] + public List Tries; + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Metadata/Statistics.cs b/Aaru.CommonTypes/Metadata/Statistics.cs new file mode 100644 index 0000000..cb49920 --- /dev/null +++ b/Aaru.CommonTypes/Metadata/Statistics.cs @@ -0,0 +1,309 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Statistics.cs +// Author(s) : Natalia Portillo +// +// Component : XML metadata. +// +// --[ Description ] ---------------------------------------------------------- +// +// Define XML for statistics. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Xml.Serialization; + +// ReSharper disable ClassNeverInstantiated.Global +// ReSharper disable UnusedMember.Global + +namespace Aaru.CommonTypes.Metadata +{ + /// Statistics + [XmlRoot("DicStats", Namespace = "", IsNullable = false)] + public class Stats + { + /// Executed commands + public CommandsStats Commands; + /// Operating systems Aaru has run from + [XmlArrayItem("OperatingSystem")] + public List OperatingSystems { get; set; } + /// Aaru versions + [XmlArrayItem("Version")] + public List Versions { get; set; } + /// Detected filesystems + [XmlArrayItem("Filesystem")] + public List Filesystems { get; set; } + /// Detected partitioning schemes + [XmlArrayItem("Scheme")] + public List Partitions { get; set; } + /// Media image formats + [XmlArrayItem("Format")] + public List MediaImages { get; set; } + /// Used filters + [XmlArrayItem("Filter", IsNullable = true)] + public List Filters { get; set; } + /// Found devices + [XmlArrayItem("Device", IsNullable = true)] + public List Devices { get; set; } + /// Found media types, real, and in image + [XmlArrayItem("Media")] + public List Medias { get; set; } + /// Benchmark statistics + public BenchmarkStats Benchmark { get; set; } + /// Media scanning statistics + public MediaScanStats MediaScan { get; set; } + /// Image verification statistics + public VerifyStats Verify { get; set; } + } + + /// DTO for statistics + [SuppressMessage("ReSharper", "CollectionNeverQueried.Global")] + public class StatsDto + { + /// Executed commands + public List Commands { get; set; } + /// Operating systems Aaru has run from + public List OperatingSystems { get; set; } + /// Aaru versions + public List Versions { get; set; } + /// Detected filesystems + public List Filesystems { get; set; } + /// Detected partitioning schemes + public List Partitions { get; set; } + /// Media image formats + public List MediaFormats { get; set; } + /// Used filters + public List Filters { get; set; } + /// Found devices + public List Devices { get; set; } + /// Found media types, real, and in image + public List Medias { get; set; } + /// Remote applications + public List RemoteApplications { get; set; } + /// Remote application architectures + public List RemoteArchitectures { get; set; } + /// Operating systems where a remote application has been running + public List RemoteOperatingSystems { get; set; } + } + + /// Command execution statistics + [SuppressMessage("ReSharper", "UnassignedField.Global")] + public class CommandsStats + { + /// Number of times the filesystem info command has been used + public long Analyze; + /// Number of times the benchmark command has been used + public long Benchmark; + /// Number of times the image checksum command has been used + public long Checksum; + /// Number of times the image compare command has been used + public long Compare; + /// Number of times the image convert command has been used + public long ConvertImage; + /// Number of times the image create-sidecar command has been used + public long CreateSidecar; + /// Number of times the image decode command has been used + public long Decode; + /// Number of times the device info command has been used + public long DeviceInfo; + /// Number of times the device report command has been used + public long DeviceReport; + /// Number of times the media dump command has been used + public long DumpMedia; + /// Number of times the image entropy command has been used + public long Entropy; + /// Number of times the filesystem extract command has been used + public long ExtractFiles; + /// Number of times the list formats command has been used + public long Formats; + /// Number of times the image info command has been used + public long ImageInfo; + /// Number of times the device list command has been used + public long ListDevices; + /// Number of times the list encodings command has been used + public long ListEncodings; + /// Number of times the filesystem ls command has been used + public long Ls; + /// Number of times the media info command has been used + public long MediaInfo; + /// Number of times the media scan command has been used + public long MediaScan; + /// Number of times the image printhex command has been used + public long PrintHex; + /// Number of times the image verify command has been used + public long Verify; + } + + /// Statistics of verified media + public class VerifiedItems + { + /// Number of correct images + public long Correct; + /// Number of failed images + public long Failed; + } + + /// Verification statistics + public class VerifyStats + { + /// Image verification statistics + public VerifiedItems MediaImages; + /// Image contents verification statistics + public ScannedSectors Sectors; + } + + /// Image contents verification statistics + public class ScannedSectors + { + /// Sectors found to be correct + public long Correct; + /// Sectors found to be incorrect + public long Error; + /// Total number of verified sectors + public long Total; + /// Total number of sectors that could not be verified + public long Unverifiable; + } + + /// Media scanning time statistics + [SuppressMessage("ReSharper", "InconsistentNaming")] + public class TimeStats + { + /// Number of sectors that took more than 3ms but less than 100ms to read + public long LessThan10ms; + /// Number of sectors that took more than 50ms but less than 150ms to read + public long LessThan150ms; + /// Number of sectors that took less than 3ms to read + public long LessThan3ms; + /// Number of sectors that took more than 150ms but less than 500ms to read + public long LessThan500ms; + /// Number of sectors that took more than 10ms but less than 50ms to read + public long LessThan50ms; + /// Number of sectors that took more than 500ms to read + public long MoreThan500ms; + } + + /// Media scanning statistics + public class MediaScanStats + { + /// Statistics of scanned sectors + public ScannedSectors Sectors; + /// Scan time statistics + public TimeStats Times; + } + + /// Checksum type statistics + [SuppressMessage("ReSharper", "InconsistentNaming")] + public class ChecksumStats + { + /// Checksum algorithm + [XmlAttribute] + public string algorithm; + /// Time taken to execute algorithm + [XmlText] + public double Value; + } + + /// Benchmark statistics + public class BenchmarkStats + { + /// Total time taken to run the checksum algorithms in parallel + public double All; + /// List of time taken by each checksum algorithm + [XmlElement("Checksum")] + public List Checksum; + /// Time taken to benchmark entropy calculation + public double Entropy; + /// Maximum amount of memory used while running the benchmark + public long MaxMemory; + /// Minimum amount of memory used while running the benchmark + public long MinMemory; + /// Total time taken to run the checksum algorithms sequentially + public double Sequential; + } + + /// Media statistics + [SuppressMessage("ReSharper", "InconsistentNaming")] + public class MediaStats + { + /// Found in a real device? + [XmlAttribute] + public bool real; + /// Media type + [XmlAttribute] + public string type; + /// Number of times it has been found + [XmlText] + public long Value; + } + + /// Device statistics + public class DeviceStats + { + /// Is manufacturer null? + [XmlIgnore] + public bool ManufacturerSpecified; + /// Manufacturer string + public string Manufacturer { get; set; } + /// Model string + public string Model { get; set; } + /// Revision or firmware version + public string Revision { get; set; } + /// Bus the device was attached to + public string Bus { get; set; } + } + + /// Name=value pair statistics + [SuppressMessage("ReSharper", "InconsistentNaming")] + public class NameValueStats + { + /// Name + [XmlAttribute] + public string name { get; set; } + /// Number of times it has been used/found + [XmlText] + public long Value { get; set; } + } + + /// Operating system statistics + [SuppressMessage("ReSharper", "InconsistentNaming")] + public class OsStats + { + /// Operating system name + [XmlAttribute] + public string name { get; set; } + /// Operating system version + [XmlAttribute] + public string version { get; set; } + /// Number of times Aaru run on it + [XmlText] + public long Value { get; set; } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Metadata/Version.cs b/Aaru.CommonTypes/Metadata/Version.cs new file mode 100644 index 0000000..0175d4b --- /dev/null +++ b/Aaru.CommonTypes/Metadata/Version.cs @@ -0,0 +1,56 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Statistics.cs +// Author(s) : Natalia Portillo +// +// Component : XML metadata. +// +// --[ Description ] ---------------------------------------------------------- +// +// Returns Aaru version in XML software type format. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using Aaru.CommonTypes.Interop; +using Schemas; + +namespace Aaru.CommonTypes.Metadata +{ + /// Manages Aaru's version for metadata + public static class Version + { + /// Gets XML software type for the running version + /// XML software type + public static SoftwareType GetSoftwareType() => new SoftwareType + { + Name = "Aaru", + OperatingSystem = DetectOS.GetRealPlatformID().ToString(), + Version = typeof(Version).Assembly.GetName().Version?.ToString() + }; + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Partition.cs b/Aaru.CommonTypes/Partition.cs new file mode 100644 index 0000000..d626b5d --- /dev/null +++ b/Aaru.CommonTypes/Partition.cs @@ -0,0 +1,119 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Partition.cs +// Author(s) : Natalia Portillo +// +// Component : Aaru common types. +// +// --[ Description ] ---------------------------------------------------------- +// +// Contains common partition types. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; + +namespace Aaru.CommonTypes +{ + /// Partition structure. + public struct Partition : IEquatable, IComparable + { + /// Partition number, 0-started + public ulong Sequence; + /// Partition type + public string Type; + /// Partition name (if the scheme supports it) + public string Name; + /// Start of the partition, in bytes + public ulong Offset; + /// LBA of partition start + public ulong Start; + /// Length in bytes of the partition + public ulong Size; + /// Length in sectors of the partition + public ulong Length; + /// Information that does not find space in this struct + public string Description; + /// LBA of last partition sector + public readonly ulong End => Start + Length - 1; + /// Name of partition scheme that contains this partition + public string Scheme; + + /// + /// Compares two partitions + /// Partition to compare with + /// 0 if both partitions start and end at the same sector + public bool Equals(Partition other) => Start == other.Start && Length == other.Length; + + /// + public override bool Equals(object obj) => obj is Partition partition && Equals(partition); + + /// + + // ReSharper disable once NonReadonlyMemberInGetHashCode + public override int GetHashCode() => Start.GetHashCode() + End.GetHashCode(); + + /// + /// Compares this partition with another and returns an integer that indicates whether the current partition + /// precedes, follows, or is in the same place as the other partition. + /// + /// Partition to compare with + /// A value that indicates the relative equality of the partitions being compared. + /// + public int CompareTo(Partition other) + { + if(Start == other.Start && + End == other.End) + return 0; + + if(Start > other.Start || + End > other.End) + return 1; + + return -1; + } + + // Define the equality operator. + public static bool operator ==(Partition operand1, Partition operand2) => operand1.Equals(operand2); + + // Define the inequality operator. + public static bool operator !=(Partition operand1, Partition operand2) => !operand1.Equals(operand2); + + // Define the is greater than operator. + public static bool operator >(Partition operand1, Partition operand2) => operand1.CompareTo(operand2) == 1; + + // Define the is less than operator. + public static bool operator <(Partition operand1, Partition operand2) => operand1.CompareTo(operand2) == -1; + + // Define the is greater than or equal to operator. + public static bool operator >=(Partition operand1, Partition operand2) => operand1.CompareTo(operand2) >= 0; + + // Define the is less than or equal to operator. + public static bool operator <=(Partition operand1, Partition operand2) => operand1.CompareTo(operand2) <= 0; + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/PluginBase.cs b/Aaru.CommonTypes/PluginBase.cs new file mode 100644 index 0000000..2929db5 --- /dev/null +++ b/Aaru.CommonTypes/PluginBase.cs @@ -0,0 +1,149 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : PluginBase.cs +// Author(s) : Natalia Portillo +// +// Component : Core algorithms. +// +// --[ Description ] ---------------------------------------------------------- +// +// Class to hold all installed plugins. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Linq; +using Aaru.CommonTypes.Interfaces; + +namespace Aaru.CommonTypes +{ + /// Contain all plugins (filesystem, partition and image) + public class PluginBase + { + /// List of all archive formats + public readonly SortedDictionary Archives; + /// List of checksum plugins + public readonly List Checksums; + /// List of filter plugins + public readonly SortedDictionary Filters; + /// List of floppy image plugins + public readonly SortedDictionary FloppyImages; + /// List of all media image plugins + public readonly SortedDictionary ImagePluginsList; + /// List of all partition plugins + public readonly SortedDictionary PartPluginsList; + /// List of all filesystem plugins + public readonly SortedDictionary PluginsList; + /// List of read-only filesystem plugins + public readonly SortedDictionary ReadOnlyFilesystems; + /// List of writable floppy image plugins + public readonly SortedDictionary WritableFloppyImages; + /// List of writable media image plugins + public readonly SortedDictionary WritableImages; + + /// Initializes the plugins lists + public PluginBase() + { + PluginsList = new SortedDictionary(); + ReadOnlyFilesystems = new SortedDictionary(); + PartPluginsList = new SortedDictionary(); + ImagePluginsList = new SortedDictionary(); + WritableImages = new SortedDictionary(); + Checksums = new List(); + Filters = new SortedDictionary(); + FloppyImages = new SortedDictionary(); + WritableFloppyImages = new SortedDictionary(); + Archives = new SortedDictionary(); + } + + /// Adds plugins to the central plugin register + /// Plugin register + public void AddPlugins(IPluginRegister pluginRegister) + { + foreach(Type type in pluginRegister.GetAllChecksumPlugins() ?? Enumerable.Empty()) + if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] + {}) is IChecksum plugin) + Checksums.Add(plugin); + + foreach(Type type in pluginRegister.GetAllFilesystemPlugins() ?? Enumerable.Empty()) + if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] + {}) is IFilesystem plugin && + !PluginsList.ContainsKey(plugin.Name.ToLower())) + PluginsList.Add(plugin.Name.ToLower(), plugin); + + foreach(Type type in pluginRegister.GetAllFilterPlugins() ?? Enumerable.Empty()) + if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] + {}) is IFilter plugin && + !Filters.ContainsKey(plugin.Name.ToLower())) + Filters.Add(plugin.Name.ToLower(), plugin); + + foreach(Type type in pluginRegister.GetAllFloppyImagePlugins() ?? Enumerable.Empty()) + if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] + {}) is IFloppyImage plugin && + !FloppyImages.ContainsKey(plugin.Name.ToLower())) + FloppyImages.Add(plugin.Name.ToLower(), plugin); + + foreach(Type type in pluginRegister.GetAllMediaImagePlugins() ?? Enumerable.Empty()) + if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] + {}) is IMediaImage plugin && + !ImagePluginsList.ContainsKey(plugin.Name.ToLower())) + ImagePluginsList.Add(plugin.Name.ToLower(), plugin); + + foreach(Type type in pluginRegister.GetAllPartitionPlugins() ?? Enumerable.Empty()) + if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] + {}) is IPartition plugin && + !PartPluginsList.ContainsKey(plugin.Name.ToLower())) + PartPluginsList.Add(plugin.Name.ToLower(), plugin); + + foreach(Type type in pluginRegister.GetAllReadOnlyFilesystemPlugins() ?? Enumerable.Empty()) + if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] + {}) is IReadOnlyFilesystem plugin && + !ReadOnlyFilesystems.ContainsKey(plugin.Name.ToLower())) + ReadOnlyFilesystems.Add(plugin.Name.ToLower(), plugin); + + foreach(Type type in pluginRegister.GetAllWritableFloppyImagePlugins() ?? Enumerable.Empty()) + if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] + {}) is IWritableFloppyImage plugin && + !WritableFloppyImages.ContainsKey(plugin.Name.ToLower())) + WritableFloppyImages.Add(plugin.Name.ToLower(), plugin); + + foreach(Type type in pluginRegister.GetAllWritableImagePlugins() ?? Enumerable.Empty()) + if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] + {}) is IWritableImage plugin && + !WritableImages.ContainsKey(plugin.Name.ToLower())) + WritableImages.Add(plugin.Name.ToLower(), plugin); + + foreach(Type type in pluginRegister.GetAllArchivePlugins() ?? Enumerable.Empty()) + if(type.GetConstructor(Type.EmptyTypes)?.Invoke(new object[] + {}) is IArchive plugin && + !Archives.ContainsKey(plugin.Name.ToLower())) + Archives.Add(plugin.Name.ToLower(), plugin); + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Structs/Devices/ATA/Identify.cs b/Aaru.CommonTypes/Structs/Devices/ATA/Identify.cs new file mode 100644 index 0000000..1422212 --- /dev/null +++ b/Aaru.CommonTypes/Structs/Devices/ATA/Identify.cs @@ -0,0 +1,1127 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Identify.cs +// Author(s) : Natalia Portillo +// +// Component : Common structures for ATA devices. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines a high level interpretation of the ATA IDENTIFY response. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; +using System.Text; +using Aaru.Console; +using Aaru.Helpers; +using Marshal = Aaru.Helpers.Marshal; + +// ReSharper disable UnusedMember.Global + +namespace Aaru.CommonTypes.Structs.Devices.ATA +{ + /// + /// Information from following standards: T10-791D rev. 4c (ATA) T10-948D rev. 4c (ATA-2) T13-1153D rev. 18 + /// (ATA/ATAPI-4) T13-1321D rev. 3 (ATA/ATAPI-5) T13-1410D rev. 3b (ATA/ATAPI-6) T13-1532D rev. 4b (ATA/ATAPI-7) + /// T13-1699D rev. 3f (ATA8-ACS) T13-1699D rev. 4a (ATA8-ACS) T13-2015D rev. 2 (ACS-2) T13-2161D rev. 5 (ACS-3) CF+ + /// & CF Specification rev. 1.4 (CFA) + /// + [SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"), + SuppressMessage("ReSharper", "MemberCanBePrivate.Global")] + public static class Identify + { + /// Capabilities flag bits. + [Flags] + public enum CapabilitiesBit : ushort + { + /// ATAPI: Interleaved DMA supported + InterleavedDMA = 0x8000, + /// ATAPI: Command queueing supported + CommandQueue = 0x4000, + /// Standby timer values are standard + StandardStandbyTimer = 0x2000, + /// ATAPI: Overlap operation supported + OverlapOperation = 0x2000, + /// ATAPI: ATA software reset required Obsoleted in ATA/ATAPI-4 + RequiresATASoftReset = 0x1000, + /// IORDY is supported + IORDY = 0x0800, + /// IORDY can be disabled + CanDisableIORDY = 0x0400, + /// LBA is supported + LBASupport = 0x0200, + /// DMA is supported + DMASupport = 0x0100, + /// Vendor unique Obsoleted in ATA/ATAPI-4 + VendorBit7 = 0x0080, + /// Vendor unique Obsoleted in ATA/ATAPI-4 + VendorBit6 = 0x0040, + /// Vendor unique Obsoleted in ATA/ATAPI-4 + VendorBit5 = 0x0020, + /// Vendor unique Obsoleted in ATA/ATAPI-4 + VendorBit4 = 0x0010, + /// Vendor unique Obsoleted in ATA/ATAPI-4 + VendorBit3 = 0x0008, + /// Vendor unique Obsoleted in ATA/ATAPI-4 + VendorBit2 = 0x0004, + /// Long Physical Alignment setting bit 1 + PhysicalAlignment1 = 0x0002, + /// Long Physical Alignment setting bit 0 + PhysicalAlignment0 = 0x0001 + } + + /// More capabilities flag bits. + [Flags] + public enum CapabilitiesBit2 : ushort + { + /// MUST NOT be set + MustBeClear = 0x8000, + /// MUST be set + MustBeSet = 0x4000, + #pragma warning disable 1591 + Reserved13 = 0x2000, Reserved12 = 0x1000, Reserved11 = 0x0800, + Reserved10 = 0x0400, Reserved09 = 0x0200, Reserved08 = 0x0100, + Reserved07 = 0x0080, Reserved06 = 0x0040, Reserved05 = 0x0020, + Reserved04 = 0x0010, Reserved03 = 0x0008, Reserved02 = 0x0004, + Reserved01 = 0x0002, + #pragma warning restore 1591 + /// Indicates a device specific minimum standby timer value + SpecificStandbyTimer = 0x0001 + } + + /// Even more capabilities flag bits. + [Flags] + public enum CapabilitiesBit3 : byte + { + /// BLOCK ERASE EXT supported + BlockErase = 0x0080, + /// OVERWRITE EXT supported + Overwrite = 0x0040, + /// CRYPTO SCRAMBLE EXT supported + CryptoScramble = 0x0020, + /// Sanitize feature set is supported + Sanitize = 0x0010, + /// If unset, sanitize commands are specified by ACS-2 + SanitizeCommands = 0x0008, + /// SANITIZE ANTIFREEZE LOCK EXT is supported + SanitizeAntifreeze = 0x0004, + #pragma warning disable 1591 + Reserved01 = 0x0002, + #pragma warning restore 1591 + /// Multiple logical sector setting is valid + MultipleValid = 0x0001 + } + + /// Command set flag bits. + [Flags] + public enum CommandSetBit : ushort + { + /// Already obsolete in ATA/ATAPI-4, reserved in ATA3 + Obsolete15 = 0x8000, + /// NOP is supported + Nop = 0x4000, + /// READ BUFFER is supported + ReadBuffer = 0x2000, + /// WRITE BUFFER is supported + WriteBuffer = 0x1000, + /// Already obsolete in ATA/ATAPI-4, reserved in ATA3 + Obsolete11 = 0x0800, + /// Host Protected Area is supported + HPA = 0x0400, + /// DEVICE RESET is supported + DeviceReset = 0x0200, + /// SERVICE interrupt is supported + Service = 0x0100, + /// Release is supported + Release = 0x0080, + /// Look-ahead is supported + LookAhead = 0x0040, + /// Write cache is supported + WriteCache = 0x0020, + /// PACKET command set is supported + Packet = 0x0010, + /// Power Management feature set is supported + PowerManagement = 0x0008, + /// Removable Media feature set is supported + RemovableMedia = 0x0004, + /// Security Mode feature set is supported + SecurityMode = 0x0002, + /// SMART feature set is supported + SMART = 0x0001 + } + + /// More command set flag bits. + [Flags] + public enum CommandSetBit2 : ushort + { + /// MUST NOT be set + MustBeClear = 0x8000, + /// MUST BE SET + MustBeSet = 0x4000, + /// FLUSH CACHE EXT supported + FlushCacheExt = 0x2000, + /// FLUSH CACHE supported + FlushCache = 0x1000, + /// Device Configuration Overlay feature set supported + DCO = 0x0800, + /// 48-bit LBA supported + LBA48 = 0x0400, + /// Automatic Acoustic Management supported + AAM = 0x0200, + /// SET MAX security extension supported + SetMax = 0x0100, + /// Address Offset Reserved Area Boot NCITS TR27:2001 + AddressOffsetReservedAreaBoot = 0x0080, + /// SET FEATURES required to spin-up + SetFeaturesRequired = 0x0040, + /// Power-Up in standby feature set supported + PowerUpInStandby = 0x0020, + /// Removable Media Status Notification feature set is supported + RemovableNotification = 0x0010, + /// Advanced Power Management feature set is supported + APM = 0x0008, + /// Compact Flash feature set is supported + CompactFlash = 0x0004, + /// READ DMA QUEUED and WRITE DMA QUEUED are supported + RWQueuedDMA = 0x0002, + /// DOWNLOAD MICROCODE is supported + DownloadMicrocode = 0x0001 + } + + /// Even more command set flag bits. + [Flags] + public enum CommandSetBit3 : ushort + { + /// MUST NOT be set + MustBeClear = 0x8000, + /// MUST BE SET + MustBeSet = 0x4000, + /// IDLE IMMEDIATE with UNLOAD FEATURE is supported + IdleImmediate = 0x2000, + /// Reserved for INCITS TR-37/2004 + Reserved12 = 0x1000, + /// Reserved for INCITS TR-37/2004 + Reserved11 = 0x0800, + /// URG bit is supported in WRITE STREAM DMA EXT and WRITE STREAM EXT + WriteURG = 0x0400, + /// URG bit is supported in READ STREAM DMA EXT and READ STREAM EXT + ReadURG = 0x0200, + /// 64-bit World Wide Name is supported + WWN = 0x0100, + /// WRITE DMA QUEUED FUA EXT is supported + FUAWriteQ = 0x0080, + /// WRITE DMA FUA EXT and WRITE MULTIPLE FUA EXT are supported + FUAWrite = 0x0040, + /// General Purpose Logging feature supported + GPL = 0x0020, + /// Streaming feature set is supported + Streaming = 0x0010, + /// Media Card Pass Through command set supported + MCPT = 0x0008, + /// Media serial number supported + MediaSerial = 0x0004, + /// SMART self-test supported + SMARTSelfTest = 0x0002, + /// SMART error logging supported + SMARTLog = 0x0001 + } + + /// Yet more command set flag bits. + [Flags] + public enum CommandSetBit4 : ushort + { + /// MUST NOT be set + MustBeClear = 0x8000, + /// MUST be set + MustBeSet = 0x4000, + #pragma warning disable 1591 + Reserved13 = 0x2000, Reserved12 = 0x1000, Reserved11 = 0x0800, + Reserved10 = 0x0400, + #pragma warning restore 1591 + /// DSN feature set is supported + DSN = 0x0200, + /// Accessible Max Address Configuration is supported + AMAC = 0x0100, + /// Extended Power Conditions is supported + ExtPowerCond = 0x0080, + /// Extended Status Reporting is supported + ExtStatusReport = 0x0040, + /// Free-fall Control feature set is supported + FreeFallControl = 0x0020, + /// Supports segmented feature in DOWNLOAD MICROCODE + SegmentedDownloadMicrocode = 0x0010, + /// READ/WRITE DMA EXT GPL are supported + RWDMAExtGpl = 0x0008, + /// WRITE UNCORRECTABLE is supported + WriteUnc = 0x0004, + /// Write/Read/Verify is supported + WRV = 0x0002, + /// Reserved for DT1825 + DT1825 = 0x0001 + } + + /// Yet again more command set flag bits. + [Flags] + public enum CommandSetBit5 : ushort + { + /// Supports CFast Specification + CFast = 0x8000, + /// Deterministic read after TRIM is supported + DeterministicTrim = 0x4000, + /// Long physical sector alignment error reporting control is supported + LongPhysSectorAligError = 0x2000, + /// DEVICE CONFIGURATION IDENTIFY DMA and DEVICE CONFIGURATION SET DMA are supported + DeviceConfDMA = 0x1000, + /// READ BUFFER DMA is supported + ReadBufferDMA = 0x0800, + /// WRITE BUFFER DMA is supported + WriteBufferDMA = 0x0400, + /// SET PASSWORD DMA and SET UNLOCK DMA are supported + SetMaxDMA = 0x0200, + /// DOWNLOAD MICROCODE DMA is supported + DownloadMicroCodeDMA = 0x0100, + /// Reserved for IEEE-1667 + IEEE1667 = 0x0080, + /// Optional ATA 28-bit commands are supported + Ata28 = 0x0040, + /// Read zero after TRIM is supported + ReadZeroTrim = 0x0020, + /// Device encrypts all user data + Encrypted = 0x0010, + /// Extended number of user addressable sectors is supported + ExtSectors = 0x0008, + /// All write cache is non-volatile + AllCacheNV = 0x0004, + /// Zoned capabilities bit 1 + ZonedBit1 = 0x0002, + /// Zoned capabilities bit 0 + ZonedBit0 = 0x0001 + } + + /// Data set management flag bits. + [Flags] + public enum DataSetMgmtBit : ushort + { + #pragma warning disable 1591 + Reserved15 = 0x8000, Reserved14 = 0x4000, Reserved13 = 0x2000, + Reserved12 = 0x1000, Reserved11 = 0x0800, Reserved10 = 0x0400, + Reserved09 = 0x0200, Reserved08 = 0x0100, Reserved07 = 0x0080, + Reserved06 = 0x0040, Reserved05 = 0x0020, Reserved04 = 0x0010, + Reserved03 = 0x0008, Reserved02 = 0x0004, Reserved01 = 0x0002, + #pragma warning restore 1591 + /// TRIM is supported + Trim = 0x0001 + } + + /// Device form factor + public enum DeviceFormFactorEnum : ushort + { + /// Size not reported + NotReported = 0, + /// 5.25" + FiveAndQuarter = 1, + /// 3.5" + ThreeAndHalf = 2, + /// 2.5" + TwoAndHalf = 3, + /// 1.8" + OnePointEight = 4, + /// Less than 1.8" + LessThanOnePointEight = 5 + } + + /// Extended identify flag bits. + [Flags] + public enum ExtendedIdentifyBit : byte + { + /// Reserved + Reserved07 = 0x80, + /// Reserved + Reserved06 = 0x40, + /// Reserved + Reserved05 = 0x20, + /// Reserved + Reserved04 = 0x10, + /// Reserved + Reserved03 = 0x08, + /// Identify word 88 is valid + Word88Valid = 0x04, + /// Identify words 64 to 70 are valid + Words64to70Valid = 0x02, + /// Identify words 54 to 58 are valid + Words54to58Valid = 0x01 + } + + /// General configuration flag bits. + [Flags] + public enum GeneralConfigurationBit : ushort + { + /// Set on ATAPI + NonMagnetic = 0x8000, + /// Format speed tolerance gap is required Obsoleted in ATA-2 + FormatGapReq = 0x4000, + /// Track offset option is available Obsoleted in ATA-2 + TrackOffset = 0x2000, + /// Data strobe offset option is available Obsoleted in ATA-2 + DataStrobeOffset = 0x1000, + /// Rotational speed tolerance is higher than 0,5% Obsoleted in ATA-2 + RotationalSpeedTolerance = 0x0800, + /// Disk transfer rate is > 10 Mb/s Obsoleted in ATA-2 + UltraFastIDE = 0x0400, + /// Disk transfer rate is > 5 Mb/s but <= 10 Mb/s Obsoleted in ATA-2 + FastIDE = 0x0200, + /// Disk transfer rate is <= 5 Mb/s Obsoleted in ATA-2 + SlowIDE = 0x0100, + /// Drive uses removable media + Removable = 0x0080, + /// Drive is fixed Obsoleted in ATA/ATAPI-6 + Fixed = 0x0040, + /// Spindle motor control is implemented Obsoleted in ATA-2 + SpindleControl = 0x0020, + /// Head switch time is bigger than 15 µsec. Obsoleted in ATA-2 + HighHeadSwitch = 0x0010, + /// Drive is not MFM encoded Obsoleted in ATA-2 + NotMFM = 0x0008, + /// Drive is soft sectored Obsoleted in ATA-2 + SoftSector = 0x0004, + /// Response incomplete Since ATA/ATAPI-5 + IncompleteResponse = 0x0004, + /// Drive is hard sectored Obsoleted in ATA-2 + HardSector = 0x0002, + /// Reserved + Reserved = 0x0001 + } + + /// Word 80 Major version + [Flags] + public enum MajorVersionBit : ushort + { + #pragma warning disable 1591 + Reserved15 = 0x8000, Reserved14 = 0x4000, Reserved13 = 0x2000, + Reserved12 = 0x1000, + #pragma warning restore 1591 + /// ACS-4 + ACS4 = 0x0800, + /// ACS-3 + ACS3 = 0x0400, + /// ACS-2 + ACS2 = 0x0200, + /// ATA8-ACS + Ata8ACS = 0x0100, + /// ATA/ATAPI-7 + AtaAtapi7 = 0x0080, + /// ATA/ATAPI-6 + AtaAtapi6 = 0x0040, + /// ATA/ATAPI-5 + AtaAtapi5 = 0x0020, + /// ATA/ATAPI-4 + AtaAtapi4 = 0x0010, + /// ATA-3 + Ata3 = 0x0008, + /// ATA-2 + Ata2 = 0x0004, + /// ATA-1 + Ata1 = 0x0002, + #pragma warning disable 1591 + Reserved00 = 0x0001 + #pragma warning restore 1591 + } + + /// SATA capabilities flags + [Flags] + public enum SATACapabilitiesBit : ushort + { + /// Supports READ LOG DMA EXT + ReadLogDMAExt = 0x8000, + /// Supports device automatic partial to slumber transitions + DevSlumbTrans = 0x4000, + /// Supports host automatic partial to slumber transitions + HostSlumbTrans = 0x2000, + /// Supports NCQ priority + NCQPriority = 0x1000, + /// Supports unload while NCQ commands are outstanding + UnloadNCQ = 0x0800, + /// Supports PHY Event Counters + PHYEventCounter = 0x0400, + /// Supports receipt of host initiated power management requests + PowerReceipt = 0x0200, + /// Supports NCQ + NCQ = 0x0100, + #pragma warning disable 1591 + Reserved07 = 0x0080, Reserved06 = 0x0040, Reserved05 = 0x0020, + Reserved04 = 0x0010, + #pragma warning restore 1591 + /// Supports SATA Gen. 3 Signaling Speed (6.0Gb/s) + Gen3Speed = 0x0008, + /// Supports SATA Gen. 2 Signaling Speed (3.0Gb/s) + Gen2Speed = 0x0004, + /// Supports SATA Gen. 1 Signaling Speed (1.5Gb/s) + Gen1Speed = 0x0002, + /// MUST NOT be set + Clear = 0x0001 + } + + /// More SATA capabilities flags + [Flags] + public enum SATACapabilitiesBit2 : ushort + { + #pragma warning disable 1591 + Reserved15 = 0x8000, Reserved14 = 0x4000, Reserved13 = 0x2000, + Reserved12 = 0x1000, Reserved11 = 0x0800, Reserved10 = 0x0400, + Reserved09 = 0x0200, Reserved08 = 0x0100, Reserved07 = 0x0080, + #pragma warning restore 1591 + /// Supports RECEIVE FPDMA QUEUED and SEND FPDMA QUEUED + FPDMAQ = 0x0040, + /// Supports NCQ Queue Management + NCQMgmt = 0x0020, + /// ATAPI: Supports host environment detect + HostEnvDetect = 0x0020, + /// Supports NCQ streaming + NCQStream = 0x0010, + /// ATAPI: Supports device attention on slimline connected devices + DevAttSlimline = 0x0010, + /// Coded value indicating current negotiated Serial ATA signal speed + CurrentSpeedBit2 = 0x0008, + /// Coded value indicating current negotiated Serial ATA signal speed + CurrentSpeedBit1 = 0x0004, + /// Coded value indicating current negotiated Serial ATA signal speed + CurrentSpeedBit0 = 0x0002, + /// MUST NOT be set + Clear = 0x0001 + } + + /// SATA features flags + [Flags] + public enum SATAFeaturesBit : ushort + { + #pragma warning disable 1591 + Reserved15 = 0x8000, Reserved14 = 0x4000, Reserved13 = 0x2000, + Reserved12 = 0x1000, Reserved11 = 0x0800, Reserved10 = 0x0400, + Reserved09 = 0x0200, Reserved08 = 0x0100, + #pragma warning restore 1591 + /// Supports NCQ autosense + NCQAutoSense = 0x0080, + /// Automatic Partial to Slumber transitions are enabled + EnabledSlumber = 0x0080, + /// Supports Software Settings Preservation + SettingsPreserve = 0x0040, + /// Supports hardware feature control + HardwareFeatureControl = 0x0020, + /// ATAPI: Asynchronous notification + AsyncNotification = 0x0020, + /// Supports in-order data delivery + InOrderData = 0x0010, + /// Supports initiating power management + InitPowerMgmt = 0x0008, + /// Supports DMA Setup auto-activation + DMASetup = 0x0004, + /// Supports non-zero buffer offsets + NonZeroBufferOffset = 0x0002, + /// MUST NOT be set + Clear = 0x0001 + } + + /// SCT Command Transport flags + [Flags] + public enum SCTCommandTransportBit : ushort + { + #pragma warning disable 1591 + Vendor15 = 0x8000, Vendor14 = 0x4000, Vendor13 = 0x2000, + Vendor12 = 0x1000, Reserved11 = 0x0800, Reserved10 = 0x0400, + Reserved09 = 0x0200, Reserved08 = 0x0100, Reserved07 = 0x0080, + Reserved06 = 0x0040, + #pragma warning restore 1591 + /// SCT Command Transport Data Tables supported + DataTables = 0x0020, + /// SCT Command Transport Features Control supported + FeaturesControl = 0x0010, + /// SCT Command Transport Error Recovery Control supported + ErrorRecoveryControl = 0x0008, + /// SCT Command Transport Write Same supported + WriteSame = 0x0004, + /// SCT Command Transport Long Sector Address supported + LongSectorAccess = 0x0002, + /// SCT Command Transport supported + Supported = 0x0001 + } + + /// Security status flag bits. + [Flags] + public enum SecurityStatusBit : ushort + { + #pragma warning disable 1591 + Reserved15 = 0x8000, Reserved14 = 0x4000, Reserved13 = 0x2000, + Reserved12 = 0x1000, Reserved11 = 0x0800, Reserved10 = 0x0400, + Reserved09 = 0x0200, + #pragma warning restore 1591 + /// Maximum security level + Maximum = 0x0100, + #pragma warning disable 1591 + Reserved07 = 0x0080, Reserved06 = 0x0040, + #pragma warning restore 1591 + /// Supports enhanced security erase + Enhanced = 0x0020, + /// Security count expired + Expired = 0x0010, + /// Security frozen + Frozen = 0x0008, + /// Security locked + Locked = 0x0004, + /// Security enabled + Enabled = 0x0002, + /// Security supported + Supported = 0x0001 + } + + /// Specific configuration flags + public enum SpecificConfigurationEnum : ushort + { + /// Device requires SET FEATURES to spin up and IDENTIFY DEVICE response is incomplete + RequiresSetIncompleteResponse = 0x37C8, + /// Device requires SET FEATURES to spin up and IDENTIFY DEVICE response is complete + RequiresSetCompleteResponse = 0x738C, + /// Device does not requires SET FEATURES to spin up and IDENTIFY DEVICE response is incomplete + NotRequiresSetIncompleteResponse = 0x8C73, + /// Device does not requires SET FEATURES to spin up and IDENTIFY DEVICE response is complete + NotRequiresSetCompleteResponse = 0xC837 + } + + /// Transfer mode flags + [Flags] + public enum TransferMode : byte + { + #pragma warning disable 1591 + Mode7 = 0x80, Mode6 = 0x40, Mode5 = 0x20, + Mode4 = 0x10, Mode3 = 0x08, Mode2 = 0x04, + Mode1 = 0x02, Mode0 = 0x01 + #pragma warning restore 1591 + } + + /// Trusted Computing flags + [Flags] + public enum TrustedComputingBit : ushort + { + /// MUST NOT be set + Clear = 0x8000, + /// MUST be set + Set = 0x4000, + #pragma warning disable 1591 + Reserved13 = 0x2000, Reserved12 = 0x1000, Reserved11 = 0x0800, + Reserved10 = 0x0400, Reserved09 = 0x0200, Reserved08 = 0x0100, + Reserved07 = 0x0080, Reserved06 = 0x0040, Reserved05 = 0x0020, + Reserved04 = 0x0010, Reserved03 = 0x0008, Reserved02 = 0x0004, + Reserved01 = 0x0002, + #pragma warning restore 1591 + /// Trusted Computing feature set is supported + TrustedComputing = 0x0001 + } + + /// IDENTIFY DEVICE decoded response + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 2)] + public struct IdentifyDevice + { + /// + /// Word 0 General device configuration On ATAPI devices: Bits 12 to 8 indicate device type as SCSI defined Bits 6 + /// to 5: 0 = Device shall set DRQ within 3 ms of receiving PACKET 1 = Device shall assert INTRQ when DRQ is set to one + /// 2 = Device shall set DRQ within 50 µs of receiving PACKET Bits 1 to 0: 0 = 12 byte command packet 1 = 16 byte + /// command packet CompactFlash is 0x848A (non magnetic, removable, not MFM, hardsector, and UltraFAST) + /// + public GeneralConfigurationBit GeneralConfiguration; + /// Word 1 Cylinders in default translation mode Obsoleted in ATA/ATAPI-6 + public ushort Cylinders; + /// Word 2 Specific configuration + public SpecificConfigurationEnum SpecificConfiguration; + /// Word 3 Heads in default translation mode Obsoleted in ATA/ATAPI-6 + public ushort Heads; + /// Word 4 Unformatted bytes per track in default translation mode Obsoleted in ATA-2 + public ushort UnformattedBPT; + /// Word 5 Unformatted bytes per sector in default translation mode Obsoleted in ATA-2 + public ushort UnformattedBPS; + /// Word 6 Sectors per track in default translation mode Obsoleted in ATA/ATAPI-6 + public ushort SectorsPerTrack; + /// Words 7 to 8 CFA: Number of sectors per card + public uint SectorsPerCard; + /// Word 9 Vendor unique Obsoleted in ATA/ATAPI-4 + public ushort VendorWord9; + /// Words 10 to 19 Device serial number, right justified, padded with spaces + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)] + public string SerialNumber; + /// + /// Word 20 Manufacturer defined Obsoleted in ATA-2 0x0001 = single ported single sector buffer 0x0002 = dual + /// ported multi sector buffer 0x0003 = dual ported multi sector buffer with reading + /// + public ushort BufferType; + /// Word 21 Size of buffer in 512 byte increments Obsoleted in ATA-2 + public ushort BufferSize; + /// Word 22 Bytes of ECC available in READ/WRITE LONG commands Obsoleted in ATA/ATAPI-4 + public ushort EccBytes; + /// Words 23 to 26 Firmware revision, left justified, padded with spaces + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)] + public string FirmwareRevision; + /// Words 27 to 46 Model number, left justified, padded with spaces + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)] + public string Model; + /// + /// Word 47 bits 7 to 0 Maximum number of sectors that can be transferred per interrupt on read and write multiple + /// commands + /// + public byte MultipleMaxSectors; + /// Word 47 bits 15 to 8 Vendor unique ATA/ATAPI-4 says it must be 0x80 + public byte VendorWord47; + /// + /// Word 48 ATA-1: Set to 1 if it can perform doubleword I/O ATA-2 to ATA/ATAPI-7: Reserved ATA8-ACS: Trusted + /// Computing feature set + /// + public TrustedComputingBit TrustedComputing; + /// Word 49 Capabilities + public CapabilitiesBit Capabilities; + /// Word 50 Capabilities + public CapabilitiesBit2 Capabilities2; + /// Word 51 bits 7 to 0 Vendor unique Obsoleted in ATA/ATAPI-4 + public byte VendorWord51; + /// Word 51 bits 15 to 8 Transfer timing mode in PIO Obsoleted in ATA/ATAPI-4 + public byte PIOTransferTimingMode; + /// Word 52 bits 7 to 0 Vendor unique Obsoleted in ATA/ATAPI-4 + public byte VendorWord52; + /// Word 52 bits 15 to 8 Transfer timing mode in DMA Obsoleted in ATA/ATAPI-4 + public byte DMATransferTimingMode; + /// Word 53 bits 7 to 0 Reports if words 54 to 58 are valid + public ExtendedIdentifyBit ExtendedIdentify; + /// Word 53 bits 15 to 8 Free-fall Control Sensitivity + public byte FreeFallSensitivity; + /// Word 54 Cylinders in current translation mode Obsoleted in ATA/ATAPI-6 + public ushort CurrentCylinders; + /// Word 55 Heads in current translation mode Obsoleted in ATA/ATAPI-6 + public ushort CurrentHeads; + /// Word 56 Sectors per track in current translation mode Obsoleted in ATA/ATAPI-6 + public ushort CurrentSectorsPerTrack; + /// Words 57 to 58 Total sectors currently user-addressable Obsoleted in ATA/ATAPI-6 + public uint CurrentSectors; + /// Word 59 bits 7 to 0 Number of sectors currently set to transfer on a READ/WRITE MULTIPLE command + public byte MultipleSectorNumber; + /// Word 59 bits 15 to 8 Indicates if is valid + public CapabilitiesBit3 Capabilities3; + /// Words 60 to 61 If drive supports LBA, how many sectors are addressable using LBA + public uint LBASectors; + /// + /// Word 62 bits 7 to 0 Single word DMA modes available Obsoleted in ATA/ATAPI-4 In ATAPI it's not obsolete, + /// indicates UDMA mode (UDMA7 is instead MDMA0) + /// + public TransferMode DMASupported; + /// + /// Word 62 bits 15 to 8 Single word DMA mode currently active Obsoleted in ATA/ATAPI-4 In ATAPI it's not + /// obsolete, bits 0 and 1 indicate MDMA mode+1, bit 10 indicates DMA is supported and bit 15 indicates DMADIR bit in + /// PACKET is required for DMA transfers + /// + public TransferMode DMAActive; + /// Word 63 bits 7 to 0 Multiword DMA modes available + public TransferMode MDMASupported; + /// Word 63 bits 15 to 8 Multiword DMA mode currently active + public TransferMode MDMAActive; + + /// Word 64 bits 7 to 0 Supported Advanced PIO transfer modes + public TransferMode APIOSupported; + /// Word 64 bits 15 to 8 Reserved + public byte ReservedWord64; + /// Word 65 Minimum MDMA transfer cycle time per word in nanoseconds + public ushort MinMDMACycleTime; + /// Word 66 Recommended MDMA transfer cycle time per word in nanoseconds + public ushort RecMDMACycleTime; + /// Word 67 Minimum PIO transfer cycle time without flow control in nanoseconds + public ushort MinPIOCycleTimeNoFlow; + /// Word 68 Minimum PIO transfer cycle time with IORDY flow control in nanoseconds + public ushort MinPIOCycleTimeFlow; + + /// Word 69 Additional supported + public CommandSetBit5 CommandSet5; + /// Word 70 Reserved + public ushort ReservedWord70; + /// Word 71 ATAPI: Typical time in ns from receipt of PACKET to release bus + public ushort PacketBusRelease; + /// Word 72 ATAPI: Typical time in ns from receipt of SERVICE to clear BSY + public ushort ServiceBusyClear; + /// Word 73 Reserved + public ushort ReservedWord73; + /// Word 74 Reserved + public ushort ReservedWord74; + + /// Word 75 Maximum Queue depth + public ushort MaxQueueDepth; + + /// Word 76 Serial ATA Capabilities + public SATACapabilitiesBit SATACapabilities; + /// Word 77 Serial ATA Additional Capabilities + public SATACapabilitiesBit2 SATACapabilities2; + + /// Word 78 Supported Serial ATA features + public SATAFeaturesBit SATAFeatures; + /// Word 79 Enabled Serial ATA features + public SATAFeaturesBit EnabledSATAFeatures; + + /// Word 80 Major version of ATA/ATAPI standard supported + public MajorVersionBit MajorVersion; + /// Word 81 Minimum version of ATA/ATAPI standard supported + public ushort MinorVersion; + + /// Word 82 Supported command/feature sets + public CommandSetBit CommandSet; + /// Word 83 Supported command/feature sets + public CommandSetBit2 CommandSet2; + /// Word 84 Supported command/feature sets + public CommandSetBit3 CommandSet3; + + /// Word 85 Enabled command/feature sets + public CommandSetBit EnabledCommandSet; + /// Word 86 Enabled command/feature sets + public CommandSetBit2 EnabledCommandSet2; + /// Word 87 Enabled command/feature sets + public CommandSetBit3 EnabledCommandSet3; + + /// Word 88 bits 7 to 0 Supported Ultra DMA transfer modes + public TransferMode UDMASupported; + /// Word 88 bits 15 to 8 Selected Ultra DMA transfer modes + public TransferMode UDMAActive; + + /// Word 89 Time required for security erase completion + public ushort SecurityEraseTime; + /// Word 90 Time required for enhanced security erase completion + public ushort EnhancedSecurityEraseTime; + /// Word 91 Current advanced power management value + public ushort CurrentAPM; + + /// Word 92 Master password revision code + public ushort MasterPasswordRevisionCode; + /// Word 93 Hardware reset result + public ushort HardwareResetResult; + + /// Word 94 bits 7 to 0 Current AAM value + public byte CurrentAAM; + /// Word 94 bits 15 to 8 Vendor's recommended AAM value + public byte RecommendedAAM; + + /// Word 95 Stream minimum request size + public ushort StreamMinReqSize; + /// Word 96 Streaming transfer time in DMA + public ushort StreamTransferTimeDMA; + /// Word 97 Streaming access latency in DMA and PIO + public ushort StreamAccessLatency; + /// Words 98 to 99 Streaming performance granularity + public uint StreamPerformanceGranularity; + + /// Words 100 to 103 48-bit LBA addressable sectors + public ulong LBA48Sectors; + + /// Word 104 Streaming transfer time in PIO + public ushort StreamTransferTimePIO; + + /// Word 105 Maximum number of 512-byte block per DATA SET MANAGEMENT command + public ushort DataSetMgmtSize; + + /// + /// Word 106 Bit 15 should be zero Bit 14 should be one Bit 13 set indicates device has multiple logical sectors + /// per physical sector Bit 12 set indicates logical sector has more than 256 words (512 bytes) Bits 11 to 4 are + /// reserved Bits 3 to 0 indicate power of two of logical sectors per physical sector + /// + public ushort PhysLogSectorSize; + + /// Word 107 Interseek delay for ISO-7779 acoustic testing, in microseconds + public ushort InterseekDelay; + + /// Words 108 to 111 World Wide Name + public ulong WWN; + + /// Words 112 to 115 Reserved for WWN extension to 128 bit + public ulong WWNExtension; + + /// Word 116 Reserved for technical report + public ushort ReservedWord116; + + /// Words 117 to 118 Words per logical sector + public uint LogicalSectorWords; + + /// Word 119 Supported command/feature sets + public CommandSetBit4 CommandSet4; + /// Word 120 Supported command/feature sets + public CommandSetBit4 EnabledCommandSet4; + + /// Words 121 to 125 Reserved + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] + public ushort[] ReservedWords121; + + /// Word 126 ATAPI byte count limit + public ushort ATAPIByteCount; + + /// + /// Word 127 Removable Media Status Notification feature set support Bits 15 to 2 are reserved Bits 1 to 0 must be + /// 0 for not supported or 1 for supported. 2 and 3 are reserved. Obsoleted in ATA8-ACS + /// + public ushort RemovableStatusSet; + + /// Word 128 Security status + public SecurityStatusBit SecurityStatus; + + /// Words 129 to 159 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 31)] + public ushort[] ReservedWords129; + + /// + /// Word 160 CFA power mode Bit 15 must be set Bit 13 indicates mode 1 is required for one or more commands Bit 12 + /// indicates mode 1 is disabled Bits 11 to 0 indicates maximum current in mA + /// + public ushort CFAPowerMode; + + /// Words 161 to 167 Reserved for CFA + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 7)] + public ushort[] ReservedCFA; + + /// Word 168 Bits 15 to 4, reserved Bits 3 to 0, device nominal form factor + public DeviceFormFactorEnum DeviceFormFactor; + /// Word 169 DATA SET MANAGEMENT support + public DataSetMgmtBit DataSetMgmt; + /// Words 170 to 173 Additional product identifier + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)] + public string AdditionalPID; + + /// Word 174 Reserved + public ushort ReservedWord174; + /// Word 175 Reserved + public ushort ReservedWord175; + + /// Words 176 to 195 Current media serial number + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)] + public string MediaSerial; + /// Words 196 to 205 Current media manufacturer + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 20)] + public string MediaManufacturer; + + /// Word 206 SCT Command Transport features + public SCTCommandTransportBit SCTCommandTransport; + + /// Word 207 Reserved for CE-ATA + public ushort ReservedCEATAWord207; + /// Word 208 Reserved for CE-ATA + public ushort ReservedCEATAWord208; + + /// + /// Word 209 Alignment of logical block within a larger physical block Bit 15 shall be cleared to zero Bit 14 + /// shall be set to one Bits 13 to 0 indicate logical sector offset within the first physical sector + /// + public ushort LogicalAlignment; + + /// Words 210 to 211 Write/Read/Verify sector count mode 3 only + public uint WRVSectorCountMode3; + /// Words 212 to 213 Write/Read/Verify sector count mode 2 only + public uint WRVSectorCountMode2; + + /// + /// Word 214 NV Cache capabilities Bits 15 to 12 feature set version Bits 11 to 18 power mode feature set version + /// Bits 7 to 5 reserved Bit 4 feature set enabled Bits 3 to 2 reserved Bit 1 power mode feature set enabled Bit 0 + /// power mode feature set supported + /// + public ushort NVCacheCaps; + /// Words 215 to 216 NV Cache Size in Logical BLocks + public uint NVCacheSize; + /// Word 217 Nominal media rotation rate In ACS-1 meant NV Cache read speed in MB/s + public ushort NominalRotationRate; + /// Word 218 NV Cache write speed in MB/s Reserved since ACS-2 + public ushort NVCacheWriteSpeed; + /// Word 219 bits 7 to 0 Estimated device spin up in seconds + public byte NVEstimatedSpinUp; + /// Word 219 bits 15 to 8 NV Cache reserved + public byte NVReserved; + + /// Word 220 bits 7 to 0 Write/Read/Verify feature set current mode + public byte WRVMode; + /// Word 220 bits 15 to 8 Reserved + public byte WRVReserved; + + /// Word 221 Reserved + public ushort ReservedWord221; + + /// + /// Word 222 Transport major revision number Bits 15 to 12 indicate transport type. 0 parallel, 1 serial, 0xE + /// PCIe. Bits 11 to 0 indicate revision + /// + public ushort TransportMajorVersion; + /// Word 223 Transport minor revision number + public ushort TransportMinorVersion; + + /// Words 224 to 229 Reserved for CE-ATA + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] + public ushort[] ReservedCEATA224; + + /// Words 230 to 233 48-bit LBA if Word 69 bit 3 is set + public ulong ExtendedUserSectors; + + /// Word 234 Minimum number of 512 byte units per DOWNLOAD MICROCODE mode 3 + public ushort MinDownloadMicroMode3; + /// Word 235 Maximum number of 512 byte units per DOWNLOAD MICROCODE mode 3 + public ushort MaxDownloadMicroMode3; + + /// Words 236 to 254 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 19)] + public ushort[] ReservedWords; + + /// Word 255 bits 7 to 0 Should be 0xA5 + public byte Signature; + /// Word 255 bits 15 to 8 Checksum + public byte Checksum; + } + + /// Decodes a raw IDENTIFY DEVICE response + /// Raw IDENTIFY DEVICE response + /// Decoded IDENTIFY DEVICE + public static IdentifyDevice? Decode(byte[] IdentifyDeviceResponse) + { + if(IdentifyDeviceResponse == null) + return null; + + if(IdentifyDeviceResponse.Length != 512) + { + AaruConsole.DebugWriteLine("ATA/ATAPI IDENTIFY decoder", + "IDENTIFY response is different than 512 bytes, not decoding."); + + return null; + } + + IdentifyDevice ATAID = Marshal.ByteArrayToStructureLittleEndian(IdentifyDeviceResponse); + + ATAID.WWN = DescrambleWWN(ATAID.WWN); + ATAID.WWNExtension = DescrambleWWN(ATAID.WWNExtension); + + ATAID.SerialNumber = DescrambleATAString(IdentifyDeviceResponse, 10 * 2, 20); + ATAID.FirmwareRevision = DescrambleATAString(IdentifyDeviceResponse, 23 * 2, 8); + ATAID.Model = DescrambleATAString(IdentifyDeviceResponse, 27 * 2, 40); + ATAID.AdditionalPID = DescrambleATAString(IdentifyDeviceResponse, 170 * 2, 8); + ATAID.MediaSerial = DescrambleATAString(IdentifyDeviceResponse, 176 * 2, 40); + ATAID.MediaManufacturer = DescrambleATAString(IdentifyDeviceResponse, 196 * 2, 20); + + return ATAID; + } + + /// Encodes a raw IDENTIFY DEVICE response + /// Decoded IDENTIFY DEVICE + /// Raw IDENTIFY DEVICE response + public static byte[] Encode(IdentifyDevice? identify) + { + if(identify is null) + return null; + + IdentifyDevice ataId = identify.Value; + + ataId.WWN = DescrambleWWN(ataId.WWN); + ataId.WWNExtension = DescrambleWWN(ataId.WWNExtension); + + byte[] buf = new byte[512]; + IntPtr ptr = System.Runtime.InteropServices.Marshal.AllocHGlobal(512); + System.Runtime.InteropServices.Marshal.StructureToPtr(ataId, ptr, false); + System.Runtime.InteropServices.Marshal.Copy(ptr, buf, 0, 512); + System.Runtime.InteropServices.Marshal.FreeHGlobal(ptr); + + byte[] str = ScrambleATAString(ataId.SerialNumber, 20); + Array.Copy(str, 0, buf, 10 * 2, 20); + str = ScrambleATAString(ataId.FirmwareRevision, 8); + Array.Copy(str, 0, buf, 23 * 2, 8); + str = ScrambleATAString(ataId.Model, 40); + Array.Copy(str, 0, buf, 27 * 2, 40); + str = ScrambleATAString(ataId.AdditionalPID, 8); + Array.Copy(str, 0, buf, 170 * 2, 8); + str = ScrambleATAString(ataId.MediaSerial, 40); + Array.Copy(str, 0, buf, 176 * 2, 40); + str = ScrambleATAString(ataId.MediaManufacturer, 20); + Array.Copy(str, 0, buf, 196 * 2, 20); + + return buf; + } + + static ulong DescrambleWWN(ulong WWN) + { + byte[] qwb = BitConverter.GetBytes(WWN); + byte[] qword = new byte[8]; + + qword[7] = qwb[1]; + qword[6] = qwb[0]; + qword[5] = qwb[3]; + qword[4] = qwb[2]; + qword[3] = qwb[5]; + qword[2] = qwb[4]; + qword[1] = qwb[7]; + qword[0] = qwb[6]; + + return BitConverter.ToUInt64(qword, 0); + } + + static string DescrambleATAString(IList buffer, int offset, int length) + { + byte[] outbuf = buffer[offset + length - 1] != 0x00 ? new byte[length + 1] : new byte[length]; + + for(int i = 0; i < length; i += 2) + { + outbuf[i] = buffer[offset + i + 1]; + outbuf[i + 1] = buffer[offset + i]; + } + + string outStr = StringHandlers.CToString(outbuf); + + return outStr.Trim(); + } + + static byte[] ScrambleATAString(string str, int length) + { + byte[] buf = new byte[length]; + + for(int i = 0; i < length; i++) + buf[i] = 0x20; + + if(str is null) + return buf; + + byte[] bytes = Encoding.ASCII.GetBytes(str); + + if(bytes.Length % 2 != 0) + { + byte[] tmp = new byte[bytes.Length + 1]; + tmp[^1] = 0x20; + Array.Copy(bytes, 0, tmp, 0, bytes.Length); + bytes = tmp; + } + + for(int i = 0; i < bytes.Length; i += 2) + { + buf[i] = bytes[i + 1]; + buf[i + 1] = bytes[i]; + } + + return buf; + } + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Structs/Devices/SCSI/Enums.cs b/Aaru.CommonTypes/Structs/Devices/SCSI/Enums.cs new file mode 100644 index 0000000..b589267 --- /dev/null +++ b/Aaru.CommonTypes/Structs/Devices/SCSI/Enums.cs @@ -0,0 +1,245 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Enums.cs +// Author(s) : Natalia Portillo +// +// Component : Common structures for SCSI devices. +// +// --[ Description ] ---------------------------------------------------------- +// +// Contains various SCSI enumerations. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System.Diagnostics.CodeAnalysis; + +namespace Aaru.CommonTypes.Structs.Devices.SCSI +{ + /// List of known SCSI peripheral qualifiers + public enum PeripheralQualifiers : byte + { + /// Peripheral qualifier: Device is connected and supported + Supported = 0x00, + /// Peripheral qualifier: Device is supported but not connected + Unconnected = 0x01, + /// Peripheral qualifier: Reserved value + Reserved = 0x02, + /// Peripheral qualifier: Device is connected but unsupported + Unsupported = 0x03, + /// Peripheral qualifier: Vendor values: 0x04, 0x05, 0x06 and 0x07 + VendorMask = 0x04 + } + + /// List of known peripheral device types + [SuppressMessage("ReSharper", "InconsistentNaming")] + public enum PeripheralDeviceTypes : byte + { + /// Direct-access device + DirectAccess = 0x00, + /// Sequential-access device + SequentialAccess = 0x01, + /// Printer device + PrinterDevice = 0x02, + /// Processor device + ProcessorDevice = 0x03, + /// Write-once device + WriteOnceDevice = 0x04, + /// CD-ROM/DVD/etc device + MultiMediaDevice = 0x05, + /// Scanner device + ScannerDevice = 0x06, + /// Optical memory device + OpticalDevice = 0x07, + /// Medium change device + MediumChangerDevice = 0x08, + /// Communications device + CommsDevice = 0x09, + /// Graphics arts pre-press device (defined in ASC IT8) + PrePressDevice1 = 0x0A, + /// Graphics arts pre-press device (defined in ASC IT8) + PrePressDevice2 = 0x0B, + /// Array controller device + ArrayControllerDevice = 0x0C, + /// Enclosure services device + EnclosureServiceDevice = 0x0D, + /// Simplified direct-access device + SimplifiedDevice = 0x0E, + /// Optical card reader/writer device + OCRWDevice = 0x0F, + /// Bridging Expanders + BridgingExpander = 0x10, + /// Object-based Storage Device + ObjectDevice = 0x11, + /// Automation/Drive Interface + ADCDevice = 0x12, + /// Security Manager Device + SCSISecurityManagerDevice = 0x13, + /// Host managed zoned block device + SCSIZonedBlockDevice = 0x14, + /// Well known logical unit + WellKnownDevice = 0x1E, + /// Unknown or no device type + UnknownDevice = 0x1F + } + + /// List of known ANSI SCSI standards + [SuppressMessage("ReSharper", "InconsistentNaming")] + public enum ANSIVersions : byte + { + /// Device does not claim conformance to any ANSI version + ANSINoVersion = 0x00, + /// Device complies with ANSI X3.131:1986 + ANSI1986Version = 0x01, + /// Device complies with ANSI X3.131:1994 + ANSI1994Version = 0x02, + /// Device complies with ANSI X3.301:1997 + ANSI1997Version = 0x03, + /// Device complies with ANSI X3.351:2001 + ANSI2001Version = 0x04, + /// Device complies with ANSI X3.408:2005. + ANSI2005Version = 0x05, + /// Device complies with SPC-4 + ANSI2008Version = 0x06 + } + + /// List of known ECMA SCSI standards + [SuppressMessage("ReSharper", "InconsistentNaming")] + public enum ECMAVersions : byte + { + /// Device does not claim conformance to any ECMA version + ECMANoVersion = 0x00, + /// Device complies with a ECMA-111 standard + ECMA111 = 0x01 + } + + /// List of known ISO SCSI standards + [SuppressMessage("ReSharper", "InconsistentNaming")] + public enum ISOVersions : byte + { + /// Device does not claim conformance to any ISO/IEC version + ISONoVersion = 0x00, + /// Device complies with ISO/IEC 9316:1995 + ISO1995Version = 0x02 + } + + /// List of known SCSI Parallel Interface clocking types + [SuppressMessage("ReSharper", "InconsistentNaming")] + public enum SPIClocking : byte + { + /// Supports only ST + ST = 0x00, + /// Supports only DT + DT = 0x01, + /// Reserved value + Reserved = 0x02, + /// Supports ST and DT + STandDT = 0x03 + } + + /// List of known TGPS values + [SuppressMessage("ReSharper", "InconsistentNaming")] + public enum TGPSValues : byte + { + /// Asymmetrical access not supported + NotSupported = 0x00, + /// Only implicit asymmetrical access is supported + OnlyImplicit = 0x01, + /// Only explicit asymmetrical access is supported + OnlyExplicit = 0x02, + /// Both implicit and explicit asymmetrical access are supported + Both = 0x03 + } + + /// List of known SCSI protocols + [SuppressMessage("ReSharper", "InconsistentNaming")] + public enum ProtocolIdentifiers : byte + { + /// Fibre Channel + FibreChannel = 0, + /// Parallel SCSI + SCSI = 1, + /// SSA + SSA = 2, + /// IEEE-1394 + Firewire = 3, + /// SCSI Remote Direct Memory Access Protocol + RDMAP = 4, + /// Internet SCSI + iSCSI = 5, + /// Serial SCSI + SAS = 6, + /// Automation/Drive Interface Transport Protocol + ADT = 7, + /// AT Attachment Interface (ATA/ATAPI) + ATA = 8, + /// USB Attached SCSI + UAS = 9, + /// SCSI over PCI Express + SCSIe = 10, + /// PCI Express + PCIe = 11, + /// No specific protocol + NoProtocol = 15 + } + + /// List of known SCSI definitions + [SuppressMessage("ReSharper", "InconsistentNaming")] + public enum ScsiDefinitions : byte + { + /// Unknown + Current = 0, + /// SCSI-1 + SCSI1 = 1, + /// Unknown + CCS = 2, + /// SCSI-2 + SCSI2 = 3, + /// SCSI-3 + SCSI3 = 4 + } + + /// List of known SCSI physical interfaces + [SuppressMessage("ReSharper", "InconsistentNaming")] + public enum PhysicalInterfaces : uint + { + /// Unspecified physical interface + Unspecified = 0, + /// SCSI + SCSI = 1, + /// ATAPI + ATAPI = 2, + /// IEEE-1394/1995 + IEEE1394 = 3, + /// IEEE-1394A + IEEE1394A = 4, + /// Fibre Channel + FC = 5, + /// IEEE-1394B + IEEE1394B = 6, + /// Serial ATAPI + SerialATAPI = 7, + /// USB + USB = 8, + /// Vendor unique + Vendor = 0xFFFF + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Structs/Devices/SCSI/Inquiry.cs b/Aaru.CommonTypes/Structs/Devices/SCSI/Inquiry.cs new file mode 100644 index 0000000..a6322f1 --- /dev/null +++ b/Aaru.CommonTypes/Structs/Devices/SCSI/Inquiry.cs @@ -0,0 +1,788 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Inquiry.cs +// Author(s) : Natalia Portillo +// +// Component : Common structures for SCSI devices. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines a high level interpretation of the SCSI INQUIRY response. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using Aaru.Console; + +namespace Aaru.CommonTypes.Structs.Devices.SCSI +{ + /// + /// Information from the following standards: T9/375-D revision 10l T10/995-D revision 10 T10/1236-D revision 20 + /// T10/1416-D revision 23 T10/1731-D revision 16 T10/502 revision 05 RFC 7144 ECMA-111 + /// + [SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"), + SuppressMessage("ReSharper", "MemberCanBePrivate.Global")] + public struct Inquiry + { + /// Peripheral qualifier Byte 0, bits 7 to 5 + public byte PeripheralQualifier; + /// Peripheral device type Byte 0, bits 4 to 0 + public byte PeripheralDeviceType; + /// Removable device Byte 1, bit 7 + public bool RMB; + /// SCSI-1 vendor-specific qualification codes Byte 1, bits 6 to 0 + public byte DeviceTypeModifier; + /// ISO/IEC SCSI Standard Version Byte 2, bits 7 to 6, mask = 0xC0, >> 6 + public byte ISOVersion; + /// ECMA SCSI Standard Version Byte 2, bits 5 to 3, mask = 0x38, >> 3 + public byte ECMAVersion; + /// ANSI SCSI Standard Version Byte 2, bits 2 to 0, mask = 0x07 + public byte ANSIVersion; + /// Asynchronous Event Reporting Capability supported Byte 3, bit 7 + public bool AERC; + /// Device supports TERMINATE TASK command Byte 3, bit 6 + public bool TrmTsk; + /// Supports setting Normal ACA Byte 3, bit 5 + public bool NormACA; + /// Supports LUN hierarchical addressing Byte 3, bit 4 + public bool HiSup; + /// Responde data format Byte 3, bit 3 to 0 + public byte ResponseDataFormat; + /// Lenght of total INQUIRY response minus 4 Byte 4 + public byte AdditionalLength; + /// Device contains an embedded storage array controller Byte 5, bit 7 + public bool SCCS; + /// Device contains an Access Control Coordinator Byte 5, bit 6 + public bool ACC; + /// Supports asymetrical logical unit access Byte 5, bits 5 to 4 + public byte TPGS; + /// Supports third-party copy commands Byte 5, bit 3 + public bool ThreePC; + /// Reserved Byte 5, bits 2 to 1 + public byte Reserved2; + /// Supports protection information Byte 5, bit 0 + public bool Protect; + /// Supports basic queueing Byte 6, bit 7 + public bool BQue; + /// Device contains an embedded enclosure services component Byte 6, bit 6 + public bool EncServ; + /// Vendor-specific Byte 6, bit 5 + public bool VS1; + /// Multi-port device Byte 6, bit 4 + public bool MultiP; + /// Device contains or is attached to a medium changer Byte 6, bit 3 + public bool MChngr; + /// Device supports request and acknowledge handshakes Byte 6, bit 2 + public bool ACKREQQ; + /// Supports 32-bit wide SCSI addresses Byte 6, bit 1 + public bool Addr32; + /// Supports 16-bit wide SCSI addresses Byte 6, bit 0 + public bool Addr16; + /// Device supports relative addressing Byte 7, bit 7 + public bool RelAddr; + /// Supports 32-bit wide data transfers Byte 7, bit 6 + public bool WBus32; + /// Supports 16-bit wide data transfers Byte 7, bit 5 + public bool WBus16; + /// Supports synchronous data transfer Byte 7, bit 4 + public bool Sync; + /// Supports linked commands Byte 7, bit 3 + public bool Linked; + /// Supports CONTINUE TASK and TARGET TRANSFER DISABLE commands Byte 7, bit 2 + public bool TranDis; + /// Supports TCQ queue Byte 7, bit 1 + public bool CmdQue; + /// Indicates that the devices responds to RESET with soft reset Byte 7, bit 0 + public bool SftRe; + /// Vendor identification Bytes 8 to 15 + public byte[] VendorIdentification; + /// Product identification Bytes 16 to 31 + public byte[] ProductIdentification; + /// Product revision level Bytes 32 to 35 + public byte[] ProductRevisionLevel; + /// Vendor-specific data Bytes 36 to 55 + public byte[] VendorSpecific; + /// Byte 56, bits 7 to 4 + public byte Reserved3; + /// Supported SPI clocking Byte 56, bits 3 to 2 + public byte Clocking; + /// Device supports Quick Arbitration and Selection Byte 56, bit 1 + public bool QAS; + /// Supports information unit transfers Byte 56, bit 0 + public bool IUS; + /// Reserved Byte 57 + public byte Reserved4; + /// Array of version descriptors Bytes 58 to 73 + public ushort[] VersionDescriptors; + /// Reserved Bytes 74 to 95 + public byte[] Reserved5; + /// Reserved Bytes 96 to end + public byte[] VendorSpecific2; + + // Per DLT4000/DLT4500/DLT4700 Cartridge Tape Subsystem Product Manual + + #region Quantum vendor unique inquiry data structure + /// Means that the INQUIRY response contains 56 bytes or more, so this data has been filled + public bool QuantumPresent; + /// The product family. Byte 36, bits 7 to 5 + public byte Qt_ProductFamily; + /// The released firmware. Byte 36, bits 4 to 0 + public byte Qt_ReleasedFirmware; + /// The firmware major version. Byte 37 + public byte Qt_FirmwareMajorVersion; + /// The firmware minor version. Byte 38 + public byte Qt_FirmwareMinorVersion; + /// The EEPROM format major version. Byte 39 + public byte Qt_EEPROMFormatMajorVersion; + /// The EEPROM format minor version. Byte 40 + public byte Qt_EEPROMFormatMinorVersion; + /// The firmware personality. Byte 41 + public byte Qt_FirmwarePersonality; + /// The firmware sub personality. Byte 42 + public byte Qt_FirmwareSubPersonality; + /// The tape directory format version. Byte 43 + public byte Qt_TapeDirectoryFormatVersion; + /// The controller hardware version. Byte 44 + public byte Qt_ControllerHardwareVersion; + /// The drive EEPROM version. Byte 45 + public byte Qt_DriveEEPROMVersion; + /// The drive hardware version. Byte 46 + public byte Qt_DriveHardwareVersion; + /// The media loader firmware version. Byte 47 + public byte Qt_MediaLoaderFirmwareVersion; + /// The media loader hardware version. Byte 48 + public byte Qt_MediaLoaderHardwareVersion; + /// The media loader mechanical version. Byte 49 + public byte Qt_MediaLoaderMechanicalVersion; + /// Is a media loader present? Byte 50 + public bool Qt_MediaLoaderPresent; + /// Is a library present? Byte 51 + public bool Qt_LibraryPresent; + /// The module revision. Bytes 52 to 55 + public byte[] Qt_ModuleRevision; + #endregion Quantum vendor unique inquiry data structure + + #region IBM vendor unique inquiry data structure + /// Means that the INQUIRY response contains 56 bytes or more, so this data has been filled + public bool IBMPresent; + /// Drive is not capable of automation Byte 36 bit 0 + public bool IBM_AutDis; + /// If not zero, limit in MB/s = Max * (this / 256) Byte 37 + public byte IBM_PerformanceLimit; + /// Byte 41 + public byte IBM_OEMSpecific; + #endregion IBM vendor unique inquiry data structure + + #region HP vendor unique inquiry data structure + /// Means that the INQUIRY response contains 49 bytes or more, so this data has been filled + public bool HPPresent; + /// WORM version Byte 40 bits 7 to 1 + public byte HP_WORMVersion; + /// WORM supported Byte 40 bit 0 + public bool HP_WORM; + /// Bytes 43 to 48 + public byte[] HP_OBDR; + #endregion HP vendor unique inquiry data structure + + #region Seagate vendor unique inquiry data structure + /// Means that bytes 36 to 43 are filled + public bool SeagatePresent; + /// Drive Serial Number Bytes 36 to 43 + public byte[] Seagate_DriveSerialNumber; + /// Means that bytes 96 to 143 are filled + public bool Seagate2Present; + /// Contains Seagate copyright notice Bytes 96 to 143 + public byte[] Seagate_Copyright; + /// Means that bytes 144 to 147 are filled + public bool Seagate3Present; + /// Reserved Seagate field Bytes 144 to 147 + public byte[] Seagate_ServoPROMPartNo; + #endregion Seagate vendor unique inquiry data structure + + #region Kreon vendor unique inquiry data structure + /// Means that firmware is Kreon + public bool KreonPresent; + /// Kreon identifier Bytes 36 to 40 + public byte[] KreonIdentifier; + /// Kreon just a 0x20 Bytes 41 + public byte KreonSpace; + /// Kreon version string Bytes 42 to 46 + public byte[] KreonVersion; + #endregion Kreon vendor unique inquiry data structure + + #region Sony Hi-MD data + /// Set if Hi-MD signature is present + public bool IsHiMD; + /// Hi-MD signature, bytes 36 to 44 + public byte[] HiMDSignature; + /// Unknown data, bytes 44 to 55 + public byte[] HiMDSpecific; + #endregion Sony Hi-MD data + + static readonly byte[] HiMDSignatureContents = + { + 0x48, 0x69, 0x2D, 0x4D, 0x44, 0x20, 0x20, 0x20 + }; + + /// Decodes a SCSI INQUIRY response + /// INQUIRY raw response data + /// Decoded SCSI INQUIRY + #region Public methods + public static Inquiry? Decode(byte[] SCSIInquiryResponse) + { + if(SCSIInquiryResponse == null) + return null; + + if(SCSIInquiryResponse.Length < 36 && + SCSIInquiryResponse.Length != 5) + { + AaruConsole.DebugWriteLine("SCSI INQUIRY decoder", + "INQUIRY response is {0} bytes, less than minimum of 36 bytes, decoded data can be incorrect, not decoding.", + SCSIInquiryResponse.Length); + + return null; + } + + if(SCSIInquiryResponse.Length < SCSIInquiryResponse[4] + 4 && + SCSIInquiryResponse.Length != SCSIInquiryResponse[4]) + { + AaruConsole.DebugWriteLine("SCSI INQUIRY decoder", + "INQUIRY response length ({0} bytes) is different than specified in length field ({1} bytes), decoded data can be incorrect, not decoding.", + SCSIInquiryResponse.Length, SCSIInquiryResponse[4] + 4); + + return null; + } + + var decoded = new Inquiry(); + + if(SCSIInquiryResponse.Length >= 1) + { + decoded.PeripheralQualifier = (byte)((SCSIInquiryResponse[0] & 0xE0) >> 5); + decoded.PeripheralDeviceType = (byte)(SCSIInquiryResponse[0] & 0x1F); + } + + if(SCSIInquiryResponse.Length >= 2) + { + decoded.RMB = Convert.ToBoolean(SCSIInquiryResponse[1] & 0x80); + decoded.DeviceTypeModifier = (byte)(SCSIInquiryResponse[1] & 0x7F); + } + + if(SCSIInquiryResponse.Length >= 3) + { + decoded.ISOVersion = (byte)((SCSIInquiryResponse[2] & 0xC0) >> 6); + decoded.ECMAVersion = (byte)((SCSIInquiryResponse[2] & 0x38) >> 3); + decoded.ANSIVersion = (byte)(SCSIInquiryResponse[2] & 0x07); + } + + if(SCSIInquiryResponse.Length >= 4) + { + decoded.AERC = Convert.ToBoolean(SCSIInquiryResponse[3] & 0x80); + decoded.TrmTsk = Convert.ToBoolean(SCSIInquiryResponse[3] & 0x40); + decoded.NormACA = Convert.ToBoolean(SCSIInquiryResponse[3] & 0x20); + decoded.HiSup = Convert.ToBoolean(SCSIInquiryResponse[3] & 0x10); + decoded.ResponseDataFormat = (byte)(SCSIInquiryResponse[3] & 0x07); + } + + if(SCSIInquiryResponse.Length >= 5) + decoded.AdditionalLength = SCSIInquiryResponse[4]; + + if(SCSIInquiryResponse.Length >= 6) + { + decoded.SCCS = Convert.ToBoolean(SCSIInquiryResponse[5] & 0x80); + decoded.ACC = Convert.ToBoolean(SCSIInquiryResponse[5] & 0x40); + decoded.TPGS = (byte)((SCSIInquiryResponse[5] & 0x30) >> 4); + decoded.ThreePC = Convert.ToBoolean(SCSIInquiryResponse[5] & 0x08); + decoded.Reserved2 = (byte)((SCSIInquiryResponse[5] & 0x06) >> 1); + decoded.Protect = Convert.ToBoolean(SCSIInquiryResponse[5] & 0x01); + } + + if(SCSIInquiryResponse.Length >= 7) + { + decoded.BQue = Convert.ToBoolean(SCSIInquiryResponse[6] & 0x80); + decoded.EncServ = Convert.ToBoolean(SCSIInquiryResponse[6] & 0x40); + decoded.VS1 = Convert.ToBoolean(SCSIInquiryResponse[6] & 0x20); + decoded.MultiP = Convert.ToBoolean(SCSIInquiryResponse[6] & 0x10); + decoded.MChngr = Convert.ToBoolean(SCSIInquiryResponse[6] & 0x08); + decoded.ACKREQQ = Convert.ToBoolean(SCSIInquiryResponse[6] & 0x04); + decoded.Addr32 = Convert.ToBoolean(SCSIInquiryResponse[6] & 0x02); + decoded.Addr16 = Convert.ToBoolean(SCSIInquiryResponse[6] & 0x01); + } + + if(SCSIInquiryResponse.Length >= 8) + { + decoded.RelAddr = Convert.ToBoolean(SCSIInquiryResponse[7] & 0x80); + decoded.WBus32 = Convert.ToBoolean(SCSIInquiryResponse[7] & 0x40); + decoded.WBus16 = Convert.ToBoolean(SCSIInquiryResponse[7] & 0x20); + decoded.Sync = Convert.ToBoolean(SCSIInquiryResponse[7] & 0x10); + decoded.Linked = Convert.ToBoolean(SCSIInquiryResponse[7] & 0x08); + decoded.TranDis = Convert.ToBoolean(SCSIInquiryResponse[7] & 0x04); + decoded.CmdQue = Convert.ToBoolean(SCSIInquiryResponse[7] & 0x02); + decoded.SftRe = Convert.ToBoolean(SCSIInquiryResponse[7] & 0x01); + } + + if(SCSIInquiryResponse.Length >= 16) + { + decoded.VendorIdentification = new byte[8]; + Array.Copy(SCSIInquiryResponse, 8, decoded.VendorIdentification, 0, 8); + } + + if(SCSIInquiryResponse.Length >= 32) + { + decoded.ProductIdentification = new byte[16]; + Array.Copy(SCSIInquiryResponse, 16, decoded.ProductIdentification, 0, 16); + } + + if(SCSIInquiryResponse.Length >= 36) + { + decoded.ProductRevisionLevel = new byte[4]; + Array.Copy(SCSIInquiryResponse, 32, decoded.ProductRevisionLevel, 0, 4); + } + + if(SCSIInquiryResponse.Length >= 44) + { + // Seagate 1 + decoded.SeagatePresent = true; + decoded.Seagate_DriveSerialNumber = new byte[8]; + Array.Copy(SCSIInquiryResponse, 36, decoded.Seagate_DriveSerialNumber, 0, 8); + + // Hi-MD + decoded.HiMDSignature = new byte[8]; + Array.Copy(SCSIInquiryResponse, 36, decoded.HiMDSignature, 0, 8); + decoded.IsHiMD = HiMDSignatureContents.SequenceEqual(decoded.HiMDSignature); + } + + if(SCSIInquiryResponse.Length >= 46) + { + // Kreon + decoded.KreonIdentifier = new byte[5]; + Array.Copy(SCSIInquiryResponse, 36, decoded.KreonIdentifier, 0, 5); + decoded.KreonSpace = SCSIInquiryResponse[41]; + decoded.KreonVersion = new byte[5]; + Array.Copy(SCSIInquiryResponse, 42, decoded.KreonVersion, 0, 5); + + if(decoded.KreonSpace == 0x20 && + decoded.KreonIdentifier.SequenceEqual(new byte[] + { + 0x4B, 0x52, 0x45, 0x4F, 0x4E + })) + decoded.KreonPresent = true; + } + + if(SCSIInquiryResponse.Length >= 49) + { + // HP + decoded.HPPresent = true; + decoded.HP_WORM |= (SCSIInquiryResponse[40] & 0x01) == 0x01; + decoded.HP_WORMVersion = (byte)((SCSIInquiryResponse[40] & 0x7F) >> 1); + decoded.HP_OBDR = new byte[6]; + Array.Copy(SCSIInquiryResponse, 43, decoded.HP_OBDR, 0, 6); + } + + if(SCSIInquiryResponse.Length >= 56) + { + if(decoded.IsHiMD) + { + decoded.HiMDSpecific = new byte[12]; + Array.Copy(SCSIInquiryResponse, 44, decoded.HiMDSpecific, 0, 12); + } + else + { + decoded.VendorSpecific = new byte[20]; + Array.Copy(SCSIInquiryResponse, 36, decoded.VendorSpecific, 0, 20); + } + + // Quantum + decoded.QuantumPresent = true; + decoded.Qt_ProductFamily = (byte)((SCSIInquiryResponse[36] & 0xF0) >> 4); + decoded.Qt_ReleasedFirmware = (byte)(SCSIInquiryResponse[36] & 0x0F); + decoded.Qt_FirmwareMajorVersion = SCSIInquiryResponse[37]; + decoded.Qt_FirmwareMinorVersion = SCSIInquiryResponse[38]; + decoded.Qt_EEPROMFormatMajorVersion = SCSIInquiryResponse[39]; + decoded.Qt_EEPROMFormatMinorVersion = SCSIInquiryResponse[40]; + decoded.Qt_FirmwarePersonality = SCSIInquiryResponse[41]; + decoded.Qt_FirmwareSubPersonality = SCSIInquiryResponse[42]; + decoded.Qt_TapeDirectoryFormatVersion = SCSIInquiryResponse[43]; + decoded.Qt_ControllerHardwareVersion = SCSIInquiryResponse[44]; + decoded.Qt_DriveEEPROMVersion = SCSIInquiryResponse[45]; + decoded.Qt_DriveHardwareVersion = SCSIInquiryResponse[46]; + decoded.Qt_MediaLoaderFirmwareVersion = SCSIInquiryResponse[47]; + decoded.Qt_MediaLoaderHardwareVersion = SCSIInquiryResponse[48]; + decoded.Qt_MediaLoaderMechanicalVersion = SCSIInquiryResponse[49]; + decoded.Qt_MediaLoaderPresent = SCSIInquiryResponse[50] > 0; + decoded.Qt_LibraryPresent = SCSIInquiryResponse[51] > 0; + decoded.Qt_ModuleRevision = new byte[4]; + Array.Copy(SCSIInquiryResponse, 52, decoded.Qt_ModuleRevision, 0, 4); + + // IBM + decoded.IBMPresent = true; + decoded.IBM_AutDis |= (SCSIInquiryResponse[36] & 0x01) == 0x01; + decoded.IBM_PerformanceLimit = SCSIInquiryResponse[37]; + decoded.IBM_OEMSpecific = SCSIInquiryResponse[41]; + } + + if(SCSIInquiryResponse.Length >= 57) + { + decoded.Reserved3 = (byte)((SCSIInquiryResponse[56] & 0xF0) >> 4); + decoded.Clocking = (byte)((SCSIInquiryResponse[56] & 0x0C) >> 2); + decoded.QAS = Convert.ToBoolean(SCSIInquiryResponse[56] & 0x02); + decoded.IUS = Convert.ToBoolean(SCSIInquiryResponse[56] & 0x01); + } + + if(SCSIInquiryResponse.Length >= 58) + decoded.Reserved4 = SCSIInquiryResponse[57]; + + if(SCSIInquiryResponse.Length >= 60) + { + int descriptorsNo; + + if(SCSIInquiryResponse.Length >= 74) + descriptorsNo = 8; + else + descriptorsNo = (SCSIInquiryResponse.Length - 58) / 2; + + decoded.VersionDescriptors = new ushort[descriptorsNo]; + + for(int i = 0; i < descriptorsNo; i++) + decoded.VersionDescriptors[i] = BitConverter.ToUInt16(SCSIInquiryResponse, 58 + (i * 2)); + } + + if(SCSIInquiryResponse.Length >= 75 && + SCSIInquiryResponse.Length < 96) + { + decoded.Reserved5 = new byte[SCSIInquiryResponse.Length - 74]; + Array.Copy(SCSIInquiryResponse, 74, decoded.Reserved5, 0, SCSIInquiryResponse.Length - 74); + } + + if(SCSIInquiryResponse.Length >= 96) + { + decoded.Reserved5 = new byte[22]; + Array.Copy(SCSIInquiryResponse, 74, decoded.Reserved5, 0, 22); + } + + if(SCSIInquiryResponse.Length > 96) + { + decoded.VendorSpecific2 = new byte[SCSIInquiryResponse.Length - 96]; + Array.Copy(SCSIInquiryResponse, 96, decoded.VendorSpecific2, 0, SCSIInquiryResponse.Length - 96); + } + + if(SCSIInquiryResponse.Length >= 144) + { + // Seagate 2 + decoded.Seagate2Present = true; + decoded.Seagate_Copyright = new byte[48]; + Array.Copy(SCSIInquiryResponse, 96, decoded.Seagate_Copyright, 0, 48); + } + + if(SCSIInquiryResponse.Length < 148) + return decoded; + + // Seagate 2 + decoded.Seagate3Present = true; + decoded.Seagate_ServoPROMPartNo = new byte[4]; + Array.Copy(SCSIInquiryResponse, 144, decoded.Seagate_ServoPROMPartNo, 0, 4); + + return decoded; + } + + /// Encodes a SCSI INQUIRY response + /// Decoded SCSI INQUIRY + /// Raw SCSI INQUIRY response + public static byte[] Encode(Inquiry? inq) + { + if(inq is null) + return null; + + Inquiry decoded = inq.Value; + + byte[] buffer = new byte[512]; + byte length = 0; + + buffer[0] = (byte)(decoded.PeripheralQualifier << 5); + buffer[0] += decoded.PeripheralDeviceType; + + if(decoded.RMB) + buffer[1] = 0x80; + + buffer[1] += decoded.DeviceTypeModifier; + + buffer[2] = (byte)(decoded.ISOVersion << 6); + buffer[2] += (byte)(decoded.ECMAVersion << 3); + buffer[2] += decoded.ANSIVersion; + + if(decoded.AERC) + buffer[3] = 0x80; + + if(decoded.TrmTsk) + buffer[3] += 0x40; + + if(decoded.NormACA) + buffer[3] += 0x20; + + if(decoded.HiSup) + buffer[3] += 0x10; + + buffer[3] += decoded.ResponseDataFormat; + + if(decoded.AdditionalLength > 0) + { + length = 5; + buffer[4] = decoded.AdditionalLength; + } + + if(decoded.SCCS || + decoded.ACC || + decoded.TPGS > 0 || + decoded.ThreePC || + decoded.Reserved2 > 0 || + decoded.Protect) + { + length = 6; + + if(decoded.SCCS) + buffer[5] = 0x80; + + if(decoded.ACC) + buffer[5] += 0x40; + + buffer[5] += (byte)(decoded.TPGS << 4); + + if(decoded.ThreePC) + buffer[5] += 0x08; + + buffer[5] += (byte)(decoded.Reserved2 << 1); + + if(decoded.Protect) + buffer[5] += 0x01; + } + + if(decoded.BQue || + decoded.EncServ || + decoded.VS1 || + decoded.MultiP || + decoded.MChngr || + decoded.ACKREQQ || + decoded.Addr32 || + decoded.Addr16) + { + length = 7; + + if(decoded.BQue) + buffer[6] = 0x80; + + if(decoded.EncServ) + buffer[6] += 0x40; + + if(decoded.VS1) + buffer[6] += 0x20; + + if(decoded.MultiP) + buffer[6] += 0x10; + + if(decoded.MChngr) + buffer[6] += 0x08; + + if(decoded.ACKREQQ) + buffer[6] += 0x04; + + if(decoded.Addr32) + buffer[6] += 0x02; + + if(decoded.Addr16) + buffer[6] += 0x01; + } + + if(decoded.RelAddr || + decoded.WBus32 || + decoded.WBus16 || + decoded.Sync || + decoded.Linked || + decoded.TranDis || + decoded.CmdQue || + decoded.SftRe) + + { + length = 8; + + if(decoded.RelAddr) + buffer[7] = 0x80; + + if(decoded.WBus32) + buffer[7] += 0x40; + + if(decoded.WBus16) + buffer[7] += 0x20; + + if(decoded.Sync) + buffer[7] += 0x10; + + if(decoded.Linked) + buffer[7] += 0x08; + + if(decoded.TranDis) + buffer[7] += 0x04; + + if(decoded.CmdQue) + buffer[7] += 0x02; + + if(decoded.SftRe) + buffer[7] += 0x01; + } + + if(decoded.VendorIdentification != null) + { + length = 16; + + Array.Copy(decoded.VendorIdentification, 0, buffer, 8, + decoded.VendorIdentification.Length >= 8 ? 8 : decoded.VendorIdentification.Length); + } + + if(decoded.ProductIdentification != null) + { + length = 32; + + Array.Copy(decoded.ProductIdentification, 0, buffer, 16, + decoded.ProductIdentification.Length >= 16 ? 16 : decoded.ProductIdentification.Length); + } + + if(decoded.ProductRevisionLevel != null) + { + length = 36; + + Array.Copy(decoded.ProductRevisionLevel, 0, buffer, 32, + decoded.ProductRevisionLevel.Length >= 4 ? 4 : decoded.ProductRevisionLevel.Length); + } + + if(decoded.Seagate_DriveSerialNumber != null) + { + length = 44; + Array.Copy(decoded.Seagate_DriveSerialNumber, 0, buffer, 36, 8); + } + + if(decoded.KreonIdentifier != null && + decoded.KreonVersion != null) + { + length = 46; + Array.Copy(decoded.KreonIdentifier, 0, buffer, 36, 5); + buffer[41] = decoded.KreonSpace; + Array.Copy(decoded.KreonVersion, 0, buffer, 42, 5); + } + + if(decoded.HP_WORM || + decoded.HP_WORMVersion > 0 || + decoded.HP_OBDR != null) + { + length = 49; + + if(decoded.HP_WORM) + buffer[40] = 0x01; + + buffer[40] += (byte)(decoded.HP_WORMVersion << 1); + Array.Copy(decoded.HP_OBDR, 0, buffer, 43, 6); + } + + if(decoded.IsHiMD) + { + length = 56; + Array.Copy(HiMDSignatureContents, 0, buffer, 36, 8); + + if(decoded.HiMDSpecific != null) + Array.Copy(decoded.HiMDSpecific, 0, buffer, 44, 12); + } + + if(decoded.VendorSpecific != null && + !decoded.IsHiMD) + { + length = 56; + Array.Copy(decoded.VendorSpecific, 0, buffer, 36, 20); + } + + if(decoded.Reserved3 > 0 || + decoded.Clocking > 0 || + decoded.QAS || + decoded.IUS) + { + length = 57; + buffer[56] = (byte)(decoded.Reserved3 << 4); + buffer[56] += (byte)(decoded.Clocking << 2); + + if(decoded.QAS) + buffer[56] += 0x02; + + if(decoded.IUS) + buffer[56] += 0x01; + } + + if(decoded.Reserved4 != 0) + { + length = 58; + buffer[57] = decoded.Reserved4; + } + + if(decoded.VersionDescriptors != null) + { + length = (byte)(58 + (decoded.VersionDescriptors.Length * 2)); + + for(int i = 0; i < decoded.VersionDescriptors.Length; i++) + Array.Copy(BitConverter.GetBytes(decoded.VersionDescriptors[i]), 0, buffer, 56 + (i * 2), 2); + } + + if(decoded.Reserved5 != null) + { + length = (byte)(74 + decoded.Reserved5.Length); + Array.Copy(decoded.Reserved5, 0, buffer, 74, decoded.Reserved5.Length); + } + + if(decoded.VendorSpecific2 != null) + { + length = (byte)(96 + decoded.VendorSpecific2.Length); + Array.Copy(decoded.VendorSpecific2, 0, buffer, 96, decoded.VendorSpecific2.Length); + } + + if(decoded.Seagate_Copyright != null) + { + length = 144; + Array.Copy(decoded.Seagate_Copyright, 0, buffer, 96, 48); + } + + if(decoded.Seagate_ServoPROMPartNo != null) + { + length = 148; + Array.Copy(decoded.Seagate_ServoPROMPartNo, 0, buffer, 144, 4); + } + + buffer[4] = length; + byte[] dest = new byte[length]; + Array.Copy(buffer, 0, dest, 0, length); + + return dest; + } + #endregion Public methods + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Structs/Devices/SCSI/Modes/2A.cs b/Aaru.CommonTypes/Structs/Devices/SCSI/Modes/2A.cs new file mode 100644 index 0000000..6541cf3 --- /dev/null +++ b/Aaru.CommonTypes/Structs/Devices/SCSI/Modes/2A.cs @@ -0,0 +1,514 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : 2A.cs +// Author(s) : Natalia Portillo +// +// Component : Common structures for SCSI devices. +// +// --[ Description ] ---------------------------------------------------------- +// +// Decodes SCSI MODE PAGE 2Ah: CD-ROM capabilities page. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.ComponentModel.DataAnnotations; +using System.Diagnostics.CodeAnalysis; +using Newtonsoft.Json; + +namespace Aaru.CommonTypes.Structs.Devices.SCSI.Modes +{ + #region Mode Page 0x2A: CD-ROM capabilities page + /// + /// CD-ROM capabilities page Page code 0x2A 16 bytes in OB-U0077C 20 bytes in SFF-8020i 22 bytes in MMC-1 26 bytes + /// in MMC-2 Variable bytes in MMC-3 + /// + [SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "MemberCanBeInternal"), + SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "NotAccessedField.Global")] + public class ModePage_2A + { + /// Write speed performance descriptors + public ModePage_2A_WriteDescriptor[] WriteSpeedPerformanceDescriptors; + /// Parameters can be saved + public bool PS { get; set; } + /// Drive supports multi-session and/or Photo-CD + public bool MultiSession { get; set; } + /// Drive is capable of reading sectors in Mode 2 Form 2 format + public bool Mode2Form2 { get; set; } + /// Drive is capable of reading sectors in Mode 2 Form 1 format + public bool Mode2Form1 { get; set; } + /// Drive is capable of playing audio + public bool AudioPlay { get; set; } + /// Drive can return the ISRC + public bool ISRC { get; set; } + /// Drive can return the media catalogue number + public bool UPC { get; set; } + /// Drive can return C2 pointers + public bool C2Pointer { get; set; } + /// Drive can read, deinterlave and correct R-W subchannels + public bool DeinterlaveSubchannel { get; set; } + /// Drive can read interleaved and uncorrected R-W subchannels + public bool Subchannel { get; set; } + /// Drive can continue from a loss of streaming on audio reading + public bool AccurateCDDA { get; set; } + /// Audio can be read as digital data + public bool CDDACommand { get; set; } + /// Loading Mechanism Type + public byte LoadingMechanism { get; set; } + /// Drive can eject discs + public bool Eject { get; set; } + /// Drive's optional prevent jumper status + public bool PreventJumper { get; set; } + /// Current lock status + public bool LockState { get; set; } + /// Drive can lock media + public bool Lock { get; set; } + /// Each channel can be muted independently + public bool SeparateChannelMute { get; set; } + /// Each channel's volume can be controlled independently + public bool SeparateChannelVolume { get; set; } + /// Maximum drive speed in Kbytes/second + public ushort MaximumSpeed { get; set; } + /// Supported volume levels + public ushort SupportedVolumeLevels { get; set; } + /// Buffer size in Kbytes + public ushort BufferSize { get; set; } + /// Current drive speed in Kbytes/second + public ushort CurrentSpeed { get; set; } + + /// Can read packet media + public bool Method2 { get; set; } + /// Can read CD-RW + public bool ReadCDRW { get; set; } + /// Can read CD-R + public bool ReadCDR { get; set; } + /// Can write CD-RW + public bool WriteCDRW { get; set; } + /// Can write CD-R + public bool WriteCDR { get; set; } + /// Supports IEC-958 digital output on port 2 + public bool DigitalPort2 { get; set; } + /// Supports IEC-958 digital output on port 1 + public bool DigitalPort1 { get; set; } + /// Can deliver a composite audio and video data stream + public bool Composite { get; set; } + /// This bit controls the behavior of the LOAD/UNLOAD command when trying to load a Slot with no Disc present + public bool SSS { get; set; } + /// Contains a changer that can report the exact contents of the slots + public bool SDP { get; set; } + /// Page length + public byte Length { get; set; } + /// Set if LSB comes first + public bool LSBF { get; set; } + /// Set if HIGH on LRCK indicates left channel. Clear if HIGH on LRCK indicates right channel. + public bool RCK { get; set; } + /// + /// Set if data valid on the falling edge of the BCK signal. Clear if data valid on the rising edge of the BCK + /// signal + /// + public bool BCK { get; set; } + + /// Can do a test write + public bool TestWrite { get; set; } + /// Maximum write speed + public ushort MaxWriteSpeed { get; set; } + /// Current write speed + public ushort CurrentWriteSpeed { get; set; } + /// Can read disc's barcode + public bool ReadBarcode { get; set; } + /// Can read DVD-RAM + public bool ReadDVDRAM { get; set; } + /// Can read DVD-R + public bool ReadDVDR { get; set; } + /// Can read DVD-ROM + public bool ReadDVDROM { get; set; } + /// Can write DVD-RAM + public bool WriteDVDRAM { get; set; } + /// Can write DVD-R + public bool WriteDVDR { get; set; } + /// Can read raw R-W subchannel from the Lead-In + public bool LeadInPW { get; set; } + /// Can read both sides of a disc + public bool SCC { get; set; } + /// Support copyright management + public ushort CMRSupported { get; set; } + /// Supports buffer under-run free recording + public bool BUF { get; set; } + /// Selected rotational control + public byte RotationControlSelected { get; set; } + /// Current write speed selected + public ushort CurrentWriteSpeedSelected { get; set; } + + /// Database ID + [JsonIgnore, Key] + public int Id { get; set; } + + /// Decodes the page 2Ah of a MODE SENSE response + /// Raw page 2Ah + /// Decoded page 2Ah + public static ModePage_2A Decode(byte[] pageResponse) + { + if((pageResponse?[0] & 0x40) == 0x40) + return null; + + if((pageResponse?[0] & 0x3F) != 0x2A) + return null; + + if(pageResponse[1] + 2 != pageResponse.Length) + return null; + + if(pageResponse.Length < 16) + return null; + + var decoded = new ModePage_2A(); + + decoded.PS |= (pageResponse[0] & 0x80) == 0x80; + + decoded.AudioPlay |= (pageResponse[4] & 0x01) == 0x01; + decoded.Mode2Form1 |= (pageResponse[4] & 0x10) == 0x10; + decoded.Mode2Form2 |= (pageResponse[4] & 0x20) == 0x20; + decoded.MultiSession |= (pageResponse[4] & 0x40) == 0x40; + + decoded.CDDACommand |= (pageResponse[5] & 0x01) == 0x01; + decoded.AccurateCDDA |= (pageResponse[5] & 0x02) == 0x02; + decoded.Subchannel |= (pageResponse[5] & 0x04) == 0x04; + decoded.DeinterlaveSubchannel |= (pageResponse[5] & 0x08) == 0x08; + decoded.C2Pointer |= (pageResponse[5] & 0x10) == 0x10; + decoded.UPC |= (pageResponse[5] & 0x20) == 0x20; + decoded.ISRC |= (pageResponse[5] & 0x40) == 0x40; + + decoded.LoadingMechanism = (byte)((pageResponse[6] & 0xE0) >> 5); + decoded.Lock |= (pageResponse[6] & 0x01) == 0x01; + decoded.LockState |= (pageResponse[6] & 0x02) == 0x02; + decoded.PreventJumper |= (pageResponse[6] & 0x04) == 0x04; + decoded.Eject |= (pageResponse[6] & 0x08) == 0x08; + + decoded.SeparateChannelVolume |= (pageResponse[7] & 0x01) == 0x01; + decoded.SeparateChannelMute |= (pageResponse[7] & 0x02) == 0x02; + + decoded.MaximumSpeed = (ushort)((pageResponse[8] << 8) + pageResponse[9]); + decoded.SupportedVolumeLevels = (ushort)((pageResponse[10] << 8) + pageResponse[11]); + decoded.BufferSize = (ushort)((pageResponse[12] << 8) + pageResponse[13]); + decoded.CurrentSpeed = (ushort)((pageResponse[14] << 8) + pageResponse[15]); + + if(pageResponse.Length < 20) + return decoded; + + decoded.Method2 |= (pageResponse[2] & 0x04) == 0x04; + decoded.ReadCDRW |= (pageResponse[2] & 0x02) == 0x02; + decoded.ReadCDR |= (pageResponse[2] & 0x01) == 0x01; + + decoded.WriteCDRW |= (pageResponse[3] & 0x02) == 0x02; + decoded.WriteCDR |= (pageResponse[3] & 0x01) == 0x01; + + decoded.Composite |= (pageResponse[4] & 0x02) == 0x02; + decoded.DigitalPort1 |= (pageResponse[4] & 0x04) == 0x04; + decoded.DigitalPort2 |= (pageResponse[4] & 0x08) == 0x08; + + decoded.SDP |= (pageResponse[7] & 0x04) == 0x04; + decoded.SSS |= (pageResponse[7] & 0x08) == 0x08; + + decoded.Length = (byte)((pageResponse[17] & 0x30) >> 4); + decoded.LSBF |= (pageResponse[17] & 0x08) == 0x08; + decoded.RCK |= (pageResponse[17] & 0x04) == 0x04; + decoded.BCK |= (pageResponse[17] & 0x02) == 0x02; + + if(pageResponse.Length < 22) + return decoded; + + decoded.TestWrite |= (pageResponse[3] & 0x04) == 0x04; + decoded.MaxWriteSpeed = (ushort)((pageResponse[18] << 8) + pageResponse[19]); + decoded.CurrentWriteSpeed = (ushort)((pageResponse[20] << 8) + pageResponse[21]); + + decoded.ReadBarcode |= (pageResponse[5] & 0x80) == 0x80; + + if(pageResponse.Length < 26) + return decoded; + + decoded.ReadDVDRAM |= (pageResponse[2] & 0x20) == 0x20; + decoded.ReadDVDR |= (pageResponse[2] & 0x10) == 0x10; + decoded.ReadDVDROM |= (pageResponse[2] & 0x08) == 0x08; + + decoded.WriteDVDRAM |= (pageResponse[3] & 0x20) == 0x20; + decoded.WriteDVDR |= (pageResponse[3] & 0x10) == 0x10; + + decoded.LeadInPW |= (pageResponse[3] & 0x20) == 0x20; + decoded.SCC |= (pageResponse[3] & 0x10) == 0x10; + + decoded.CMRSupported = (ushort)((pageResponse[22] << 8) + pageResponse[23]); + + if(pageResponse.Length < 32) + return decoded; + + decoded.BUF |= (pageResponse[4] & 0x80) == 0x80; + decoded.RotationControlSelected = (byte)(pageResponse[27] & 0x03); + decoded.CurrentWriteSpeedSelected = (ushort)((pageResponse[28] << 8) + pageResponse[29]); + + ushort descriptors = (ushort)((pageResponse.Length - 32) / 4); + decoded.WriteSpeedPerformanceDescriptors = new ModePage_2A_WriteDescriptor[descriptors]; + + for(int i = 0; i < descriptors; i++) + decoded.WriteSpeedPerformanceDescriptors[i] = new ModePage_2A_WriteDescriptor + { + RotationControl = (byte)(pageResponse[1 + 32 + (i * 4)] & 0x07), + WriteSpeed = (ushort)((pageResponse[2 + 32 + (i * 4)] << 8) + pageResponse[3 + 32 + (i * 4)]) + }; + + return decoded; + } + + /// Encodes a page 2Ah of a MODE SENSE response + /// Decoded page 2Ah + /// Raw page 2Ah + public static byte[] Encode(ModePage_2A decoded) + { + byte[] pageResponse = new byte[512]; + byte length = 16; + + pageResponse[0] = 0x2A; + + if(decoded.PS) + pageResponse[0] += 0x80; + + if(decoded.AudioPlay) + pageResponse[4] += 0x01; + + if(decoded.Mode2Form1) + pageResponse[4] += 0x10; + + if(decoded.Mode2Form2) + pageResponse[4] += 0x20; + + if(decoded.MultiSession) + pageResponse[4] += 0x40; + + if(decoded.CDDACommand) + pageResponse[5] += 0x01; + + if(decoded.AccurateCDDA) + pageResponse[5] += 0x02; + + if(decoded.Subchannel) + pageResponse[5] += 0x04; + + if(decoded.DeinterlaveSubchannel) + pageResponse[5] += 0x08; + + if(decoded.C2Pointer) + pageResponse[5] += 0x10; + + if(decoded.UPC) + pageResponse[5] += 0x20; + + if(decoded.ISRC) + pageResponse[5] += 0x40; + + decoded.LoadingMechanism = (byte)((pageResponse[6] & 0xE0) >> 5); + + if(decoded.Lock) + pageResponse[6] += 0x01; + + if(decoded.LockState) + pageResponse[6] += 0x02; + + if(decoded.PreventJumper) + pageResponse[6] += 0x04; + + if(decoded.Eject) + pageResponse[6] += 0x08; + + if(decoded.SeparateChannelVolume) + pageResponse[7] += 0x01; + + if(decoded.SeparateChannelMute) + pageResponse[7] += 0x02; + + decoded.MaximumSpeed = (ushort)((pageResponse[8] << 8) + pageResponse[9]); + decoded.SupportedVolumeLevels = (ushort)((pageResponse[10] << 8) + pageResponse[11]); + decoded.BufferSize = (ushort)((pageResponse[12] << 8) + pageResponse[13]); + decoded.CurrentSpeed = (ushort)((pageResponse[14] << 8) + pageResponse[15]); + + if(decoded.Method2 || + decoded.ReadCDRW || + decoded.ReadCDR || + decoded.WriteCDRW || + decoded.WriteCDR || + decoded.Composite || + decoded.DigitalPort1 || + decoded.DigitalPort2 || + decoded.SDP || + decoded.SSS || + decoded.Length > 0 || + decoded.LSBF || + decoded.RCK || + decoded.BCK) + { + length = 20; + + if(decoded.Method2) + pageResponse[2] += 0x04; + + if(decoded.ReadCDRW) + pageResponse[2] += 0x02; + + if(decoded.ReadCDR) + pageResponse[2] += 0x01; + + if(decoded.WriteCDRW) + pageResponse[3] += 0x02; + + if(decoded.WriteCDR) + pageResponse[3] += 0x01; + + if(decoded.Composite) + pageResponse[4] += 0x02; + + if(decoded.DigitalPort1) + pageResponse[4] += 0x04; + + if(decoded.DigitalPort2) + pageResponse[4] += 0x08; + + if(decoded.SDP) + pageResponse[7] += 0x04; + + if(decoded.SSS) + pageResponse[7] += 0x08; + + pageResponse[17] = (byte)(decoded.Length << 4); + + if(decoded.LSBF) + pageResponse[17] += 0x08; + + if(decoded.RCK) + pageResponse[17] += 0x04; + + if(decoded.BCK) + pageResponse[17] += 0x02; + } + + if(decoded.TestWrite || + decoded.MaxWriteSpeed > 0 || + decoded.CurrentWriteSpeed > 0 || + decoded.ReadBarcode) + { + length = 22; + + if(decoded.TestWrite) + pageResponse[3] += 0x04; + + pageResponse[18] = (byte)((decoded.MaxWriteSpeed & 0xFF00) >> 8); + pageResponse[19] = (byte)(decoded.MaxWriteSpeed & 0xFF); + pageResponse[20] = (byte)((decoded.CurrentWriteSpeed & 0xFF00) >> 8); + pageResponse[21] = (byte)(decoded.CurrentWriteSpeed & 0xFF); + + if(decoded.ReadBarcode) + pageResponse[5] += 0x80; + } + + if(decoded.ReadDVDRAM || + decoded.ReadDVDR || + decoded.ReadDVDROM || + decoded.WriteDVDRAM || + decoded.WriteDVDR || + decoded.LeadInPW || + decoded.SCC || + decoded.CMRSupported > 0) + + { + length = 26; + + if(decoded.ReadDVDRAM) + pageResponse[2] += 0x20; + + if(decoded.ReadDVDR) + pageResponse[2] += 0x10; + + if(decoded.ReadDVDROM) + pageResponse[2] += 0x08; + + if(decoded.WriteDVDRAM) + pageResponse[3] += 0x20; + + if(decoded.WriteDVDR) + pageResponse[3] += 0x10; + + if(decoded.LeadInPW) + pageResponse[3] += 0x20; + + if(decoded.SCC) + pageResponse[3] += 0x10; + + pageResponse[22] = (byte)((decoded.CMRSupported & 0xFF00) >> 8); + pageResponse[23] = (byte)(decoded.CMRSupported & 0xFF); + } + + if(decoded.BUF || + decoded.RotationControlSelected > 0 || + decoded.CurrentWriteSpeedSelected > 0) + { + length = 32; + + if(decoded.BUF) + pageResponse[4] += 0x80; + + pageResponse[27] += decoded.RotationControlSelected; + pageResponse[28] = (byte)((decoded.CurrentWriteSpeedSelected & 0xFF00) >> 8); + pageResponse[29] = (byte)(decoded.CurrentWriteSpeedSelected & 0xFF); + } + + if(decoded.WriteSpeedPerformanceDescriptors != null) + { + length = 32; + + for(int i = 0; i < decoded.WriteSpeedPerformanceDescriptors.Length; i++) + { + length += 4; + pageResponse[1 + 32 + (i * 4)] = decoded.WriteSpeedPerformanceDescriptors[i].RotationControl; + + pageResponse[2 + 32 + (i * 4)] = + (byte)((decoded.WriteSpeedPerformanceDescriptors[i].WriteSpeed & 0xFF00) >> 8); + + pageResponse[3 + 32 + (i * 4)] = + (byte)(decoded.WriteSpeedPerformanceDescriptors[i].WriteSpeed & 0xFF); + } + } + + pageResponse[1] = (byte)(length - 2); + byte[] buf = new byte[length]; + Array.Copy(pageResponse, 0, buf, 0, length); + + return buf; + } + } + + /// Page 2Ah write descriptor + [SuppressMessage("ReSharper", "InconsistentNaming")] + public struct ModePage_2A_WriteDescriptor + { + /// Rotational control + public byte RotationControl; + /// Write speed + public ushort WriteSpeed; + } + #endregion Mode Page 0x2A: CD-ROM capabilities page +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Structs/Filesystems.cs b/Aaru.CommonTypes/Structs/Filesystems.cs new file mode 100644 index 0000000..985ced8 --- /dev/null +++ b/Aaru.CommonTypes/Structs/Filesystems.cs @@ -0,0 +1,281 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Structs.cs +// Author(s) : Natalia Portillo +// +// Component : Common structures. +// +// --[ Description ] ---------------------------------------------------------- +// +// Contains enumerations and structures of common usage by filesystem +// plugins. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Runtime.InteropServices; +using Newtonsoft.Json; + +namespace Aaru.CommonTypes.Structs +{ + /// File attributes. + [Flags] + public enum FileAttributes : ulong + { + /// File has no attributes + None = 0, + /// File is an alias (Mac OS) + Alias = 0x01, + /// Indicates that the file can only be writable appended + AppendOnly = 0x02, + /// File is candidate for archival/backup + Archive = 0x04, + /// File is a block device + BlockDevice = 0x08, + /// File is stored on filesystem block units instead of device sectors + BlockUnits = 0x10, + /// Directory is a bundle or file contains a BNDL resource + Bundle = 0x20, + /// File is a char device + CharDevice = 0x40, + /// File is compressed + Compressed = 0x80, + /// File is compressed and should not be uncompressed on read + CompressedRaw = 0x100, + /// File has compression errors + CompressionError = 0x200, + /// Compressed file is dirty + CompressionDirty = 0x400, + /// File is a device + Device = 0x800, + /// File is a directory + Directory = 0x1000, + /// File is encrypted + Encrypted = 0x2000, + /// File is stored on disk using extents + Extents = 0x4000, + /// File is a FIFO + FIFO = 0x8000, + /// File is a normal file + File = 0x10000, + /// File is a Mac OS file containing desktop databases that has already been added to the desktop database + HasBeenInited = 0x20000, + /// File contains an icon resource / EA + HasCustomIcon = 0x40000, + /// File is a Mac OS extension or control panel lacking INIT resources + HasNoINITs = 0x80000, + /// File is hidden/invisible + Hidden = 0x100000, + /// File cannot be written, deleted, modified or linked to + Immutable = 0x200000, + /// Directory is indexed using hashed trees + IndexedDirectory = 0x400000, + /// File contents are stored alongside its inode (or equivalent) + Inline = 0x800000, + /// File contains integrity checks + IntegrityStream = 0x1000000, + /// File is on desktop + IsOnDesk = 0x2000000, + /// File changes are written to filesystem journal before being written to file itself + Journaled = 0x4000000, + /// Access time will not be modified + NoAccessTime = 0x8000000, + /// File will not be subject to copy-on-write + NoCopyOnWrite = 0x10000000, + /// File will not be backed up + NoDump = 0x20000000, + /// File contents should not be scrubbed + NoScrub = 0x40000000, + /// File contents should not be indexed + NotIndexed = 0x80000000, + /// File is offline + Offline = 0x100000000, + /// File is password protected, but contents are not encrypted on disk + Password = 0x200000000, + /// File is read-only + ReadOnly = 0x400000000, + /// File is a reparse point + ReparsePoint = 0x800000000, + /// When file is removed its content will be overwritten with zeroes + Secured = 0x1000000000, + /// File contents are sparse + Sparse = 0x2000000000, + /// File is a shadow (OS/2) + Shadow = 0x4000000000, + /// File is shared + Shared = 0x8000000000, + /// File is a stationery + Stationery = 0x10000000000, + /// File is a symbolic link + Symlink = 0x20000000000, + /// File writes are synchronously written to disk + Sync = 0x40000000000, + /// File belongs to the operating system + System = 0x80000000000, + /// If file end is a partial block its content will be merged with other files + TailMerged = 0x100000000000, + /// File is temporary + Temporary = 0x200000000000, + /// Subdirectories inside of this directory are not related and should be allocated elsewhere + TopDirectory = 0x400000000000, + /// If file is deleted, contents should be stored, for a possible future undeletion + Undeletable = 0x800000000000, + /// File is a pipe + Pipe = 0x1000000000000, + /// File is a socket + Socket = 0x2000000000000 + } + + /// Information about a file entry + public class FileEntryInfo + { + /// File attributes + public FileAttributes Attributes { get; set; } + /// File length in blocks + public long Blocks { get; set; } + /// File block size in bytes + public long BlockSize { get; set; } + /// If file points to a device, device number. Null if the underlying filesystem does not support them. + public ulong? DeviceNo { get; set; } + /// POSIX group ID. Null if the underlying filesystem does not support them. + public ulong? GID { get; set; } + /// inode number for this file (or other unique identifier for the volume) + public ulong Inode { get; set; } + /// File length in bytes + public long Length { get; set; } + /// Number of hard links pointing to this file (. and .. entries count as hard links) + public ulong Links { get; set; } + /// POSIX permissions/mode for this file. Null if the underlying filesystem does not support them. + public uint? Mode { get; set; } + /// POSIX owner ID. Null if the underlying filesystem does not support them. + public ulong? UID { get; set; } + /// File creation date in UTC. Null if the underlying filesystem does not support them. + public DateTime? CreationTimeUtc { get; set; } + /// File last access date in UTC. Null if the underlying filesystem does not support them. + public DateTime? AccessTimeUtc { get; set; } + /// File attributes change date in UTC. Null if the underlying filesystem does not support them. + public DateTime? StatusChangeTimeUtc { get; set; } + /// File last backup date in UTC. Null if the underlying filesystem does not support them. + public DateTime? BackupTimeUtc { get; set; } + /// File last modification date in UTC. Null if the underlying filesystem does not support them. + public DateTime? LastWriteTimeUtc { get; set; } + + /// File creation date. Null if the underlying filesystem does not support them. + [JsonIgnore] + public DateTime? CreationTime + { + get => CreationTimeUtc?.ToLocalTime(); + set => CreationTimeUtc = value?.ToUniversalTime(); + } + + /// File last access date. Null if the underlying filesystem does not support them. + [JsonIgnore] + public DateTime? AccessTime + { + get => AccessTimeUtc?.ToLocalTime(); + set => AccessTimeUtc = value?.ToUniversalTime(); + } + + /// File attributes change date. Null if the underlying filesystem does not support them. + [JsonIgnore] + public DateTime? StatusChangeTime + { + get => StatusChangeTimeUtc?.ToLocalTime(); + set => StatusChangeTimeUtc = value?.ToUniversalTime(); + } + + /// File last backup date. Null if the underlying filesystem does not support them. + [JsonIgnore] + public DateTime? BackupTime + { + get => BackupTimeUtc?.ToLocalTime(); + set => BackupTimeUtc = value?.ToUniversalTime(); + } + + /// File last modification date. Null if the underlying filesystem does not support them. + [JsonIgnore] + public DateTime? LastWriteTime + { + get => LastWriteTimeUtc?.ToLocalTime(); + set => LastWriteTimeUtc = value?.ToUniversalTime(); + } + } + + /// Information about a volume + public class FileSystemInfo + { + /// Blocks for this filesystem + public ulong Blocks; + /// Maximum length of filenames on this filesystem + public ushort FilenameLength; + /// Files on this filesystem + public ulong Files; + /// Blocks free on this filesystem + public ulong FreeBlocks; + /// Free inodes on this filesystem + public ulong FreeFiles; + /// Filesystem ID + public FileSystemId Id; + /// ID of plugin for this file + public Guid PluginId; + /// Filesystem type + public string Type; + + /// Initializes an empty instance of this structure + public FileSystemInfo() => Id = new FileSystemId(); + + /// Gets a clone of this structure + /// Clone of this structure + public FileSystemInfo ShallowCopy() => (FileSystemInfo)MemberwiseClone(); + } + + /// Stores a filesystem volume unique identifier or serial number + [StructLayout(LayoutKind.Explicit)] + public struct FileSystemId + { + /// Set to true if the identifier is a 32-bit integer + [FieldOffset(0)] + public bool IsInt; + /// Set to true if the identifier is a 64-bit integer + [FieldOffset(1)] + public bool IsLong; + /// Set to true if the identifier is a GUID + [FieldOffset(2)] + public bool IsGuid; + + /// Identifier as a 32-bit integer + [FieldOffset(3)] + public uint Serial32; + /// Identifier as a 64-bit integer + [FieldOffset(3)] + public ulong Serial64; + /// Identifier as a GUID + [FieldOffset(3)] + public Guid uuid; + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Structs/Images.cs b/Aaru.CommonTypes/Structs/Images.cs new file mode 100644 index 0000000..48aad8d --- /dev/null +++ b/Aaru.CommonTypes/Structs/Images.cs @@ -0,0 +1,190 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : IMediaImage.cs +// Author(s) : Natalia Portillo +// +// Component : Common structures. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines structures to be used by media image plugins. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Collections.Generic; +using Aaru.CommonTypes.Enums; +using Aaru.CommonTypes.Interfaces; + +namespace Aaru.CommonTypes.Structs +{ + /// Contains information about a dump image and its contents + public struct ImageInfo + { + /// Image contains partitions (or tracks for optical media) + public bool HasPartitions; + /// Image contains sessions (optical media only) + public bool HasSessions; + /// Size of the image without headers + public ulong ImageSize; + /// Sectors contained in the image + public ulong Sectors; + /// Size of sectors contained in the image + public uint SectorSize; + /// Media tags contained by the image + public List ReadableMediaTags; + /// Sector tags contained by the image + public List ReadableSectorTags; + /// Image version + public string Version; + /// Application that created the image + public string Application; + /// Version of the application that created the image + public string ApplicationVersion; + /// Who (person) created the image? + public string Creator; + /// Image creation time + public DateTime CreationTime; + /// Image last modification time + public DateTime LastModificationTime; + /// Title of the media represented by the image + public string MediaTitle; + /// Image comments + public string Comments; + /// Manufacturer of the media represented by the image + public string MediaManufacturer; + /// Model of the media represented by the image + public string MediaModel; + /// Serial number of the media represented by the image + public string MediaSerialNumber; + /// Barcode of the media represented by the image + public string MediaBarcode; + /// Part number of the media represented by the image + public string MediaPartNumber; + /// Media type represented by the image + public MediaType MediaType; + /// Number in sequence for the media represented by the image + public int MediaSequence; + /// Last media of the sequence the media represented by the image corresponds to + public int LastMediaSequence; + /// Manufacturer of the drive used to read the media represented by the image + public string DriveManufacturer; + /// Model of the drive used to read the media represented by the image + public string DriveModel; + /// Serial number of the drive used to read the media represented by the image + public string DriveSerialNumber; + /// Firmware revision of the drive used to read the media represented by the image + public string DriveFirmwareRevision; + /// Type of the media represented by the image to use in XML sidecars + public XmlMediaType XmlMediaType; + + // CHS geometry... + /// Cylinders of the media represented by the image + public uint Cylinders; + /// Heads of the media represented by the image + public uint Heads; + /// Sectors per track of the media represented by the image (for variable image, the smallest) + public uint SectorsPerTrack; + } + + /// Session defining structure. + public struct Session + { + /// Session number, 1-started + public ushort Sequence; + /// First track present on this session + public uint StartTrack; + /// Last track present on this session + public uint EndTrack; + /// First sector present on this session + public ulong StartSector; + /// Last sector present on this session + public ulong EndSector; + } + + /// Track defining structure. + public class Track + { + /// How many main channel / user data bytes are per sector in this track + public int BytesPerSector; + /// Information that does not find space in this struct + public string Description; + /// Track ending sector + public ulong EndSector; + /// Which file stores this track + public string File; + /// Starting at which byte is this track stored + public ulong FileOffset; + /// What kind of file is storing this track + public string FileType; + /// Which filter stores this track + public IFilter Filter; + /// Indexes, 00 to 99 and sector offset + public Dictionary Indexes; + /// Track pre-gap + public ulong Pregap; + /// How many main channel bytes per sector are in the file with this track + public int RawBytesPerSector; + /// Track number, 1-started + public uint Sequence; + /// Session this track belongs to + public ushort Session; + /// Track starting sector + public ulong StartSector; + /// Which file stores this track's subchannel + public string SubchannelFile; + /// Which filter stores this track's subchannel + public IFilter SubchannelFilter; + /// Starting at which byte are this track's subchannel stored + public ulong SubchannelOffset; + /// Type of subchannel stored for this track + public TrackSubchannelType SubchannelType; + /// Partition type + public TrackType Type; + + /// Initializes an empty instance of this structure + public Track() => Indexes = new Dictionary(); + } + + /// Floppy physical characteristics structure. + public struct FloppyInfo + { + /// Physical floppy type. + public FloppyTypes Type; + /// Bitrate in bits per second used to write the floppy, 0 if unknown or track-variable. + public uint Bitrate; + /// Physical magnetic density (coercivity) of floppy medium. + public FloppyDensities Coercivity; + /// How many physical tracks are actually written in the floppy image. + public ushort Tracks; + /// How many physical heads are actually written in the floppy image. + public byte Heads; + /// How many tracks per inch are actually written in the floppy image. + public ushort TrackDensity; + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Structs/TapeFile.cs b/Aaru.CommonTypes/Structs/TapeFile.cs new file mode 100644 index 0000000..59630a5 --- /dev/null +++ b/Aaru.CommonTypes/Structs/TapeFile.cs @@ -0,0 +1,53 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : TapeFile.cs +// Author(s) : Natalia Portillo +// +// Component : Common structures. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines a structure to hold information about a tape file object. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +namespace Aaru.CommonTypes.Structs +{ + /// Describes a tape file + public struct TapeFile + { + /// File number + public uint File; + /// Partition number + public byte Partition; + /// First block, inclusive, of the file + public ulong FirstBlock; + /// Last block, inclusive, of the file + public ulong LastBlock; + } +} \ No newline at end of file diff --git a/Aaru.CommonTypes/Structs/TapePartition.cs b/Aaru.CommonTypes/Structs/TapePartition.cs new file mode 100644 index 0000000..06bf96a --- /dev/null +++ b/Aaru.CommonTypes/Structs/TapePartition.cs @@ -0,0 +1,51 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : TapeFile.cs +// Author(s) : Natalia Portillo +// +// Component : Common structures. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines a structure to hold information about a tape partition. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +namespace Aaru.CommonTypes.Structs +{ + /// Describes a tape partition + public struct TapePartition + { + /// Partition number + public byte Number; + /// First block, inclusive, of the partition + public ulong FirstBlock; + /// Last block, inclusive, of the partition + public ulong LastBlock; + } +} \ No newline at end of file diff --git a/Aaru.Console/.editorconfig b/Aaru.Console/.editorconfig new file mode 100644 index 0000000..9181fe5 --- /dev/null +++ b/Aaru.Console/.editorconfig @@ -0,0 +1,632 @@ +root = true + +[*] +charset = utf-8 +next_line = crlf +insert_final_newline = false +indent_style = space +indent_size = 4 + +# Generic non-language specific ones for Resharper and friends +brace_style = next_line +int_align = true +keep_existing_arrangement = false +place_simple_blocks_on_single_line = true +place_simple_declaration_blocks_on_single_line = true +place_attribute_on_same_line = false +space_after_unary_operator = false +space_after_comma = true +space_around_ternary_operator = true +space_around_binary_operator = true +space_around_member_access_operator = false +space_before_open_square_brackets = false +space_after_keywords_in_control_flow_statements = true +space_before_comma = false +space_between_method_call_name_and_opening_parenthesis = false +space_between_method_declaration_name_and_open_parenthesis = false +space_between_square_brackets = false +space_between_parentheses_of_control_flow_statements = false +accessor_owner_declaration_braces = next_line +accessor_declaration_braces = next_line +case_block_braces = next_line +initializer_braces = next_line +other_braces = next_line +allow_comment_after_lbrace = false +empty_block_style = together_same_line +braces_for_ifelse = not_required +braces_for_for = not_required +braces_for_foreach = not_required +braces_for_while = not_required +braces_for_dowhile = not_required +braces_for_using = not_required +braces_for_lock = not_required +braces_for_fixed = not_required +method_or_operator_body = expression_body +local_function_body = expression_body +constructor_or_destructor_body = expression_body +accessor_owner_body = expression_body +force_attribute_style = join +function_braces = next_line +force_control_statements_braces = always_remove +space_in_singleline_accessorholder = true +type_declaration_braces = next_line +invocable_declaration_braces = next_line +anonymous_method_declaration_braces = next_line +space_between_accessors_in_singleline_property = true +indent_nested_usings_stmt = true +space_within_empty_braces = false +indent_nested_fixed_stmt = true +indent_nested_lock_stmt = true +indent_nested_for_stmt = true +indent_nested_foreach_stmt = true +indent_nested_while_stmt = true +use_continuous_indent_inside_parens = true +indent_method_decl_pars = inside +indent_invocation_pars = inside +indent_statement_pars = inside +indent_typeparam_angles = inside +indent_typearg_angles = inside +indent_pars = inside +indent_preprocessor_if = outdent +indent_preprocessor_region = usual_indent +indent_preprocessor_other = usual_indent +indent_switch_labels = true +indent_type_constraints = true +stick_comment = false +alignment_tab_fill_style = use_spaces +align_multiline_parameter = true +align_multiline_extends_list = true +align_linq_query = true +align_multiline_binary_expressions_chain = true +outdent_binary_ops = true +align_multiline_calls_chain = true +outdent_dots = true +align_multiline_array_and_object_initializer = false +indent_anonymous_method_block = false +align_first_arg_by_paren = true +align_multiline_argument = true +align_tuple_components = true +align_multiline_expression = true +align_multiline_for_stmt = true +align_multiple_declaration = true +align_multline_type_parameter_list = true +align_multline_type_parameter_constrains = true +int_align_fields = true +int_align_properties = true +int_align_methods = true +int_align_parameters = false +int_align_variables = true +int_align_assignments = true +int_align_nested_ternary = true +int_align_invocations = false +int_align_binary_expressions = true +int_align_comments = true +int_align_switch_sections = true +keep_user_linebreaks = false +keep_existing_arrangement = false +keep_existing_linebreaks = false +max_line_length = 120 +wrap_before_comma = false +special_else_if_treatment = true +place_type_attribute_on_same_line = never +place_method_attribute_on_same_line = never +place_accessorholder_attribute_on_same_line = never +place_attribute_on_same_line = never +place_accessor_attribute_on_same_line = never +place_attribute_on_same_line = never +place_field_attribute_on_same_line = never +place_attribute_on_same_line = never +wrap_parameters_style = wrap_if_long +keep_existing_declaration_parens_arrangement = false +wrap_before_declaration_lpar = false +wrap_after_declaration_lpar = false +wrap_before_declaration_rpar = false +place_constructor_initializer_on_same_line = true +keep_existing_expr_member_arrangement = false +place_expr_method_on_single_line = true +place_expr_property_on_single_line = true +place_expr_accessor_on_single_line = true +wrap_before_arrow_with_expressions = false +place_type_constraints_on_same_line = true +wrap_before_first_type_parameter_constraint = true +wrap_multiple_type_parameter_constraints_style = wrap_if_long +wrap_before_type_parameter_langle = true +wrap_before_extends_colon = false +wrap_extends_list_style = wrap_if_long +keep_existing_declaration_block_arrangement = false +place_abstract_accessorholder_on_single_line = true +place_simple_accessorholder_on_single_line = false +place_accessor_with_attrs_holder_on_single_line = false +place_simple_accessor_on_single_line = true +place_simple_method_on_single_line = false +keep_existing_enum_arrangement = false +place_simple_enum_on_single_line = false +wrap_enum_declaration = wrap_if_long +new_line_before_else = true +new_line_before_while = false +wrap_for_stmt_header_style = wrap_if_long +wrap_multiple_declaration_style = wrap_if_long +keep_existing_embedded_arrangement = false +place_simple_embedded_statement_on_same_line = false +place_simple_case_statement_on_same_line = true +keep_existing_embedded_block_arrangement = false +place_simple_embedded_block_on_same_line = false +place_simple_anonymousmethod_on_single_line = false +keep_existing_initializer_arrangement = false +place_simple_initializer_on_single_line = false +wrap_object_and_collection_initializer_style = chop_always +wrap_array_initializer_style = wrap_if_long +wrap_arguments_style = wrap_if_long +keep_existing_invocation_parens_arrangement = false +wrap_after_invocation_lpar = false +wrap_before_invocation_rpar = false +wrap_after_dot_in_method_calls = true +wrap_chained_method_calls = wrap_if_long +wrap_before_binary_opsign = false +wrap_chained_binary_expressions = wrap_if_long +force_chop_compound_if_expression = true +force_chop_compound_while_expression = true +force_chop_compound_do_expression = true +wrap_before_ternary_opsigns = true +wrap_ternary_expr_style = wrap_if_long +nested_ternary_style = expanded +wrap_linq_expressions = wrap_if_long +wrap_before_linq_expression = false +place_linq_into_on_new_line = false +wrap_verbatim_interpolated_strings = wrap_if_long +extra_spaces = remove_all +space_after_keywords_in_control_flow_statements = false +space_between_method_call_name_and_opening_parenthesis = false +space_between_method_declaration_name_and_open_parenthesis = false +space_before_typeof_parentheses = false +space_before_checked_parentheses = false +space_before_sizeof_parentheses = false +space_before_nameof_parentheses = false +space_between_keyword_and_expression = true +space_between_keyword_and_type = true +space_around_assignment_op = true +space_around_logical_op = true +space_around_binary_operator = true +space_around_equality_op = true +space_around_relational_op = true +space_around_bitwise_op = true +space_around_additive_op = true +space_around_multiplicative_op = true +space_around_shift_op = true +space_around_nullcoalescing_op = true +space_around_arrow_op = false +space_after_logical_not_op = false +space_after_unary_operator = false +space_after_cast = false +space_around_dot = false +space_around_lambda_arrow = true +space_before_pointer_asterik_declaration = false +space_before_nullable_mark = false +blank_lines_around_class_definition = 1 +namespace_indentation = all +space_within_template_argument = false +align_union_type_usage = true +space_in_singleline_method = true +space_in_singleline_anonymous_method = true +space_within_single_line_array_initializer_braces = true +space_around_arrow_op = false + +# These are for markup languages (HTML, XML, etc) +spaces_around_eq_in_pi_attribute = false +space_after_last_pi_attribute = true +pi_attributes_indent = align_by_first_attribute +blank_line_after_pi = true +spaces_around_eq_in_attribute = false +space_after_last_attribute = false +space_before_self_closing = true +attribute_style = on_single_line +attribute_indent = align_by_first_attribute +sort_attributes = true +sort_class_selectors = true +max_blank_lines_between_tags = 0 +linebreak_before_all_elements = true +linebreak_before_multiline_elements = true +quote_style = doublequoted +delete_quotes_from_solid_values = false +normalize_tag_names = true + + +[{.babelrc,.stylelintrc,jest.config,.eslintrc,.prettierrc,*.json,*.jsb3,*.jsb2,*.bowerrc}] +indent_size = 2 + +[*.js.map] +indent_size = 2 + +[*.{css,scss}] +indent_size = 2 +declarations_style = separate_lines_for_nonsingle +media_query_style = separate_lines +selector_style = same_line +properties_style = separate_lines_for_nonsingle +brace_style = next_line + +[{.analysis_options,*.yml,*.yaml}] +indent_size = 2 + +# Xml project files +[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}] +indent_size = 2 + +# Xml files +[*.{xml,stylecop,resx,ruleset}] +indent_size = 2 + +# Xml config files +[*.{props,targets,config,nuspec}] +indent_size = 2 + +# .net files +[*.{cs,vb}] +# These set the this. / Me. +dotnet_style_qualification_for_field = false:warning +dotnet_style_qualification_for_property = false:warning +dotnet_style_qualification_for_method = false:warning +dotnet_style_qualification_for_event = false:warning + +# These make it suggest Int32 instead of int, etc. +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion +dotnet_style_predefined_type_for_member_access = true:suggestion + +# This controls implicit access modifiers +dotnet_style_require_accessibility_modifiers = never:suggestion + +# Prefer non modified fields to be marked readonly +dotnet_style_readonly_field = true:warning + +# Parenthesis settings +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning +dotnet_style_parentheses_in_other_operators = always_for_clarity:warning + +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:error +dotnet_style_prefer_inferred_tuple_names = true:warning +dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning +dotnet_style_prefer_conditional_expression_over_return = true:warning +dotnet_style_coalesce_expression = true:warning +dotnet_style_null_propagation = true:error + +dotnet_sort_system_directives_first = true + +# Constants in C style, all-caps +dotnet_naming_rule.constant_fields_caps.symbols = constant_fields +dotnet_naming_rule.constant_fields_caps.severity = warning +dotnet_naming_rule.constant_fields_caps.style = caps_style +dotnet_naming_symbols.constant_fields.applicable_kinds = field +dotnet_naming_symbols.constant_fields.required_modifiers = const +dotnet_naming_style.caps_style.capitalization = all_upper + +# interfaces should be prefixed with I +dotnet_naming_rule.pascal_case_for_interface.severity = error +dotnet_naming_rule.pascal_case_for_interface.symbols = interfaces_fields +dotnet_naming_rule.pascal_case_for_interface.style = pascal_case_interface_style +dotnet_naming_symbols.interfaces_fields.applicable_kinds = interface +dotnet_naming_style.pascal_case_interface_style.required_prefix = I +dotnet_naming_style.pascal_case_interface_style.capitalization = pascal_case + +## internal and private fields should be _camelCase +dotnet_naming_rule.camel_case_for_private_internal_fields.severity = warning +dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields +dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style +dotnet_naming_symbols.private_internal_fields.applicable_kinds = field +dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal +dotnet_naming_style.camel_case_underscore_style.required_prefix = _ +dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case + +# 2018-12-07 NP: This is not yet working in VS2017 +# local variables should be camelCase +#dotnet_naming_rule.camel_case_for_locals.severity = suggestion +#dotnet_naming_rule.camel_case_for_locals.symbols = local_fields +#dotnet_naming_rule.camel_case_for_locals.style = camel_case_style +#dotnet_naming_symbols.local_fields.applicable_kinds = local +#dotnet_naming_style.camel_case_style.capitalization = camel_case + +[*.cs] +# var var var +csharp_style_var_for_built_in_types = false:warning +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_var_elsewhere = false:warning + +csharp_style_expression_bodied_methods = when_on_single_line:suggestion +csharp_style_expression_bodied_constructors = when_on_single_line:suggestion +csharp_style_expression_bodied_operators = when_on_single_line:suggestion +csharp_style_expression_bodied_properties = when_on_single_line:suggestion +csharp_style_expression_bodied_indexers = when_on_single_line:suggestion +csharp_style_expression_bodied_accessors = when_on_single_line:suggestion + +csharp_style_pattern_matching_over_is_with_cast_check = true:warning +csharp_style_pattern_matching_over_as_with_null_check = when_on_single_line:warning + +csharp_style_inlined_variable_declaration = true:warning + +csharp_prefer_simple_default_expression = true:warning +csharp_style_deconstructed_variable_declaration = false:warning + +csharp_style_throw_expression = true:warning +csharp_style_conditional_delegate_call = true:warning + +csharp_prefer_braces = false + +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_between_query_expression_clauses = true + +csharp_indent_case_contents = true +csharp_indent_switch_labels = true +csharp_indent_labels = flush_left + +csharp_space_after_cast = false +csharp_space_after_keywords_in_control_flow_statements = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = none +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_around_binary_operators = before_and_after +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false + +csharp_preserve_single_line_statements = false +csharp_preserve_single_line_blocks = true + +csharp_blank_lines_around_region = 0 +csharp_blank_lines_inside_region = 0 +csharp_blank_lines_before_single_line_comment = 1 +csharp_keep_blank_lines_in_declarations = 1 +csharp_remove_blank_lines_near_braces_in_declarations = true +csharp_blank_lines_after_start_comment = false +csharp_blank_lines_between_using_groups = 0 +csharp_blank_lines_after_using_list = 1 +csharp_blank_lines_around_namespace = 1 +csharp_blank_lines_inside_namespace = 0 +csharp_blank_lines_around_type = 1 +csharp_blank_lines_inside_type = 0 +csharp_blank_lines_around_field = 0 +csharp_blank_lines_around_single_line_field = 0 +csharp_blank_lines_around_property = 1 +csharp_blank_lines_around_single_line_property = 0 +csharp_blank_lines_around_auto_property = 0 +csharp_blank_lines_around_single_line_auto_property = 0 +csharp_blank_lines_around_invocable = 1 +csharp_blank_lines_around_single_line_invocable = 1 +csharp_keep_blank_lines_in_code = 1 +csharp_remove_blank_lines_near_braces_in_code = true +csharp_blank_lines_around_local_method = 1 +csharp_blank_lines_around_single_line_local_method = 1 +csharp_blank_lines_before_control_transfer_statements = 1 +csharp_blank_lines_after_control_transfer_statements = 1 +csharp_blank_lines_before_block_statements = 1 +csharp_blank_lines_after_block_statements = 1 +csharp_blank_lines_before_multiline_statements = 1 +csharp_blank_lines_after_multiline_statements = 1 + +csharp_type_declaration_braces = next_line +csharp_brace_style = next_line +csharp_indent_inside_namespace = true +csharp_invocable_declaration_braces = next_line +csharp_anonymous_method_declaration_braces = next_line +csharp_accessor_owner_declaration_braces = next_line +csharp_accessor_declaration_braces = next_line +csharp_case_block_braces = next_line +csharp_initializer_braces = next_line +csharp_other_braces = next_line +csharp_allow_comment_after_lbrace = false +csharp_empty_block_style = together_same_line + +csharp_for_built_in_types = use_explicit_type +csharp_for_simple_types = use_var_when_evident +csharp_for_other_types = use_explicit_type +csharp_prefer_separate_deconstructed_variables_declaration = true +csharp_prefer_explicit_discard_declaration = false + +csharp_instance_members_qualify_members = none +csharp_builtin_type_reference_style = use_keyword +csharp_prefer_qualified_reference = false +csharp_add_imports_to_deepest_scope = false +csharp_allow_alias = true +csharp_default_private_modifier = implicit +csharp_default_internal_modifier = explicit +csharp_arguments_literal = positional +csharp_arguments_string_literal = positional +csharp_arguments_named = positional +csharp_arguments_anonymous_function = positional +csharp_arguments_other = positional +csharp_braces_for_ifelse = not_required +csharp_braces_for_for = not_required +csharp_braces_for_foreach = not_required +csharp_braces_for_while = not_required +csharp_braces_for_dowhile = not_required +csharp_braces_for_using = not_required +csharp_braces_for_lock = not_required +csharp_braces_for_fixed = not_required +csharp_method_or_operator_body = expression_body +csharp_local_function_body = expression_body +csharp_constructor_or_destructor_body = expression_body +csharp_accessor_owner_body = expression_body +csharp_force_attribute_style = join +csharp_indent_nested_usings_stmt = true + +csharp_builtin_type_reference_for_member_access_style = use_keyword +csharp_indent_nested_fixed_stmt = true +csharp_indent_nested_lock_stmt = true +csharp_indent_nested_for_stmt = true +csharp_indent_nested_foreach_stmt = true +csharp_indent_nested_while_stmt = true +csharp_use_continuous_indent_inside_parens = true +csharp_indent_method_decl_pars = inside +csharp_indent_invocation_pars = inside +csharp_indent_statement_pars = inside +csharp_indent_typeparam_angles = inside +csharp_indent_typearg_angles = inside +csharp_indent_pars = inside +csharp_indent_preprocessor_if = outdent +csharp_indent_preprocessor_region = usual_indent +csharp_indent_preprocessor_other = usual_indent +csharp_indent_switch_labels = true +csharp_indent_type_constraints = true +csharp_stick_comment = false +csharp_alignment_tab_fill_style = use_spaces +csharp_align_multiline_parameter = true +csharp_align_multiline_extends_list = true +csharp_align_linq_query = true +csharp_align_multiline_binary_expressions_chain = true +csharp_outdent_binary_ops = true +csharp_align_multiline_calls_chain = true +csharp_outdent_dots = true +csharp_align_multiline_array_and_object_initializer = false +csharp_indent_anonymous_method_block = false +csharp_align_first_arg_by_paren = true +csharp_align_multiline_argument = true +csharp_align_tuple_components = true +csharp_align_multiline_expression = true +csharp_align_multiline_for_stmt = true +csharp_align_multiple_declaration = true +csharp_align_multline_type_parameter_list = true +csharp_align_multline_type_parameter_constrains = true +csharp_int_align_fields = true +csharp_int_align_properties = true +csharp_int_align_methods = true +csharp_int_align_parameters = false +csharp_int_align_variables = true +csharp_int_align_assignments = true +csharp_int_align_nested_ternary = true +csharp_int_align_invocations = false +csharp_int_align_binary_expressions = true +csharp_int_align_comments = true +csharp_int_align_switch_sections = true +csharp_int_align = true +csharp_keep_user_linebreaks = false +csharp_keep_existing_arrangement = false +csharp_keep_existing_linebreaks = false +csharp_max_line_length = 120 +csharp_wrap_before_comma = false +csharp_special_else_if_treatment = true +csharp_insert_final_newline = false +csharp_place_type_attribute_on_same_line = never +csharp_place_method_attribute_on_same_line = never +csharp_place_accessorholder_attribute_on_same_line = never +csharp_place_attribute_on_same_line = never +csharp_place_accessor_attribute_on_same_line = never +csharp_place_attribute_on_same_line = never +csharp_place_field_attribute_on_same_line = never +csharp_place_attribute_on_same_line = never +csharp_wrap_parameters_style = wrap_if_long +csharp_keep_existing_declaration_parens_arrangement = false +csharp_wrap_before_declaration_lpar = false +csharp_wrap_after_declaration_lpar = false +csharp_wrap_before_declaration_rpar = false +csharp_place_constructor_initializer_on_same_line = true +csharp_keep_existing_expr_member_arrangement = false +csharp_place_expr_method_on_single_line = true +csharp_place_expr_property_on_single_line = true +csharp_place_expr_accessor_on_single_line = true +csharp_wrap_before_arrow_with_expressions = false +csharp_place_type_constraints_on_same_line = true +csharp_wrap_before_first_type_parameter_constraint = true +csharp_wrap_multiple_type_parameter_constraints_style = wrap_if_long +csharp_wrap_before_type_parameter_langle = true +csharp_wrap_before_extends_colon = false +csharp_wrap_extends_list_style = wrap_if_long +csharp_keep_existing_declaration_block_arrangement = false +csharp_place_abstract_accessorholder_on_single_line = true +csharp_place_simple_accessorholder_on_single_line = false +csharp_place_accessor_with_attrs_holder_on_single_line = false +csharp_place_simple_accessor_on_single_line = true +csharp_place_simple_method_on_single_line = false +csharp_keep_existing_enum_arrangement = false +csharp_place_simple_enum_on_single_line = false +csharp_wrap_enum_declaration = wrap_if_long +csharp_new_line_before_else = true +csharp_new_line_before_while = false +csharp_wrap_for_stmt_header_style = wrap_if_long +csharp_wrap_multiple_declaration_style = wrap_if_long +csharp_keep_existing_embedded_arrangement = false +csharp_place_simple_embedded_statement_on_same_line = false +csharp_place_simple_case_statement_on_same_line = true +csharp_keep_existing_embedded_block_arrangement = false +csharp_place_simple_embedded_block_on_same_line = false +csharp_place_simple_anonymousmethod_on_single_line = false +csharp_keep_existing_initializer_arrangement = false +csharp_place_simple_initializer_on_single_line = false +csharp_wrap_object_and_collection_initializer_style = chop_always +csharp_wrap_array_initializer_style = wrap_if_long +csharp_wrap_arguments_style = wrap_if_long +csharp_keep_existing_invocation_parens_arrangement = false +csharp_wrap_after_invocation_lpar = false +csharp_wrap_before_invocation_rpar = false +csharp_wrap_after_dot_in_method_calls = true +csharp_wrap_chained_method_calls = wrap_if_long +csharp_wrap_before_binary_opsign = false +csharp_wrap_chained_binary_expressions = wrap_if_long +csharp_force_chop_compound_if_expression = true +csharp_force_chop_compound_while_expression = true +csharp_force_chop_compound_do_expression = true +csharp_wrap_before_ternary_opsigns = true +csharp_wrap_ternary_expr_style = wrap_if_long +csharp_nested_ternary_style = expanded +csharp_wrap_linq_expressions = wrap_if_long +csharp_wrap_before_linq_expression = false +csharp_place_linq_into_on_new_line = false +csharp_wrap_verbatim_interpolated_strings = wrap_if_long +csharp_extra_spaces = remove_all +csharp_space_after_keywords_in_control_flow_statements = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_declaration_name_and_open_parenthesis = false +csharp_space_before_typeof_parentheses = false +csharp_space_before_checked_parentheses = false +csharp_space_before_sizeof_parentheses = false +csharp_space_before_nameof_parentheses = false +csharp_space_between_keyword_and_expression = true +csharp_space_between_keyword_and_type = true +csharp_space_around_assignment_op = true +csharp_space_around_logical_op = true +csharp_space_around_binary_operator = true +csharp_space_around_equality_op = true +csharp_space_around_relational_op = true +csharp_space_around_bitwise_op = true +csharp_space_around_additive_op = true +csharp_space_around_multiplicative_op = true +csharp_space_around_shift_op = true +csharp_space_around_nullcoalescing_op = true +csharp_space_around_arrow_op = false +csharp_space_after_logical_not_op = false +csharp_space_after_unary_operator = false +csharp_space_after_cast = false +csharp_space_around_dot = false +csharp_space_around_lambda_arrow = true +csharp_space_before_pointer_asterik_declaration = false +csharp_space_before_nullable_mark = false + +[*.cshtml] +linebreaks_around_razor_statements = true +blank_lines_around_razor_functions = true +blank_lines_around_razor_helpers = true +blank_lines_around_razor_sections = true + +# C++ +[*.{cc,cpp,cxx,h,hpp,hxx}] +cpp_indent_access_specifiers_from_class = true +cpp_indent_wrapped_function_names = false +cpp_align_multiline_type_argument = true + +# C, C++ and ObjectiveC +[*.{c,h,cc,cpp,cxx,m,hpp,hxx}] +indent_preprocessor_directives = normal +indent_type_constraints = true + +# Javascript and Typescript +[*.{js,js.map,ts}] +quote_style = doublequoted +termination_style = ensure_semicolon \ No newline at end of file diff --git a/Aaru.Console/.gitignore b/Aaru.Console/.gitignore new file mode 100644 index 0000000..05c540d --- /dev/null +++ b/Aaru.Console/.gitignore @@ -0,0 +1,595 @@ +### VisualStudio template +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ +### Linux template + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* +### Xcode template +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +build/ +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +### VisualStudioCode template +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +### C++ template +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o + +# Precompiled Headers +*.gch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app +### MonoDevelop template +#User Specific +*.usertasks + +#Mono Project Files +*.resources +test-results/ +### GPG template +secring.* + +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/modules.xml +# .idea/*.iml +# .idea/modules + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests +### CMake template +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +### C template +# Object files +*.ko +*.elf + +# Linker output +*.map +*.exp + +*.so.* + +# Executables +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf +### Windows template +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# NuGet Packages Directory +packages/ +## TODO: If the tool you use requires repositories.config uncomment the next line +#!packages/repositories.config + +# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets +# This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented) +!packages/build/ + + +# Others +sql/ +*.Cache + +# Visual Studio 2017 +.vs + +workspace.xml +cmake-build-debug +### macOS template +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +pkg/**/pkg +pkg/**/src +pkg/**/*.asc +pkg/**/*.sig +pkg/**/*.tar.xz +pkg/**/*.zip +pkg/**/aaru + +.sonarqube \ No newline at end of file diff --git a/Aaru.Console/Aaru.Console.csproj b/Aaru.Console/Aaru.Console.csproj new file mode 100644 index 0000000..2847562 --- /dev/null +++ b/Aaru.Console/Aaru.Console.csproj @@ -0,0 +1,103 @@ + + + + Debug + AnyCPU + 2.0 + {CCAA7AFE-C094-4D82-A66D-630DE8A3F545} + Library + Aaru.Console + Aaru.Console + $(Version) + false + true + 6.0.0-alpha6 + Claunia.com + Copyright © 2011-2021 Natalia Portillo + Aaru Data Preservation Suite + Aaru.Console + $(Version) + net6 + 10 + Contains console implementation used by the Aaru Data Preservation Suite. + https://github.com/aaru-dps/ + LGPL-2.1-only + https://github.com/aaru-dps/Aaru.Console + true + en-US + true + true + snupkg + Natalia Portillo <claunia@claunia.com> + true + + + $(Version)+{chash:8} + true + true + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + + + + + + + LICENSE.LGPL + + + + + + + + + + + + + + + + + + + + + /Library/Frameworks/Mono.framework/Versions/Current/lib/mono + /usr/lib/mono + /usr/local/lib/mono + + $(BaseFrameworkPathOverrideForMono)/4.0-api + $(BaseFrameworkPathOverrideForMono)/4.5-api + $(BaseFrameworkPathOverrideForMono)/4.5.1-api + $(BaseFrameworkPathOverrideForMono)/4.5.2-api + $(BaseFrameworkPathOverrideForMono)/4.6-api + $(BaseFrameworkPathOverrideForMono)/4.6.1-api + $(BaseFrameworkPathOverrideForMono)/4.6.2-api + $(BaseFrameworkPathOverrideForMono)/4.7-api + $(BaseFrameworkPathOverrideForMono)/4.7.1-api + true + + $(FrameworkPathOverride)/Facades;$(AssemblySearchPaths) + + \ No newline at end of file diff --git a/Aaru.Console/AaruConsole.cs b/Aaru.Console/AaruConsole.cs new file mode 100644 index 0000000..f5ccbb4 --- /dev/null +++ b/Aaru.Console/AaruConsole.cs @@ -0,0 +1,236 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : AaruConsole.cs +// Author(s) : Natalia Portillo +// +// Component : Console. +// +// --[ Description ] ---------------------------------------------------------- +// +// Handlers for normal, verbose and debug consoles. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +namespace Aaru.Console +{ + /// + /// Writes the text representation of the specified array of objects, followed by the current line terminator, to + /// the standard output console using the specified format information. + /// + /// A composite format string. + /// An array of objects to write using . + public delegate void WriteLineHandler(string format, params object[] arg); + + /// + /// Writes the text representation of the specified array of objects, followed by the current line terminator, to + /// the error output console using the specified format information. + /// + /// A composite format string. + /// An array of objects to write using . + public delegate void ErrorWriteLineHandler(string format, params object[] arg); + + /// + /// Writes the text representation of the specified array of objects, followed by the current line terminator, to + /// the verbose output console using the specified format information. + /// + /// A composite format string. + /// An array of objects to write using . + public delegate void VerboseWriteLineHandler(string format, params object[] arg); + + /// + /// Writes the text representation of the specified array of objects, followed by the current line terminator, to + /// the debug output console using the specified format information. + /// + /// A composite format string. + /// An array of objects to write using . + public delegate void DebugWriteLineHandler(string format, params object[] arg); + + /// + /// Writes the text representation of the specified array of objects, to the standard output console using the + /// specified format information. + /// + /// A composite format string. + /// An array of objects to write using . + public delegate void WriteHandler(string format, params object[] arg); + + /// + /// Writes the text representation of the specified array of objects, to the error output console using the + /// specified format information. + /// + /// A composite format string. + /// An array of objects to write using . + public delegate void ErrorWriteHandler(string format, params object[] arg); + + /// + /// Writes the text representation of the specified array of objects, to the verbose output console using the + /// specified format information. + /// + /// A composite format string. + /// An array of objects to write using . + public delegate void VerboseWriteHandler(string format, params object[] arg); + + /// + /// Writes the text representation of the specified array of objects, to the debug output console using the + /// specified format information. + /// + /// A composite format string. + /// An array of objects to write using . + public delegate void DebugWriteHandler(string format, params object[] arg); + + /// + /// Writes the text representation of the specified array of objects, followed by the current line terminator, to + /// the debug output console using the specified format information. + /// + /// Description of the module writing to the debug console + /// A composite format string. + /// An array of objects to write using . + public delegate void DebugWithModuleWriteLineHandler(string module, string format, params object[] arg); + + /// + /// Implements a console abstraction that defines four level of messages that can be routed to different consoles: + /// standard, error, verbose and debug. + /// + public static class AaruConsole + { + /// Event to receive writings to the standard output console that should be followed by a line termination. + public static event WriteLineHandler WriteLineEvent; + /// Event to receive writings to the error output console that should be followed by a line termination. + public static event ErrorWriteLineHandler ErrorWriteLineEvent; + /// Event to receive writings to the verbose output console that should be followed by a line termination. + public static event VerboseWriteLineHandler VerboseWriteLineEvent; + /// Event to receive line terminations to the debug output console. + public static event DebugWriteLineHandler DebugWriteLineEvent; + /// Event to receive writings to the debug output console that should be followed by a line termination. + public static event DebugWithModuleWriteLineHandler DebugWithModuleWriteLineEvent; + /// Event to receive writings to the standard output console. + public static event WriteHandler WriteEvent; + /// Event to receive writings to the error output console. + public static event ErrorWriteHandler ErrorWriteEvent; + /// Event to receive writings to the verbose output console. + public static event VerboseWriteHandler VerboseWriteEvent; + /// Event to receive writings to the debug output console. + public static event DebugWriteHandler DebugWriteEvent; + + /// + /// Writes the text representation of the specified array of objects, followed by the current line terminator, to + /// the standard output console using the specified format information. + /// + /// A composite format string. + /// An array of objects to write using . + public static void WriteLine(string format, params object[] arg) => WriteLineEvent?.Invoke(format, arg); + + /// + /// Writes the text representation of the specified array of objects, followed by the current line terminator, to + /// the error output console using the specified format information. + /// + /// A composite format string. + /// An array of objects to write using . + public static void ErrorWriteLine(string format, params object[] arg) => + ErrorWriteLineEvent?.Invoke(format, arg); + + /// + /// Writes the text representation of the specified array of objects, followed by the current line terminator, to + /// the verbose output console using the specified format information. + /// + /// A composite format string. + /// An array of objects to write using . + public static void VerboseWriteLine(string format, params object[] arg) => + VerboseWriteLineEvent?.Invoke(format, arg); + + /// + /// Writes the text representation of the specified array of objects, followed by the current line terminator, to + /// the debug output console using the specified format information. + /// + /// Description of the module writing to the debug console + /// A composite format string. + /// An array of objects to write using . + public static void DebugWriteLine(string module, string format, params object[] arg) + { + DebugWriteLineEvent?.Invoke("DEBUG (" + module + "): " + format, arg); + DebugWithModuleWriteLineEvent?.Invoke(module, format, arg); + } + + /// Writes the current line terminator to the standard output console. + public static void WriteLine() => WriteLineEvent?.Invoke("", null); + + /// Writes the current line terminator to the error output console. + public static void ErrorWriteLine() => ErrorWriteLineEvent?.Invoke("", null); + + /// Writes the current line terminator to the verbose output console. + public static void VerboseWriteLine() => VerboseWriteLineEvent?.Invoke("", null); + + /// Writes the current line terminator to the debug output console. + public static void DebugWriteLine() => DebugWriteLineEvent?.Invoke("", null); + + /// + /// Writes the text representation of the specified array of objects to the standard output console using the + /// specified format information. + /// + /// A composite format string. + /// An array of objects to write using . + public static void Write(string format, params object[] arg) => WriteEvent?.Invoke(format, arg); + + /// + /// Writes the text representation of the specified array of objects to the error output console using the + /// specified format information. + /// + /// A composite format string. + /// An array of objects to write using . + public static void ErrorWrite(string format, params object[] arg) => ErrorWriteEvent?.Invoke(format, arg); + + /// + /// Writes the text representation of the specified array of objects to the verbose output console using the + /// specified format information. + /// + /// A composite format string. + /// An array of objects to write using . + public static void VerboseWrite(string format, params object[] arg) => VerboseWriteEvent?.Invoke(format, arg); + + /// + /// Writes the text representation of the specified array of objects to the debug output console using the + /// specified format information. + /// + /// Description of the module writing to the debug console + /// A composite format string. + /// An array of objects to write using . + public static void DebugWrite(string module, string format, params object[] arg) => + DebugWriteEvent?.Invoke("DEBUG (" + module + "): " + format, arg); + + /// Writes the specified string value, followed by the current line terminator, to the standard output console. + /// The value to write. + public static void WriteLine(string value) => WriteLineEvent?.Invoke("{0}", value); + + /// Writes the specified string value, followed by the current line terminator, to the error output console. + /// The value to write. + public static void ErrorWriteLine(string value) => ErrorWriteLineEvent?.Invoke("{0}", value); + + /// Writes the specified string value, followed by the current line terminator, to the verbose output console. + /// The value to write. + public static void VerboseWriteLine(string value) => VerboseWriteLineEvent?.Invoke("{0}", value); + + /// Writes the specified string value, followed by the current line terminator, to the debug output console. + /// Description of the module writing to the debug console + /// The value to write. + public static void DebugWriteLine(string module, string value) => + DebugWriteLineEvent?.Invoke("{0}", "DEBUG (" + module + "): " + value); + } +} \ No newline at end of file diff --git a/Aaru.Helpers/.editorconfig b/Aaru.Helpers/.editorconfig new file mode 100644 index 0000000..9181fe5 --- /dev/null +++ b/Aaru.Helpers/.editorconfig @@ -0,0 +1,632 @@ +root = true + +[*] +charset = utf-8 +next_line = crlf +insert_final_newline = false +indent_style = space +indent_size = 4 + +# Generic non-language specific ones for Resharper and friends +brace_style = next_line +int_align = true +keep_existing_arrangement = false +place_simple_blocks_on_single_line = true +place_simple_declaration_blocks_on_single_line = true +place_attribute_on_same_line = false +space_after_unary_operator = false +space_after_comma = true +space_around_ternary_operator = true +space_around_binary_operator = true +space_around_member_access_operator = false +space_before_open_square_brackets = false +space_after_keywords_in_control_flow_statements = true +space_before_comma = false +space_between_method_call_name_and_opening_parenthesis = false +space_between_method_declaration_name_and_open_parenthesis = false +space_between_square_brackets = false +space_between_parentheses_of_control_flow_statements = false +accessor_owner_declaration_braces = next_line +accessor_declaration_braces = next_line +case_block_braces = next_line +initializer_braces = next_line +other_braces = next_line +allow_comment_after_lbrace = false +empty_block_style = together_same_line +braces_for_ifelse = not_required +braces_for_for = not_required +braces_for_foreach = not_required +braces_for_while = not_required +braces_for_dowhile = not_required +braces_for_using = not_required +braces_for_lock = not_required +braces_for_fixed = not_required +method_or_operator_body = expression_body +local_function_body = expression_body +constructor_or_destructor_body = expression_body +accessor_owner_body = expression_body +force_attribute_style = join +function_braces = next_line +force_control_statements_braces = always_remove +space_in_singleline_accessorholder = true +type_declaration_braces = next_line +invocable_declaration_braces = next_line +anonymous_method_declaration_braces = next_line +space_between_accessors_in_singleline_property = true +indent_nested_usings_stmt = true +space_within_empty_braces = false +indent_nested_fixed_stmt = true +indent_nested_lock_stmt = true +indent_nested_for_stmt = true +indent_nested_foreach_stmt = true +indent_nested_while_stmt = true +use_continuous_indent_inside_parens = true +indent_method_decl_pars = inside +indent_invocation_pars = inside +indent_statement_pars = inside +indent_typeparam_angles = inside +indent_typearg_angles = inside +indent_pars = inside +indent_preprocessor_if = outdent +indent_preprocessor_region = usual_indent +indent_preprocessor_other = usual_indent +indent_switch_labels = true +indent_type_constraints = true +stick_comment = false +alignment_tab_fill_style = use_spaces +align_multiline_parameter = true +align_multiline_extends_list = true +align_linq_query = true +align_multiline_binary_expressions_chain = true +outdent_binary_ops = true +align_multiline_calls_chain = true +outdent_dots = true +align_multiline_array_and_object_initializer = false +indent_anonymous_method_block = false +align_first_arg_by_paren = true +align_multiline_argument = true +align_tuple_components = true +align_multiline_expression = true +align_multiline_for_stmt = true +align_multiple_declaration = true +align_multline_type_parameter_list = true +align_multline_type_parameter_constrains = true +int_align_fields = true +int_align_properties = true +int_align_methods = true +int_align_parameters = false +int_align_variables = true +int_align_assignments = true +int_align_nested_ternary = true +int_align_invocations = false +int_align_binary_expressions = true +int_align_comments = true +int_align_switch_sections = true +keep_user_linebreaks = false +keep_existing_arrangement = false +keep_existing_linebreaks = false +max_line_length = 120 +wrap_before_comma = false +special_else_if_treatment = true +place_type_attribute_on_same_line = never +place_method_attribute_on_same_line = never +place_accessorholder_attribute_on_same_line = never +place_attribute_on_same_line = never +place_accessor_attribute_on_same_line = never +place_attribute_on_same_line = never +place_field_attribute_on_same_line = never +place_attribute_on_same_line = never +wrap_parameters_style = wrap_if_long +keep_existing_declaration_parens_arrangement = false +wrap_before_declaration_lpar = false +wrap_after_declaration_lpar = false +wrap_before_declaration_rpar = false +place_constructor_initializer_on_same_line = true +keep_existing_expr_member_arrangement = false +place_expr_method_on_single_line = true +place_expr_property_on_single_line = true +place_expr_accessor_on_single_line = true +wrap_before_arrow_with_expressions = false +place_type_constraints_on_same_line = true +wrap_before_first_type_parameter_constraint = true +wrap_multiple_type_parameter_constraints_style = wrap_if_long +wrap_before_type_parameter_langle = true +wrap_before_extends_colon = false +wrap_extends_list_style = wrap_if_long +keep_existing_declaration_block_arrangement = false +place_abstract_accessorholder_on_single_line = true +place_simple_accessorholder_on_single_line = false +place_accessor_with_attrs_holder_on_single_line = false +place_simple_accessor_on_single_line = true +place_simple_method_on_single_line = false +keep_existing_enum_arrangement = false +place_simple_enum_on_single_line = false +wrap_enum_declaration = wrap_if_long +new_line_before_else = true +new_line_before_while = false +wrap_for_stmt_header_style = wrap_if_long +wrap_multiple_declaration_style = wrap_if_long +keep_existing_embedded_arrangement = false +place_simple_embedded_statement_on_same_line = false +place_simple_case_statement_on_same_line = true +keep_existing_embedded_block_arrangement = false +place_simple_embedded_block_on_same_line = false +place_simple_anonymousmethod_on_single_line = false +keep_existing_initializer_arrangement = false +place_simple_initializer_on_single_line = false +wrap_object_and_collection_initializer_style = chop_always +wrap_array_initializer_style = wrap_if_long +wrap_arguments_style = wrap_if_long +keep_existing_invocation_parens_arrangement = false +wrap_after_invocation_lpar = false +wrap_before_invocation_rpar = false +wrap_after_dot_in_method_calls = true +wrap_chained_method_calls = wrap_if_long +wrap_before_binary_opsign = false +wrap_chained_binary_expressions = wrap_if_long +force_chop_compound_if_expression = true +force_chop_compound_while_expression = true +force_chop_compound_do_expression = true +wrap_before_ternary_opsigns = true +wrap_ternary_expr_style = wrap_if_long +nested_ternary_style = expanded +wrap_linq_expressions = wrap_if_long +wrap_before_linq_expression = false +place_linq_into_on_new_line = false +wrap_verbatim_interpolated_strings = wrap_if_long +extra_spaces = remove_all +space_after_keywords_in_control_flow_statements = false +space_between_method_call_name_and_opening_parenthesis = false +space_between_method_declaration_name_and_open_parenthesis = false +space_before_typeof_parentheses = false +space_before_checked_parentheses = false +space_before_sizeof_parentheses = false +space_before_nameof_parentheses = false +space_between_keyword_and_expression = true +space_between_keyword_and_type = true +space_around_assignment_op = true +space_around_logical_op = true +space_around_binary_operator = true +space_around_equality_op = true +space_around_relational_op = true +space_around_bitwise_op = true +space_around_additive_op = true +space_around_multiplicative_op = true +space_around_shift_op = true +space_around_nullcoalescing_op = true +space_around_arrow_op = false +space_after_logical_not_op = false +space_after_unary_operator = false +space_after_cast = false +space_around_dot = false +space_around_lambda_arrow = true +space_before_pointer_asterik_declaration = false +space_before_nullable_mark = false +blank_lines_around_class_definition = 1 +namespace_indentation = all +space_within_template_argument = false +align_union_type_usage = true +space_in_singleline_method = true +space_in_singleline_anonymous_method = true +space_within_single_line_array_initializer_braces = true +space_around_arrow_op = false + +# These are for markup languages (HTML, XML, etc) +spaces_around_eq_in_pi_attribute = false +space_after_last_pi_attribute = true +pi_attributes_indent = align_by_first_attribute +blank_line_after_pi = true +spaces_around_eq_in_attribute = false +space_after_last_attribute = false +space_before_self_closing = true +attribute_style = on_single_line +attribute_indent = align_by_first_attribute +sort_attributes = true +sort_class_selectors = true +max_blank_lines_between_tags = 0 +linebreak_before_all_elements = true +linebreak_before_multiline_elements = true +quote_style = doublequoted +delete_quotes_from_solid_values = false +normalize_tag_names = true + + +[{.babelrc,.stylelintrc,jest.config,.eslintrc,.prettierrc,*.json,*.jsb3,*.jsb2,*.bowerrc}] +indent_size = 2 + +[*.js.map] +indent_size = 2 + +[*.{css,scss}] +indent_size = 2 +declarations_style = separate_lines_for_nonsingle +media_query_style = separate_lines +selector_style = same_line +properties_style = separate_lines_for_nonsingle +brace_style = next_line + +[{.analysis_options,*.yml,*.yaml}] +indent_size = 2 + +# Xml project files +[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}] +indent_size = 2 + +# Xml files +[*.{xml,stylecop,resx,ruleset}] +indent_size = 2 + +# Xml config files +[*.{props,targets,config,nuspec}] +indent_size = 2 + +# .net files +[*.{cs,vb}] +# These set the this. / Me. +dotnet_style_qualification_for_field = false:warning +dotnet_style_qualification_for_property = false:warning +dotnet_style_qualification_for_method = false:warning +dotnet_style_qualification_for_event = false:warning + +# These make it suggest Int32 instead of int, etc. +dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion +dotnet_style_predefined_type_for_member_access = true:suggestion + +# This controls implicit access modifiers +dotnet_style_require_accessibility_modifiers = never:suggestion + +# Prefer non modified fields to be marked readonly +dotnet_style_readonly_field = true:warning + +# Parenthesis settings +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning +dotnet_style_parentheses_in_other_operators = always_for_clarity:warning + +dotnet_style_object_initializer = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_explicit_tuple_names = true:error +dotnet_style_prefer_inferred_tuple_names = true:warning +dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning +dotnet_style_prefer_conditional_expression_over_return = true:warning +dotnet_style_coalesce_expression = true:warning +dotnet_style_null_propagation = true:error + +dotnet_sort_system_directives_first = true + +# Constants in C style, all-caps +dotnet_naming_rule.constant_fields_caps.symbols = constant_fields +dotnet_naming_rule.constant_fields_caps.severity = warning +dotnet_naming_rule.constant_fields_caps.style = caps_style +dotnet_naming_symbols.constant_fields.applicable_kinds = field +dotnet_naming_symbols.constant_fields.required_modifiers = const +dotnet_naming_style.caps_style.capitalization = all_upper + +# interfaces should be prefixed with I +dotnet_naming_rule.pascal_case_for_interface.severity = error +dotnet_naming_rule.pascal_case_for_interface.symbols = interfaces_fields +dotnet_naming_rule.pascal_case_for_interface.style = pascal_case_interface_style +dotnet_naming_symbols.interfaces_fields.applicable_kinds = interface +dotnet_naming_style.pascal_case_interface_style.required_prefix = I +dotnet_naming_style.pascal_case_interface_style.capitalization = pascal_case + +## internal and private fields should be _camelCase +dotnet_naming_rule.camel_case_for_private_internal_fields.severity = warning +dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields +dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style +dotnet_naming_symbols.private_internal_fields.applicable_kinds = field +dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal +dotnet_naming_style.camel_case_underscore_style.required_prefix = _ +dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case + +# 2018-12-07 NP: This is not yet working in VS2017 +# local variables should be camelCase +#dotnet_naming_rule.camel_case_for_locals.severity = suggestion +#dotnet_naming_rule.camel_case_for_locals.symbols = local_fields +#dotnet_naming_rule.camel_case_for_locals.style = camel_case_style +#dotnet_naming_symbols.local_fields.applicable_kinds = local +#dotnet_naming_style.camel_case_style.capitalization = camel_case + +[*.cs] +# var var var +csharp_style_var_for_built_in_types = false:warning +csharp_style_var_when_type_is_apparent = true:suggestion +csharp_style_var_elsewhere = false:warning + +csharp_style_expression_bodied_methods = when_on_single_line:suggestion +csharp_style_expression_bodied_constructors = when_on_single_line:suggestion +csharp_style_expression_bodied_operators = when_on_single_line:suggestion +csharp_style_expression_bodied_properties = when_on_single_line:suggestion +csharp_style_expression_bodied_indexers = when_on_single_line:suggestion +csharp_style_expression_bodied_accessors = when_on_single_line:suggestion + +csharp_style_pattern_matching_over_is_with_cast_check = true:warning +csharp_style_pattern_matching_over_as_with_null_check = when_on_single_line:warning + +csharp_style_inlined_variable_declaration = true:warning + +csharp_prefer_simple_default_expression = true:warning +csharp_style_deconstructed_variable_declaration = false:warning + +csharp_style_throw_expression = true:warning +csharp_style_conditional_delegate_call = true:warning + +csharp_prefer_braces = false + +csharp_new_line_before_open_brace = all +csharp_new_line_before_else = true +csharp_new_line_before_catch = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_between_query_expression_clauses = true + +csharp_indent_case_contents = true +csharp_indent_switch_labels = true +csharp_indent_labels = flush_left + +csharp_space_after_cast = false +csharp_space_after_keywords_in_control_flow_statements = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = none +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_around_binary_operators = before_and_after +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false + +csharp_preserve_single_line_statements = false +csharp_preserve_single_line_blocks = true + +csharp_blank_lines_around_region = 0 +csharp_blank_lines_inside_region = 0 +csharp_blank_lines_before_single_line_comment = 1 +csharp_keep_blank_lines_in_declarations = 1 +csharp_remove_blank_lines_near_braces_in_declarations = true +csharp_blank_lines_after_start_comment = false +csharp_blank_lines_between_using_groups = 0 +csharp_blank_lines_after_using_list = 1 +csharp_blank_lines_around_namespace = 1 +csharp_blank_lines_inside_namespace = 0 +csharp_blank_lines_around_type = 1 +csharp_blank_lines_inside_type = 0 +csharp_blank_lines_around_field = 0 +csharp_blank_lines_around_single_line_field = 0 +csharp_blank_lines_around_property = 1 +csharp_blank_lines_around_single_line_property = 0 +csharp_blank_lines_around_auto_property = 0 +csharp_blank_lines_around_single_line_auto_property = 0 +csharp_blank_lines_around_invocable = 1 +csharp_blank_lines_around_single_line_invocable = 1 +csharp_keep_blank_lines_in_code = 1 +csharp_remove_blank_lines_near_braces_in_code = true +csharp_blank_lines_around_local_method = 1 +csharp_blank_lines_around_single_line_local_method = 1 +csharp_blank_lines_before_control_transfer_statements = 1 +csharp_blank_lines_after_control_transfer_statements = 1 +csharp_blank_lines_before_block_statements = 1 +csharp_blank_lines_after_block_statements = 1 +csharp_blank_lines_before_multiline_statements = 1 +csharp_blank_lines_after_multiline_statements = 1 + +csharp_type_declaration_braces = next_line +csharp_brace_style = next_line +csharp_indent_inside_namespace = true +csharp_invocable_declaration_braces = next_line +csharp_anonymous_method_declaration_braces = next_line +csharp_accessor_owner_declaration_braces = next_line +csharp_accessor_declaration_braces = next_line +csharp_case_block_braces = next_line +csharp_initializer_braces = next_line +csharp_other_braces = next_line +csharp_allow_comment_after_lbrace = false +csharp_empty_block_style = together_same_line + +csharp_for_built_in_types = use_explicit_type +csharp_for_simple_types = use_var_when_evident +csharp_for_other_types = use_explicit_type +csharp_prefer_separate_deconstructed_variables_declaration = true +csharp_prefer_explicit_discard_declaration = false + +csharp_instance_members_qualify_members = none +csharp_builtin_type_reference_style = use_keyword +csharp_prefer_qualified_reference = false +csharp_add_imports_to_deepest_scope = false +csharp_allow_alias = true +csharp_default_private_modifier = implicit +csharp_default_internal_modifier = explicit +csharp_arguments_literal = positional +csharp_arguments_string_literal = positional +csharp_arguments_named = positional +csharp_arguments_anonymous_function = positional +csharp_arguments_other = positional +csharp_braces_for_ifelse = not_required +csharp_braces_for_for = not_required +csharp_braces_for_foreach = not_required +csharp_braces_for_while = not_required +csharp_braces_for_dowhile = not_required +csharp_braces_for_using = not_required +csharp_braces_for_lock = not_required +csharp_braces_for_fixed = not_required +csharp_method_or_operator_body = expression_body +csharp_local_function_body = expression_body +csharp_constructor_or_destructor_body = expression_body +csharp_accessor_owner_body = expression_body +csharp_force_attribute_style = join +csharp_indent_nested_usings_stmt = true + +csharp_builtin_type_reference_for_member_access_style = use_keyword +csharp_indent_nested_fixed_stmt = true +csharp_indent_nested_lock_stmt = true +csharp_indent_nested_for_stmt = true +csharp_indent_nested_foreach_stmt = true +csharp_indent_nested_while_stmt = true +csharp_use_continuous_indent_inside_parens = true +csharp_indent_method_decl_pars = inside +csharp_indent_invocation_pars = inside +csharp_indent_statement_pars = inside +csharp_indent_typeparam_angles = inside +csharp_indent_typearg_angles = inside +csharp_indent_pars = inside +csharp_indent_preprocessor_if = outdent +csharp_indent_preprocessor_region = usual_indent +csharp_indent_preprocessor_other = usual_indent +csharp_indent_switch_labels = true +csharp_indent_type_constraints = true +csharp_stick_comment = false +csharp_alignment_tab_fill_style = use_spaces +csharp_align_multiline_parameter = true +csharp_align_multiline_extends_list = true +csharp_align_linq_query = true +csharp_align_multiline_binary_expressions_chain = true +csharp_outdent_binary_ops = true +csharp_align_multiline_calls_chain = true +csharp_outdent_dots = true +csharp_align_multiline_array_and_object_initializer = false +csharp_indent_anonymous_method_block = false +csharp_align_first_arg_by_paren = true +csharp_align_multiline_argument = true +csharp_align_tuple_components = true +csharp_align_multiline_expression = true +csharp_align_multiline_for_stmt = true +csharp_align_multiple_declaration = true +csharp_align_multline_type_parameter_list = true +csharp_align_multline_type_parameter_constrains = true +csharp_int_align_fields = true +csharp_int_align_properties = true +csharp_int_align_methods = true +csharp_int_align_parameters = false +csharp_int_align_variables = true +csharp_int_align_assignments = true +csharp_int_align_nested_ternary = true +csharp_int_align_invocations = false +csharp_int_align_binary_expressions = true +csharp_int_align_comments = true +csharp_int_align_switch_sections = true +csharp_int_align = true +csharp_keep_user_linebreaks = false +csharp_keep_existing_arrangement = false +csharp_keep_existing_linebreaks = false +csharp_max_line_length = 120 +csharp_wrap_before_comma = false +csharp_special_else_if_treatment = true +csharp_insert_final_newline = false +csharp_place_type_attribute_on_same_line = never +csharp_place_method_attribute_on_same_line = never +csharp_place_accessorholder_attribute_on_same_line = never +csharp_place_attribute_on_same_line = never +csharp_place_accessor_attribute_on_same_line = never +csharp_place_attribute_on_same_line = never +csharp_place_field_attribute_on_same_line = never +csharp_place_attribute_on_same_line = never +csharp_wrap_parameters_style = wrap_if_long +csharp_keep_existing_declaration_parens_arrangement = false +csharp_wrap_before_declaration_lpar = false +csharp_wrap_after_declaration_lpar = false +csharp_wrap_before_declaration_rpar = false +csharp_place_constructor_initializer_on_same_line = true +csharp_keep_existing_expr_member_arrangement = false +csharp_place_expr_method_on_single_line = true +csharp_place_expr_property_on_single_line = true +csharp_place_expr_accessor_on_single_line = true +csharp_wrap_before_arrow_with_expressions = false +csharp_place_type_constraints_on_same_line = true +csharp_wrap_before_first_type_parameter_constraint = true +csharp_wrap_multiple_type_parameter_constraints_style = wrap_if_long +csharp_wrap_before_type_parameter_langle = true +csharp_wrap_before_extends_colon = false +csharp_wrap_extends_list_style = wrap_if_long +csharp_keep_existing_declaration_block_arrangement = false +csharp_place_abstract_accessorholder_on_single_line = true +csharp_place_simple_accessorholder_on_single_line = false +csharp_place_accessor_with_attrs_holder_on_single_line = false +csharp_place_simple_accessor_on_single_line = true +csharp_place_simple_method_on_single_line = false +csharp_keep_existing_enum_arrangement = false +csharp_place_simple_enum_on_single_line = false +csharp_wrap_enum_declaration = wrap_if_long +csharp_new_line_before_else = true +csharp_new_line_before_while = false +csharp_wrap_for_stmt_header_style = wrap_if_long +csharp_wrap_multiple_declaration_style = wrap_if_long +csharp_keep_existing_embedded_arrangement = false +csharp_place_simple_embedded_statement_on_same_line = false +csharp_place_simple_case_statement_on_same_line = true +csharp_keep_existing_embedded_block_arrangement = false +csharp_place_simple_embedded_block_on_same_line = false +csharp_place_simple_anonymousmethod_on_single_line = false +csharp_keep_existing_initializer_arrangement = false +csharp_place_simple_initializer_on_single_line = false +csharp_wrap_object_and_collection_initializer_style = chop_always +csharp_wrap_array_initializer_style = wrap_if_long +csharp_wrap_arguments_style = wrap_if_long +csharp_keep_existing_invocation_parens_arrangement = false +csharp_wrap_after_invocation_lpar = false +csharp_wrap_before_invocation_rpar = false +csharp_wrap_after_dot_in_method_calls = true +csharp_wrap_chained_method_calls = wrap_if_long +csharp_wrap_before_binary_opsign = false +csharp_wrap_chained_binary_expressions = wrap_if_long +csharp_force_chop_compound_if_expression = true +csharp_force_chop_compound_while_expression = true +csharp_force_chop_compound_do_expression = true +csharp_wrap_before_ternary_opsigns = true +csharp_wrap_ternary_expr_style = wrap_if_long +csharp_nested_ternary_style = expanded +csharp_wrap_linq_expressions = wrap_if_long +csharp_wrap_before_linq_expression = false +csharp_place_linq_into_on_new_line = false +csharp_wrap_verbatim_interpolated_strings = wrap_if_long +csharp_extra_spaces = remove_all +csharp_space_after_keywords_in_control_flow_statements = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_declaration_name_and_open_parenthesis = false +csharp_space_before_typeof_parentheses = false +csharp_space_before_checked_parentheses = false +csharp_space_before_sizeof_parentheses = false +csharp_space_before_nameof_parentheses = false +csharp_space_between_keyword_and_expression = true +csharp_space_between_keyword_and_type = true +csharp_space_around_assignment_op = true +csharp_space_around_logical_op = true +csharp_space_around_binary_operator = true +csharp_space_around_equality_op = true +csharp_space_around_relational_op = true +csharp_space_around_bitwise_op = true +csharp_space_around_additive_op = true +csharp_space_around_multiplicative_op = true +csharp_space_around_shift_op = true +csharp_space_around_nullcoalescing_op = true +csharp_space_around_arrow_op = false +csharp_space_after_logical_not_op = false +csharp_space_after_unary_operator = false +csharp_space_after_cast = false +csharp_space_around_dot = false +csharp_space_around_lambda_arrow = true +csharp_space_before_pointer_asterik_declaration = false +csharp_space_before_nullable_mark = false + +[*.cshtml] +linebreaks_around_razor_statements = true +blank_lines_around_razor_functions = true +blank_lines_around_razor_helpers = true +blank_lines_around_razor_sections = true + +# C++ +[*.{cc,cpp,cxx,h,hpp,hxx}] +cpp_indent_access_specifiers_from_class = true +cpp_indent_wrapped_function_names = false +cpp_align_multiline_type_argument = true + +# C, C++ and ObjectiveC +[*.{c,h,cc,cpp,cxx,m,hpp,hxx}] +indent_preprocessor_directives = normal +indent_type_constraints = true + +# Javascript and Typescript +[*.{js,js.map,ts}] +quote_style = doublequoted +termination_style = ensure_semicolon \ No newline at end of file diff --git a/Aaru.Helpers/.gitignore b/Aaru.Helpers/.gitignore new file mode 100644 index 0000000..05c540d --- /dev/null +++ b/Aaru.Helpers/.gitignore @@ -0,0 +1,595 @@ +### VisualStudio template +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ +### Linux template + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* +### Xcode template +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +build/ +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +### VisualStudioCode template +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +### C++ template +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o + +# Precompiled Headers +*.gch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app +### MonoDevelop template +#User Specific +*.usertasks + +#Mono Project Files +*.resources +test-results/ +### GPG template +secring.* + +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/modules.xml +# .idea/*.iml +# .idea/modules + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests +### CMake template +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +### C template +# Object files +*.ko +*.elf + +# Linker output +*.map +*.exp + +*.so.* + +# Executables +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf +### Windows template +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# NuGet Packages Directory +packages/ +## TODO: If the tool you use requires repositories.config uncomment the next line +#!packages/repositories.config + +# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets +# This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented) +!packages/build/ + + +# Others +sql/ +*.Cache + +# Visual Studio 2017 +.vs + +workspace.xml +cmake-build-debug +### macOS template +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +pkg/**/pkg +pkg/**/src +pkg/**/*.asc +pkg/**/*.sig +pkg/**/*.tar.xz +pkg/**/*.zip +pkg/**/aaru + +.sonarqube \ No newline at end of file diff --git a/Aaru.Helpers/Aaru.Helpers.csproj b/Aaru.Helpers/Aaru.Helpers.csproj new file mode 100644 index 0000000..9650e64 --- /dev/null +++ b/Aaru.Helpers/Aaru.Helpers.csproj @@ -0,0 +1,122 @@ + + + + Debug + AnyCPU + 2.0 + {F8BDF57B-1571-4CD0-84B3-B422088D359A} + Library + Aaru.Helpers + Aaru.Helpers + $(Version) + false + true + 6.0.0-alpha6 + Claunia.com + Copyright © 2011-2021 Natalia Portillo + Aaru Data Preservation Suite + Aaru.Helpers + $(Version) + net6 + 10 + Contains helpers used by the Aaru Data Preservation Suite. + https://github.com/aaru-dps/ + LGPL-2.1-only + https://github.com/aaru-dps/Aaru.Helpers + true + en-US + true + true + snupkg + Natalia Portillo <claunia@claunia.com> + true + + + $(Version)+{chash:8} + true + true + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + + + + + + + + + + + + + + + + + + + {CCAA7AFE-C094-4D82-A66D-630DE8A3F545} + Aaru.Console + + + + + LICENSE.LGPL + + + + + + + + + + + + + + + + + + + + + + /Library/Frameworks/Mono.framework/Versions/Current/lib/mono + /usr/lib/mono + /usr/local/lib/mono + + $(BaseFrameworkPathOverrideForMono)/4.0-api + $(BaseFrameworkPathOverrideForMono)/4.5-api + $(BaseFrameworkPathOverrideForMono)/4.5.1-api + $(BaseFrameworkPathOverrideForMono)/4.5.2-api + $(BaseFrameworkPathOverrideForMono)/4.6-api + $(BaseFrameworkPathOverrideForMono)/4.6.1-api + $(BaseFrameworkPathOverrideForMono)/4.6.2-api + $(BaseFrameworkPathOverrideForMono)/4.7-api + $(BaseFrameworkPathOverrideForMono)/4.7.1-api + true + + $(FrameworkPathOverride)/Facades;$(AssemblySearchPaths) + + \ No newline at end of file diff --git a/Aaru.Helpers/ArrayFill.cs b/Aaru.Helpers/ArrayFill.cs new file mode 100644 index 0000000..ff3ab5a --- /dev/null +++ b/Aaru.Helpers/ArrayFill.cs @@ -0,0 +1,81 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : ArrayFill.cs +// Author(s) : Natalia Portillo +// +// Component : Helpers. +// +// --[ Description ] ---------------------------------------------------------- +// +// Fills an array with a specified value. +// +// --[ License ] -------------------------------------------------------------- +// +// No license specified by creator. +// +// Published on https://github.com/mykohsu/Extensions/blob/master/ArrayExtensions.cs +// +// Assuming open source. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// Copyright(C) 2014 mykohsu +// ****************************************************************************/ + +using System; +using System.Text; + +namespace Aaru.Helpers +{ + public static partial class ArrayHelpers + { + /// Fills an array with the specified value + /// Array + /// Value + /// Array type + public static void ArrayFill(T[] destinationArray, T value) => ArrayFill(destinationArray, new[] + { + value + }); + + /// Fills an array with the contents of the specified array + /// Array + /// Value + /// Array type + public static void ArrayFill(T[] destinationArray, T[] value) + { + if(destinationArray == null) + throw new ArgumentNullException(nameof(destinationArray)); + + if(value.Length > destinationArray.Length) + throw new ArgumentException("Length of value array must not be more than length of destination"); + + // set the initial array value + Array.Copy(value, destinationArray, value.Length); + + int arrayToFillHalfLength = destinationArray.Length / 2; + int copyLength; + + for(copyLength = value.Length; copyLength < arrayToFillHalfLength; copyLength <<= 1) + Array.Copy(destinationArray, 0, destinationArray, copyLength, copyLength); + + Array.Copy(destinationArray, 0, destinationArray, copyLength, destinationArray.Length - copyLength); + } + + /// Converts a byte array to its hexadecimal representation + /// Byte array + /// true to use uppercase + /// + public static string ByteArrayToHex(byte[] array, bool upper = false) + { + var sb = new StringBuilder(); + + for(long i = 0; i < array.LongLength; i++) + sb.AppendFormat("{0:x2}", array[i]); + + return upper ? sb.ToString().ToUpper() : sb.ToString(); + } + } +} \ No newline at end of file diff --git a/Aaru.Helpers/ArrayIsEmpty.cs b/Aaru.Helpers/ArrayIsEmpty.cs new file mode 100644 index 0000000..100ac96 --- /dev/null +++ b/Aaru.Helpers/ArrayIsEmpty.cs @@ -0,0 +1,50 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : ArrayIsEmpty.cs +// Author(s) : Natalia Portillo +// +// Component : Helpers. +// +// --[ Description ] ---------------------------------------------------------- +// +// Methods for detecting an empty array. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System.Linq; + +namespace Aaru.Helpers +{ + /// Helper operations to work with arrays + public static partial class ArrayHelpers + { + /// Checks if an array is null, filled with the NULL byte (0x00) or ASCII whitespace (0x20) + /// Array + /// True if null or whitespace + public static bool ArrayIsNullOrWhiteSpace(byte[] array) => array?.All(b => b == 0x00 || b == 0x20) != false; + + /// Checks if an array is null or filled with the NULL byte (0x00) + /// Array + /// True if null + public static bool ArrayIsNullOrEmpty(byte[] array) => array?.All(b => b == 0x00) != false; + } +} \ No newline at end of file diff --git a/Aaru.Helpers/BigEndianBitConverter.cs b/Aaru.Helpers/BigEndianBitConverter.cs new file mode 100644 index 0000000..b2345b3 --- /dev/null +++ b/Aaru.Helpers/BigEndianBitConverter.cs @@ -0,0 +1,324 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : BigEndianBitConverter.cs +// Author(s) : Natalia Portillo +// +// Component : Helpers. +// +// --[ Description ] ---------------------------------------------------------- +// +// Override of System.BitConverter that knows how to handle big-endian. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Linq; + +namespace Aaru.Helpers +{ + /// + /// Converts base data types to an array of bytes, and an array of bytes to base data types. All info taken from + /// the meta data of System.BitConverter. This implementation allows for Endianness consideration. + /// + public static class BigEndianBitConverter + { + /// Converts the specified double-precision floating point number to a 64-bit signed integer. + /// The number to convert. + /// A 64-bit signed integer whose value is equivalent to value. + /// It is not currently implemented + public static long DoubleToInt64Bits(double value) => throw new NotImplementedException(); + + /// Returns the specified Boolean value as an array of bytes. + /// A Boolean value. + /// An array of bytes with length 1. + public static byte[] GetBytes(bool value) => BitConverter.GetBytes(value).Reverse().ToArray(); + + /// Returns the specified Unicode character value as an array of bytes. + /// A character to convert. + /// An array of bytes with length 2. + public static byte[] GetBytes(char value) => BitConverter.GetBytes(value).Reverse().ToArray(); + + /// Returns the specified double-precision floating point value as an array of bytes. + /// The number to convert. + /// An array of bytes with length 8. + public static byte[] GetBytes(double value) => BitConverter.GetBytes(value).Reverse().ToArray(); + + /// Returns the specified single-precision floating point value as an array of bytes. + /// The number to convert. + /// An array of bytes with length 4. + public static byte[] GetBytes(float value) => BitConverter.GetBytes(value).Reverse().ToArray(); + + /// Returns the specified 32-bit signed integer value as an array of bytes. + /// The number to convert. + /// An array of bytes with length 4. + public static byte[] GetBytes(int value) => BitConverter.GetBytes(value).Reverse().ToArray(); + + /// Returns the specified 64-bit signed integer value as an array of bytes. + /// The number to convert. + /// An array of bytes with length 8. + public static byte[] GetBytes(long value) => BitConverter.GetBytes(value).Reverse().ToArray(); + + /// Returns the specified 16-bit signed integer value as an array of bytes. + /// The number to convert. + /// An array of bytes with length 2. + public static byte[] GetBytes(short value) => BitConverter.GetBytes(value).Reverse().ToArray(); + + /// Returns the specified 32-bit unsigned integer value as an array of bytes. + /// The number to convert. + /// An array of bytes with length 4. + public static byte[] GetBytes(uint value) => BitConverter.GetBytes(value).Reverse().ToArray(); + + /// Returns the specified 64-bit unsigned integer value as an array of bytes. + /// The number to convert. + /// An array of bytes with length 8. + public static byte[] GetBytes(ulong value) => BitConverter.GetBytes(value).Reverse().ToArray(); + + /// Returns the specified 16-bit unsigned integer value as an array of bytes. + /// The number to convert. + /// An array of bytes with length 2. + public static byte[] GetBytes(ushort value) => BitConverter.GetBytes(value).Reverse().ToArray(); + + /// Converts the specified 64-bit signed integer to a double-precision floating point number. + /// The number to convert. + /// A double-precision floating point number whose value is equivalent to value. + public static double Int64BitsToDouble(long value) => throw new NotImplementedException(); + + /// Returns a Boolean value converted from one byte at a specified position in a byte array. + /// An array of bytes. + /// The starting position within value. + /// true if the byte at in value is nonzero; otherwise, false. + /// value is null. + /// + /// is less than zero or greater than the + /// length of value minus 1. + /// + public static bool ToBoolean(byte[] value, int startIndex) => throw new NotImplementedException(); + + /// Returns a Unicode character converted from two bytes at a specified position in a byte array. + /// An array. + /// The starting position within value. + /// A character formed by two bytes beginning at . + /// equals the length of value minus 1. + /// value is null. + /// + /// is less than zero or greater than the + /// length of value minus 1. + /// + public static char ToChar(byte[] value, int startIndex) => throw new NotImplementedException(); + + /// + /// Returns a double-precision floating point number converted from eight bytes at a specified position in a byte + /// array. + /// + /// An array of bytes. + /// The starting position within value. + /// A double precision floating point number formed by eight bytes beginning at . + /// + /// is greater than or equal to the length of value + /// minus 7, and is less than or equal to the length of value minus 1. + /// + /// value is null. + /// + /// is less than zero or greater than the + /// length of value minus 1. + /// + public static double ToDouble(byte[] value, int startIndex) => throw new NotImplementedException(); + + /// Returns a 16-bit signed integer converted from two bytes at a specified position in a byte array. + /// An array of bytes. + /// The starting position within value. + /// A 16-bit signed integer formed by two bytes beginning at . + /// equals the length of value minus 1. + /// value is null. + /// + /// startIndex is less than zero or greater than the length of value + /// minus 1. + /// + public static short ToInt16(byte[] value, int startIndex) => + BitConverter.ToInt16(value.Reverse().ToArray(), value.Length - sizeof(short) - startIndex); + + /// Returns a 32-bit signed integer converted from four bytes at a specified position in a byte array. + /// An array of bytes. + /// The starting position within value. + /// A 32-bit signed integer formed by four bytes beginning at . + /// + /// is greater than or equal to the length of value + /// minus 3, and is less than or equal to the length of value minus 1. + /// + /// value is null. + /// + /// startIndex is less than zero or greater than the length of value + /// minus 1. + /// + public static int ToInt32(byte[] value, int startIndex) => + BitConverter.ToInt32(value.Reverse().ToArray(), value.Length - sizeof(int) - startIndex); + + /// Returns a 64-bit signed integer converted from eight bytes at a specified position in a byte array. + /// An array of bytes. + /// The starting position within value. + /// A 64-bit signed integer formed by eight bytes beginning at . + /// + /// is greater than or equal to the length of value + /// minus 7, and is less than or equal to the length of value minus 1. + /// + /// value is null. + /// + /// is less than zero or greater than the + /// length of value minus 1. + /// + public static long ToInt64(byte[] value, int startIndex) => + BitConverter.ToInt64(value.Reverse().ToArray(), value.Length - sizeof(long) - startIndex); + + /// + /// Returns a single-precision floating point number converted from four bytes at a specified position in a byte + /// array. + /// + /// An array of bytes. + /// The starting position within value. + /// A single-precision floating point number formed by four bytes beginning at . + /// + /// is greater than or equal to the length of value + /// minus 3, and is less than or equal to the length of value minus 1. + /// + /// value is null. + /// + /// is less than zero or greater than the + /// length of value minus 1. + /// + public static float ToSingle(byte[] value, int startIndex) => + BitConverter.ToSingle(value.Reverse().ToArray(), value.Length - sizeof(float) - startIndex); + + /// + /// Converts the numeric value of each element of a specified array of bytes to its equivalent hexadecimal string + /// representation. + /// + /// An array of bytes. + /// + /// A System.String of hexadecimal pairs separated by hyphens, where each pair represents the corresponding + /// element in value; for example, "7F-2C-4A". + /// + /// value is null. + public static string ToString(byte[] value) => BitConverter.ToString(value.Reverse().ToArray()); + + /// + /// Converts the numeric value of each element of a specified subarray of bytes to its equivalent hexadecimal + /// string representation. + /// + /// An array of bytes. + /// The starting position within value. + /// + /// A System.String of hexadecimal pairs separated by hyphens, where each pair represents the corresponding + /// element in a subarray of value; for example, "7F-2C-4A". + /// + /// value is null. + /// + /// startIndex is less than zero or greater than the length of value + /// minus 1. + /// + public static string ToString(byte[] value, int startIndex) => + BitConverter.ToString(value.Reverse().ToArray(), startIndex); + + /// + /// Converts the numeric value of each element of a specified subarray of bytes to its equivalent hexadecimal + /// string representation. + /// + /// An array of bytes. + /// The starting position within value. + /// The number of array elements in value to convert. + /// + /// A System.String of hexadecimal pairs separated by hyphens, where each pair represents the corresponding + /// element in a subarray of value; for example, "7F-2C-4A". + /// + /// value is null. + /// + /// startIndex or length is less than zero. -or- startIndex is greater + /// than zero and is greater than or equal to the length of value. + /// + /// + /// The combination of startIndex and length does not specify a position within + /// value; that is, the startIndex parameter is greater than the length of value minus the length parameter. + /// + public static string ToString(byte[] value, int startIndex, int length) => + BitConverter.ToString(value.Reverse().ToArray(), startIndex, length); + + /// Returns a 16-bit unsigned integer converted from two bytes at a specified position in a byte array. + /// The array of bytes. + /// The starting position within value. + /// A 16-bit unsigned integer formed by two bytes beginning at startIndex. + /// startIndex equals the length of value minus 1. + /// value is null. + /// + /// startIndex is less than zero or greater than the length of value + /// minus 1. + /// + public static ushort ToUInt16(byte[] value, int startIndex) => + BitConverter.ToUInt16(value.Reverse().ToArray(), value.Length - sizeof(ushort) - startIndex); + + /// Returns a 32-bit unsigned integer converted from four bytes at a specified position in a byte array. + /// An array of bytes. + /// The starting position within value. + /// A 32-bit unsigned integer formed by four bytes beginning at startIndex. + /// + /// startIndex is greater than or equal to the length of value minus 3, and is + /// less than or equal to the length of value minus 1. + /// + /// value is null. + /// + /// startIndex is less than zero or greater than the length of value + /// minus 1. + /// + public static uint ToUInt32(byte[] value, int startIndex) => + BitConverter.ToUInt32(value.Reverse().ToArray(), value.Length - sizeof(uint) - startIndex); + + /// Returns a 64-bit unsigned integer converted from eight bytes at a specified position in a byte array. + /// An array of bytes. + /// The starting position within value. + /// A 64-bit unsigned integer formed by the eight bytes beginning at startIndex. + /// + /// startIndex is greater than or equal to the length of value minus 7, and is + /// less than or equal to the length of value minus 1. + /// + /// value is null. + /// + /// startIndex is less than zero or greater than the length of value + /// minus 1. + /// + public static ulong ToUInt64(byte[] value, int startIndex) => + BitConverter.ToUInt64(value.Reverse().ToArray(), value.Length - sizeof(ulong) - startIndex); + + /// Converts a big endian byte array representation of a GUID into the .NET Guid structure + /// Byte array containing a GUID in big endian + /// Start of the byte array to process + /// Processed Guid + public static Guid ToGuid(byte[] value, int startIndex) => new Guid(ToUInt32(value, 0 + startIndex), + ToUInt16(value, 4 + startIndex), + ToUInt16(value, 6 + startIndex), + value[8 + startIndex + 0], + value[8 + startIndex + 1], + value[8 + startIndex + 2], + value[8 + startIndex + 3], + value[8 + startIndex + 5], + value[8 + startIndex + 5], + value[8 + startIndex + 6], + value[8 + startIndex + 7]); + } +} \ No newline at end of file diff --git a/Aaru.Helpers/BitEndian.cs b/Aaru.Helpers/BitEndian.cs new file mode 100644 index 0000000..0205652 --- /dev/null +++ b/Aaru.Helpers/BitEndian.cs @@ -0,0 +1,51 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : BitEndian.cs +// Author(s) : Natalia Portillo +// +// Component : Common types. +// +// --[ Description ] ---------------------------------------------------------- +// +// Defines enumerations of bit endianness. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +namespace Aaru.Helpers +{ + /// Describes the endianness of bits on a data structure + public enum BitEndian + { + /// Little-endian, or least significant bit + Little, + /// Big-endian, or most significant bit + Big, + /// PDP-11 endian, little endian except for 32-bit integers where the 16 halves are swapped between them + Pdp + } +} \ No newline at end of file diff --git a/Aaru.Helpers/CHS.cs b/Aaru.Helpers/CHS.cs new file mode 100644 index 0000000..166e702 --- /dev/null +++ b/Aaru.Helpers/CHS.cs @@ -0,0 +1,49 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : CHS.cs +// Author(s) : Natalia Portillo +// +// Component : Helpers. +// +// --[ Description ] ---------------------------------------------------------- +// +// Helpers for CHS<->LBA conversions +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +namespace Aaru.Helpers +{ + /// Helper operations to work with CHS values + public static class CHS + { + /// Converts a CHS position to a LBA one + /// Cylinder + /// Head + /// Sector + /// Number of heads + /// Number of sectors per track + /// + public static uint ToLBA(uint cyl, uint head, uint sector, uint maxHead, uint maxSector) => + maxHead == 0 || maxSector == 0 ? (((cyl * 16) + head) * 63) + sector - 1 + : (((cyl * maxHead) + head) * maxSector) + sector - 1; + } +} \ No newline at end of file diff --git a/Aaru.Helpers/CompareBytes.cs b/Aaru.Helpers/CompareBytes.cs new file mode 100644 index 0000000..18acac9 --- /dev/null +++ b/Aaru.Helpers/CompareBytes.cs @@ -0,0 +1,72 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : CompareBytes.cs +// Author(s) : Natalia Portillo +// +// Component : Helpers. +// +// --[ Description ] ---------------------------------------------------------- +// +// Compares two byte arrays. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +namespace Aaru.Helpers +{ + public static partial class ArrayHelpers + { + /// Compares two byte arrays + /// true if they are different in any way + /// true if they have the same size + /// Left array + /// Right array + public static void CompareBytes(out bool different, out bool sameSize, byte[] compareArray1, + byte[] compareArray2) + { + different = false; + sameSize = true; + + long leastBytes; + + if(compareArray1.LongLength < compareArray2.LongLength) + { + sameSize = false; + leastBytes = compareArray1.LongLength; + } + else if(compareArray1.LongLength > compareArray2.LongLength) + { + sameSize = false; + leastBytes = compareArray2.LongLength; + } + else + leastBytes = compareArray1.LongLength; + + for(long i = 0; i < leastBytes; i++) + if(compareArray1[i] != compareArray2[i]) + { + different = true; + + return; + } + } + } +} \ No newline at end of file diff --git a/Aaru.Helpers/CountBits.cs b/Aaru.Helpers/CountBits.cs new file mode 100644 index 0000000..7351d53 --- /dev/null +++ b/Aaru.Helpers/CountBits.cs @@ -0,0 +1,49 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : CountBits.cs +// Author(s) : Natalia Portillo +// +// Component : Helpers. +// +// --[ Description ] ---------------------------------------------------------- +// +// Counts bits in a number. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +namespace Aaru.Helpers +{ + /// Helper operations to count bits + public static class CountBits + { + /// Counts the number of bits set to true in a number + /// Number + /// Bits set to true + public static int Count(uint number) + { + number -= (number >> 1) & 0x55555555; + number = (number & 0x33333333) + ((number >> 2) & 0x33333333); + + return (int)((((number + (number >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24); + } + } +} \ No newline at end of file diff --git a/Aaru.Helpers/DateHandlers.cs b/Aaru.Helpers/DateHandlers.cs new file mode 100644 index 0000000..73ae942 --- /dev/null +++ b/Aaru.Helpers/DateHandlers.cs @@ -0,0 +1,389 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : DateHandlers.cs +// Author(s) : Natalia Portillo +// +// Component : Helpers. +// +// --[ Description ] ---------------------------------------------------------- +// +// Convert several timestamp formats to C# DateTime. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Text; +using Aaru.Console; + +namespace Aaru.Helpers +{ + /// Helper operations for timestamp management (date and time) + public static class DateHandlers + { + static readonly DateTime _lisaEpoch = new DateTime(1901, 1, 1, 0, 0, 0); + static readonly DateTime _macEpoch = new DateTime(1904, 1, 1, 0, 0, 0); + static readonly DateTime _unixEpoch = new DateTime(1970, 1, 1, 0, 0, 0); + /// Day 0 of Julian Date system + static readonly DateTime _julianEpoch = new DateTime(1858, 11, 17, 0, 0, 0); + static readonly DateTime _amigaEpoch = new DateTime(1978, 1, 1, 0, 0, 0); + + /// Converts a Macintosh timestamp to a .NET DateTime + /// Macintosh timestamp (seconds since 1st Jan. 1904) + /// .NET DateTime + public static DateTime MacToDateTime(ulong macTimeStamp) => _macEpoch.AddTicks((long)(macTimeStamp * 10000000)); + + /// Converts a Lisa timestamp to a .NET DateTime + /// Lisa timestamp (seconds since 1st Jan. 1901) + /// .NET DateTime + public static DateTime LisaToDateTime(uint lisaTimeStamp) => _lisaEpoch.AddSeconds(lisaTimeStamp); + + /// Converts a UNIX timestamp to a .NET DateTime + /// UNIX timestamp (seconds since 1st Jan. 1970) + /// .NET DateTime + public static DateTime UnixToDateTime(int unixTimeStamp) => _unixEpoch.AddSeconds(unixTimeStamp); + + /// Converts a UNIX timestamp to a .NET DateTime + /// UNIX timestamp (seconds since 1st Jan. 1970) + /// .NET DateTime + public static DateTime UnixToDateTime(long unixTimeStamp) => _unixEpoch.AddSeconds(unixTimeStamp); + + /// Converts a UNIX timestamp to a .NET DateTime + /// UNIX timestamp (seconds since 1st Jan. 1970) + /// .NET DateTime + public static DateTime UnixUnsignedToDateTime(uint unixTimeStamp) => _unixEpoch.AddSeconds(unixTimeStamp); + + /// Converts a UNIX timestamp to a .NET DateTime + /// Seconds since 1st Jan. 1970) + /// Nanoseconds + /// .NET DateTime + public static DateTime UnixUnsignedToDateTime(uint seconds, uint nanoseconds) => + _unixEpoch.AddSeconds(seconds).AddTicks((long)nanoseconds / 100); + + /// Converts a UNIX timestamp to a .NET DateTime + /// UNIX timestamp (seconds since 1st Jan. 1970) + /// .NET DateTime + public static DateTime UnixUnsignedToDateTime(ulong unixTimeStamp) => _unixEpoch.AddSeconds(unixTimeStamp); + + /// Converts a High Sierra Format timestamp to a .NET DateTime + /// High Sierra Format timestamp + /// .NET DateTime + public static DateTime HighSierraToDateTime(byte[] vdDateTime) + { + byte[] isoTime = new byte[17]; + Array.Copy(vdDateTime, 0, isoTime, 0, 16); + + return Iso9660ToDateTime(isoTime); + } + + // TODO: Timezone + /// Converts an ISO9660 timestamp to a .NET DateTime + /// ISO9660 timestamp + /// .NET DateTime + public static DateTime Iso9660ToDateTime(byte[] vdDateTime) + { + byte[] twoCharValue = new byte[2]; + byte[] fourCharValue = new byte[4]; + + fourCharValue[0] = vdDateTime[0]; + fourCharValue[1] = vdDateTime[1]; + fourCharValue[2] = vdDateTime[2]; + fourCharValue[3] = vdDateTime[3]; + + AaruConsole.DebugWriteLine("ISO9600ToDateTime handler", "year = \"{0}\"", + StringHandlers.CToString(fourCharValue, Encoding.ASCII)); + + if(!int.TryParse(StringHandlers.CToString(fourCharValue, Encoding.ASCII), out int year)) + year = 0; + + twoCharValue[0] = vdDateTime[4]; + twoCharValue[1] = vdDateTime[5]; + + AaruConsole.DebugWriteLine("ISO9600ToDateTime handler", "month = \"{0}\"", + StringHandlers.CToString(twoCharValue, Encoding.ASCII)); + + if(!int.TryParse(StringHandlers.CToString(twoCharValue, Encoding.ASCII), out int month)) + month = 0; + + twoCharValue[0] = vdDateTime[6]; + twoCharValue[1] = vdDateTime[7]; + + AaruConsole.DebugWriteLine("ISO9600ToDateTime handler", "day = \"{0}\"", + StringHandlers.CToString(twoCharValue, Encoding.ASCII)); + + if(!int.TryParse(StringHandlers.CToString(twoCharValue, Encoding.ASCII), out int day)) + day = 0; + + twoCharValue[0] = vdDateTime[8]; + twoCharValue[1] = vdDateTime[9]; + + AaruConsole.DebugWriteLine("ISO9600ToDateTime handler", "hour = \"{0}\"", + StringHandlers.CToString(twoCharValue, Encoding.ASCII)); + + if(!int.TryParse(StringHandlers.CToString(twoCharValue, Encoding.ASCII), out int hour)) + hour = 0; + + twoCharValue[0] = vdDateTime[10]; + twoCharValue[1] = vdDateTime[11]; + + AaruConsole.DebugWriteLine("ISO9600ToDateTime handler", "minute = \"{0}\"", + StringHandlers.CToString(twoCharValue, Encoding.ASCII)); + + if(!int.TryParse(StringHandlers.CToString(twoCharValue, Encoding.ASCII), out int minute)) + minute = 0; + + twoCharValue[0] = vdDateTime[12]; + twoCharValue[1] = vdDateTime[13]; + + AaruConsole.DebugWriteLine("ISO9600ToDateTime handler", "second = \"{0}\"", + StringHandlers.CToString(twoCharValue, Encoding.ASCII)); + + if(!int.TryParse(StringHandlers.CToString(twoCharValue, Encoding.ASCII), out int second)) + second = 0; + + twoCharValue[0] = vdDateTime[14]; + twoCharValue[1] = vdDateTime[15]; + + AaruConsole.DebugWriteLine("ISO9600ToDateTime handler", "hundredths = \"{0}\"", + StringHandlers.CToString(twoCharValue, Encoding.ASCII)); + + if(!int.TryParse(StringHandlers.CToString(twoCharValue, Encoding.ASCII), out int hundredths)) + hundredths = 0; + + AaruConsole.DebugWriteLine("ISO9600ToDateTime handler", + "decodedDT = new DateTime({0}, {1}, {2}, {3}, {4}, {5}, {6}, DateTimeKind.Unspecified);", + year, month, day, hour, minute, second, hundredths * 10); + + sbyte difference = (sbyte)vdDateTime[16]; + + var decodedDt = new DateTime(year, month, day, hour, minute, second, hundredths * 10, DateTimeKind.Utc); + + return decodedDt.AddMinutes(difference * -15); + } + + /// Converts a VMS timestamp to a .NET DateTime + /// VMS timestamp (tenths of microseconds since day 0 of the Julian Date) + /// .NET DateTime + /// C# works in UTC, VMS on Julian Date, some displacement may occur on disks created outside UTC + public static DateTime VmsToDateTime(ulong vmsDate) + { + double delta = vmsDate * 0.0001; // Tenths of microseconds to milliseconds, will lose some detail + + return _julianEpoch.AddMilliseconds(delta); + } + + /// Converts an Amiga timestamp to a .NET DateTime + /// Days since the 1st Jan. 1978 + /// Minutes since o'clock + /// Ticks + /// .NET DateTime + public static DateTime AmigaToDateTime(uint days, uint minutes, uint ticks) + { + DateTime temp = _amigaEpoch.AddDays(days); + temp = temp.AddMinutes(minutes); + + return temp.AddMilliseconds(ticks * 20); + } + + /// Converts an UCSD Pascal timestamp to a .NET DateTime + /// UCSD Pascal timestamp + /// .NET DateTime + public static DateTime UcsdPascalToDateTime(short dateRecord) + { + int year = ((dateRecord & 0xFE00) >> 9) + 1900; + int day = (dateRecord & 0x01F0) >> 4; + int month = dateRecord & 0x000F; + + AaruConsole.DebugWriteLine("UCSDPascalToDateTime handler", + "dateRecord = 0x{0:X4}, year = {1}, month = {2}, day = {3}", dateRecord, year, + month, day); + + return new DateTime(year, month, day); + } + + /// Converts a DOS timestamp to a .NET DateTime + /// Date + /// Time + /// .NET DateTime + public static DateTime DosToDateTime(ushort date, ushort time) + { + int year = ((date & 0xFE00) >> 9) + 1980; + int month = (date & 0x1E0) >> 5; + int day = date & 0x1F; + int hour = (time & 0xF800) >> 11; + int minute = (time & 0x7E0) >> 5; + int second = (time & 0x1F) * 2; + + AaruConsole.DebugWriteLine("DOSToDateTime handler", "date = 0x{0:X4}, year = {1}, month = {2}, day = {3}", + date, year, month, day); + + AaruConsole.DebugWriteLine("DOSToDateTime handler", + "time = 0x{0:X4}, hour = {1}, minute = {2}, second = {3}", time, hour, minute, + second); + + DateTime dosDate; + + try + { + dosDate = new DateTime(year, month, day, hour, minute, second); + } + catch(ArgumentOutOfRangeException) + { + dosDate = new DateTime(1980, 1, 1, 0, 0, 0); + } + + return dosDate; + } + + /// Converts a CP/M timestamp to .NET DateTime + /// CP/M timestamp + /// .NET DateTime + public static DateTime CpmToDateTime(byte[] timestamp) + { + ushort days = BitConverter.ToUInt16(timestamp, 0); + int hours = timestamp[2]; + int minutes = timestamp[3]; + + DateTime temp = _amigaEpoch.AddDays(days); + temp = temp.AddHours(hours); + temp = temp.AddMinutes(minutes); + + return temp; + } + + /// Converts an ECMA timestamp to a .NET DateTime + /// Timezone + /// Year + /// Month + /// Day + /// Hour + /// Minute + /// Second + /// Centiseconds + /// Hundreds of microseconds + /// Microseconds + /// + public static DateTime EcmaToDateTime(ushort typeAndTimeZone, short year, byte month, byte day, byte hour, + byte minute, byte second, byte centiseconds, byte hundredsOfMicroseconds, + byte microseconds) + { + byte specification = (byte)((typeAndTimeZone & 0xF000) >> 12); + + long ticks = ((long)centiseconds * 100000) + ((long)hundredsOfMicroseconds * 1000) + + ((long)microseconds * 10); + + if(specification == 0) + return new DateTime(year, month, day, hour, minute, second, DateTimeKind.Utc).AddTicks(ticks); + + ushort preOffset = (ushort)(typeAndTimeZone & 0xFFF); + short offset; + + if((preOffset & 0x800) == 0x800) + offset = (short)(preOffset | 0xF000); + else + offset = (short)(preOffset & 0x7FF); + + if(offset == -2047) + return new DateTime(year, month, day, hour, minute, second, DateTimeKind.Unspecified).AddTicks(ticks); + + if(offset < -1440 || + offset > 1440) + offset = 0; + + return new DateTimeOffset(year, month, day, hour, minute, second, new TimeSpan(0, offset, 0)). + AddTicks(ticks).DateTime; + } + + /// Converts a Solaris high resolution timestamp to .NET DateTime + /// Solaris high resolution timestamp + /// .NET DateTime + public static DateTime UnixHrTimeToDateTime(ulong hrTimeStamp) => + _unixEpoch.AddTicks((long)(hrTimeStamp / 100)); + + /// Converts an OS-9 timestamp to .NET DateTime + /// OS-9 timestamp + /// .NET DateTime + public static DateTime Os9ToDateTime(byte[] date) + { + if(date == null || + (date.Length != 3 && date.Length != 5)) + return DateTime.MinValue; + + DateTime os9Date; + + try + { + os9Date = date.Length == 5 ? new DateTime(1900 + date[0], date[1], date[2], date[3], date[4], 0) + : new DateTime(1900 + date[0], date[1], date[2], 0, 0, 0); + } + catch(ArgumentOutOfRangeException) + { + os9Date = new DateTime(1900, 0, 0, 0, 0, 0); + } + + return os9Date; + } + + /// Converts a LIF timestamp to .NET DateTime + /// LIF timestamp + /// .NET DateTime + public static DateTime LifToDateTime(byte[] date) + { + if(date == null || + date.Length != 6) + return new DateTime(1970, 1, 1, 0, 0, 0); + + return LifToDateTime(date[0], date[1], date[2], date[3], date[4], date[5]); + } + + /// Converts a LIF timestamp to .NET DateTime + /// Yer + /// Month + /// Day + /// Hour + /// Minute + /// Second + /// .NET DateTime + public static DateTime LifToDateTime(byte year, byte month, byte day, byte hour, byte minute, byte second) + { + try + { + int iyear = ((year >> 4) * 10) + (year & 0xF); + int imonth = ((month >> 4) * 10) + (month & 0xF); + int iday = ((day >> 4) * 10) + (day & 0xF); + int iminute = ((minute >> 4) * 10) + (minute & 0xF); + int ihour = ((hour >> 4) * 10) + (hour & 0xF); + int isecond = ((second >> 4) * 10) + (second & 0xF); + + if(iyear >= 70) + iyear += 1900; + else + iyear += 2000; + + return new DateTime(iyear, imonth, iday, ihour, iminute, isecond); + } + catch(ArgumentOutOfRangeException) + { + return new DateTime(1970, 1, 1, 0, 0, 0); + } + } + } +} \ No newline at end of file diff --git a/Aaru.Helpers/Marshal.cs b/Aaru.Helpers/Marshal.cs new file mode 100644 index 0000000..3bbc099 --- /dev/null +++ b/Aaru.Helpers/Marshal.cs @@ -0,0 +1,498 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Marshal.cs +// Author(s) : Natalia Portillo +// +// Component : Helpers. +// +// --[ Description ] ---------------------------------------------------------- +// +// Provides marshalling for binary data. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Diagnostics.CodeAnalysis; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace Aaru.Helpers +{ + /// Provides methods to marshal binary data into C# structs + public static class Marshal + { + /// Returns the size of an unmanaged type in bytes. + /// The type whose size is to be returned. + /// The size, in bytes, of the type that is specified by the generic type parameter. + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int SizeOf() => System.Runtime.InteropServices.Marshal.SizeOf(); + + /// Marshal little-endian binary data to a structure + /// Byte array containing the binary data + /// Type of the structure to marshal + /// The binary data marshalled in a structure with the specified type + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T ByteArrayToStructureLittleEndian(byte[] bytes) where T : struct + { + var ptr = GCHandle.Alloc(bytes, GCHandleType.Pinned); + + var str = (T)System.Runtime.InteropServices.Marshal.PtrToStructure(ptr.AddrOfPinnedObject(), typeof(T)); + + ptr.Free(); + + return str; + } + + /// Marshal little-endian binary data to a structure + /// Byte array containing the binary data + /// Start on the array where the structure begins + /// Length of the structure in bytes + /// Type of the structure to marshal + /// The binary data marshalled in a structure with the specified type + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T ByteArrayToStructureLittleEndian(byte[] bytes, int start, int length) where T : struct + { + Span span = bytes; + + return ByteArrayToStructureLittleEndian(span.Slice(start, length).ToArray()); + } + + /// Marshal big-endian binary data to a structure + /// Byte array containing the binary data + /// Type of the structure to marshal + /// The binary data marshalled in a structure with the specified type + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T ByteArrayToStructureBigEndian(byte[] bytes) where T : struct + { + var ptr = GCHandle.Alloc(bytes, GCHandleType.Pinned); + + object str = (T)System.Runtime.InteropServices.Marshal.PtrToStructure(ptr.AddrOfPinnedObject(), typeof(T)); + + ptr.Free(); + + return (T)SwapStructureMembersEndian(str); + } + + /// Marshal big-endian binary data to a structure + /// Byte array containing the binary data + /// Start on the array where the structure begins + /// Length of the structure in bytes + /// Type of the structure to marshal + /// The binary data marshalled in a structure with the specified type + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T ByteArrayToStructureBigEndian(byte[] bytes, int start, int length) where T : struct + { + Span span = bytes; + + return ByteArrayToStructureBigEndian(span.Slice(start, length).ToArray()); + } + + /// Marshal PDP-11 binary data to a structure + /// Byte array containing the binary data + /// Type of the structure to marshal + /// The binary data marshalled in a structure with the specified type + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T ByteArrayToStructurePdpEndian(byte[] bytes) where T : struct + { + { + var ptr = GCHandle.Alloc(bytes, GCHandleType.Pinned); + + object str = + (T)System.Runtime.InteropServices.Marshal.PtrToStructure(ptr.AddrOfPinnedObject(), typeof(T)); + + ptr.Free(); + + return (T)SwapStructureMembersEndianPdp(str); + } + } + + /// Marshal PDP-11 binary data to a structure + /// Byte array containing the binary data + /// Start on the array where the structure begins + /// Length of the structure in bytes + /// Type of the structure to marshal + /// The binary data marshalled in a structure with the specified type + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T ByteArrayToStructurePdpEndian(byte[] bytes, int start, int length) where T : struct + { + Span span = bytes; + + return ByteArrayToStructurePdpEndian(span.Slice(start, length).ToArray()); + } + + /// + /// Marshal little-endian binary data to a structure. If the structure type contains any non value type, this + /// method will crash. + /// + /// Byte array containing the binary data + /// Type of the structure to marshal + /// The binary data marshalled in a structure with the specified type + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T SpanToStructureLittleEndian(ReadOnlySpan bytes) where T : struct => + MemoryMarshal.Read(bytes); + + /// + /// Marshal little-endian binary data to a structure. If the structure type contains any non value type, this + /// method will crash. + /// + /// Byte span containing the binary data + /// Start on the span where the structure begins + /// Length of the structure in bytes + /// Type of the structure to marshal + /// The binary data marshalled in a structure with the specified type + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T SpanToStructureLittleEndian(ReadOnlySpan bytes, int start, int length) + where T : struct => MemoryMarshal.Read(bytes.Slice(start, length)); + + /// + /// Marshal big-endian binary data to a structure. If the structure type contains any non value type, this method + /// will crash. + /// + /// Byte array containing the binary data + /// Type of the structure to marshal + /// The binary data marshalled in a structure with the specified type + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T SpanToStructureBigEndian(ReadOnlySpan bytes) where T : struct + { + T str = SpanToStructureLittleEndian(bytes); + + return (T)SwapStructureMembersEndian(str); + } + + /// + /// Marshal big-endian binary data to a structure. If the structure type contains any non value type, this method + /// will crash. + /// + /// Byte span containing the binary data + /// Start on the span where the structure begins + /// Length of the structure in bytes + /// Type of the structure to marshal + /// The binary data marshalled in a structure with the specified type + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T SpanToStructureBigEndian(ReadOnlySpan bytes, int start, int length) where T : struct + { + T str = SpanToStructureLittleEndian(bytes.Slice(start, length)); + + return (T)SwapStructureMembersEndian(str); + } + + /// + /// Marshal PDP-11 binary data to a structure. If the structure type contains any non value type, this method will + /// crash. + /// + /// Byte array containing the binary data + /// Type of the structure to marshal + /// The binary data marshalled in a structure with the specified type + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T SpanToStructurePdpEndian(ReadOnlySpan bytes) where T : struct + { + object str = SpanToStructureLittleEndian(bytes); + + return (T)SwapStructureMembersEndianPdp(str); + } + + /// + /// Marshal PDP-11 binary data to a structure. If the structure type contains any non value type, this method will + /// crash. + /// + /// Byte array containing the binary data + /// Start on the span where the structure begins + /// Length of the structure in bytes + /// Type of the structure to marshal + /// The binary data marshalled in a structure with the specified type + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T SpanToStructurePdpEndian(ReadOnlySpan bytes, int start, int length) where T : struct + { + object str = SpanToStructureLittleEndian(bytes.Slice(start, length)); + + return (T)SwapStructureMembersEndianPdp(str); + } + + /// + /// Marshal a structure depending on the decoration of . If the + /// decoration is not present it will marshal as a reference type containing little endian structure. + /// + /// Byte array containing the binary data + /// Type of the structure to marshal + /// The binary data marshalled in a structure with the specified type + /// + /// The contains an unsupported + /// endian + /// + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static T MarshalStructure(byte[] bytes) where T : struct + { + if(!(typeof(T).GetCustomAttribute(typeof(MarshallingPropertiesAttribute)) is MarshallingPropertiesAttribute + properties)) + return ByteArrayToStructureLittleEndian(bytes); + + switch(properties.Endian) + { + case BitEndian.Little: + return properties.HasReferences ? ByteArrayToStructureLittleEndian(bytes) + : SpanToStructureLittleEndian(bytes); + + case BitEndian.Big: + return properties.HasReferences ? ByteArrayToStructureBigEndian(bytes) + : SpanToStructureBigEndian(bytes); + + case BitEndian.Pdp: + return properties.HasReferences ? ByteArrayToStructurePdpEndian(bytes) + : SpanToStructurePdpEndian(bytes); + default: throw new ArgumentOutOfRangeException(); + } + } + + /// Swaps all members of a structure + /// + /// + [MethodImpl(MethodImplOptions.AggressiveInlining), SuppressMessage("ReSharper", "InconsistentNaming")] + public static object SwapStructureMembersEndian(object str) + { + Type t = str.GetType(); + FieldInfo[] fieldInfo = t.GetFields(); + + foreach(FieldInfo fi in fieldInfo) + if(fi.FieldType == typeof(short) || + (fi.FieldType.IsEnum && fi.FieldType.GetEnumUnderlyingType() == typeof(short))) + { + short x = (short)fi.GetValue(str); + fi.SetValue(str, (short)((x << 8) | ((x >> 8) & 0xFF))); + } + else if(fi.FieldType == typeof(int) || + (fi.FieldType.IsEnum && fi.FieldType.GetEnumUnderlyingType() == typeof(int))) + { + int x = (int)fi.GetValue(str); + x = (int)(((x << 8) & 0xFF00FF00) | (((uint)x >> 8) & 0xFF00FF)); + fi.SetValue(str, (int)(((uint)x << 16) | (((uint)x >> 16) & 0xFFFF))); + } + else if(fi.FieldType == typeof(long) || + (fi.FieldType.IsEnum && fi.FieldType.GetEnumUnderlyingType() == typeof(long))) + { + long x = (long)fi.GetValue(str); + x = ((x & 0x00000000FFFFFFFF) << 32) | (long)(((ulong)x & 0xFFFFFFFF00000000) >> 32); + x = ((x & 0x0000FFFF0000FFFF) << 16) | (long)(((ulong)x & 0xFFFF0000FFFF0000) >> 16); + x = ((x & 0x00FF00FF00FF00FF) << 8) | (long)(((ulong)x & 0xFF00FF00FF00FF00) >> 8); + + fi.SetValue(str, x); + } + else if(fi.FieldType == typeof(ushort) || + (fi.FieldType.IsEnum && fi.FieldType.GetEnumUnderlyingType() == typeof(ushort))) + { + ushort x = (ushort)fi.GetValue(str); + fi.SetValue(str, (ushort)((x << 8) | (x >> 8))); + } + else if(fi.FieldType == typeof(uint) || + (fi.FieldType.IsEnum && fi.FieldType.GetEnumUnderlyingType() == typeof(uint))) + { + uint x = (uint)fi.GetValue(str); + x = ((x << 8) & 0xFF00FF00) | ((x >> 8) & 0xFF00FF); + fi.SetValue(str, (x << 16) | (x >> 16)); + } + else if(fi.FieldType == typeof(ulong) || + (fi.FieldType.IsEnum && fi.FieldType.GetEnumUnderlyingType() == typeof(ulong))) + { + ulong x = (ulong)fi.GetValue(str); + x = ((x & 0x00000000FFFFFFFF) << 32) | ((x & 0xFFFFFFFF00000000) >> 32); + x = ((x & 0x0000FFFF0000FFFF) << 16) | ((x & 0xFFFF0000FFFF0000) >> 16); + x = ((x & 0x00FF00FF00FF00FF) << 8) | ((x & 0xFF00FF00FF00FF00) >> 8); + fi.SetValue(str, x); + } + else if(fi.FieldType == typeof(float)) + { + float flt = (float)fi.GetValue(str); + byte[] flt_b = BitConverter.GetBytes(flt); + + fi.SetValue(str, BitConverter.ToSingle(new[] + { + flt_b[3], flt_b[2], flt_b[1], flt_b[0] + }, 0)); + } + else if(fi.FieldType == typeof(double)) + { + double dbl = (double)fi.GetValue(str); + byte[] dbl_b = BitConverter.GetBytes(dbl); + + fi.SetValue(str, BitConverter.ToDouble(new[] + { + dbl_b[7], dbl_b[6], dbl_b[5], dbl_b[4], dbl_b[3], dbl_b[2], dbl_b[1], dbl_b[0] + }, 0)); + } + else if(fi.FieldType == typeof(byte) || + fi.FieldType == typeof(sbyte)) + { + // Do nothing, can't byteswap them! + } + else if(fi.FieldType == typeof(Guid)) + { + // TODO: Swap GUID + } + + // TODO: Swap arrays + else if(fi.FieldType.IsValueType && + !fi.FieldType.IsEnum && + !fi.FieldType.IsArray) + { + object obj = fi.GetValue(str); + object strc = SwapStructureMembersEndian(obj); + fi.SetValue(str, strc); + } + + return str; + } + + /// Swaps all fields in an structure considering them to follow PDP endian conventions + /// Source structure + /// Resulting structure + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static object SwapStructureMembersEndianPdp(object str) + { + Type t = str.GetType(); + FieldInfo[] fieldInfo = t.GetFields(); + + foreach(FieldInfo fi in fieldInfo) + if(fi.FieldType == typeof(short) || + fi.FieldType == typeof(long) || + fi.FieldType == typeof(ushort) || + fi.FieldType == typeof(ulong) || + fi.FieldType == typeof(float) || + fi.FieldType == typeof(double) || + fi.FieldType == typeof(byte) || + fi.FieldType == typeof(sbyte) || + fi.FieldType == typeof(Guid)) + { + // Do nothing + } + else if(fi.FieldType == typeof(int) || + (fi.FieldType.IsEnum && fi.FieldType.GetEnumUnderlyingType() == typeof(int))) + { + int x = (int)fi.GetValue(str); + fi.SetValue(str, ((x & 0xffffu) << 16) | ((x & 0xffff0000u) >> 16)); + } + else if(fi.FieldType == typeof(uint) || + (fi.FieldType.IsEnum && fi.FieldType.GetEnumUnderlyingType() == typeof(uint))) + { + uint x = (uint)fi.GetValue(str); + fi.SetValue(str, ((x & 0xffffu) << 16) | ((x & 0xffff0000u) >> 16)); + } + + // TODO: Swap arrays + else if(fi.FieldType.IsValueType && + !fi.FieldType.IsEnum && + !fi.FieldType.IsArray) + { + object obj = fi.GetValue(str); + object strc = SwapStructureMembersEndianPdp(obj); + fi.SetValue(str, strc); + } + + return str; + } + + /// Marshal a structure to little-endian binary data + /// The structure you want to marshal to binary + /// Type of the structure to marshal + /// The byte array representing the given structure + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte[] StructureToByteArrayLittleEndian(T str) where T : struct + { + byte[] buf = new byte[SizeOf()]; + var ptr = GCHandle.Alloc(buf, GCHandleType.Pinned); + System.Runtime.InteropServices.Marshal.StructureToPtr(str, ptr.AddrOfPinnedObject(), false); + ptr.Free(); + + return buf; + } + + /// Marshal a structure to little-endian binary data + /// The structure you want to marshal to binary + /// Type of the structure to marshal + /// The byte array representing the given structure + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static byte[] StructureToByteArrayBigEndian(T str) where T : struct => + StructureToByteArrayLittleEndian((T)SwapStructureMembersEndian(str)); + + /// Converts a hexadecimal string into a byte array + /// Hexadecimal string + /// Resulting byte array + /// Number of output bytes processed + public static int ConvertFromHexAscii(string hex, out byte[] outBuf) + { + outBuf = null; + + if(hex is null || + hex == "") + return -1; + + int off = 0; + + if(hex[0] == '0' && + (hex[1] == 'x' || hex[1] == 'X')) + { + off = 2; + } + + outBuf = new byte[(hex.Length - off) / 2]; + int count = 0; + + for(int i = off; i < hex.Length; i += 2) + { + char c = hex[i]; + + if(c < '0' || + (c > '9' && c < 'A') || + (c > 'F' && c < 'a') || + c > 'f') + break; + + c -= c >= 'a' && c <= 'f' + ? '\u0057' + : c >= 'A' && c <= 'F' + ? '\u0037' + : '\u0030'; + + outBuf[(i - off) / 2] = (byte)(c << 4); + + c = hex[i + 1]; + + if(c < '0' || + (c > '9' && c < 'A') || + (c > 'F' && c < 'a') || + c > 'f') + break; + + c -= c >= 'a' && c <= 'f' + ? '\u0057' + : c >= 'A' && c <= 'F' + ? '\u0037' + : '\u0030'; + + outBuf[(i - off) / 2] += (byte)c; + + count++; + } + + return count; + } + } +} \ No newline at end of file diff --git a/Aaru.Helpers/MarshallingPropertiesAttribute.cs b/Aaru.Helpers/MarshallingPropertiesAttribute.cs new file mode 100644 index 0000000..c148ac9 --- /dev/null +++ b/Aaru.Helpers/MarshallingPropertiesAttribute.cs @@ -0,0 +1,62 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : MarshallingPropertiesAttribute.cs +// Author(s) : Natalia Portillo +// +// Component : Common types. +// +// --[ Description ] ---------------------------------------------------------- +// +// Declares properties of structs for marshalling. +// +// --[ License ] -------------------------------------------------------------- +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; + +namespace Aaru.Helpers +{ + /// + /// Defines properties to help marshalling structs from binary data + [AttributeUsage(AttributeTargets.Struct)] + public sealed class MarshallingPropertiesAttribute : Attribute + { + /// + /// Defines properties to help marshalling structs from binary data + /// Defines properties to help marshalling structs from binary data + public MarshallingPropertiesAttribute(BitEndian endian) + { + Endian = endian; + HasReferences = true; + } + + /// c + public BitEndian Endian { get; } + /// Tells if the structure, or any nested structure, has any non-value type (e.g. arrays, strings, etc). + public bool HasReferences { get; set; } + } +} \ No newline at end of file diff --git a/Aaru.Helpers/PrintHex.cs b/Aaru.Helpers/PrintHex.cs new file mode 100644 index 0000000..a06870b --- /dev/null +++ b/Aaru.Helpers/PrintHex.cs @@ -0,0 +1,136 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : PrintHex.cs +// Author(s) : Natalia Portillo +// +// Component : Helpers. +// +// --[ Description ] ---------------------------------------------------------- +// +// Prints a byte array as hexadecimal. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System.Text; +using Aaru.Console; + +namespace Aaru.Helpers +{ + /// Helper operations to get hexadecimal representations of byte arrays + public static class PrintHex + { + /// Prints a byte array as hexadecimal values to the console + /// Array + /// Width of line + public static void PrintHexArray(byte[] array, int width = 16) => + AaruConsole.WriteLine(ByteArrayToHexArrayString(array, width)); + + /// Prints a byte array as hexadecimal values to a string + /// Array + /// Width of line + /// Use ANSI escape colors for sections + /// String containing hexadecimal values + public static string ByteArrayToHexArrayString(byte[] array, int width = 16, bool color = false) + { + if(array is null) + return null; + + // TODO: Color list + // TODO: Allow to change width + string str = "Offset"; + int rows = array.Length / 16; + int last = array.Length % 16; + int offsetLength = $"{array.Length:X}".Length; + var sb = new StringBuilder(); + + if(last > 0) + rows++; + + if(last == 0) + last = 16; + + if(offsetLength < str.Length) + offsetLength = str.Length; + + while(str.Length < offsetLength) + str += ' '; + + if(color) + sb.Append("\u001b[36m"); + + sb.Append(str); + sb.Append(" "); + + for(int i = 0; i < 16; i++) + { + sb.AppendFormat(" {0:X2}", i); + } + + if(color) + sb.Append("\u001b[0m"); + + sb.AppendLine(); + + int b = 0; + + string format = $"{{0:X{offsetLength}}}"; + + for(int i = 0; i < rows; i++) + { + if(color) + sb.Append("\u001b[36m"); + + sb.AppendFormat(format, b); + + if(color) + sb.Append("\u001b[0m"); + + sb.Append(" "); + int lastBytes = i == rows - 1 ? last : 16; + int lastSpaces = 16 - lastBytes; + + for(int j = 0; j < lastBytes; j++) + { + sb.AppendFormat(" {0:X2}", array[b]); + b++; + } + + for(int j = 0; j < lastSpaces; j++) + sb.Append(" "); + + b -= lastBytes; + sb.Append(" "); + + for(int j = 0; j < lastBytes; j++) + { + int v = array[b]; + sb.Append((v > 31 && v < 127) || v > 159 ? (char)v : '.'); + b++; + } + + sb.AppendLine(); + } + + return sb.ToString(); + } + } +} \ No newline at end of file diff --git a/Aaru.Helpers/StringHandlers.cs b/Aaru.Helpers/StringHandlers.cs new file mode 100644 index 0000000..42fb176 --- /dev/null +++ b/Aaru.Helpers/StringHandlers.cs @@ -0,0 +1,185 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : StringHandlers.cs +// Author(s) : Natalia Portillo +// +// Component : Helpers. +// +// --[ Description ] ---------------------------------------------------------- +// +// Convert byte arrays to C# strings. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System; +using System.Text; + +namespace Aaru.Helpers +{ + /// Helper operations to work with strings + public static class StringHandlers + { + /// Converts a null-terminated (aka C string) ASCII byte array to a C# string + /// The corresponding C# string + /// A null-terminated (aka C string) ASCII byte array + public static string CToString(byte[] cString) => CToString(cString, Encoding.ASCII); + + /// Converts a null-terminated (aka C string) byte array with the specified encoding to a C# string + /// The corresponding C# string + /// A null-terminated (aka C string) byte array in the specified encoding + /// Encoding. + /// Set if encoding uses 16-bit characters. + /// Start decoding at this position + public static string CToString(byte[] cString, Encoding encoding, bool twoBytes = false, int start = 0) + { + if(cString == null) + return null; + + int len = 0; + + for(int i = start; i < cString.Length; i++) + { + if(cString[i] == 0) + if(twoBytes) + { + if(i + 1 < cString.Length && + cString[i + 1] == 0) + { + len++; + + break; + } + } + else + break; + + len++; + } + + if(twoBytes && len % 2 > 0) + len--; + + byte[] dest = new byte[len]; + Array.Copy(cString, start, dest, 0, len); + + return len == 0 ? "" : encoding.GetString(dest); + } + + /// Converts a length-prefixed (aka Pascal string) ASCII byte array to a C# string + /// The corresponding C# string + /// A length-prefixed (aka Pascal string) ASCII byte array + public static string PascalToString(byte[] pascalString) => PascalToString(pascalString, Encoding.ASCII); + + /// Converts a length-prefixed (aka Pascal string) ASCII byte array to a C# string + /// The corresponding C# string + /// A length-prefixed (aka Pascal string) ASCII byte array + /// Encoding. + /// Start decoding at this position + public static string PascalToString(byte[] pascalString, Encoding encoding, int start = 0) + { + if(pascalString == null) + return null; + + byte length = pascalString[start]; + int len = 0; + + for(int i = start + 1; i < length + 1 && i < pascalString.Length; i++) + { + if(pascalString[i] == 0) + break; + + len++; + } + + byte[] dest = new byte[len]; + Array.Copy(pascalString, start + 1, dest, 0, len); + + return len == 0 ? "" : encoding.GetString(dest); + } + + /// Converts a space (' ', 0x20, ASCII SPACE) padded ASCII byte array to a C# string + /// The corresponding C# string + /// A space (' ', 0x20, ASCII SPACE) padded ASCII byte array + public static string SpacePaddedToString(byte[] spacePaddedString) => + SpacePaddedToString(spacePaddedString, Encoding.ASCII); + + /// Converts a space (' ', 0x20, ASCII SPACE) padded ASCII byte array to a C# string + /// The corresponding C# string + /// A space (' ', 0x20, ASCII SPACE) padded ASCII byte array + /// Encoding. + /// Start decoding at this position + public static string SpacePaddedToString(byte[] spacePaddedString, Encoding encoding, int start = 0) + { + if(spacePaddedString == null) + return null; + + int len = start; + + for(int i = spacePaddedString.Length; i >= start; i--) + { + if(i == start) + return ""; + + if(spacePaddedString[i - 1] == 0x20) + continue; + + len = i; + + break; + } + + return len == 0 ? "" : encoding.GetString(spacePaddedString, start, len); + } + + /// Converts an OSTA compressed unicode byte array to a C# string + /// The C# string. + /// OSTA compressed unicode byte array. + public static string DecompressUnicode(byte[] dstring) + { + ushort unicode; + byte compId = dstring[0]; + string temp = ""; + + if(compId != 8 && + compId != 16) + return null; + + for(int byteIndex = 1; byteIndex < dstring.Length;) + { + if(compId == 16) + unicode = (ushort)(dstring[byteIndex++] << 8); + else + unicode = 0; + + if(byteIndex < dstring.Length) + unicode |= dstring[byteIndex++]; + + if(unicode == 0) + break; + + temp += Encoding.Unicode.GetString(BitConverter.GetBytes(unicode)); + } + + return temp; + } + } +} \ No newline at end of file diff --git a/Aaru.Helpers/Swapping.cs b/Aaru.Helpers/Swapping.cs new file mode 100644 index 0000000..29134ca --- /dev/null +++ b/Aaru.Helpers/Swapping.cs @@ -0,0 +1,112 @@ +// /*************************************************************************** +// Aaru Data Preservation Suite +// ---------------------------------------------------------------------------- +// +// Filename : Swapping.cs +// Author(s) : Natalia Portillo +// +// Component : Helpers. +// +// --[ Description ] ---------------------------------------------------------- +// +// Byte-swapping methods. +// +// --[ License ] -------------------------------------------------------------- +// +// This library is free software; you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, see . +// +// ---------------------------------------------------------------------------- +// Copyright © 2011-2021 Natalia Portillo +// ****************************************************************************/ + +using System.Runtime.CompilerServices; + +namespace Aaru.Helpers +{ + /// Helper operations to work with swapping endians + public static class Swapping + { + /// Gets the PDP endian equivalent of the given little endian unsigned integer + /// Little endian unsigned integer + /// PDP unsigned integer + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint PDPFromLittleEndian(uint x) => ((x & 0xffff) << 16) | ((x & 0xffff0000) >> 16); + + /// Gets the PDP endian equivalent of the given big endian unsigned integer + /// Big endian unsigned integer + /// PDP unsigned integer + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint PDPFromBigEndian(uint x) => ((x & 0xff00ff) << 8) | ((x & 0xff00ff00) >> 8); + + /// Swaps the endian of the specified unsigned short integer + /// Unsigned short integer + /// Swapped unsigned short integer + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ushort Swap(ushort x) => (ushort)((x << 8) | (x >> 8)); + + /// Swaps the endian of the specified signed short integer + /// Signed short integer + /// Swapped signed short integer + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static short Swap(short x) => (short)((x << 8) | ((x >> 8) & 0xFF)); + + /// Swaps the endian of the specified unsigned integer + /// Unsigned integer + /// Swapped unsigned integer + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint Swap(uint x) + { + x = ((x << 8) & 0xFF00FF00) | ((x >> 8) & 0xFF00FF); + + return (x << 16) | (x >> 16); + } + + /// Swaps the endian of the specified signed integer + /// Signed integer + /// Swapped signed integer + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static int Swap(int x) + { + x = (int)(((x << 8) & 0xFF00FF00) | (((uint)x >> 8) & 0xFF00FF)); + + return (int)(((uint)x << 16) | (((uint)x >> 16) & 0xFFFF)); + } + + /// Swaps the endian of the specified unsigned long integer + /// Unsigned long integer + /// Swapped unsigned long integer + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static ulong Swap(ulong x) + { + x = ((x & 0x00000000FFFFFFFF) << 32) | ((x & 0xFFFFFFFF00000000) >> 32); + x = ((x & 0x0000FFFF0000FFFF) << 16) | ((x & 0xFFFF0000FFFF0000) >> 16); + x = ((x & 0x00FF00FF00FF00FF) << 8) | ((x & 0xFF00FF00FF00FF00) >> 8); + + return x; + } + + /// Swaps the endian of the specified signed long integer + /// Signed long integer + /// Swapped signed long integer + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static long Swap(long x) + { + x = ((x & 0x00000000FFFFFFFF) << 32) | (long)(((ulong)x & 0xFFFFFFFF00000000) >> 32); + x = ((x & 0x0000FFFF0000FFFF) << 16) | (long)(((ulong)x & 0xFFFF0000FFFF0000) >> 16); + x = ((x & 0x00FF00FF00FF00FF) << 8) | (long)(((ulong)x & 0xFF00FF00FF00FF00) >> 8); + + return x; + } + } +} \ No newline at end of file diff --git a/AaruBenchmark/AaruBenchmark.csproj b/AaruBenchmark/AaruBenchmark.csproj new file mode 100644 index 0000000..7c7e8f5 --- /dev/null +++ b/AaruBenchmark/AaruBenchmark.csproj @@ -0,0 +1,25 @@ + + + + Exe + netcoreapp3.1;net5;net6 + + + + + + + + + + + + Always + + + + + + + + diff --git a/AaruBenchmark/Benchs.cs b/AaruBenchmark/Benchs.cs new file mode 100644 index 0000000..7dbfec9 --- /dev/null +++ b/AaruBenchmark/Benchs.cs @@ -0,0 +1,180 @@ +using AaruBenchmark.Checksums; +using BenchmarkDotNet.Attributes; +using BenchmarkDotNet.Jobs; + +namespace AaruBenchmark +{ + [SimpleJob(RuntimeMoniker.Net60)] + public class GzipBenchs + { + [Benchmark] + public void SharpCompress() => AaruBenchmark.SharpCompress.Gzip(); + + [Benchmark(Baseline = true)] + public void DotNetRuntime() => NetRuntime.Gzip(); + + [Benchmark] + public void DotNetZip() => AaruBenchmark.DotNetZip.Gzip(); + } + + [SimpleJob(RuntimeMoniker.Net60)] + public class Bzip2Benchs + { + [Benchmark(Baseline = true)] + public void SharpCompress() => AaruBenchmark.SharpCompress.Bzip2(); + + [Benchmark] + public void DotNetZip() => AaruBenchmark.DotNetZip.Bzip2(); + } + + [SimpleJob(RuntimeMoniker.Net60)] + public class Adler32Benchs + { + [Benchmark(Baseline = true)] + public void Aaru() => Checksums.Aaru.Adler32(); + + [Benchmark] + public void AaruNative() => Checksums.AaruNative.Adler32(); + } + + [SimpleJob(RuntimeMoniker.Net60)] + public class Fletcher16Benchs + { + [Benchmark(Baseline = true)] + public void Aaru() => Checksums.Aaru.Fletcher16(); + + [Benchmark] + public void AaruNative() => Checksums.AaruNative.Fletcher16(); + } + + [SimpleJob(RuntimeMoniker.Net60)] + public class Fletcher32Benchs + { + [Benchmark(Baseline = true)] + public void Aaru() => Checksums.Aaru.Fletcher32(); + + [Benchmark] + public void AaruNative() => Checksums.AaruNative.Fletcher32(); + } + + [SimpleJob(RuntimeMoniker.Net60)] + public class Crc16CcittBenchs + { + [Benchmark(Baseline = true)] + public void Aaru() => Checksums.Aaru.Crc16Ccitt(); + + [Benchmark] + public void AaruNative() => Checksums.AaruNative.Crc16Ccitt(); + } + + [SimpleJob(RuntimeMoniker.Net60)] + public class Crc16Benchs + { + [Benchmark(Baseline = true)] + public void Aaru() => Checksums.Aaru.Crc16(); + + [Benchmark] + public void AaruNative() => Checksums.AaruNative.Crc16(); + } + + [SimpleJob(RuntimeMoniker.Net60)] + public class Crc32Benchs + { + [Benchmark(Baseline = true)] + public void Aaru() => Checksums.Aaru.Crc32(); + + [Benchmark] + public void AaruNative() => Checksums.AaruNative.Crc32(); + + [Benchmark] + public void rhash() => RHash.Crc32(); + } + + [SimpleJob(RuntimeMoniker.Net60)] + public class Crc64Benchs + { + [Benchmark(Baseline = true)] + public void Aaru() => Checksums.Aaru.Crc64(); + + [Benchmark] + public void AaruNative() => Checksums.AaruNative.Crc64(); + } + + [SimpleJob(RuntimeMoniker.Net60)] + public class Md5Benchs + { + [Benchmark(Baseline = true)] + public void Aaru() => Checksums.Aaru.Md5(); + + [Benchmark] + public void OpenSSL() => OpenSsl.Md5(); + + [Benchmark] + public void rhash() => RHash.Md5(); + } + + [SimpleJob(RuntimeMoniker.Net60)] + public class Sha1Benchs + { + [Benchmark(Baseline = true)] + public void Aaru() => Checksums.Aaru.Sha1(); + + [Benchmark] + public void OpenSSL() => OpenSsl.Sha1(); + + [Benchmark] + public void rhash() => RHash.Sha1(); + } + + [SimpleJob(RuntimeMoniker.Net60)] + public class Sha256Benchs + { + [Benchmark(Baseline = true)] + public void Aaru() => Checksums.Aaru.Sha256(); + + [Benchmark] + public void OpenSSL() => OpenSsl.Sha256(); + + [Benchmark] + public void rhash() => RHash.Sha256(); + } + + [SimpleJob(RuntimeMoniker.Net60)] + public class Sha384Benchs + { + [Benchmark(Baseline = true)] + public void Aaru() => Checksums.Aaru.Sha384(); + + [Benchmark] + public void OpenSSL() => OpenSsl.Sha384(); + + [Benchmark] + public void rhash() => RHash.Sha384(); + } + + [SimpleJob(RuntimeMoniker.Net60)] + public class Sha512Benchs + { + [Benchmark(Baseline = true)] + public void Aaru() => Checksums.Aaru.Sha512(); + + [Benchmark] + public void OpenSSL() => OpenSsl.Sha512(); + + [Benchmark] + public void rhash() => RHash.Sha512(); + } + + [SimpleJob(RuntimeMoniker.Net60)] + public class SpamSumBenchs + { + [Benchmark(Baseline = true)] + public void Aaru() => Checksums.Aaru.SpamSum(); + + [Benchmark] + public void AaruNative() => Checksums.AaruNative.SpamSum(); + + [Benchmark] + public void ssdeep() => Checksums.Aaru.CliSpamSum(); + } +} \ No newline at end of file diff --git a/AaruBenchmark/Checksums/Aaru.cs b/AaruBenchmark/Checksums/Aaru.cs new file mode 100644 index 0000000..b818bbf --- /dev/null +++ b/AaruBenchmark/Checksums/Aaru.cs @@ -0,0 +1,337 @@ +using System; +using System.Diagnostics; +using System.IO; +using System.Linq; +using Aaru.Checksums; +using Aaru.CommonTypes.Interfaces; + +namespace AaruBenchmark.Checksums +{ + public class Aaru + { + static readonly byte[] _expectedRandomAdler32 = + { + 0x37, 0x28, 0xd1, 0x86 + }; + + static readonly byte[] _expectedRandomCrc16Ccitt = + { + 0x36, 0x40 + }; + + static readonly byte[] _expectedRandomCrc16 = + { + 0x2d, 0x6d + }; + + static readonly byte[] _expectedRandomCrc32 = + { + 0x2b, 0x6e, 0x68, 0x54 + }; + + static readonly byte[] _expectedRandomCrc64 = + { + 0xbf, 0x09, 0x99, 0x2c, 0xc5, 0xed, 0xe3, 0x8e + }; + + static readonly byte[] _expectedRandomMd5 = + { + 0xd7, 0x8f, 0x0e, 0xec, 0x41, 0x7b, 0xe3, 0x86, 0x21, 0x9b, 0x21, 0xb7, 0x00, 0x04, 0x4b, 0x95 + }; + + static readonly byte[] _expectedRandomSha1 = + { + 0x72, 0x0d, 0x3b, 0x71, 0x7d, 0xe0, 0xc7, 0x4c, 0x77, 0xdd, 0x9c, 0xaa, 0x9e, 0xba, 0x50, 0x60, 0xdc, 0xbd, + 0x28, 0x8d + }; + + static readonly byte[] _expectedRandomSha256 = + { + 0x4d, 0x1a, 0x6b, 0x8a, 0x54, 0x67, 0x00, 0xc4, 0x8e, 0xda, 0x70, 0xd3, 0x39, 0x1c, 0x8f, 0x15, 0x8a, 0x8d, + 0x12, 0xb2, 0x38, 0x92, 0x89, 0x29, 0x50, 0x47, 0x8c, 0x41, 0x8e, 0x25, 0xcc, 0x39 + }; + + static readonly byte[] _expectedRandomSha384 = + { + 0xdb, 0x53, 0x0e, 0x17, 0x9b, 0x81, 0xfe, 0x5f, 0x6d, 0x20, 0x41, 0x04, 0x6e, 0x77, 0xd9, 0x85, 0xf2, 0x85, + 0x8a, 0x66, 0xca, 0xd3, 0x8d, 0x1a, 0xd5, 0xac, 0x67, 0xa9, 0x74, 0xe1, 0xef, 0x3f, 0x4d, 0xdf, 0x94, 0x15, + 0x2e, 0xac, 0x2e, 0xfe, 0x16, 0x95, 0x81, 0x54, 0xdc, 0x59, 0xd4, 0xc3 + }; + + static readonly byte[] _expectedRandomSha512 = + { + 0x6a, 0x0a, 0x18, 0xc2, 0xad, 0xf8, 0x83, 0xac, 0x58, 0xe6, 0x21, 0x96, 0xdb, 0x8d, 0x3d, 0x0e, 0xb9, 0x87, + 0xd1, 0x49, 0x24, 0x97, 0xdb, 0x15, 0xb9, 0xfc, 0xcc, 0xb0, 0x36, 0xdf, 0x64, 0xae, 0xdb, 0x3e, 0x82, 0xa0, + 0x4d, 0xdc, 0xd1, 0x37, 0x48, 0x92, 0x95, 0x51, 0xf9, 0xdd, 0xab, 0x82, 0xf4, 0x8a, 0x85, 0x3f, 0x9a, 0x01, + 0xb5, 0xf2, 0x8c, 0xbb, 0x4a, 0xa5, 0x1b, 0x40, 0x7c, 0xb6 + }; + + public static void Fletcher16() + { + byte[] data = new byte[1048576]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + IChecksum ctx = new Fletcher16Context(); + ctx.Update(data); + byte[] result = ctx.Final(); + } + + public static void Fletcher32() + { + byte[] data = new byte[1048576]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + IChecksum ctx = new Fletcher32Context(); + ctx.Update(data); + byte[] result = ctx.Final(); + } + + public static void Adler32() + { + byte[] data = new byte[1048576]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + IChecksum ctx = new Adler32Context(); + ctx.Update(data); + byte[] result = ctx.Final(); + + if(result?.Length != _expectedRandomAdler32.Length) + throw new Exception("Invalid hash length"); + + if(result.Where((t, i) => t != _expectedRandomAdler32[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Crc16Ccitt() + { + byte[] data = new byte[1048576]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + IChecksum ctx = new CRC16CCITTContext(); + ctx.Update(data); + byte[] result = ctx.Final(); + /* + if(result?.Length != _expectedRandomCrc16Ccitt.Length) + throw new Exception("Invalid hash length"); + + if(result.Where((t, i) => t != _expectedRandomCrc16Ccitt[i]).Any()) + throw new Exception("Invalid hash value");*/ + } + + public static void Crc16() + { + byte[] data = new byte[1048576]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + IChecksum ctx = new CRC16IBMContext(); + ctx.Update(data); + byte[] result = ctx.Final(); + + if(result?.Length != _expectedRandomCrc16.Length) + throw new Exception("Invalid hash length"); + + if(result.Where((t, i) => t != _expectedRandomCrc16[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Crc32() + { + byte[] data = new byte[1048576]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + IChecksum ctx = new Crc32Context(); + ctx.Update(data); + byte[] result = ctx.Final(); + + if(result?.Length != _expectedRandomCrc32.Length) + throw new Exception("Invalid hash length"); + + if(result.Where((t, i) => t != _expectedRandomCrc32[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Crc64() + { + byte[] data = new byte[1048576]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + IChecksum ctx = new Crc64Context(); + ctx.Update(data); + byte[] result = ctx.Final(); + + if(result?.Length != _expectedRandomCrc64.Length) + throw new Exception("Invalid hash length"); + + if(result.Where((t, i) => t != _expectedRandomCrc64[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Md5() + { + byte[] data = new byte[1048576]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + IChecksum ctx = new Md5Context(); + ctx.Update(data); + byte[] result = ctx.Final(); + + if(result?.Length != _expectedRandomMd5.Length) + throw new Exception("Invalid hash length"); + + if(result.Where((t, i) => t != _expectedRandomMd5[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void SpamSum() + { + byte[] data = new byte[1048576]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + IChecksum ctx = new SpamSumContext(); + ctx.Update(data); + string result = ctx.End(); + } + + public static void CliSpamSum() + { + var proc = new Process(); + proc.StartInfo.UseShellExecute = false; + proc.StartInfo.FileName = "/usr/bin/ssdeep"; + proc.StartInfo.CreateNoWindow = true; + proc.StartInfo.ArgumentList.Add("/mnt/DiscImageChef/Checksum test files/random"); + proc.StartInfo.RedirectStandardOutput = true; + proc.Start(); + proc.StandardOutput.ReadToEnd(); + proc.WaitForExit(); + } + + public static void Sha1() + { + byte[] data = new byte[1048576]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + IChecksum ctx = new Sha1Context(); + ctx.Update(data); + byte[] result = ctx.Final(); + + if(result?.Length != _expectedRandomSha1.Length) + throw new Exception("Invalid hash length"); + + if(result.Where((t, i) => t != _expectedRandomSha1[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Sha256() + { + byte[] data = new byte[1048576]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + IChecksum ctx = new Sha256Context(); + ctx.Update(data); + byte[] result = ctx.Final(); + + if(result?.Length != _expectedRandomSha256.Length) + throw new Exception("Invalid hash length"); + + if(result.Where((t, i) => t != _expectedRandomSha256[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Sha384() + { + byte[] data = new byte[1048576]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + IChecksum ctx = new Sha384Context(); + ctx.Update(data); + byte[] result = ctx.Final(); + + if(result?.Length != _expectedRandomSha384.Length) + throw new Exception("Invalid hash length"); + + if(result.Where((t, i) => t != _expectedRandomSha384[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Sha512() + { + byte[] data = new byte[1048576]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + IChecksum ctx = new Sha512Context(); + ctx.Update(data); + byte[] result = ctx.Final(); + + if(result?.Length != _expectedRandomSha512.Length) + throw new Exception("Invalid hash length"); + + if(result.Where((t, i) => t != _expectedRandomSha512[i]).Any()) + throw new Exception("Invalid hash value"); + } + } +} \ No newline at end of file diff --git a/AaruBenchmark/Checksums/AaruNative.cs b/AaruBenchmark/Checksums/AaruNative.cs new file mode 100644 index 0000000..8767ee8 --- /dev/null +++ b/AaruBenchmark/Checksums/AaruNative.cs @@ -0,0 +1,449 @@ +using System; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; + +namespace AaruBenchmark.Checksums +{ + public class AaruNative + { + static readonly byte[] _expectedRandomAdler32 = + { + 0x37, 0x28, 0xd1, 0x86 + }; + + static readonly byte[] _expectedRandomCrc16Ccitt = + { + 0x36, 0x40 + }; + + static readonly byte[] _expectedRandomCrc16 = + { + 0x2d, 0x6d + }; + + static readonly byte[] _expectedRandomCrc32 = + { + 0x2b, 0x6e, 0x68, 0x54 + }; + + static readonly byte[] _expectedRandomCrc64 = + { + 0xbf, 0x09, 0x99, 0x2c, 0xc5, 0xed, 0xe3, 0x8e + }; + + static readonly byte[] _expectedRandomMd5 = + { + 0xd7, 0x8f, 0x0e, 0xec, 0x41, 0x7b, 0xe3, 0x86, 0x21, 0x9b, 0x21, 0xb7, 0x00, 0x04, 0x4b, 0x95 + }; + + static readonly byte[] _expectedRandomSha1 = + { + 0x72, 0x0d, 0x3b, 0x71, 0x7d, 0xe0, 0xc7, 0x4c, 0x77, 0xdd, 0x9c, 0xaa, 0x9e, 0xba, 0x50, 0x60, 0xdc, 0xbd, + 0x28, 0x8d + }; + + static readonly byte[] _expectedRandomSha256 = + { + 0x4d, 0x1a, 0x6b, 0x8a, 0x54, 0x67, 0x00, 0xc4, 0x8e, 0xda, 0x70, 0xd3, 0x39, 0x1c, 0x8f, 0x15, 0x8a, 0x8d, + 0x12, 0xb2, 0x38, 0x92, 0x89, 0x29, 0x50, 0x47, 0x8c, 0x41, 0x8e, 0x25, 0xcc, 0x39 + }; + + static readonly byte[] _expectedRandomSha384 = + { + 0xdb, 0x53, 0x0e, 0x17, 0x9b, 0x81, 0xfe, 0x5f, 0x6d, 0x20, 0x41, 0x04, 0x6e, 0x77, 0xd9, 0x85, 0xf2, 0x85, + 0x8a, 0x66, 0xca, 0xd3, 0x8d, 0x1a, 0xd5, 0xac, 0x67, 0xa9, 0x74, 0xe1, 0xef, 0x3f, 0x4d, 0xdf, 0x94, 0x15, + 0x2e, 0xac, 0x2e, 0xfe, 0x16, 0x95, 0x81, 0x54, 0xdc, 0x59, 0xd4, 0xc3 + }; + + static readonly byte[] _expectedRandomSha512 = + { + 0x6a, 0x0a, 0x18, 0xc2, 0xad, 0xf8, 0x83, 0xac, 0x58, 0xe6, 0x21, 0x96, 0xdb, 0x8d, 0x3d, 0x0e, 0xb9, 0x87, + 0xd1, 0x49, 0x24, 0x97, 0xdb, 0x15, 0xb9, 0xfc, 0xcc, 0xb0, 0x36, 0xdf, 0x64, 0xae, 0xdb, 0x3e, 0x82, 0xa0, + 0x4d, 0xdc, 0xd1, 0x37, 0x48, 0x92, 0x95, 0x51, 0xf9, 0xdd, 0xab, 0x82, 0xf4, 0x8a, 0x85, 0x3f, 0x9a, 0x01, + 0xb5, 0xf2, 0x8c, 0xbb, 0x4a, 0xa5, 0x1b, 0x40, 0x7c, 0xb6 + }; + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern IntPtr adler32_init(); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern int adler32_update(IntPtr ctx, byte[] data, uint len); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern int adler32_final(IntPtr ctx, ref uint crc); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern void adler32_free(IntPtr ctx); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern IntPtr fletcher16_init(); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern int fletcher16_update(IntPtr ctx, byte[] data, uint len); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern int fletcher16_final(IntPtr ctx, ref ushort crc); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern void fletcher16_free(IntPtr ctx); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern IntPtr fletcher32_init(); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern int fletcher32_update(IntPtr ctx, byte[] data, uint len); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern int fletcher32_final(IntPtr ctx, ref uint crc); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern void fletcher32_free(IntPtr ctx); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern IntPtr crc16_ccitt_init(); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern int crc16_ccitt_update(IntPtr ctx, byte[] data, uint len); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern int crc16_ccitt_final(IntPtr ctx, ref ushort crc); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern void crc16_ccitt_free(IntPtr ctx); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern IntPtr crc16_init(); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern int crc16_update(IntPtr ctx, byte[] data, uint len); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern int crc16_final(IntPtr ctx, ref ushort crc); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern void crc16_free(IntPtr ctx); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern IntPtr crc32_init(); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern int crc32_update(IntPtr ctx, byte[] data, uint len); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern int crc32_final(IntPtr ctx, ref uint crc); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern void crc32_free(IntPtr ctx); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern IntPtr crc64_init(); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern int crc64_update(IntPtr ctx, byte[] data, uint len); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern int crc64_final(IntPtr ctx, ref ulong crc); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern void crc64_free(IntPtr ctx); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern IntPtr spamsum_init(); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern int spamsum_update(IntPtr ctx, byte[] data, uint len); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern int spamsum_final(IntPtr ctx, byte[] result); + + [DllImport("libAaru.Checksums.Native", SetLastError = true)] + static extern void spamsum_free(IntPtr ctx); + + public static void Fletcher16() + { + byte[] data = new byte[1048576]; + ushort fletcher16 = 0; + byte[] hash; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + + IntPtr ctx = fletcher16_init(); + + if(ctx == IntPtr.Zero) + throw new Exception("Could not initialize digest"); + + int ret = fletcher16_update(ctx, data, (uint)data.Length); + + if(ret != 0) + throw new Exception("Could not digest block"); + + ret = fletcher16_final(ctx, ref fletcher16); + + if(ret != 0) + throw new Exception("Could not finalize hash"); + + fletcher16_free(ctx); + } + + public static void Fletcher32() + { + byte[] data = new byte[1048576]; + uint fletcher32 = 0; + byte[] hash; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + + IntPtr ctx = fletcher32_init(); + + if(ctx == IntPtr.Zero) + throw new Exception("Could not initialize digest"); + + int ret = fletcher32_update(ctx, data, (uint)data.Length); + + if(ret != 0) + throw new Exception("Could not digest block"); + + ret = fletcher32_final(ctx, ref fletcher32); + + if(ret != 0) + throw new Exception("Could not finalize hash"); + + fletcher32_free(ctx); + } + + public static void Adler32() + { + byte[] data = new byte[1048576]; + uint adler32 = 0; + byte[] hash; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + + IntPtr ctx = adler32_init(); + + if(ctx == IntPtr.Zero) + throw new Exception("Could not initialize digest"); + + int ret = adler32_update(ctx, data, (uint)data.Length); + + if(ret != 0) + throw new Exception("Could not digest block"); + + ret = adler32_final(ctx, ref adler32); + + if(ret != 0) + throw new Exception("Could not finalize hash"); + + adler32_free(ctx); + + adler32 = ((adler32 << 8) & 0xFF00FF00) | ((adler32 >> 8) & 0xFF00FF); + adler32 = (adler32 << 16) | (adler32 >> 16); + + hash = BitConverter.GetBytes(adler32); + + if(hash.Where((t, i) => t != _expectedRandomAdler32[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Crc16Ccitt() + { + byte[] data = new byte[1048576]; + ushort crc = 0; + byte[] hash; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + + IntPtr ctx = crc16_ccitt_init(); + + if(ctx == IntPtr.Zero) + throw new Exception("Could not initialize digest"); + + int ret = crc16_ccitt_update(ctx, data, (uint)data.Length); + + if(ret != 0) + throw new Exception("Could not digest block"); + + ret = crc16_ccitt_final(ctx, ref crc); + + if(ret != 0) + throw new Exception("Could not finalize hash"); + + crc16_ccitt_free(ctx); + + crc = (ushort)((crc << 8) | (crc >> 8)); + + hash = BitConverter.GetBytes(crc); + + if(hash.Where((t, i) => t != _expectedRandomCrc16Ccitt[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Crc16() + { + byte[] data = new byte[1048576]; + ushort crc = 0; + byte[] hash; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + + IntPtr ctx = crc16_init(); + + if(ctx == IntPtr.Zero) + throw new Exception("Could not initialize digest"); + + int ret = crc16_update(ctx, data, (uint)data.Length); + + if(ret != 0) + throw new Exception("Could not digest block"); + + ret = crc16_final(ctx, ref crc); + + if(ret != 0) + throw new Exception("Could not finalize hash"); + + crc16_free(ctx); + + crc = (ushort)((crc << 8) | (crc >> 8)); + + hash = BitConverter.GetBytes(crc); + + if(hash.Where((t, i) => t != _expectedRandomCrc16[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Crc32() + { + byte[] data = new byte[1048576]; + uint crc32 = 0; + byte[] hash; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + + IntPtr ctx = crc32_init(); + + if(ctx == IntPtr.Zero) + throw new Exception("Could not initialize digest"); + + int ret = crc32_update(ctx, data, (uint)data.Length); + + if(ret != 0) + throw new Exception("Could not digest block"); + + ret = crc32_final(ctx, ref crc32); + + if(ret != 0) + throw new Exception("Could not finalize hash"); + + crc32_free(ctx); + + crc32 = ((crc32 << 8) & 0xFF00FF00) | ((crc32 >> 8) & 0xFF00FF); + crc32 = (crc32 << 16) | (crc32 >> 16); + + hash = BitConverter.GetBytes(crc32); + + if(hash.Where((t, i) => t != _expectedRandomCrc32[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Crc64() + { + byte[] data = new byte[1048576]; + ulong crc64 = 0; + byte[] hash; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + + IntPtr ctx = crc64_init(); + + if(ctx == IntPtr.Zero) + throw new Exception("Could not initialize digest"); + + int ret = crc64_update(ctx, data, (uint)data.Length); + + if(ret != 0) + throw new Exception("Could not digest block"); + + ret = crc64_final(ctx, ref crc64); + + if(ret != 0) + throw new Exception("Could not finalize hash"); + + crc64_free(ctx); + + crc64 = ((crc64 & 0x00000000FFFFFFFF) << 32) | ((crc64 & 0xFFFFFFFF00000000) >> 32); + crc64 = ((crc64 & 0x0000FFFF0000FFFF) << 16) | ((crc64 & 0xFFFF0000FFFF0000) >> 16); + crc64 = ((crc64 & 0x00FF00FF00FF00FF) << 8) | ((crc64 & 0xFF00FF00FF00FF00) >> 8); + + hash = BitConverter.GetBytes(crc64); + + if(hash.Where((t, i) => t != _expectedRandomCrc64[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void SpamSum() + { + byte[] data = new byte[1048576]; + byte[] hash = new byte[256]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + + IntPtr ctx = spamsum_init(); + + if(ctx == IntPtr.Zero) + throw new Exception("Could not initialize digest"); + + int ret = spamsum_update(ctx, data, (uint)data.Length); + + if(ret != 0) + throw new Exception("Could not digest block"); + + ret = spamsum_final(ctx, hash); + + if(ret != 0) + throw new Exception("Could not finalize block"); + + spamsum_free(ctx); + } + } +} \ No newline at end of file diff --git a/AaruBenchmark/Checksums/OpenSsl.cs b/AaruBenchmark/Checksums/OpenSsl.cs new file mode 100644 index 0000000..1fec816 --- /dev/null +++ b/AaruBenchmark/Checksums/OpenSsl.cs @@ -0,0 +1,252 @@ +using System; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; + +namespace AaruBenchmark.Checksums +{ + public class OpenSsl + { + static readonly byte[] _expectedRandomMd5 = + { + 0xd7, 0x8f, 0x0e, 0xec, 0x41, 0x7b, 0xe3, 0x86, 0x21, 0x9b, 0x21, 0xb7, 0x00, 0x04, 0x4b, 0x95 + }; + + static readonly byte[] _expectedRandomSha1 = + { + 0x72, 0x0d, 0x3b, 0x71, 0x7d, 0xe0, 0xc7, 0x4c, 0x77, 0xdd, 0x9c, 0xaa, 0x9e, 0xba, 0x50, 0x60, 0xdc, 0xbd, + 0x28, 0x8d + }; + + static readonly byte[] _expectedRandomSha256 = + { + 0x4d, 0x1a, 0x6b, 0x8a, 0x54, 0x67, 0x00, 0xc4, 0x8e, 0xda, 0x70, 0xd3, 0x39, 0x1c, 0x8f, 0x15, 0x8a, 0x8d, + 0x12, 0xb2, 0x38, 0x92, 0x89, 0x29, 0x50, 0x47, 0x8c, 0x41, 0x8e, 0x25, 0xcc, 0x39 + }; + + static readonly byte[] _expectedRandomSha384 = + { + 0xdb, 0x53, 0x0e, 0x17, 0x9b, 0x81, 0xfe, 0x5f, 0x6d, 0x20, 0x41, 0x04, 0x6e, 0x77, 0xd9, 0x85, 0xf2, 0x85, + 0x8a, 0x66, 0xca, 0xd3, 0x8d, 0x1a, 0xd5, 0xac, 0x67, 0xa9, 0x74, 0xe1, 0xef, 0x3f, 0x4d, 0xdf, 0x94, 0x15, + 0x2e, 0xac, 0x2e, 0xfe, 0x16, 0x95, 0x81, 0x54, 0xdc, 0x59, 0xd4, 0xc3 + }; + + static readonly byte[] _expectedRandomSha512 = + { + 0x6a, 0x0a, 0x18, 0xc2, 0xad, 0xf8, 0x83, 0xac, 0x58, 0xe6, 0x21, 0x96, 0xdb, 0x8d, 0x3d, 0x0e, 0xb9, 0x87, + 0xd1, 0x49, 0x24, 0x97, 0xdb, 0x15, 0xb9, 0xfc, 0xcc, 0xb0, 0x36, 0xdf, 0x64, 0xae, 0xdb, 0x3e, 0x82, 0xa0, + 0x4d, 0xdc, 0xd1, 0x37, 0x48, 0x92, 0x95, 0x51, 0xf9, 0xdd, 0xab, 0x82, 0xf4, 0x8a, 0x85, 0x3f, 0x9a, 0x01, + 0xb5, 0xf2, 0x8c, 0xbb, 0x4a, 0xa5, 0x1b, 0x40, 0x7c, 0xb6 + }; + + [DllImport("libssl", SetLastError = true)] + static extern int EVP_DigestInit(IntPtr ctx, IntPtr type); + + [DllImport("libssl", SetLastError = true)] + static extern IntPtr EVP_MD_CTX_new(); + + [DllImport("libssl", SetLastError = true)] + static extern IntPtr EVP_md5(); + + [DllImport("libssl", SetLastError = true)] + static extern IntPtr EVP_sha1(); + + [DllImport("libssl", SetLastError = true)] + static extern IntPtr EVP_sha256(); + + [DllImport("libssl", SetLastError = true)] + static extern IntPtr EVP_sha384(); + + [DllImport("libssl", SetLastError = true)] + static extern IntPtr EVP_sha512(); + + [DllImport("libssl", SetLastError = true)] + static extern int EVP_DigestUpdate(IntPtr ctx, byte[] d, ulong cnt); + + [DllImport("libssl", SetLastError = true)] + static extern int EVP_DigestFinal(IntPtr ctx, byte[] md, ref uint s); + + [DllImport("libssl", SetLastError = true)] + static extern void EVP_MD_CTX_free(IntPtr ctx); + + public static void Md5() + { + byte[] data = new byte[1048576]; + uint s = 0; + byte[] hash = new byte[16]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + + IntPtr md = EVP_md5(); + IntPtr ctx = EVP_MD_CTX_new(); + int ret = EVP_DigestInit(ctx, md); + + if(ret != 1) + throw new Exception("Could not initialize digest"); + + ret = EVP_DigestUpdate(ctx, data, (ulong)data.Length); + + if(ret != 1) + throw new Exception("Could not digest block"); + + ret = EVP_DigestFinal(ctx, hash, ref s); + + if(ret != 1) + throw new Exception("Could not finalize hash"); + + EVP_MD_CTX_free(ctx); + + if(hash.Where((t, i) => t != _expectedRandomMd5[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Sha1() + { + byte[] data = new byte[1048576]; + uint s = 0; + byte[] hash = new byte[20]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + + IntPtr md = EVP_sha1(); + IntPtr ctx = EVP_MD_CTX_new(); + int ret = EVP_DigestInit(ctx, md); + + if(ret != 1) + throw new Exception("Could not initialize digest"); + + ret = EVP_DigestUpdate(ctx, data, (ulong)data.Length); + + if(ret != 1) + throw new Exception("Could not digest block"); + + ret = EVP_DigestFinal(ctx, hash, ref s); + + if(ret != 1) + throw new Exception("Could not finalize hash"); + + EVP_MD_CTX_free(ctx); + + if(hash.Where((t, i) => t != _expectedRandomSha1[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Sha256() + { + byte[] data = new byte[1048576]; + uint s = 0; + byte[] hash = new byte[32]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + + IntPtr md = EVP_sha256(); + IntPtr ctx = EVP_MD_CTX_new(); + int ret = EVP_DigestInit(ctx, md); + + if(ret != 1) + throw new Exception("Could not initialize digest"); + + ret = EVP_DigestUpdate(ctx, data, (ulong)data.Length); + + if(ret != 1) + throw new Exception("Could not digest block"); + + ret = EVP_DigestFinal(ctx, hash, ref s); + + if(ret != 1) + throw new Exception("Could not finalize hash"); + + EVP_MD_CTX_free(ctx); + + if(hash.Where((t, i) => t != _expectedRandomSha256[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Sha384() + { + byte[] data = new byte[1048576]; + uint s = 0; + byte[] hash = new byte[48]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + + IntPtr md = EVP_sha384(); + IntPtr ctx = EVP_MD_CTX_new(); + int ret = EVP_DigestInit(ctx, md); + + if(ret != 1) + throw new Exception("Could not initialize digest"); + + ret = EVP_DigestUpdate(ctx, data, (ulong)data.Length); + + if(ret != 1) + throw new Exception("Could not digest block"); + + ret = EVP_DigestFinal(ctx, hash, ref s); + + if(ret != 1) + throw new Exception("Could not finalize hash"); + + EVP_MD_CTX_free(ctx); + + if(hash.Where((t, i) => t != _expectedRandomSha384[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Sha512() + { + byte[] data = new byte[1048576]; + uint s = 0; + byte[] hash = new byte[64]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + + IntPtr md = EVP_sha512(); + IntPtr ctx = EVP_MD_CTX_new(); + int ret = EVP_DigestInit(ctx, md); + + if(ret != 1) + throw new Exception("Could not initialize digest"); + + ret = EVP_DigestUpdate(ctx, data, (ulong)data.Length); + + if(ret != 1) + throw new Exception("Could not digest block"); + + ret = EVP_DigestFinal(ctx, hash, ref s); + + if(ret != 1) + throw new Exception("Could not finalize hash"); + + EVP_MD_CTX_free(ctx); + + if(hash.Where((t, i) => t != _expectedRandomSha512[i]).Any()) + throw new Exception("Invalid hash value"); + } + } +} \ No newline at end of file diff --git a/AaruBenchmark/Checksums/RHash.cs b/AaruBenchmark/Checksums/RHash.cs new file mode 100644 index 0000000..24ba891 --- /dev/null +++ b/AaruBenchmark/Checksums/RHash.cs @@ -0,0 +1,278 @@ +using System; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; + +namespace AaruBenchmark.Checksums +{ + public class RHash + { + const uint RHASH_CRC32 = 0x01; + const uint RHASH_MD5 = 0x04; + const uint RHASH_SHA1 = 0x08; + const uint RHASH_SHA256 = 0x20000; + const uint RHASH_SHA384 = 0x40000; + const uint RHASH_SHA512 = 0x80000; + const uint RHASH_CRC32C = 0x4000000; + static readonly byte[] _expectedRandomCrc32 = + { + 0x2b, 0x6e, 0x68, 0x54 + }; + static readonly byte[] _expectedRandomMd5 = + { + 0xd7, 0x8f, 0x0e, 0xec, 0x41, 0x7b, 0xe3, 0x86, 0x21, 0x9b, 0x21, 0xb7, 0x00, 0x04, 0x4b, 0x95 + }; + + static readonly byte[] _expectedRandomSha1 = + { + 0x72, 0x0d, 0x3b, 0x71, 0x7d, 0xe0, 0xc7, 0x4c, 0x77, 0xdd, 0x9c, 0xaa, 0x9e, 0xba, 0x50, 0x60, 0xdc, 0xbd, + 0x28, 0x8d + }; + + static readonly byte[] _expectedRandomSha256 = + { + 0x4d, 0x1a, 0x6b, 0x8a, 0x54, 0x67, 0x00, 0xc4, 0x8e, 0xda, 0x70, 0xd3, 0x39, 0x1c, 0x8f, 0x15, 0x8a, 0x8d, + 0x12, 0xb2, 0x38, 0x92, 0x89, 0x29, 0x50, 0x47, 0x8c, 0x41, 0x8e, 0x25, 0xcc, 0x39 + }; + + static readonly byte[] _expectedRandomSha384 = + { + 0xdb, 0x53, 0x0e, 0x17, 0x9b, 0x81, 0xfe, 0x5f, 0x6d, 0x20, 0x41, 0x04, 0x6e, 0x77, 0xd9, 0x85, 0xf2, 0x85, + 0x8a, 0x66, 0xca, 0xd3, 0x8d, 0x1a, 0xd5, 0xac, 0x67, 0xa9, 0x74, 0xe1, 0xef, 0x3f, 0x4d, 0xdf, 0x94, 0x15, + 0x2e, 0xac, 0x2e, 0xfe, 0x16, 0x95, 0x81, 0x54, 0xdc, 0x59, 0xd4, 0xc3 + }; + + static readonly byte[] _expectedRandomSha512 = + { + 0x6a, 0x0a, 0x18, 0xc2, 0xad, 0xf8, 0x83, 0xac, 0x58, 0xe6, 0x21, 0x96, 0xdb, 0x8d, 0x3d, 0x0e, 0xb9, 0x87, + 0xd1, 0x49, 0x24, 0x97, 0xdb, 0x15, 0xb9, 0xfc, 0xcc, 0xb0, 0x36, 0xdf, 0x64, 0xae, 0xdb, 0x3e, 0x82, 0xa0, + 0x4d, 0xdc, 0xd1, 0x37, 0x48, 0x92, 0x95, 0x51, 0xf9, 0xdd, 0xab, 0x82, 0xf4, 0x8a, 0x85, 0x3f, 0x9a, 0x01, + 0xb5, 0xf2, 0x8c, 0xbb, 0x4a, 0xa5, 0x1b, 0x40, 0x7c, 0xb6 + }; + + [DllImport("librhash", SetLastError = true)] + static extern void rhash_library_init(); + + [DllImport("librhash", SetLastError = true)] + static extern IntPtr rhash_init(uint hash_id); + + [DllImport("librhash", SetLastError = true)] + static extern int rhash_update(IntPtr ctx, byte[] message, ulong length); + + [DllImport("librhash", SetLastError = true)] + static extern int rhash_final(IntPtr ctx, byte[] first_result); + + [DllImport("librhash", SetLastError = true)] + static extern void rhash_free(IntPtr ctx); + + public static void Crc32() + { + byte[] data = new byte[1048576]; + uint s = 0; + byte[] hash = new byte[4]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + + rhash_library_init(); + IntPtr ctx = rhash_init(RHASH_CRC32); + + if(ctx == IntPtr.Zero) + throw new Exception("Could not initialize digest"); + + int ret = rhash_update(ctx, data, (ulong)data.Length); + + if(ret != 0) + throw new Exception("Could not digest block"); + + ret = rhash_final(ctx, hash); + + if(ret != 0) + throw new Exception("Could not finalize hash"); + + rhash_free(ctx); + + if(hash.Where((t, i) => t != _expectedRandomCrc32[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Md5() + { + byte[] data = new byte[1048576]; + uint s = 0; + byte[] hash = new byte[16]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + + rhash_library_init(); + IntPtr ctx = rhash_init(RHASH_MD5); + + if(ctx == IntPtr.Zero) + throw new Exception("Could not initialize digest"); + + int ret = rhash_update(ctx, data, (ulong)data.Length); + + if(ret != 0) + throw new Exception("Could not digest block"); + + ret = rhash_final(ctx, hash); + + if(ret != 0) + throw new Exception("Could not finalize hash"); + + rhash_free(ctx); + + if(hash.Where((t, i) => t != _expectedRandomMd5[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Sha1() + { + byte[] data = new byte[1048576]; + uint s = 0; + byte[] hash = new byte[20]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + + rhash_library_init(); + IntPtr ctx = rhash_init(RHASH_SHA1); + + if(ctx == IntPtr.Zero) + throw new Exception("Could not initialize digest"); + + int ret = rhash_update(ctx, data, (ulong)data.Length); + + if(ret != 0) + throw new Exception("Could not digest block"); + + ret = rhash_final(ctx, hash); + + if(ret != 0) + throw new Exception("Could not finalize hash"); + + rhash_free(ctx); + + if(hash.Where((t, i) => t != _expectedRandomSha1[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Sha256() + { + byte[] data = new byte[1048576]; + uint s = 0; + byte[] hash = new byte[32]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + + rhash_library_init(); + IntPtr ctx = rhash_init(RHASH_SHA256); + + if(ctx == IntPtr.Zero) + throw new Exception("Could not initialize digest"); + + int ret = rhash_update(ctx, data, (ulong)data.Length); + + if(ret != 0) + throw new Exception("Could not digest block"); + + ret = rhash_final(ctx, hash); + + if(ret != 0) + throw new Exception("Could not finalize hash"); + + rhash_free(ctx); + + if(hash.Where((t, i) => t != _expectedRandomSha256[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Sha384() + { + byte[] data = new byte[1048576]; + uint s = 0; + byte[] hash = new byte[48]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + + rhash_library_init(); + IntPtr ctx = rhash_init(RHASH_SHA384); + + if(ctx == IntPtr.Zero) + throw new Exception("Could not initialize digest"); + + int ret = rhash_update(ctx, data, (ulong)data.Length); + + if(ret != 0) + throw new Exception("Could not digest block"); + + ret = rhash_final(ctx, hash); + + if(ret != 0) + throw new Exception("Could not finalize hash"); + + rhash_free(ctx); + + if(hash.Where((t, i) => t != _expectedRandomSha384[i]).Any()) + throw new Exception("Invalid hash value"); + } + + public static void Sha512() + { + byte[] data = new byte[1048576]; + uint s = 0; + byte[] hash = new byte[64]; + + var fs = new FileStream(Path.Combine("/mnt/DiscImageChef", "Checksum test files", "random"), FileMode.Open, + FileAccess.Read); + + fs.Read(data, 0, 1048576); + fs.Close(); + fs.Dispose(); + + rhash_library_init(); + IntPtr ctx = rhash_init(RHASH_SHA512); + + if(ctx == IntPtr.Zero) + throw new Exception("Could not initialize digest"); + + int ret = rhash_update(ctx, data, (ulong)data.Length); + + if(ret != 0) + throw new Exception("Could not digest block"); + + ret = rhash_final(ctx, hash); + + if(ret != 0) + throw new Exception("Could not finalize hash"); + + rhash_free(ctx); + + if(hash.Where((t, i) => t != _expectedRandomSha512[i]).Any()) + throw new Exception("Invalid hash value"); + } + } +} \ No newline at end of file diff --git a/AaruBenchmark/DotNetZip.cs b/AaruBenchmark/DotNetZip.cs new file mode 100644 index 0000000..e342d11 --- /dev/null +++ b/AaruBenchmark/DotNetZip.cs @@ -0,0 +1,67 @@ +using System.IO; +using Ionic.BZip2; +using Ionic.Zlib; + +namespace AaruBenchmark +{ + public static class DotNetZip + { + public static void Gzip() + { + var _dataStream = new FileStream("/mnt/DiscImageChef/Filters/gzip.gz", FileMode.Open, FileAccess.Read); + Stream str = new GZipStream(_dataStream, CompressionMode.Decompress, true); + byte[] compressed = new byte[1048576]; + int pos = 0; + int left = 1048576; + bool oneZero = false; + + while(left > 0) + { + int done = str.Read(compressed, pos, left); + + if(done == 0) + { + if(oneZero) + throw new IOException("Could not read the file!"); + + oneZero = true; + } + + left -= done; + pos += done; + } + + str.Close(); + str.Dispose(); + } + + public static void Bzip2() + { + var _dataStream = new FileStream("/mnt/DiscImageChef/Filters/bzip2.bz2", FileMode.Open, FileAccess.Read); + Stream str = new BZip2InputStream(_dataStream, true); + byte[] compressed = new byte[1048576]; + int pos = 0; + int left = 1048576; + bool oneZero = false; + + while(left > 0) + { + int done = str.Read(compressed, pos, left); + + if(done == 0) + { + if(oneZero) + throw new IOException("Could not read the file!"); + + oneZero = true; + } + + left -= done; + pos += done; + } + + str.Close(); + str.Dispose(); + } + } +} \ No newline at end of file diff --git a/AaruBenchmark/NetRuntime.cs b/AaruBenchmark/NetRuntime.cs new file mode 100644 index 0000000..b00a41a --- /dev/null +++ b/AaruBenchmark/NetRuntime.cs @@ -0,0 +1,37 @@ +using System.IO; +using System.IO.Compression; + +namespace AaruBenchmark +{ + public static class NetRuntime + { + public static void Gzip() + { + var _dataStream = new FileStream("/mnt/DiscImageChef/Filters/gzip.gz", FileMode.Open, FileAccess.Read); + Stream str = new GZipStream(_dataStream, CompressionMode.Decompress, true); + byte[] compressed = new byte[1048576]; + int pos = 0; + int left = 1048576; + bool oneZero = false; + + while(left > 0) + { + int done = str.Read(compressed, pos, left); + + if(done == 0) + { + if(oneZero) + throw new IOException("Could not read the file!"); + + oneZero = true; + } + + left -= done; + pos += done; + } + + str.Close(); + str.Dispose(); + } + } +} \ No newline at end of file diff --git a/AaruBenchmark/Program.cs b/AaruBenchmark/Program.cs new file mode 100644 index 0000000..8ccda9e --- /dev/null +++ b/AaruBenchmark/Program.cs @@ -0,0 +1,33 @@ +using BenchmarkDotNet.Configs; +using BenchmarkDotNet.Reports; +using BenchmarkDotNet.Running; +using AaruBenchmark.Checksums; + +namespace AaruBenchmark +{ + internal class Program + { + static void Main(string[] args) + { + + var summary = BenchmarkRunner.Run(ManualConfig.Create(DefaultConfig.Instance).WithOptions(ConfigOptions.DisableOptimizationsValidator)); + // var summary = BenchmarkRunner.Run(ManualConfig.Create(DefaultConfig.Instance).WithOptions(ConfigOptions.DisableOptimizationsValidator)); + //var foo = new BenchmarkRunner(); + //Checksums.Aaru.Crc64(); + + //Summary summary = BenchmarkRunner.Run(ManualConfig.Create(DefaultConfig.Instance).WithOptions(ConfigOptions.DisableOptimizationsValidator)); + //Summary summary = BenchmarkRunner.Run(ManualConfig.Create(DefaultConfig.Instance).WithOptions(ConfigOptions.DisableOptimizationsValidator)); + //Summary summary = BenchmarkRunner.Run(ManualConfig.Create(DefaultConfig.Instance).WithOptions(ConfigOptions.DisableOptimizationsValidator)); + // Summary summary = BenchmarkRunner.Run(ManualConfig.Create(DefaultConfig.Instance).WithOptions(ConfigOptions.DisableOptimizationsValidator)); + //Summary summary = BenchmarkRunner.Run(ManualConfig.Create(DefaultConfig.Instance).WithOptions(ConfigOptions.DisableOptimizationsValidator)); + //Summary summary = BenchmarkRunner.Run(ManualConfig.Create(DefaultConfig.Instance).WithOptions(ConfigOptions.DisableOptimizationsValidator)); + //Summary summary = BenchmarkRunner.Run(ManualConfig.Create(DefaultConfig.Instance).WithOptions(ConfigOptions.DisableOptimizationsValidator)); + //var summary = BenchmarkRunner.Run(ManualConfig.Create(DefaultConfig.Instance).WithOptions(ConfigOptions.DisableOptimizationsValidator)); + //var summary = BenchmarkRunner.Run(ManualConfig.Create(DefaultConfig.Instance).WithOptions(ConfigOptions.DisableOptimizationsValidator)); + //var summary = BenchmarkRunner.Run(ManualConfig.Create(DefaultConfig.Instance).WithOptions(ConfigOptions.DisableOptimizationsValidator)); + //var summary = BenchmarkRunner.Run(ManualConfig.Create(DefaultConfig.Instance).WithOptions(ConfigOptions.DisableOptimizationsValidator)); + //var summary = BenchmarkRunner.Run(ManualConfig.Create(DefaultConfig.Instance).WithOptions(ConfigOptions.DisableOptimizationsValidator)); + //var summary = BenchmarkRunner.Run(ManualConfig.Create(DefaultConfig.Instance).WithOptions(ConfigOptions.DisableOptimizationsValidator)); + } + } +} \ No newline at end of file diff --git a/AaruBenchmark/SharpCompress.cs b/AaruBenchmark/SharpCompress.cs new file mode 100644 index 0000000..c670b1f --- /dev/null +++ b/AaruBenchmark/SharpCompress.cs @@ -0,0 +1,68 @@ +using System.IO; +using SharpCompress.Compressors; +using SharpCompress.Compressors.BZip2; +using SharpCompress.Compressors.Deflate; + +namespace AaruBenchmark +{ + public static class SharpCompress + { + public static void Gzip() + { + var _dataStream = new FileStream("/mnt/DiscImageChef/Filters/gzip.gz", FileMode.Open, FileAccess.Read); + Stream str = new GZipStream(_dataStream, CompressionMode.Decompress); + byte[] compressed = new byte[1048576]; + int pos = 0; + int left = 1048576; + bool oneZero = false; + + while(left > 0) + { + int done = str.Read(compressed, pos, left); + + if(done == 0) + { + if(oneZero) + throw new IOException("Could not read the file!"); + + oneZero = true; + } + + left -= done; + pos += done; + } + + str.Close(); + str.Dispose(); + } + + public static void Bzip2() + { + var _dataStream = new FileStream("/mnt/DiscImageChef/Filters/bzip2.bz2", FileMode.Open, FileAccess.Read); + Stream str = new BZip2Stream(_dataStream, CompressionMode.Decompress, true); + byte[] compressed = new byte[1048576]; + int pos = 0; + int left = 1048576; + bool oneZero = false; + + while(left > 0) + { + int done = str.Read(compressed, pos, left); + + if(done == 0) + { + if(oneZero) + throw new IOException("Could not read the file!"); + + oneZero = true; + } + + left -= done; + pos += done; + } + + str.Close(); + str.Dispose(); + } + } +} \ No newline at end of file diff --git a/Benchmarks.ods b/Benchmarks.ods new file mode 100644 index 0000000..48b80ff Binary files /dev/null and b/Benchmarks.ods differ diff --git a/CICMMetadata/.editorconfig b/CICMMetadata/.editorconfig new file mode 100644 index 0000000..8b506da --- /dev/null +++ b/CICMMetadata/.editorconfig @@ -0,0 +1,632 @@ +root = true + +[*] +charset=utf-8 +next_line=crlf +insert_final_newline=false +indent_style=space +indent_size=4 + +# Generic non-language specific ones for Resharper and friends +brace_style=next_line +int_align=true +keep_existing_arrangement=false +place_simple_blocks_on_single_line=true +place_simple_declaration_blocks_on_single_line=true +place_attribute_on_same_line=false +space_after_unary_operator=false +space_after_comma=true +space_around_ternary_operator=true +space_around_binary_operator=true +space_around_member_access_operator=false +space_before_open_square_brackets=false +space_after_keywords_in_control_flow_statements=true +space_before_comma=false +space_between_method_call_name_and_opening_parenthesis=false +space_between_method_declaration_name_and_open_parenthesis=false +space_between_square_brackets=false +space_between_parentheses_of_control_flow_statements=false +accessor_owner_declaration_braces=next_line +accessor_declaration_braces=next_line +case_block_braces=next_line +initializer_braces=next_line +other_braces=next_line +allow_comment_after_lbrace=false +empty_block_style=together_same_line +braces_for_ifelse=not_required +braces_for_for=not_required +braces_for_foreach=not_required +braces_for_while=not_required +braces_for_dowhile=not_required +braces_for_using=not_required +braces_for_lock=not_required +braces_for_fixed=not_required +method_or_operator_body=expression_body +local_function_body=expression_body +constructor_or_destructor_body=expression_body +accessor_owner_body=expression_body +force_attribute_style=join +function_braces=next_line +force_control_statements_braces=always_remove +space_in_singleline_accessorholder=true +type_declaration_braces=next_line +invocable_declaration_braces=next_line +anonymous_method_declaration_braces=next_line +space_between_accessors_in_singleline_property=true +indent_nested_usings_stmt=true +space_within_empty_braces=false +indent_nested_fixed_stmt=true +indent_nested_lock_stmt=true +indent_nested_for_stmt=true +indent_nested_foreach_stmt=true +indent_nested_while_stmt=true +use_continuous_indent_inside_parens=true +indent_method_decl_pars=inside +indent_invocation_pars=inside +indent_statement_pars=inside +indent_typeparam_angles=inside +indent_typearg_angles=inside +indent_pars=inside +indent_preprocessor_if=outdent +indent_preprocessor_region=usual_indent +indent_preprocessor_other=usual_indent +indent_switch_labels=true +indent_type_constraints=true +stick_comment=false +alignment_tab_fill_style=use_spaces +align_multiline_parameter=true +align_multiline_extends_list=true +align_linq_query=true +align_multiline_binary_expressions_chain=true +outdent_binary_ops=true +align_multiline_calls_chain=true +outdent_dots=true +align_multiline_array_and_object_initializer=false +indent_anonymous_method_block=false +align_first_arg_by_paren=true +align_multiline_argument=true +align_tuple_components=true +align_multiline_expression=true +align_multiline_for_stmt=true +align_multiple_declaration=true +align_multline_type_parameter_list=true +align_multline_type_parameter_constrains=true +int_align_fields=true +int_align_properties=true +int_align_methods=true +int_align_parameters=false +int_align_variables=true +int_align_assignments=true +int_align_nested_ternary=true +int_align_invocations=false +int_align_binary_expressions=true +int_align_comments=true +int_align_switch_sections=true +keep_user_linebreaks=false +keep_existing_arrangement=false +keep_existing_linebreaks=false +max_line_length=120 +wrap_before_comma=false +special_else_if_treatment=true +place_type_attribute_on_same_line=never +place_method_attribute_on_same_line=never +place_accessorholder_attribute_on_same_line=never +place_attribute_on_same_line=never +place_accessor_attribute_on_same_line=never +place_attribute_on_same_line=never +place_field_attribute_on_same_line=never +place_attribute_on_same_line=never +wrap_parameters_style=wrap_if_long +keep_existing_declaration_parens_arrangement=false +wrap_before_declaration_lpar=false +wrap_after_declaration_lpar=false +wrap_before_declaration_rpar=false +place_constructor_initializer_on_same_line=true +keep_existing_expr_member_arrangement=false +place_expr_method_on_single_line=true +place_expr_property_on_single_line=true +place_expr_accessor_on_single_line=true +wrap_before_arrow_with_expressions=false +place_type_constraints_on_same_line=true +wrap_before_first_type_parameter_constraint=true +wrap_multiple_type_parameter_constraints_style=wrap_if_long +wrap_before_type_parameter_langle=true +wrap_before_extends_colon=false +wrap_extends_list_style=wrap_if_long +keep_existing_declaration_block_arrangement=false +place_abstract_accessorholder_on_single_line=true +place_simple_accessorholder_on_single_line=false +place_accessor_with_attrs_holder_on_single_line=false +place_simple_accessor_on_single_line=true +place_simple_method_on_single_line=false +keep_existing_enum_arrangement=false +place_simple_enum_on_single_line=false +wrap_enum_declaration=wrap_if_long +new_line_before_else=true +new_line_before_while=false +wrap_for_stmt_header_style=wrap_if_long +wrap_multiple_declaration_style=wrap_if_long +keep_existing_embedded_arrangement=false +place_simple_embedded_statement_on_same_line=false +place_simple_case_statement_on_same_line=true +keep_existing_embedded_block_arrangement=false +place_simple_embedded_block_on_same_line=false +place_simple_anonymousmethod_on_single_line=false +keep_existing_initializer_arrangement=false +place_simple_initializer_on_single_line=false +wrap_object_and_collection_initializer_style=chop_always +wrap_array_initializer_style=wrap_if_long +wrap_arguments_style=wrap_if_long +keep_existing_invocation_parens_arrangement=false +wrap_after_invocation_lpar=false +wrap_before_invocation_rpar=false +wrap_after_dot_in_method_calls=true +wrap_chained_method_calls=wrap_if_long +wrap_before_binary_opsign=false +wrap_chained_binary_expressions=wrap_if_long +force_chop_compound_if_expression=true +force_chop_compound_while_expression=true +force_chop_compound_do_expression=true +wrap_before_ternary_opsigns=true +wrap_ternary_expr_style=wrap_if_long +nested_ternary_style=expanded +wrap_linq_expressions=wrap_if_long +wrap_before_linq_expression=false +place_linq_into_on_new_line=false +wrap_verbatim_interpolated_strings=wrap_if_long +extra_spaces=remove_all +space_after_keywords_in_control_flow_statements=false +space_between_method_call_name_and_opening_parenthesis=false +space_between_method_declaration_name_and_open_parenthesis=false +space_before_typeof_parentheses=false +space_before_checked_parentheses=false +space_before_sizeof_parentheses=false +space_before_nameof_parentheses=false +space_between_keyword_and_expression=true +space_between_keyword_and_type=true +space_around_assignment_op=true +space_around_logical_op=true +space_around_binary_operator=true +space_around_equality_op=true +space_around_relational_op=true +space_around_bitwise_op=true +space_around_additive_op=true +space_around_multiplicative_op=true +space_around_shift_op=true +space_around_nullcoalescing_op=true +space_around_arrow_op=false +space_after_logical_not_op=false +space_after_unary_operator=false +space_after_cast=false +space_around_dot=false +space_around_lambda_arrow=true +space_before_pointer_asterik_declaration=false +space_before_nullable_mark=false +blank_lines_around_class_definition=1 +namespace_indentation=all +space_within_template_argument=false +align_union_type_usage=true +space_in_singleline_method=true +space_in_singleline_anonymous_method=true +space_within_single_line_array_initializer_braces=true +space_around_arrow_op=false + +# These are for markup languages (HTML, XML, etc) +spaces_around_eq_in_pi_attribute=false +space_after_last_pi_attribute=true +pi_attributes_indent=align_by_first_attribute +blank_line_after_pi=true +spaces_around_eq_in_attribute=false +space_after_last_attribute=false +space_before_self_closing=true +attribute_style=on_single_line +attribute_indent=align_by_first_attribute +sort_attributes=true +sort_class_selectors=true +max_blank_lines_between_tags=0 +linebreak_before_all_elements=true +linebreak_before_multiline_elements=true +quote_style=doublequoted +delete_quotes_from_solid_values=false +normalize_tag_names=true + + +[{.babelrc,.stylelintrc,jest.config,.eslintrc,.prettierrc,*.json,*.jsb3,*.jsb2,*.bowerrc}] +indent_size=2 + +[*.js.map] +indent_size=2 + +[*.{css,scss}] +indent_size=2 +declarations_style=separate_lines_for_nonsingle +media_query_style=separate_lines +selector_style=same_line +properties_style=separate_lines_for_nonsingle +brace_style=next_line + +[{.analysis_options,*.yml,*.yaml}] +indent_size=2 + +# Xml project files +[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}] +indent_size = 2 + +# Xml files +[*.{xml,stylecop,resx,ruleset}] +indent_size = 2 + +# Xml config files +[*.{props,targets,config,nuspec}] +indent_size = 2 + +# .net files +[*.{cs,vb}] +# These set the this. / Me. +dotnet_style_qualification_for_field=false:warning +dotnet_style_qualification_for_property=false:warning +dotnet_style_qualification_for_method=false:warning +dotnet_style_qualification_for_event=false:warning + +# These make it suggest Int32 instead of int, etc. +dotnet_style_predefined_type_for_locals_parameters_members=true:suggestion +dotnet_style_predefined_type_for_member_access=true:suggestion + +# This controls implicit access modifiers +dotnet_style_require_accessibility_modifiers=never:suggestion + +# Prefer non modified fields to be marked readonly +dotnet_style_readonly_field=true:warning + +# Parenthesis settings +dotnet_style_parentheses_in_arithmetic_binary_operators=always_for_clarity:warning +dotnet_style_parentheses_in_relational_binary_operators=always_for_clarity:warning +dotnet_style_parentheses_in_other_binary_operators=always_for_clarity:warning +dotnet_style_parentheses_in_other_operators=always_for_clarity:warning + +dotnet_style_object_initializer=true:suggestion +dotnet_style_collection_initializer=true:suggestion +dotnet_style_explicit_tuple_names=true:error +dotnet_style_prefer_inferred_tuple_names=true:warning +dotnet_style_prefer_inferred_anonymous_type_member_names=true:warning +dotnet_style_prefer_is_null_check_over_reference_equality_method=true:warning +dotnet_style_prefer_conditional_expression_over_return=true:warning +dotnet_style_coalesce_expression=true:warning +dotnet_style_null_propagation=true:error + +dotnet_sort_system_directives_first=true + +# Constants in C style, all-caps +dotnet_naming_rule.constant_fields_caps.symbols = constant_fields +dotnet_naming_rule.constant_fields_caps.severity = warning +dotnet_naming_rule.constant_fields_caps.style = caps_style +dotnet_naming_symbols.constant_fields.applicable_kinds = field +dotnet_naming_symbols.constant_fields.required_modifiers = const +dotnet_naming_style.caps_style.capitalization = all_upper + +# interfaces should be prefixed with I +dotnet_naming_rule.pascal_case_for_interface.severity = error +dotnet_naming_rule.pascal_case_for_interface.symbols = interfaces_fields +dotnet_naming_rule.pascal_case_for_interface.style = pascal_case_interface_style +dotnet_naming_symbols.interfaces_fields.applicable_kinds = interface +dotnet_naming_style.pascal_case_interface_style.required_prefix = I +dotnet_naming_style.pascal_case_interface_style.capitalization = pascal_case + +## internal and private fields should be _camelCase +dotnet_naming_rule.camel_case_for_private_internal_fields.severity = warning +dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields +dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style +dotnet_naming_symbols.private_internal_fields.applicable_kinds = field +dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal +dotnet_naming_style.camel_case_underscore_style.required_prefix = _ +dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case + +# 2018-12-07 NP: This is not yet working in VS2017 +# local variables should be camelCase +#dotnet_naming_rule.camel_case_for_locals.severity = suggestion +#dotnet_naming_rule.camel_case_for_locals.symbols = local_fields +#dotnet_naming_rule.camel_case_for_locals.style = camel_case_style +#dotnet_naming_symbols.local_fields.applicable_kinds = local +#dotnet_naming_style.camel_case_style.capitalization = camel_case + +[*.cs] +# var var var +csharp_style_var_for_built_in_types=false:warning +csharp_style_var_when_type_is_apparent=true:suggestion +csharp_style_var_elsewhere=false:warning + +csharp_style_expression_bodied_methods=when_on_single_line:suggestion +csharp_style_expression_bodied_constructors=when_on_single_line:suggestion +csharp_style_expression_bodied_operators=when_on_single_line:suggestion +csharp_style_expression_bodied_properties=when_on_single_line:suggestion +csharp_style_expression_bodied_indexers=when_on_single_line:suggestion +csharp_style_expression_bodied_accessors=when_on_single_line:suggestion + +csharp_style_pattern_matching_over_is_with_cast_check=true:warning +csharp_style_pattern_matching_over_as_with_null_check=when_on_single_line:warning + +csharp_style_inlined_variable_declaration=true:warning + +csharp_prefer_simple_default_expression=true:warning +csharp_style_deconstructed_variable_declaration=false:warning + +csharp_style_throw_expression=true:warning +csharp_style_conditional_delegate_call=true:warning + +csharp_prefer_braces=false + +csharp_new_line_before_open_brace=all +csharp_new_line_before_else=true +csharp_new_line_before_catch=true +csharp_new_line_before_finally=true +csharp_new_line_before_members_in_object_initializers=true +csharp_new_line_before_members_in_anonymous_types=true +csharp_new_line_between_query_expression_clauses=true + +csharp_indent_case_contents=true +csharp_indent_switch_labels=true +csharp_indent_labels=flush_left + +csharp_space_after_cast=false +csharp_space_after_keywords_in_control_flow_statements=false +csharp_space_between_method_declaration_parameter_list_parentheses=false +csharp_space_between_parentheses=none +csharp_space_before_colon_in_inheritance_clause=true +csharp_space_after_colon_in_inheritance_clause=true +csharp_space_around_binary_operators=before_and_after +csharp_space_between_method_declaration_empty_parameter_list_parentheses=false +csharp_space_between_method_call_name_and_opening_parenthesis=false +csharp_space_between_method_call_empty_parameter_list_parentheses=false + +csharp_preserve_single_line_statements=false +csharp_preserve_single_line_blocks=true + +csharp_blank_lines_around_region=0 +csharp_blank_lines_inside_region=0 +csharp_blank_lines_before_single_line_comment=1 +csharp_keep_blank_lines_in_declarations=1 +csharp_remove_blank_lines_near_braces_in_declarations=true +csharp_blank_lines_after_start_comment=false +csharp_blank_lines_between_using_groups=0 +csharp_blank_lines_after_using_list=1 +csharp_blank_lines_around_namespace=1 +csharp_blank_lines_inside_namespace=0 +csharp_blank_lines_around_type=1 +csharp_blank_lines_inside_type=0 +csharp_blank_lines_around_field=0 +csharp_blank_lines_around_single_line_field=0 +csharp_blank_lines_around_property=1 +csharp_blank_lines_around_single_line_property=0 +csharp_blank_lines_around_auto_property=0 +csharp_blank_lines_around_single_line_auto_property=0 +csharp_blank_lines_around_invocable=1 +csharp_blank_lines_around_single_line_invocable=1 +csharp_keep_blank_lines_in_code=1 +csharp_remove_blank_lines_near_braces_in_code=true +csharp_blank_lines_around_local_method=1 +csharp_blank_lines_around_single_line_local_method=1 +csharp_blank_lines_before_control_transfer_statements=1 +csharp_blank_lines_after_control_transfer_statements=1 +csharp_blank_lines_before_block_statements=1 +csharp_blank_lines_after_block_statements=1 +csharp_blank_lines_before_multiline_statements=1 +csharp_blank_lines_after_multiline_statements=1 + +csharp_type_declaration_braces=next_line +csharp_brace_style=next_line +csharp_indent_inside_namespace=true +csharp_invocable_declaration_braces=next_line +csharp_anonymous_method_declaration_braces=next_line +csharp_accessor_owner_declaration_braces=next_line +csharp_accessor_declaration_braces=next_line +csharp_case_block_braces=next_line +csharp_initializer_braces=next_line +csharp_other_braces=next_line +csharp_allow_comment_after_lbrace=false +csharp_empty_block_style=together_same_line + +csharp_for_built_in_types=use_explicit_type +csharp_for_simple_types=use_var_when_evident +csharp_for_other_types=use_explicit_type +csharp_prefer_separate_deconstructed_variables_declaration=true +csharp_prefer_explicit_discard_declaration=false + +csharp_instance_members_qualify_members=none +csharp_builtin_type_reference_style=use_keyword +csharp_prefer_qualified_reference=false +csharp_add_imports_to_deepest_scope=false +csharp_allow_alias=true +csharp_default_private_modifier=implicit +csharp_default_internal_modifier=explicit +csharp_arguments_literal=positional +csharp_arguments_string_literal=positional +csharp_arguments_named=positional +csharp_arguments_anonymous_function=positional +csharp_arguments_other=positional +csharp_braces_for_ifelse=not_required +csharp_braces_for_for=not_required +csharp_braces_for_foreach=not_required +csharp_braces_for_while=not_required +csharp_braces_for_dowhile=not_required +csharp_braces_for_using=not_required +csharp_braces_for_lock=not_required +csharp_braces_for_fixed=not_required +csharp_method_or_operator_body=expression_body +csharp_local_function_body=expression_body +csharp_constructor_or_destructor_body=expression_body +csharp_accessor_owner_body=expression_body +csharp_force_attribute_style=join +csharp_indent_nested_usings_stmt=true + +csharp_builtin_type_reference_for_member_access_style=use_keyword +csharp_indent_nested_fixed_stmt=true +csharp_indent_nested_lock_stmt=true +csharp_indent_nested_for_stmt=true +csharp_indent_nested_foreach_stmt=true +csharp_indent_nested_while_stmt=true +csharp_use_continuous_indent_inside_parens=true +csharp_indent_method_decl_pars=inside +csharp_indent_invocation_pars=inside +csharp_indent_statement_pars=inside +csharp_indent_typeparam_angles=inside +csharp_indent_typearg_angles=inside +csharp_indent_pars=inside +csharp_indent_preprocessor_if=outdent +csharp_indent_preprocessor_region=usual_indent +csharp_indent_preprocessor_other=usual_indent +csharp_indent_switch_labels=true +csharp_indent_type_constraints=true +csharp_stick_comment=false +csharp_alignment_tab_fill_style=use_spaces +csharp_align_multiline_parameter=true +csharp_align_multiline_extends_list=true +csharp_align_linq_query=true +csharp_align_multiline_binary_expressions_chain=true +csharp_outdent_binary_ops=true +csharp_align_multiline_calls_chain=true +csharp_outdent_dots=true +csharp_align_multiline_array_and_object_initializer=false +csharp_indent_anonymous_method_block=false +csharp_align_first_arg_by_paren=true +csharp_align_multiline_argument=true +csharp_align_tuple_components=true +csharp_align_multiline_expression=true +csharp_align_multiline_for_stmt=true +csharp_align_multiple_declaration=true +csharp_align_multline_type_parameter_list=true +csharp_align_multline_type_parameter_constrains=true +csharp_int_align_fields=true +csharp_int_align_properties=true +csharp_int_align_methods=true +csharp_int_align_parameters=false +csharp_int_align_variables=true +csharp_int_align_assignments=true +csharp_int_align_nested_ternary=true +csharp_int_align_invocations=false +csharp_int_align_binary_expressions=true +csharp_int_align_comments=true +csharp_int_align_switch_sections=true +csharp_int_align=true +csharp_keep_user_linebreaks=false +csharp_keep_existing_arrangement=false +csharp_keep_existing_linebreaks=false +csharp_max_line_length=120 +csharp_wrap_before_comma=false +csharp_special_else_if_treatment=true +csharp_insert_final_newline=false +csharp_place_type_attribute_on_same_line=never +csharp_place_method_attribute_on_same_line=never +csharp_place_accessorholder_attribute_on_same_line=never +csharp_place_attribute_on_same_line=never +csharp_place_accessor_attribute_on_same_line=never +csharp_place_attribute_on_same_line=never +csharp_place_field_attribute_on_same_line=never +csharp_place_attribute_on_same_line=never +csharp_wrap_parameters_style=wrap_if_long +csharp_keep_existing_declaration_parens_arrangement=false +csharp_wrap_before_declaration_lpar=false +csharp_wrap_after_declaration_lpar=false +csharp_wrap_before_declaration_rpar=false +csharp_place_constructor_initializer_on_same_line=true +csharp_keep_existing_expr_member_arrangement=false +csharp_place_expr_method_on_single_line=true +csharp_place_expr_property_on_single_line=true +csharp_place_expr_accessor_on_single_line=true +csharp_wrap_before_arrow_with_expressions=false +csharp_place_type_constraints_on_same_line=true +csharp_wrap_before_first_type_parameter_constraint=true +csharp_wrap_multiple_type_parameter_constraints_style=wrap_if_long +csharp_wrap_before_type_parameter_langle=true +csharp_wrap_before_extends_colon=false +csharp_wrap_extends_list_style=wrap_if_long +csharp_keep_existing_declaration_block_arrangement=false +csharp_place_abstract_accessorholder_on_single_line=true +csharp_place_simple_accessorholder_on_single_line=false +csharp_place_accessor_with_attrs_holder_on_single_line=false +csharp_place_simple_accessor_on_single_line=true +csharp_place_simple_method_on_single_line=false +csharp_keep_existing_enum_arrangement=false +csharp_place_simple_enum_on_single_line=false +csharp_wrap_enum_declaration=wrap_if_long +csharp_new_line_before_else=true +csharp_new_line_before_while=false +csharp_wrap_for_stmt_header_style=wrap_if_long +csharp_wrap_multiple_declaration_style=wrap_if_long +csharp_keep_existing_embedded_arrangement=false +csharp_place_simple_embedded_statement_on_same_line=false +csharp_place_simple_case_statement_on_same_line=true +csharp_keep_existing_embedded_block_arrangement=false +csharp_place_simple_embedded_block_on_same_line=false +csharp_place_simple_anonymousmethod_on_single_line=false +csharp_keep_existing_initializer_arrangement=false +csharp_place_simple_initializer_on_single_line=false +csharp_wrap_object_and_collection_initializer_style=chop_always +csharp_wrap_array_initializer_style=wrap_if_long +csharp_wrap_arguments_style=wrap_if_long +csharp_keep_existing_invocation_parens_arrangement=false +csharp_wrap_after_invocation_lpar=false +csharp_wrap_before_invocation_rpar=false +csharp_wrap_after_dot_in_method_calls=true +csharp_wrap_chained_method_calls=wrap_if_long +csharp_wrap_before_binary_opsign=false +csharp_wrap_chained_binary_expressions=wrap_if_long +csharp_force_chop_compound_if_expression=true +csharp_force_chop_compound_while_expression=true +csharp_force_chop_compound_do_expression=true +csharp_wrap_before_ternary_opsigns=true +csharp_wrap_ternary_expr_style=wrap_if_long +csharp_nested_ternary_style=expanded +csharp_wrap_linq_expressions=wrap_if_long +csharp_wrap_before_linq_expression=false +csharp_place_linq_into_on_new_line=false +csharp_wrap_verbatim_interpolated_strings=wrap_if_long +csharp_extra_spaces=remove_all +csharp_space_after_keywords_in_control_flow_statements=false +csharp_space_between_method_call_name_and_opening_parenthesis=false +csharp_space_between_method_declaration_name_and_open_parenthesis=false +csharp_space_before_typeof_parentheses=false +csharp_space_before_checked_parentheses=false +csharp_space_before_sizeof_parentheses=false +csharp_space_before_nameof_parentheses=false +csharp_space_between_keyword_and_expression=true +csharp_space_between_keyword_and_type=true +csharp_space_around_assignment_op=true +csharp_space_around_logical_op=true +csharp_space_around_binary_operator=true +csharp_space_around_equality_op=true +csharp_space_around_relational_op=true +csharp_space_around_bitwise_op=true +csharp_space_around_additive_op=true +csharp_space_around_multiplicative_op=true +csharp_space_around_shift_op=true +csharp_space_around_nullcoalescing_op=true +csharp_space_around_arrow_op=false +csharp_space_after_logical_not_op=false +csharp_space_after_unary_operator=false +csharp_space_after_cast=false +csharp_space_around_dot=false +csharp_space_around_lambda_arrow=true +csharp_space_before_pointer_asterik_declaration=false +csharp_space_before_nullable_mark=false + +[*.cshtml] +linebreaks_around_razor_statements=true +blank_lines_around_razor_functions=true +blank_lines_around_razor_helpers=true +blank_lines_around_razor_sections=true + +# C++ +[*.{cc,cpp,cxx,h,hpp,hxx}] +cpp_indent_access_specifiers_from_class=true +cpp_indent_wrapped_function_names=false +cpp_align_multiline_type_argument=true + +# C, C++ and ObjectiveC +[*.{c,h,cc,cpp,cxx,m,hpp,hxx}] +indent_preprocessor_directives=normal +indent_type_constraints=true + +# Javascript and Typescript +[*.{js,js.map,ts}] +quote_style=doublequoted +termination_style=ensure_semicolon \ No newline at end of file diff --git a/CICMMetadata/.externalToolBuilders/New_Builder.launch b/CICMMetadata/.externalToolBuilders/New_Builder.launch new file mode 100644 index 0000000..9ca5b2e --- /dev/null +++ b/CICMMetadata/.externalToolBuilders/New_Builder.launch @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/CICMMetadata/.gitignore b/CICMMetadata/.gitignore new file mode 100644 index 0000000..09ecec4 --- /dev/null +++ b/CICMMetadata/.gitignore @@ -0,0 +1,597 @@ +### VisualStudio template +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ +### Linux template + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* +### Xcode template +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +build/ +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +### VisualStudioCode template +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +### C++ template +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o + +# Precompiled Headers +*.gch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app +### MonoDevelop template +#User Specific +*.usertasks + +#Mono Project Files +*.resources +test-results/ +### GPG template +secring.* + +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/modules.xml +# .idea/*.iml +# .idea/modules + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests +### CMake template +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +### C template +# Object files +*.ko +*.elf + +# Linker output +*.map +*.exp + +*.so.* + +# Executables +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf +### Windows template +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# NuGet Packages Directory +packages/ +## TODO: If the tool you use requires repositories.config uncomment the next line +#!packages/repositories.config + +# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets +# This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented) +!packages/build/ + + +# Others +sql/ +*.Cache + +# Visual Studio 2017 +.vs + +workspace.xml +cmake-build-debug +### macOS template +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +pkg/**/pkg +pkg/**/src +pkg/**/*.asc +pkg/**/*.sig +pkg/**/*.tar.xz +pkg/**/*.zip +pkg/**/aaru + +.sonarqube + +build/* \ No newline at end of file diff --git a/CICMMetadata/.project b/CICMMetadata/.project new file mode 100644 index 0000000..9b6a5c8 --- /dev/null +++ b/CICMMetadata/.project @@ -0,0 +1,21 @@ + + + CICMMetadata + + + + + + org.eclipse.ui.externaltools.ExternalToolBuilder + full,incremental, + + + LaunchConfigHandle + <project>/.externalToolBuilders/New_Builder.launch + + + + + + + diff --git a/CICMMetadata/.settings/org.eclipse.wst.xsl.core.prefs b/CICMMetadata/.settings/org.eclipse.wst.xsl.core.prefs new file mode 100644 index 0000000..e28962c --- /dev/null +++ b/CICMMetadata/.settings/org.eclipse.wst.xsl.core.prefs @@ -0,0 +1,11 @@ +CHECK_CALL_TEMPLATES=2 +CHECK_XPATHS=2 +CIRCULAR_REF=2 +DUPLICATE_PARAMETER=2 +EMPTY_PARAM=1 +MISSING_INCLUDE=2 +MISSING_PARAM=1 +NAME_ATTRIBUTE_EMPTY=2 +NAME_ATTRIBUTE_MISSING=2 +TEMPLATE_CONFLICT=2 +eclipse.preferences.version=1 diff --git a/CICMMetadata/CICMMetadata.iml b/CICMMetadata/CICMMetadata.iml new file mode 100644 index 0000000..48426fc --- /dev/null +++ b/CICMMetadata/CICMMetadata.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/CICMMetadata/CICMMetadataEditor.sln b/CICMMetadata/CICMMetadataEditor.sln new file mode 100644 index 0000000..fea9617 --- /dev/null +++ b/CICMMetadata/CICMMetadataEditor.sln @@ -0,0 +1,29 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CICMMetadataEditor", "CICMMetadataEditor\CICMMetadataEditor\CICMMetadataEditor.csproj", "{189CFDC5-2630-46DE-A934-FF182F9F54AB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CICMMetadataEditor.Desktop", "CICMMetadataEditor\CICMMetadataEditor.Desktop\CICMMetadataEditor.Desktop.csproj", "{4D52B7A6-E945-4BDD-BAD3-0EB9A48FABB4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CICMMetadataEditor.XamMac", "CICMMetadataEditor\CICMMetadataEditor.XamMac\CICMMetadataEditor.XamMac.csproj", "{00CE3E32-7D00-4CB0-8951-3C27BF2D02CD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {189CFDC5-2630-46DE-A934-FF182F9F54AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {189CFDC5-2630-46DE-A934-FF182F9F54AB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {189CFDC5-2630-46DE-A934-FF182F9F54AB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {189CFDC5-2630-46DE-A934-FF182F9F54AB}.Release|Any CPU.Build.0 = Release|Any CPU + {4D52B7A6-E945-4BDD-BAD3-0EB9A48FABB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4D52B7A6-E945-4BDD-BAD3-0EB9A48FABB4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4D52B7A6-E945-4BDD-BAD3-0EB9A48FABB4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4D52B7A6-E945-4BDD-BAD3-0EB9A48FABB4}.Release|Any CPU.Build.0 = Release|Any CPU + {00CE3E32-7D00-4CB0-8951-3C27BF2D02CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {00CE3E32-7D00-4CB0-8951-3C27BF2D02CD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {00CE3E32-7D00-4CB0-8951-3C27BF2D02CD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {00CE3E32-7D00-4CB0-8951-3C27BF2D02CD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.Desktop/CICMMetadataEditor.Desktop.csproj b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.Desktop/CICMMetadataEditor.Desktop.csproj new file mode 100644 index 0000000..05fddc8 --- /dev/null +++ b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.Desktop/CICMMetadataEditor.Desktop.csproj @@ -0,0 +1,20 @@ + + + WinExe + net461 + + + + + + + + + + + + LICENSE + Always + + + \ No newline at end of file diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.Desktop/Info.plist b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.Desktop/Info.plist new file mode 100644 index 0000000..f307f6e --- /dev/null +++ b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.Desktop/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleName + CICMMetadataEditor + CFBundleIdentifier + com.example.CICMMetadataEditor + CFBundleShortVersionString + 1.0 + LSMinimumSystemVersion + 10.7 + CFBundleDevelopmentRegion + en + NSHumanReadableCopyright + + CFBundleIconFile + MacIcon.icns + + diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.Desktop/MacIcon.icns b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.Desktop/MacIcon.icns new file mode 100644 index 0000000..8f385bb Binary files /dev/null and b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.Desktop/MacIcon.icns differ diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.Desktop/Program.cs b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.Desktop/Program.cs new file mode 100644 index 0000000..f4900fd --- /dev/null +++ b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.Desktop/Program.cs @@ -0,0 +1,46 @@ +// +// Author: +// Natalia Portillo claunia@claunia.com +// +// Copyright (c) 2017-2018, © Natalia Portillo +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +// following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +// following disclaimer in the documentation and/or other materials provided with the distribution. +// * Neither the name of the [ORGANIZATION] nor the names of its contributors may be used to endorse or promote +// products derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +using System; +using Eto; +using Eto.Forms; + +namespace CICMMetadataEditor.Desktop +{ + class Program + { + [STAThread] + static void Main(string[] args) + { + new Application(Platform.Detect).Run(new dlgMetadata()); + } + } +} \ No newline at end of file diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png new file mode 100644 index 0000000..d0b5a80 Binary files /dev/null and b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png differ diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png new file mode 100644 index 0000000..f4c8d29 Binary files /dev/null and b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png differ diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png new file mode 100644 index 0000000..ebb5a0f Binary files /dev/null and b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png differ diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png new file mode 100644 index 0000000..0986d31 Binary files /dev/null and b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png differ diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png new file mode 100644 index 0000000..f4c8d29 Binary files /dev/null and b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png differ diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png new file mode 100644 index 0000000..a142c83 Binary files /dev/null and b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png differ diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png new file mode 100644 index 0000000..0986d31 Binary files /dev/null and b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png differ diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png new file mode 100644 index 0000000..412d6ca Binary files /dev/null and b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png differ diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png new file mode 100644 index 0000000..a142c83 Binary files /dev/null and b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png differ diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png new file mode 100644 index 0000000..e99022a Binary files /dev/null and b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png differ diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/Contents.json b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..6b28545 --- /dev/null +++ b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images": [ + { + "filename": "AppIcon-16.png", + "size": "16x16", + "scale": "1x", + "idiom": "mac" + }, + { + "filename": "AppIcon-16@2x.png", + "size": "16x16", + "scale": "2x", + "idiom": "mac" + }, + { + "filename": "AppIcon-32.png", + "size": "32x32", + "scale": "1x", + "idiom": "mac" + }, + { + "filename": "AppIcon-32@2x.png", + "size": "32x32", + "scale": "2x", + "idiom": "mac" + }, + { + "filename": "AppIcon-128.png", + "size": "128x128", + "scale": "1x", + "idiom": "mac" + }, + { + "filename": "AppIcon-128@2x.png", + "size": "128x128", + "scale": "2x", + "idiom": "mac" + }, + { + "filename": "AppIcon-256.png", + "size": "256x256", + "scale": "1x", + "idiom": "mac" + }, + { + "filename": "AppIcon-256@2x.png", + "size": "256x256", + "scale": "2x", + "idiom": "mac" + }, + { + "filename": "AppIcon-512.png", + "size": "512x512", + "scale": "1x", + "idiom": "mac" + }, + { + "filename": "AppIcon-512@2x.png", + "size": "512x512", + "scale": "2x", + "idiom": "mac" + } + ], + "info": { + "version": 1, + "author": "xcode" + } +} \ No newline at end of file diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/Contents.json b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/Contents.json new file mode 100644 index 0000000..033a618 --- /dev/null +++ b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info": { + "version": 1, + "author": "xcode" + } +} \ No newline at end of file diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/CICMMetadataEditor.XamMac.csproj b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/CICMMetadataEditor.XamMac.csproj new file mode 100644 index 0000000..66ae033 --- /dev/null +++ b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/CICMMetadataEditor.XamMac.csproj @@ -0,0 +1,99 @@ + + + + Debug + AnyCPU + {00CE3E32-7D00-4CB0-8951-3C27BF2D02CD} + {A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Exe + CICMMetadataEditor.XamMac + CICMMetadataEditor.XamMac + v2.0 + Xamarin.Mac + Resources + + + true + portable + false + bin\Debug + DEBUG; + prompt + 4 + false + Mac Developer + false + false + false + true + true + HttpClientHandler + None + + + + + false + + + true + bin\Release + + + prompt + 4 + false + true + false + true + true + true + SdkOnly + HttpClientHandler + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {189CFDC5-2630-46DE-A934-FF182F9F54AB} + CICMMetadataEditor + + + + + 2.4.1 + + + + + LICENSE + Always + + + + \ No newline at end of file diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Info.plist b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Info.plist new file mode 100644 index 0000000..3c15930 --- /dev/null +++ b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleName + EtoApp + CFBundleIdentifier + com.example.EtoApp + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSMinimumSystemVersion + 10.7 + CFBundleDevelopmentRegion + en + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + NSHumanReadableCopyright + + NSPrincipalClass + NSApplication + XSAppIconAssets + Assets.xcassets/AppIcon.appiconset + + diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Program.cs b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Program.cs new file mode 100644 index 0000000..2b6f661 --- /dev/null +++ b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor.XamMac/Program.cs @@ -0,0 +1,43 @@ +// +// Author: +// Natalia Portillo claunia@claunia.com +// +// Copyright (c) 2017-2018, © Natalia Portillo +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +// following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +// following disclaimer in the documentation and/or other materials provided with the distribution. +// * Neither the name of the [ORGANIZATION] nor the names of its contributors may be used to endorse or promote +// products derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +using AppKit; +using Eto.Forms; + +namespace CICMMetadataEditor.XamMac +{ + static class MainClass + { + static void Main(string[] args) + { + new Application(Eto.Platforms.XamMac2).Run(new dlgMetadata()); + } + } +} diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/CICMMetadataEditor.csproj b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/CICMMetadataEditor.csproj new file mode 100644 index 0000000..ad10a77 --- /dev/null +++ b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/CICMMetadataEditor.csproj @@ -0,0 +1,34 @@ + + + netstandard1.6 + CICMMetadataEditor + 1.0 + CICMMetadataEditor + Copyright © 2018 + Description of CICMMetadataEditor + + + + + + + + + + cicm.xsd + Always + + + cicm.xml + + + LICENSE + Always + + + + + cicm.cs + + + \ No newline at end of file diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/WrappersForEto.cs b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/WrappersForEto.cs new file mode 100644 index 0000000..2a9ae67 --- /dev/null +++ b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/WrappersForEto.cs @@ -0,0 +1,64 @@ +// +// Author: +// Natalia Portillo claunia@claunia.com +// +// Copyright (c) 2017-2018, © Natalia Portillo +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +// following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +// following disclaimer in the documentation and/or other materials provided with the distribution. +// * Neither the name of the [ORGANIZATION] nor the names of its contributors may be used to endorse or promote +// products derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +using Schemas; + +namespace CICMMetadataEditor +{ + class StringEntry + { + public string str { get; set; } + } + + class BarcodeEntry + { + public string code { get; set; } + public BarcodeTypeType type { get; set; } + } + + class DiscEntry + { + public string path { get; set; } + public OpticalDiscType disc { get; set; } + } + + class DiskEntry + { + public string path { get; set; } + public BlockMediaType disk { get; set; } + } + + class TargetOsEntry + { + public string name { get; set; } + public string version { get; set; } + } +} \ No newline at end of file diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/dlgBlockMedia.xeto b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/dlgBlockMedia.xeto new file mode 100644 index 0000000..9ec79d2 --- /dev/null +++ b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/dlgBlockMedia.xeto @@ -0,0 +1,678 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sequenced + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Known dimensions + + + + Round? + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Has ATA IDENTIFY information? + + + + + + + + Is PCI? + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Is PCMCIA? + Has CIS? + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Is Secure Digital or MMC? + + + + + + + Has CSD? + + + + Has Extended CSD? + + + + + + + + Is SCSI? + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Is USB? + + + + + + + + + + + + + + + + + + + + + + + + + + Has MAM? + + + + + + + + Has tracks? + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Known dumping + hardware + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/dlgBlockMedia.xeto.cs b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/dlgBlockMedia.xeto.cs new file mode 100644 index 0000000..904d13c --- /dev/null +++ b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/dlgBlockMedia.xeto.cs @@ -0,0 +1,1769 @@ +// +// Author: +// Natalia Portillo claunia@claunia.com +// +// Copyright (c) 2017-2018, © Natalia Portillo +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +// following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +// following disclaimer in the documentation and/or other materials provided with the distribution. +// * Neither the name of the [ORGANIZATION] nor the names of its contributors may be used to endorse or promote +// products derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using Eto.Forms; +using Eto.Serialization.Xaml; +using Schemas; + +namespace CICMMetadataEditor +{ + public class dlgBlockMedia : Dialog + { + ChecksumType[] checksums; + ChecksumType[] contentChks; + DumpHardwareType dumpHwIter; + bool editingDumpHw; + bool editingPartition; + FileSystemType filesystemIter; + ObservableCollection lstAdditionalInformation; + ObservableCollection lstAta; + ObservableCollection lstCID; + ObservableCollection lstCSD; + ObservableCollection lstDumpHw; + ObservableCollection lstECSD; + ObservableCollection lstEVPDs; + ObservableCollection lstInquiry; + ObservableCollection lstLogSense; + ObservableCollection lstMAM; + ObservableCollection lstModeSense; + ObservableCollection lstModeSense10; + ObservableCollection lstPartitions; + ObservableCollection lstPCIConfiguration; + ObservableCollection lstPCIOptionROM; + ObservableCollection lstPCMCIACIS; + ObservableCollection lstTracks; + ObservableCollection lstUSBDescriptors; + public BlockMediaType Metadata; + public bool Modified; + PartitionType partitionIter; + ScansType scans; + TapePartitionType[] tapeInformation; + BlockSizeType[] variableBlockSize; + + public dlgBlockMedia() + { + XamlReader.Load(this); + + Modified = false; + + #region Set partitions table + lstPartitions = new ObservableCollection(); + + treePartitions.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Sequence).Convert(v => v.ToString()) + }, + HeaderText = "Sequence" + }); + treePartitions.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.StartSector).Convert(v => v.ToString()) + }, + HeaderText = "Start" + }); + treePartitions.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.EndSector).Convert(v => v.ToString()) + }, + HeaderText = "End" + }); + treePartitions.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Type)}, + HeaderText = "Type" + }); + treePartitions.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Name)}, + HeaderText = "Name" + }); + treePartitions.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Description)}, + HeaderText = "Description" + }); + + treePartitions.DataStore = lstPartitions; + + treePartitions.AllowMultipleSelection = false; + #endregion Set partitions table + + #region Set filesystems table + treeFilesystems.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Type)}, + HeaderText = "Type" + }); + treeFilesystems.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.VolumeName)}, + HeaderText = "Name" + }); + + treeFilesystems.AllowMultipleSelection = false; + #endregion Set filesystems table + + #region Set dump hardware table + lstDumpHw = new ObservableCollection(); + + treeDumpHardware.Columns.Add(new GridColumn + { + DataCell = + new TextBoxCell {Binding = Binding.Property(r => r.Manufacturer)}, + HeaderText = "Manufacturer" + }); + treeDumpHardware.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Model)}, + HeaderText = "Model" + }); + treeDumpHardware.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Revision)}, + HeaderText = "Revision" + }); + treeDumpHardware.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Firmware)}, + HeaderText = "Firmware" + }); + treeDumpHardware.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Serial)}, + HeaderText = "Serial" + }); + treeDumpHardware.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Software).Convert(v => v?.Name) + }, + HeaderText = "Software" + }); + treeDumpHardware.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Software).Convert(v => v?.Version) + }, + HeaderText = "Version" + }); + treeDumpHardware.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Software) + .Convert(v => v?.OperatingSystem) + }, + HeaderText = "Operating system" + }); + + treeDumpHardware.DataStore = lstDumpHw; + + treeDumpHardware.AllowMultipleSelection = false; + + treeExtents.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Start).Convert(v => v.ToString()) + }, + HeaderText = "Start" + }); + treeExtents.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.End).Convert(v => v.ToString()) + }, + HeaderText = "End" + }); + #endregion Set dump hardware table + + #region Set ATA IDENTIFY table + lstAta = new ObservableCollection(); + treeATA.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeATA.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeATA.DataStore = lstAta; + #endregion Set ATA IDENTIFY table + + #region Set PCI configuration table + lstPCIConfiguration = new ObservableCollection(); + treeConfiguration.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeConfiguration.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeConfiguration.DataStore = lstPCIConfiguration; + #endregion Set PCI configuration table + + #region Set PCMCIA CIS table + lstPCMCIACIS = new ObservableCollection(); + treeCIS.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeCIS.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeCIS.DataStore = lstPCMCIACIS; + #endregion Set PCI option ROM table + + #region Set CID table + lstCID = new ObservableCollection(); + treeCID.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeCID.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeCID.DataStore = lstCID; + #endregion Set CID table + + #region Set CSD table + lstCSD = new ObservableCollection(); + treeCSD.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeCSD.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeCSD.DataStore = lstCSD; + #endregion Set CSD table + + #region Set Extended CSD table + lstECSD = new ObservableCollection(); + treeECSD.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeECSD.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeECSD.DataStore = lstECSD; + #endregion Set Extended CSD table + + #region Set SCSI INQUIRY table + lstInquiry = new ObservableCollection(); + treeInquiry.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeInquiry.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeInquiry.DataStore = lstInquiry; + #endregion Set SCSI INQUIRY table + + #region Set SCSI MODE SENSE table + lstModeSense = new ObservableCollection(); + treeModeSense.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeModeSense.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeModeSense.DataStore = lstModeSense; + #endregion Set SCSI MODE SENSE table + + #region Set SCSI MODE SENSE (10) table + lstModeSense10 = new ObservableCollection(); + treeModeSense10.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeModeSense10.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeModeSense10.DataStore = lstModeSense10; + #endregion Set SCSI MODE SENSE (10) table + + #region Set SCSI LOG SENSE table + lstLogSense = new ObservableCollection(); + treeLogSense.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeLogSense.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeLogSense.DataStore = lstLogSense; + #endregion Set SCSI MODE SENSE (10) table + + #region Set SCSI EVPDs table + lstEVPDs = new ObservableCollection(); + + treeEVPDs.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.page).Convert(v => v.ToString()) + }, + HeaderText = "Page" + }); + treeEVPDs.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeEVPDs.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + + treeEVPDs.DataStore = lstEVPDs; + + treeEVPDs.AllowMultipleSelection = false; + #endregion Set SCSI EVPDs table + + #region Set USB descriptors table + lstUSBDescriptors = new ObservableCollection(); + treeDescriptors.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeDescriptors.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeDescriptors.DataStore = lstUSBDescriptors; + #endregion Set USB descriptors table + + #region Set MAM table + lstMAM = new ObservableCollection(); + treeMAM.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeMAM.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeMAM.DataStore = lstMAM; + #endregion Set MAM table + + #region Set Option ROM table + lstPCIOptionROM = new ObservableCollection(); + + treeOptionROM.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image.Value)}, + HeaderText = "File" + }); + treeOptionROM.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Image.offset).Convert(v => v.ToString()) + }, + HeaderText = "Offset" + }); + treeOptionROM.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + + treeOptionROM.DataStore = lstPCIOptionROM; + + treeOptionROM.AllowMultipleSelection = false; + #endregion Set Option ROM table + + #region Set tracks table + lstTracks = new ObservableCollection(); + + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image.Value)}, + HeaderText = "File" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Image.offset).Convert(v => v.ToString()) + }, + HeaderText = "Offset" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image.format)}, + HeaderText = "Image format" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Head).Convert(v => v.ToString()) + }, + HeaderText = "Head" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Cylinder).Convert(v => v.ToString()) + }, + HeaderText = "Cylinder" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.StartSector).Convert(v => v.ToString()) + }, + HeaderText = "Start" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.EndSector).Convert(v => v.ToString()) + }, + HeaderText = "End" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Sectors).Convert(v => v.ToString()) + }, + HeaderText = "Sectors" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.BytesPerSector).Convert(v => v.ToString()) + }, + HeaderText = "Bytes per sector" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Format)}, + HeaderText = "Track format" + }); + + treeTracks.DataStore = lstTracks; + + treeTracks.AllowMultipleSelection = false; + #endregion Set tracks table + + lstAdditionalInformation = new ObservableCollection(); + treeAdditionalInformation.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.str)}, + HeaderText = "Information" + }); + treeAdditionalInformation.DataStore = lstAdditionalInformation; + treeAdditionalInformation.AllowMultipleSelection = false; + + txtImage.ToolTip = "This is the disk image containing this media."; + txtFormat.ToolTip = "This is the format of the disk image."; + txtOffset.ToolTip = "Byte offset where the media dump starts in the disk image."; + txtSize.ToolTip = "Size of the disk dump."; + txtManufacturer.ToolTip = "Disk manufacturer."; + txtModel.ToolTip = "Disk model."; + txtSerial.ToolTip = "Disk serial number."; + txtFirmware.ToolTip = "Disk firmware revision."; + txtInterface.ToolTip = "Disk interface."; + txtCopyProtection.ToolTip = "Disk copy protection."; + txtMediaType.ToolTip = "Disk type."; + txtMediaSubtype.ToolTip = "Disk subtype."; + chkSequence.ToolTip = "If checked means this disk is one in a sequence of several."; + txtMediaTitle.ToolTip = "Title of disk."; + spSequence.ToolTip = "Number of this disk in the sequence."; + spTotalMedia.ToolTip = "How many disks make the sequence."; + spSide.ToolTip = "On flippy disks, which side of the disk is represented by this dump."; + spLayer.ToolTip = + "On PTP layered disks, which layer of the side of the disk is represented by this dump."; + txtBlocks.ToolTip = "How many individual blocks (sectors) are in this dump."; + spPhysicalBlockSize.ToolTip = "Size of the biggest physical block in bytes."; + spLogicalBlockSize.ToolTip = "Size of the biggest logical block in bytes."; + spCylinders.ToolTip = "Cylinders of disk."; + spHeads.ToolTip = "Heads of disk."; + spSectors.ToolTip = "Sectors per track of disk."; + chkDimensions.ToolTip = "If checked, physical dimensions of disk are known."; + chkRound.ToolTip = "If checked, disk is physicaly round."; + spDiameter.ToolTip = "Diameter in milimeters of disk."; + spHeight.ToolTip = "Height in milimeters of disk."; + spWidth.ToolTip = "Width in milimeters of disk."; + spThickness.ToolTip = "Thickness in milimeters of disk."; + chkATA.ToolTip = "If checked, disk dump contains ATA(PI) IDENTIFY information."; + } + + public void FillFields() + { + if(Metadata == null) return; + + txtImage.Text = Metadata.Image.Value; + txtFormat.Text = Metadata.Image.format; + if(Metadata.Image.offsetSpecified) txtOffset.Text = Metadata.Image.offset.ToString(); + txtSize.Text = Metadata.Size.ToString(); + checksums = Metadata.Checksums; + contentChks = Metadata.ContentChecksums; + if(Metadata.Sequence != null) + { + lblMediaTitle.Visible = true; + txtMediaTitle.Visible = true; + lblSequence.Visible = true; + spSequence.Visible = true; + lblTotalMedia.Visible = true; + spTotalMedia.Visible = true; + lblSide.Visible = true; + spSide.Visible = true; + lblLayer.Visible = true; + spLayer.Visible = true; + chkSequence.Checked = true; + txtMediaTitle.Text = Metadata.Sequence.MediaTitle; + spSequence.Value = Metadata.Sequence.MediaSequence; + spTotalMedia.Value = Metadata.Sequence.TotalMedia; + if(Metadata.Sequence.SideSpecified) spSide.Value = Metadata.Sequence.Side; + if(Metadata.Sequence.LayerSpecified) spLayer.Value = Metadata.Sequence.Layer; + } + + if(Metadata.Manufacturer != null) txtManufacturer.Text = Metadata.Manufacturer; + if(Metadata.Model != null) txtModel.Text = Metadata.Model; + if(Metadata.Serial != null) txtSerial.Text = Metadata.Serial; + if(Metadata.Firmware != null) txtFirmware.Text = Metadata.Firmware; + if(Metadata.Interface != null) txtInterface.Text = Metadata.Interface; + spPhysicalBlockSize.Value = Metadata.PhysicalBlockSize; + spLogicalBlockSize.Value = Metadata.LogicalBlockSize; + txtBlocks.Text = Metadata.LogicalBlocks.ToString(); + variableBlockSize = Metadata.VariableBlockSize; + tapeInformation = Metadata.TapeInformation; + scans = Metadata.Scans; + if(Metadata.ATA?.Identify != null) + { + chkATA.Checked = true; + treeATA.Visible = true; + lstAta.Add(Metadata.ATA.Identify); + } + + if(Metadata.PCI != null) + { + chkPCI.Checked = true; + lblPCIVendor.Visible = true; + txtPCIVendor.Visible = true; + lblPCIProduct.Visible = true; + txtPCIProduct.Visible = true; + txtPCIVendor.Text = $"0x{Metadata.PCI.VendorID:X4}"; + txtPCIProduct.Text = $"0x{Metadata.PCI.DeviceID:X4}"; + if(Metadata.PCI.Configuration != null) + { + frmPCIConfiguration.Visible = true; + lstPCIConfiguration.Add(Metadata.PCI.Configuration); + } + + if(Metadata.PCI.ExpansionROM != null) + { + frmOptionROM.Visible = true; + lstPCIOptionROM.Add(Metadata.PCI.ExpansionROM); + } + } + + if(Metadata.PCMCIA != null) + { + chkPCMCIA.Checked = true; + chkCIS.Visible = true; + lblPCMCIAManufacturer.Visible = true; + txtPCMCIAManufacturer.Visible = true; + lblMfgCode.Visible = true; + txtMfgCode.Visible = true; + lblPCMCIAProductName.Visible = true; + txtPCMCIAProductName.Visible = true; + lblCardCode.Visible = true; + txtCardCode.Visible = true; + lblCompliance.Visible = true; + txtCompliance.Visible = true; + + if(Metadata.PCMCIA.CIS != null) + { + treeCIS.Visible = true; + lstPCMCIACIS.Add(Metadata.PCMCIA.CIS); + } + + if(Metadata.PCMCIA.Compliance != null) txtCompliance.Text = Metadata.PCMCIA.Compliance; + if(Metadata.PCMCIA.ManufacturerCodeSpecified) + txtMfgCode.Text = $"0x{Metadata.PCMCIA.ManufacturerCode:X4}"; + if(Metadata.PCMCIA.CardCodeSpecified) + txtCardCode.Text = $"0x{Metadata.PCMCIA.CardCode:X4}"; + if(Metadata.PCMCIA.Manufacturer != null) txtPCMCIAManufacturer.Text = Metadata.PCMCIA.Manufacturer; + if(Metadata.PCMCIA.ProductName != null) txtPCMCIAProductName.Text = Metadata.PCMCIA.ProductName; + if(Metadata.PCMCIA.AdditionalInformation != null) + { + lblAdditionalInformation.Visible = true; + treeAdditionalInformation.Visible = true; + + foreach(string addinfo in Metadata.PCMCIA.AdditionalInformation) + lstAdditionalInformation.Add(new StringEntry {str = addinfo}); + } + } + + if(Metadata.SecureDigital?.CID != null) + { + chkSecureDigital.Checked = true; + chkCSD.Visible = true; + chkECSD.Visible = true; + lblCID.Visible = true; + treeCID.Visible = true; + lstCID.Add(Metadata.SecureDigital.CID); + + if(Metadata.SecureDigital.CSD != null) + { + chkCSD.Checked = true; + treeCSD.Visible = true; + lstCSD.Add(Metadata.SecureDigital.CSD); + } + + if(Metadata.MultiMediaCard.ExtendedCSD != null) + { + chkECSD.Checked = true; + treeECSD.Visible = true; + lstECSD.Add(Metadata.MultiMediaCard.ExtendedCSD); + } + } + + if(Metadata.SCSI?.Inquiry != null) + { + chkSCSI.Checked = true; + frmInquiry.Visible = true; + lstInquiry.Add(Metadata.SCSI.Inquiry); + + if(Metadata.SCSI.ModeSense != null) + { + frmModeSense.Visible = true; + lstModeSense.Add(Metadata.SCSI.ModeSense); + } + + if(Metadata.SCSI.ModeSense10 != null) + { + frmModeSense10.Visible = true; + lstModeSense10.Add(Metadata.SCSI.ModeSense10); + } + + if(Metadata.SCSI.LogSense != null) + { + frmLogSense.Visible = true; + lstLogSense.Add(Metadata.SCSI.LogSense); + } + + if(Metadata.SCSI.EVPD != null) + { + frmEVPDs.Visible = true; + lstEVPDs = new ObservableCollection(Metadata.SCSI.EVPD); + treeEVPDs.DataStore = lstEVPDs; // TODO: Really needed? + } + } + + if(Metadata.USB != null) + { + chkUSB.Checked = true; + lblUSBVendor.Visible = true; + txtUSBVendor.Visible = true; + lblUSBProduct.Visible = true; + txtUSBProduct.Visible = true; + txtUSBVendor.Text = $"0x{Metadata.USB.VendorID:X4}"; + txtUSBProduct.Text = $"0x{Metadata.USB.ProductID:X4}"; + if(Metadata.USB.Descriptors != null) + { + frmDescriptors.Visible = true; + lstUSBDescriptors.Add(Metadata.USB.Descriptors); + } + } + + if(Metadata.MAM != null) + { + chkMAM.Checked = true; + treeMAM.Visible = true; + lstMAM.Add(Metadata.MAM); + } + + if(Metadata.HeadsSpecified) spHeads.Value = Metadata.Heads; + if(Metadata.CylindersSpecified) spCylinders.Value = Metadata.Cylinders; + if(Metadata.SectorsPerTrackSpecified) spSectors.Value = Metadata.SectorsPerTrack; + if(Metadata.Track != null) + { + chkTracks.Checked = true; + treeTracks.Visible = true; + lstTracks = new ObservableCollection(Metadata.Track); + treeTracks.DataStore = lstTracks; // TODO: Really needed? + } + + if(Metadata.CopyProtection != null) txtCopyProtection.Text = Metadata.CopyProtection; + if(Metadata.Dimensions != null) + { + chkDimensions.Checked = true; + if(Metadata.Dimensions.DiameterSpecified) + { + chkRound.Checked = true; + stkDiameter.Visible = true; + stkHeight.Visible = false; + stkWidth.Visible = false; + spDiameter.Value = Metadata.Dimensions.Diameter; + } + else + { + stkDiameter.Visible = false; + stkHeight.Visible = true; + stkWidth.Visible = true; + spHeight.Value = Metadata.Dimensions.Height; + spWidth.Value = Metadata.Dimensions.Width; + } + + stkThickness.Visible = true; + spThickness.Value = Metadata.Dimensions.Thickness; + } + + if(Metadata.FileSystemInformation != null) + { + lstPartitions = new ObservableCollection(Metadata.FileSystemInformation); + treePartitions.DataStore = lstPartitions; // TODO: Really needed? + } + + if(Metadata.DumpHardwareArray != null) + { + chkDumpHardware.Checked = true; + treeDumpHardware.Visible = true; + btnAddHardware.Visible = true; + btnEditHardware.Visible = true; + btnRemoveHardware.Visible = true; + + lstDumpHw = new ObservableCollection(Metadata.DumpHardwareArray); + treeDumpHardware.DataStore = lstDumpHw; // TODO: Really needed? + } + + if(Metadata.DiskType != null) txtMediaType.Text = Metadata.DiskType; + if(Metadata.DiskSubType != null) txtMediaSubtype.Text = Metadata.DiskSubType; + } + + protected void OnChkSequenceToggled(object sender, EventArgs e) + { + lblMediaTitle.Visible = chkSequence.Checked.Value; + txtMediaTitle.Visible = chkSequence.Checked.Value; + lblSequence.Visible = chkSequence.Checked.Value; + spSequence.Visible = chkSequence.Checked.Value; + lblTotalMedia.Visible = chkSequence.Checked.Value; + spTotalMedia.Visible = chkSequence.Checked.Value; + lblSide.Visible = chkSequence.Checked.Value; + spSide.Visible = chkSequence.Checked.Value; + lblLayer.Visible = chkSequence.Checked.Value; + spLayer.Visible = chkSequence.Checked.Value; + } + + protected void OnChkDimensionsToggled(object sender, EventArgs e) + { + chkRound.Visible = chkDimensions.Checked.Value; + stkThickness.Visible = chkDimensions.Checked.Value; + if(chkDimensions.Checked.Value) OnChkRoundToggled(sender, e); + else + { + stkDiameter.Visible = false; + stkHeight.Visible = false; + stkWidth.Visible = false; + } + } + + protected void OnChkRoundToggled(object sender, EventArgs e) + { + stkDiameter.Visible = chkRound.Checked.Value; + stkHeight.Visible = !chkRound.Checked.Value; + stkWidth.Visible = !chkRound.Checked.Value; + } + + protected void OnChkPCMCIAToggled(object sender, EventArgs e) + { + chkCIS.Visible = chkPCMCIA.Checked.Value; + treeCIS.Visible = chkPCMCIA.Checked.Value; + lblPCMCIAManufacturer.Visible = chkPCMCIA.Checked.Value; + txtPCMCIAManufacturer.Visible = chkPCMCIA.Checked.Value; + lblMfgCode.Visible = chkPCMCIA.Checked.Value; + txtMfgCode.Visible = chkPCMCIA.Checked.Value; + lblPCMCIAProductName.Visible = chkPCMCIA.Checked.Value; + txtPCMCIAProductName.Visible = chkPCMCIA.Checked.Value; + lblCardCode.Visible = chkPCMCIA.Checked.Value; + txtCardCode.Visible = chkPCMCIA.Checked.Value; + lblCompliance.Visible = chkPCMCIA.Checked.Value; + txtCompliance.Visible = chkPCMCIA.Checked.Value; + lblAdditionalInformation.Visible = false; + treeAdditionalInformation.Visible = false; + } + + protected void OnBtnCancelPartitionClicked(object sender, EventArgs e) + { + btnCancelPartition.Visible = false; + btnApplyPartition.Visible = false; + btnRemovePartition.Visible = true; + btnEditPartition.Visible = true; + btnAddPartition.Visible = true; + stkPartitionFields1.Visible = false; + stkPartitionFields2.Visible = false; + frmFilesystems.Visible = false; + } + + protected void OnBtnRemovePartitionClicked(object sender, EventArgs e) + { + if(treePartitions.SelectedItem != null) lstPartitions.Remove((PartitionType)treePartitions.SelectedItem); + } + + protected void OnBtnEditPartitionClicked(object sender, EventArgs e) + { + if(treePartitions.SelectedItem == null) return; + + partitionIter = (PartitionType)treePartitions.SelectedItem; + + spPartitionSequence.Value = partitionIter.Sequence; + txtPartitionStart.Text = partitionIter.StartSector.ToString(); + txtPartitionEnd.Text = partitionIter.EndSector.ToString(); + txtPartitionType.Text = partitionIter.Type; + txtPartitionName.Text = partitionIter.Name; + txtPartitionDescription.Text = partitionIter.Description; + treeFilesystems.DataStore = new ObservableCollection(partitionIter.FileSystems); + + btnCancelPartition.Visible = true; + btnApplyPartition.Visible = true; + btnRemovePartition.Visible = false; + btnEditPartition.Visible = false; + btnAddPartition.Visible = false; + stkPartitionFields1.Visible = true; + stkPartitionFields2.Visible = true; + frmFilesystems.Visible = true; + + editingPartition = true; + } + + protected void OnBtnApplyPartitionClicked(object sender, EventArgs e) + { + if(!int.TryParse(txtPartitionStart.Text, out int temp)) + { + MessageBox.Show("Partition start must be a number", MessageBoxType.Error); + return; + } + + if(!int.TryParse(txtPartitionEnd.Text, out int temp2)) + { + MessageBox.Show("Partition end must be a number", MessageBoxType.Error); + return; + } + + if(temp2 <= temp) + { + MessageBox.Show("Partition must end after start, and be bigger than 1 sector", MessageBoxType.Error); + return; + } + + if(editingPartition) lstPartitions.Remove(partitionIter); + + partitionIter = new PartitionType + { + Sequence = (uint)spPartitionSequence.Value, + StartSector = ulong.Parse(txtPartitionStart.Text), + EndSector = ulong.Parse(txtPartitionEnd.Text), + Type = txtPartitionType.Text, + Name = txtPartitionName.Text, + Description = txtPartitionDescription.Text + }; + if(((ObservableCollection)treeFilesystems.DataStore).Count > 0) + partitionIter.FileSystems = ((ObservableCollection)treeFilesystems.DataStore).ToArray(); + + btnCancelPartition.Visible = false; + btnApplyPartition.Visible = false; + btnRemovePartition.Visible = true; + btnEditPartition.Visible = true; + btnAddPartition.Visible = true; + stkPartitionFields1.Visible = false; + stkPartitionFields2.Visible = false; + frmFilesystems.Visible = false; + } + + protected void OnBtnAddPartitionClicked(object sender, EventArgs e) + { + spPartitionSequence.Value = 0; + txtPartitionStart.Text = ""; + txtPartitionEnd.Text = ""; + txtPartitionType.Text = ""; + txtPartitionName.Text = ""; + txtPartitionDescription.Text = ""; + treeFilesystems.DataStore = new ObservableCollection(); + + btnCancelPartition.Visible = true; + btnApplyPartition.Visible = true; + btnRemovePartition.Visible = false; + btnEditPartition.Visible = false; + btnAddPartition.Visible = false; + stkPartitionFields1.Visible = true; + stkPartitionFields2.Visible = true; + frmFilesystems.Visible = true; + + editingPartition = false; + } + + protected void OnBtnRemoveFilesystemClicked(object sender, EventArgs e) + { + if(treeFilesystems.SelectedItem != null) + ((ObservableCollection)treeFilesystems.DataStore).Remove((FileSystemType)treeFilesystems + .SelectedItem); + } + + protected void OnBtnEditFilesystemClicked(object sender, EventArgs e) + { + /* + if(treeFilesystems.SelectedItem == null) return; + + filesystemIter = (FileSystemType)treeFilesystems.SelectedItem; + + dlgFilesystem _dlgFilesystem = new dlgFilesystem {Metadata = filesystemIter}; + _dlgFilesystem.FillFields(); + _dlgFilesystem.ShowModal(this); + + if(!_dlgFilesystem.Modified) return; + + ((ObservableCollection)treeFilesystems.DataStore).Remove(filesystemIter); + ((ObservableCollection)treeFilesystems.DataStore).Add(_dlgFilesystem.Metadata);*/ + } + + protected void OnBtnAddFilesystemClicked(object sender, EventArgs e) + { + /* + dlgFilesystem _dlgFilesystem = new dlgFilesystem(); + _dlgFilesystem.ShowModal(this); + + if(_dlgFilesystem.Modified) + ((ObservableCollection)treeFilesystems.DataStore).Add(_dlgFilesystem.Metadata);*/ + } + + protected void OnChkDumpHardwareToggled(object sender, EventArgs e) + { + treeDumpHardware.Visible = chkDumpHardware.Checked.Value; + btnAddHardware.Visible = chkDumpHardware.Checked.Value; + btnRemoveHardware.Visible = chkDumpHardware.Checked.Value; + btnEditHardware.Visible = chkDumpHardware.Checked.Value; + + btnCancelHardware.Visible = false; + btnApplyHardware.Visible = false; + frmHardware.Visible = false; + } + + protected void OnBtnCancelHardwareClicked(object sender, EventArgs e) + { + btnAddHardware.Visible = true; + btnRemoveHardware.Visible = true; + btnCancelHardware.Visible = false; + btnEditHardware.Visible = true; + btnApplyHardware.Visible = false; + frmHardware.Visible = false; + } + + protected void OnBtnRemoveHardwareClicked(object sender, EventArgs e) + { + if(treeDumpHardware.SelectedItem != null) lstDumpHw.Remove((DumpHardwareType)treeDumpHardware.SelectedItem); + } + + protected void OnBtnEditHardwareClicked(object sender, EventArgs e) + { + if(treeDumpHardware.SelectedItem == null) return; + + dumpHwIter = (DumpHardwareType)treeDumpHardware.SelectedItem; + + txtHWManufacturer.Text = dumpHwIter.Manufacturer; + txtHWModel.Text = dumpHwIter.Model; + txtHWRevision.Text = dumpHwIter.Revision; + txtHWFirmware.Text = dumpHwIter.Firmware; + txtHWSerial.Text = dumpHwIter.Serial; + if(dumpHwIter.Software != null) + { + txtDumpName.Text = dumpHwIter.Software.Name; + txtDumpVersion.Text = dumpHwIter.Software.Version; + txtDumpOS.Text = dumpHwIter.Software.OperatingSystem; + } + + treeExtents.DataStore = new ObservableCollection(dumpHwIter.Extents); + + btnAddHardware.Visible = false; + btnRemoveHardware.Visible = false; + btnCancelHardware.Visible = true; + btnEditHardware.Visible = false; + btnApplyHardware.Visible = true; + frmHardware.Visible = true; + + editingDumpHw = true; + } + + protected void OnBtnApplyHardwareClicked(object sender, EventArgs e) + { + if(editingDumpHw) lstDumpHw.Remove(dumpHwIter); + + dumpHwIter = new DumpHardwareType + { + Manufacturer = txtHWManufacturer.Text, + Model = txtHWModel.Text, + Revision = txtHWRevision.Text, + Firmware = txtHWFirmware.Text, + Serial = txtHWSerial.Text + }; + if(!string.IsNullOrWhiteSpace(txtDumpName.Text) || !string.IsNullOrWhiteSpace(txtDumpVersion.Text) || + !string.IsNullOrWhiteSpace(txtDumpOS.Text)) + dumpHwIter.Software = new SoftwareType + { + Name = txtDumpName.Text, + Version = txtDumpVersion.Text, + OperatingSystem = txtDumpOS.Text + }; + if(((ObservableCollection)treeExtents.DataStore).Count > 0) + dumpHwIter.Extents = ((ObservableCollection)treeExtents.DataStore).ToArray(); + + lstDumpHw.Add(dumpHwIter); + + btnAddHardware.Visible = true; + btnRemoveHardware.Visible = true; + btnCancelHardware.Visible = false; + btnEditHardware.Visible = true; + btnApplyHardware.Visible = false; + frmHardware.Visible = false; + } + + protected void OnBtnAddHardwareClicked(object sender, EventArgs e) + { + txtHWManufacturer.Text = ""; + txtHWModel.Text = ""; + txtHWRevision.Text = ""; + txtHWFirmware.Text = ""; + txtHWSerial.Text = ""; + txtDumpName.Text = ""; + txtDumpVersion.Text = ""; + txtDumpOS.Text = ""; + treeExtents.DataStore = new ObservableCollection(); + + btnAddHardware.Visible = false; + btnRemoveHardware.Visible = false; + btnCancelHardware.Visible = true; + btnEditHardware.Visible = false; + btnApplyHardware.Visible = true; + frmHardware.Visible = true; + + editingDumpHw = false; + } + + protected void OnBtnRemoveExtentClicked(object sender, EventArgs e) + { + if(treeExtents.SelectedItem != null) + ((ObservableCollection)treeExtents.DataStore).Remove((ExtentType)treeExtents.SelectedItem); + } + + protected void OnBtnAddExtentClicked(object sender, EventArgs e) + { + ((ObservableCollection)treeExtents.DataStore).Add(new ExtentType + { + Start = (ulong)spExtentStart.Value, + End = (ulong)spExtentEnd.Value + }); + } + + protected void OnBtnCancelClicked(object sender, EventArgs e) + { + Close(); + } + + protected void OnBtnSaveClicked(object sender, EventArgs e) + { + #region Sanity checks + if(string.IsNullOrEmpty(txtFormat.Text)) + { + MessageBox.Show("Image format cannot be null", MessageBoxType.Error); + return; + } + + if(chkSequence.Checked.Value) + { + if(spSequence.Value < 1) + { + MessageBox.Show("Media sequence must be bigger than 0", MessageBoxType.Error); + return; + } + + if(spTotalMedia.Value < 1) + { + MessageBox.Show("Total medias must be bigger than 0", MessageBoxType.Error); + return; + } + + if(spSequence.Value > spTotalMedia.Value) + { + MessageBox.Show("Media sequence cannot be bigger than total medias", MessageBoxType.Error); + return; + } + } + + if(string.IsNullOrEmpty(txtBlocks.Text) || !long.TryParse(txtBlocks.Text, out long ltmp)) + { + MessageBox.Show("Blocks must be a number", MessageBoxType.Error); + return; + } + + if(ltmp < 1) + { + MessageBox.Show("Blocks must be bigger than 0", MessageBoxType.Error); + return; + } + + if(spPhysicalBlockSize.Value < 1) + { + MessageBox.Show("Physical Block Size must be bigger than 0", MessageBoxType.Error); + return; + } + + if(spLogicalBlockSize.Value < 1) + { + MessageBox.Show("Logical Block Size must be bigger than 0", MessageBoxType.Error); + return; + } + + if(spPhysicalBlockSize.Value < spLogicalBlockSize.Value) + { + MessageBox.Show("Physical Block Size must be bigger than Logical Block Size", MessageBoxType.Error); + return; + } + + if(chkDimensions.Checked.Value) + { + if(chkRound.Checked.Value) + { + if(spDiameter.Value <= 0) + { + MessageBox.Show("Diameter must be bigger than 0", MessageBoxType.Error); + return; + } + } + else + { + if(spHeight.Value <= 0) + { + MessageBox.Show("Height must be bigger than 0", MessageBoxType.Error); + return; + } + + if(spWidth.Value <= 0) + { + MessageBox.Show("Width must be bigger than 0", MessageBoxType.Error); + return; + } + } + + if(spThickness.Value <= 0) + { + MessageBox.Show("Thickness must be bigger than 0", MessageBoxType.Error); + return; + } + } + + if(chkPCI.Checked.Value) + { + if(string.IsNullOrWhiteSpace(txtPCIVendor.Text)) + { + MessageBox.Show("PCI Vendor ID must be set", MessageBoxType.Error); + return; + } + + if(string.IsNullOrWhiteSpace(txtPCIProduct.Text)) + { + MessageBox.Show("PCI Product ID must be set", MessageBoxType.Error); + return; + } + + try + { + if(Convert.ToInt32(txtPCIVendor.Text, 16) < 0 || Convert.ToInt32(txtPCIVendor.Text, 16) > 0xFFFF) + { + MessageBox.Show("PCI Vendor ID must be between 0x0000 and 0xFFFF", MessageBoxType.Error); + return; + } + } + catch(FormatException) + { + MessageBox.Show("PCI Vendor ID must be a number in hexadecimal format", MessageBoxType.Error); + return; + } + catch(OverflowException) + { + MessageBox.Show("PCI Vendor ID must not be negative", MessageBoxType.Error); + return; + } + + try + { + if(Convert.ToInt32(txtPCIProduct.Text, 16) < 0 || Convert.ToInt32(txtPCIProduct.Text, 16) > 0xFFFF) + { + MessageBox.Show("PCI Product ID must be between 0x0000 and 0xFFFF", MessageBoxType.Error); + return; + } + } + catch(FormatException) + { + MessageBox.Show("PCI Product ID must be a number in hexadecimal format", MessageBoxType.Error); + return; + } + catch(OverflowException) + { + MessageBox.Show("PCI Product ID must not be negative", MessageBoxType.Error); + return; + } + } + + if(chkPCMCIA.Checked.Value) + { + if(string.IsNullOrWhiteSpace(txtPCMCIAManufacturer.Text)) + { + MessageBox.Show("PCMCIA Manufacturer Code must be set", MessageBoxType.Error); + return; + } + + if(string.IsNullOrWhiteSpace(txtCardCode.Text)) + { + MessageBox.Show("PCMCIA Card Code must be set", MessageBoxType.Error); + return; + } + + try + { + if(Convert.ToInt32(txtMfgCode.Text, 16) < 0 || Convert.ToInt32(txtMfgCode.Text, 16) > 0xFFFF) + { + MessageBox.Show("PCMCIA Manufacturer Code must be between 0x0000 and 0xFFFF", + MessageBoxType.Error); + return; + } + } + catch(FormatException) + { + MessageBox.Show("PCMCIA Manufacturer Code must be a number in hexadecimal format", + MessageBoxType.Error); + return; + } + catch(OverflowException) + { + MessageBox.Show("PCMCIA Manufacturer Code must not be negative", MessageBoxType.Error); + return; + } + + try + { + if(Convert.ToInt32(txtCardCode.Text, 16) < 0 || Convert.ToInt32(txtCardCode.Text, 16) > 0xFFFF) + { + MessageBox.Show("PCMCIA Card Code must be between 0x0000 and 0xFFFF", MessageBoxType.Error); + return; + } + } + catch(FormatException) + { + MessageBox.Show("PCMCIA Card Code must be a number in hexadecimal format", MessageBoxType.Error); + return; + } + catch(OverflowException) + { + MessageBox.Show("PCMCIA Card Code must not be negative", MessageBoxType.Error); + return; + } + } + + if(chkUSB.Checked.Value) + { + if(string.IsNullOrWhiteSpace(txtUSBVendor.Text)) + { + MessageBox.Show("USB Vendor ID must be set", MessageBoxType.Error); + return; + } + + if(string.IsNullOrWhiteSpace(txtUSBProduct.Text)) + { + MessageBox.Show("USB Product ID must be set", MessageBoxType.Error); + return; + } + + try + { + if(Convert.ToInt32(txtUSBVendor.Text, 16) < 0 || Convert.ToInt32(txtUSBVendor.Text, 16) > 0xFFFF) + { + MessageBox.Show("USB Vendor ID must be between 0x0000 and 0xFFFF", MessageBoxType.Error); + return; + } + } + catch(FormatException) + { + MessageBox.Show("USB Vendor ID must be a number in hexadecimal format", MessageBoxType.Error); + return; + } + catch(OverflowException) + { + MessageBox.Show("USB Vendor ID must not be negative", MessageBoxType.Error); + return; + } + + try + { + if(Convert.ToInt32(txtUSBProduct.Text, 16) < 0 || Convert.ToInt32(txtUSBProduct.Text, 16) > 0xFFFF) + { + MessageBox.Show("USB Product ID must be between 0x0000 and 0xFFFF", MessageBoxType.Error); + return; + } + } + catch(FormatException) + { + MessageBox.Show("USB Product ID must be a number in hexadecimal format", MessageBoxType.Error); + return; + } + catch(OverflowException) + { + MessageBox.Show("USB Product ID must not be negative", MessageBoxType.Error); + return; + } + } + + if(chkDumpHardware.Checked.Value) + if(lstDumpHw.Count < 1) + { + MessageBox.Show("If dump hardware is known at least an entry must be created"); + return; + } + #endregion Sanity checks + + Metadata = new BlockMediaType {Image = new ImageType {Value = txtImage.Text, format = txtFormat.Text}}; + + if(!string.IsNullOrWhiteSpace(txtOffset.Text) && long.TryParse(txtOffset.Text, out ltmp)) + { + Metadata.Image.offsetSpecified = true; + Metadata.Image.offset = ulong.Parse(txtOffset.Text); + } + + Metadata.Size = ulong.Parse(txtSize.Text); + Metadata.Checksums = checksums; + Metadata.ContentChecksums = contentChks; + + if(chkSequence.Checked.Value) + { + Metadata.Sequence = new SequenceType + { + MediaTitle = txtMediaTitle.Text, + MediaSequence = (uint)spSequence.Value, + TotalMedia = (uint)spTotalMedia.Value + }; + if(spSide.Value > 0) + { + Metadata.Sequence.SideSpecified = true; + Metadata.Sequence.Side = (byte)spSide.Value; + } + + if(spLayer.Value > 0) + { + Metadata.Sequence.LayerSpecified = true; + Metadata.Sequence.Layer = (byte)spLayer.Value; + } + } + + if(!string.IsNullOrWhiteSpace(txtManufacturer.Text)) Metadata.Manufacturer = txtManufacturer.Text; + if(!string.IsNullOrWhiteSpace(txtModel.Text)) Metadata.Model = txtModel.Text; + if(!string.IsNullOrWhiteSpace(txtSerial.Text)) Metadata.Serial = txtSerial.Text; + if(!string.IsNullOrWhiteSpace(txtFirmware.Text)) Metadata.Firmware = txtFirmware.Text; + if(!string.IsNullOrWhiteSpace(txtInterface.Text)) Metadata.Interface = txtInterface.Text; + + Metadata.PhysicalBlockSize = (uint)spPhysicalBlockSize.Value; + Metadata.LogicalBlockSize = (uint)spLogicalBlockSize.Value; + Metadata.LogicalBlocks = ulong.Parse(txtBlocks.Text); + Metadata.VariableBlockSize = variableBlockSize; + Metadata.TapeInformation = tapeInformation; + Metadata.Scans = scans; + + if(chkATA.Checked.Value && lstAta.Count == 1) Metadata.ATA = new ATAType {Identify = lstAta[0]}; + + if(chkPCI.Checked.Value) + { + Metadata.PCI = new PCIType + { + VendorID = Convert.ToUInt16(txtPCIVendor.Text, 16), + DeviceID = Convert.ToUInt16(txtPCIProduct.Text, 16) + }; + + if(lstPCIConfiguration.Count == 1) Metadata.PCI.Configuration = lstPCIConfiguration[0]; + + if(lstPCIOptionROM.Count == 1) Metadata.PCI.ExpansionROM = lstPCIOptionROM[0]; + } + + if(chkPCMCIA.Checked.Value) + { + Metadata.PCMCIA = new PCMCIAType(); + + if(lstPCMCIACIS.Count == 1) Metadata.PCMCIA.CIS = lstPCMCIACIS[0]; + + if(!string.IsNullOrWhiteSpace(txtCompliance.Text)) Metadata.PCMCIA.Compliance = txtCompliance.Text; + if(!string.IsNullOrWhiteSpace(txtPCMCIAManufacturer.Text)) + Metadata.PCMCIA.Manufacturer = txtPCMCIAManufacturer.Text; + if(!string.IsNullOrWhiteSpace(txtPCMCIAProductName.Text)) + Metadata.PCMCIA.ProductName = txtPCMCIAProductName.Text; + if(!string.IsNullOrWhiteSpace(txtMfgCode.Text)) + { + Metadata.PCMCIA.ManufacturerCodeSpecified = true; + Metadata.PCMCIA.ManufacturerCode = Convert.ToUInt16(txtMfgCode.Text, 16); + } + + if(!string.IsNullOrWhiteSpace(txtCardCode.Text)) + { + Metadata.PCMCIA.CardCodeSpecified = true; + Metadata.PCMCIA.CardCode = Convert.ToUInt16(txtCardCode.Text, 16); + } + + if(lstAdditionalInformation.Count > 0) + { + List addinfos = new List(); + foreach(StringEntry entry in lstAdditionalInformation) addinfos.Add(entry.str); + Metadata.PCMCIA.AdditionalInformation = addinfos.ToArray(); + } + } + + if(chkSecureDigital.Checked.Value) + { + Metadata.SecureDigital = new SecureDigitalType(); + + if(lstCID.Count == 1) Metadata.SecureDigital.CID = lstCID[0]; + if(lstCSD.Count == 1) Metadata.SecureDigital.CSD = lstCSD[0]; + if(lstECSD.Count == 1) Metadata.MultiMediaCard.ExtendedCSD = lstECSD[0]; + } + + if(chkSCSI.Checked.Value) + { + Metadata.SCSI = new SCSIType(); + + if(lstInquiry.Count == 1) Metadata.SCSI.Inquiry = lstInquiry[0]; + if(lstModeSense.Count == 1) Metadata.SCSI.ModeSense = lstModeSense[0]; + if(lstModeSense10.Count == 1) Metadata.SCSI.ModeSense10 = lstModeSense10[0]; + if(lstLogSense.Count == 1) Metadata.SCSI.LogSense = lstLogSense[0]; + if(lstEVPDs.Count > 0) Metadata.SCSI.EVPD = lstEVPDs.ToArray(); + } + + if(chkUSB.Checked.Value) + { + Metadata.USB = new USBType + { + VendorID = Convert.ToUInt16(txtUSBVendor.Text, 16), + ProductID = Convert.ToUInt16(txtUSBProduct.Text, 16) + }; + + if(lstUSBDescriptors.Count == 1) Metadata.USB.Descriptors = lstUSBDescriptors[0]; + } + + if(chkMAM.Checked.Value && lstMAM.Count == 1) Metadata.MAM = lstMAM[0]; + + if(spHeads.Value > 0 && spCylinders.Value > 0 && spSectors.Value > 0) + { + Metadata.HeadsSpecified = true; + Metadata.CylindersSpecified = true; + Metadata.SectorsPerTrackSpecified = true; + Metadata.Heads = (ushort)spHeads.Value; + Metadata.Cylinders = (uint)spCylinders.Value; + Metadata.SectorsPerTrack = (ulong)spSectors.Value; + } + + if(lstTracks.Count > 0) Metadata.Track = lstTracks.ToArray(); + + if(!string.IsNullOrWhiteSpace(txtCopyProtection.Text)) Metadata.CopyProtection = txtCopyProtection.Text; + + if(chkDimensions.Checked.Value) + { + Metadata.Dimensions = new DimensionsType(); + if(chkRound.Checked.Value) + { + Metadata.Dimensions.DiameterSpecified = true; + Metadata.Dimensions.Diameter = spDiameter.Value; + } + else + { + Metadata.Dimensions.HeightSpecified = true; + Metadata.Dimensions.WidthSpecified = true; + Metadata.Dimensions.Height = spHeight.Value; + Metadata.Dimensions.Width = spWidth.Value; + } + + Metadata.Dimensions.Thickness = spThickness.Value; + } + + if(lstPartitions.Count > 0) Metadata.FileSystemInformation = lstPartitions.ToArray(); + + if(chkDumpHardware.Checked.Value && lstDumpHw.Count > 0) Metadata.DumpHardwareArray = lstDumpHw.ToArray(); + + if(!string.IsNullOrWhiteSpace(txtMediaType.Text)) Metadata.DiskType = txtMediaType.Text; + if(!string.IsNullOrWhiteSpace(txtMediaSubtype.Text)) Metadata.DiskSubType = txtMediaSubtype.Text; + + Modified = true; + Close(); + } + + class StringEntry + { + public string str; + } + + #region XAML UI elements + #pragma warning disable 0649 + TextBox txtImage; + TextBox txtFormat; + TextBox txtOffset; + TextBox txtSize; + TextBox txtManufacturer; + TextBox txtModel; + TextBox txtSerial; + TextBox txtFirmware; + TextBox txtInterface; + TextBox txtCopyProtection; + TextBox txtMediaType; + TextBox txtMediaSubtype; + CheckBox chkSequence; + Label lblMediaTitle; + TextBox txtMediaTitle; + Label lblSequence; + NumericUpDown spSequence; + Label lblTotalMedia; + NumericUpDown spTotalMedia; + Label lblSide; + NumericUpDown spSide; + Label lblLayer; + NumericUpDown spLayer; + TextBox txtBlocks; + NumericUpDown spPhysicalBlockSize; + NumericUpDown spLogicalBlockSize; + NumericUpDown spCylinders; + NumericUpDown spHeads; + NumericUpDown spSectors; + CheckBox chkDimensions; + CheckBox chkRound; + StackLayout stkDiameter; + NumericUpDown spDiameter; + StackLayout stkHeight; + NumericUpDown spHeight; + StackLayout stkWidth; + NumericUpDown spWidth; + StackLayout stkThickness; + NumericUpDown spThickness; + CheckBox chkATA; + GridView treeATA; + CheckBox chkPCI; + Label lblPCIVendor; + TextBox txtPCIVendor; + Label lblPCIProduct; + TextBox txtPCIProduct; + GroupBox frmPCIConfiguration; + GridView treeConfiguration; + GroupBox frmOptionROM; + GridView treeOptionROM; + CheckBox chkPCMCIA; + CheckBox chkCIS; + GridView treeCIS; + Label lblPCMCIAManufacturer; + Label lblMfgCode; + Label lblPCMCIAProductName; + Label lblCardCode; + Label lblCompliance; + TextBox txtPCMCIAManufacturer; + TextBox txtMfgCode; + TextBox txtPCMCIAProductName; + TextBox txtCardCode; + TextBox txtCompliance; + GroupBox lblAdditionalInformation; + GridView treeAdditionalInformation; + CheckBox chkSecureDigital; + GridView treeCID; + CheckBox chkCSD; + GridView treeCSD; + CheckBox chkECSD; + GridView treeECSD; + CheckBox chkSCSI; + GroupBox frmInquiry; + GridView treeInquiry; + GroupBox frmModeSense; + GridView treeModeSense; + GroupBox frmModeSense10; + GridView treeModeSense10; + GroupBox frmLogSense; + GridView treeLogSense; + GroupBox frmEVPDs; + GridView treeEVPDs; + CheckBox chkUSB; + TextBox txtUSBVendor; + TextBox txtUSBProduct; + GridView treeDescriptors; + CheckBox chkMAM; + GridView treeMAM; + CheckBox chkTracks; + GridView treeTracks; + GridView treePartitions; + Button btnCancelPartition; + Button btnRemovePartition; + Button btnEditPartition; + Button btnApplyPartition; + Button btnAddPartition; + NumericUpDown spPartitionSequence; + TextBox txtPartitionStart; + TextBox txtPartitionEnd; + TextBox txtPartitionType; + TextBox txtPartitionName; + TextBox txtPartitionDescription; + GroupBox frmFilesystems; + GridView treeFilesystems; + CheckBox chkDumpHardware; + GridView treeDumpHardware; + Button btnCancelHardware; + Button btnRemoveHardware; + Button btnEditHardware; + Button btnApplyHardware; + Button btnAddHardware; + GroupBox frmHardware; + TextBox txtHWManufacturer; + TextBox txtHWModel; + TextBox txtHWRevision; + TextBox txtHWFirmware; + TextBox txtHWSerial; + GridView treeExtents; + NumericUpDown spExtentStart; + NumericUpDown spExtentEnd; + TextBox txtDumpName; + TextBox txtDumpVersion; + TextBox txtDumpOS; + Label lblCID; + Label lblUSBVendor; + Label lblUSBProduct; + GroupBox frmDescriptors; + StackLayout stkPartitionFields1; + StackLayout stkPartitionFields2; + #pragma warning restore 0649 + #endregion XAML UI elements + } +} \ No newline at end of file diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/dlgMetadata.xeto b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/dlgMetadata.xeto new file mode 100644 index 0000000..bfb0245 --- /dev/null +++ b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/dlgMetadata.xeto @@ -0,0 +1,373 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Known release type? + + + + + + + Unknown or unreleased + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/dlgMetadata.xeto.cs b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/dlgMetadata.xeto.cs new file mode 100644 index 0000000..7e2e922 --- /dev/null +++ b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/dlgMetadata.xeto.cs @@ -0,0 +1,1291 @@ +// +// Author: +// Natalia Portillo claunia@claunia.com +// +// Copyright (c) 2017-2018, © Natalia Portillo +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +// following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +// following disclaimer in the documentation and/or other materials provided with the distribution. +// * Neither the name of the [ORGANIZATION] nor the names of its contributors may be used to endorse or promote +// products derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Xml; +using System.Xml.Serialization; +using Eto.Forms; +using Eto.Serialization.Xaml; +using Eto.Threading; +using Schemas; +using BorderType = Schemas.BorderType; + +namespace CICMMetadataEditor +{ + public class dlgMetadata : Form + { + AdvertisementType[] adverts; + AudioMediaType[] audiomedias; + BookType[] books; + string currentFile; + LinearMediaType[] linearmedias; + ObservableCollection lstArchitectures; + ObservableCollection lstArchitecturesTypes; + ObservableCollection lstBarcodes; + ObservableCollection lstBarcodeTypes; + ObservableCollection lstCategories; + ObservableCollection lstDiscs; + ObservableCollection lstDisks; + ObservableCollection lstFilesForMedia; + ObservableCollection lstKeywords; + ObservableCollection lstLanguages; + ObservableCollection lstLanguageTypes; + ObservableCollection lstOses; + ObservableCollection lstSubcategories; + + // TODO: Add the options to edit these fields + MagazineType[] magazines; + CICMMetadataType metadata; + + bool modified; + PCIType[] pcis; + bool stopped; + + Thread thdDisc; + Thread thdDisk; + UserManualType[] usermanuals; + + public dlgMetadata() + { + XamlReader.Load(this); + + cmbReleaseType = new EnumDropDown(); + stkReleaseType.Items.Add(new StackLayoutItem {Control = cmbReleaseType, Expand = true}); + + treeKeywords.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.str)}, + HeaderText = "Keyword" + }); + treeBarcodes.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.code)}, + HeaderText = "Barcode" + }); + treeBarcodes.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.type).Convert(v => v.ToString()) + }, + HeaderText = "Type" + }); + treeCategories.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.str)}, + HeaderText = "Category" + }); + treeSubcategories.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.str)}, + HeaderText = "Subcategory" + }); + treeLanguages.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.str)}, + HeaderText = "Language" + }); + treeOses.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.name)}, + HeaderText = "Name" + }); + treeOses.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.version)}, + HeaderText = "Version" + }); + treeArchitectures.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.str)}, + HeaderText = "Architecture" + }); + treeDiscs.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.path)}, + HeaderText = "File" + }); + treeDisks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.path)}, + HeaderText = "File" + }); + + treeKeywords.AllowMultipleSelection = false; + treeBarcodes.AllowMultipleSelection = false; + treeCategories.AllowMultipleSelection = false; + treeSubcategories.AllowMultipleSelection = false; + treeLanguages.AllowMultipleSelection = false; + treeOses.AllowMultipleSelection = false; + treeArchitectures.AllowMultipleSelection = false; + treeDiscs.AllowMultipleSelection = false; + treeDisks.AllowMultipleSelection = false; + + txtDeveloper.ToolTip = "Who developed the application."; + txtPublisher.ToolTip = "Who published the application."; + txtAuthor.ToolTip = "Author of the audiovisual media."; + txtPerformer.ToolTip = "Performer of the audiovisual media."; + txtName.ToolTip = "Application name."; + txtVersion.ToolTip = "Application version."; + txtPartNumber.ToolTip = "Part number of the application distribution."; + txtSerialNumber.ToolTip = + "Serial number of the application distribution. Not to be confused with serial number required to install."; + + lstBarcodeTypes = new ObservableCollection(); + lstLanguageTypes = new ObservableCollection(); + lstArchitecturesTypes = new ObservableCollection(); + lstFilesForMedia = new ObservableCollection(); + + //cmbBarcodes.ItemTextBinding = Binding.Property(r => r.str); + cmbBarcodes.DataStore = lstBarcodeTypes; + cmbLanguages.DataStore = lstLanguageTypes; + cmbArchitectures.DataStore = lstArchitecturesTypes; + cmbFilesForNewDisc.DataStore = lstFilesForMedia; + cmbFilesForNewDisk.DataStore = lstFilesForMedia; + + FillBarcodeCombo(); + FillLanguagesCombo(); + FillArchitecturesCombo(); + FillFilesCombos(); + } + + protected void OnAboutClicked(object sender, EventArgs e) + { + new AboutDialog().ShowDialog(this); + } + + protected void OnQuitClicked(object sender, EventArgs e) + { + Application.Instance.Quit(); + } + + protected void OnNewClicked(object sender, EventArgs e) + { + metadata = null; + modified = false; + currentFile = null; + LoadData(); + } + + protected void OnOpenClicked(object sender, EventArgs e) + { + OpenFileDialog dlgOpen = new OpenFileDialog + { + CheckFileExists = true, + MultiSelect = false, + Title = "Choose existing metadata file" + }; + dlgOpen.Filters.Add(new FileFilter("Metadata files", ".xml")); + + DialogResult result = dlgOpen.ShowDialog(this); + + if(result != DialogResult.Ok) return; + + try + { + XmlSerializer reader = new XmlSerializer(typeof(CICMMetadataType)); + FileStream fs = new FileStream(dlgOpen.FileName, FileMode.Open, FileAccess.Read); + metadata = (CICMMetadataType)reader.Deserialize(fs); + fs.Dispose(); + LoadData(); + currentFile = dlgOpen.FileName; + } + catch(XmlException) + { + MessageBox.Show("The chosen file is not a correct CICM Metadata file.", MessageBoxType.Error); + } + } + + protected void OnSaveClicked(object sender, EventArgs e) + { + if(!string.IsNullOrEmpty(currentFile)) OnSaveAsClicked(sender, e); + else Save(currentFile); + } + + protected void OnSaveAsClicked(object sender, EventArgs e) + { + SaveFileDialog dlgSave = new SaveFileDialog {CheckFileExists = true, Title = "Choose new metadata file"}; + dlgSave.Filters.Add(new FileFilter("Metadata files", ".xml")); + DialogResult result = dlgSave.ShowDialog(this); + + if(result != DialogResult.Ok) return; + + Save(dlgSave.FileName); + } + + void Save(string destination) + { + try + { + XmlSerializer writer = new XmlSerializer(typeof(CICMMetadataType)); + FileStream fs = new FileStream(destination, FileMode.Create, FileAccess.Write); + writer.Serialize(fs, metadata); + fs.Dispose(); + currentFile = destination; + } + catch(Exception) + { + if(Debugger.IsAttached) throw; + + MessageBox.Show("Could not save metadata.", MessageBoxType.Error); + } + } + + void LoadData() + { + modified = false; + + lstKeywords = new ObservableCollection(); + lstBarcodes = new ObservableCollection(); + lstCategories = new ObservableCollection(); + lstSubcategories = new ObservableCollection(); + lstLanguages = new ObservableCollection(); + lstOses = new ObservableCollection(); + lstArchitectures = new ObservableCollection(); + lstDiscs = new ObservableCollection(); + lstDisks = new ObservableCollection(); + + treeKeywords.DataStore = lstKeywords; + treeBarcodes.DataStore = lstBarcodes; + treeCategories.DataStore = lstCategories; + treeSubcategories.DataStore = lstSubcategories; + treeLanguages.DataStore = lstLanguages; + treeOses.DataStore = lstOses; + treeArchitectures.DataStore = lstArchitectures; + treeDiscs.DataStore = lstDiscs; + treeDisks.DataStore = lstDisks; + + txtDeveloper.Text = ""; + txtPublisher.Text = ""; + txtAuthor.Text = ""; + txtPerformer.Text = ""; + txtName.Text = ""; + txtVersion.Text = ""; + chkKnownReleaseType.Checked = false; + cldReleaseDate.Value = DateTime.UtcNow; + chkReleaseDate.Checked = false; + txtPartNumber.Text = ""; + txtSerialNumber.Text = ""; + txtNewKeyword.Text = ""; + txtNewBarcode.Text = ""; + txtNewCategory.Text = ""; + txtNewSubcategory.Text = ""; + txtNewOsName.Text = ""; + txtNewOsVersion.Text = ""; + + FillFields(); + } + + void FillBarcodeCombo() + { + lstBarcodeTypes.Clear(); + foreach(BarcodeTypeType type in Enum.GetValues(typeof(BarcodeTypeType))) + lstBarcodeTypes.Add(type.ToString()); + } + + void FillLanguagesCombo() + { + lstLanguageTypes.Clear(); + foreach(LanguagesTypeLanguage type in Enum.GetValues(typeof(LanguagesTypeLanguage))) + lstLanguageTypes.Add(type.ToString()); + } + + void FillArchitecturesCombo() + { + lstArchitecturesTypes.Clear(); + foreach(ArchitecturesTypeArchitecture type in Enum.GetValues(typeof(ArchitecturesTypeArchitecture))) + lstArchitecturesTypes.Add(type.ToString()); + } + + void FillFilesCombos() + { + /* TODO + foreach(KeyValuePair files in Context.Hashes) lstFilesForMedia.Add(files.Key); + */ + } + + void FillFields() + { + if(metadata == null) return; + + if(metadata.Developer != null) + foreach(string developer in metadata.Developer) + { + if(!string.IsNullOrWhiteSpace(txtDeveloper.Text)) txtDeveloper.Text += ","; + txtDeveloper.Text += developer; + } + + if(metadata.Publisher != null) + foreach(string publisher in metadata.Publisher) + { + if(!string.IsNullOrWhiteSpace(txtPublisher.Text)) txtPublisher.Text += ","; + txtPublisher.Text += publisher; + } + + if(metadata.Author != null) + foreach(string author in metadata.Author) + { + if(!string.IsNullOrWhiteSpace(txtPublisher.Text)) txtPublisher.Text += ","; + txtPublisher.Text += author; + } + + if(metadata.Performer != null) + foreach(string performer in metadata.Performer) + { + if(!string.IsNullOrWhiteSpace(txtPublisher.Text)) txtPublisher.Text += ","; + txtPublisher.Text += performer; + } + + txtName.Text = metadata.Name; + txtVersion.Text = metadata.Version; + txtPartNumber.Text = metadata.PartNumber; + txtSerialNumber.Text = metadata.SerialNumber; + + if(metadata.ReleaseTypeSpecified) + { + chkKnownReleaseType.Checked = true; + cmbReleaseType.Enabled = true; + cmbReleaseType.SelectedValue = metadata.ReleaseType; + } + + if(metadata.ReleaseDateSpecified) + { + chkReleaseDate.Checked = false; + cldReleaseDate.Enabled = true; + cldReleaseDate.Value = metadata.ReleaseDate; + } + + if(metadata.Keywords != null) + foreach(string keyword in metadata.Keywords) + lstKeywords.Add(new StringEntry {str = keyword}); + if(metadata.Categories != null) + foreach(string category in metadata.Categories) + lstCategories.Add(new StringEntry {str = category}); + if(metadata.Subcategories != null) + foreach(string subcategory in metadata.Subcategories) + lstSubcategories.Add(new StringEntry {str = subcategory}); + + if(metadata.Languages != null) + foreach(LanguagesTypeLanguage language in metadata.Languages) + { + lstLanguages.Add(new StringEntry {str = language.ToString()}); + lstLanguageTypes.Remove(language.ToString()); + } + + if(metadata.RequiredOperatingSystems != null) + foreach(RequiredOperatingSystemType reqos in metadata.RequiredOperatingSystems) + foreach(string reqver in reqos.Version) + lstOses.Add(new TargetOsEntry {name = reqos.Name, version = reqver}); + + if(metadata.Architectures != null) + foreach(ArchitecturesTypeArchitecture architecture in metadata.Architectures) + { + lstArchitectures.Add(new StringEntry {str = architecture.ToString()}); + lstArchitecturesTypes.Remove(architecture.ToString()); + } + + if(metadata.OpticalDisc != null) + foreach(OpticalDiscType disc in metadata.OpticalDisc) + { + lstDiscs.Add(new DiscEntry {path = disc.Image.Value, disc = disc}); + List files = new List {disc.Image.Value}; + if(disc.ADIP != null) files.Add(disc.ADIP.Image); + if(disc.ATIP != null) files.Add(disc.ATIP.Image); + if(disc.BCA != null) files.Add(disc.BCA.Image); + if(disc.CMI != null) files.Add(disc.CMI.Image); + if(disc.DCB != null) files.Add(disc.DCB.Image); + if(disc.DDS != null) files.Add(disc.DDS.Image); + if(disc.DMI != null) files.Add(disc.DMI.Image); + if(disc.LastRMD != null) files.Add(disc.LastRMD.Image); + if(disc.LeadIn != null) + foreach(BorderType border in disc.LeadIn) + files.Add(border.Image); + if(disc.LeadInCdText != null) files.Add(disc.LeadInCdText.Image); + if(disc.LeadOut != null) + foreach(BorderType border in disc.LeadOut) + files.Add(border.Image); + if(disc.MediaID != null) files.Add(disc.MediaID.Image); + if(disc.PAC != null) files.Add(disc.PAC.Image); + if(disc.PFI != null) files.Add(disc.PFI.Image); + if(disc.PFIR != null) files.Add(disc.PFIR.Image); + if(disc.PMA != null) files.Add(disc.PMA.Image); + if(disc.PRI != null) files.Add(disc.PRI.Image); + if(disc.SAI != null) files.Add(disc.SAI.Image); + if(disc.TOC != null) files.Add(disc.TOC.Image); + if(disc.Track != null) files.AddRange(disc.Track.Select(track => track.Image.Value)); + + foreach(string file in files) + if(lstFilesForMedia.Contains(file)) + lstFilesForMedia.Remove(file); + } + + if(metadata.BlockMedia != null) + foreach(BlockMediaType disk in metadata.BlockMedia) + { + lstDisks.Add(new DiskEntry {path = disk.Image.Value, disk = disk}); + List files = new List {disk.Image.Value}; + if(disk.ATA?.Identify != null) files.Add(disk.ATA.Identify.Image); + if(disk.MAM != null) files.Add(disk.MAM.Image); + if(disk.PCI?.ExpansionROM != null) files.Add(disk.PCI.ExpansionROM.Image.Value); + if(disk.PCMCIA?.CIS != null) files.Add(disk.PCMCIA.CIS.Image); + if(disk.SCSI != null) + { + if(disk.SCSI.Inquiry != null) files.Add(disk.SCSI.Inquiry.Image); + if(disk.SCSI.LogSense != null) files.Add(disk.SCSI.LogSense.Image); + if(disk.SCSI.ModeSense != null) files.Add(disk.SCSI.ModeSense.Image); + if(disk.SCSI.ModeSense10 != null) files.Add(disk.SCSI.ModeSense10.Image); + if(disk.SCSI.EVPD != null) files.AddRange(disk.SCSI.EVPD.Select(evpd => evpd.Image)); + } + + if(disk.SecureDigital != null) + { + if(disk.SecureDigital.CID != null) files.Add(disk.SecureDigital.CID.Image); + if(disk.SecureDigital.CSD != null) files.Add(disk.SecureDigital.CSD.Image); + if(disk.MultiMediaCard.ExtendedCSD != null) files.Add(disk.MultiMediaCard.ExtendedCSD.Image); + } + + if(disk.TapeInformation != null) + files.AddRange(disk.TapeInformation.Select(tapePart => tapePart.Image.Value)); + if(disk.Track != null) files.AddRange(disk.Track.Select(track => track.Image.Value)); + if(disk.USB?.Descriptors != null) files.Add(disk.USB.Descriptors.Image); + + foreach(string file in files) + if(lstFilesForMedia.Contains(file)) + lstFilesForMedia.Remove(file); + } + + magazines = metadata.Magazine; + books = metadata.Book; + usermanuals = metadata.UserManual; + adverts = metadata.Advertisement; + linearmedias = metadata.LinearMedia; + pcis = metadata.PCICard; + audiomedias = metadata.AudioMedia; + } + + protected void OnChkKnownReleaseTypeToggled(object sender, EventArgs e) + { + cmbReleaseType.Enabled = chkKnownReleaseType.Checked.Value; + } + + protected void OnChkReleaseDateToggled(object sender, EventArgs e) + { + cldReleaseDate.Enabled = !chkReleaseDate.Checked.Value; + } + + protected void OnBtnAddKeywordClicked(object sender, EventArgs e) + { + lstKeywords.Add(new StringEntry {str = txtNewKeyword.Text}); + txtNewKeyword.Text = ""; + } + + protected void OnBtnRemoveKeywordClicked(object sender, EventArgs e) + { + if(treeKeywords.SelectedItem != null) lstKeywords.Remove((StringEntry)treeKeywords.SelectedItem); + } + + protected void OnBtnClearKeywordsClicked(object sender, EventArgs e) + { + lstKeywords.Clear(); + } + + protected void OnBtnAddBarcodeClicked(object sender, EventArgs e) + { + if(string.IsNullOrEmpty(cmbBarcodes.Text)) return; + + lstBarcodes.Add(new BarcodeEntry + { + code = txtNewBarcode.Text, + type = (BarcodeTypeType)Enum.Parse(typeof(BarcodeTypeType), cmbBarcodes.Text) + }); + txtNewBarcode.Text = ""; + } + + protected void OnBtnClearBarcodesClicked(object sender, EventArgs e) + { + lstBarcodes.Clear(); + } + + protected void OnBtnRemoveBarcodeClicked(object sender, EventArgs e) + { + if(treeBarcodes.SelectedItem != null) lstBarcodes.Remove((BarcodeEntry)treeBarcodes.SelectedItem); + } + + protected void OnBtnAddCategoryClicked(object sender, EventArgs e) + { + lstCategories.Add(new StringEntry {str = txtNewCategory.Text}); + txtNewCategory.Text = ""; + } + + protected void OnBtnAddSubcategoryClicked(object sender, EventArgs e) + { + lstSubcategories.Add(new StringEntry {str = txtNewSubcategory.Text}); + txtNewSubcategory.Text = ""; + } + + protected void OnBtnRemoveSubcategoryClicked(object sender, EventArgs e) + { + if(treeSubcategories.SelectedItem != null) + lstSubcategories.Remove((StringEntry)treeSubcategories.SelectedItem); + } + + protected void OnBtnClearSubcategoriesClicked(object sender, EventArgs e) + { + lstSubcategories.Clear(); + } + + protected void OnBtnRemoveCategoryClicked(object sender, EventArgs e) + { + if(treeCategories.SelectedItem != null) lstCategories.Remove((StringEntry)treeCategories.SelectedItem); + } + + protected void OnBtnClearCategoriesClicked(object sender, EventArgs e) + { + lstCategories.Clear(); + } + + protected void OnBtnAddLanguageClicked(object sender, EventArgs e) + { + if(string.IsNullOrWhiteSpace(cmbLanguages.Text)) return; + + lstLanguages.Add(new StringEntry {str = cmbLanguages.Text}); + lstLanguageTypes.Remove(cmbLanguages.Text); + } + + protected void OnBtnRemoveLanguageClicked(object sender, EventArgs e) + { + if(treeLanguages.SelectedItem == null) return; + + lstLanguageTypes.Add(((StringEntry)treeLanguages.SelectedItem).str); + lstLanguages.Remove((StringEntry)treeLanguages.SelectedItem); + } + + protected void OnBtnClearLanguagesClicked(object sender, EventArgs e) + { + lstLanguages.Clear(); + FillLanguagesCombo(); + } + + protected void OnBtnAddNewOsClicked(object sender, EventArgs e) + { + if(string.IsNullOrWhiteSpace(txtNewOsName.Text)) + { + MessageBox.Show("Operating system name cannot be empty.", MessageBoxType.Error); + return; + } + + if(string.IsNullOrWhiteSpace(txtNewOsVersion.Text)) + { + MessageBox.Show("Operating system version cannot be empty.", MessageBoxType.Error); + return; + } + + lstOses.Add(new TargetOsEntry {name = txtNewOsName.Text, version = txtNewOsVersion.Text}); + txtNewOsName.Text = ""; + txtNewOsVersion.Text = ""; + } + + protected void OnBtnClearOsesClicked(object sender, EventArgs e) + { + lstOses.Clear(); + } + + protected void OnBtnRemoveOsClicked(object sender, EventArgs e) + { + if(treeOses.SelectedItem != null) lstOses.Remove((TargetOsEntry)treeOses.SelectedItem); + } + + protected void OnBtnAddArchitectureClicked(object sender, EventArgs e) + { + if(string.IsNullOrWhiteSpace(cmbArchitectures.Text)) return; + + lstArchitectures.Add(new StringEntry {str = cmbArchitectures.Text}); + lstArchitecturesTypes.Remove(cmbArchitectures.Text); + } + + protected void OnBtnClearArchitecturesClicked(object sender, EventArgs e) + { + lstArchitectures.Clear(); + FillArchitecturesCombo(); + } + + protected void OnBtnRemoveArchitectureClicked(object sender, EventArgs e) + { + if(treeArchitectures.SelectedItem == null) return; + + lstArchitecturesTypes.Add(((StringEntry)treeArchitectures.SelectedItem).str); + lstArchitectures.Remove((StringEntry)treeArchitectures.SelectedItem); + } + + protected void OnBtnAddDiscClicked(object sender, EventArgs e) + { + /* TODO + Context.SelectedFile = cmbFilesForNewDisc.Text; + */ + tabGeneral.Visible = false; + tabKeywords.Visible = false; + tabBarcodes.Visible = false; + tabCategories.Visible = false; + tabLanguages.Visible = false; + tabTargetOs.Visible = false; + tabArchitectures.Visible = false; + tabDisks.Visible = false; + prgAddDisc1.Visible = true; + prgAddDisc2.Visible = true; + lblAddDisc1.Visible = true; + lblAddDisc2.Visible = true; + btnCancel.Visible = false; + btnOK.Visible = false; + btnEditDisc.Visible = false; + btnClearDiscs.Visible = false; + /* TODO + Workers.Failed += OnDiscAddFailed; + Workers.Finished += OnDiscAddFinished; + Workers.UpdateProgress += UpdateDiscProgress1; + Workers.UpdateProgress2 += UpdateDiscProgress2; + Context.WorkingDisc = null; + */ + btnStopAddDisc.Visible = true; + btnAddDisc.Visible = false; + btnRemoveDisc.Visible = false; + /* TODO + thdDisc = new Thread(Workers.AddMedia); + thdDisc.Start(); + */ + } + + protected void OnBtnStopAddDiscClicked(object sender, EventArgs e) + { + thdDisc?.Abort(); + stopped = true; + OnDiscAddFailed(null); + } + + void UpdateDiscProgress1(string text, string inner, long current, long maximum) + { + Application.Instance.Invoke(delegate + { + lblAddDisc1.Text = !string.IsNullOrWhiteSpace(inner) ? inner : text; + if(maximum > 0) + { + if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue || + maximum > int.MaxValue) + { + current /= 100; + maximum /= 100; + } + + prgAddDisc1.Indeterminate = false; + prgAddDisc1.MinValue = 0; + prgAddDisc1.MaxValue = (int)maximum; + prgAddDisc1.Value = (int)current; + } + else prgAddDisc1.Indeterminate = true; + }); + } + + void UpdateDiscProgress2(string text, string inner, long current, long maximum) + { + Application.Instance.Invoke(delegate + { + lblAddDisc2.Text = !string.IsNullOrWhiteSpace(inner) ? inner : text; + if(maximum > 0) + { + if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue || + maximum > int.MaxValue) + { + current /= 100; + maximum /= 100; + } + + prgAddDisc2.Indeterminate = false; + prgAddDisc2.MinValue = 0; + prgAddDisc2.MaxValue = (int)maximum; + prgAddDisc2.Value = (int)current; + } + else prgAddDisc2.Indeterminate = true; + }); + } + + void OnDiscAddFailed(string text) + { + Application.Instance.Invoke(delegate + { + if(!stopped) MessageBox.Show(text, MessageBoxType.Error); + /* TODO + Context.SelectedFile = ""; + */ + tabGeneral.Visible = true; + tabKeywords.Visible = true; + tabBarcodes.Visible = true; + tabCategories.Visible = true; + tabLanguages.Visible = true; + tabTargetOs.Visible = true; + tabArchitectures.Visible = true; + tabDisks.Visible = true; + prgAddDisc1.Visible = false; + prgAddDisc2.Visible = false; + lblAddDisc1.Visible = false; + lblAddDisc2.Visible = false; + btnCancel.Visible = true; + btnOK.Visible = true; + btnEditDisc.Visible = true; + btnClearDiscs.Visible = true; + /* TODO + Workers.Failed -= OnDiscAddFailed; + Workers.Finished -= OnDiscAddFinished; + Workers.UpdateProgress -= UpdateDiscProgress1; + Workers.UpdateProgress2 -= UpdateDiscProgress2; + Context.WorkingDisc = null; + */ + btnStopAddDisc.Visible = false; + btnAddDisc.Visible = true; + btnRemoveDisc.Visible = true; + thdDisc = null; + }); + } + + void OnDiscAddFinished() + { + Application.Instance.Invoke(delegate + { + /* TODO + if(Context.WorkingDisc == null) return; + + OpticalDiscType disc = Context.WorkingDisc; + + lstDiscs.Add(new DiscEntry {path = Context.SelectedFile, disc = disc}); + List files = new List {disc.Image.Value}; + if(disc.ADIP != null) files.Add(disc.ADIP.Image); + if(disc.ATIP != null) files.Add(disc.ATIP.Image); + if(disc.BCA != null) files.Add(disc.BCA.Image); + if(disc.CMI != null) files.Add(disc.CMI.Image); + if(disc.DCB != null) files.Add(disc.DCB.Image); + if(disc.DDS != null) files.Add(disc.DDS.Image); + if(disc.DMI != null) files.Add(disc.DMI.Image); + if(disc.LastRMD != null) files.Add(disc.LastRMD.Image); + if(disc.LeadIn != null) files.AddRange(disc.LeadIn.Select(border => border.Image)); + if(disc.LeadInCdText != null) files.Add(disc.LeadInCdText.Image); + if(disc.LeadOut != null) files.AddRange(disc.LeadOut.Select(border => border.Image)); + if(disc.MediaID != null) files.Add(disc.MediaID.Image); + if(disc.PAC != null) files.Add(disc.PAC.Image); + if(disc.PFI != null) files.Add(disc.PFI.Image); + if(disc.PFIR != null) files.Add(disc.PFIR.Image); + if(disc.PMA != null) files.Add(disc.PMA.Image); + if(disc.PRI != null) files.Add(disc.PRI.Image); + if(disc.SAI != null) files.Add(disc.SAI.Image); + if(disc.TOC != null) files.Add(disc.TOC.Image); + if(disc.Track != null) files.AddRange(disc.Track.Select(track => track.Image.Value)); + + foreach(string file in files) lstFilesForMedia.Remove(file); +*/ + /* TODO + Context.SelectedFile = ""; + */ + tabGeneral.Visible = true; + tabKeywords.Visible = true; + tabBarcodes.Visible = true; + tabCategories.Visible = true; + tabLanguages.Visible = true; + tabTargetOs.Visible = true; + tabArchitectures.Visible = true; + tabDisks.Visible = true; + prgAddDisc1.Visible = false; + prgAddDisc2.Visible = false; + lblAddDisc1.Visible = false; + lblAddDisc2.Visible = false; + btnCancel.Visible = true; + btnOK.Visible = true; + btnEditDisc.Visible = true; + btnClearDiscs.Visible = true; + /* TODO + Workers.Failed -= OnDiscAddFailed; + Workers.Finished -= OnDiscAddFinished; + Workers.UpdateProgress -= UpdateDiscProgress1; + Workers.UpdateProgress2 -= UpdateDiscProgress2; + Context.WorkingDisc = null; + */ + btnStopAddDisc.Visible = false; + btnAddDisc.Visible = true; + btnRemoveDisc.Visible = true; + thdDisc = null; + }); + } + + protected void OnBtnClearDiscsClicked(object sender, EventArgs e) + { + lstDiscs.Clear(); + // TODO: Don't add files that are in disks + FillFilesCombos(); + } + + protected void OnBtnRemoveDiscClicked(object sender, EventArgs e) + { + if(treeDiscs.SelectedItem == null) return; + + lstFilesForMedia.Add(((DiscEntry)treeDiscs.SelectedItem).path); + lstDiscs.Remove((DiscEntry)treeDiscs.SelectedItem); + } + + protected void OnBtnAddDiskClicked(object sender, EventArgs e) + { + /* TODO + Context.SelectedFile = cmbFilesForNewDisk.Text; + */ + tabGeneral.Visible = false; + tabKeywords.Visible = false; + tabBarcodes.Visible = false; + tabCategories.Visible = false; + tabLanguages.Visible = false; + tabTargetOs.Visible = false; + tabArchitectures.Visible = false; + tabDiscs.Visible = false; + prgAddDisk1.Visible = true; + prgAddDisk2.Visible = true; + lblAddDisk1.Visible = true; + lblAddDisk2.Visible = true; + btnCancel.Visible = false; + btnOK.Visible = false; + btnEditDisk.Visible = false; + btnClearDisks.Visible = false; + /* TODO + Workers.Failed += OnDiskAddFailed; + Workers.Finished += OnDiskAddFinished; + Workers.UpdateProgress += UpdateDiskProgress1; + Workers.UpdateProgress2 += UpdateDiskProgress2; + Context.WorkingDisk = null; + */ + btnStopAddDisk.Visible = true; + btnAddDisk.Visible = false; + btnRemoveDisk.Visible = false; + /* TODO + +thdDisk = new Thread(Workers.AddMedia); +thdDisk.Start(); +*/ + } + + protected void OnBtnStopAddDiskClicked(object sender, EventArgs e) + { + thdDisk?.Abort(); + stopped = true; + OnDiskAddFailed(null); + } + + void UpdateDiskProgress1(string text, string inner, long current, long maximum) + { + Application.Instance.Invoke(delegate + { + lblAddDisk1.Text = !string.IsNullOrWhiteSpace(inner) ? inner : text; + if(maximum > 0) + { + if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue || + maximum > int.MaxValue) + { + current /= 100; + maximum /= 100; + } + + prgAddDisk1.Indeterminate = false; + prgAddDisk1.MinValue = 0; + prgAddDisk1.MaxValue = (int)maximum; + prgAddDisk1.Value = (int)current; + } + else prgAddDisk1.Indeterminate = true; + }); + } + + void UpdateDiskProgress2(string text, string inner, long current, long maximum) + { + Application.Instance.Invoke(delegate + { + lblAddDisk2.Text = !string.IsNullOrWhiteSpace(inner) ? inner : text; + if(maximum > 0) + { + if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue || + maximum > int.MaxValue) + { + current /= 100; + maximum /= 100; + } + + prgAddDisk2.Indeterminate = false; + prgAddDisk2.MinValue = 0; + prgAddDisk2.MaxValue = (int)maximum; + prgAddDisk2.Value = (int)current; + } + else prgAddDisk2.Indeterminate = true; + }); + } + + void OnDiskAddFailed(string text) + { + Application.Instance.Invoke(delegate + { + if(!stopped) MessageBox.Show(text, MessageBoxType.Error); + /* TODO + Context.SelectedFile = ""; + */ + tabGeneral.Visible = true; + tabKeywords.Visible = true; + tabBarcodes.Visible = true; + tabCategories.Visible = true; + tabLanguages.Visible = true; + tabTargetOs.Visible = true; + tabArchitectures.Visible = true; + tabDiscs.Visible = true; + prgAddDisk1.Visible = false; + prgAddDisk2.Visible = false; + lblAddDisk1.Visible = false; + lblAddDisk2.Visible = false; + btnCancel.Visible = true; + btnOK.Visible = true; + btnEditDisk.Visible = true; + btnClearDisks.Visible = true; + /* TODO + Workers.Failed -= OnDiskAddFailed; + Workers.Finished -= OnDiskAddFinished; + Workers.UpdateProgress -= UpdateDiskProgress1; + Workers.UpdateProgress2 -= UpdateDiskProgress2; + Context.WorkingDisk = null; + */ + btnStopAddDisk.Visible = false; + btnAddDisk.Visible = true; + btnRemoveDisk.Visible = true; + thdDisk = null; + }); + } + + void OnDiskAddFinished() + { + Application.Instance.Invoke(delegate + { + /* TODO + if(Context.WorkingDisk == null) return; + + BlockMediaType disk = Context.WorkingDisk; + + + lstDisks.Add(new DiskEntry {path = disk.Image.Value, disk = disk}); + List files = new List {disk.Image.Value}; + if(disk.ATA?.Identify != null) files.Add(disk.ATA.Identify.Image); + if(disk.MAM != null) files.Add(disk.MAM.Image); + if(disk.PCI?.ExpansionROM != null) files.Add(disk.PCI.ExpansionROM.Image.Value); + if(disk.PCMCIA?.CIS != null) files.Add(disk.PCMCIA.CIS.Image); + if(disk.SCSI != null) + { + if(disk.SCSI.Inquiry != null) files.Add(disk.SCSI.Inquiry.Image); + if(disk.SCSI.LogSense != null) files.Add(disk.SCSI.LogSense.Image); + if(disk.SCSI.ModeSense != null) files.Add(disk.SCSI.ModeSense.Image); + if(disk.SCSI.ModeSense10 != null) files.Add(disk.SCSI.ModeSense10.Image); + if(disk.SCSI.EVPD != null) files.AddRange(disk.SCSI.EVPD.Select(evpd => evpd.Image)); + } + + if(disk.SecureDigital != null) + { + if(disk.SecureDigital.CID != null) files.Add(disk.SecureDigital.CID.Image); + if(disk.SecureDigital.CSD != null) files.Add(disk.SecureDigital.CSD.Image); + if(disk.MultiMediaCard.ExtendedCSD != null) files.Add(disk.MultiMediaCard.ExtendedCSD.Image); + } + + if(disk.TapeInformation != null) + files.AddRange(disk.TapeInformation.Select(tapePart => tapePart.Image.Value)); + if(disk.Track != null) files.AddRange(disk.Track.Select(track => track.Image.Value)); + if(disk.USB?.Descriptors != null) files.Add(disk.USB.Descriptors.Image); + + foreach(string file in files) lstFilesForMedia.Remove(file); +*/ + /* TODO + Context.SelectedFile = ""; + */ + tabGeneral.Visible = true; + tabKeywords.Visible = true; + tabBarcodes.Visible = true; + tabCategories.Visible = true; + tabLanguages.Visible = true; + tabTargetOs.Visible = true; + tabArchitectures.Visible = true; + tabDiscs.Visible = true; + prgAddDisk1.Visible = false; + prgAddDisk2.Visible = false; + lblAddDisk1.Visible = false; + lblAddDisk2.Visible = false; + btnCancel.Visible = true; + btnOK.Visible = true; + btnEditDisk.Visible = true; + btnClearDisks.Visible = true; + /* TODO + Workers.Failed -= OnDiskAddFailed; + Workers.Finished -= OnDiskAddFinished; + Workers.UpdateProgress -= UpdateDiskProgress1; + Workers.UpdateProgress2 -= UpdateDiskProgress2; + Context.WorkingDisk = null;*/ + btnStopAddDisk.Visible = false; + btnAddDisk.Visible = true; + btnRemoveDisk.Visible = true; + thdDisk = null; + }); + } + + protected void OnBtnClearDisksClicked(object sender, EventArgs e) + { + lstDisks.Clear(); + // TODO: Don't add files that are discs + FillFilesCombos(); + } + + protected void OnBtnRemoveDiskClicked(object sender, EventArgs e) + { + if(treeDisks.SelectedItem == null) return; + + lstFilesForMedia.Add(((DiskEntry)treeDisks.SelectedItem).path); + lstDisks.Remove((DiskEntry)treeDisks.SelectedItem); + } + + protected void OnBtnCancelClicked(object sender, EventArgs e) + { + modified = false; + Close(); + } + + protected void OnBtnOKClicked(object sender, EventArgs e) + { + metadata = new CICMMetadataType(); + List architectures = new List(); + List barcodes = new List(); + List disks = new List(); + List categories = new List(); + List keywords = new List(); + List languages = new List(); + List discs = new List(); + List subcategories = new List(); + List systems = new List(); + + if(!string.IsNullOrEmpty(txtAuthor.Text)) metadata.Author = txtAuthor.Text.Split(','); + if(!string.IsNullOrEmpty(txtDeveloper.Text)) metadata.Developer = txtDeveloper.Text.Split(','); + if(!string.IsNullOrEmpty(txtName.Text)) metadata.Name = txtName.Text; + if(!string.IsNullOrEmpty(txtPartNumber.Text)) metadata.PartNumber = txtPartNumber.Text; + if(!string.IsNullOrEmpty(txtPerformer.Text)) metadata.Performer = txtPerformer.Text.Split(','); + if(!string.IsNullOrEmpty(txtPublisher.Text)) metadata.Publisher = txtPublisher.Text.Split(','); + if(!string.IsNullOrEmpty(txtSerialNumber.Text)) metadata.SerialNumber = txtSerialNumber.Text; + if(!string.IsNullOrEmpty(txtVersion.Text)) metadata.Version = txtVersion.Text; + if(!chkReleaseDate.Checked.Value) + { + metadata.ReleaseDate = cldReleaseDate.Value.Value; + metadata.ReleaseDateSpecified = true; + } + + if(chkKnownReleaseType.Checked.Value) + { + metadata.ReleaseType = cmbReleaseType.SelectedValue; + metadata.ReleaseTypeSpecified = true; + } + + foreach(StringEntry entry in lstArchitectures) + architectures.Add((ArchitecturesTypeArchitecture)Enum.Parse(typeof(ArchitecturesTypeArchitecture), + entry.str)); + + foreach(BarcodeEntry entry in lstBarcodes) + { + BarcodeType barcode = new BarcodeType {type = entry.type, Value = entry.code}; + barcodes.Add(barcode); + } + + foreach(DiskEntry entry in lstDisks) disks.Add(entry.disk); + + foreach(StringEntry entry in lstCategories) categories.Add(entry.str); + + foreach(StringEntry entry in lstKeywords) keywords.Add(entry.str); + + foreach(StringEntry entry in lstLanguages) + languages.Add((LanguagesTypeLanguage)Enum.Parse(typeof(LanguagesTypeLanguage), entry.str)); + + foreach(DiscEntry entry in lstDiscs) discs.Add(entry.disc); + + foreach(StringEntry entry in lstSubcategories) subcategories.Add(entry.str); + + if(lstOses.Count > 0) + { + Dictionary> osesDict = new Dictionary>(); + foreach(TargetOsEntry entry in lstOses.OrderBy(t => t.name).ThenBy(t => t.version)) + { + osesDict.TryGetValue(entry.name, out List versList); + + if(versList == null) versList = new List(); + + if(versList.Contains(entry.version)) continue; + + versList.Add(entry.version); + versList.Sort(); + osesDict.Remove(entry.name); + osesDict.Add(entry.name, versList); + } + + metadata.RequiredOperatingSystems = osesDict + .OrderBy(t => t.Key) + .Select(entry => new RequiredOperatingSystemType + { + Name = entry.Key, + Version = entry.Value.ToArray() + }).ToArray(); + } + + if(architectures.Count > 0) metadata.Architectures = architectures.ToArray(); + if(barcodes.Count > 0) metadata.Barcodes = barcodes.ToArray(); + if(disks.Count > 0) metadata.BlockMedia = disks.ToArray(); + if(categories.Count > 0) metadata.Categories = categories.ToArray(); + if(keywords.Count > 0) metadata.Keywords = keywords.ToArray(); + if(languages.Count > 0) metadata.Languages = languages.ToArray(); + if(discs.Count > 0) metadata.OpticalDisc = discs.ToArray(); + if(subcategories.Count > 0) metadata.Subcategories = subcategories.ToArray(); + if(systems.Count > 0) metadata.Systems = systems.ToArray(); + + metadata.Magazine = magazines; + metadata.Book = books; + metadata.UserManual = usermanuals; + metadata.Advertisement = adverts; + metadata.LinearMedia = linearmedias; + metadata.PCICard = pcis; + metadata.AudioMedia = audiomedias; + + modified = true; + Close(); + } + + protected void OnBtnEditDiscClicked(object sender, EventArgs e) + { + if(treeDiscs.SelectedItem == null) return; + + dlgOpticalDisc _dlgOpticalDisc = new dlgOpticalDisc + { + Title = $"Editing disc metadata for {((DiscEntry)treeDiscs.SelectedItem).path}", + Metadata = ((DiscEntry)treeDiscs.SelectedItem).disc + }; + _dlgOpticalDisc.FillFields(); + _dlgOpticalDisc.ShowModal(this); + + if(!_dlgOpticalDisc.Modified) return; + + lstDiscs.Remove((DiscEntry)treeDiscs.SelectedItem); + lstDiscs.Add(new DiscEntry {path = _dlgOpticalDisc.Metadata.Image.Value, disc = _dlgOpticalDisc.Metadata}); + } + + protected void OnBtnEditDiskClicked(object sender, EventArgs e) + { + if(treeDisks.SelectedItem == null) return; + + dlgBlockMedia _dlgBlockMedia = new dlgBlockMedia + { + Title = $"Editing disk metadata for {((DiskEntry)treeDisks.SelectedItem).path}", + Metadata = ((DiskEntry)treeDisks.SelectedItem).disk + }; + _dlgBlockMedia.FillFields(); + _dlgBlockMedia.ShowModal(this); + + if(!_dlgBlockMedia.Modified) return; + + lstDisks.Remove((DiskEntry)treeDisks.SelectedItem); + lstDisks.Add(new DiskEntry {path = _dlgBlockMedia.Metadata.Image.Value, disk = _dlgBlockMedia.Metadata}); + } + + #region XAML UI elements + #pragma warning disable 0649 + TabPage tabGeneral; + TextBox txtDeveloper; + TextBox txtPublisher; + TextBox txtAuthor; + TextBox txtPerformer; + TextBox txtName; + TextBox txtVersion; + StackLayout stkReleaseType; + CheckBox chkKnownReleaseType; + EnumDropDown cmbReleaseType; + DateTimePicker cldReleaseDate; + CheckBox chkReleaseDate; + TextBox txtPartNumber; + TextBox txtSerialNumber; + TabPage tabKeywords; + TextBox txtNewKeyword; + GridView treeKeywords; + TabPage tabBarcodes; + TextBox txtNewBarcode; + ComboBox cmbBarcodes; + GridView treeBarcodes; + TabPage tabCategories; + TextBox txtNewCategory; + GridView treeCategories; + TextBox txtNewSubcategory; + GridView treeSubcategories; + TabPage tabLanguages; + ComboBox cmbLanguages; + GridView treeLanguages; + TabPage tabTargetOs; + TextBox txtNewOsName; + TextBox txtNewOsVersion; + GridView treeOses; + TabPage tabArchitectures; + ComboBox cmbArchitectures; + GridView treeArchitectures; + TabPage tabDiscs; + ComboBox cmbFilesForNewDisc; + Button btnAddDisc; + GridView treeDiscs; + Button btnStopAddDisc; + Button btnEditDisc; + Button btnClearDiscs; + Button btnRemoveDisc; + Label lblAddDisc1; + ProgressBar prgAddDisc1; + Label lblAddDisc2; + ProgressBar prgAddDisc2; + TabPage tabDisks; + ComboBox cmbFilesForNewDisk; + Button btnAddDisk; + GridView treeDisks; + Button btnStopAddDisk; + Button btnEditDisk; + Button btnClearDisks; + Button btnRemoveDisk; + Label lblAddDisk1; + ProgressBar prgAddDisk1; + Label lblAddDisk2; + ProgressBar prgAddDisk2; + Button btnCancel; + Button btnOK; + #pragma warning restore 0649 + #endregion XAML UI elements + } +} \ No newline at end of file diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/dlgOpticalDisc.xeto b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/dlgOpticalDisc.xeto new file mode 100644 index 0000000..59de361 --- /dev/null +++ b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/dlgOpticalDisc.xeto @@ -0,0 +1,778 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Sequenced + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Known dimensions + + + + Round? + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Has layers? + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Known dumping + hardware + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/dlgOpticalDisc.xeto.cs b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/dlgOpticalDisc.xeto.cs new file mode 100644 index 0000000..cb4ec08 --- /dev/null +++ b/CICMMetadata/CICMMetadataEditor/CICMMetadataEditor/dlgOpticalDisc.xeto.cs @@ -0,0 +1,1979 @@ +// +// Author: +// Natalia Portillo claunia@claunia.com +// +// Copyright (c) 2017-2018, © Natalia Portillo +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +// following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, this list of conditions and the +// following disclaimer. +// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +// following disclaimer in the documentation and/or other materials provided with the distribution. +// * Neither the name of the [ORGANIZATION] nor the names of its contributors may be used to endorse or promote +// products derived from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// + +using System; +using System.Collections.ObjectModel; +using System.Linq; +using Eto.Forms; +using Eto.Serialization.Xaml; +using Schemas; +using BorderType = Schemas.BorderType; + +namespace CICMMetadataEditor +{ + public class dlgOpticalDisc : Dialog + { + ChecksumType[] checksums; + DumpHardwareType dumpHwIter; + bool editingDumpHw; + bool editingPartition; + FileSystemType filesystemIter; + ObservableCollection lstADIP; + ObservableCollection lstATIP; + ObservableCollection lstBCA; + ObservableCollection lstCDText; + ObservableCollection lstCMI; + ObservableCollection lstDCB; + ObservableCollection lstDDS; + ObservableCollection lstDI; + ObservableCollection lstDMI; + ObservableCollection lstDumpHw; + ObservableCollection lstLastRMD; + ObservableCollection lstLayers; + ObservableCollection lstLeadIns; + ObservableCollection lstLeadOuts; + ObservableCollection lstMasteringSIDs; + ObservableCollection lstMediaID; + ObservableCollection lstMouldSIDs; + ObservableCollection lstMouldTexts; + ObservableCollection lstPAC; + ObservableCollection lstPFI; + ObservableCollection lstPFIR; + ObservableCollection lstPMA; + ObservableCollection lstPRI; + ObservableCollection lstRingCodes; + ObservableCollection lstSAI; + ObservableCollection lstTOC; + ObservableCollection lstToolstamps; + ObservableCollection lstTracks; + CaseType mediaCase; + public OpticalDiscType Metadata; + public bool Modified; + PartitionType partitionIter; + ScansType scans; + TrackType trackIter; + XboxType xbox; + + public dlgOpticalDisc() + { + XamlReader.Load(this); + + Modified = false; + + #region Set partitions table + treePartitions.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Sequence).Convert(v => v.ToString()) + }, + HeaderText = "Sequence" + }); + treePartitions.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.StartSector).Convert(v => v.ToString()) + }, + HeaderText = "Start" + }); + treePartitions.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.EndSector).Convert(v => v.ToString()) + }, + HeaderText = "End" + }); + treePartitions.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Type)}, + HeaderText = "Type" + }); + treePartitions.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Name)}, + HeaderText = "Name" + }); + treePartitions.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Description)}, + HeaderText = "Description" + }); + + treePartitions.AllowMultipleSelection = false; + #endregion Set partitions table + + #region Set filesystems table + treeFilesystems.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Type)}, + HeaderText = "Type" + }); + treeFilesystems.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.VolumeName)}, + HeaderText = "Name" + }); + + treeFilesystems.AllowMultipleSelection = false; + #endregion Set filesystems table + + #region Set dump hardware table + lstDumpHw = new ObservableCollection(); + + treeDumpHardware.Columns.Add(new GridColumn + { + DataCell = + new TextBoxCell {Binding = Binding.Property(r => r.Manufacturer)}, + HeaderText = "Manufacturer" + }); + treeDumpHardware.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Model)}, + HeaderText = "Model" + }); + treeDumpHardware.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Revision)}, + HeaderText = "Revision" + }); + treeDumpHardware.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Firmware)}, + HeaderText = "Firmware" + }); + treeDumpHardware.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Serial)}, + HeaderText = "Serial" + }); + treeDumpHardware.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Software).Convert(v => v?.Name) + }, + HeaderText = "Software" + }); + treeDumpHardware.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Software).Convert(v => v?.Version) + }, + HeaderText = "Version" + }); + treeDumpHardware.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Software) + .Convert(v => v?.OperatingSystem) + }, + HeaderText = "Operating system" + }); + + treeDumpHardware.DataStore = lstDumpHw; + + treeDumpHardware.AllowMultipleSelection = false; + + treeExtents.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Start).Convert(v => v.ToString()) + }, + HeaderText = "Start" + }); + treeExtents.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.End).Convert(v => v.ToString()) + }, + HeaderText = "End" + }); + #endregion Set dump hardware table + + #region Set TOC table + lstTOC = new ObservableCollection(); + treeTOC.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeTOC.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeTOC.DataStore = lstTOC; + #endregion Set TOC table + + #region Set CD-Text table + lstCDText = new ObservableCollection(); + treeCDText.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeCDText.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeCDText.DataStore = lstCDText; + #endregion Set CD-Text table + + #region Set ATIP table + lstATIP = new ObservableCollection(); + treeATIP.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeATIP.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeATIP.DataStore = lstATIP; + #endregion Set ATIP table + + #region Set PMA table + lstPMA = new ObservableCollection(); + treePMA.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treePMA.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treePMA.DataStore = lstPMA; + #endregion Set PMA table + + #region Set PFI table + lstPFI = new ObservableCollection(); + treePFI.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treePFI.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treePFI.DataStore = lstPFI; + #endregion Set PFI table + + #region Set DMI table + lstDMI = new ObservableCollection(); + treeDMI.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeDMI.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeDMI.DataStore = lstDMI; + #endregion Set DMI table + + #region Set CMI table + lstCMI = new ObservableCollection(); + treeCMI.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeCMI.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeCMI.DataStore = lstCMI; + #endregion Set CMI table + + #region Set BCA table + lstBCA = new ObservableCollection(); + treeBCA.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeBCA.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeBCA.DataStore = lstBCA; + #endregion Set BCA table + + #region Set DCB table + lstDCB = new ObservableCollection(); + treeDCB.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeDCB.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeDCB.DataStore = lstDCB; + #endregion Set DCB table + + #region Set PRI table + lstPRI = new ObservableCollection(); + treePRI.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treePRI.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treePRI.DataStore = lstPRI; + #endregion Set PRI table + + #region Set MediaID table + lstMediaID = new ObservableCollection(); + treeMediaID.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeMediaID.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeMediaID.DataStore = lstMediaID; + #endregion Set MediaID table + + #region Set PFIR table + lstPFIR = new ObservableCollection(); + treePFIR.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treePFIR.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treePFIR.DataStore = lstPFIR; + #endregion Set PFIR table + + #region Set LastRMD table + lstLastRMD = new ObservableCollection(); + treeLastRMD.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeLastRMD.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeLastRMD.DataStore = lstLastRMD; + #endregion Set LastRMD table + + #region Set ADIP table + lstADIP = new ObservableCollection(); + treeADIP.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeADIP.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeADIP.DataStore = lstADIP; + #endregion Set ADIP table + + #region Set DDS table + lstDDS = new ObservableCollection(); + treeDDS.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeDDS.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeDDS.DataStore = lstDDS; + #endregion Set DDS table + + #region Set SAI table + lstSAI = new ObservableCollection(); + treeSAI.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeSAI.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeSAI.DataStore = lstSAI; + #endregion Set SAI table + + #region Set DI table + lstDI = new ObservableCollection(); + treeDI.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeDI.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeDI.DataStore = lstDI; + #endregion Set DI table + + #region Set PAC table + lstPAC = new ObservableCollection(); + treePAC.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treePAC.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treePAC.DataStore = lstPAC; + #endregion Set PAC table + + #region Set ring code table + lstRingCodes = new ObservableCollection(); + treeRingCodes.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.layer).Convert(v => v.ToString()) + }, + HeaderText = "Layer" + }); + treeRingCodes.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Value)}, + HeaderText = "Code" + }); + treeRingCodes.DataStore = lstRingCodes; + #endregion Set ring code table + + #region Set mastering sid table + lstMasteringSIDs = new ObservableCollection(); + treeMasteringSIDs.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.layer).Convert(v => v.ToString()) + }, + HeaderText = "Layer" + }); + treeMasteringSIDs.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Value)}, + HeaderText = "Code" + }); + treeMasteringSIDs.DataStore = lstMasteringSIDs; + #endregion Set mastering sid table + + #region Set toolstamp table + lstToolstamps = new ObservableCollection(); + treeToolstamps.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.layer).Convert(v => v.ToString()) + }, + HeaderText = "Layer" + }); + treeToolstamps.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Value)}, + HeaderText = "Code" + }); + treeToolstamps.DataStore = lstToolstamps; + #endregion Set toolstamp table + + #region Set mould sid table + lstMouldSIDs = new ObservableCollection(); + treeMouldSIDs.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.layer).Convert(v => v.ToString()) + }, + HeaderText = "Layer" + }); + treeMouldSIDs.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Value)}, + HeaderText = "Code" + }); + treeMouldSIDs.DataStore = lstMouldSIDs; + #endregion Set mould sid table + + #region Set mould text table + lstMouldTexts = new ObservableCollection(); + treeMouldTexts.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.layer).Convert(v => v.ToString()) + }, + HeaderText = "Layer" + }); + treeMouldTexts.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Value)}, + HeaderText = "Code" + }); + treeMouldTexts.DataStore = lstMouldTexts; + #endregion Set mould text table + + #region Set layer type combo box + cmbLayerType = new EnumDropDown(); + stkLayers.Items.Add(new StackLayoutItem {Control = cmbLayerType}); + #endregion Set layer type combo box + + #region Set layers table + lstLayers = new ObservableCollection(); + + treeLayers.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.layer).Convert(v => v.ToString()) + }, + HeaderText = "Layer" + }); + treeLayers.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Value).Convert(v => v.ToString()) + }, + HeaderText = "Start" + }); + + treeLayers.DataStore = lstLayers; + + treeLayers.AllowMultipleSelection = false; + #endregion Set layers table + + #region Set Lead-In table + lstLeadIns = new ObservableCollection(); + treeLeadIn.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeLeadIn.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeLeadIn.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.session).Convert(v => v.ToString()) + }, + HeaderText = "Session" + }); + treeLeadIn.DataStore = lstLeadIns; + #endregion Set Lead-In table + + #region Set Lead-Out table + lstLeadOuts = new ObservableCollection(); + treeLeadOut.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image)}, + HeaderText = "File" + }); + treeLeadOut.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeLeadOut.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.session).Convert(v => v.ToString()) + }, + HeaderText = "Session" + }); + treeLeadOut.DataStore = lstLeadOuts; + #endregion Set Lead-Out table + + #region Set tracks table + lstTracks = new ObservableCollection(); + + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Sequence.TrackNumber).Convert(v => v.ToString()) + }, + HeaderText = "Track" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Sequence.Session).Convert(v => v.ToString()) + }, + HeaderText = "Session" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image.Value)}, + HeaderText = "File" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Size).Convert(v => v.ToString()) + }, + HeaderText = "Size" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.Image.format)}, + HeaderText = "Format" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.Image.offset).Convert(v => v.ToString()) + }, + HeaderText = "Offset" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.StartMSF)}, + HeaderText = "MSF Start" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.EndMSF)}, + HeaderText = "MSF End" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.StartSector).Convert(v => v.ToString()) + }, + HeaderText = "LBA Start" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.EndSector).Convert(v => v.ToString()) + }, + HeaderText = "LBA End" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.TrackType1) + .Convert(v => v.ToString()) + }, + HeaderText = "Type" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell + { + Binding = Binding.Property(r => r.BytesPerSector).Convert(v => v.ToString()) + }, + HeaderText = "Bytes per sector" + }); + treeTracks.Columns.Add(new GridColumn + { + DataCell = new TextBoxCell {Binding = Binding.Property(r => r.AccoustID)}, + HeaderText = "Accoust ID" + }); + + treeTracks.DataStore = lstTracks; + + treeTracks.AllowMultipleSelection = false; + #endregion Set tracks table + + spExtentStart.MaxValue = double.MaxValue; + spExtentEnd.MaxValue = double.MaxValue; + + txtImage.ToolTip = "This is the disc image containing this media."; + txtFormat.ToolTip = "This is the format of the disc image."; + txtOffset.ToolTip = "Byte offset where the media dump starts in the disc image."; + txtSize.ToolTip = "Size of the disc dump."; + txtWriteOffset.ToolTip = "Write offset in bytes (can be negative)."; + txtMediaTracks.ToolTip = "How many tracks?"; + txtMediaSessions.ToolTip = "How many sessions?"; + txtCopyProtection.ToolTip = "Disc copy protection."; + txtDiscType.ToolTip = "Disc type."; + txtDiscSubtype.ToolTip = "Disc subtype."; + chkSequence.ToolTip = "If checked means this disc is one in a sequence of several."; + txtDiscTitle.ToolTip = "Title of disc."; + spSequence.ToolTip = "Number of this disc in the sequence."; + spTotalMedia.ToolTip = "How many diskc make the sequence."; + spSide.ToolTip = "On double sided discs, which side of the disc is represented by this dump."; + spLayer.ToolTip = + "On PTP layered discs, which layer of the side of the disc is represented by this dump."; + chkDimensions.ToolTip = "If checked, physical dimensions of disk are known."; + chkRound.ToolTip = "If checked, disk is physicaly round."; + spDiameter.ToolTip = "Diameter in milimeters of disk."; + spHeight.ToolTip = "Height in milimeters of disk."; + spWidth.ToolTip = "Width in milimeters of disk."; + spThickness.ToolTip = "Thickness in milimeters of disk."; + } + + public void FillFields() + { + if(Metadata == null) return; + + txtImage.Text = Metadata.Image.Value; + txtFormat.Text = Metadata.Image.format; + if(Metadata.Image.offsetSpecified) txtOffset.Text = Metadata.Image.offset.ToString(); + txtSize.Text = Metadata.Size.ToString(); + if(Metadata.Sequence != null) + { + lblDiscTitle.Visible = true; + lblDiscTitle.Visible = true; + lblSequence.Visible = true; + spSequence.Visible = true; + lblTotalMedia.Visible = true; + spTotalMedia.Visible = true; + lblSide.Visible = true; + spSide.Visible = true; + lblLayer.Visible = true; + spLayer.Visible = true; + chkSequence.Checked = true; + txtDiscTitle.Text = Metadata.Sequence.MediaTitle; + spSequence.Value = Metadata.Sequence.MediaSequence; + spTotalMedia.Value = Metadata.Sequence.TotalMedia; + if(Metadata.Sequence.SideSpecified) spSide.Value = Metadata.Sequence.Side; + if(Metadata.Sequence.LayerSpecified) spLayer.Value = Metadata.Sequence.Layer; + } + + if(Metadata.Layers != null) + { + chkLayers.Checked = true; + frmLayers.Visible = true; + + cmbLayerType.SelectedValue = Metadata.Layers.type; + lstLayers = new ObservableCollection(Metadata.Layers.Sectors); + treeLayers.DataStore = lstLayers; + } + + checksums = Metadata.Checksums; + xbox = Metadata.Xbox; + + if(Metadata.RingCode != null) + { + lstRingCodes = new ObservableCollection(Metadata.RingCode); + treeRingCodes.DataStore = lstRingCodes; + } + + if(Metadata.MasteringSID != null) + { + lstMasteringSIDs = new ObservableCollection(Metadata.MasteringSID); + treeMasteringSIDs.DataStore = lstMasteringSIDs; + } + + if(Metadata.Toolstamp != null) + { + lstToolstamps = new ObservableCollection(Metadata.Toolstamp); + treeToolstamps.DataStore = lstToolstamps; + } + + if(Metadata.MouldSID != null) + { + lstMouldSIDs = new ObservableCollection(Metadata.MouldSID); + treeMouldSIDs.DataStore = lstMouldSIDs; + } + + if(Metadata.MouldText != null) + { + lstMouldTexts = new ObservableCollection(Metadata.MouldText); + treeMouldTexts.DataStore = lstMouldTexts; + } + + if(Metadata.DiscType != null) txtDiscType.Text = Metadata.DiscType; + if(Metadata.DiscSubType != null) txtDiscSubtype.Text = Metadata.DiscSubType; + if(Metadata.OffsetSpecified) txtWriteOffset.Text = Metadata.Offset.ToString(); + txtMediaTracks.Text = Metadata.Tracks[0].ToString(); + txtMediaSessions.Text = Metadata.Sessions.ToString(); + if(Metadata.CopyProtection != null) txtCopyProtection.Text = Metadata.CopyProtection; + + if(Metadata.Dimensions != null) + { + chkDimensions.Checked = true; + if(Metadata.Dimensions.DiameterSpecified) + { + chkRound.Checked = true; + stkDiameter.Visible = true; + spDiameter.Value = Metadata.Dimensions.Diameter; + } + else + { + stkHeight.Visible = true; + spHeight.Value = Metadata.Dimensions.Height; + stkWidth.Visible = true; + spWidth.Value = Metadata.Dimensions.Width; + } + + stkThickness.Visible = true; + spThickness.Value = Metadata.Dimensions.Thickness; + } + + mediaCase = Metadata.Case; + scans = Metadata.Scans; + + if(Metadata.PFI != null) + { + frmPFI.Visible = true; + lstPFI.Add(Metadata.PFI); + } + + if(Metadata.DMI != null) + { + frmDMI.Visible = true; + lstDMI.Add(Metadata.DMI); + } + + if(Metadata.CMI != null) + { + frmCMI.Visible = true; + lstCMI.Add(Metadata.CMI); + } + + if(Metadata.BCA != null) + { + frmBCA.Visible = true; + lstBCA.Add(Metadata.BCA); + } + + if(Metadata.ATIP != null) + { + frmATIP.Visible = true; + lstATIP.Add(Metadata.ATIP); + } + + if(Metadata.ADIP != null) + { + frmADIP.Visible = true; + lstADIP.Add(Metadata.ADIP); + } + + if(Metadata.PMA != null) + { + frmPMA.Visible = true; + lstPMA.Add(Metadata.PMA); + } + + if(Metadata.DDS != null) + { + frmDDS.Visible = true; + lstDDS.Add(Metadata.DDS); + } + + if(Metadata.SAI != null) + { + frmSAI.Visible = true; + lstSAI.Add(Metadata.SAI); + } + + if(Metadata.LastRMD != null) + { + frmLastRMD.Visible = true; + lstLastRMD.Add(Metadata.LastRMD); + } + + if(Metadata.PRI != null) + { + frmPRI.Visible = true; + lstPRI.Add(Metadata.PRI); + } + + if(Metadata.MediaID != null) + { + frmMediaID.Visible = true; + lstMediaID.Add(Metadata.MediaID); + } + + if(Metadata.PFIR != null) + { + frmPFIR.Visible = true; + lstPFIR.Add(Metadata.PFIR); + } + + if(Metadata.DCB != null) + { + frmDCB.Visible = true; + lstDCB.Add(Metadata.DCB); + } + + if(Metadata.DI != null) + { + frmDI.Visible = true; + lstDI.Add(Metadata.DI); + } + + if(Metadata.PAC != null) + { + frmPAC.Visible = true; + lstPAC.Add(Metadata.PAC); + } + + if(Metadata.TOC != null) + { + frmTOC.Visible = true; + lstTOC.Add(Metadata.TOC); + } + + if(Metadata.LeadInCdText != null) + { + frmCDText.Visible = true; + lstCDText.Add(Metadata.LeadInCdText); + } + + if(Metadata.LeadIn != null) + { + frmLeadIns.Visible = true; + lstLeadIns = new ObservableCollection(Metadata.LeadIn); + treeLeadIn.DataStore = lstLeadIns; + } + + if(Metadata.LeadOut != null) + { + frmLeadOuts.Visible = true; + lstLeadOuts = new ObservableCollection(Metadata.LeadOut); + treeLeadOut.DataStore = lstLeadOuts; + } + + if(Metadata.PS3Encryption != null) + { + txtPS3Key.Text = Metadata.PS3Encryption.Key; + txtPS3Serial.Text = Metadata.PS3Encryption.Serial; + } + + lstTracks = new ObservableCollection(Metadata.Track); + treeTracks.DataStore = lstTracks; + + if(Metadata.DumpHardwareArray != null) + { + chkDumpHardware.Checked = true; + treeDumpHardware.Visible = true; + btnAddHardware.Visible = true; + btnEditHardware.Visible = true; + btnRemoveHardware.Visible = true; + + lstDumpHw = new ObservableCollection(Metadata.DumpHardwareArray); + treeDumpHardware.DataStore = lstDumpHw; + } + } + + protected void OnChkSequenceToggled(object sender, EventArgs e) + { + lblDiscTitle.Visible = chkSequence.Checked.Value; + txtDiscTitle.Visible = chkSequence.Checked.Value; + lblSequence.Visible = chkSequence.Checked.Value; + spSequence.Visible = chkSequence.Checked.Value; + lblTotalMedia.Visible = chkSequence.Checked.Value; + spTotalMedia.Visible = chkSequence.Checked.Value; + lblSide.Visible = chkSequence.Checked.Value; + spSide.Visible = chkSequence.Checked.Value; + lblLayer.Visible = chkSequence.Checked.Value; + spLayer.Visible = chkSequence.Checked.Value; + } + + protected void OnChkDimensionsToggled(object sender, EventArgs e) + { + chkRound.Visible = chkDimensions.Checked.Value; + stkThickness.Visible = chkDimensions.Checked.Value; + if(chkDimensions.Checked.Value) OnChkRoundToggled(sender, e); + else + { + stkDiameter.Visible = false; + stkHeight.Visible = false; + stkWidth.Visible = false; + } + } + + void OnChkRoundToggled(object sender, EventArgs e) + { + stkDiameter.Visible = chkRound.Checked.Value; + stkHeight.Visible = !chkRound.Checked.Value; + stkWidth.Visible = !chkRound.Checked.Value; + } + + protected void OnChkLayersToggled(object sender, EventArgs e) + { + frmLayers.Visible = chkLayers.Checked.Value; + } + + static void ErrorMessageBox(string text) + { + MessageBox.Show(text, MessageBoxType.Error); + } + + protected void OnBtnAddLayerClicked(object sender, EventArgs e) + { + if(string.IsNullOrWhiteSpace(txtLayerSize.Text)) ErrorMessageBox("Layer size must not be empty"); + + if(!long.TryParse(txtLayerSize.Text, out long ltmp)) ErrorMessageBox("Layer size must be a number"); + + if(ltmp < 0) ErrorMessageBox("Layer size must be a positive"); + + if(ltmp == 0) ErrorMessageBox("Layer size must be bigger than 0"); + + lstLayers.Add(new SectorsType + { + layer = (byte)spNewLayer.Value, + layerSpecified = true, + Value = ulong.Parse(txtLayerSize.Text) + }); + } + + protected void OnBtnRemoveLayerClicked(object sender, EventArgs e) + { + if(treeLayers.SelectedItem != null) lstLayers.Remove((SectorsType)treeLayers.SelectedItem); + } + + protected void OnBtnRemovePartitionClicked(object sender, EventArgs e) + { + if(treePartitions.SelectedItem != null) + ((ObservableCollection)treePartitions.DataStore).Remove((PartitionType)treePartitions + .SelectedItem); + } + + protected void OnBtnEditPartitionClicked(object sender, EventArgs e) + { + if(treePartitions.SelectedItem == null) return; + + partitionIter = (PartitionType)treePartitions.SelectedItem; + + spPartitionSequence.Value = partitionIter.Sequence; + txtPartitionStart.Text = partitionIter.StartSector.ToString(); + txtPartitionEnd.Text = partitionIter.EndSector.ToString(); + txtPartitionType.Text = partitionIter.Type; + txtPartitionName.Text = partitionIter.Name; + txtPartitionDescription.Text = partitionIter.Description; + treeFilesystems.DataStore = partitionIter.FileSystems != null + ? new ObservableCollection(partitionIter.FileSystems) + : new ObservableCollection(); + btnCancelPartition.Visible = true; + btnApplyPartition.Visible = true; + btnRemovePartition.Visible = false; + btnEditPartition.Visible = false; + btnAddPartition.Visible = false; + stkPartitionFields1.Visible = true; + stkPartitionFields2.Visible = true; + frmFilesystems.Visible = true; + + editingPartition = true; + } + + protected void OnBtnApplyPartitionClicked(object sender, EventArgs e) + { + if(!int.TryParse(txtPartitionStart.Text, out int temp)) + { + ErrorMessageBox("Partition start must be a number"); + return; + } + + if(!int.TryParse(txtPartitionEnd.Text, out int temp2)) + { + ErrorMessageBox("Partition end must be a number"); + return; + } + + if(temp2 <= temp) + { + ErrorMessageBox("Partition must end after start, and be bigger than 1 sector"); + return; + } + + if(editingPartition) ((ObservableCollection)treePartitions.DataStore).Remove(partitionIter); + partitionIter = new PartitionType + { + Sequence = (uint)spPartitionSequence.Value, + StartSector = ulong.Parse(txtPartitionStart.Text), + EndSector = ulong.Parse(txtPartitionEnd.Text), + Type = txtPartitionType.Text, + Name = txtPartitionName.Text, + Description = txtPartitionDescription.Text + }; + if(((ObservableCollection)treeFilesystems.DataStore).Count > 0) + partitionIter.FileSystems = ((ObservableCollection)treeFilesystems.DataStore).ToArray(); + + ((ObservableCollection)treePartitions.DataStore).Add(partitionIter); + btnCancelPartition.Visible = false; + btnApplyPartition.Visible = false; + btnRemovePartition.Visible = true; + btnEditPartition.Visible = true; + btnAddPartition.Visible = true; + stkPartitionFields1.Visible = false; + stkPartitionFields2.Visible = false; + frmFilesystems.Visible = false; + } + + protected void OnBtnAddPartitionClicked(object sender, EventArgs e) + { + spPartitionSequence.Value = 0; + txtPartitionStart.Text = ""; + txtPartitionEnd.Text = ""; + txtPartitionType.Text = ""; + txtPartitionName.Text = ""; + txtPartitionDescription.Text = ""; + treeFilesystems.DataStore = new ObservableCollection(); + + btnCancelPartition.Visible = true; + btnApplyPartition.Visible = true; + btnRemovePartition.Visible = false; + btnEditPartition.Visible = false; + btnAddPartition.Visible = false; + stkPartitionFields1.Visible = true; + stkPartitionFields2.Visible = true; + frmFilesystems.Visible = true; + + editingPartition = false; + } + + protected void OnBtnRemoveFilesystemClicked(object sender, EventArgs e) + { + if(treeFilesystems.SelectedItem != null) + ((ObservableCollection)treeFilesystems.DataStore).Remove((FileSystemType)treeFilesystems + .SelectedItem); + } + + protected void OnBtnEditFilesystemClicked(object sender, EventArgs e) + { + /* + if(treeFilesystems.SelectedItem == null) return; + + filesystemIter = (FileSystemType)treeFilesystems.SelectedItem; + + dlgFilesystem _dlgFilesystem = new dlgFilesystem {Metadata = filesystemIter}; + _dlgFilesystem.FillFields(); + _dlgFilesystem.ShowModal(this); + + if(!_dlgFilesystem.Modified) return; + + ((ObservableCollection)treeFilesystems.DataStore).Remove(filesystemIter); + ((ObservableCollection)treeFilesystems.DataStore).Add(_dlgFilesystem.Metadata);*/ + } + + protected void OnBtnAddFilesystemClicked(object sender, EventArgs e) + { + /* + dlgFilesystem _dlgFilesystem = new dlgFilesystem(); + _dlgFilesystem.ShowModal(this); + + if(_dlgFilesystem.Modified) + ((ObservableCollection)treeFilesystems.DataStore).Add(_dlgFilesystem.Metadata);*/ + } + + protected void OnBtnCancelTrackClicked(object sender, EventArgs e) + { + btnEditTrack.Visible = true; + btnApplyTrack.Visible = false; + btnCancelTrack.Visible = false; + + frmPartitions.Visible = false; + stkTrackFields1.Visible = false; + stkTrackFields2.Visible = false; + stkTrackFields3.Visible = false; + } + + protected void OnBtnApplyTrackClicked(object sender, EventArgs e) + { + string file = trackIter.Image.Value; + ulong filesize = trackIter.Size; + string fileformat = trackIter.Image.format; + ulong fileoffset = trackIter.Image.offset; + ChecksumType[] checksums = trackIter.Checksums; + SubChannelType subchannel = trackIter.SubChannel; + TrackTypeTrackType trackType = + (TrackTypeTrackType)Enum.Parse(typeof(TrackTypeTrackType), cmbTrackType.Text); + + lstTracks.Remove(trackIter); + + trackIter = new TrackType + { + AccoustID = txtAcoustID.Text, + BytesPerSector = uint.Parse(txtBytesPerSector.Text), + Checksums = checksums, + EndMSF = txtMSFEnd.Text, + EndSector = ulong.Parse(txtTrackEnd.Text), + Image = + new ImageType {format = fileformat, offset = fileoffset, offsetSpecified = true, Value = file}, + Sequence = + new TrackSequenceType + { + Session = uint.Parse(txtSessionSequence.Text), + TrackNumber = uint.Parse(txtTrackSequence.Text) + }, + Size = filesize, + StartMSF = txtMSFStart.Text, + StartSector = ulong.Parse(txtTrackStart.Text), + SubChannel = subchannel, + TrackType1 = trackType + }; + if(((ObservableCollection)treePartitions.DataStore).Count > 0) + trackIter.FileSystemInformation = + ((ObservableCollection)treePartitions.DataStore).ToArray(); + lstTracks.Add(trackIter); + + btnEditTrack.Visible = true; + btnApplyTrack.Visible = false; + btnCancelTrack.Visible = false; + frmPartitions.Visible = false; + stkTrackFields1.Visible = false; + stkTrackFields2.Visible = false; + stkTrackFields3.Visible = false; + } + + protected void OnBtnEditTrackClicked(object sender, EventArgs e) + { + if(treeTracks.SelectedItem == null) return; + + trackIter = (TrackType)treeTracks.SelectedItem; + + txtTrackSequence.Text = trackIter.Sequence.TrackNumber.ToString(); + txtSessionSequence.Text = trackIter.Sequence.Session.ToString(); + txtMSFStart.Text = trackIter.StartMSF; + txtMSFEnd.Text = trackIter.EndMSF; + txtTrackStart.Text = trackIter.StartSector.ToString(); + txtTrackEnd.Text = trackIter.EndSector.ToString(); + cmbTrackType.Text = trackIter.TrackType1.ToString(); + txtBytesPerSector.Text = trackIter.BytesPerSector.ToString(); + txtAcoustID.Text = trackIter.AccoustID; + treePartitions.DataStore = new ObservableCollection(trackIter.FileSystemInformation); + + btnEditTrack.Visible = false; + btnApplyTrack.Visible = true; + btnCancelTrack.Visible = true; + frmPartitions.Visible = true; + stkTrackFields1.Visible = true; + stkTrackFields2.Visible = true; + stkTrackFields3.Visible = true; + } + + protected void OnChkDumpHardwareToggled(object sender, EventArgs e) + { + treeDumpHardware.Visible = chkDumpHardware.Checked.Value; + btnAddHardware.Visible = chkDumpHardware.Checked.Value; + btnRemoveHardware.Visible = chkDumpHardware.Checked.Value; + btnEditHardware.Visible = chkDumpHardware.Checked.Value; + + btnCancelHardware.Visible = false; + btnApplyHardware.Visible = false; + frmHardware.Visible = false; + } + + protected void OnBtnCancelHardwareClicked(object sender, EventArgs e) + { + btnAddHardware.Visible = true; + btnRemoveHardware.Visible = true; + btnCancelHardware.Visible = false; + btnEditHardware.Visible = true; + btnApplyHardware.Visible = false; + frmHardware.Visible = false; + } + + protected void OnBtnRemoveHardwareClicked(object sender, EventArgs e) + { + if(treeDumpHardware.SelectedItem != null) lstDumpHw.Remove((DumpHardwareType)treeDumpHardware.SelectedItem); + } + + protected void OnBtnApplyHardwareClicked(object sender, EventArgs e) + { + if(editingDumpHw) lstDumpHw.Remove(dumpHwIter); + + dumpHwIter = new DumpHardwareType + { + Manufacturer = txtHWManufacturer.Text, + Model = txtHWModel.Text, + Revision = txtHWRevision.Text, + Firmware = txtHWFirmware.Text, + Serial = txtHWSerial.Text + }; + if(!string.IsNullOrWhiteSpace(txtDumpName.Text) || !string.IsNullOrWhiteSpace(txtDumpVersion.Text) || + !string.IsNullOrWhiteSpace(txtDumpOS.Text)) + dumpHwIter.Software = new SoftwareType + { + Name = txtDumpName.Text, + Version = txtDumpVersion.Text, + OperatingSystem = txtDumpOS.Text + }; + if(((ObservableCollection)treeExtents.DataStore).Count > 0) + dumpHwIter.Extents = ((ObservableCollection)treeExtents.DataStore).ToArray(); + + lstDumpHw.Add(dumpHwIter); + + btnAddHardware.Visible = true; + btnRemoveHardware.Visible = true; + btnCancelHardware.Visible = false; + btnEditHardware.Visible = true; + btnApplyHardware.Visible = false; + frmHardware.Visible = false; + } + + protected void OnBtnAddHardwareClicked(object sender, EventArgs e) + { + txtHWManufacturer.Text = ""; + txtHWModel.Text = ""; + txtHWRevision.Text = ""; + txtHWFirmware.Text = ""; + txtHWSerial.Text = ""; + txtDumpName.Text = ""; + txtDumpVersion.Text = ""; + txtDumpOS.Text = ""; + treeExtents.DataStore = new ObservableCollection(); + + btnAddHardware.Visible = false; + btnRemoveHardware.Visible = false; + btnCancelHardware.Visible = true; + btnEditHardware.Visible = false; + btnApplyHardware.Visible = true; + frmHardware.Visible = true; + + editingDumpHw = false; + } + + protected void OnBtnRemoveExtentClicked(object sender, EventArgs e) + { + if(treeExtents.SelectedItem != null) + ((ObservableCollection)treeExtents.DataStore).Remove((ExtentType)treeExtents.SelectedItem); + } + + protected void OnBtnEditHardwareClicked(object sender, EventArgs e) + { + if(treeDumpHardware.SelectedItem == null) return; + + dumpHwIter = (DumpHardwareType)treeDumpHardware.SelectedItem; + + txtHWManufacturer.Text = dumpHwIter.Manufacturer; + txtHWModel.Text = dumpHwIter.Model; + txtHWRevision.Text = dumpHwIter.Revision; + txtHWFirmware.Text = dumpHwIter.Firmware; + txtHWSerial.Text = dumpHwIter.Serial; + if(dumpHwIter.Software != null) + { + txtDumpName.Text = dumpHwIter.Software.Name; + txtDumpVersion.Text = dumpHwIter.Software.Version; + txtDumpOS.Text = dumpHwIter.Software.OperatingSystem; + } + + treeExtents.DataStore = new ObservableCollection(dumpHwIter.Extents); + + btnAddHardware.Visible = false; + btnRemoveHardware.Visible = false; + btnCancelHardware.Visible = true; + btnEditHardware.Visible = false; + btnApplyHardware.Visible = true; + frmHardware.Visible = true; + + editingDumpHw = true; + } + + protected void OnBtnAddExtentClicked(object sender, EventArgs e) + { + ((ObservableCollection)treeExtents.DataStore).Add(new ExtentType + { + Start = (ulong)spExtentStart.Value, + End = (ulong)spExtentEnd.Value + }); + } + + protected void OnBtnAddRingCodeClicked(object sender, EventArgs e) + { + lstRingCodes.Add(new LayeredTextType + { + layer = (uint)spRingCodeLayer.Value, + layerSpecified = true, + Value = txtRingCode.Text + }); + } + + protected void OnBtnRemoveRingCodeClicked(object sender, EventArgs e) + { + if(treeRingCodes.SelectedItem != null) lstRingCodes.Remove((LayeredTextType)treeRingCodes.SelectedItem); + } + + protected void OnBtnAddMasteringSIDClicked(object sender, EventArgs e) + { + lstMasteringSIDs.Add(new LayeredTextType + { + layer = (uint)spMasteringSIDLayer.Value, + layerSpecified = true, + Value = txtMasteringSID.Text + }); + } + + protected void OnBtnRemoveMasteringSIDClicked(object sender, EventArgs e) + { + if(treeMasteringSIDs.SelectedItem != null) + lstMasteringSIDs.Remove((LayeredTextType)treeMasteringSIDs.SelectedItem); + } + + protected void OnBtnAddToolstampClicked(object sender, EventArgs e) + { + lstToolstamps.Add(new LayeredTextType + { + layer = (uint)spToolstampLayer.Value, + layerSpecified = true, + Value = txtToolstamp.Text + }); + } + + protected void OnBtnRemoveToolstampClicked(object sender, EventArgs e) + { + if(treeToolstamps.SelectedItem != null) lstToolstamps.Remove((LayeredTextType)treeToolstamps.SelectedItem); + } + + protected void OnBtnAddMouldSIDClicked(object sender, EventArgs e) + { + lstMouldSIDs.Add(new LayeredTextType + { + layer = (uint)spMouldSIDLayer.Value, + layerSpecified = true, + Value = txtMouldSID.Text + }); + } + + protected void OnBtnRemoveMouldSIDClicked(object sender, EventArgs e) + { + if(treeMouldSIDs.SelectedItem != null) lstMouldSIDs.Remove((LayeredTextType)treeMouldSIDs.SelectedItem); + } + + protected void OnBtnAddMouldTextClicked(object sender, EventArgs e) + { + lstMouldTexts.Add(new LayeredTextType + { + layer = (uint)spMouldTextLayer.Value, + layerSpecified = true, + Value = txtMouldText.Text + }); + } + + protected void OnBtnRemoveMouldTextClicked(object sender, EventArgs e) + { + if(treeMouldTexts.SelectedItem != null) lstMouldTexts.Remove((LayeredTextType)treeMouldTexts.SelectedItem); + } + + protected void OnBtnSaveClicked(object sender, EventArgs e) + { + #region Sanity checks + if(string.IsNullOrEmpty(txtFormat.Text)) + { + ErrorMessageBox("Image format cannot be null"); + return; + } + + if(chkSequence.Checked.Value) + { + if(spSequence.Value < 1) + { + ErrorMessageBox("Media sequence must be bigger than 0"); + return; + } + + if(spTotalMedia.Value < 1) + { + ErrorMessageBox("Total medias must be bigger than 0"); + return; + } + + if(spSequence.Value > spTotalMedia.Value) + { + ErrorMessageBox("Media sequence cannot be bigger than total medias"); + return; + } + } + + if(!string.IsNullOrEmpty(txtWriteOffset.Text) && !long.TryParse(txtWriteOffset.Text, out long ltmp)) + { + ErrorMessageBox("Write offset must be a number"); + return; + } + + if(string.IsNullOrEmpty(txtMediaTracks.Text) || !long.TryParse(txtMediaTracks.Text, out ltmp)) + { + ErrorMessageBox("Tracks must be a number"); + return; + } + + if(ltmp < 1) + { + ErrorMessageBox("Tracks must be bigger than 0"); + return; + } + + if(string.IsNullOrEmpty(txtMediaSessions.Text) || !long.TryParse(txtMediaSessions.Text, out ltmp)) + { + ErrorMessageBox("Sessions must be a number"); + return; + } + + if(ltmp < 1) + { + ErrorMessageBox("Sessions must be bigger than 0"); + return; + } + + if(chkDimensions.Checked.Value) + { + if(chkRound.Checked.Value) + { + if(spDiameter.Value <= 0) + { + ErrorMessageBox("Diameter must be bigger than 0"); + return; + } + } + else + { + if(spHeight.Value <= 0) + { + ErrorMessageBox("Height must be bigger than 0"); + return; + } + + if(spWidth.Value <= 0) + { + ErrorMessageBox("Width must be bigger than 0"); + return; + } + } + + if(spThickness.Value <= 0) + { + ErrorMessageBox("Thickness must be bigger than 0"); + return; + } + } + + if(chkDumpHardware.Checked.Value) + if(lstDumpHw.Count < 1) + { + ErrorMessageBox("If dump hardware is known at least an entry must be created"); + return; + } + #endregion Sanity checks + + Metadata = new OpticalDiscType {Image = new ImageType {Value = txtImage.Text, format = txtFormat.Text}}; + + if(!string.IsNullOrWhiteSpace(txtOffset.Text) && long.TryParse(txtOffset.Text, out ltmp)) + { + Metadata.Image.offsetSpecified = true; + Metadata.Image.offset = ulong.Parse(txtOffset.Text); + } + + Metadata.Size = ulong.Parse(txtSize.Text); + + if(chkSequence.Checked.Value) + { + Metadata.Sequence = new SequenceType + { + MediaTitle = txtDiscTitle.Text, + MediaSequence = (uint)spSequence.Value, + TotalMedia = (uint)spTotalMedia.Value + }; + if(spSide.Value > 0) + { + Metadata.Sequence.SideSpecified = true; + Metadata.Sequence.Side = (byte)spSide.Value; + } + + if(spLayer.Value > 0) + { + Metadata.Sequence.LayerSpecified = true; + Metadata.Sequence.Layer = (byte)spLayer.Value; + } + } + + if(lstLayers.Count > 0) + Metadata.Layers = new LayersType + { + type = cmbLayerType.SelectedValue, + typeSpecified = true, + Sectors = lstLayers.ToArray() + }; + + Metadata.Checksums = checksums; + Metadata.Xbox = xbox; + + if(lstRingCodes.Count > 0) Metadata.RingCode = lstRingCodes.ToArray(); + + if(lstMasteringSIDs.Count > 0) Metadata.MasteringSID = lstMasteringSIDs.ToArray(); + + if(lstToolstamps.Count > 0) Metadata.Toolstamp = lstToolstamps.ToArray(); + + if(lstMouldSIDs.Count > 0) Metadata.MouldSID = lstMouldSIDs.ToArray(); + + if(lstMouldTexts.Count > 0) Metadata.MouldText = lstMouldTexts.ToArray(); + + if(!string.IsNullOrWhiteSpace(txtDiscType.Text)) Metadata.DiscType = txtDiscType.Text; + if(!string.IsNullOrWhiteSpace(txtDiscSubtype.Text)) Metadata.DiscSubType = txtDiscSubtype.Text; + if(!string.IsNullOrWhiteSpace(txtWriteOffset.Text)) + { + Metadata.Offset = int.Parse(txtWriteOffset.Text); + Metadata.OffsetSpecified = true; + } + + Metadata.Tracks = !string.IsNullOrWhiteSpace(txtMediaTracks.Text) + ? new[] {uint.Parse(txtMediaTracks.Text)} + : new[] {(uint)1}; + + Metadata.Sessions = + !string.IsNullOrWhiteSpace(txtMediaSessions.Text) ? uint.Parse(txtMediaSessions.Text) : 1; + + if(!string.IsNullOrWhiteSpace(txtCopyProtection.Text)) Metadata.CopyProtection = txtCopyProtection.Text; + + if(chkDimensions.Checked.Value) + { + Metadata.Dimensions = new DimensionsType(); + if(chkRound.Checked.Value) + { + Metadata.Dimensions.DiameterSpecified = true; + Metadata.Dimensions.Diameter = spDiameter.Value; + } + else + { + Metadata.Dimensions.HeightSpecified = true; + Metadata.Dimensions.WidthSpecified = true; + Metadata.Dimensions.Height = spHeight.Value; + Metadata.Dimensions.Width = spWidth.Value; + } + + Metadata.Dimensions.Thickness = spThickness.Value; + } + + Metadata.Case = mediaCase; + Metadata.Scans = scans; + + if(lstPFI.Count == 1) Metadata.PFI = lstPFI[0]; + if(lstDMI.Count == 1) Metadata.DMI = lstDMI[0]; + if(lstCMI.Count == 1) Metadata.CMI = lstCMI[0]; + if(lstBCA.Count == 1) Metadata.BCA = lstBCA[0]; + if(lstATIP.Count == 1) Metadata.ATIP = lstATIP[0]; + if(lstADIP.Count == 1) Metadata.ADIP = lstADIP[0]; + if(lstPMA.Count == 1) Metadata.PMA = lstPMA[0]; + if(lstDDS.Count == 1) Metadata.DDS = lstDDS[0]; + if(lstSAI.Count == 1) Metadata.SAI = lstSAI[0]; + if(lstLastRMD.Count == 1) Metadata.LastRMD = lstLastRMD[0]; + if(lstPRI.Count == 1) Metadata.PRI = lstPRI[0]; + if(lstMediaID.Count == 1) Metadata.MediaID = lstMediaID[0]; + if(lstPFIR.Count == 1) Metadata.PFIR = lstPFIR[0]; + if(lstDCB.Count == 1) Metadata.DCB = lstDCB[0]; + if(lstDI.Count == 1) Metadata.DI = lstDI[0]; + if(lstPAC.Count == 1) Metadata.PAC = lstPAC[0]; + if(lstTOC.Count == 1) Metadata.TOC = lstTOC[0]; + if(lstCDText.Count == 1) Metadata.LeadInCdText = lstCDText[0]; + + if(lstLeadIns.Count == 1) Metadata.LeadIn = lstLeadIns.ToArray(); + if(lstLeadOuts.Count == 1) Metadata.LeadOut = lstLeadOuts.ToArray(); + + if(!string.IsNullOrWhiteSpace(txtPS3Key.Text) && !string.IsNullOrWhiteSpace(txtPS3Serial.Text)) + Metadata.PS3Encryption = new PS3EncryptionType {Key = txtPS3Key.Text, Serial = txtPS3Serial.Text}; + + Metadata.Track = lstTracks.ToArray(); + + if(chkDumpHardware.Checked.Value && lstDumpHw.Count >= 1) Metadata.DumpHardwareArray = lstDumpHw.ToArray(); + + Modified = true; + Close(); + } + + protected void OnBtnCancelClicked(object sender, EventArgs e) + { + Close(); + } + + protected void OnBtnCancelPartitionClicked(object sender, EventArgs e) + { + btnCancelPartition.Visible = false; + btnApplyPartition.Visible = false; + btnRemovePartition.Visible = true; + btnEditPartition.Visible = true; + btnAddPartition.Visible = true; + stkPartitionFields1.Visible = false; + stkPartitionFields2.Visible = false; + frmFilesystems.Visible = false; + } + + #region XAML UI elements + #pragma warning disable 0649 + TextBox txtImage; + TextBox txtFormat; + TextBox txtOffset; + TextBox txtSize; + TextBox txtWriteOffset; + TextBox txtMediaTracks; + TextBox txtMediaSessions; + TextBox txtCopyProtection; + TextBox txtDiscType; + TextBox txtDiscSubtype; + CheckBox chkSequence; + Label lblDiscTitle; + TextBox txtDiscTitle; + Label lblSequence; + NumericUpDown spSequence; + Label lblTotalMedia; + NumericUpDown spTotalMedia; + Label lblSide; + NumericUpDown spSide; + Label lblLayer; + NumericUpDown spLayer; + CheckBox chkDimensions; + CheckBox chkRound; + StackLayout stkDiameter; + NumericUpDown spDiameter; + StackLayout stkHeight; + NumericUpDown spHeight; + StackLayout stkWidth; + NumericUpDown spWidth; + StackLayout stkThickness; + NumericUpDown spThickness; + CheckBox chkLayers; + StackLayout stkLayers; + EnumDropDown cmbLayerType; + GridView treeLayers; + NumericUpDown spNewLayer; + TextBox txtLayerSize; + GridView treeRingCodes; + NumericUpDown spRingCodeLayer; + TextBox txtRingCode; + GridView treeMasteringSIDs; + NumericUpDown spMasteringSIDLayer; + TextBox txtMasteringSID; + GridView treeToolstamps; + NumericUpDown spToolstampLayer; + TextBox txtToolstamp; + GridView treeMouldSIDs; + NumericUpDown spMouldSIDLayer; + TextBox txtMouldSID; + GridView treeMouldTexts; + NumericUpDown spMouldTextLayer; + TextBox txtMouldText; + GroupBox frmTOC; + GridView treeTOC; + GroupBox frmCDText; + GridView treeCDText; + GroupBox frmATIP; + GridView treeATIP; + GroupBox frmPMA; + GridView treePMA; + GroupBox frmLeadIns; + GridView treeLeadIn; + GroupBox frmLeadOuts; + GridView treeLeadOut; + GroupBox frmPFI; + GridView treePFI; + GroupBox frmDMI; + GridView treeDMI; + GroupBox frmCMI; + GridView treeCMI; + GroupBox frmBCA; + GridView treeBCA; + GroupBox frmDCB; + GridView treeDCB; + GroupBox frmPRI; + GridView treePRI; + GroupBox frmMediaID; + GridView treeMediaID; + GroupBox frmPFIR; + GridView treePFIR; + GroupBox frmLastRMD; + GridView treeLastRMD; + GroupBox frmADIP; + GridView treeADIP; + GroupBox frmDDS; + GridView treeDDS; + GroupBox frmSAI; + GridView treeSAI; + GroupBox frmDI; + GridView treeDI; + GroupBox frmPAC; + GridView treePAC; + TextBox txtPS3Key; + TextBox txtPS3Serial; + GridView treeTracks; + TextBox txtTrackStart; + TextBox txtTrackEnd; + TextBox txtMSFStart; + TextBox txtMSFEnd; + TextBox txtTrackSequence; + TextBox txtSessionSequence; + ComboBox cmbTrackType; + TextBox txtBytesPerSector; + TextBox txtAcoustID; + GridView treePartitions; + Button btnCancelPartition; + Button btnRemovePartition; + Button btnEditPartition; + Button btnApplyPartition; + Button btnAddPartition; + NumericUpDown spPartitionSequence; + TextBox txtPartitionStart; + TextBox txtPartitionEnd; + TextBox txtPartitionType; + StackLayout stkPartitionFields1; + StackLayout stkPartitionFields2; + TextBox txtPartitionName; + TextBox txtPartitionDescription; + GroupBox frmFilesystems; + GridView treeFilesystems; + Button btnCancelTrack; + Button btnApplyTrack; + Button btnEditTrack; + CheckBox chkDumpHardware; + GridView treeDumpHardware; + Button btnCancelHardware; + Button btnRemoveHardware; + Button btnEditHardware; + Button btnApplyHardware; + Button btnAddHardware; + GroupBox frmHardware; + TextBox txtHWManufacturer; + TextBox txtHWModel; + TextBox txtHWRevision; + TextBox txtHWFirmware; + TextBox txtHWSerial; + GridView treeExtents; + NumericUpDown spExtentStart; + NumericUpDown spExtentEnd; + TextBox txtDumpName; + TextBox txtDumpVersion; + TextBox txtDumpOS; + GroupBox frmLayers; + GroupBox frmPartitions; + StackLayout stkTrackFields1; + StackLayout stkTrackFields2; + StackLayout stkTrackFields3; + #pragma warning restore 0649 + #endregion XAML UI elements + } +} \ No newline at end of file diff --git a/CICMMetadata/CICMMetadataEditor/LICENSE b/CICMMetadata/CICMMetadataEditor/LICENSE new file mode 100644 index 0000000..c702685 --- /dev/null +++ b/CICMMetadata/CICMMetadataEditor/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2017-2018, © Natalia Portillo + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the +following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the + following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of the [ORGANIZATION] nor the names of its contributors may be used to endorse or promote + products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/CICMMetadata/README.md b/CICMMetadata/README.md new file mode 100644 index 0000000..5db4819 --- /dev/null +++ b/CICMMetadata/README.md @@ -0,0 +1,23 @@ +Canary Islands Computer Museum +============================== +Digital Asset Metadata Sidecar +============================== + +This repository contains a XML Schema defining a digital asset metadata sidecar. +The idea of this sidecar is to accompany any kind of digital asset that may be archived in a computer museum. + +Also the repository contains autogenerated C#, VisualBasic.NET and Java code. + +The sidecar schema is under public domain as long as any change you made is compatible and upstreamed, +or you change the root element type from CICMMetadata to anything else. +Besides that, you can use it anywhere. + +If you want to give due credit, this schema is created by Natalia Portillo. + +The schema is set-oriented, that is, each sidecar file should accompany a single set, that can contain one or +more of the following elements (or newer ones): +* Magazines +* Books +* User manuals, user guides, installation guides, instruction manuals +* Optical discs (CD and successors) +* Advertisements \ No newline at end of file diff --git a/CICMMetadata/build.sh b/CICMMetadata/build.sh new file mode 100755 index 0000000..bd32004 --- /dev/null +++ b/CICMMetadata/build.sh @@ -0,0 +1,26 @@ +#!/bin/bash +xsd=`which xsd` +xjc=`which xjc` +if [ -x "$xsd" ] +then + mkdir -p dotnet + echo Building C# code... + xsd cicm.xsd /classes /language:CS > /dev/null + if [ -e "cicm.cs" ] + then + mv cicm.cs dotnet/ + fi + echo Building VB.NET code... + xsd cicm.xsd /classes /language:VB > /dev/null + if [ -e "cicm.vb" ] + then + mv cicm.vb dotnet/ + fi +fi + +if [ -x "$xjc" ] +then + mkdir -p java + echo Building Java code... + xjc -d java cicm.xsd > /dev/null +fi \ No newline at end of file diff --git a/CICMMetadata/cicm.xml b/CICMMetadata/cicm.xml new file mode 100644 index 0000000..0f110be --- /dev/null +++ b/CICMMetadata/cicm.xml @@ -0,0 +1,1773 @@ + + + string + + string + + string + + string + string + + string + + Donationware + + 2007-10-26 + + + + string + + + string + + string + + + + string + + + + + + + string + + + + string + + + string + + dmVycmFudHF1ZQ== + + string + + string + + 2008-11-15 + + 7 + + + + ypk + + + 7 + + string + + + string + + + string + + + + string + string + string + string + string + string + + + + string + string + string + + + + string + string + string + + + arw + + + + + + + + + string + + + + string + + + string + + ZmVyYW50 + + string + + string + string + + 2016-01-01 + + + + kru + + + 7 + + string + + string + + + string + + + + string + string + string + string + string + string + + + + string + string + string + + + + string + string + string + + + pon + + + + + + + + string + + + + + string + + + + + dgr + + + + + string + + + + + renesasrx + + + + + + string + + string + + + + + + + + cau + + 7 + + string + + + string + + + string + + + + string + string + string + string + string + string + + + + string + string + string + + + + string + string + string + + + mao + + + + + + + string + 11 + + + string + 7 + 7 + + 2 + + 1 + + + + + 11 + + + + string + + + string + + string + + string + + string + + string + + string + + string + string + string + + 3 + + 7 + 7 + + string + + + 1.051732E7 + + 1.051732E7 + + 1.051732E7 + 1.051732E7 + + + + compacplus + + + + frontfull + + string + + + string + + + + string + string + string + string + string + string + + + + string + string + string + + + + string + string + string + + + geo + + + + + + + right + + string + + + string + + + + string + string + string + string + string + string + + + + string + string + string + + + + string + string + string + + + sme + + + + + + + + + + + boxback + + string + + + string + + + + string + string + string + string + string + string + + + + string + string + string + + + + string + string + string + + + afr + + + + + + + down + + string + + + string + + + + string + string + string + string + string + string + + + + string + string + string + + + + string + string + string + + + jpr + + + + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + + string + 11 + + + string + + + + string + 11 + + + string + + + + + 7 + 7 + + string + 11 + + + string + + + + + + + string + string + + + string + + + string + 11 + + 7 + 7 + + + string + + string + 11 + 11 + + + + 3 + + + + true + true + true + false + + + string + dvd + 7 + + string + + + string + + + + string + 11 + + + string + + + + + + + 7 + + string + + string + 11 + 11 + + string + + + + string + + 2007-09-09T03:38:42 + + 2001-07-25T22:15:31 + + 2002-05-25T15:08:08 + 7 + 11 + + 11 + false + + string + + string + + 11 + false + + 2019-05-04T04:54:29 + + 2010-04-24T16:59:19+01:00 + + string + + string + + string + + string + + string + + + + + + + string + + + + + + + string + + + + + + + + + + + string + + + + + + + string + + + + + + + + + + + + + + + + + + string + string + string + string + string + + + + 11 + 11 + + + + string + string + string + + + + + + + string + string + string + 11 + + 11 + 1.051732E7 + + 1.5E2 + + + string + + + + + + + eng + + + + + + + + sit + + + + + + + + yid + + + + + + string + + string + PAL-K + 2015-12-11T05:11:19 + + + string + string + string + + + + 1.051732E7 + 1.051732E7 + + + + + + string + 11 + + + string + + + + + string + + + string + + string + string + + 7 + + 7 + + 7 + + string + + string + string + + string + + + + 1.051732E7 + + 1.051732E7 + + 1.051732E7 + 1.051732E7 + + + + + + boxspine + + string + + + string + + + + string + string + string + string + string + string + + + + string + string + string + + + + string + string + string + + + nso + + + + + + + back + + string + + + string + + + + string + string + string + string + string + string + + + + string + string + string + + + + string + string + string + + + ale + + + + + + + + + + string + string + string + string + string + + + + 11 + 11 + + + + string + string + string + + + + + + + string + 11 + + + string + + + + string + + 5 + + 5 + + string + + string + + string + + + string + + + + 5 + 5 + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + + + string + + string + string + + 7 + + 7 + + 7 + + string + + string + string + + string + + + + 1.051732E7 + + 1.051732E7 + + 1.051732E7 + 1.051732E7 + + + + + + frontfull + + string + + + string + + + + string + string + string + string + string + string + + + + string + string + string + + + + string + string + string + + + srp + + + + + + + right + + string + + + string + + + + string + string + string + string + string + string + + + + string + string + string + + + + string + string + string + + + lub + + + + + + + + + + string + string + string + string + string + + + + 11 + 11 + + + + string + string + string + + + + + + + string + 11 + + + string + + + + string + + 5 + + 5 + + string + + string + + string + + + string + + + + + string + 11 + + + string + + + + string + + + + string + 7 + 7 + + 2 + + 1 + + + string + + string + + string + + string + + string + + string + + string + 7 + 7 + 11 + + + + 7 + + + + + + string + 11 + 11 + 11 + 11 + + + string + + + + string + 11 + 11 + 11 + 11 + 11 + + + string + + + + + + + + + inner + + string + + + string + + + + string + string + string + string + string + string + + + + string + string + string + + + + string + string + string + + + wol + + + + + + + front + + string + + + string + + + + string + string + string + string + string + string + + + + string + string + string + + + + string + string + string + + + chy + + + + + + + + + string + 11 + + + string + + + + + + 5 + 5 + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + + + string + + string + string + + 7 + + 7 + + 7 + + string + + string + string + + string + + + + 1.051732E7 + + 1.051732E7 + + 1.051732E7 + 1.051732E7 + + + + + + external + + string + + + string + + + + string + string + string + string + string + string + + + + string + string + string + + + + string + string + string + + + fre + + + + + + + right + + string + + + string + + + + string + string + string + string + string + string + + + + string + string + string + + + + string + string + string + + + swa + + + + + + + + + + string + string + string + string + string + + + + 11 + 11 + + + + string + string + string + + + + + + + string + 11 + + + string + + + + string + + 5 + + 5 + + string + + string + + string + + + string + + + + + + string + 11 + + + string + + + + string + + 5 + + 5 + + string + + string + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + string + 11 + + + string + + + + + + 5 + 5 + + + string + 11 + + + string + + + + + + string + 11 + + + string + + + + + + + + + + + + 1.051732E7 + + + + string + string + + + \ No newline at end of file diff --git a/CICMMetadata/cicm.xsd b/CICMMetadata/cicm.xsd new file mode 100644 index 0000000..2fb36d7 --- /dev/null +++ b/CICMMetadata/cicm.xsd @@ -0,0 +1,3419 @@ + + + + + + + + File containing the scan + + + + + Checksum of scan file pointed above + + + + + Information about scanning + + + + + Information about any scan processing done + + + + + Information about OCR + + + + + + + + + Original case type: jewel, bigjewel, dvdcase, etc + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + File containing track dump, and format, binary, yranib, or audio/video container + + + + + + + + + + + + CPU architectures this set is intended to be run on + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Starting sector + + + + + Ending sector + + + + + + + + + File containing border dump + + + + + Size of border dump + + + + + Checksums of border dump + + + + + + + + + + + + + + Track information + + + + + File containing track dump, and format, binary, yranib, or audio/video container + + + + + + Size of track dump in bytes + + + + + Track sequence information + + + + + Track start address in MM:SS:FF + + + + + Track end address in MM:SS:FF + + + + + Track start sector + + + + + Track end sector + + + + + Track indexes + + + + + Track indexes + + + + + ISRC + + + + + Track type: audio, mode0, mode1, mode2 + + + + + + + + + + + + + + + + + + + Bytes per sector: 2048, 2352, 2448, etc, etc (as stored in image, not in physical + format) + + + + + + AccoustID for audio tracks + + + + + Checksums of track dump + + + + + Track's subchannel information + + + + + Information about filesystems and partitions contained in that track + + + + + + + + + + Barcodes for this magazine + + + + + Cover of this magazine + + + + + Name of this magazine + + + + + Editorial of this magazine + + + + + Publication date of this magazine + + + + + Sequential number of this magazine + + + + + Languages this magazine is written in + + + + + Pages of this magazine, including cover and back + + + + + Page size of this magazine, standard or in WxH milimeters + + + + + Scan of this magazine + + + + + + + Information about a filesystem + + + + + Filesystem type + + + + + Filesystem creation date + + + + + Filesystem last modification date + + + + + Filesystem last backup date + + + + + Bytes per cluster + + + + + Clusters in filesystem + + + + + Files in filesystem + + + + + Bootable filesystem? + + + + + Filesystem serial number + + + + + Filesystem volume name + + + + + Free clusters in filesystem + + + + + Dirty/unclean filesystem + + + + + Filesystem expiration date + + + + + Filesystem effective date + + + + + System identifier filesystem applies to + + + + + Volume set identifier + + + + + Filesystem publisher identifier + + + + + Filesystem data preparer + + + + + Filesystem application preparer + + + + + Contents of filesystem + + + + + + + + + Scanned element: cover, back, inlay, etc + + + + + + + + + + + + + + + + + + Scanning information + + + + + + + + + Array of dumped extents + + + + + + + + + Drive manufacturer + + + + + Drive model + + + + + Drive revision + + + + + Drive firmware version + + + + + Drive serial number + + + + + Extents of sectors read with this drive + + + + + Software used to read with this drive + + + + + + + File + + + + + + + + + + + + Cover file + + + + + Cover file checksum + + + + + Base64 of JPEG thumbnail + + + + + + + + + Image file, or image description file, plus format (cue, toc, etc, etc) + + + + + + Image file size + + + + + Sequence information about this disc + + + + + Layering type and sizes + + + + + Checksum of image file pointed above + + + + + Manufacturer part no. or SKU + + + + + Manufacturer serial no., not to be confused with software registration serial + number + + + + + + Disc/side ring code + + + + + Disc/side mastering SID + + + + + Disc/side toolstamp + + + + + Disc/side mould SID + + + + + Disc/side mould text + + + + + Disc type (CD, GD, SACD, DDCD, DVD, HDDVD, BD) + + + + + Disc subtype (CD-ROM, CD-DA, CD+G, etc) + + + + + Offset between subchannel servo and data sectors servo, in bytes + + + + + + Tracks on this disc/side + + + + + Sessions on this disc/side + + + + + Copy protection, if applicable + + + + + Dimensions of the disc + + + + + Case where the disk came from factory + + + + + Disc scans + + + + + Physical Manufacturing Information (DVD and HD DVD) + + + + + Disc Manufacturing Information + + + + + Lead-In Copyright Management Information + + + + + Burst Cutting Area + + + + + Absolute Time In Pre-groove + + + + + ADdress In Pre-groove + + + + + PMA + + + + + Disc Definition Structure + + + + + Spare Area Information + + + + + Last RMD + + + + + Pre-Recorded Information + + + + + Media Identification + + + + + PFI for recordables + + + + + Disc Control Blocks + + + + + Disc Information + + + + + PAC + + + + + CD TOC + + + + + CD-Text in Lead-In + + + + + Data between first Lead-In/Border-In and first data track + + + + + Lead-In, Border-In, or equivalent + + + + + Lead-Out, Border-Out, or equivalent + + + + + XGD information + + + + + PS3 Encryption Key + + + + + Media catalogue number or MCN + + + + + Array of disc tracks + + + + + Array of drives used to dump disc + + + + + + + Software used for disc reading + + + + + Software name + + + + + Software version + + + + + Operating system name and version where the software was run + + + + + + + + + Partition sequence number, starting on 1 + + + + + + + + + + Partition name if supported by partition scheme + + + + + Partition type + + + + + Partition starting sector + + + + + Partition ending sector + + + + + Partition description if supported by partition scheme + + + + + Array of filesystems contained in the partition + + + + + + + Array of drives information + + + + + Drives information + + + + + + + + + + + + + + + + + + + + + + PS3 encryption key + + + + + PS3 encryption key + + + + + + + + + XGD unlocked PFI + + + + + XGD unlocked DMI + + + + + XGD security sectors + + + + + + + + + Xbox SS Request Version + + + + + Xbox SS Request Number + + + + + XGD Security Sectors + + + + + + + Dimensions of media + + + + + Diameter in milimeters for circular discs + + + + + Height in milimeters for non-circular disks + + + + + Width in milimeters for non-circular disks + + + + + Thickness in milimeters for non-circular disks + + + + + + + Information about scanning + + + + + Who scanned it? + + + + + Who built the scanner + + + + + Scanner model + + + + + Scanner serial number + + + + + Software used for scanning + + + + + Software version + + + + + + + + + Keywords + + + + + + + + + Operating systems this set is intended to be run on + + + + + + + Sequence information about a disc + + + + + + Sequence information about this media + + + + + Media title as printed in label + + + + + Total number of discs in this set + + + + + + + + + + Side of disc described by this field + + + + + + + + + + + On PTP layering, layer of disc described by this field, starting on 0 + + + + + + + + + + + + + + Sequence information about a track + + + + + + Track number + + + + + Session this track belongs to + + + + + + + + + + + + + + Barcodes from this book + + + + + Book cover + + + + + Book name + + + + + Book publisher + + + + + Book author + + + + + Book's publication date + + + + + Book language + + + + + Book pages + + + + + Magazine page size in WxH milimeters + + + + + Scan of the book + + + + + + + + + Partition + + + + + + + + + Layering type and sizes + + + + + + + + + + + + + + + Information about dumped structure + + + + + + File containing dump + + + + + Size of dump + + + + + Checksums of dump + + + + + + + + + Array of filesystems + + + + + + + + + Minimal supported operating system + + + + + + + + Digital Asset Metadata + + + + + Developer of the set + + + + + Publisher of the set + + + + + Author/writer of the set + + + + + Performer/narrator of the set + + + + + Name of the set + + + + + Version of the set if applicable + + + + + Kind of release: OEM, Bundle, Coverdisc, Retail, Demo + + + + + + + + + + + + + + + + + + + + + Date of release in YYYY-MM-DD + + + + + Barcodes for this release + + + + + Manufacturer part no. or SKU + + + + + Manufacturer serial no., not to be confused with software registration serial + number + + + + + + Keywords + + + + + Magazine on this set + + + + + Books on this set + + + + + Categories this set belongs to + + + + + Subcategories this set belongs to + + + + + Languages this set comes in + + + + + Systems this set is designed to run on, if it includes software + + + + + CPU architectures this set is designed to run on, if it includes software + + + + + + Required operating systems and versions this set runs on, if it includes + software + + + + + + User manual/guide, installation manual/guide and any applicable entity + + + + + + Optical discs this set contains + + + + + Advertisement + + + + + Linear media (flash, ram, rom, cartridges) + + + + + Dump of a PCI/PCI-X/PCIe configuration space and/or expansion ROM + + + + + + Dump of media that is block constructed (floppy, hard drive) or abstracted (most + memory cards, flash drives, SSDs) + + + + + + Dump of media that is stored as audio, like C64/Speccy/CPC cassettes. + + + + + + + + Barcodes for this release + + + + + + + + Information about any scan processing done + + + + + + Who processed it? + + + + + Software used for processing + + + + + Software version + + + + + + + + + + + + + + + + Category of the set + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Scanned element: up, down, label, data, etc + + + + + + + + + + + + + + + Scan of disk part + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Subcategory of the set + + + + + + + User manual or user guide accompanying this set. Can be more than one. + + + + + + Language of the user manual + + + + + Pages of the user manual + + + + + Paper size in standard name or in WxH milimeters + + + + + User manual scanning + + + + + + + Checksum of file element + + + + + + + + Start and end of XGD's security sectors + + + + + + Start of XGD's security sectors + + + + + End of XGD's security sectors + + + + + + + + + Who did the OCR + + + + + Using what software + + + + + And the software version + + + + + OCR applied for which languages + + + + + + + + + Languages included in the set, ISO 3-letter code + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Track's subchannel information + + + + + File containing track's subchannel dump and format, packed, rw_raw + + + + + + Size of subchannel dump + + + + + Checksum of subchannel dump + + + + + + + + + Case scans + + + + + Disc scans + + + + + + + + + Track languages + + + + + + Track number in media container + + + + + + + + + + Track's AccoustID + + + + + Track's codec + + + + + Audio channels + + + + + Audio sampling rate + + + + + Mean bitrate, or constant bitrate, in bits per second + + + + + + + + + Track languages + + + + + + Track number in media container + + + + + + + + + + Track's codec + + + + + Horizontal resolution in pixels + + + + + Vertical resolution in pixels + + + + + Mean bitrate, or constant bitrate, in bits per second + + + + + + Is this video track in 3D? + + + + + + + + Track languages + + + + + + Track number in media container + + + + + + + + + + Track's codec + + + + + + + + Approximate latitude of recording + + + + + Approximate longitude of recording + + + + + + + + + Name of the television channel this recording was broadcasted, if applicable + + + + + + Platform that broadcasted the television channel, if applicable + + + + + Format of the source of this recording + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Date and time of broadcast + + + + + Software used to capture, process, convert, the recording + + + + + Approximate coordinates where the recording was done + + + + + + + + + Manufactured of the advertised product + + + + + Advertised product + + + + + File containing advertising + + + + + Size of file + + + + + Total video frames + + + + + Duration in seconds + + + + + Mean framerate + + + + + Checksums of advertisement + + + + + Audio tracks of advertisement + + + + + Video tracks of advertisement + + + + + Subtitle tracks of advertisement + + + + + If advertisement has been capture from a television/radio broadcast, here is the + capture information + + + + + + + + Describes a dump of a linear media, that is, a media that is read byte-by-byte like for + example, a ROM chip, a game cartridge, a PCMCIA SRAM card, etc... + + + + + + Image file, or image description file, plus format (cue, toc, etc, etc) + + + + + + Image file size + + + + + Checksums of image file + + + + + If image file contains several deinterleaved dumps, here are the checkums of the + interleaved dump + + + + + + Manufacturer part no. or SKU + + + + + Manufacturer serial no., not to be confused with software registration serial + number + + + + + + Title as it is labeled on media + + + + + Sequence of media + + + + + How many bytes must be read in image file for each byte in media + + + + + + How many bytes must be skipped in image file for each byte in media + + + + + + Media manufacturer + + + + + Media model + + + + + Media packaging (DIP, PCMCIA, Cartridge, etc) + + + + + Media interface + + + + + Dimensions of media + + + + + Scan of media + + + + + Array of hardware used to dump media + + + + + Present if media is a PCMCIA Linear Flash or SRAM card, to contain PCMCIA specific + information + + + + + + Copy protection, if applicable + + + + + + + Contains PCMCIA card information + + + + + Contains the PCMCIA Card Information Structure dump. + + + + + Contains the PCMCIA version standard compliance + + + + + Contains the PCMCIA manufacturer ID + + + + + Contains the PCMCIA card ID + + + + + Contains the PCMCIA manufacturer string + + + + + Contains the PCMCIA product name string + + + + + Contains additional PCMCIA information strings + + + + + + + Contains PCI/PCI-X/PCIe card information + + + + + Contains PCI Vendor ID + + + + + + + + + + + Contains PCI Device ID + + + + + + + + + + + Binary dump of the PCI configuration space + + + + + Binary dump of the PCI expansion rom + + + + + + + + + File containing SCSI Extended Vendor Page Descriptor dump + + + + + Size of SCSI Extended Vendor Page Descriptor dump + + + + + Checksums of SCSI Extended Vendor Page Descriptor dump + + + + + + EVPD page + + + + + + + + + + + + Contains SCSI device information + + + + + Contains SCSI INQUIRY result dump + + + + + Contains SCSI EVPD dumps + + + + + Contains SCSI MODE SENSE(6) dump + + + + + Contains SCSI MODE SENSE(10) dump + + + + + Contains SCSI LOG SENSE dump + + + + + + + Contains USB device information + + + + + Contains USB Vendor ID + + + + + + + + + + + Contains USB Product ID + + + + + + + + + + + Binary dump of the USB descriptors + + + + + + + Contains SecureDigital device information + + + + + Contains SD Card Identification Data + + + + + Contains SD Card Status Data + + + + + Contains SD Card Register + + + + + Contains SD Operation Conditions Register + + + + + + + Contains MultiMediaCard device information + + + + + Contains MultiMediaCard Card Identification Data + + + + + Contains MultiMediaCard Card Status Data + + + + + Contains MultiMediaCard extended CSD + + + + + Contains MultiMediaCard Operation Conditions Register + + + + + + + Contains ATA/ATAPI device information + + + + + Contains ATA/ATAPI IDENTIFY binary dump + + + + + + + Information about track in non-abstracted block based media + + + + + File containing track dump, and format + + + + + Size of track dump in bytes + + + + + Head (from 0) where this track resides + + + + + Cylinder where this track resides + + + + + Track start sector + + + + + Track end sector + + + + + Sectors in track. Not necessarily EndSector-StartSector, as there can be hidden + sectors + + + + + + Bytes per sector, physical undecoded tag-less + + + + + Checksums of track dump + + + + + Track format (IBM FM, IBM MFM, Amiga MFM, Apple GCR, etc) + + + + + + + Describes a dump of a block (sector) layered media + + + + + Image file, or image description file, plus format (cue, toc, etc, etc) + + + + + + Image file size + + + + + Checksums of image file + + + + + Checksums of media + + + + + Media sequence information + + + + + Media manufacturer (for fixed AND removable media) + + + + + Media model (for fixed AND removable media) + + + + + Media serial number (for fixed and, if applicable, removable media) + + + + + + Media firmware version, for fixed media only + + + + + Media physical interface, for fixed media only + + + + + Manufacturer part no. or SKU + + + + + Manufacturer serial no., not to be confused with software registration serial + number + + + + + + Physical block size in bytes + + + + + Logical block size in bytes + + + + + User accessible logical blocks + + + + + List size for variable blocks + + + + + Presents information specific about a digital tape + + + + + Media scans + + + + + If media responds to native ATA/ATAPI commands, information here + + + + + + If media is PCI/PCI-X/PCIe attached, information here + + + + + If media is PCMCIA attached, information here + + + + + If media is SecureDigital, information here + + + + + If media is MultiMediaCard, information here + + + + + If media conforms to SCSI specifications, information here + + + + + If media is USB attached, information here + + + + + Medium Auxiliary Memory + + + + + Real physical heads + + + + + Real physical cylinders + + + + + Sectors per track, if constant, if not, this field is ommited and separate tracks + must be indicated + + + + + + Tracks for block media that allow separate cylinder/head addressing, like + floppies. It can be ommitted for media that strictly follows a standard (no copy protection + either). + + + + + + Copy protection, if applicable + + + + + Dimensions of the media + + + + + Information about filesystems and partitions contained in this media + + + + + + Array of hardware used to dump media, if removable + + + + + Disk type (Floppy, Twiggy, Hard Disk) + + + + + Disk subtype + + + + + + + Information about "blocks" in audio based media + + + + + File containing block dump, and format + + + + + Size of block dump in bytes + + + + + AccoustID of block + + + + + Checksums of block dump + + + + + Block format/encoding + + + + + + + Describes a dump of a media that is stored in an audio device (like a ZX Spectrum + cassette) + + + + + + Image file, or image description file, plus format (cue, toc, etc, etc) + + + + + + Image file size + + + + + Checksums of image file + + + + + Media sequence information + + + + + Manufacturer part no. or SKU + + + + + Manufacturer serial no., not to be confused with software registration serial + number + + + + + + Media manufacturer (if known) + + + + + Media model (if known) + + + + + AccoustID of media in audio form + + + + + Blocks on audio media that uses separate blocks + + + + + Copy protection, if applicable + + + + + Dimensions of the media + + + + + Scan of media + + + + + Array of hardware used to dump media, if removable + + + + + + + + + + + + + + + + + + + + + + + + Partition information + + + + + File containing partition dump, and format, binary, yranib, or audio/video + container + + + + + + Size of partition dump in bytes + + + + + Partition sequence + + + + + Partition start block + + + + + Partition end block + + + + + Checksums of track dump + + + + + + + + + + Tape file information + + + + + File containing file dump, and format, binary, yranib, or audio/video container + + + + + + Size of file in bytes + + + + + File sequence + + + + + Size of blocks in this file + + + + + File start block + + + + + File end block + + + + + Checksums of track dump + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CICMMetadata/dotnet/cicm.cs b/CICMMetadata/dotnet/cicm.cs new file mode 100644 index 0000000..10dd7db --- /dev/null +++ b/CICMMetadata/dotnet/cicm.cs @@ -0,0 +1,9090 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// +//This source code was auto-generated by MonoXSD +// +namespace Schemas { + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlRootAttribute("CICMMetadata", Namespace="", IsNullable=false)] + public partial class CICMMetadataType { + + private string[] developerField; + + private string[] publisherField; + + private string[] authorField; + + private string[] performerField; + + private string nameField; + + private string versionField; + + private CICMMetadataTypeReleaseType releaseTypeField; + + private bool releaseTypeFieldSpecified; + + private System.DateTime releaseDateField; + + private bool releaseDateFieldSpecified; + + private BarcodeType[] barcodesField; + + private string partNumberField; + + private string serialNumberField; + + private string[] keywordsField; + + private MagazineType[] magazineField; + + private BookType[] bookField; + + private string[] categoriesField; + + private string[] subcategoriesField; + + private LanguagesTypeLanguage[] languagesField; + + private string[] systemsField; + + private ArchitecturesTypeArchitecture[] architecturesField; + + private RequiredOperatingSystemType[] requiredOperatingSystemsField; + + private UserManualType[] userManualField; + + private OpticalDiscType[] opticalDiscField; + + private AdvertisementType[] advertisementField; + + private LinearMediaType[] linearMediaField; + + private PCIType[] pCICardField; + + private BlockMediaType[] blockMediaField; + + private AudioMediaType[] audioMediaField; + + /// + [System.Xml.Serialization.XmlElementAttribute("Developer")] + public string[] Developer { + get { + return this.developerField; + } + set { + this.developerField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("Publisher")] + public string[] Publisher { + get { + return this.publisherField; + } + set { + this.publisherField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("Author")] + public string[] Author { + get { + return this.authorField; + } + set { + this.authorField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("Performer")] + public string[] Performer { + get { + return this.performerField; + } + set { + this.performerField = value; + } + } + + /// + public string Name { + get { + return this.nameField; + } + set { + this.nameField = value; + } + } + + /// + public string Version { + get { + return this.versionField; + } + set { + this.versionField = value; + } + } + + /// + public CICMMetadataTypeReleaseType ReleaseType { + get { + return this.releaseTypeField; + } + set { + this.releaseTypeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ReleaseTypeSpecified { + get { + return this.releaseTypeFieldSpecified; + } + set { + this.releaseTypeFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(DataType="date")] + public System.DateTime ReleaseDate { + get { + return this.releaseDateField; + } + set { + this.releaseDateField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ReleaseDateSpecified { + get { + return this.releaseDateFieldSpecified; + } + set { + this.releaseDateFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Barcode", IsNullable=false)] + public BarcodeType[] Barcodes { + get { + return this.barcodesField; + } + set { + this.barcodesField = value; + } + } + + /// + public string PartNumber { + get { + return this.partNumberField; + } + set { + this.partNumberField = value; + } + } + + /// + public string SerialNumber { + get { + return this.serialNumberField; + } + set { + this.serialNumberField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Keyword", IsNullable=false)] + public string[] Keywords { + get { + return this.keywordsField; + } + set { + this.keywordsField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("Magazine")] + public MagazineType[] Magazine { + get { + return this.magazineField; + } + set { + this.magazineField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("Book")] + public BookType[] Book { + get { + return this.bookField; + } + set { + this.bookField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Category", IsNullable=false)] + public string[] Categories { + get { + return this.categoriesField; + } + set { + this.categoriesField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Subcategory", IsNullable=false)] + public string[] Subcategories { + get { + return this.subcategoriesField; + } + set { + this.subcategoriesField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Language", IsNullable=false)] + public LanguagesTypeLanguage[] Languages { + get { + return this.languagesField; + } + set { + this.languagesField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("System", IsNullable=false)] + public string[] Systems { + get { + return this.systemsField; + } + set { + this.systemsField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Architecture", IsNullable=false)] + public ArchitecturesTypeArchitecture[] Architectures { + get { + return this.architecturesField; + } + set { + this.architecturesField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("RequiredOperatingSystem", IsNullable=false)] + public RequiredOperatingSystemType[] RequiredOperatingSystems { + get { + return this.requiredOperatingSystemsField; + } + set { + this.requiredOperatingSystemsField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("UserManual")] + public UserManualType[] UserManual { + get { + return this.userManualField; + } + set { + this.userManualField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("OpticalDisc")] + public OpticalDiscType[] OpticalDisc { + get { + return this.opticalDiscField; + } + set { + this.opticalDiscField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("Advertisement")] + public AdvertisementType[] Advertisement { + get { + return this.advertisementField; + } + set { + this.advertisementField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("LinearMedia")] + public LinearMediaType[] LinearMedia { + get { + return this.linearMediaField; + } + set { + this.linearMediaField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("PCICard")] + public PCIType[] PCICard { + get { + return this.pCICardField; + } + set { + this.pCICardField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("BlockMedia")] + public BlockMediaType[] BlockMedia { + get { + return this.blockMediaField; + } + set { + this.blockMediaField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("AudioMedia")] + public AudioMediaType[] AudioMedia { + get { + return this.audioMediaField; + } + set { + this.audioMediaField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum CICMMetadataTypeReleaseType { + + /// + Retail, + + /// + Bundle, + + /// + Coverdisc, + + /// + Subscription, + + /// + Demo, + + /// + OEM, + + /// + Shareware, + + /// + FOSS, + + /// + Adware, + + /// + Donationware, + + /// + [System.Xml.Serialization.XmlEnumAttribute("Digital download")] + Digitaldownload, + + /// + SaaS, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class BarcodeType { + + private BarcodeTypeType typeField; + + private string valueField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public BarcodeTypeType type { + get { + return this.typeField; + } + set { + this.typeField = value; + } + } + + /// + [System.Xml.Serialization.XmlTextAttribute()] + public string Value { + get { + return this.valueField; + } + set { + this.valueField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum BarcodeTypeType { + + /// + aztec, + + /// + codabar, + + /// + code11, + + /// + code128, + + /// + code39, + + /// + code93, + + /// + cpcbinary, + + /// + ezcode, + + /// + fim, + + /// + itf, + + /// + itf14, + + /// + ean13, + + /// + ean8, + + /// + maxicode, + + /// + isbn, + + /// + isrc, + + /// + msi, + + /// + tof, + + /// + shotcode, + + /// + rm4scc, + + /// + qr, + + /// + ean5, + + /// + ean2, + + /// + [System.Xml.Serialization.XmlEnumAttribute("qr")] + qr1, + + /// + postnet, + + /// + postbar, + + /// + plessey, + + /// + pharmacode, + + /// + pdf417, + + /// + patchcode, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AudioBlockType { + + private ImageType imageField; + + private ulong sizeField; + + private string accoustIDField; + + private ChecksumType[] checksumsField; + + private string formatField; + + /// + public ImageType Image { + get { + return this.imageField; + } + set { + this.imageField = value; + } + } + + /// + public ulong Size { + get { + return this.sizeField; + } + set { + this.sizeField = value; + } + } + + /// + public string AccoustID { + get { + return this.accoustIDField; + } + set { + this.accoustIDField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] Checksums { + get { + return this.checksumsField; + } + set { + this.checksumsField = value; + } + } + + /// + public string Format { + get { + return this.formatField; + } + set { + this.formatField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ImageType { + + private string formatField; + + private ulong offsetField; + + private bool offsetFieldSpecified; + + private string valueField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string format { + get { + return this.formatField; + } + set { + this.formatField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ulong offset { + get { + return this.offsetField; + } + set { + this.offsetField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool offsetSpecified { + get { + return this.offsetFieldSpecified; + } + set { + this.offsetFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlTextAttribute()] + public string Value { + get { + return this.valueField; + } + set { + this.valueField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ChecksumType { + + private ChecksumTypeType typeField; + + private string valueField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ChecksumTypeType type { + get { + return this.typeField; + } + set { + this.typeField = value; + } + } + + /// + [System.Xml.Serialization.XmlTextAttribute()] + public string Value { + get { + return this.valueField; + } + set { + this.valueField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum ChecksumTypeType { + + /// + fletcher16, + + /// + fletcher32, + + /// + adler32, + + /// + crc16, + + /// + crc16ccitt, + + /// + crc32, + + /// + crc64, + + /// + md4, + + /// + md5, + + /// + dm6, + + /// + ripemd128, + + /// + ripemd160, + + /// + ripemed320, + + /// + sha1, + + /// + sha224, + + /// + sha256, + + /// + sha384, + + /// + sha512, + + /// + sha3, + + /// + skein, + + /// + snefru, + + /// + blake256, + + /// + blake512, + + /// + tiger, + + /// + whirlpool, + + /// + spamsum, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AudioMediaType { + + private ImageType imageField; + + private ulong sizeField; + + private ChecksumType[] checksumsField; + + private SequenceType sequenceField; + + private string partNumberField; + + private string serialNumberField; + + private string manufacturerField; + + private string modelField; + + private string accoustIDField; + + private AudioBlockType[] blockField; + + private string copyProtectionField; + + private DimensionsType dimensionsField; + + private ScansType scansField; + + private DumpHardwareType[] dumpHardwareArrayField; + + /// + public ImageType Image { + get { + return this.imageField; + } + set { + this.imageField = value; + } + } + + /// + public ulong Size { + get { + return this.sizeField; + } + set { + this.sizeField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] Checksums { + get { + return this.checksumsField; + } + set { + this.checksumsField = value; + } + } + + /// + public SequenceType Sequence { + get { + return this.sequenceField; + } + set { + this.sequenceField = value; + } + } + + /// + public string PartNumber { + get { + return this.partNumberField; + } + set { + this.partNumberField = value; + } + } + + /// + public string SerialNumber { + get { + return this.serialNumberField; + } + set { + this.serialNumberField = value; + } + } + + /// + public string Manufacturer { + get { + return this.manufacturerField; + } + set { + this.manufacturerField = value; + } + } + + /// + public string Model { + get { + return this.modelField; + } + set { + this.modelField = value; + } + } + + /// + public string AccoustID { + get { + return this.accoustIDField; + } + set { + this.accoustIDField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("Block")] + public AudioBlockType[] Block { + get { + return this.blockField; + } + set { + this.blockField = value; + } + } + + /// + public string CopyProtection { + get { + return this.copyProtectionField; + } + set { + this.copyProtectionField = value; + } + } + + /// + public DimensionsType Dimensions { + get { + return this.dimensionsField; + } + set { + this.dimensionsField = value; + } + } + + /// + public ScansType Scans { + get { + return this.scansField; + } + set { + this.scansField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("DumpHardware", IsNullable=false)] + public DumpHardwareType[] DumpHardwareArray { + get { + return this.dumpHardwareArrayField; + } + set { + this.dumpHardwareArrayField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SequenceType { + + private string mediaTitleField; + + private uint mediaSequenceField; + + private uint totalMediaField; + + private byte sideField; + + private bool sideFieldSpecified; + + private byte layerField; + + private bool layerFieldSpecified; + + /// + public string MediaTitle { + get { + return this.mediaTitleField; + } + set { + this.mediaTitleField = value; + } + } + + /// + public uint MediaSequence { + get { + return this.mediaSequenceField; + } + set { + this.mediaSequenceField = value; + } + } + + /// + public uint TotalMedia { + get { + return this.totalMediaField; + } + set { + this.totalMediaField = value; + } + } + + /// + public byte Side { + get { + return this.sideField; + } + set { + this.sideField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool SideSpecified { + get { + return this.sideFieldSpecified; + } + set { + this.sideFieldSpecified = value; + } + } + + /// + public byte Layer { + get { + return this.layerField; + } + set { + this.layerField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool LayerSpecified { + get { + return this.layerFieldSpecified; + } + set { + this.layerFieldSpecified = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DimensionsType { + + private double diameterField; + + private bool diameterFieldSpecified; + + private double heightField; + + private bool heightFieldSpecified; + + private double widthField; + + private bool widthFieldSpecified; + + private double thicknessField; + + /// + public double Diameter { + get { + return this.diameterField; + } + set { + this.diameterField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool DiameterSpecified { + get { + return this.diameterFieldSpecified; + } + set { + this.diameterFieldSpecified = value; + } + } + + /// + public double Height { + get { + return this.heightField; + } + set { + this.heightField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool HeightSpecified { + get { + return this.heightFieldSpecified; + } + set { + this.heightFieldSpecified = value; + } + } + + /// + public double Width { + get { + return this.widthField; + } + set { + this.widthField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool WidthSpecified { + get { + return this.widthFieldSpecified; + } + set { + this.widthFieldSpecified = value; + } + } + + /// + public double Thickness { + get { + return this.thicknessField; + } + set { + this.thicknessField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ScansType { + + private CaseScanType caseScanField; + + private MediaScanType scanField; + + /// + public CaseScanType CaseScan { + get { + return this.caseScanField; + } + set { + this.caseScanField = value; + } + } + + /// + public MediaScanType Scan { + get { + return this.scanField; + } + set { + this.scanField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CaseScanType { + + private CaseScanTypeCaseScanElement caseScanElementField; + + private ScanType scanField; + + /// + public CaseScanTypeCaseScanElement CaseScanElement { + get { + return this.caseScanElementField; + } + set { + this.caseScanElementField = value; + } + } + + /// + public ScanType Scan { + get { + return this.scanField; + } + set { + this.scanField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum CaseScanTypeCaseScanElement { + + /// + sleeve, + + /// + inner, + + /// + inlay, + + /// + frontback, + + /// + frontfull, + + /// + boxfront, + + /// + boxback, + + /// + boxspine, + + /// + external, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ScanType { + + private FileType fileField; + + private ChecksumType[] checksumsField; + + private ScannerType[] scannerField; + + private ScanProcessingType[] scanProcessingField; + + private OCRType[] oCRField; + + /// + public FileType File { + get { + return this.fileField; + } + set { + this.fileField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] Checksums { + get { + return this.checksumsField; + } + set { + this.checksumsField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("Scanner")] + public ScannerType[] Scanner { + get { + return this.scannerField; + } + set { + this.scannerField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("ScanProcessing")] + public ScanProcessingType[] ScanProcessing { + get { + return this.scanProcessingField; + } + set { + this.scanProcessingField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("OCR")] + public OCRType[] OCR { + get { + return this.oCRField; + } + set { + this.oCRField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class FileType { + + private string formatField; + + private string valueField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string format { + get { + return this.formatField; + } + set { + this.formatField = value; + } + } + + /// + [System.Xml.Serialization.XmlTextAttribute()] + public string Value { + get { + return this.valueField; + } + set { + this.valueField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ScannerType { + + private string authorField; + + private string manufacturerField; + + private string modelField; + + private string serialField; + + private string softwareField; + + private string softwareVersionField; + + /// + public string Author { + get { + return this.authorField; + } + set { + this.authorField = value; + } + } + + /// + public string Manufacturer { + get { + return this.manufacturerField; + } + set { + this.manufacturerField = value; + } + } + + /// + public string Model { + get { + return this.modelField; + } + set { + this.modelField = value; + } + } + + /// + public string Serial { + get { + return this.serialField; + } + set { + this.serialField = value; + } + } + + /// + public string Software { + get { + return this.softwareField; + } + set { + this.softwareField = value; + } + } + + /// + public string SoftwareVersion { + get { + return this.softwareVersionField; + } + set { + this.softwareVersionField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ScanProcessingType { + + private string authorField; + + private string softwareField; + + private string softwareVersionField; + + /// + public string Author { + get { + return this.authorField; + } + set { + this.authorField = value; + } + } + + /// + public string Software { + get { + return this.softwareField; + } + set { + this.softwareField = value; + } + } + + /// + public string SoftwareVersion { + get { + return this.softwareVersionField; + } + set { + this.softwareVersionField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class OCRType { + + private string authorField; + + private string softwareField; + + private string softwareVersionField; + + private LanguagesTypeLanguage[] languageField; + + /// + public string Author { + get { + return this.authorField; + } + set { + this.authorField = value; + } + } + + /// + public string Software { + get { + return this.softwareField; + } + set { + this.softwareField = value; + } + } + + /// + public string SoftwareVersion { + get { + return this.softwareVersionField; + } + set { + this.softwareVersionField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Language", IsNullable=false)] + public LanguagesTypeLanguage[] Language { + get { + return this.languageField; + } + set { + this.languageField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum LanguagesTypeLanguage { + + /// + aar, + + /// + abk, + + /// + ace, + + /// + ach, + + /// + ada, + + /// + ady, + + /// + afa, + + /// + afh, + + /// + afr, + + /// + ain, + + /// + aka, + + /// + akk, + + /// + alb, + + /// + ale, + + /// + alg, + + /// + alt, + + /// + amh, + + /// + ang, + + /// + anp, + + /// + apa, + + /// + ara, + + /// + arc, + + /// + arg, + + /// + arm, + + /// + arn, + + /// + arp, + + /// + art, + + /// + arw, + + /// + asm, + + /// + ast, + + /// + ath, + + /// + aus, + + /// + ava, + + /// + ave, + + /// + awa, + + /// + aym, + + /// + aze, + + /// + bad, + + /// + bai, + + /// + bak, + + /// + bal, + + /// + bam, + + /// + ban, + + /// + baq, + + /// + bas, + + /// + bat, + + /// + bej, + + /// + bel, + + /// + bem, + + /// + ben, + + /// + ber, + + /// + bho, + + /// + bih, + + /// + bik, + + /// + bin, + + /// + bis, + + /// + bla, + + /// + bnt, + + /// + bos, + + /// + bra, + + /// + bre, + + /// + btk, + + /// + bua, + + /// + bug, + + /// + bul, + + /// + bur, + + /// + byn, + + /// + cad, + + /// + cai, + + /// + car, + + /// + cat, + + /// + cau, + + /// + ceb, + + /// + cel, + + /// + cha, + + /// + chb, + + /// + che, + + /// + chg, + + /// + chi, + + /// + chk, + + /// + chm, + + /// + chn, + + /// + cho, + + /// + chp, + + /// + chr, + + /// + chu, + + /// + chv, + + /// + chy, + + /// + cmc, + + /// + cop, + + /// + cor, + + /// + cos, + + /// + cpe, + + /// + cpf, + + /// + cpp, + + /// + cre, + + /// + crh, + + /// + crp, + + /// + csb, + + /// + cus, + + /// + cze, + + /// + dak, + + /// + dan, + + /// + dar, + + /// + day, + + /// + del, + + /// + den, + + /// + dgr, + + /// + din, + + /// + div, + + /// + doi, + + /// + dra, + + /// + dsb, + + /// + dua, + + /// + dum, + + /// + dut, + + /// + dyu, + + /// + dzo, + + /// + efi, + + /// + egy, + + /// + eka, + + /// + elx, + + /// + eng, + + /// + enm, + + /// + epo, + + /// + est, + + /// + ewe, + + /// + ewo, + + /// + fan, + + /// + fao, + + /// + fat, + + /// + fij, + + /// + fil, + + /// + fin, + + /// + fiu, + + /// + fon, + + /// + fre, + + /// + frm, + + /// + fro, + + /// + frr, + + /// + frs, + + /// + fry, + + /// + ful, + + /// + fur, + + /// + gaa, + + /// + gay, + + /// + gba, + + /// + gem, + + /// + geo, + + /// + ger, + + /// + gez, + + /// + gil, + + /// + gla, + + /// + gle, + + /// + glg, + + /// + glv, + + /// + gmh, + + /// + goh, + + /// + gon, + + /// + gor, + + /// + got, + + /// + grb, + + /// + grc, + + /// + gre, + + /// + grn, + + /// + gsw, + + /// + guj, + + /// + gwi, + + /// + hai, + + /// + hat, + + /// + hau, + + /// + haw, + + /// + heb, + + /// + her, + + /// + hil, + + /// + him, + + /// + hin, + + /// + hit, + + /// + hmn, + + /// + hmo, + + /// + hrv, + + /// + hsb, + + /// + hun, + + /// + hup, + + /// + iba, + + /// + ibo, + + /// + ice, + + /// + ido, + + /// + iii, + + /// + ijo, + + /// + iku, + + /// + ile, + + /// + ilo, + + /// + ina, + + /// + inc, + + /// + ind, + + /// + ine, + + /// + inh, + + /// + ipk, + + /// + ira, + + /// + iro, + + /// + ita, + + /// + jav, + + /// + jbo, + + /// + jpn, + + /// + jpr, + + /// + jrb, + + /// + kaa, + + /// + kab, + + /// + kac, + + /// + kal, + + /// + kam, + + /// + kan, + + /// + kar, + + /// + kas, + + /// + kau, + + /// + kaw, + + /// + kaz, + + /// + kbd, + + /// + kha, + + /// + khi, + + /// + khm, + + /// + kho, + + /// + kik, + + /// + kin, + + /// + kir, + + /// + kmb, + + /// + kok, + + /// + kom, + + /// + kon, + + /// + kor, + + /// + kos, + + /// + kpe, + + /// + krc, + + /// + krl, + + /// + kro, + + /// + kru, + + /// + kua, + + /// + kum, + + /// + kur, + + /// + kut, + + /// + lad, + + /// + lah, + + /// + lam, + + /// + lao, + + /// + lat, + + /// + lav, + + /// + lez, + + /// + lim, + + /// + lin, + + /// + lit, + + /// + lol, + + /// + loz, + + /// + ltz, + + /// + lua, + + /// + lub, + + /// + lug, + + /// + lui, + + /// + lun, + + /// + luo, + + /// + lus, + + /// + mac, + + /// + mad, + + /// + mag, + + /// + mah, + + /// + mai, + + /// + mak, + + /// + mal, + + /// + man, + + /// + mao, + + /// + map, + + /// + mar, + + /// + mas, + + /// + may, + + /// + mdf, + + /// + mdr, + + /// + men, + + /// + mga, + + /// + mic, + + /// + min, + + /// + mis, + + /// + mkh, + + /// + mlg, + + /// + mlt, + + /// + mnc, + + /// + mni, + + /// + mno, + + /// + moh, + + /// + mon, + + /// + mos, + + /// + mul, + + /// + mun, + + /// + mus, + + /// + mwl, + + /// + mwr, + + /// + myn, + + /// + myv, + + /// + nah, + + /// + nai, + + /// + nap, + + /// + nau, + + /// + nav, + + /// + nbl, + + /// + nde, + + /// + ndo, + + /// + nds, + + /// + nep, + + /// + @new, + + /// + nia, + + /// + nic, + + /// + niu, + + /// + nno, + + /// + nob, + + /// + nog, + + /// + non, + + /// + nor, + + /// + nqo, + + /// + nso, + + /// + nub, + + /// + nwc, + + /// + nya, + + /// + nym, + + /// + nyn, + + /// + nyo, + + /// + nzi, + + /// + oci, + + /// + oji, + + /// + ori, + + /// + orm, + + /// + osa, + + /// + oss, + + /// + ota, + + /// + oto, + + /// + paa, + + /// + pag, + + /// + pal, + + /// + pam, + + /// + pan, + + /// + pap, + + /// + pau, + + /// + peo, + + /// + per, + + /// + phi, + + /// + phn, + + /// + pli, + + /// + pol, + + /// + pon, + + /// + por, + + /// + pra, + + /// + pro, + + /// + pus, + + /// + [System.Xml.Serialization.XmlEnumAttribute("qaa-qtz")] + qaaqtz, + + /// + que, + + /// + raj, + + /// + rap, + + /// + rar, + + /// + roa, + + /// + roh, + + /// + rom, + + /// + rum, + + /// + run, + + /// + rup, + + /// + rus, + + /// + sad, + + /// + sag, + + /// + sah, + + /// + sai, + + /// + sal, + + /// + sam, + + /// + san, + + /// + sas, + + /// + sat, + + /// + scn, + + /// + sco, + + /// + sel, + + /// + sem, + + /// + sga, + + /// + sgn, + + /// + shn, + + /// + sid, + + /// + sin, + + /// + sio, + + /// + sit, + + /// + sla, + + /// + slo, + + /// + slv, + + /// + sma, + + /// + sme, + + /// + smi, + + /// + smj, + + /// + smn, + + /// + smo, + + /// + sms, + + /// + sna, + + /// + snd, + + /// + snk, + + /// + sog, + + /// + som, + + /// + son, + + /// + sot, + + /// + spa, + + /// + srd, + + /// + srn, + + /// + srp, + + /// + srr, + + /// + ssa, + + /// + ssw, + + /// + suk, + + /// + sun, + + /// + sus, + + /// + sux, + + /// + swa, + + /// + swe, + + /// + syc, + + /// + syr, + + /// + tah, + + /// + tai, + + /// + tam, + + /// + tat, + + /// + tel, + + /// + tem, + + /// + ter, + + /// + tet, + + /// + tgk, + + /// + tgl, + + /// + tha, + + /// + tib, + + /// + tig, + + /// + tir, + + /// + tiv, + + /// + tkl, + + /// + tlh, + + /// + tli, + + /// + tmh, + + /// + tog, + + /// + ton, + + /// + tpi, + + /// + tsi, + + /// + tsn, + + /// + tso, + + /// + tuk, + + /// + tum, + + /// + tup, + + /// + tur, + + /// + tut, + + /// + tvl, + + /// + twi, + + /// + tyv, + + /// + udm, + + /// + uga, + + /// + uig, + + /// + ukr, + + /// + umb, + + /// + und, + + /// + urd, + + /// + uzb, + + /// + vai, + + /// + ven, + + /// + vie, + + /// + vol, + + /// + vot, + + /// + wak, + + /// + wal, + + /// + war, + + /// + was, + + /// + wel, + + /// + wen, + + /// + wln, + + /// + wol, + + /// + xal, + + /// + xho, + + /// + yao, + + /// + yap, + + /// + yid, + + /// + yor, + + /// + ypk, + + /// + zap, + + /// + zbl, + + /// + zen, + + /// + zgh, + + /// + zha, + + /// + znd, + + /// + zul, + + /// + zun, + + /// + zxx, + + /// + zza, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class MediaScanType { + + private MediaScanTypeMediaScanElement mediaScanElementField; + + private ScanType scanField; + + /// + public MediaScanTypeMediaScanElement MediaScanElement { + get { + return this.mediaScanElementField; + } + set { + this.mediaScanElementField = value; + } + } + + /// + public ScanType Scan { + get { + return this.scanField; + } + set { + this.scanField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum MediaScanTypeMediaScanElement { + + /// + up, + + /// + down, + + /// + front, + + /// + back, + + /// + left, + + /// + right, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DumpHardwareType { + + private string manufacturerField; + + private string modelField; + + private string revisionField; + + private string firmwareField; + + private string serialField; + + private ExtentType[] extentsField; + + private SoftwareType softwareField; + + /// + public string Manufacturer { + get { + return this.manufacturerField; + } + set { + this.manufacturerField = value; + } + } + + /// + public string Model { + get { + return this.modelField; + } + set { + this.modelField = value; + } + } + + /// + public string Revision { + get { + return this.revisionField; + } + set { + this.revisionField = value; + } + } + + /// + public string Firmware { + get { + return this.firmwareField; + } + set { + this.firmwareField = value; + } + } + + /// + public string Serial { + get { + return this.serialField; + } + set { + this.serialField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Extent", IsNullable=false)] + public ExtentType[] Extents { + get { + return this.extentsField; + } + set { + this.extentsField = value; + } + } + + /// + public SoftwareType Software { + get { + return this.softwareField; + } + set { + this.softwareField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ExtentType { + + private ulong startField; + + private ulong endField; + + /// + public ulong Start { + get { + return this.startField; + } + set { + this.startField = value; + } + } + + /// + public ulong End { + get { + return this.endField; + } + set { + this.endField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SoftwareType { + + private string nameField; + + private string versionField; + + private string operatingSystemField; + + /// + public string Name { + get { + return this.nameField; + } + set { + this.nameField = value; + } + } + + /// + public string Version { + get { + return this.versionField; + } + set { + this.versionField = value; + } + } + + /// + public string OperatingSystem { + get { + return this.operatingSystemField; + } + set { + this.operatingSystemField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class BlockTrackType { + + private ImageType imageField; + + private ulong sizeField; + + private ushort headField; + + private uint cylinderField; + + private ulong startSectorField; + + private ulong endSectorField; + + private ulong sectorsField; + + private uint bytesPerSectorField; + + private ChecksumType[] checksumsField; + + private string formatField; + + /// + public ImageType Image { + get { + return this.imageField; + } + set { + this.imageField = value; + } + } + + /// + public ulong Size { + get { + return this.sizeField; + } + set { + this.sizeField = value; + } + } + + /// + public ushort Head { + get { + return this.headField; + } + set { + this.headField = value; + } + } + + /// + public uint Cylinder { + get { + return this.cylinderField; + } + set { + this.cylinderField = value; + } + } + + /// + public ulong StartSector { + get { + return this.startSectorField; + } + set { + this.startSectorField = value; + } + } + + /// + public ulong EndSector { + get { + return this.endSectorField; + } + set { + this.endSectorField = value; + } + } + + /// + public ulong Sectors { + get { + return this.sectorsField; + } + set { + this.sectorsField = value; + } + } + + /// + public uint BytesPerSector { + get { + return this.bytesPerSectorField; + } + set { + this.bytesPerSectorField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] Checksums { + get { + return this.checksumsField; + } + set { + this.checksumsField = value; + } + } + + /// + public string Format { + get { + return this.formatField; + } + set { + this.formatField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class USBType { + + private ushort vendorIDField; + + private ushort productIDField; + + private DumpType descriptorsField; + + /// + public ushort VendorID { + get { + return this.vendorIDField; + } + set { + this.vendorIDField = value; + } + } + + /// + public ushort ProductID { + get { + return this.productIDField; + } + set { + this.productIDField = value; + } + } + + /// + public DumpType Descriptors { + get { + return this.descriptorsField; + } + set { + this.descriptorsField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DumpType { + + private string imageField; + + private ulong sizeField; + + private ChecksumType[] checksumsField; + + /// + public string Image { + get { + return this.imageField; + } + set { + this.imageField = value; + } + } + + /// + public ulong Size { + get { + return this.sizeField; + } + set { + this.sizeField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] Checksums { + get { + return this.checksumsField; + } + set { + this.checksumsField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class EVPDType { + + private string imageField; + + private ulong sizeField; + + private ChecksumType[] checksumsField; + + private byte pageField; + + private bool pageFieldSpecified; + + /// + public string Image { + get { + return this.imageField; + } + set { + this.imageField = value; + } + } + + /// + public ulong Size { + get { + return this.sizeField; + } + set { + this.sizeField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] Checksums { + get { + return this.checksumsField; + } + set { + this.checksumsField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public byte page { + get { + return this.pageField; + } + set { + this.pageField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool pageSpecified { + get { + return this.pageFieldSpecified; + } + set { + this.pageFieldSpecified = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SCSIType { + + private DumpType inquiryField; + + private EVPDType[] eVPDField; + + private DumpType modeSenseField; + + private DumpType modeSense10Field; + + private DumpType logSenseField; + + /// + public DumpType Inquiry { + get { + return this.inquiryField; + } + set { + this.inquiryField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("EVPD")] + public EVPDType[] EVPD { + get { + return this.eVPDField; + } + set { + this.eVPDField = value; + } + } + + /// + public DumpType ModeSense { + get { + return this.modeSenseField; + } + set { + this.modeSenseField = value; + } + } + + /// + public DumpType ModeSense10 { + get { + return this.modeSense10Field; + } + set { + this.modeSense10Field = value; + } + } + + /// + public DumpType LogSense { + get { + return this.logSenseField; + } + set { + this.logSenseField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class MultiMediaCardType { + + private DumpType cIDField; + + private DumpType cSDField; + + private DumpType extendedCSDField; + + private DumpType oCRField; + + /// + public DumpType CID { + get { + return this.cIDField; + } + set { + this.cIDField = value; + } + } + + /// + public DumpType CSD { + get { + return this.cSDField; + } + set { + this.cSDField = value; + } + } + + /// + public DumpType ExtendedCSD { + get { + return this.extendedCSDField; + } + set { + this.extendedCSDField = value; + } + } + + /// + public DumpType OCR { + get { + return this.oCRField; + } + set { + this.oCRField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SecureDigitalType { + + private DumpType cIDField; + + private DumpType cSDField; + + private DumpType sCRField; + + private DumpType oCRField; + + /// + public DumpType CID { + get { + return this.cIDField; + } + set { + this.cIDField = value; + } + } + + /// + public DumpType CSD { + get { + return this.cSDField; + } + set { + this.cSDField = value; + } + } + + /// + public DumpType SCR { + get { + return this.sCRField; + } + set { + this.sCRField = value; + } + } + + /// + public DumpType OCR { + get { + return this.oCRField; + } + set { + this.oCRField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ATAType { + + private DumpType identifyField; + + /// + public DumpType Identify { + get { + return this.identifyField; + } + set { + this.identifyField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class TapeFileType { + + private ImageType imageField; + + private ulong sizeField; + + private ulong sequenceField; + + private ulong blockSizeField; + + private ulong startBlockField; + + private ulong endBlockField; + + private ChecksumType[] checksumsField; + + /// + public ImageType Image { + get { + return this.imageField; + } + set { + this.imageField = value; + } + } + + /// + public ulong Size { + get { + return this.sizeField; + } + set { + this.sizeField = value; + } + } + + /// + public ulong Sequence { + get { + return this.sequenceField; + } + set { + this.sequenceField = value; + } + } + + /// + public ulong BlockSize { + get { + return this.blockSizeField; + } + set { + this.blockSizeField = value; + } + } + + /// + public ulong StartBlock { + get { + return this.startBlockField; + } + set { + this.startBlockField = value; + } + } + + /// + public ulong EndBlock { + get { + return this.endBlockField; + } + set { + this.endBlockField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] Checksums { + get { + return this.checksumsField; + } + set { + this.checksumsField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class TapePartitionType { + + private ImageType imageField; + + private ulong sizeField; + + private ulong sequenceField; + + private ulong startBlockField; + + private ulong endBlockField; + + private ChecksumType[] checksumsField; + + private TapeFileType[] fileField; + + /// + public ImageType Image { + get { + return this.imageField; + } + set { + this.imageField = value; + } + } + + /// + public ulong Size { + get { + return this.sizeField; + } + set { + this.sizeField = value; + } + } + + /// + public ulong Sequence { + get { + return this.sequenceField; + } + set { + this.sequenceField = value; + } + } + + /// + public ulong StartBlock { + get { + return this.startBlockField; + } + set { + this.startBlockField = value; + } + } + + /// + public ulong EndBlock { + get { + return this.endBlockField; + } + set { + this.endBlockField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] Checksums { + get { + return this.checksumsField; + } + set { + this.checksumsField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("File")] + public TapeFileType[] File { + get { + return this.fileField; + } + set { + this.fileField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class BlockSizeType { + + private uint startingBlockField; + + private uint valueField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public uint startingBlock { + get { + return this.startingBlockField; + } + set { + this.startingBlockField = value; + } + } + + /// + [System.Xml.Serialization.XmlTextAttribute()] + public uint Value { + get { + return this.valueField; + } + set { + this.valueField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class BlockMediaType { + + private ImageType imageField; + + private ulong sizeField; + + private ChecksumType[] checksumsField; + + private ChecksumType[] contentChecksumsField; + + private SequenceType sequenceField; + + private string manufacturerField; + + private string modelField; + + private string serialField; + + private string firmwareField; + + private string interfaceField; + + private string partNumberField; + + private string serialNumberField; + + private uint physicalBlockSizeField; + + private uint logicalBlockSizeField; + + private ulong logicalBlocksField; + + private BlockSizeType[] variableBlockSizeField; + + private TapePartitionType[] tapeInformationField; + + private ScansType scansField; + + private ATAType aTAField; + + private PCIType pCIField; + + private PCMCIAType pCMCIAField; + + private SecureDigitalType secureDigitalField; + + private MultiMediaCardType multiMediaCardField; + + private SCSIType sCSIField; + + private USBType uSBField; + + private DumpType mAMField; + + private ushort headsField; + + private bool headsFieldSpecified; + + private uint cylindersField; + + private bool cylindersFieldSpecified; + + private ulong sectorsPerTrackField; + + private bool sectorsPerTrackFieldSpecified; + + private BlockTrackType[] trackField; + + private string copyProtectionField; + + private DimensionsType dimensionsField; + + private PartitionType[] fileSystemInformationField; + + private DumpHardwareType[] dumpHardwareArrayField; + + private string diskTypeField; + + private string diskSubTypeField; + + /// + public ImageType Image { + get { + return this.imageField; + } + set { + this.imageField = value; + } + } + + /// + public ulong Size { + get { + return this.sizeField; + } + set { + this.sizeField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] Checksums { + get { + return this.checksumsField; + } + set { + this.checksumsField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] ContentChecksums { + get { + return this.contentChecksumsField; + } + set { + this.contentChecksumsField = value; + } + } + + /// + public SequenceType Sequence { + get { + return this.sequenceField; + } + set { + this.sequenceField = value; + } + } + + /// + public string Manufacturer { + get { + return this.manufacturerField; + } + set { + this.manufacturerField = value; + } + } + + /// + public string Model { + get { + return this.modelField; + } + set { + this.modelField = value; + } + } + + /// + public string Serial { + get { + return this.serialField; + } + set { + this.serialField = value; + } + } + + /// + public string Firmware { + get { + return this.firmwareField; + } + set { + this.firmwareField = value; + } + } + + /// + public string Interface { + get { + return this.interfaceField; + } + set { + this.interfaceField = value; + } + } + + /// + public string PartNumber { + get { + return this.partNumberField; + } + set { + this.partNumberField = value; + } + } + + /// + public string SerialNumber { + get { + return this.serialNumberField; + } + set { + this.serialNumberField = value; + } + } + + /// + public uint PhysicalBlockSize { + get { + return this.physicalBlockSizeField; + } + set { + this.physicalBlockSizeField = value; + } + } + + /// + public uint LogicalBlockSize { + get { + return this.logicalBlockSizeField; + } + set { + this.logicalBlockSizeField = value; + } + } + + /// + public ulong LogicalBlocks { + get { + return this.logicalBlocksField; + } + set { + this.logicalBlocksField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("BlockSize", IsNullable=false)] + public BlockSizeType[] VariableBlockSize { + get { + return this.variableBlockSizeField; + } + set { + this.variableBlockSizeField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Partition", IsNullable=false)] + public TapePartitionType[] TapeInformation { + get { + return this.tapeInformationField; + } + set { + this.tapeInformationField = value; + } + } + + /// + public ScansType Scans { + get { + return this.scansField; + } + set { + this.scansField = value; + } + } + + /// + public ATAType ATA { + get { + return this.aTAField; + } + set { + this.aTAField = value; + } + } + + /// + public PCIType PCI { + get { + return this.pCIField; + } + set { + this.pCIField = value; + } + } + + /// + public PCMCIAType PCMCIA { + get { + return this.pCMCIAField; + } + set { + this.pCMCIAField = value; + } + } + + /// + public SecureDigitalType SecureDigital { + get { + return this.secureDigitalField; + } + set { + this.secureDigitalField = value; + } + } + + /// + public MultiMediaCardType MultiMediaCard { + get { + return this.multiMediaCardField; + } + set { + this.multiMediaCardField = value; + } + } + + /// + public SCSIType SCSI { + get { + return this.sCSIField; + } + set { + this.sCSIField = value; + } + } + + /// + public USBType USB { + get { + return this.uSBField; + } + set { + this.uSBField = value; + } + } + + /// + public DumpType MAM { + get { + return this.mAMField; + } + set { + this.mAMField = value; + } + } + + /// + public ushort Heads { + get { + return this.headsField; + } + set { + this.headsField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool HeadsSpecified { + get { + return this.headsFieldSpecified; + } + set { + this.headsFieldSpecified = value; + } + } + + /// + public uint Cylinders { + get { + return this.cylindersField; + } + set { + this.cylindersField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool CylindersSpecified { + get { + return this.cylindersFieldSpecified; + } + set { + this.cylindersFieldSpecified = value; + } + } + + /// + public ulong SectorsPerTrack { + get { + return this.sectorsPerTrackField; + } + set { + this.sectorsPerTrackField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool SectorsPerTrackSpecified { + get { + return this.sectorsPerTrackFieldSpecified; + } + set { + this.sectorsPerTrackFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("Track")] + public BlockTrackType[] Track { + get { + return this.trackField; + } + set { + this.trackField = value; + } + } + + /// + public string CopyProtection { + get { + return this.copyProtectionField; + } + set { + this.copyProtectionField = value; + } + } + + /// + public DimensionsType Dimensions { + get { + return this.dimensionsField; + } + set { + this.dimensionsField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Partition", IsNullable=false)] + public PartitionType[] FileSystemInformation { + get { + return this.fileSystemInformationField; + } + set { + this.fileSystemInformationField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("DumpHardware", IsNullable=false)] + public DumpHardwareType[] DumpHardwareArray { + get { + return this.dumpHardwareArrayField; + } + set { + this.dumpHardwareArrayField = value; + } + } + + /// + public string DiskType { + get { + return this.diskTypeField; + } + set { + this.diskTypeField = value; + } + } + + /// + public string DiskSubType { + get { + return this.diskSubTypeField; + } + set { + this.diskSubTypeField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class PCIType { + + private ushort vendorIDField; + + private ushort deviceIDField; + + private DumpType configurationField; + + private LinearMediaType expansionROMField; + + /// + public ushort VendorID { + get { + return this.vendorIDField; + } + set { + this.vendorIDField = value; + } + } + + /// + public ushort DeviceID { + get { + return this.deviceIDField; + } + set { + this.deviceIDField = value; + } + } + + /// + public DumpType Configuration { + get { + return this.configurationField; + } + set { + this.configurationField = value; + } + } + + /// + public LinearMediaType ExpansionROM { + get { + return this.expansionROMField; + } + set { + this.expansionROMField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class LinearMediaType { + + private ImageType imageField; + + private ulong sizeField; + + private ChecksumType[] imageChecksumsField; + + private ChecksumType[] checksumsField; + + private string partNumberField; + + private string serialNumberField; + + private string titleField; + + private uint sequenceField; + + private bool sequenceFieldSpecified; + + private uint imageInterleaveField; + + private bool imageInterleaveFieldSpecified; + + private uint interleaveField; + + private bool interleaveFieldSpecified; + + private string manufacturerField; + + private string modelField; + + private string packageField; + + private string interfaceField; + + private DimensionsType dimensionsField; + + private ScansType scansField; + + private DumpHardwareType[] dumpHardwareArrayField; + + private PCMCIAType pCMCIAField; + + private string copyProtectionField; + + /// + public ImageType Image { + get { + return this.imageField; + } + set { + this.imageField = value; + } + } + + /// + public ulong Size { + get { + return this.sizeField; + } + set { + this.sizeField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] ImageChecksums { + get { + return this.imageChecksumsField; + } + set { + this.imageChecksumsField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] Checksums { + get { + return this.checksumsField; + } + set { + this.checksumsField = value; + } + } + + /// + public string PartNumber { + get { + return this.partNumberField; + } + set { + this.partNumberField = value; + } + } + + /// + public string SerialNumber { + get { + return this.serialNumberField; + } + set { + this.serialNumberField = value; + } + } + + /// + public string Title { + get { + return this.titleField; + } + set { + this.titleField = value; + } + } + + /// + public uint Sequence { + get { + return this.sequenceField; + } + set { + this.sequenceField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool SequenceSpecified { + get { + return this.sequenceFieldSpecified; + } + set { + this.sequenceFieldSpecified = value; + } + } + + /// + public uint ImageInterleave { + get { + return this.imageInterleaveField; + } + set { + this.imageInterleaveField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ImageInterleaveSpecified { + get { + return this.imageInterleaveFieldSpecified; + } + set { + this.imageInterleaveFieldSpecified = value; + } + } + + /// + public uint Interleave { + get { + return this.interleaveField; + } + set { + this.interleaveField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool InterleaveSpecified { + get { + return this.interleaveFieldSpecified; + } + set { + this.interleaveFieldSpecified = value; + } + } + + /// + public string Manufacturer { + get { + return this.manufacturerField; + } + set { + this.manufacturerField = value; + } + } + + /// + public string Model { + get { + return this.modelField; + } + set { + this.modelField = value; + } + } + + /// + public string Package { + get { + return this.packageField; + } + set { + this.packageField = value; + } + } + + /// + public string Interface { + get { + return this.interfaceField; + } + set { + this.interfaceField = value; + } + } + + /// + public DimensionsType Dimensions { + get { + return this.dimensionsField; + } + set { + this.dimensionsField = value; + } + } + + /// + public ScansType Scans { + get { + return this.scansField; + } + set { + this.scansField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("DumpHardware", IsNullable=false)] + public DumpHardwareType[] DumpHardwareArray { + get { + return this.dumpHardwareArrayField; + } + set { + this.dumpHardwareArrayField = value; + } + } + + /// + public PCMCIAType PCMCIA { + get { + return this.pCMCIAField; + } + set { + this.pCMCIAField = value; + } + } + + /// + public string CopyProtection { + get { + return this.copyProtectionField; + } + set { + this.copyProtectionField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class PCMCIAType { + + private DumpType cISField; + + private string complianceField; + + private ushort manufacturerCodeField; + + private bool manufacturerCodeFieldSpecified; + + private ushort cardCodeField; + + private bool cardCodeFieldSpecified; + + private string manufacturerField; + + private string productNameField; + + private string[] additionalInformationField; + + /// + public DumpType CIS { + get { + return this.cISField; + } + set { + this.cISField = value; + } + } + + /// + public string Compliance { + get { + return this.complianceField; + } + set { + this.complianceField = value; + } + } + + /// + public ushort ManufacturerCode { + get { + return this.manufacturerCodeField; + } + set { + this.manufacturerCodeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ManufacturerCodeSpecified { + get { + return this.manufacturerCodeFieldSpecified; + } + set { + this.manufacturerCodeFieldSpecified = value; + } + } + + /// + public ushort CardCode { + get { + return this.cardCodeField; + } + set { + this.cardCodeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool CardCodeSpecified { + get { + return this.cardCodeFieldSpecified; + } + set { + this.cardCodeFieldSpecified = value; + } + } + + /// + public string Manufacturer { + get { + return this.manufacturerField; + } + set { + this.manufacturerField = value; + } + } + + /// + public string ProductName { + get { + return this.productNameField; + } + set { + this.productNameField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("AdditionalInformation")] + public string[] AdditionalInformation { + get { + return this.additionalInformationField; + } + set { + this.additionalInformationField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class PartitionType { + + private uint sequenceField; + + private string nameField; + + private string typeField; + + private ulong startSectorField; + + private ulong endSectorField; + + private string descriptionField; + + private FileSystemType[] fileSystemsField; + + /// + public uint Sequence { + get { + return this.sequenceField; + } + set { + this.sequenceField = value; + } + } + + /// + public string Name { + get { + return this.nameField; + } + set { + this.nameField = value; + } + } + + /// + public string Type { + get { + return this.typeField; + } + set { + this.typeField = value; + } + } + + /// + public ulong StartSector { + get { + return this.startSectorField; + } + set { + this.startSectorField = value; + } + } + + /// + public ulong EndSector { + get { + return this.endSectorField; + } + set { + this.endSectorField = value; + } + } + + /// + public string Description { + get { + return this.descriptionField; + } + set { + this.descriptionField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("FileSystem", IsNullable=false)] + public FileSystemType[] FileSystems { + get { + return this.fileSystemsField; + } + set { + this.fileSystemsField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class FileSystemType { + + private string typeField; + + private System.DateTime creationDateField; + + private bool creationDateFieldSpecified; + + private System.DateTime modificationDateField; + + private bool modificationDateFieldSpecified; + + private System.DateTime backupDateField; + + private bool backupDateFieldSpecified; + + private uint clusterSizeField; + + private ulong clustersField; + + private ulong filesField; + + private bool filesFieldSpecified; + + private bool bootableField; + + private string volumeSerialField; + + private string volumeNameField; + + private ulong freeClustersField; + + private bool freeClustersFieldSpecified; + + private bool dirtyField; + + private System.DateTime expirationDateField; + + private bool expirationDateFieldSpecified; + + private System.DateTime effectiveDateField; + + private bool effectiveDateFieldSpecified; + + private string systemIdentifierField; + + private string volumeSetIdentifierField; + + private string publisherIdentifierField; + + private string dataPreparerIdentifierField; + + private string applicationIdentifierField; + + private FilesystemContentsType contentsField; + + /// + public string Type { + get { + return this.typeField; + } + set { + this.typeField = value; + } + } + + /// + public System.DateTime CreationDate { + get { + return this.creationDateField; + } + set { + this.creationDateField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool CreationDateSpecified { + get { + return this.creationDateFieldSpecified; + } + set { + this.creationDateFieldSpecified = value; + } + } + + /// + public System.DateTime ModificationDate { + get { + return this.modificationDateField; + } + set { + this.modificationDateField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ModificationDateSpecified { + get { + return this.modificationDateFieldSpecified; + } + set { + this.modificationDateFieldSpecified = value; + } + } + + /// + public System.DateTime BackupDate { + get { + return this.backupDateField; + } + set { + this.backupDateField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool BackupDateSpecified { + get { + return this.backupDateFieldSpecified; + } + set { + this.backupDateFieldSpecified = value; + } + } + + /// + public uint ClusterSize { + get { + return this.clusterSizeField; + } + set { + this.clusterSizeField = value; + } + } + + /// + public ulong Clusters { + get { + return this.clustersField; + } + set { + this.clustersField = value; + } + } + + /// + public ulong Files { + get { + return this.filesField; + } + set { + this.filesField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool FilesSpecified { + get { + return this.filesFieldSpecified; + } + set { + this.filesFieldSpecified = value; + } + } + + /// + public bool Bootable { + get { + return this.bootableField; + } + set { + this.bootableField = value; + } + } + + /// + public string VolumeSerial { + get { + return this.volumeSerialField; + } + set { + this.volumeSerialField = value; + } + } + + /// + public string VolumeName { + get { + return this.volumeNameField; + } + set { + this.volumeNameField = value; + } + } + + /// + public ulong FreeClusters { + get { + return this.freeClustersField; + } + set { + this.freeClustersField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool FreeClustersSpecified { + get { + return this.freeClustersFieldSpecified; + } + set { + this.freeClustersFieldSpecified = value; + } + } + + /// + public bool Dirty { + get { + return this.dirtyField; + } + set { + this.dirtyField = value; + } + } + + /// + public System.DateTime ExpirationDate { + get { + return this.expirationDateField; + } + set { + this.expirationDateField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool ExpirationDateSpecified { + get { + return this.expirationDateFieldSpecified; + } + set { + this.expirationDateFieldSpecified = value; + } + } + + /// + public System.DateTime EffectiveDate { + get { + return this.effectiveDateField; + } + set { + this.effectiveDateField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool EffectiveDateSpecified { + get { + return this.effectiveDateFieldSpecified; + } + set { + this.effectiveDateFieldSpecified = value; + } + } + + /// + public string SystemIdentifier { + get { + return this.systemIdentifierField; + } + set { + this.systemIdentifierField = value; + } + } + + /// + public string VolumeSetIdentifier { + get { + return this.volumeSetIdentifierField; + } + set { + this.volumeSetIdentifierField = value; + } + } + + /// + public string PublisherIdentifier { + get { + return this.publisherIdentifierField; + } + set { + this.publisherIdentifierField = value; + } + } + + /// + public string DataPreparerIdentifier { + get { + return this.dataPreparerIdentifierField; + } + set { + this.dataPreparerIdentifierField = value; + } + } + + /// + public string ApplicationIdentifier { + get { + return this.applicationIdentifierField; + } + set { + this.applicationIdentifierField = value; + } + } + + /// + public FilesystemContentsType Contents { + get { + return this.contentsField; + } + set { + this.contentsField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class FilesystemContentsType { + + private ContentsFileType[] fileField; + + private DirectoryType[] directoryField; + + private string namespaceField; + + /// + [System.Xml.Serialization.XmlElementAttribute("File")] + public ContentsFileType[] File { + get { + return this.fileField; + } + set { + this.fileField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("Directory")] + public DirectoryType[] Directory { + get { + return this.directoryField; + } + set { + this.directoryField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string @namespace { + get { + return this.namespaceField; + } + set { + this.namespaceField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ContentsFileType { + + private ChecksumType[] checksumsField; + + private ExtendedAttributeType[] extendedAttributesField; + + private string nameField; + + private System.DateTime creationTimeField; + + private bool creationTimeFieldSpecified; + + private System.DateTime accessTimeField; + + private bool accessTimeFieldSpecified; + + private System.DateTime statusChangeTimeField; + + private bool statusChangeTimeFieldSpecified; + + private System.DateTime backupTimeField; + + private bool backupTimeFieldSpecified; + + private System.DateTime lastWriteTimeField; + + private bool lastWriteTimeFieldSpecified; + + private ulong attributesField; + + private uint posixModeField; + + private bool posixModeFieldSpecified; + + private ulong deviceNumberField; + + private bool deviceNumberFieldSpecified; + + private ulong posixGroupIdField; + + private bool posixGroupIdFieldSpecified; + + private ulong inodeField; + + private ulong linksField; + + private ulong posixUserIdField; + + private bool posixUserIdFieldSpecified; + + private ulong lengthField; + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] Checksums { + get { + return this.checksumsField; + } + set { + this.checksumsField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("ExtendedAttribute", IsNullable=false)] + public ExtendedAttributeType[] ExtendedAttributes { + get { + return this.extendedAttributesField; + } + set { + this.extendedAttributesField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name { + get { + return this.nameField; + } + set { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public System.DateTime creationTime { + get { + return this.creationTimeField; + } + set { + this.creationTimeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool creationTimeSpecified { + get { + return this.creationTimeFieldSpecified; + } + set { + this.creationTimeFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public System.DateTime accessTime { + get { + return this.accessTimeField; + } + set { + this.accessTimeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool accessTimeSpecified { + get { + return this.accessTimeFieldSpecified; + } + set { + this.accessTimeFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public System.DateTime statusChangeTime { + get { + return this.statusChangeTimeField; + } + set { + this.statusChangeTimeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool statusChangeTimeSpecified { + get { + return this.statusChangeTimeFieldSpecified; + } + set { + this.statusChangeTimeFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public System.DateTime backupTime { + get { + return this.backupTimeField; + } + set { + this.backupTimeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool backupTimeSpecified { + get { + return this.backupTimeFieldSpecified; + } + set { + this.backupTimeFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public System.DateTime lastWriteTime { + get { + return this.lastWriteTimeField; + } + set { + this.lastWriteTimeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool lastWriteTimeSpecified { + get { + return this.lastWriteTimeFieldSpecified; + } + set { + this.lastWriteTimeFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ulong attributes { + get { + return this.attributesField; + } + set { + this.attributesField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public uint posixMode { + get { + return this.posixModeField; + } + set { + this.posixModeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool posixModeSpecified { + get { + return this.posixModeFieldSpecified; + } + set { + this.posixModeFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ulong deviceNumber { + get { + return this.deviceNumberField; + } + set { + this.deviceNumberField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool deviceNumberSpecified { + get { + return this.deviceNumberFieldSpecified; + } + set { + this.deviceNumberFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ulong posixGroupId { + get { + return this.posixGroupIdField; + } + set { + this.posixGroupIdField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool posixGroupIdSpecified { + get { + return this.posixGroupIdFieldSpecified; + } + set { + this.posixGroupIdFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ulong inode { + get { + return this.inodeField; + } + set { + this.inodeField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ulong links { + get { + return this.linksField; + } + set { + this.linksField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ulong posixUserId { + get { + return this.posixUserIdField; + } + set { + this.posixUserIdField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool posixUserIdSpecified { + get { + return this.posixUserIdFieldSpecified; + } + set { + this.posixUserIdFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ulong length { + get { + return this.lengthField; + } + set { + this.lengthField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ExtendedAttributeType { + + private ChecksumType[] checksumsField; + + private string nameField; + + private ulong lengthField; + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] Checksums { + get { + return this.checksumsField; + } + set { + this.checksumsField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name { + get { + return this.nameField; + } + set { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ulong length { + get { + return this.lengthField; + } + set { + this.lengthField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class DirectoryType { + + private ContentsFileType[] fileField; + + private DirectoryType[] directoryField; + + private string nameField; + + private System.DateTime creationTimeField; + + private bool creationTimeFieldSpecified; + + private System.DateTime accessTimeField; + + private bool accessTimeFieldSpecified; + + private System.DateTime statusChangeTimeField; + + private bool statusChangeTimeFieldSpecified; + + private System.DateTime backupTimeField; + + private bool backupTimeFieldSpecified; + + private System.DateTime lastWriteTimeField; + + private bool lastWriteTimeFieldSpecified; + + private ulong attributesField; + + private uint posixModeField; + + private bool posixModeFieldSpecified; + + private ulong deviceNumberField; + + private bool deviceNumberFieldSpecified; + + private ulong posixGroupIdField; + + private bool posixGroupIdFieldSpecified; + + private ulong inodeField; + + private bool inodeFieldSpecified; + + private ulong linksField; + + private bool linksFieldSpecified; + + private ulong posixUserIdField; + + private bool posixUserIdFieldSpecified; + + /// + [System.Xml.Serialization.XmlElementAttribute("File")] + public ContentsFileType[] File { + get { + return this.fileField; + } + set { + this.fileField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("Directory")] + public DirectoryType[] Directory { + get { + return this.directoryField; + } + set { + this.directoryField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string name { + get { + return this.nameField; + } + set { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public System.DateTime creationTime { + get { + return this.creationTimeField; + } + set { + this.creationTimeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool creationTimeSpecified { + get { + return this.creationTimeFieldSpecified; + } + set { + this.creationTimeFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public System.DateTime accessTime { + get { + return this.accessTimeField; + } + set { + this.accessTimeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool accessTimeSpecified { + get { + return this.accessTimeFieldSpecified; + } + set { + this.accessTimeFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public System.DateTime statusChangeTime { + get { + return this.statusChangeTimeField; + } + set { + this.statusChangeTimeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool statusChangeTimeSpecified { + get { + return this.statusChangeTimeFieldSpecified; + } + set { + this.statusChangeTimeFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public System.DateTime backupTime { + get { + return this.backupTimeField; + } + set { + this.backupTimeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool backupTimeSpecified { + get { + return this.backupTimeFieldSpecified; + } + set { + this.backupTimeFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public System.DateTime lastWriteTime { + get { + return this.lastWriteTimeField; + } + set { + this.lastWriteTimeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool lastWriteTimeSpecified { + get { + return this.lastWriteTimeFieldSpecified; + } + set { + this.lastWriteTimeFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ulong attributes { + get { + return this.attributesField; + } + set { + this.attributesField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public uint posixMode { + get { + return this.posixModeField; + } + set { + this.posixModeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool posixModeSpecified { + get { + return this.posixModeFieldSpecified; + } + set { + this.posixModeFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ulong deviceNumber { + get { + return this.deviceNumberField; + } + set { + this.deviceNumberField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool deviceNumberSpecified { + get { + return this.deviceNumberFieldSpecified; + } + set { + this.deviceNumberFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ulong posixGroupId { + get { + return this.posixGroupIdField; + } + set { + this.posixGroupIdField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool posixGroupIdSpecified { + get { + return this.posixGroupIdFieldSpecified; + } + set { + this.posixGroupIdFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ulong inode { + get { + return this.inodeField; + } + set { + this.inodeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool inodeSpecified { + get { + return this.inodeFieldSpecified; + } + set { + this.inodeFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ulong links { + get { + return this.linksField; + } + set { + this.linksField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool linksSpecified { + get { + return this.linksFieldSpecified; + } + set { + this.linksFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ulong posixUserId { + get { + return this.posixUserIdField; + } + set { + this.posixUserIdField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool posixUserIdSpecified { + get { + return this.posixUserIdFieldSpecified; + } + set { + this.posixUserIdFieldSpecified = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CoordinatesType { + + private double latitudeField; + + private double longitudeField; + + /// + public double Latitude { + get { + return this.latitudeField; + } + set { + this.latitudeField = value; + } + } + + /// + public double Longitude { + get { + return this.longitudeField; + } + set { + this.longitudeField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class RecordingType { + + private string broadcasterField; + + private string broadcastPlatformField; + + private RecordingTypeSourceFormat sourceFormatField; + + private System.DateTime timestampField; + + private SoftwareType[] softwareField; + + private CoordinatesType coordinatesField; + + /// + public string Broadcaster { + get { + return this.broadcasterField; + } + set { + this.broadcasterField = value; + } + } + + /// + public string BroadcastPlatform { + get { + return this.broadcastPlatformField; + } + set { + this.broadcastPlatformField = value; + } + } + + /// + public RecordingTypeSourceFormat SourceFormat { + get { + return this.sourceFormatField; + } + set { + this.sourceFormatField = value; + } + } + + /// + public System.DateTime Timestamp { + get { + return this.timestampField; + } + set { + this.timestampField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("Software")] + public SoftwareType[] Software { + get { + return this.softwareField; + } + set { + this.softwareField = value; + } + } + + /// + public CoordinatesType Coordinates { + get { + return this.coordinatesField; + } + set { + this.coordinatesField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum RecordingTypeSourceFormat { + + /// + [System.Xml.Serialization.XmlEnumAttribute("ITU-A")] + ITUA, + + /// + [System.Xml.Serialization.XmlEnumAttribute("ITU-B")] + ITUB, + + /// + [System.Xml.Serialization.XmlEnumAttribute("ITU-C")] + ITUC, + + /// + [System.Xml.Serialization.XmlEnumAttribute("ITU-D")] + ITUD, + + /// + [System.Xml.Serialization.XmlEnumAttribute("ITU-E")] + ITUE, + + /// + [System.Xml.Serialization.XmlEnumAttribute("ITU-F")] + ITUF, + + /// + [System.Xml.Serialization.XmlEnumAttribute("ITU-G")] + ITUG, + + /// + [System.Xml.Serialization.XmlEnumAttribute("ITU-H")] + ITUH, + + /// + [System.Xml.Serialization.XmlEnumAttribute("ITU-I")] + ITUI, + + /// + [System.Xml.Serialization.XmlEnumAttribute("ITU-J")] + ITUJ, + + /// + [System.Xml.Serialization.XmlEnumAttribute("ITU-K")] + ITUK, + + /// + [System.Xml.Serialization.XmlEnumAttribute("ITU-L")] + ITUL, + + /// + [System.Xml.Serialization.XmlEnumAttribute("ITU-M")] + ITUM, + + /// + [System.Xml.Serialization.XmlEnumAttribute("ITU-N")] + ITUN, + + /// + [System.Xml.Serialization.XmlEnumAttribute("PAL-B")] + PALB, + + /// + [System.Xml.Serialization.XmlEnumAttribute("SECAM-B")] + SECAMB, + + /// + [System.Xml.Serialization.XmlEnumAttribute("PAL-D")] + PALD, + + /// + [System.Xml.Serialization.XmlEnumAttribute("SECAM-D")] + SECAMD, + + /// + [System.Xml.Serialization.XmlEnumAttribute("PAL-G")] + PALG, + + /// + [System.Xml.Serialization.XmlEnumAttribute("SECAM-G")] + SECAMG, + + /// + [System.Xml.Serialization.XmlEnumAttribute("PAL-H")] + PALH, + + /// + [System.Xml.Serialization.XmlEnumAttribute("PAL-I")] + PALI, + + /// + [System.Xml.Serialization.XmlEnumAttribute("PAL-K")] + PALK, + + /// + [System.Xml.Serialization.XmlEnumAttribute("SECAM-K")] + SECAMK, + + /// + [System.Xml.Serialization.XmlEnumAttribute("NTSC-M")] + NTSCM, + + /// + [System.Xml.Serialization.XmlEnumAttribute("PAL-N")] + PALN, + + /// + [System.Xml.Serialization.XmlEnumAttribute("PAL-M")] + PALM, + + /// + [System.Xml.Serialization.XmlEnumAttribute("SECAM-M")] + SECAMM, + + /// + MUSE, + + /// + PALplus, + + /// + FM, + + /// + AM, + + /// + COFDM, + + /// + [System.Xml.Serialization.XmlEnumAttribute("CAM-D")] + CAMD, + + /// + DAB, + + /// + [System.Xml.Serialization.XmlEnumAttribute("DAB+")] + DAB1, + + /// + DRM, + + /// + [System.Xml.Serialization.XmlEnumAttribute("DRM+")] + DRM1, + + /// + FMeXtra, + + /// + ATSC, + + /// + ATSC2, + + /// + ATSC3, + + /// + [System.Xml.Serialization.XmlEnumAttribute("ATSC-M/H")] + ATSCMH, + + /// + [System.Xml.Serialization.XmlEnumAttribute("DVB-T")] + DVBT, + + /// + [System.Xml.Serialization.XmlEnumAttribute("DVB-T2")] + DVBT2, + + /// + [System.Xml.Serialization.XmlEnumAttribute("DVB-S")] + DVBS, + + /// + [System.Xml.Serialization.XmlEnumAttribute("DVB-S2")] + DVBS2, + + /// + [System.Xml.Serialization.XmlEnumAttribute("DVB-S2X")] + DVBS2X, + + /// + [System.Xml.Serialization.XmlEnumAttribute("DVB-C")] + DVBC, + + /// + [System.Xml.Serialization.XmlEnumAttribute("DVB-C2")] + DVBC2, + + /// + [System.Xml.Serialization.XmlEnumAttribute("DVB-H")] + DVBH, + + /// + [System.Xml.Serialization.XmlEnumAttribute("DVB-NGH")] + DVBNGH, + + /// + [System.Xml.Serialization.XmlEnumAttribute("DVB-SH")] + DVBSH, + + /// + [System.Xml.Serialization.XmlEnumAttribute("ISDB-T")] + ISDBT, + + /// + [System.Xml.Serialization.XmlEnumAttribute("ISDB-Tb")] + ISDBTb, + + /// + [System.Xml.Serialization.XmlEnumAttribute("ISDB-S")] + ISDBS, + + /// + [System.Xml.Serialization.XmlEnumAttribute("ISDB-C")] + ISDBC, + + /// + [System.Xml.Serialization.XmlEnumAttribute("1seg")] + Item1seg, + + /// + DTMB, + + /// + CCMB, + + /// + [System.Xml.Serialization.XmlEnumAttribute("T-DMB")] + TDMB, + + /// + [System.Xml.Serialization.XmlEnumAttribute("S-DMB")] + SDMB, + + /// + IPTV, + + /// + [System.Xml.Serialization.XmlEnumAttribute("DVB-MT")] + DVBMT, + + /// + [System.Xml.Serialization.XmlEnumAttribute("DVB-MC")] + DVBMC, + + /// + [System.Xml.Serialization.XmlEnumAttribute("DVB-MS")] + DVBMS, + + /// + ADR, + + /// + SDR, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SubtitleTracksType { + + private LanguagesTypeLanguage[] languagesField; + + private uint trackNumberField; + + private string codecField; + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Language", IsNullable=false)] + public LanguagesTypeLanguage[] Languages { + get { + return this.languagesField; + } + set { + this.languagesField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public uint TrackNumber { + get { + return this.trackNumberField; + } + set { + this.trackNumberField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Codec { + get { + return this.codecField; + } + set { + this.codecField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class VideoTracksType { + + private LanguagesTypeLanguage[] languagesField; + + private uint trackNumberField; + + private string codecField; + + private uint horizontalField; + + private uint verticalField; + + private long meanBitrateField; + + private bool threeDField; + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Language", IsNullable=false)] + public LanguagesTypeLanguage[] Languages { + get { + return this.languagesField; + } + set { + this.languagesField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public uint TrackNumber { + get { + return this.trackNumberField; + } + set { + this.trackNumberField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Codec { + get { + return this.codecField; + } + set { + this.codecField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public uint Horizontal { + get { + return this.horizontalField; + } + set { + this.horizontalField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public uint Vertical { + get { + return this.verticalField; + } + set { + this.verticalField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public long MeanBitrate { + get { + return this.meanBitrateField; + } + set { + this.meanBitrateField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public bool ThreeD { + get { + return this.threeDField; + } + set { + this.threeDField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AudioTracksType { + + private LanguagesTypeLanguage[] languagesField; + + private uint trackNumberField; + + private string accoustIDField; + + private string codecField; + + private uint channelsField; + + private double sampleRateField; + + private long meanBitrateField; + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Language", IsNullable=false)] + public LanguagesTypeLanguage[] Languages { + get { + return this.languagesField; + } + set { + this.languagesField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public uint TrackNumber { + get { + return this.trackNumberField; + } + set { + this.trackNumberField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string AccoustID { + get { + return this.accoustIDField; + } + set { + this.accoustIDField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public string Codec { + get { + return this.codecField; + } + set { + this.codecField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public uint Channels { + get { + return this.channelsField; + } + set { + this.channelsField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public double SampleRate { + get { + return this.sampleRateField; + } + set { + this.sampleRateField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public long MeanBitrate { + get { + return this.meanBitrateField; + } + set { + this.meanBitrateField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class AdvertisementType { + + private string manufacturerField; + + private string productField; + + private FileType fileField; + + private ulong fileSizeField; + + private ulong framesField; + + private bool framesFieldSpecified; + + private double durationField; + + private float meanFrameRateField; + + private bool meanFrameRateFieldSpecified; + + private ChecksumType[] checksumsField; + + private AudioTracksType[] audioTrackField; + + private VideoTracksType[] videoTrackField; + + private SubtitleTracksType[] subtitleTrackField; + + private RecordingType recordingField; + + /// + public string Manufacturer { + get { + return this.manufacturerField; + } + set { + this.manufacturerField = value; + } + } + + /// + public string Product { + get { + return this.productField; + } + set { + this.productField = value; + } + } + + /// + public FileType File { + get { + return this.fileField; + } + set { + this.fileField = value; + } + } + + /// + public ulong FileSize { + get { + return this.fileSizeField; + } + set { + this.fileSizeField = value; + } + } + + /// + public ulong Frames { + get { + return this.framesField; + } + set { + this.framesField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool FramesSpecified { + get { + return this.framesFieldSpecified; + } + set { + this.framesFieldSpecified = value; + } + } + + /// + public double Duration { + get { + return this.durationField; + } + set { + this.durationField = value; + } + } + + /// + public float MeanFrameRate { + get { + return this.meanFrameRateField; + } + set { + this.meanFrameRateField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool MeanFrameRateSpecified { + get { + return this.meanFrameRateFieldSpecified; + } + set { + this.meanFrameRateFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] Checksums { + get { + return this.checksumsField; + } + set { + this.checksumsField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("AudioTrack")] + public AudioTracksType[] AudioTrack { + get { + return this.audioTrackField; + } + set { + this.audioTrackField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("VideoTrack")] + public VideoTracksType[] VideoTrack { + get { + return this.videoTrackField; + } + set { + this.videoTrackField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("SubtitleTrack")] + public SubtitleTracksType[] SubtitleTrack { + get { + return this.subtitleTrackField; + } + set { + this.subtitleTrackField = value; + } + } + + /// + public RecordingType Recording { + get { + return this.recordingField; + } + set { + this.recordingField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SubChannelType { + + private ImageType imageField; + + private ulong sizeField; + + private ChecksumType[] checksumsField; + + /// + public ImageType Image { + get { + return this.imageField; + } + set { + this.imageField = value; + } + } + + /// + public ulong Size { + get { + return this.sizeField; + } + set { + this.sizeField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] Checksums { + get { + return this.checksumsField; + } + set { + this.checksumsField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class TrackFlagsType { + + private bool quadraphonicField; + + private bool dataField; + + private bool copyPermittedField; + + private bool preEmphasisField; + + /// + public bool Quadraphonic { + get { + return this.quadraphonicField; + } + set { + this.quadraphonicField = value; + } + } + + /// + public bool Data { + get { + return this.dataField; + } + set { + this.dataField = value; + } + } + + /// + public bool CopyPermitted { + get { + return this.copyPermittedField; + } + set { + this.copyPermittedField = value; + } + } + + /// + public bool PreEmphasis { + get { + return this.preEmphasisField; + } + set { + this.preEmphasisField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class TrackIndexType { + + private ushort indexField; + + private int valueField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public ushort index { + get { + return this.indexField; + } + set { + this.indexField = value; + } + } + + /// + [System.Xml.Serialization.XmlTextAttribute()] + public int Value { + get { + return this.valueField; + } + set { + this.valueField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class TrackSequenceType { + + private uint trackNumberField; + + private uint sessionField; + + /// + public uint TrackNumber { + get { + return this.trackNumberField; + } + set { + this.trackNumberField = value; + } + } + + /// + public uint Session { + get { + return this.sessionField; + } + set { + this.sessionField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class TrackType { + + private ImageType imageField; + + private ulong sizeField; + + private TrackSequenceType sequenceField; + + private string startMSFField; + + private string endMSFField; + + private ulong startSectorField; + + private ulong endSectorField; + + private TrackIndexType[] indexesField; + + private TrackFlagsType flagsField; + + private string iSRCField; + + private TrackTypeTrackType trackType1Field; + + private uint bytesPerSectorField; + + private string accoustIDField; + + private ChecksumType[] checksumsField; + + private SubChannelType subChannelField; + + private PartitionType[] fileSystemInformationField; + + /// + public ImageType Image { + get { + return this.imageField; + } + set { + this.imageField = value; + } + } + + /// + public ulong Size { + get { + return this.sizeField; + } + set { + this.sizeField = value; + } + } + + /// + public TrackSequenceType Sequence { + get { + return this.sequenceField; + } + set { + this.sequenceField = value; + } + } + + /// + public string StartMSF { + get { + return this.startMSFField; + } + set { + this.startMSFField = value; + } + } + + /// + public string EndMSF { + get { + return this.endMSFField; + } + set { + this.endMSFField = value; + } + } + + /// + public ulong StartSector { + get { + return this.startSectorField; + } + set { + this.startSectorField = value; + } + } + + /// + public ulong EndSector { + get { + return this.endSectorField; + } + set { + this.endSectorField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Index", IsNullable=false)] + public TrackIndexType[] Indexes { + get { + return this.indexesField; + } + set { + this.indexesField = value; + } + } + + /// + public TrackFlagsType Flags { + get { + return this.flagsField; + } + set { + this.flagsField = value; + } + } + + /// + public string ISRC { + get { + return this.iSRCField; + } + set { + this.iSRCField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("TrackType")] + public TrackTypeTrackType TrackType1 { + get { + return this.trackType1Field; + } + set { + this.trackType1Field = value; + } + } + + /// + public uint BytesPerSector { + get { + return this.bytesPerSectorField; + } + set { + this.bytesPerSectorField = value; + } + } + + /// + public string AccoustID { + get { + return this.accoustIDField; + } + set { + this.accoustIDField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] Checksums { + get { + return this.checksumsField; + } + set { + this.checksumsField = value; + } + } + + /// + public SubChannelType SubChannel { + get { + return this.subChannelField; + } + set { + this.subChannelField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Partition", IsNullable=false)] + public PartitionType[] FileSystemInformation { + get { + return this.fileSystemInformationField; + } + set { + this.fileSystemInformationField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum TrackTypeTrackType { + + /// + audio, + + /// + mode0, + + /// + mode1, + + /// + mode2, + + /// + m2f1, + + /// + m2f2, + + /// + dvd, + + /// + hddvd, + + /// + bluray, + + /// + ddcd, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class PS3EncryptionType { + + private string keyField; + + private string serialField; + + /// + public string Key { + get { + return this.keyField; + } + set { + this.keyField = value; + } + } + + /// + public string Serial { + get { + return this.serialField; + } + set { + this.serialField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class XboxSecuritySectorsType { + + private uint requestVersionField; + + private uint requestNumberField; + + private DumpType securitySectorsField; + + /// + public uint RequestVersion { + get { + return this.requestVersionField; + } + set { + this.requestVersionField = value; + } + } + + /// + public uint RequestNumber { + get { + return this.requestNumberField; + } + set { + this.requestNumberField = value; + } + } + + /// + public DumpType SecuritySectors { + get { + return this.securitySectorsField; + } + set { + this.securitySectorsField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class XboxType { + + private DumpType pFIField; + + private DumpType dMIField; + + private XboxSecuritySectorsType[] securitySectorsField; + + /// + public DumpType PFI { + get { + return this.pFIField; + } + set { + this.pFIField = value; + } + } + + /// + public DumpType DMI { + get { + return this.dMIField; + } + set { + this.dMIField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("SecuritySectors")] + public XboxSecuritySectorsType[] SecuritySectors { + get { + return this.securitySectorsField; + } + set { + this.securitySectorsField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class BorderType { + + private string imageField; + + private ulong sizeField; + + private ChecksumType[] checksumsField; + + private uint sessionField; + + private bool sessionFieldSpecified; + + /// + public string Image { + get { + return this.imageField; + } + set { + this.imageField = value; + } + } + + /// + public ulong Size { + get { + return this.sizeField; + } + set { + this.sizeField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] Checksums { + get { + return this.checksumsField; + } + set { + this.checksumsField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public uint session { + get { + return this.sessionField; + } + set { + this.sessionField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool sessionSpecified { + get { + return this.sessionFieldSpecified; + } + set { + this.sessionFieldSpecified = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CaseType { + + private CaseTypeCaseType caseType1Field; + + private ScansType scansField; + + /// + [System.Xml.Serialization.XmlElementAttribute("CaseType")] + public CaseTypeCaseType CaseType1 { + get { + return this.caseType1Field; + } + set { + this.caseType1Field = value; + } + } + + /// + public ScansType Scans { + get { + return this.scansField; + } + set { + this.scansField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum CaseTypeCaseType { + + /// + jewel, + + /// + bigjewel, + + /// + slimjewel, + + /// + sleeve, + + /// + qpack, + + /// + digisleeve, + + /// + discboxslider, + + /// + compacplus, + + /// + keepcase, + + /// + snapcase, + + /// + softcase, + + /// + ecopack, + + /// + liftlock, + + /// + spindle, + + /// + ps2case, + + /// + ps3case, + + /// + bluraykeepcase, + + /// + pscase, + + /// + dccase, + + /// + saturncase, + + /// + xboxcase, + + /// + xbox360case, + + /// + xboxonecase, + + /// + saturnbigcase, + + /// + gccase, + + /// + wiicase, + + /// + unknown, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class LayeredTextType { + + private uint layerField; + + private bool layerFieldSpecified; + + private string valueField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public uint layer { + get { + return this.layerField; + } + set { + this.layerField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool layerSpecified { + get { + return this.layerFieldSpecified; + } + set { + this.layerFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlTextAttribute()] + public string Value { + get { + return this.valueField; + } + set { + this.valueField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class SectorsType { + + private uint layerField; + + private bool layerFieldSpecified; + + private ulong valueField; + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public uint layer { + get { + return this.layerField; + } + set { + this.layerField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool layerSpecified { + get { + return this.layerFieldSpecified; + } + set { + this.layerFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlTextAttribute()] + public ulong Value { + get { + return this.valueField; + } + set { + this.valueField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class LayersType { + + private SectorsType[] sectorsField; + + private LayersTypeType typeField; + + private bool typeFieldSpecified; + + /// + [System.Xml.Serialization.XmlElementAttribute("Sectors")] + public SectorsType[] Sectors { + get { + return this.sectorsField; + } + set { + this.sectorsField = value; + } + } + + /// + [System.Xml.Serialization.XmlAttributeAttribute()] + public LayersTypeType type { + get { + return this.typeField; + } + set { + this.typeField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool typeSpecified { + get { + return this.typeFieldSpecified; + } + set { + this.typeFieldSpecified = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum LayersTypeType { + + /// + PTP, + + /// + OTP, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class OpticalDiscType { + + private ImageType imageField; + + private ulong sizeField; + + private SequenceType sequenceField; + + private LayersType layersField; + + private ChecksumType[] checksumsField; + + private string partNumberField; + + private string serialNumberField; + + private LayeredTextType[] ringCodeField; + + private LayeredTextType[] masteringSIDField; + + private LayeredTextType[] toolstampField; + + private LayeredTextType[] mouldSIDField; + + private LayeredTextType[] mouldTextField; + + private string discTypeField; + + private string discSubTypeField; + + private int offsetField; + + private bool offsetFieldSpecified; + + private uint[] tracksField; + + private uint sessionsField; + + private string copyProtectionField; + + private DimensionsType dimensionsField; + + private CaseType caseField; + + private ScansType scansField; + + private DumpType pFIField; + + private DumpType dMIField; + + private DumpType cMIField; + + private DumpType bCAField; + + private DumpType aTIPField; + + private DumpType aDIPField; + + private DumpType pMAField; + + private DumpType dDSField; + + private DumpType sAIField; + + private DumpType lastRMDField; + + private DumpType pRIField; + + private DumpType mediaIDField; + + private DumpType pFIRField; + + private DumpType dCBField; + + private DumpType diField; + + private DumpType pACField; + + private DumpType tOCField; + + private DumpType leadInCdTextField; + + private BorderType[] firstTrackPregrapField; + + private BorderType[] leadInField; + + private BorderType[] leadOutField; + + private XboxType xboxField; + + private PS3EncryptionType pS3EncryptionField; + + private string mediaCatalogueNumberField; + + private TrackType[] trackField; + + private DumpHardwareType[] dumpHardwareArrayField; + + /// + public ImageType Image { + get { + return this.imageField; + } + set { + this.imageField = value; + } + } + + /// + public ulong Size { + get { + return this.sizeField; + } + set { + this.sizeField = value; + } + } + + /// + public SequenceType Sequence { + get { + return this.sequenceField; + } + set { + this.sequenceField = value; + } + } + + /// + public LayersType Layers { + get { + return this.layersField; + } + set { + this.layersField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] Checksums { + get { + return this.checksumsField; + } + set { + this.checksumsField = value; + } + } + + /// + public string PartNumber { + get { + return this.partNumberField; + } + set { + this.partNumberField = value; + } + } + + /// + public string SerialNumber { + get { + return this.serialNumberField; + } + set { + this.serialNumberField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("RingCode")] + public LayeredTextType[] RingCode { + get { + return this.ringCodeField; + } + set { + this.ringCodeField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("MasteringSID")] + public LayeredTextType[] MasteringSID { + get { + return this.masteringSIDField; + } + set { + this.masteringSIDField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("Toolstamp")] + public LayeredTextType[] Toolstamp { + get { + return this.toolstampField; + } + set { + this.toolstampField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("MouldSID")] + public LayeredTextType[] MouldSID { + get { + return this.mouldSIDField; + } + set { + this.mouldSIDField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("MouldText")] + public LayeredTextType[] MouldText { + get { + return this.mouldTextField; + } + set { + this.mouldTextField = value; + } + } + + /// + public string DiscType { + get { + return this.discTypeField; + } + set { + this.discTypeField = value; + } + } + + /// + public string DiscSubType { + get { + return this.discSubTypeField; + } + set { + this.discSubTypeField = value; + } + } + + /// + public int Offset { + get { + return this.offsetField; + } + set { + this.offsetField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool OffsetSpecified { + get { + return this.offsetFieldSpecified; + } + set { + this.offsetFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("Tracks")] + public uint[] Tracks { + get { + return this.tracksField; + } + set { + this.tracksField = value; + } + } + + /// + public uint Sessions { + get { + return this.sessionsField; + } + set { + this.sessionsField = value; + } + } + + /// + public string CopyProtection { + get { + return this.copyProtectionField; + } + set { + this.copyProtectionField = value; + } + } + + /// + public DimensionsType Dimensions { + get { + return this.dimensionsField; + } + set { + this.dimensionsField = value; + } + } + + /// + public CaseType Case { + get { + return this.caseField; + } + set { + this.caseField = value; + } + } + + /// + public ScansType Scans { + get { + return this.scansField; + } + set { + this.scansField = value; + } + } + + /// + public DumpType PFI { + get { + return this.pFIField; + } + set { + this.pFIField = value; + } + } + + /// + public DumpType DMI { + get { + return this.dMIField; + } + set { + this.dMIField = value; + } + } + + /// + public DumpType CMI { + get { + return this.cMIField; + } + set { + this.cMIField = value; + } + } + + /// + public DumpType BCA { + get { + return this.bCAField; + } + set { + this.bCAField = value; + } + } + + /// + public DumpType ATIP { + get { + return this.aTIPField; + } + set { + this.aTIPField = value; + } + } + + /// + public DumpType ADIP { + get { + return this.aDIPField; + } + set { + this.aDIPField = value; + } + } + + /// + public DumpType PMA { + get { + return this.pMAField; + } + set { + this.pMAField = value; + } + } + + /// + public DumpType DDS { + get { + return this.dDSField; + } + set { + this.dDSField = value; + } + } + + /// + public DumpType SAI { + get { + return this.sAIField; + } + set { + this.sAIField = value; + } + } + + /// + public DumpType LastRMD { + get { + return this.lastRMDField; + } + set { + this.lastRMDField = value; + } + } + + /// + public DumpType PRI { + get { + return this.pRIField; + } + set { + this.pRIField = value; + } + } + + /// + public DumpType MediaID { + get { + return this.mediaIDField; + } + set { + this.mediaIDField = value; + } + } + + /// + public DumpType PFIR { + get { + return this.pFIRField; + } + set { + this.pFIRField = value; + } + } + + /// + public DumpType DCB { + get { + return this.dCBField; + } + set { + this.dCBField = value; + } + } + + /// + public DumpType DI { + get { + return this.diField; + } + set { + this.diField = value; + } + } + + /// + public DumpType PAC { + get { + return this.pACField; + } + set { + this.pACField = value; + } + } + + /// + public DumpType TOC { + get { + return this.tOCField; + } + set { + this.tOCField = value; + } + } + + /// + public DumpType LeadInCdText { + get { + return this.leadInCdTextField; + } + set { + this.leadInCdTextField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("FirstTrackPregrap")] + public BorderType[] FirstTrackPregrap { + get { + return this.firstTrackPregrapField; + } + set { + this.firstTrackPregrapField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("LeadIn")] + public BorderType[] LeadIn { + get { + return this.leadInField; + } + set { + this.leadInField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("LeadOut")] + public BorderType[] LeadOut { + get { + return this.leadOutField; + } + set { + this.leadOutField = value; + } + } + + /// + public XboxType Xbox { + get { + return this.xboxField; + } + set { + this.xboxField = value; + } + } + + /// + public PS3EncryptionType PS3Encryption { + get { + return this.pS3EncryptionField; + } + set { + this.pS3EncryptionField = value; + } + } + + /// + public string MediaCatalogueNumber { + get { + return this.mediaCatalogueNumberField; + } + set { + this.mediaCatalogueNumberField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("Track")] + public TrackType[] Track { + get { + return this.trackField; + } + set { + this.trackField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("DumpHardware", IsNullable=false)] + public DumpHardwareType[] DumpHardwareArray { + get { + return this.dumpHardwareArrayField; + } + set { + this.dumpHardwareArrayField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class UserManualType { + + private LanguagesTypeLanguage[] languageField; + + private uint pagesField; + + private string pageSizeField; + + private ScanType scanField; + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Language", IsNullable=false)] + public LanguagesTypeLanguage[] Language { + get { + return this.languageField; + } + set { + this.languageField = value; + } + } + + /// + public uint Pages { + get { + return this.pagesField; + } + set { + this.pagesField = value; + } + } + + /// + public string PageSize { + get { + return this.pageSizeField; + } + set { + this.pageSizeField = value; + } + } + + /// + public ScanType Scan { + get { + return this.scanField; + } + set { + this.scanField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class RequiredOperatingSystemType { + + private string nameField; + + private string[] versionField; + + /// + public string Name { + get { + return this.nameField; + } + set { + this.nameField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute("Version")] + public string[] Version { + get { + return this.versionField; + } + set { + this.versionField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class BookType { + + private BarcodeType[] barcodesField; + + private CoverType coverField; + + private string nameField; + + private string editorialField; + + private string authorField; + + private System.DateTime publicationDateField; + + private bool publicationDateFieldSpecified; + + private LanguagesTypeLanguage[] languageField; + + private uint pagesField; + + private bool pagesFieldSpecified; + + private string pageSizeField; + + private ScanType scanField; + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Barcode", IsNullable=false)] + public BarcodeType[] Barcodes { + get { + return this.barcodesField; + } + set { + this.barcodesField = value; + } + } + + /// + public CoverType Cover { + get { + return this.coverField; + } + set { + this.coverField = value; + } + } + + /// + public string Name { + get { + return this.nameField; + } + set { + this.nameField = value; + } + } + + /// + public string Editorial { + get { + return this.editorialField; + } + set { + this.editorialField = value; + } + } + + /// + public string Author { + get { + return this.authorField; + } + set { + this.authorField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(DataType="date")] + public System.DateTime PublicationDate { + get { + return this.publicationDateField; + } + set { + this.publicationDateField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PublicationDateSpecified { + get { + return this.publicationDateFieldSpecified; + } + set { + this.publicationDateFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Language", IsNullable=false)] + public LanguagesTypeLanguage[] Language { + get { + return this.languageField; + } + set { + this.languageField = value; + } + } + + /// + public uint Pages { + get { + return this.pagesField; + } + set { + this.pagesField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PagesSpecified { + get { + return this.pagesFieldSpecified; + } + set { + this.pagesFieldSpecified = value; + } + } + + /// + public string PageSize { + get { + return this.pageSizeField; + } + set { + this.pageSizeField = value; + } + } + + /// + public ScanType Scan { + get { + return this.scanField; + } + set { + this.scanField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class CoverType { + + private FileType fileField; + + private ChecksumType[] checksumsField; + + private byte[] thumbnailField; + + /// + public FileType File { + get { + return this.fileField; + } + set { + this.fileField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Checksum", IsNullable=false)] + public ChecksumType[] Checksums { + get { + return this.checksumsField; + } + set { + this.checksumsField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")] + public byte[] Thumbnail { + get { + return this.thumbnailField; + } + set { + this.thumbnailField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class MagazineType { + + private BarcodeType[] barcodesField; + + private CoverType coverField; + + private string nameField; + + private string editorialField; + + private System.DateTime publicationDateField; + + private bool publicationDateFieldSpecified; + + private uint numberField; + + private bool numberFieldSpecified; + + private LanguagesTypeLanguage[] languageField; + + private uint pagesField; + + private bool pagesFieldSpecified; + + private string pageSizeField; + + private ScanType scanField; + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Barcode", IsNullable=false)] + public BarcodeType[] Barcodes { + get { + return this.barcodesField; + } + set { + this.barcodesField = value; + } + } + + /// + public CoverType Cover { + get { + return this.coverField; + } + set { + this.coverField = value; + } + } + + /// + public string Name { + get { + return this.nameField; + } + set { + this.nameField = value; + } + } + + /// + public string Editorial { + get { + return this.editorialField; + } + set { + this.editorialField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(DataType="date")] + public System.DateTime PublicationDate { + get { + return this.publicationDateField; + } + set { + this.publicationDateField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PublicationDateSpecified { + get { + return this.publicationDateFieldSpecified; + } + set { + this.publicationDateFieldSpecified = value; + } + } + + /// + public uint Number { + get { + return this.numberField; + } + set { + this.numberField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool NumberSpecified { + get { + return this.numberFieldSpecified; + } + set { + this.numberFieldSpecified = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("Language", IsNullable=false)] + public LanguagesTypeLanguage[] Language { + get { + return this.languageField; + } + set { + this.languageField = value; + } + } + + /// + public uint Pages { + get { + return this.pagesField; + } + set { + this.pagesField = value; + } + } + + /// + [System.Xml.Serialization.XmlIgnoreAttribute()] + public bool PagesSpecified { + get { + return this.pagesFieldSpecified; + } + set { + this.pagesFieldSpecified = value; + } + } + + /// + public string PageSize { + get { + return this.pageSizeField; + } + set { + this.pageSizeField = value; + } + } + + /// + public ScanType Scan { + get { + return this.scanField; + } + set { + this.scanField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "0.0.0.0")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)] + public enum ArchitecturesTypeArchitecture { + + /// + [System.Xml.Serialization.XmlEnumAttribute("4004")] + Item4004, + + /// + [System.Xml.Serialization.XmlEnumAttribute("4040")] + Item4040, + + /// + [System.Xml.Serialization.XmlEnumAttribute("6502")] + Item6502, + + /// + [System.Xml.Serialization.XmlEnumAttribute("65816")] + Item65816, + + /// + [System.Xml.Serialization.XmlEnumAttribute("8008")] + Item8008, + + /// + [System.Xml.Serialization.XmlEnumAttribute("8051")] + Item8051, + + /// + [System.Xml.Serialization.XmlEnumAttribute("8080")] + Item8080, + + /// + [System.Xml.Serialization.XmlEnumAttribute("8085")] + Item8085, + + /// + aarch64, + + /// + am29000, + + /// + amd64, + + /// + apx432, + + /// + arm, + + /// + avr, + + /// + avr32, + + /// + axp, + + /// + clipper, + + /// + cray, + + /// + esa390, + + /// + hobbit, + + /// + i86, + + /// + i860, + + /// + i960, + + /// + ia32, + + /// + ia64, + + /// + m56k, + + /// + m6800, + + /// + m6801, + + /// + m6805, + + /// + m6809, + + /// + m68k, + + /// + m88k, + + /// + mcs41, + + /// + mcs48, + + /// + mips32, + + /// + mips64, + + /// + msp430, + + /// + nios2, + + /// + openrisc, + + /// + parisc, + + /// + pdp1, + + /// + pdp10, + + /// + pdp11, + + /// + pdp7, + + /// + pdp8, + + /// + pic, + + /// + power, + + /// + ppc, + + /// + ppc64, + + /// + prism, + + /// + renesasrx, + + /// + riscv, + + /// + s360, + + /// + s370, + + /// + sh, + + /// + sh1, + + /// + sh2, + + /// + sh3, + + /// + sh4, + + /// + sh5, + + /// + sh64, + + /// + sparc, + + /// + sparc64, + + /// + transputer, + + /// + vax, + + /// + we32000, + + /// + x32, + + /// + z80, + + /// + z800, + + /// + z8000, + + /// + z80000, + + /// + zarch, + } +} diff --git a/CICMMetadata/dotnet/cicm.vb b/CICMMetadata/dotnet/cicm.vb new file mode 100644 index 0000000..ea33ddb --- /dev/null +++ b/CICMMetadata/dotnet/cicm.vb @@ -0,0 +1,9093 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict Off +Option Explicit On + + +' +'This source code was auto-generated by MonoXSD +' +Namespace Schemas + + ''' + _ + Partial Public Class CICMMetadataType + + Private developerField() As String + + Private publisherField() As String + + Private authorField() As String + + Private performerField() As String + + Private nameField As String + + Private versionField As String + + Private releaseTypeField As CICMMetadataTypeReleaseType + + Private releaseTypeFieldSpecified As Boolean + + Private releaseDateField As Date + + Private releaseDateFieldSpecified As Boolean + + Private barcodesField() As BarcodeType + + Private partNumberField As String + + Private serialNumberField As String + + Private keywordsField() As String + + Private magazineField() As MagazineType + + Private bookField() As BookType + + Private categoriesField() As String + + Private subcategoriesField() As String + + Private languagesField() As LanguagesTypeLanguage + + Private systemsField() As String + + Private architecturesField() As ArchitecturesTypeArchitecture + + Private requiredOperatingSystemsField() As RequiredOperatingSystemType + + Private userManualField() As UserManualType + + Private opticalDiscField() As OpticalDiscType + + Private advertisementField() As AdvertisementType + + Private linearMediaField() As LinearMediaType + + Private pCICardField() As PCIType + + Private blockMediaField() As BlockMediaType + + Private audioMediaField() As AudioMediaType + + ''' + _ + Public Property Developer() As String() + Get + Return Me.developerField + End Get + Set + Me.developerField = value + End Set + End Property + + ''' + _ + Public Property Publisher() As String() + Get + Return Me.publisherField + End Get + Set + Me.publisherField = value + End Set + End Property + + ''' + _ + Public Property Author() As String() + Get + Return Me.authorField + End Get + Set + Me.authorField = value + End Set + End Property + + ''' + _ + Public Property Performer() As String() + Get + Return Me.performerField + End Get + Set + Me.performerField = value + End Set + End Property + + ''' + Public Property Name() As String + Get + Return Me.nameField + End Get + Set + Me.nameField = value + End Set + End Property + + ''' + Public Property Version() As String + Get + Return Me.versionField + End Get + Set + Me.versionField = value + End Set + End Property + + ''' + Public Property ReleaseType() As CICMMetadataTypeReleaseType + Get + Return Me.releaseTypeField + End Get + Set + Me.releaseTypeField = value + End Set + End Property + + ''' + _ + Public Property ReleaseTypeSpecified() As Boolean + Get + Return Me.releaseTypeFieldSpecified + End Get + Set + Me.releaseTypeFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property ReleaseDate() As Date + Get + Return Me.releaseDateField + End Get + Set + Me.releaseDateField = value + End Set + End Property + + ''' + _ + Public Property ReleaseDateSpecified() As Boolean + Get + Return Me.releaseDateFieldSpecified + End Get + Set + Me.releaseDateFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property Barcodes() As BarcodeType() + Get + Return Me.barcodesField + End Get + Set + Me.barcodesField = value + End Set + End Property + + ''' + Public Property PartNumber() As String + Get + Return Me.partNumberField + End Get + Set + Me.partNumberField = value + End Set + End Property + + ''' + Public Property SerialNumber() As String + Get + Return Me.serialNumberField + End Get + Set + Me.serialNumberField = value + End Set + End Property + + ''' + _ + Public Property Keywords() As String() + Get + Return Me.keywordsField + End Get + Set + Me.keywordsField = value + End Set + End Property + + ''' + _ + Public Property Magazine() As MagazineType() + Get + Return Me.magazineField + End Get + Set + Me.magazineField = value + End Set + End Property + + ''' + _ + Public Property Book() As BookType() + Get + Return Me.bookField + End Get + Set + Me.bookField = value + End Set + End Property + + ''' + _ + Public Property Categories() As String() + Get + Return Me.categoriesField + End Get + Set + Me.categoriesField = value + End Set + End Property + + ''' + _ + Public Property Subcategories() As String() + Get + Return Me.subcategoriesField + End Get + Set + Me.subcategoriesField = value + End Set + End Property + + ''' + _ + Public Property Languages() As LanguagesTypeLanguage() + Get + Return Me.languagesField + End Get + Set + Me.languagesField = value + End Set + End Property + + ''' + _ + Public Property Systems() As String() + Get + Return Me.systemsField + End Get + Set + Me.systemsField = value + End Set + End Property + + ''' + _ + Public Property Architectures() As ArchitecturesTypeArchitecture() + Get + Return Me.architecturesField + End Get + Set + Me.architecturesField = value + End Set + End Property + + ''' + _ + Public Property RequiredOperatingSystems() As RequiredOperatingSystemType() + Get + Return Me.requiredOperatingSystemsField + End Get + Set + Me.requiredOperatingSystemsField = value + End Set + End Property + + ''' + _ + Public Property UserManual() As UserManualType() + Get + Return Me.userManualField + End Get + Set + Me.userManualField = value + End Set + End Property + + ''' + _ + Public Property OpticalDisc() As OpticalDiscType() + Get + Return Me.opticalDiscField + End Get + Set + Me.opticalDiscField = value + End Set + End Property + + ''' + _ + Public Property Advertisement() As AdvertisementType() + Get + Return Me.advertisementField + End Get + Set + Me.advertisementField = value + End Set + End Property + + ''' + _ + Public Property LinearMedia() As LinearMediaType() + Get + Return Me.linearMediaField + End Get + Set + Me.linearMediaField = value + End Set + End Property + + ''' + _ + Public Property PCICard() As PCIType() + Get + Return Me.pCICardField + End Get + Set + Me.pCICardField = value + End Set + End Property + + ''' + _ + Public Property BlockMedia() As BlockMediaType() + Get + Return Me.blockMediaField + End Get + Set + Me.blockMediaField = value + End Set + End Property + + ''' + _ + Public Property AudioMedia() As AudioMediaType() + Get + Return Me.audioMediaField + End Get + Set + Me.audioMediaField = value + End Set + End Property + End Class + + ''' + _ + Public Enum CICMMetadataTypeReleaseType + + ''' + Retail + + ''' + Bundle + + ''' + Coverdisc + + ''' + Subscription + + ''' + Demo + + ''' + OEM + + ''' + Shareware + + ''' + FOSS + + ''' + Adware + + ''' + Donationware + + ''' + _ + Digitaldownload + + ''' + SaaS + End Enum + + ''' + _ + Partial Public Class BarcodeType + + Private typeField As BarcodeTypeType + + Private valueField As String + + ''' + _ + Public Property type() As BarcodeTypeType + Get + Return Me.typeField + End Get + Set + Me.typeField = value + End Set + End Property + + ''' + _ + Public Property Value() As String + Get + Return Me.valueField + End Get + Set + Me.valueField = value + End Set + End Property + End Class + + ''' + _ + Public Enum BarcodeTypeType + + ''' + aztec + + ''' + codabar + + ''' + code11 + + ''' + code128 + + ''' + code39 + + ''' + code93 + + ''' + cpcbinary + + ''' + ezcode + + ''' + fim + + ''' + itf + + ''' + itf14 + + ''' + ean13 + + ''' + ean8 + + ''' + maxicode + + ''' + isbn + + ''' + isrc + + ''' + msi + + ''' + tof + + ''' + shotcode + + ''' + rm4scc + + ''' + qr + + ''' + ean5 + + ''' + ean2 + + ''' + _ + qr1 + + ''' + postnet + + ''' + postbar + + ''' + plessey + + ''' + pharmacode + + ''' + pdf417 + + ''' + patchcode + End Enum + + ''' + _ + Partial Public Class AudioBlockType + + Private imageField As ImageType + + Private sizeField As ULong + + Private accoustIDField As String + + Private checksumsField() As ChecksumType + + Private formatField As String + + ''' + Public Property Image() As ImageType + Get + Return Me.imageField + End Get + Set + Me.imageField = value + End Set + End Property + + ''' + Public Property Size() As ULong + Get + Return Me.sizeField + End Get + Set + Me.sizeField = value + End Set + End Property + + ''' + Public Property AccoustID() As String + Get + Return Me.accoustIDField + End Get + Set + Me.accoustIDField = value + End Set + End Property + + ''' + _ + Public Property Checksums() As ChecksumType() + Get + Return Me.checksumsField + End Get + Set + Me.checksumsField = value + End Set + End Property + + ''' + Public Property Format() As String + Get + Return Me.formatField + End Get + Set + Me.formatField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class ImageType + + Private formatField As String + + Private offsetField As ULong + + Private offsetFieldSpecified As Boolean + + Private valueField As String + + ''' + _ + Public Property format() As String + Get + Return Me.formatField + End Get + Set + Me.formatField = value + End Set + End Property + + ''' + _ + Public Property offset() As ULong + Get + Return Me.offsetField + End Get + Set + Me.offsetField = value + End Set + End Property + + ''' + _ + Public Property offsetSpecified() As Boolean + Get + Return Me.offsetFieldSpecified + End Get + Set + Me.offsetFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property Value() As String + Get + Return Me.valueField + End Get + Set + Me.valueField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class ChecksumType + + Private typeField As ChecksumTypeType + + Private valueField As String + + ''' + _ + Public Property type() As ChecksumTypeType + Get + Return Me.typeField + End Get + Set + Me.typeField = value + End Set + End Property + + ''' + _ + Public Property Value() As String + Get + Return Me.valueField + End Get + Set + Me.valueField = value + End Set + End Property + End Class + + ''' + _ + Public Enum ChecksumTypeType + + ''' + fletcher16 + + ''' + fletcher32 + + ''' + adler32 + + ''' + crc16 + + ''' + crc16ccitt + + ''' + crc32 + + ''' + crc64 + + ''' + md4 + + ''' + md5 + + ''' + dm6 + + ''' + ripemd128 + + ''' + ripemd160 + + ''' + ripemed320 + + ''' + sha1 + + ''' + sha224 + + ''' + sha256 + + ''' + sha384 + + ''' + sha512 + + ''' + sha3 + + ''' + skein + + ''' + snefru + + ''' + blake256 + + ''' + blake512 + + ''' + tiger + + ''' + whirlpool + + ''' + spamsum + End Enum + + ''' + _ + Partial Public Class AudioMediaType + + Private imageField As ImageType + + Private sizeField As ULong + + Private checksumsField() As ChecksumType + + Private sequenceField As SequenceType + + Private partNumberField As String + + Private serialNumberField As String + + Private manufacturerField As String + + Private modelField As String + + Private accoustIDField As String + + Private blockField() As AudioBlockType + + Private copyProtectionField As String + + Private dimensionsField As DimensionsType + + Private scansField As ScansType + + Private dumpHardwareArrayField() As DumpHardwareType + + ''' + Public Property Image() As ImageType + Get + Return Me.imageField + End Get + Set + Me.imageField = value + End Set + End Property + + ''' + Public Property Size() As ULong + Get + Return Me.sizeField + End Get + Set + Me.sizeField = value + End Set + End Property + + ''' + _ + Public Property Checksums() As ChecksumType() + Get + Return Me.checksumsField + End Get + Set + Me.checksumsField = value + End Set + End Property + + ''' + Public Property Sequence() As SequenceType + Get + Return Me.sequenceField + End Get + Set + Me.sequenceField = value + End Set + End Property + + ''' + Public Property PartNumber() As String + Get + Return Me.partNumberField + End Get + Set + Me.partNumberField = value + End Set + End Property + + ''' + Public Property SerialNumber() As String + Get + Return Me.serialNumberField + End Get + Set + Me.serialNumberField = value + End Set + End Property + + ''' + Public Property Manufacturer() As String + Get + Return Me.manufacturerField + End Get + Set + Me.manufacturerField = value + End Set + End Property + + ''' + Public Property Model() As String + Get + Return Me.modelField + End Get + Set + Me.modelField = value + End Set + End Property + + ''' + Public Property AccoustID() As String + Get + Return Me.accoustIDField + End Get + Set + Me.accoustIDField = value + End Set + End Property + + ''' + _ + Public Property Block() As AudioBlockType() + Get + Return Me.blockField + End Get + Set + Me.blockField = value + End Set + End Property + + ''' + Public Property CopyProtection() As String + Get + Return Me.copyProtectionField + End Get + Set + Me.copyProtectionField = value + End Set + End Property + + ''' + Public Property Dimensions() As DimensionsType + Get + Return Me.dimensionsField + End Get + Set + Me.dimensionsField = value + End Set + End Property + + ''' + Public Property Scans() As ScansType + Get + Return Me.scansField + End Get + Set + Me.scansField = value + End Set + End Property + + ''' + _ + Public Property DumpHardwareArray() As DumpHardwareType() + Get + Return Me.dumpHardwareArrayField + End Get + Set + Me.dumpHardwareArrayField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class SequenceType + + Private mediaTitleField As String + + Private mediaSequenceField As UInteger + + Private totalMediaField As UInteger + + Private sideField As Byte + + Private sideFieldSpecified As Boolean + + Private layerField As Byte + + Private layerFieldSpecified As Boolean + + ''' + Public Property MediaTitle() As String + Get + Return Me.mediaTitleField + End Get + Set + Me.mediaTitleField = value + End Set + End Property + + ''' + Public Property MediaSequence() As UInteger + Get + Return Me.mediaSequenceField + End Get + Set + Me.mediaSequenceField = value + End Set + End Property + + ''' + Public Property TotalMedia() As UInteger + Get + Return Me.totalMediaField + End Get + Set + Me.totalMediaField = value + End Set + End Property + + ''' + Public Property Side() As Byte + Get + Return Me.sideField + End Get + Set + Me.sideField = value + End Set + End Property + + ''' + _ + Public Property SideSpecified() As Boolean + Get + Return Me.sideFieldSpecified + End Get + Set + Me.sideFieldSpecified = value + End Set + End Property + + ''' + Public Property Layer() As Byte + Get + Return Me.layerField + End Get + Set + Me.layerField = value + End Set + End Property + + ''' + _ + Public Property LayerSpecified() As Boolean + Get + Return Me.layerFieldSpecified + End Get + Set + Me.layerFieldSpecified = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class DimensionsType + + Private diameterField As Double + + Private diameterFieldSpecified As Boolean + + Private heightField As Double + + Private heightFieldSpecified As Boolean + + Private widthField As Double + + Private widthFieldSpecified As Boolean + + Private thicknessField As Double + + ''' + Public Property Diameter() As Double + Get + Return Me.diameterField + End Get + Set + Me.diameterField = value + End Set + End Property + + ''' + _ + Public Property DiameterSpecified() As Boolean + Get + Return Me.diameterFieldSpecified + End Get + Set + Me.diameterFieldSpecified = value + End Set + End Property + + ''' + Public Property Height() As Double + Get + Return Me.heightField + End Get + Set + Me.heightField = value + End Set + End Property + + ''' + _ + Public Property HeightSpecified() As Boolean + Get + Return Me.heightFieldSpecified + End Get + Set + Me.heightFieldSpecified = value + End Set + End Property + + ''' + Public Property Width() As Double + Get + Return Me.widthField + End Get + Set + Me.widthField = value + End Set + End Property + + ''' + _ + Public Property WidthSpecified() As Boolean + Get + Return Me.widthFieldSpecified + End Get + Set + Me.widthFieldSpecified = value + End Set + End Property + + ''' + Public Property Thickness() As Double + Get + Return Me.thicknessField + End Get + Set + Me.thicknessField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class ScansType + + Private caseScanField As CaseScanType + + Private scanField As MediaScanType + + ''' + Public Property CaseScan() As CaseScanType + Get + Return Me.caseScanField + End Get + Set + Me.caseScanField = value + End Set + End Property + + ''' + Public Property Scan() As MediaScanType + Get + Return Me.scanField + End Get + Set + Me.scanField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class CaseScanType + + Private caseScanElementField As CaseScanTypeCaseScanElement + + Private scanField As ScanType + + ''' + Public Property CaseScanElement() As CaseScanTypeCaseScanElement + Get + Return Me.caseScanElementField + End Get + Set + Me.caseScanElementField = value + End Set + End Property + + ''' + Public Property Scan() As ScanType + Get + Return Me.scanField + End Get + Set + Me.scanField = value + End Set + End Property + End Class + + ''' + _ + Public Enum CaseScanTypeCaseScanElement + + ''' + sleeve + + ''' + inner + + ''' + inlay + + ''' + frontback + + ''' + frontfull + + ''' + boxfront + + ''' + boxback + + ''' + boxspine + + ''' + external + End Enum + + ''' + _ + Partial Public Class ScanType + + Private fileField As FileType + + Private checksumsField() As ChecksumType + + Private scannerField() As ScannerType + + Private scanProcessingField() As ScanProcessingType + + Private oCRField() As OCRType + + ''' + Public Property File() As FileType + Get + Return Me.fileField + End Get + Set + Me.fileField = value + End Set + End Property + + ''' + _ + Public Property Checksums() As ChecksumType() + Get + Return Me.checksumsField + End Get + Set + Me.checksumsField = value + End Set + End Property + + ''' + _ + Public Property Scanner() As ScannerType() + Get + Return Me.scannerField + End Get + Set + Me.scannerField = value + End Set + End Property + + ''' + _ + Public Property ScanProcessing() As ScanProcessingType() + Get + Return Me.scanProcessingField + End Get + Set + Me.scanProcessingField = value + End Set + End Property + + ''' + _ + Public Property OCR() As OCRType() + Get + Return Me.oCRField + End Get + Set + Me.oCRField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class FileType + + Private formatField As String + + Private valueField As String + + ''' + _ + Public Property format() As String + Get + Return Me.formatField + End Get + Set + Me.formatField = value + End Set + End Property + + ''' + _ + Public Property Value() As String + Get + Return Me.valueField + End Get + Set + Me.valueField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class ScannerType + + Private authorField As String + + Private manufacturerField As String + + Private modelField As String + + Private serialField As String + + Private softwareField As String + + Private softwareVersionField As String + + ''' + Public Property Author() As String + Get + Return Me.authorField + End Get + Set + Me.authorField = value + End Set + End Property + + ''' + Public Property Manufacturer() As String + Get + Return Me.manufacturerField + End Get + Set + Me.manufacturerField = value + End Set + End Property + + ''' + Public Property Model() As String + Get + Return Me.modelField + End Get + Set + Me.modelField = value + End Set + End Property + + ''' + Public Property Serial() As String + Get + Return Me.serialField + End Get + Set + Me.serialField = value + End Set + End Property + + ''' + Public Property Software() As String + Get + Return Me.softwareField + End Get + Set + Me.softwareField = value + End Set + End Property + + ''' + Public Property SoftwareVersion() As String + Get + Return Me.softwareVersionField + End Get + Set + Me.softwareVersionField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class ScanProcessingType + + Private authorField As String + + Private softwareField As String + + Private softwareVersionField As String + + ''' + Public Property Author() As String + Get + Return Me.authorField + End Get + Set + Me.authorField = value + End Set + End Property + + ''' + Public Property Software() As String + Get + Return Me.softwareField + End Get + Set + Me.softwareField = value + End Set + End Property + + ''' + Public Property SoftwareVersion() As String + Get + Return Me.softwareVersionField + End Get + Set + Me.softwareVersionField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class OCRType + + Private authorField As String + + Private softwareField As String + + Private softwareVersionField As String + + Private languageField() As LanguagesTypeLanguage + + ''' + Public Property Author() As String + Get + Return Me.authorField + End Get + Set + Me.authorField = value + End Set + End Property + + ''' + Public Property Software() As String + Get + Return Me.softwareField + End Get + Set + Me.softwareField = value + End Set + End Property + + ''' + Public Property SoftwareVersion() As String + Get + Return Me.softwareVersionField + End Get + Set + Me.softwareVersionField = value + End Set + End Property + + ''' + _ + Public Property Language() As LanguagesTypeLanguage() + Get + Return Me.languageField + End Get + Set + Me.languageField = value + End Set + End Property + End Class + + ''' + _ + Public Enum LanguagesTypeLanguage + + ''' + aar + + ''' + abk + + ''' + ace + + ''' + ach + + ''' + ada + + ''' + ady + + ''' + afa + + ''' + afh + + ''' + afr + + ''' + ain + + ''' + aka + + ''' + akk + + ''' + alb + + ''' + ale + + ''' + alg + + ''' + alt + + ''' + amh + + ''' + ang + + ''' + anp + + ''' + apa + + ''' + ara + + ''' + arc + + ''' + arg + + ''' + arm + + ''' + arn + + ''' + arp + + ''' + art + + ''' + arw + + ''' + asm + + ''' + ast + + ''' + ath + + ''' + aus + + ''' + ava + + ''' + ave + + ''' + awa + + ''' + aym + + ''' + aze + + ''' + bad + + ''' + bai + + ''' + bak + + ''' + bal + + ''' + bam + + ''' + ban + + ''' + baq + + ''' + bas + + ''' + bat + + ''' + bej + + ''' + bel + + ''' + bem + + ''' + ben + + ''' + ber + + ''' + bho + + ''' + bih + + ''' + bik + + ''' + bin + + ''' + bis + + ''' + bla + + ''' + bnt + + ''' + bos + + ''' + bra + + ''' + bre + + ''' + btk + + ''' + bua + + ''' + bug + + ''' + bul + + ''' + bur + + ''' + byn + + ''' + cad + + ''' + cai + + ''' + car + + ''' + cat + + ''' + cau + + ''' + ceb + + ''' + cel + + ''' + cha + + ''' + chb + + ''' + che + + ''' + chg + + ''' + chi + + ''' + chk + + ''' + chm + + ''' + chn + + ''' + cho + + ''' + chp + + ''' + chr + + ''' + chu + + ''' + chv + + ''' + chy + + ''' + cmc + + ''' + cop + + ''' + cor + + ''' + cos + + ''' + cpe + + ''' + cpf + + ''' + cpp + + ''' + cre + + ''' + crh + + ''' + crp + + ''' + csb + + ''' + cus + + ''' + cze + + ''' + dak + + ''' + dan + + ''' + dar + + ''' + day + + ''' + del + + ''' + den + + ''' + dgr + + ''' + din + + ''' + div + + ''' + doi + + ''' + dra + + ''' + dsb + + ''' + dua + + ''' + dum + + ''' + dut + + ''' + dyu + + ''' + dzo + + ''' + efi + + ''' + egy + + ''' + eka + + ''' + elx + + ''' + eng + + ''' + enm + + ''' + epo + + ''' + est + + ''' + ewe + + ''' + ewo + + ''' + fan + + ''' + fao + + ''' + fat + + ''' + fij + + ''' + fil + + ''' + fin + + ''' + fiu + + ''' + fon + + ''' + fre + + ''' + frm + + ''' + fro + + ''' + frr + + ''' + frs + + ''' + fry + + ''' + ful + + ''' + fur + + ''' + gaa + + ''' + gay + + ''' + gba + + ''' + gem + + ''' + geo + + ''' + ger + + ''' + gez + + ''' + gil + + ''' + gla + + ''' + gle + + ''' + glg + + ''' + glv + + ''' + gmh + + ''' + goh + + ''' + gon + + ''' + gor + + ''' + got + + ''' + grb + + ''' + grc + + ''' + gre + + ''' + grn + + ''' + gsw + + ''' + guj + + ''' + gwi + + ''' + hai + + ''' + hat + + ''' + hau + + ''' + haw + + ''' + heb + + ''' + her + + ''' + hil + + ''' + him + + ''' + hin + + ''' + hit + + ''' + hmn + + ''' + hmo + + ''' + hrv + + ''' + hsb + + ''' + hun + + ''' + hup + + ''' + iba + + ''' + ibo + + ''' + ice + + ''' + ido + + ''' + iii + + ''' + ijo + + ''' + iku + + ''' + ile + + ''' + ilo + + ''' + ina + + ''' + inc + + ''' + ind + + ''' + ine + + ''' + inh + + ''' + ipk + + ''' + ira + + ''' + iro + + ''' + ita + + ''' + jav + + ''' + jbo + + ''' + jpn + + ''' + jpr + + ''' + jrb + + ''' + kaa + + ''' + kab + + ''' + kac + + ''' + kal + + ''' + kam + + ''' + kan + + ''' + kar + + ''' + kas + + ''' + kau + + ''' + kaw + + ''' + kaz + + ''' + kbd + + ''' + kha + + ''' + khi + + ''' + khm + + ''' + kho + + ''' + kik + + ''' + kin + + ''' + kir + + ''' + kmb + + ''' + kok + + ''' + kom + + ''' + kon + + ''' + kor + + ''' + kos + + ''' + kpe + + ''' + krc + + ''' + krl + + ''' + kro + + ''' + kru + + ''' + kua + + ''' + kum + + ''' + kur + + ''' + kut + + ''' + lad + + ''' + lah + + ''' + lam + + ''' + lao + + ''' + lat + + ''' + lav + + ''' + lez + + ''' + lim + + ''' + lin + + ''' + lit + + ''' + lol + + ''' + loz + + ''' + ltz + + ''' + lua + + ''' + lub + + ''' + lug + + ''' + lui + + ''' + lun + + ''' + luo + + ''' + lus + + ''' + mac + + ''' + mad + + ''' + mag + + ''' + mah + + ''' + mai + + ''' + mak + + ''' + mal + + ''' + man + + ''' + mao + + ''' + map + + ''' + mar + + ''' + mas + + ''' + may + + ''' + mdf + + ''' + mdr + + ''' + men + + ''' + mga + + ''' + mic + + ''' + min + + ''' + mis + + ''' + mkh + + ''' + mlg + + ''' + mlt + + ''' + mnc + + ''' + mni + + ''' + mno + + ''' + moh + + ''' + mon + + ''' + mos + + ''' + mul + + ''' + mun + + ''' + mus + + ''' + mwl + + ''' + mwr + + ''' + myn + + ''' + myv + + ''' + nah + + ''' + nai + + ''' + nap + + ''' + nau + + ''' + nav + + ''' + nbl + + ''' + nde + + ''' + ndo + + ''' + nds + + ''' + nep + + ''' + [new] + + ''' + nia + + ''' + nic + + ''' + niu + + ''' + nno + + ''' + nob + + ''' + nog + + ''' + non + + ''' + nor + + ''' + nqo + + ''' + nso + + ''' + nub + + ''' + nwc + + ''' + nya + + ''' + nym + + ''' + nyn + + ''' + nyo + + ''' + nzi + + ''' + oci + + ''' + oji + + ''' + ori + + ''' + orm + + ''' + osa + + ''' + oss + + ''' + ota + + ''' + oto + + ''' + paa + + ''' + pag + + ''' + pal + + ''' + pam + + ''' + pan + + ''' + pap + + ''' + pau + + ''' + peo + + ''' + per + + ''' + phi + + ''' + phn + + ''' + pli + + ''' + pol + + ''' + pon + + ''' + por + + ''' + pra + + ''' + pro + + ''' + pus + + ''' + _ + qaaqtz + + ''' + que + + ''' + raj + + ''' + rap + + ''' + rar + + ''' + roa + + ''' + roh + + ''' + rom + + ''' + rum + + ''' + run + + ''' + rup + + ''' + rus + + ''' + sad + + ''' + sag + + ''' + sah + + ''' + sai + + ''' + sal + + ''' + sam + + ''' + san + + ''' + sas + + ''' + sat + + ''' + scn + + ''' + sco + + ''' + sel + + ''' + sem + + ''' + sga + + ''' + sgn + + ''' + shn + + ''' + sid + + ''' + sin + + ''' + sio + + ''' + sit + + ''' + sla + + ''' + slo + + ''' + slv + + ''' + sma + + ''' + sme + + ''' + smi + + ''' + smj + + ''' + smn + + ''' + smo + + ''' + sms + + ''' + sna + + ''' + snd + + ''' + snk + + ''' + sog + + ''' + som + + ''' + son + + ''' + sot + + ''' + spa + + ''' + srd + + ''' + srn + + ''' + srp + + ''' + srr + + ''' + ssa + + ''' + ssw + + ''' + suk + + ''' + sun + + ''' + sus + + ''' + sux + + ''' + swa + + ''' + swe + + ''' + syc + + ''' + syr + + ''' + tah + + ''' + tai + + ''' + tam + + ''' + tat + + ''' + tel + + ''' + tem + + ''' + ter + + ''' + tet + + ''' + tgk + + ''' + tgl + + ''' + tha + + ''' + tib + + ''' + tig + + ''' + tir + + ''' + tiv + + ''' + tkl + + ''' + tlh + + ''' + tli + + ''' + tmh + + ''' + tog + + ''' + ton + + ''' + tpi + + ''' + tsi + + ''' + tsn + + ''' + tso + + ''' + tuk + + ''' + tum + + ''' + tup + + ''' + tur + + ''' + tut + + ''' + tvl + + ''' + twi + + ''' + tyv + + ''' + udm + + ''' + uga + + ''' + uig + + ''' + ukr + + ''' + umb + + ''' + und + + ''' + urd + + ''' + uzb + + ''' + vai + + ''' + ven + + ''' + vie + + ''' + vol + + ''' + vot + + ''' + wak + + ''' + wal + + ''' + war + + ''' + was + + ''' + wel + + ''' + wen + + ''' + wln + + ''' + wol + + ''' + xal + + ''' + xho + + ''' + yao + + ''' + yap + + ''' + yid + + ''' + yor + + ''' + ypk + + ''' + zap + + ''' + zbl + + ''' + zen + + ''' + zgh + + ''' + zha + + ''' + znd + + ''' + zul + + ''' + zun + + ''' + zxx + + ''' + zza + End Enum + + ''' + _ + Partial Public Class MediaScanType + + Private mediaScanElementField As MediaScanTypeMediaScanElement + + Private scanField As ScanType + + ''' + Public Property MediaScanElement() As MediaScanTypeMediaScanElement + Get + Return Me.mediaScanElementField + End Get + Set + Me.mediaScanElementField = value + End Set + End Property + + ''' + Public Property Scan() As ScanType + Get + Return Me.scanField + End Get + Set + Me.scanField = value + End Set + End Property + End Class + + ''' + _ + Public Enum MediaScanTypeMediaScanElement + + ''' + up + + ''' + down + + ''' + front + + ''' + back + + ''' + left + + ''' + right + End Enum + + ''' + _ + Partial Public Class DumpHardwareType + + Private manufacturerField As String + + Private modelField As String + + Private revisionField As String + + Private firmwareField As String + + Private serialField As String + + Private extentsField() As ExtentType + + Private softwareField As SoftwareType + + ''' + Public Property Manufacturer() As String + Get + Return Me.manufacturerField + End Get + Set + Me.manufacturerField = value + End Set + End Property + + ''' + Public Property Model() As String + Get + Return Me.modelField + End Get + Set + Me.modelField = value + End Set + End Property + + ''' + Public Property Revision() As String + Get + Return Me.revisionField + End Get + Set + Me.revisionField = value + End Set + End Property + + ''' + Public Property Firmware() As String + Get + Return Me.firmwareField + End Get + Set + Me.firmwareField = value + End Set + End Property + + ''' + Public Property Serial() As String + Get + Return Me.serialField + End Get + Set + Me.serialField = value + End Set + End Property + + ''' + _ + Public Property Extents() As ExtentType() + Get + Return Me.extentsField + End Get + Set + Me.extentsField = value + End Set + End Property + + ''' + Public Property Software() As SoftwareType + Get + Return Me.softwareField + End Get + Set + Me.softwareField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class ExtentType + + Private startField As ULong + + Private endField As ULong + + ''' + Public Property Start() As ULong + Get + Return Me.startField + End Get + Set + Me.startField = value + End Set + End Property + + ''' + Public Property [End]() As ULong + Get + Return Me.endField + End Get + Set + Me.endField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class SoftwareType + + Private nameField As String + + Private versionField As String + + Private operatingSystemField As String + + ''' + Public Property Name() As String + Get + Return Me.nameField + End Get + Set + Me.nameField = value + End Set + End Property + + ''' + Public Property Version() As String + Get + Return Me.versionField + End Get + Set + Me.versionField = value + End Set + End Property + + ''' + Public Property OperatingSystem() As String + Get + Return Me.operatingSystemField + End Get + Set + Me.operatingSystemField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class BlockTrackType + + Private imageField As ImageType + + Private sizeField As ULong + + Private headField As UShort + + Private cylinderField As UInteger + + Private startSectorField As ULong + + Private endSectorField As ULong + + Private sectorsField As ULong + + Private bytesPerSectorField As UInteger + + Private checksumsField() As ChecksumType + + Private formatField As String + + ''' + Public Property Image() As ImageType + Get + Return Me.imageField + End Get + Set + Me.imageField = value + End Set + End Property + + ''' + Public Property Size() As ULong + Get + Return Me.sizeField + End Get + Set + Me.sizeField = value + End Set + End Property + + ''' + Public Property Head() As UShort + Get + Return Me.headField + End Get + Set + Me.headField = value + End Set + End Property + + ''' + Public Property Cylinder() As UInteger + Get + Return Me.cylinderField + End Get + Set + Me.cylinderField = value + End Set + End Property + + ''' + Public Property StartSector() As ULong + Get + Return Me.startSectorField + End Get + Set + Me.startSectorField = value + End Set + End Property + + ''' + Public Property EndSector() As ULong + Get + Return Me.endSectorField + End Get + Set + Me.endSectorField = value + End Set + End Property + + ''' + Public Property Sectors() As ULong + Get + Return Me.sectorsField + End Get + Set + Me.sectorsField = value + End Set + End Property + + ''' + Public Property BytesPerSector() As UInteger + Get + Return Me.bytesPerSectorField + End Get + Set + Me.bytesPerSectorField = value + End Set + End Property + + ''' + _ + Public Property Checksums() As ChecksumType() + Get + Return Me.checksumsField + End Get + Set + Me.checksumsField = value + End Set + End Property + + ''' + Public Property Format() As String + Get + Return Me.formatField + End Get + Set + Me.formatField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class USBType + + Private vendorIDField As UShort + + Private productIDField As UShort + + Private descriptorsField As DumpType + + ''' + Public Property VendorID() As UShort + Get + Return Me.vendorIDField + End Get + Set + Me.vendorIDField = value + End Set + End Property + + ''' + Public Property ProductID() As UShort + Get + Return Me.productIDField + End Get + Set + Me.productIDField = value + End Set + End Property + + ''' + Public Property Descriptors() As DumpType + Get + Return Me.descriptorsField + End Get + Set + Me.descriptorsField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class DumpType + + Private imageField As String + + Private sizeField As ULong + + Private checksumsField() As ChecksumType + + ''' + Public Property Image() As String + Get + Return Me.imageField + End Get + Set + Me.imageField = value + End Set + End Property + + ''' + Public Property Size() As ULong + Get + Return Me.sizeField + End Get + Set + Me.sizeField = value + End Set + End Property + + ''' + _ + Public Property Checksums() As ChecksumType() + Get + Return Me.checksumsField + End Get + Set + Me.checksumsField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class EVPDType + + Private imageField As String + + Private sizeField As ULong + + Private checksumsField() As ChecksumType + + Private pageField As Byte + + Private pageFieldSpecified As Boolean + + ''' + Public Property Image() As String + Get + Return Me.imageField + End Get + Set + Me.imageField = value + End Set + End Property + + ''' + Public Property Size() As ULong + Get + Return Me.sizeField + End Get + Set + Me.sizeField = value + End Set + End Property + + ''' + _ + Public Property Checksums() As ChecksumType() + Get + Return Me.checksumsField + End Get + Set + Me.checksumsField = value + End Set + End Property + + ''' + _ + Public Property page() As Byte + Get + Return Me.pageField + End Get + Set + Me.pageField = value + End Set + End Property + + ''' + _ + Public Property pageSpecified() As Boolean + Get + Return Me.pageFieldSpecified + End Get + Set + Me.pageFieldSpecified = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class SCSIType + + Private inquiryField As DumpType + + Private eVPDField() As EVPDType + + Private modeSenseField As DumpType + + Private modeSense10Field As DumpType + + Private logSenseField As DumpType + + ''' + Public Property Inquiry() As DumpType + Get + Return Me.inquiryField + End Get + Set + Me.inquiryField = value + End Set + End Property + + ''' + _ + Public Property EVPD() As EVPDType() + Get + Return Me.eVPDField + End Get + Set + Me.eVPDField = value + End Set + End Property + + ''' + Public Property ModeSense() As DumpType + Get + Return Me.modeSenseField + End Get + Set + Me.modeSenseField = value + End Set + End Property + + ''' + Public Property ModeSense10() As DumpType + Get + Return Me.modeSense10Field + End Get + Set + Me.modeSense10Field = value + End Set + End Property + + ''' + Public Property LogSense() As DumpType + Get + Return Me.logSenseField + End Get + Set + Me.logSenseField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class MultiMediaCardType + + Private cIDField As DumpType + + Private cSDField As DumpType + + Private extendedCSDField As DumpType + + Private oCRField As DumpType + + ''' + Public Property CID() As DumpType + Get + Return Me.cIDField + End Get + Set + Me.cIDField = value + End Set + End Property + + ''' + Public Property CSD() As DumpType + Get + Return Me.cSDField + End Get + Set + Me.cSDField = value + End Set + End Property + + ''' + Public Property ExtendedCSD() As DumpType + Get + Return Me.extendedCSDField + End Get + Set + Me.extendedCSDField = value + End Set + End Property + + ''' + Public Property OCR() As DumpType + Get + Return Me.oCRField + End Get + Set + Me.oCRField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class SecureDigitalType + + Private cIDField As DumpType + + Private cSDField As DumpType + + Private sCRField As DumpType + + Private oCRField As DumpType + + ''' + Public Property CID() As DumpType + Get + Return Me.cIDField + End Get + Set + Me.cIDField = value + End Set + End Property + + ''' + Public Property CSD() As DumpType + Get + Return Me.cSDField + End Get + Set + Me.cSDField = value + End Set + End Property + + ''' + Public Property SCR() As DumpType + Get + Return Me.sCRField + End Get + Set + Me.sCRField = value + End Set + End Property + + ''' + Public Property OCR() As DumpType + Get + Return Me.oCRField + End Get + Set + Me.oCRField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class ATAType + + Private identifyField As DumpType + + ''' + Public Property Identify() As DumpType + Get + Return Me.identifyField + End Get + Set + Me.identifyField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class TapeFileType + + Private imageField As ImageType + + Private sizeField As ULong + + Private sequenceField As ULong + + Private blockSizeField As ULong + + Private startBlockField As ULong + + Private endBlockField As ULong + + Private checksumsField() As ChecksumType + + ''' + Public Property Image() As ImageType + Get + Return Me.imageField + End Get + Set + Me.imageField = value + End Set + End Property + + ''' + Public Property Size() As ULong + Get + Return Me.sizeField + End Get + Set + Me.sizeField = value + End Set + End Property + + ''' + Public Property Sequence() As ULong + Get + Return Me.sequenceField + End Get + Set + Me.sequenceField = value + End Set + End Property + + ''' + Public Property BlockSize() As ULong + Get + Return Me.blockSizeField + End Get + Set + Me.blockSizeField = value + End Set + End Property + + ''' + Public Property StartBlock() As ULong + Get + Return Me.startBlockField + End Get + Set + Me.startBlockField = value + End Set + End Property + + ''' + Public Property EndBlock() As ULong + Get + Return Me.endBlockField + End Get + Set + Me.endBlockField = value + End Set + End Property + + ''' + _ + Public Property Checksums() As ChecksumType() + Get + Return Me.checksumsField + End Get + Set + Me.checksumsField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class TapePartitionType + + Private imageField As ImageType + + Private sizeField As ULong + + Private sequenceField As ULong + + Private startBlockField As ULong + + Private endBlockField As ULong + + Private checksumsField() As ChecksumType + + Private fileField() As TapeFileType + + ''' + Public Property Image() As ImageType + Get + Return Me.imageField + End Get + Set + Me.imageField = value + End Set + End Property + + ''' + Public Property Size() As ULong + Get + Return Me.sizeField + End Get + Set + Me.sizeField = value + End Set + End Property + + ''' + Public Property Sequence() As ULong + Get + Return Me.sequenceField + End Get + Set + Me.sequenceField = value + End Set + End Property + + ''' + Public Property StartBlock() As ULong + Get + Return Me.startBlockField + End Get + Set + Me.startBlockField = value + End Set + End Property + + ''' + Public Property EndBlock() As ULong + Get + Return Me.endBlockField + End Get + Set + Me.endBlockField = value + End Set + End Property + + ''' + _ + Public Property Checksums() As ChecksumType() + Get + Return Me.checksumsField + End Get + Set + Me.checksumsField = value + End Set + End Property + + ''' + _ + Public Property File() As TapeFileType() + Get + Return Me.fileField + End Get + Set + Me.fileField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class BlockSizeType + + Private startingBlockField As UInteger + + Private valueField As UInteger + + ''' + _ + Public Property startingBlock() As UInteger + Get + Return Me.startingBlockField + End Get + Set + Me.startingBlockField = value + End Set + End Property + + ''' + _ + Public Property Value() As UInteger + Get + Return Me.valueField + End Get + Set + Me.valueField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class BlockMediaType + + Private imageField As ImageType + + Private sizeField As ULong + + Private checksumsField() As ChecksumType + + Private contentChecksumsField() As ChecksumType + + Private sequenceField As SequenceType + + Private manufacturerField As String + + Private modelField As String + + Private serialField As String + + Private firmwareField As String + + Private interfaceField As String + + Private partNumberField As String + + Private serialNumberField As String + + Private physicalBlockSizeField As UInteger + + Private logicalBlockSizeField As UInteger + + Private logicalBlocksField As ULong + + Private variableBlockSizeField() As BlockSizeType + + Private tapeInformationField() As TapePartitionType + + Private scansField As ScansType + + Private aTAField As ATAType + + Private pCIField As PCIType + + Private pCMCIAField As PCMCIAType + + Private secureDigitalField As SecureDigitalType + + Private multiMediaCardField As MultiMediaCardType + + Private sCSIField As SCSIType + + Private uSBField As USBType + + Private mAMField As DumpType + + Private headsField As UShort + + Private headsFieldSpecified As Boolean + + Private cylindersField As UInteger + + Private cylindersFieldSpecified As Boolean + + Private sectorsPerTrackField As ULong + + Private sectorsPerTrackFieldSpecified As Boolean + + Private trackField() As BlockTrackType + + Private copyProtectionField As String + + Private dimensionsField As DimensionsType + + Private fileSystemInformationField() As PartitionType + + Private dumpHardwareArrayField() As DumpHardwareType + + Private diskTypeField As String + + Private diskSubTypeField As String + + ''' + Public Property Image() As ImageType + Get + Return Me.imageField + End Get + Set + Me.imageField = value + End Set + End Property + + ''' + Public Property Size() As ULong + Get + Return Me.sizeField + End Get + Set + Me.sizeField = value + End Set + End Property + + ''' + _ + Public Property Checksums() As ChecksumType() + Get + Return Me.checksumsField + End Get + Set + Me.checksumsField = value + End Set + End Property + + ''' + _ + Public Property ContentChecksums() As ChecksumType() + Get + Return Me.contentChecksumsField + End Get + Set + Me.contentChecksumsField = value + End Set + End Property + + ''' + Public Property Sequence() As SequenceType + Get + Return Me.sequenceField + End Get + Set + Me.sequenceField = value + End Set + End Property + + ''' + Public Property Manufacturer() As String + Get + Return Me.manufacturerField + End Get + Set + Me.manufacturerField = value + End Set + End Property + + ''' + Public Property Model() As String + Get + Return Me.modelField + End Get + Set + Me.modelField = value + End Set + End Property + + ''' + Public Property Serial() As String + Get + Return Me.serialField + End Get + Set + Me.serialField = value + End Set + End Property + + ''' + Public Property Firmware() As String + Get + Return Me.firmwareField + End Get + Set + Me.firmwareField = value + End Set + End Property + + ''' + Public Property [Interface]() As String + Get + Return Me.interfaceField + End Get + Set + Me.interfaceField = value + End Set + End Property + + ''' + Public Property PartNumber() As String + Get + Return Me.partNumberField + End Get + Set + Me.partNumberField = value + End Set + End Property + + ''' + Public Property SerialNumber() As String + Get + Return Me.serialNumberField + End Get + Set + Me.serialNumberField = value + End Set + End Property + + ''' + Public Property PhysicalBlockSize() As UInteger + Get + Return Me.physicalBlockSizeField + End Get + Set + Me.physicalBlockSizeField = value + End Set + End Property + + ''' + Public Property LogicalBlockSize() As UInteger + Get + Return Me.logicalBlockSizeField + End Get + Set + Me.logicalBlockSizeField = value + End Set + End Property + + ''' + Public Property LogicalBlocks() As ULong + Get + Return Me.logicalBlocksField + End Get + Set + Me.logicalBlocksField = value + End Set + End Property + + ''' + _ + Public Property VariableBlockSize() As BlockSizeType() + Get + Return Me.variableBlockSizeField + End Get + Set + Me.variableBlockSizeField = value + End Set + End Property + + ''' + _ + Public Property TapeInformation() As TapePartitionType() + Get + Return Me.tapeInformationField + End Get + Set + Me.tapeInformationField = value + End Set + End Property + + ''' + Public Property Scans() As ScansType + Get + Return Me.scansField + End Get + Set + Me.scansField = value + End Set + End Property + + ''' + Public Property ATA() As ATAType + Get + Return Me.aTAField + End Get + Set + Me.aTAField = value + End Set + End Property + + ''' + Public Property PCI() As PCIType + Get + Return Me.pCIField + End Get + Set + Me.pCIField = value + End Set + End Property + + ''' + Public Property PCMCIA() As PCMCIAType + Get + Return Me.pCMCIAField + End Get + Set + Me.pCMCIAField = value + End Set + End Property + + ''' + Public Property SecureDigital() As SecureDigitalType + Get + Return Me.secureDigitalField + End Get + Set + Me.secureDigitalField = value + End Set + End Property + + ''' + Public Property MultiMediaCard() As MultiMediaCardType + Get + Return Me.multiMediaCardField + End Get + Set + Me.multiMediaCardField = value + End Set + End Property + + ''' + Public Property SCSI() As SCSIType + Get + Return Me.sCSIField + End Get + Set + Me.sCSIField = value + End Set + End Property + + ''' + Public Property USB() As USBType + Get + Return Me.uSBField + End Get + Set + Me.uSBField = value + End Set + End Property + + ''' + Public Property MAM() As DumpType + Get + Return Me.mAMField + End Get + Set + Me.mAMField = value + End Set + End Property + + ''' + Public Property Heads() As UShort + Get + Return Me.headsField + End Get + Set + Me.headsField = value + End Set + End Property + + ''' + _ + Public Property HeadsSpecified() As Boolean + Get + Return Me.headsFieldSpecified + End Get + Set + Me.headsFieldSpecified = value + End Set + End Property + + ''' + Public Property Cylinders() As UInteger + Get + Return Me.cylindersField + End Get + Set + Me.cylindersField = value + End Set + End Property + + ''' + _ + Public Property CylindersSpecified() As Boolean + Get + Return Me.cylindersFieldSpecified + End Get + Set + Me.cylindersFieldSpecified = value + End Set + End Property + + ''' + Public Property SectorsPerTrack() As ULong + Get + Return Me.sectorsPerTrackField + End Get + Set + Me.sectorsPerTrackField = value + End Set + End Property + + ''' + _ + Public Property SectorsPerTrackSpecified() As Boolean + Get + Return Me.sectorsPerTrackFieldSpecified + End Get + Set + Me.sectorsPerTrackFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property Track() As BlockTrackType() + Get + Return Me.trackField + End Get + Set + Me.trackField = value + End Set + End Property + + ''' + Public Property CopyProtection() As String + Get + Return Me.copyProtectionField + End Get + Set + Me.copyProtectionField = value + End Set + End Property + + ''' + Public Property Dimensions() As DimensionsType + Get + Return Me.dimensionsField + End Get + Set + Me.dimensionsField = value + End Set + End Property + + ''' + _ + Public Property FileSystemInformation() As PartitionType() + Get + Return Me.fileSystemInformationField + End Get + Set + Me.fileSystemInformationField = value + End Set + End Property + + ''' + _ + Public Property DumpHardwareArray() As DumpHardwareType() + Get + Return Me.dumpHardwareArrayField + End Get + Set + Me.dumpHardwareArrayField = value + End Set + End Property + + ''' + Public Property DiskType() As String + Get + Return Me.diskTypeField + End Get + Set + Me.diskTypeField = value + End Set + End Property + + ''' + Public Property DiskSubType() As String + Get + Return Me.diskSubTypeField + End Get + Set + Me.diskSubTypeField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class PCIType + + Private vendorIDField As UShort + + Private deviceIDField As UShort + + Private configurationField As DumpType + + Private expansionROMField As LinearMediaType + + ''' + Public Property VendorID() As UShort + Get + Return Me.vendorIDField + End Get + Set + Me.vendorIDField = value + End Set + End Property + + ''' + Public Property DeviceID() As UShort + Get + Return Me.deviceIDField + End Get + Set + Me.deviceIDField = value + End Set + End Property + + ''' + Public Property Configuration() As DumpType + Get + Return Me.configurationField + End Get + Set + Me.configurationField = value + End Set + End Property + + ''' + Public Property ExpansionROM() As LinearMediaType + Get + Return Me.expansionROMField + End Get + Set + Me.expansionROMField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class LinearMediaType + + Private imageField As ImageType + + Private sizeField As ULong + + Private imageChecksumsField() As ChecksumType + + Private checksumsField() As ChecksumType + + Private partNumberField As String + + Private serialNumberField As String + + Private titleField As String + + Private sequenceField As UInteger + + Private sequenceFieldSpecified As Boolean + + Private imageInterleaveField As UInteger + + Private imageInterleaveFieldSpecified As Boolean + + Private interleaveField As UInteger + + Private interleaveFieldSpecified As Boolean + + Private manufacturerField As String + + Private modelField As String + + Private packageField As String + + Private interfaceField As String + + Private dimensionsField As DimensionsType + + Private scansField As ScansType + + Private dumpHardwareArrayField() As DumpHardwareType + + Private pCMCIAField As PCMCIAType + + Private copyProtectionField As String + + ''' + Public Property Image() As ImageType + Get + Return Me.imageField + End Get + Set + Me.imageField = value + End Set + End Property + + ''' + Public Property Size() As ULong + Get + Return Me.sizeField + End Get + Set + Me.sizeField = value + End Set + End Property + + ''' + _ + Public Property ImageChecksums() As ChecksumType() + Get + Return Me.imageChecksumsField + End Get + Set + Me.imageChecksumsField = value + End Set + End Property + + ''' + _ + Public Property Checksums() As ChecksumType() + Get + Return Me.checksumsField + End Get + Set + Me.checksumsField = value + End Set + End Property + + ''' + Public Property PartNumber() As String + Get + Return Me.partNumberField + End Get + Set + Me.partNumberField = value + End Set + End Property + + ''' + Public Property SerialNumber() As String + Get + Return Me.serialNumberField + End Get + Set + Me.serialNumberField = value + End Set + End Property + + ''' + Public Property Title() As String + Get + Return Me.titleField + End Get + Set + Me.titleField = value + End Set + End Property + + ''' + Public Property Sequence() As UInteger + Get + Return Me.sequenceField + End Get + Set + Me.sequenceField = value + End Set + End Property + + ''' + _ + Public Property SequenceSpecified() As Boolean + Get + Return Me.sequenceFieldSpecified + End Get + Set + Me.sequenceFieldSpecified = value + End Set + End Property + + ''' + Public Property ImageInterleave() As UInteger + Get + Return Me.imageInterleaveField + End Get + Set + Me.imageInterleaveField = value + End Set + End Property + + ''' + _ + Public Property ImageInterleaveSpecified() As Boolean + Get + Return Me.imageInterleaveFieldSpecified + End Get + Set + Me.imageInterleaveFieldSpecified = value + End Set + End Property + + ''' + Public Property Interleave() As UInteger + Get + Return Me.interleaveField + End Get + Set + Me.interleaveField = value + End Set + End Property + + ''' + _ + Public Property InterleaveSpecified() As Boolean + Get + Return Me.interleaveFieldSpecified + End Get + Set + Me.interleaveFieldSpecified = value + End Set + End Property + + ''' + Public Property Manufacturer() As String + Get + Return Me.manufacturerField + End Get + Set + Me.manufacturerField = value + End Set + End Property + + ''' + Public Property Model() As String + Get + Return Me.modelField + End Get + Set + Me.modelField = value + End Set + End Property + + ''' + Public Property Package() As String + Get + Return Me.packageField + End Get + Set + Me.packageField = value + End Set + End Property + + ''' + Public Property [Interface]() As String + Get + Return Me.interfaceField + End Get + Set + Me.interfaceField = value + End Set + End Property + + ''' + Public Property Dimensions() As DimensionsType + Get + Return Me.dimensionsField + End Get + Set + Me.dimensionsField = value + End Set + End Property + + ''' + Public Property Scans() As ScansType + Get + Return Me.scansField + End Get + Set + Me.scansField = value + End Set + End Property + + ''' + _ + Public Property DumpHardwareArray() As DumpHardwareType() + Get + Return Me.dumpHardwareArrayField + End Get + Set + Me.dumpHardwareArrayField = value + End Set + End Property + + ''' + Public Property PCMCIA() As PCMCIAType + Get + Return Me.pCMCIAField + End Get + Set + Me.pCMCIAField = value + End Set + End Property + + ''' + Public Property CopyProtection() As String + Get + Return Me.copyProtectionField + End Get + Set + Me.copyProtectionField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class PCMCIAType + + Private cISField As DumpType + + Private complianceField As String + + Private manufacturerCodeField As UShort + + Private manufacturerCodeFieldSpecified As Boolean + + Private cardCodeField As UShort + + Private cardCodeFieldSpecified As Boolean + + Private manufacturerField As String + + Private productNameField As String + + Private additionalInformationField() As String + + ''' + Public Property CIS() As DumpType + Get + Return Me.cISField + End Get + Set + Me.cISField = value + End Set + End Property + + ''' + Public Property Compliance() As String + Get + Return Me.complianceField + End Get + Set + Me.complianceField = value + End Set + End Property + + ''' + Public Property ManufacturerCode() As UShort + Get + Return Me.manufacturerCodeField + End Get + Set + Me.manufacturerCodeField = value + End Set + End Property + + ''' + _ + Public Property ManufacturerCodeSpecified() As Boolean + Get + Return Me.manufacturerCodeFieldSpecified + End Get + Set + Me.manufacturerCodeFieldSpecified = value + End Set + End Property + + ''' + Public Property CardCode() As UShort + Get + Return Me.cardCodeField + End Get + Set + Me.cardCodeField = value + End Set + End Property + + ''' + _ + Public Property CardCodeSpecified() As Boolean + Get + Return Me.cardCodeFieldSpecified + End Get + Set + Me.cardCodeFieldSpecified = value + End Set + End Property + + ''' + Public Property Manufacturer() As String + Get + Return Me.manufacturerField + End Get + Set + Me.manufacturerField = value + End Set + End Property + + ''' + Public Property ProductName() As String + Get + Return Me.productNameField + End Get + Set + Me.productNameField = value + End Set + End Property + + ''' + _ + Public Property AdditionalInformation() As String() + Get + Return Me.additionalInformationField + End Get + Set + Me.additionalInformationField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class PartitionType + + Private sequenceField As UInteger + + Private nameField As String + + Private typeField As String + + Private startSectorField As ULong + + Private endSectorField As ULong + + Private descriptionField As String + + Private fileSystemsField() As FileSystemType + + ''' + Public Property Sequence() As UInteger + Get + Return Me.sequenceField + End Get + Set + Me.sequenceField = value + End Set + End Property + + ''' + Public Property Name() As String + Get + Return Me.nameField + End Get + Set + Me.nameField = value + End Set + End Property + + ''' + Public Property Type() As String + Get + Return Me.typeField + End Get + Set + Me.typeField = value + End Set + End Property + + ''' + Public Property StartSector() As ULong + Get + Return Me.startSectorField + End Get + Set + Me.startSectorField = value + End Set + End Property + + ''' + Public Property EndSector() As ULong + Get + Return Me.endSectorField + End Get + Set + Me.endSectorField = value + End Set + End Property + + ''' + Public Property Description() As String + Get + Return Me.descriptionField + End Get + Set + Me.descriptionField = value + End Set + End Property + + ''' + _ + Public Property FileSystems() As FileSystemType() + Get + Return Me.fileSystemsField + End Get + Set + Me.fileSystemsField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class FileSystemType + + Private typeField As String + + Private creationDateField As Date + + Private creationDateFieldSpecified As Boolean + + Private modificationDateField As Date + + Private modificationDateFieldSpecified As Boolean + + Private backupDateField As Date + + Private backupDateFieldSpecified As Boolean + + Private clusterSizeField As UInteger + + Private clustersField As ULong + + Private filesField As ULong + + Private filesFieldSpecified As Boolean + + Private bootableField As Boolean + + Private volumeSerialField As String + + Private volumeNameField As String + + Private freeClustersField As ULong + + Private freeClustersFieldSpecified As Boolean + + Private dirtyField As Boolean + + Private expirationDateField As Date + + Private expirationDateFieldSpecified As Boolean + + Private effectiveDateField As Date + + Private effectiveDateFieldSpecified As Boolean + + Private systemIdentifierField As String + + Private volumeSetIdentifierField As String + + Private publisherIdentifierField As String + + Private dataPreparerIdentifierField As String + + Private applicationIdentifierField As String + + Private contentsField As FilesystemContentsType + + ''' + Public Property Type() As String + Get + Return Me.typeField + End Get + Set + Me.typeField = value + End Set + End Property + + ''' + Public Property CreationDate() As Date + Get + Return Me.creationDateField + End Get + Set + Me.creationDateField = value + End Set + End Property + + ''' + _ + Public Property CreationDateSpecified() As Boolean + Get + Return Me.creationDateFieldSpecified + End Get + Set + Me.creationDateFieldSpecified = value + End Set + End Property + + ''' + Public Property ModificationDate() As Date + Get + Return Me.modificationDateField + End Get + Set + Me.modificationDateField = value + End Set + End Property + + ''' + _ + Public Property ModificationDateSpecified() As Boolean + Get + Return Me.modificationDateFieldSpecified + End Get + Set + Me.modificationDateFieldSpecified = value + End Set + End Property + + ''' + Public Property BackupDate() As Date + Get + Return Me.backupDateField + End Get + Set + Me.backupDateField = value + End Set + End Property + + ''' + _ + Public Property BackupDateSpecified() As Boolean + Get + Return Me.backupDateFieldSpecified + End Get + Set + Me.backupDateFieldSpecified = value + End Set + End Property + + ''' + Public Property ClusterSize() As UInteger + Get + Return Me.clusterSizeField + End Get + Set + Me.clusterSizeField = value + End Set + End Property + + ''' + Public Property Clusters() As ULong + Get + Return Me.clustersField + End Get + Set + Me.clustersField = value + End Set + End Property + + ''' + Public Property Files() As ULong + Get + Return Me.filesField + End Get + Set + Me.filesField = value + End Set + End Property + + ''' + _ + Public Property FilesSpecified() As Boolean + Get + Return Me.filesFieldSpecified + End Get + Set + Me.filesFieldSpecified = value + End Set + End Property + + ''' + Public Property Bootable() As Boolean + Get + Return Me.bootableField + End Get + Set + Me.bootableField = value + End Set + End Property + + ''' + Public Property VolumeSerial() As String + Get + Return Me.volumeSerialField + End Get + Set + Me.volumeSerialField = value + End Set + End Property + + ''' + Public Property VolumeName() As String + Get + Return Me.volumeNameField + End Get + Set + Me.volumeNameField = value + End Set + End Property + + ''' + Public Property FreeClusters() As ULong + Get + Return Me.freeClustersField + End Get + Set + Me.freeClustersField = value + End Set + End Property + + ''' + _ + Public Property FreeClustersSpecified() As Boolean + Get + Return Me.freeClustersFieldSpecified + End Get + Set + Me.freeClustersFieldSpecified = value + End Set + End Property + + ''' + Public Property Dirty() As Boolean + Get + Return Me.dirtyField + End Get + Set + Me.dirtyField = value + End Set + End Property + + ''' + Public Property ExpirationDate() As Date + Get + Return Me.expirationDateField + End Get + Set + Me.expirationDateField = value + End Set + End Property + + ''' + _ + Public Property ExpirationDateSpecified() As Boolean + Get + Return Me.expirationDateFieldSpecified + End Get + Set + Me.expirationDateFieldSpecified = value + End Set + End Property + + ''' + Public Property EffectiveDate() As Date + Get + Return Me.effectiveDateField + End Get + Set + Me.effectiveDateField = value + End Set + End Property + + ''' + _ + Public Property EffectiveDateSpecified() As Boolean + Get + Return Me.effectiveDateFieldSpecified + End Get + Set + Me.effectiveDateFieldSpecified = value + End Set + End Property + + ''' + Public Property SystemIdentifier() As String + Get + Return Me.systemIdentifierField + End Get + Set + Me.systemIdentifierField = value + End Set + End Property + + ''' + Public Property VolumeSetIdentifier() As String + Get + Return Me.volumeSetIdentifierField + End Get + Set + Me.volumeSetIdentifierField = value + End Set + End Property + + ''' + Public Property PublisherIdentifier() As String + Get + Return Me.publisherIdentifierField + End Get + Set + Me.publisherIdentifierField = value + End Set + End Property + + ''' + Public Property DataPreparerIdentifier() As String + Get + Return Me.dataPreparerIdentifierField + End Get + Set + Me.dataPreparerIdentifierField = value + End Set + End Property + + ''' + Public Property ApplicationIdentifier() As String + Get + Return Me.applicationIdentifierField + End Get + Set + Me.applicationIdentifierField = value + End Set + End Property + + ''' + Public Property Contents() As FilesystemContentsType + Get + Return Me.contentsField + End Get + Set + Me.contentsField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class FilesystemContentsType + + Private fileField() As ContentsFileType + + Private directoryField() As DirectoryType + + Private namespaceField As String + + ''' + _ + Public Property File() As ContentsFileType() + Get + Return Me.fileField + End Get + Set + Me.fileField = value + End Set + End Property + + ''' + _ + Public Property Directory() As DirectoryType() + Get + Return Me.directoryField + End Get + Set + Me.directoryField = value + End Set + End Property + + ''' + _ + Public Property [namespace]() As String + Get + Return Me.namespaceField + End Get + Set + Me.namespaceField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class ContentsFileType + + Private checksumsField() As ChecksumType + + Private extendedAttributesField() As ExtendedAttributeType + + Private nameField As String + + Private creationTimeField As Date + + Private creationTimeFieldSpecified As Boolean + + Private accessTimeField As Date + + Private accessTimeFieldSpecified As Boolean + + Private statusChangeTimeField As Date + + Private statusChangeTimeFieldSpecified As Boolean + + Private backupTimeField As Date + + Private backupTimeFieldSpecified As Boolean + + Private lastWriteTimeField As Date + + Private lastWriteTimeFieldSpecified As Boolean + + Private attributesField As ULong + + Private posixModeField As UInteger + + Private posixModeFieldSpecified As Boolean + + Private deviceNumberField As ULong + + Private deviceNumberFieldSpecified As Boolean + + Private posixGroupIdField As ULong + + Private posixGroupIdFieldSpecified As Boolean + + Private inodeField As ULong + + Private linksField As ULong + + Private posixUserIdField As ULong + + Private posixUserIdFieldSpecified As Boolean + + Private lengthField As ULong + + ''' + _ + Public Property Checksums() As ChecksumType() + Get + Return Me.checksumsField + End Get + Set + Me.checksumsField = value + End Set + End Property + + ''' + _ + Public Property ExtendedAttributes() As ExtendedAttributeType() + Get + Return Me.extendedAttributesField + End Get + Set + Me.extendedAttributesField = value + End Set + End Property + + ''' + _ + Public Property name() As String + Get + Return Me.nameField + End Get + Set + Me.nameField = value + End Set + End Property + + ''' + _ + Public Property creationTime() As Date + Get + Return Me.creationTimeField + End Get + Set + Me.creationTimeField = value + End Set + End Property + + ''' + _ + Public Property creationTimeSpecified() As Boolean + Get + Return Me.creationTimeFieldSpecified + End Get + Set + Me.creationTimeFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property accessTime() As Date + Get + Return Me.accessTimeField + End Get + Set + Me.accessTimeField = value + End Set + End Property + + ''' + _ + Public Property accessTimeSpecified() As Boolean + Get + Return Me.accessTimeFieldSpecified + End Get + Set + Me.accessTimeFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property statusChangeTime() As Date + Get + Return Me.statusChangeTimeField + End Get + Set + Me.statusChangeTimeField = value + End Set + End Property + + ''' + _ + Public Property statusChangeTimeSpecified() As Boolean + Get + Return Me.statusChangeTimeFieldSpecified + End Get + Set + Me.statusChangeTimeFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property backupTime() As Date + Get + Return Me.backupTimeField + End Get + Set + Me.backupTimeField = value + End Set + End Property + + ''' + _ + Public Property backupTimeSpecified() As Boolean + Get + Return Me.backupTimeFieldSpecified + End Get + Set + Me.backupTimeFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property lastWriteTime() As Date + Get + Return Me.lastWriteTimeField + End Get + Set + Me.lastWriteTimeField = value + End Set + End Property + + ''' + _ + Public Property lastWriteTimeSpecified() As Boolean + Get + Return Me.lastWriteTimeFieldSpecified + End Get + Set + Me.lastWriteTimeFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property attributes() As ULong + Get + Return Me.attributesField + End Get + Set + Me.attributesField = value + End Set + End Property + + ''' + _ + Public Property posixMode() As UInteger + Get + Return Me.posixModeField + End Get + Set + Me.posixModeField = value + End Set + End Property + + ''' + _ + Public Property posixModeSpecified() As Boolean + Get + Return Me.posixModeFieldSpecified + End Get + Set + Me.posixModeFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property deviceNumber() As ULong + Get + Return Me.deviceNumberField + End Get + Set + Me.deviceNumberField = value + End Set + End Property + + ''' + _ + Public Property deviceNumberSpecified() As Boolean + Get + Return Me.deviceNumberFieldSpecified + End Get + Set + Me.deviceNumberFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property posixGroupId() As ULong + Get + Return Me.posixGroupIdField + End Get + Set + Me.posixGroupIdField = value + End Set + End Property + + ''' + _ + Public Property posixGroupIdSpecified() As Boolean + Get + Return Me.posixGroupIdFieldSpecified + End Get + Set + Me.posixGroupIdFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property inode() As ULong + Get + Return Me.inodeField + End Get + Set + Me.inodeField = value + End Set + End Property + + ''' + _ + Public Property links() As ULong + Get + Return Me.linksField + End Get + Set + Me.linksField = value + End Set + End Property + + ''' + _ + Public Property posixUserId() As ULong + Get + Return Me.posixUserIdField + End Get + Set + Me.posixUserIdField = value + End Set + End Property + + ''' + _ + Public Property posixUserIdSpecified() As Boolean + Get + Return Me.posixUserIdFieldSpecified + End Get + Set + Me.posixUserIdFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property length() As ULong + Get + Return Me.lengthField + End Get + Set + Me.lengthField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class ExtendedAttributeType + + Private checksumsField() As ChecksumType + + Private nameField As String + + Private lengthField As ULong + + ''' + _ + Public Property Checksums() As ChecksumType() + Get + Return Me.checksumsField + End Get + Set + Me.checksumsField = value + End Set + End Property + + ''' + _ + Public Property name() As String + Get + Return Me.nameField + End Get + Set + Me.nameField = value + End Set + End Property + + ''' + _ + Public Property length() As ULong + Get + Return Me.lengthField + End Get + Set + Me.lengthField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class DirectoryType + + Private fileField() As ContentsFileType + + Private directoryField() As DirectoryType + + Private nameField As String + + Private creationTimeField As Date + + Private creationTimeFieldSpecified As Boolean + + Private accessTimeField As Date + + Private accessTimeFieldSpecified As Boolean + + Private statusChangeTimeField As Date + + Private statusChangeTimeFieldSpecified As Boolean + + Private backupTimeField As Date + + Private backupTimeFieldSpecified As Boolean + + Private lastWriteTimeField As Date + + Private lastWriteTimeFieldSpecified As Boolean + + Private attributesField As ULong + + Private posixModeField As UInteger + + Private posixModeFieldSpecified As Boolean + + Private deviceNumberField As ULong + + Private deviceNumberFieldSpecified As Boolean + + Private posixGroupIdField As ULong + + Private posixGroupIdFieldSpecified As Boolean + + Private inodeField As ULong + + Private inodeFieldSpecified As Boolean + + Private linksField As ULong + + Private linksFieldSpecified As Boolean + + Private posixUserIdField As ULong + + Private posixUserIdFieldSpecified As Boolean + + ''' + _ + Public Property File() As ContentsFileType() + Get + Return Me.fileField + End Get + Set + Me.fileField = value + End Set + End Property + + ''' + _ + Public Property Directory() As DirectoryType() + Get + Return Me.directoryField + End Get + Set + Me.directoryField = value + End Set + End Property + + ''' + _ + Public Property name() As String + Get + Return Me.nameField + End Get + Set + Me.nameField = value + End Set + End Property + + ''' + _ + Public Property creationTime() As Date + Get + Return Me.creationTimeField + End Get + Set + Me.creationTimeField = value + End Set + End Property + + ''' + _ + Public Property creationTimeSpecified() As Boolean + Get + Return Me.creationTimeFieldSpecified + End Get + Set + Me.creationTimeFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property accessTime() As Date + Get + Return Me.accessTimeField + End Get + Set + Me.accessTimeField = value + End Set + End Property + + ''' + _ + Public Property accessTimeSpecified() As Boolean + Get + Return Me.accessTimeFieldSpecified + End Get + Set + Me.accessTimeFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property statusChangeTime() As Date + Get + Return Me.statusChangeTimeField + End Get + Set + Me.statusChangeTimeField = value + End Set + End Property + + ''' + _ + Public Property statusChangeTimeSpecified() As Boolean + Get + Return Me.statusChangeTimeFieldSpecified + End Get + Set + Me.statusChangeTimeFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property backupTime() As Date + Get + Return Me.backupTimeField + End Get + Set + Me.backupTimeField = value + End Set + End Property + + ''' + _ + Public Property backupTimeSpecified() As Boolean + Get + Return Me.backupTimeFieldSpecified + End Get + Set + Me.backupTimeFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property lastWriteTime() As Date + Get + Return Me.lastWriteTimeField + End Get + Set + Me.lastWriteTimeField = value + End Set + End Property + + ''' + _ + Public Property lastWriteTimeSpecified() As Boolean + Get + Return Me.lastWriteTimeFieldSpecified + End Get + Set + Me.lastWriteTimeFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property attributes() As ULong + Get + Return Me.attributesField + End Get + Set + Me.attributesField = value + End Set + End Property + + ''' + _ + Public Property posixMode() As UInteger + Get + Return Me.posixModeField + End Get + Set + Me.posixModeField = value + End Set + End Property + + ''' + _ + Public Property posixModeSpecified() As Boolean + Get + Return Me.posixModeFieldSpecified + End Get + Set + Me.posixModeFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property deviceNumber() As ULong + Get + Return Me.deviceNumberField + End Get + Set + Me.deviceNumberField = value + End Set + End Property + + ''' + _ + Public Property deviceNumberSpecified() As Boolean + Get + Return Me.deviceNumberFieldSpecified + End Get + Set + Me.deviceNumberFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property posixGroupId() As ULong + Get + Return Me.posixGroupIdField + End Get + Set + Me.posixGroupIdField = value + End Set + End Property + + ''' + _ + Public Property posixGroupIdSpecified() As Boolean + Get + Return Me.posixGroupIdFieldSpecified + End Get + Set + Me.posixGroupIdFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property inode() As ULong + Get + Return Me.inodeField + End Get + Set + Me.inodeField = value + End Set + End Property + + ''' + _ + Public Property inodeSpecified() As Boolean + Get + Return Me.inodeFieldSpecified + End Get + Set + Me.inodeFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property links() As ULong + Get + Return Me.linksField + End Get + Set + Me.linksField = value + End Set + End Property + + ''' + _ + Public Property linksSpecified() As Boolean + Get + Return Me.linksFieldSpecified + End Get + Set + Me.linksFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property posixUserId() As ULong + Get + Return Me.posixUserIdField + End Get + Set + Me.posixUserIdField = value + End Set + End Property + + ''' + _ + Public Property posixUserIdSpecified() As Boolean + Get + Return Me.posixUserIdFieldSpecified + End Get + Set + Me.posixUserIdFieldSpecified = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class CoordinatesType + + Private latitudeField As Double + + Private longitudeField As Double + + ''' + Public Property Latitude() As Double + Get + Return Me.latitudeField + End Get + Set + Me.latitudeField = value + End Set + End Property + + ''' + Public Property Longitude() As Double + Get + Return Me.longitudeField + End Get + Set + Me.longitudeField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class RecordingType + + Private broadcasterField As String + + Private broadcastPlatformField As String + + Private sourceFormatField As RecordingTypeSourceFormat + + Private timestampField As Date + + Private softwareField() As SoftwareType + + Private coordinatesField As CoordinatesType + + ''' + Public Property Broadcaster() As String + Get + Return Me.broadcasterField + End Get + Set + Me.broadcasterField = value + End Set + End Property + + ''' + Public Property BroadcastPlatform() As String + Get + Return Me.broadcastPlatformField + End Get + Set + Me.broadcastPlatformField = value + End Set + End Property + + ''' + Public Property SourceFormat() As RecordingTypeSourceFormat + Get + Return Me.sourceFormatField + End Get + Set + Me.sourceFormatField = value + End Set + End Property + + ''' + Public Property Timestamp() As Date + Get + Return Me.timestampField + End Get + Set + Me.timestampField = value + End Set + End Property + + ''' + _ + Public Property Software() As SoftwareType() + Get + Return Me.softwareField + End Get + Set + Me.softwareField = value + End Set + End Property + + ''' + Public Property Coordinates() As CoordinatesType + Get + Return Me.coordinatesField + End Get + Set + Me.coordinatesField = value + End Set + End Property + End Class + + ''' + _ + Public Enum RecordingTypeSourceFormat + + ''' + _ + ITUA + + ''' + _ + ITUB + + ''' + _ + ITUC + + ''' + _ + ITUD + + ''' + _ + ITUE + + ''' + _ + ITUF + + ''' + _ + ITUG + + ''' + _ + ITUH + + ''' + _ + ITUI + + ''' + _ + ITUJ + + ''' + _ + ITUK + + ''' + _ + ITUL + + ''' + _ + ITUM + + ''' + _ + ITUN + + ''' + _ + PALB + + ''' + _ + SECAMB + + ''' + _ + PALD + + ''' + _ + SECAMD + + ''' + _ + PALG + + ''' + _ + SECAMG + + ''' + _ + PALH + + ''' + _ + PALI + + ''' + _ + PALK + + ''' + _ + SECAMK + + ''' + _ + NTSCM + + ''' + _ + PALN + + ''' + _ + PALM + + ''' + _ + SECAMM + + ''' + MUSE + + ''' + PALplus + + ''' + FM + + ''' + AM + + ''' + COFDM + + ''' + _ + CAMD + + ''' + DAB + + ''' + _ + DAB1 + + ''' + DRM + + ''' + _ + DRM1 + + ''' + FMeXtra + + ''' + ATSC + + ''' + ATSC2 + + ''' + ATSC3 + + ''' + _ + ATSCMH + + ''' + _ + DVBT + + ''' + _ + DVBT2 + + ''' + _ + DVBS + + ''' + _ + DVBS2 + + ''' + _ + DVBS2X + + ''' + _ + DVBC + + ''' + _ + DVBC2 + + ''' + _ + DVBH + + ''' + _ + DVBNGH + + ''' + _ + DVBSH + + ''' + _ + ISDBT + + ''' + _ + ISDBTb + + ''' + _ + ISDBS + + ''' + _ + ISDBC + + ''' + _ + Item1seg + + ''' + DTMB + + ''' + CCMB + + ''' + _ + TDMB + + ''' + _ + SDMB + + ''' + IPTV + + ''' + _ + DVBMT + + ''' + _ + DVBMC + + ''' + _ + DVBMS + + ''' + ADR + + ''' + SDR + End Enum + + ''' + _ + Partial Public Class SubtitleTracksType + + Private languagesField() As LanguagesTypeLanguage + + Private trackNumberField As UInteger + + Private codecField As String + + ''' + _ + Public Property Languages() As LanguagesTypeLanguage() + Get + Return Me.languagesField + End Get + Set + Me.languagesField = value + End Set + End Property + + ''' + _ + Public Property TrackNumber() As UInteger + Get + Return Me.trackNumberField + End Get + Set + Me.trackNumberField = value + End Set + End Property + + ''' + _ + Public Property Codec() As String + Get + Return Me.codecField + End Get + Set + Me.codecField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class VideoTracksType + + Private languagesField() As LanguagesTypeLanguage + + Private trackNumberField As UInteger + + Private codecField As String + + Private horizontalField As UInteger + + Private verticalField As UInteger + + Private meanBitrateField As Long + + Private threeDField As Boolean + + ''' + _ + Public Property Languages() As LanguagesTypeLanguage() + Get + Return Me.languagesField + End Get + Set + Me.languagesField = value + End Set + End Property + + ''' + _ + Public Property TrackNumber() As UInteger + Get + Return Me.trackNumberField + End Get + Set + Me.trackNumberField = value + End Set + End Property + + ''' + _ + Public Property Codec() As String + Get + Return Me.codecField + End Get + Set + Me.codecField = value + End Set + End Property + + ''' + _ + Public Property Horizontal() As UInteger + Get + Return Me.horizontalField + End Get + Set + Me.horizontalField = value + End Set + End Property + + ''' + _ + Public Property Vertical() As UInteger + Get + Return Me.verticalField + End Get + Set + Me.verticalField = value + End Set + End Property + + ''' + _ + Public Property MeanBitrate() As Long + Get + Return Me.meanBitrateField + End Get + Set + Me.meanBitrateField = value + End Set + End Property + + ''' + _ + Public Property ThreeD() As Boolean + Get + Return Me.threeDField + End Get + Set + Me.threeDField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class AudioTracksType + + Private languagesField() As LanguagesTypeLanguage + + Private trackNumberField As UInteger + + Private accoustIDField As String + + Private codecField As String + + Private channelsField As UInteger + + Private sampleRateField As Double + + Private meanBitrateField As Long + + ''' + _ + Public Property Languages() As LanguagesTypeLanguage() + Get + Return Me.languagesField + End Get + Set + Me.languagesField = value + End Set + End Property + + ''' + _ + Public Property TrackNumber() As UInteger + Get + Return Me.trackNumberField + End Get + Set + Me.trackNumberField = value + End Set + End Property + + ''' + _ + Public Property AccoustID() As String + Get + Return Me.accoustIDField + End Get + Set + Me.accoustIDField = value + End Set + End Property + + ''' + _ + Public Property Codec() As String + Get + Return Me.codecField + End Get + Set + Me.codecField = value + End Set + End Property + + ''' + _ + Public Property Channels() As UInteger + Get + Return Me.channelsField + End Get + Set + Me.channelsField = value + End Set + End Property + + ''' + _ + Public Property SampleRate() As Double + Get + Return Me.sampleRateField + End Get + Set + Me.sampleRateField = value + End Set + End Property + + ''' + _ + Public Property MeanBitrate() As Long + Get + Return Me.meanBitrateField + End Get + Set + Me.meanBitrateField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class AdvertisementType + + Private manufacturerField As String + + Private productField As String + + Private fileField As FileType + + Private fileSizeField As ULong + + Private framesField As ULong + + Private framesFieldSpecified As Boolean + + Private durationField As Double + + Private meanFrameRateField As Single + + Private meanFrameRateFieldSpecified As Boolean + + Private checksumsField() As ChecksumType + + Private audioTrackField() As AudioTracksType + + Private videoTrackField() As VideoTracksType + + Private subtitleTrackField() As SubtitleTracksType + + Private recordingField As RecordingType + + ''' + Public Property Manufacturer() As String + Get + Return Me.manufacturerField + End Get + Set + Me.manufacturerField = value + End Set + End Property + + ''' + Public Property Product() As String + Get + Return Me.productField + End Get + Set + Me.productField = value + End Set + End Property + + ''' + Public Property File() As FileType + Get + Return Me.fileField + End Get + Set + Me.fileField = value + End Set + End Property + + ''' + Public Property FileSize() As ULong + Get + Return Me.fileSizeField + End Get + Set + Me.fileSizeField = value + End Set + End Property + + ''' + Public Property Frames() As ULong + Get + Return Me.framesField + End Get + Set + Me.framesField = value + End Set + End Property + + ''' + _ + Public Property FramesSpecified() As Boolean + Get + Return Me.framesFieldSpecified + End Get + Set + Me.framesFieldSpecified = value + End Set + End Property + + ''' + Public Property Duration() As Double + Get + Return Me.durationField + End Get + Set + Me.durationField = value + End Set + End Property + + ''' + Public Property MeanFrameRate() As Single + Get + Return Me.meanFrameRateField + End Get + Set + Me.meanFrameRateField = value + End Set + End Property + + ''' + _ + Public Property MeanFrameRateSpecified() As Boolean + Get + Return Me.meanFrameRateFieldSpecified + End Get + Set + Me.meanFrameRateFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property Checksums() As ChecksumType() + Get + Return Me.checksumsField + End Get + Set + Me.checksumsField = value + End Set + End Property + + ''' + _ + Public Property AudioTrack() As AudioTracksType() + Get + Return Me.audioTrackField + End Get + Set + Me.audioTrackField = value + End Set + End Property + + ''' + _ + Public Property VideoTrack() As VideoTracksType() + Get + Return Me.videoTrackField + End Get + Set + Me.videoTrackField = value + End Set + End Property + + ''' + _ + Public Property SubtitleTrack() As SubtitleTracksType() + Get + Return Me.subtitleTrackField + End Get + Set + Me.subtitleTrackField = value + End Set + End Property + + ''' + Public Property Recording() As RecordingType + Get + Return Me.recordingField + End Get + Set + Me.recordingField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class SubChannelType + + Private imageField As ImageType + + Private sizeField As ULong + + Private checksumsField() As ChecksumType + + ''' + Public Property Image() As ImageType + Get + Return Me.imageField + End Get + Set + Me.imageField = value + End Set + End Property + + ''' + Public Property Size() As ULong + Get + Return Me.sizeField + End Get + Set + Me.sizeField = value + End Set + End Property + + ''' + _ + Public Property Checksums() As ChecksumType() + Get + Return Me.checksumsField + End Get + Set + Me.checksumsField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class TrackFlagsType + + Private quadraphonicField As Boolean + + Private dataField As Boolean + + Private copyPermittedField As Boolean + + Private preEmphasisField As Boolean + + ''' + Public Property Quadraphonic() As Boolean + Get + Return Me.quadraphonicField + End Get + Set + Me.quadraphonicField = value + End Set + End Property + + ''' + Public Property Data() As Boolean + Get + Return Me.dataField + End Get + Set + Me.dataField = value + End Set + End Property + + ''' + Public Property CopyPermitted() As Boolean + Get + Return Me.copyPermittedField + End Get + Set + Me.copyPermittedField = value + End Set + End Property + + ''' + Public Property PreEmphasis() As Boolean + Get + Return Me.preEmphasisField + End Get + Set + Me.preEmphasisField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class TrackIndexType + + Private indexField As UShort + + Private valueField As Integer + + ''' + _ + Public Property index() As UShort + Get + Return Me.indexField + End Get + Set + Me.indexField = value + End Set + End Property + + ''' + _ + Public Property Value() As Integer + Get + Return Me.valueField + End Get + Set + Me.valueField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class TrackSequenceType + + Private trackNumberField As UInteger + + Private sessionField As UInteger + + ''' + Public Property TrackNumber() As UInteger + Get + Return Me.trackNumberField + End Get + Set + Me.trackNumberField = value + End Set + End Property + + ''' + Public Property Session() As UInteger + Get + Return Me.sessionField + End Get + Set + Me.sessionField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class TrackType + + Private imageField As ImageType + + Private sizeField As ULong + + Private sequenceField As TrackSequenceType + + Private startMSFField As String + + Private endMSFField As String + + Private startSectorField As ULong + + Private endSectorField As ULong + + Private indexesField() As TrackIndexType + + Private flagsField As TrackFlagsType + + Private iSRCField As String + + Private trackType1Field As TrackTypeTrackType + + Private bytesPerSectorField As UInteger + + Private accoustIDField As String + + Private checksumsField() As ChecksumType + + Private subChannelField As SubChannelType + + Private fileSystemInformationField() As PartitionType + + ''' + Public Property Image() As ImageType + Get + Return Me.imageField + End Get + Set + Me.imageField = value + End Set + End Property + + ''' + Public Property Size() As ULong + Get + Return Me.sizeField + End Get + Set + Me.sizeField = value + End Set + End Property + + ''' + Public Property Sequence() As TrackSequenceType + Get + Return Me.sequenceField + End Get + Set + Me.sequenceField = value + End Set + End Property + + ''' + Public Property StartMSF() As String + Get + Return Me.startMSFField + End Get + Set + Me.startMSFField = value + End Set + End Property + + ''' + Public Property EndMSF() As String + Get + Return Me.endMSFField + End Get + Set + Me.endMSFField = value + End Set + End Property + + ''' + Public Property StartSector() As ULong + Get + Return Me.startSectorField + End Get + Set + Me.startSectorField = value + End Set + End Property + + ''' + Public Property EndSector() As ULong + Get + Return Me.endSectorField + End Get + Set + Me.endSectorField = value + End Set + End Property + + ''' + _ + Public Property Indexes() As TrackIndexType() + Get + Return Me.indexesField + End Get + Set + Me.indexesField = value + End Set + End Property + + ''' + Public Property Flags() As TrackFlagsType + Get + Return Me.flagsField + End Get + Set + Me.flagsField = value + End Set + End Property + + ''' + Public Property ISRC() As String + Get + Return Me.iSRCField + End Get + Set + Me.iSRCField = value + End Set + End Property + + ''' + _ + Public Property TrackType1() As TrackTypeTrackType + Get + Return Me.trackType1Field + End Get + Set + Me.trackType1Field = value + End Set + End Property + + ''' + Public Property BytesPerSector() As UInteger + Get + Return Me.bytesPerSectorField + End Get + Set + Me.bytesPerSectorField = value + End Set + End Property + + ''' + Public Property AccoustID() As String + Get + Return Me.accoustIDField + End Get + Set + Me.accoustIDField = value + End Set + End Property + + ''' + _ + Public Property Checksums() As ChecksumType() + Get + Return Me.checksumsField + End Get + Set + Me.checksumsField = value + End Set + End Property + + ''' + Public Property SubChannel() As SubChannelType + Get + Return Me.subChannelField + End Get + Set + Me.subChannelField = value + End Set + End Property + + ''' + _ + Public Property FileSystemInformation() As PartitionType() + Get + Return Me.fileSystemInformationField + End Get + Set + Me.fileSystemInformationField = value + End Set + End Property + End Class + + ''' + _ + Public Enum TrackTypeTrackType + + ''' + audio + + ''' + mode0 + + ''' + mode1 + + ''' + mode2 + + ''' + m2f1 + + ''' + m2f2 + + ''' + dvd + + ''' + hddvd + + ''' + bluray + + ''' + ddcd + End Enum + + ''' + _ + Partial Public Class PS3EncryptionType + + Private keyField As String + + Private serialField As String + + ''' + Public Property Key() As String + Get + Return Me.keyField + End Get + Set + Me.keyField = value + End Set + End Property + + ''' + Public Property Serial() As String + Get + Return Me.serialField + End Get + Set + Me.serialField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class XboxSecuritySectorsType + + Private requestVersionField As UInteger + + Private requestNumberField As UInteger + + Private securitySectorsField As DumpType + + ''' + Public Property RequestVersion() As UInteger + Get + Return Me.requestVersionField + End Get + Set + Me.requestVersionField = value + End Set + End Property + + ''' + Public Property RequestNumber() As UInteger + Get + Return Me.requestNumberField + End Get + Set + Me.requestNumberField = value + End Set + End Property + + ''' + Public Property SecuritySectors() As DumpType + Get + Return Me.securitySectorsField + End Get + Set + Me.securitySectorsField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class XboxType + + Private pFIField As DumpType + + Private dMIField As DumpType + + Private securitySectorsField() As XboxSecuritySectorsType + + ''' + Public Property PFI() As DumpType + Get + Return Me.pFIField + End Get + Set + Me.pFIField = value + End Set + End Property + + ''' + Public Property DMI() As DumpType + Get + Return Me.dMIField + End Get + Set + Me.dMIField = value + End Set + End Property + + ''' + _ + Public Property SecuritySectors() As XboxSecuritySectorsType() + Get + Return Me.securitySectorsField + End Get + Set + Me.securitySectorsField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class BorderType + + Private imageField As String + + Private sizeField As ULong + + Private checksumsField() As ChecksumType + + Private sessionField As UInteger + + Private sessionFieldSpecified As Boolean + + ''' + Public Property Image() As String + Get + Return Me.imageField + End Get + Set + Me.imageField = value + End Set + End Property + + ''' + Public Property Size() As ULong + Get + Return Me.sizeField + End Get + Set + Me.sizeField = value + End Set + End Property + + ''' + _ + Public Property Checksums() As ChecksumType() + Get + Return Me.checksumsField + End Get + Set + Me.checksumsField = value + End Set + End Property + + ''' + _ + Public Property session() As UInteger + Get + Return Me.sessionField + End Get + Set + Me.sessionField = value + End Set + End Property + + ''' + _ + Public Property sessionSpecified() As Boolean + Get + Return Me.sessionFieldSpecified + End Get + Set + Me.sessionFieldSpecified = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class CaseType + + Private caseType1Field As CaseTypeCaseType + + Private scansField As ScansType + + ''' + _ + Public Property CaseType1() As CaseTypeCaseType + Get + Return Me.caseType1Field + End Get + Set + Me.caseType1Field = value + End Set + End Property + + ''' + Public Property Scans() As ScansType + Get + Return Me.scansField + End Get + Set + Me.scansField = value + End Set + End Property + End Class + + ''' + _ + Public Enum CaseTypeCaseType + + ''' + jewel + + ''' + bigjewel + + ''' + slimjewel + + ''' + sleeve + + ''' + qpack + + ''' + digisleeve + + ''' + discboxslider + + ''' + compacplus + + ''' + keepcase + + ''' + snapcase + + ''' + softcase + + ''' + ecopack + + ''' + liftlock + + ''' + spindle + + ''' + ps2case + + ''' + ps3case + + ''' + bluraykeepcase + + ''' + pscase + + ''' + dccase + + ''' + saturncase + + ''' + xboxcase + + ''' + xbox360case + + ''' + xboxonecase + + ''' + saturnbigcase + + ''' + gccase + + ''' + wiicase + + ''' + unknown + End Enum + + ''' + _ + Partial Public Class LayeredTextType + + Private layerField As UInteger + + Private layerFieldSpecified As Boolean + + Private valueField As String + + ''' + _ + Public Property layer() As UInteger + Get + Return Me.layerField + End Get + Set + Me.layerField = value + End Set + End Property + + ''' + _ + Public Property layerSpecified() As Boolean + Get + Return Me.layerFieldSpecified + End Get + Set + Me.layerFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property Value() As String + Get + Return Me.valueField + End Get + Set + Me.valueField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class SectorsType + + Private layerField As UInteger + + Private layerFieldSpecified As Boolean + + Private valueField As ULong + + ''' + _ + Public Property layer() As UInteger + Get + Return Me.layerField + End Get + Set + Me.layerField = value + End Set + End Property + + ''' + _ + Public Property layerSpecified() As Boolean + Get + Return Me.layerFieldSpecified + End Get + Set + Me.layerFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property Value() As ULong + Get + Return Me.valueField + End Get + Set + Me.valueField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class LayersType + + Private sectorsField() As SectorsType + + Private typeField As LayersTypeType + + Private typeFieldSpecified As Boolean + + ''' + _ + Public Property Sectors() As SectorsType() + Get + Return Me.sectorsField + End Get + Set + Me.sectorsField = value + End Set + End Property + + ''' + _ + Public Property type() As LayersTypeType + Get + Return Me.typeField + End Get + Set + Me.typeField = value + End Set + End Property + + ''' + _ + Public Property typeSpecified() As Boolean + Get + Return Me.typeFieldSpecified + End Get + Set + Me.typeFieldSpecified = value + End Set + End Property + End Class + + ''' + _ + Public Enum LayersTypeType + + ''' + PTP + + ''' + OTP + End Enum + + ''' + _ + Partial Public Class OpticalDiscType + + Private imageField As ImageType + + Private sizeField As ULong + + Private sequenceField As SequenceType + + Private layersField As LayersType + + Private checksumsField() As ChecksumType + + Private partNumberField As String + + Private serialNumberField As String + + Private ringCodeField() As LayeredTextType + + Private masteringSIDField() As LayeredTextType + + Private toolstampField() As LayeredTextType + + Private mouldSIDField() As LayeredTextType + + Private mouldTextField() As LayeredTextType + + Private discTypeField As String + + Private discSubTypeField As String + + Private offsetField As Integer + + Private offsetFieldSpecified As Boolean + + Private tracksField() As UInteger + + Private sessionsField As UInteger + + Private copyProtectionField As String + + Private dimensionsField As DimensionsType + + Private caseField As CaseType + + Private scansField As ScansType + + Private pFIField As DumpType + + Private dMIField As DumpType + + Private cMIField As DumpType + + Private bCAField As DumpType + + Private aTIPField As DumpType + + Private aDIPField As DumpType + + Private pMAField As DumpType + + Private dDSField As DumpType + + Private sAIField As DumpType + + Private lastRMDField As DumpType + + Private pRIField As DumpType + + Private mediaIDField As DumpType + + Private pFIRField As DumpType + + Private dCBField As DumpType + + Private diField As DumpType + + Private pACField As DumpType + + Private tOCField As DumpType + + Private leadInCdTextField As DumpType + + Private firstTrackPregrapField() As BorderType + + Private leadInField() As BorderType + + Private leadOutField() As BorderType + + Private xboxField As XboxType + + Private pS3EncryptionField As PS3EncryptionType + + Private mediaCatalogueNumberField As String + + Private trackField() As TrackType + + Private dumpHardwareArrayField() As DumpHardwareType + + ''' + Public Property Image() As ImageType + Get + Return Me.imageField + End Get + Set + Me.imageField = value + End Set + End Property + + ''' + Public Property Size() As ULong + Get + Return Me.sizeField + End Get + Set + Me.sizeField = value + End Set + End Property + + ''' + Public Property Sequence() As SequenceType + Get + Return Me.sequenceField + End Get + Set + Me.sequenceField = value + End Set + End Property + + ''' + Public Property Layers() As LayersType + Get + Return Me.layersField + End Get + Set + Me.layersField = value + End Set + End Property + + ''' + _ + Public Property Checksums() As ChecksumType() + Get + Return Me.checksumsField + End Get + Set + Me.checksumsField = value + End Set + End Property + + ''' + Public Property PartNumber() As String + Get + Return Me.partNumberField + End Get + Set + Me.partNumberField = value + End Set + End Property + + ''' + Public Property SerialNumber() As String + Get + Return Me.serialNumberField + End Get + Set + Me.serialNumberField = value + End Set + End Property + + ''' + _ + Public Property RingCode() As LayeredTextType() + Get + Return Me.ringCodeField + End Get + Set + Me.ringCodeField = value + End Set + End Property + + ''' + _ + Public Property MasteringSID() As LayeredTextType() + Get + Return Me.masteringSIDField + End Get + Set + Me.masteringSIDField = value + End Set + End Property + + ''' + _ + Public Property Toolstamp() As LayeredTextType() + Get + Return Me.toolstampField + End Get + Set + Me.toolstampField = value + End Set + End Property + + ''' + _ + Public Property MouldSID() As LayeredTextType() + Get + Return Me.mouldSIDField + End Get + Set + Me.mouldSIDField = value + End Set + End Property + + ''' + _ + Public Property MouldText() As LayeredTextType() + Get + Return Me.mouldTextField + End Get + Set + Me.mouldTextField = value + End Set + End Property + + ''' + Public Property DiscType() As String + Get + Return Me.discTypeField + End Get + Set + Me.discTypeField = value + End Set + End Property + + ''' + Public Property DiscSubType() As String + Get + Return Me.discSubTypeField + End Get + Set + Me.discSubTypeField = value + End Set + End Property + + ''' + Public Property Offset() As Integer + Get + Return Me.offsetField + End Get + Set + Me.offsetField = value + End Set + End Property + + ''' + _ + Public Property OffsetSpecified() As Boolean + Get + Return Me.offsetFieldSpecified + End Get + Set + Me.offsetFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property Tracks() As UInteger() + Get + Return Me.tracksField + End Get + Set + Me.tracksField = value + End Set + End Property + + ''' + Public Property Sessions() As UInteger + Get + Return Me.sessionsField + End Get + Set + Me.sessionsField = value + End Set + End Property + + ''' + Public Property CopyProtection() As String + Get + Return Me.copyProtectionField + End Get + Set + Me.copyProtectionField = value + End Set + End Property + + ''' + Public Property Dimensions() As DimensionsType + Get + Return Me.dimensionsField + End Get + Set + Me.dimensionsField = value + End Set + End Property + + ''' + Public Property [Case]() As CaseType + Get + Return Me.caseField + End Get + Set + Me.caseField = value + End Set + End Property + + ''' + Public Property Scans() As ScansType + Get + Return Me.scansField + End Get + Set + Me.scansField = value + End Set + End Property + + ''' + Public Property PFI() As DumpType + Get + Return Me.pFIField + End Get + Set + Me.pFIField = value + End Set + End Property + + ''' + Public Property DMI() As DumpType + Get + Return Me.dMIField + End Get + Set + Me.dMIField = value + End Set + End Property + + ''' + Public Property CMI() As DumpType + Get + Return Me.cMIField + End Get + Set + Me.cMIField = value + End Set + End Property + + ''' + Public Property BCA() As DumpType + Get + Return Me.bCAField + End Get + Set + Me.bCAField = value + End Set + End Property + + ''' + Public Property ATIP() As DumpType + Get + Return Me.aTIPField + End Get + Set + Me.aTIPField = value + End Set + End Property + + ''' + Public Property ADIP() As DumpType + Get + Return Me.aDIPField + End Get + Set + Me.aDIPField = value + End Set + End Property + + ''' + Public Property PMA() As DumpType + Get + Return Me.pMAField + End Get + Set + Me.pMAField = value + End Set + End Property + + ''' + Public Property DDS() As DumpType + Get + Return Me.dDSField + End Get + Set + Me.dDSField = value + End Set + End Property + + ''' + Public Property SAI() As DumpType + Get + Return Me.sAIField + End Get + Set + Me.sAIField = value + End Set + End Property + + ''' + Public Property LastRMD() As DumpType + Get + Return Me.lastRMDField + End Get + Set + Me.lastRMDField = value + End Set + End Property + + ''' + Public Property PRI() As DumpType + Get + Return Me.pRIField + End Get + Set + Me.pRIField = value + End Set + End Property + + ''' + Public Property MediaID() As DumpType + Get + Return Me.mediaIDField + End Get + Set + Me.mediaIDField = value + End Set + End Property + + ''' + Public Property PFIR() As DumpType + Get + Return Me.pFIRField + End Get + Set + Me.pFIRField = value + End Set + End Property + + ''' + Public Property DCB() As DumpType + Get + Return Me.dCBField + End Get + Set + Me.dCBField = value + End Set + End Property + + ''' + Public Property DI() As DumpType + Get + Return Me.diField + End Get + Set + Me.diField = value + End Set + End Property + + ''' + Public Property PAC() As DumpType + Get + Return Me.pACField + End Get + Set + Me.pACField = value + End Set + End Property + + ''' + Public Property TOC() As DumpType + Get + Return Me.tOCField + End Get + Set + Me.tOCField = value + End Set + End Property + + ''' + Public Property LeadInCdText() As DumpType + Get + Return Me.leadInCdTextField + End Get + Set + Me.leadInCdTextField = value + End Set + End Property + + ''' + _ + Public Property FirstTrackPregrap() As BorderType() + Get + Return Me.firstTrackPregrapField + End Get + Set + Me.firstTrackPregrapField = value + End Set + End Property + + ''' + _ + Public Property LeadIn() As BorderType() + Get + Return Me.leadInField + End Get + Set + Me.leadInField = value + End Set + End Property + + ''' + _ + Public Property LeadOut() As BorderType() + Get + Return Me.leadOutField + End Get + Set + Me.leadOutField = value + End Set + End Property + + ''' + Public Property Xbox() As XboxType + Get + Return Me.xboxField + End Get + Set + Me.xboxField = value + End Set + End Property + + ''' + Public Property PS3Encryption() As PS3EncryptionType + Get + Return Me.pS3EncryptionField + End Get + Set + Me.pS3EncryptionField = value + End Set + End Property + + ''' + Public Property MediaCatalogueNumber() As String + Get + Return Me.mediaCatalogueNumberField + End Get + Set + Me.mediaCatalogueNumberField = value + End Set + End Property + + ''' + _ + Public Property Track() As TrackType() + Get + Return Me.trackField + End Get + Set + Me.trackField = value + End Set + End Property + + ''' + _ + Public Property DumpHardwareArray() As DumpHardwareType() + Get + Return Me.dumpHardwareArrayField + End Get + Set + Me.dumpHardwareArrayField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class UserManualType + + Private languageField() As LanguagesTypeLanguage + + Private pagesField As UInteger + + Private pageSizeField As String + + Private scanField As ScanType + + ''' + _ + Public Property Language() As LanguagesTypeLanguage() + Get + Return Me.languageField + End Get + Set + Me.languageField = value + End Set + End Property + + ''' + Public Property Pages() As UInteger + Get + Return Me.pagesField + End Get + Set + Me.pagesField = value + End Set + End Property + + ''' + Public Property PageSize() As String + Get + Return Me.pageSizeField + End Get + Set + Me.pageSizeField = value + End Set + End Property + + ''' + Public Property Scan() As ScanType + Get + Return Me.scanField + End Get + Set + Me.scanField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class RequiredOperatingSystemType + + Private nameField As String + + Private versionField() As String + + ''' + Public Property Name() As String + Get + Return Me.nameField + End Get + Set + Me.nameField = value + End Set + End Property + + ''' + _ + Public Property Version() As String() + Get + Return Me.versionField + End Get + Set + Me.versionField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class BookType + + Private barcodesField() As BarcodeType + + Private coverField As CoverType + + Private nameField As String + + Private editorialField As String + + Private authorField As String + + Private publicationDateField As Date + + Private publicationDateFieldSpecified As Boolean + + Private languageField() As LanguagesTypeLanguage + + Private pagesField As UInteger + + Private pagesFieldSpecified As Boolean + + Private pageSizeField As String + + Private scanField As ScanType + + ''' + _ + Public Property Barcodes() As BarcodeType() + Get + Return Me.barcodesField + End Get + Set + Me.barcodesField = value + End Set + End Property + + ''' + Public Property Cover() As CoverType + Get + Return Me.coverField + End Get + Set + Me.coverField = value + End Set + End Property + + ''' + Public Property Name() As String + Get + Return Me.nameField + End Get + Set + Me.nameField = value + End Set + End Property + + ''' + Public Property Editorial() As String + Get + Return Me.editorialField + End Get + Set + Me.editorialField = value + End Set + End Property + + ''' + Public Property Author() As String + Get + Return Me.authorField + End Get + Set + Me.authorField = value + End Set + End Property + + ''' + _ + Public Property PublicationDate() As Date + Get + Return Me.publicationDateField + End Get + Set + Me.publicationDateField = value + End Set + End Property + + ''' + _ + Public Property PublicationDateSpecified() As Boolean + Get + Return Me.publicationDateFieldSpecified + End Get + Set + Me.publicationDateFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property Language() As LanguagesTypeLanguage() + Get + Return Me.languageField + End Get + Set + Me.languageField = value + End Set + End Property + + ''' + Public Property Pages() As UInteger + Get + Return Me.pagesField + End Get + Set + Me.pagesField = value + End Set + End Property + + ''' + _ + Public Property PagesSpecified() As Boolean + Get + Return Me.pagesFieldSpecified + End Get + Set + Me.pagesFieldSpecified = value + End Set + End Property + + ''' + Public Property PageSize() As String + Get + Return Me.pageSizeField + End Get + Set + Me.pageSizeField = value + End Set + End Property + + ''' + Public Property Scan() As ScanType + Get + Return Me.scanField + End Get + Set + Me.scanField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class CoverType + + Private fileField As FileType + + Private checksumsField() As ChecksumType + + Private thumbnailField() As Byte + + ''' + Public Property File() As FileType + Get + Return Me.fileField + End Get + Set + Me.fileField = value + End Set + End Property + + ''' + _ + Public Property Checksums() As ChecksumType() + Get + Return Me.checksumsField + End Get + Set + Me.checksumsField = value + End Set + End Property + + ''' + _ + Public Property Thumbnail() As Byte() + Get + Return Me.thumbnailField + End Get + Set + Me.thumbnailField = value + End Set + End Property + End Class + + ''' + _ + Partial Public Class MagazineType + + Private barcodesField() As BarcodeType + + Private coverField As CoverType + + Private nameField As String + + Private editorialField As String + + Private publicationDateField As Date + + Private publicationDateFieldSpecified As Boolean + + Private numberField As UInteger + + Private numberFieldSpecified As Boolean + + Private languageField() As LanguagesTypeLanguage + + Private pagesField As UInteger + + Private pagesFieldSpecified As Boolean + + Private pageSizeField As String + + Private scanField As ScanType + + ''' + _ + Public Property Barcodes() As BarcodeType() + Get + Return Me.barcodesField + End Get + Set + Me.barcodesField = value + End Set + End Property + + ''' + Public Property Cover() As CoverType + Get + Return Me.coverField + End Get + Set + Me.coverField = value + End Set + End Property + + ''' + Public Property Name() As String + Get + Return Me.nameField + End Get + Set + Me.nameField = value + End Set + End Property + + ''' + Public Property Editorial() As String + Get + Return Me.editorialField + End Get + Set + Me.editorialField = value + End Set + End Property + + ''' + _ + Public Property PublicationDate() As Date + Get + Return Me.publicationDateField + End Get + Set + Me.publicationDateField = value + End Set + End Property + + ''' + _ + Public Property PublicationDateSpecified() As Boolean + Get + Return Me.publicationDateFieldSpecified + End Get + Set + Me.publicationDateFieldSpecified = value + End Set + End Property + + ''' + Public Property Number() As UInteger + Get + Return Me.numberField + End Get + Set + Me.numberField = value + End Set + End Property + + ''' + _ + Public Property NumberSpecified() As Boolean + Get + Return Me.numberFieldSpecified + End Get + Set + Me.numberFieldSpecified = value + End Set + End Property + + ''' + _ + Public Property Language() As LanguagesTypeLanguage() + Get + Return Me.languageField + End Get + Set + Me.languageField = value + End Set + End Property + + ''' + Public Property Pages() As UInteger + Get + Return Me.pagesField + End Get + Set + Me.pagesField = value + End Set + End Property + + ''' + _ + Public Property PagesSpecified() As Boolean + Get + Return Me.pagesFieldSpecified + End Get + Set + Me.pagesFieldSpecified = value + End Set + End Property + + ''' + Public Property PageSize() As String + Get + Return Me.pageSizeField + End Get + Set + Me.pageSizeField = value + End Set + End Property + + ''' + Public Property Scan() As ScanType + Get + Return Me.scanField + End Get + Set + Me.scanField = value + End Set + End Property + End Class + + ''' + _ + Public Enum ArchitecturesTypeArchitecture + + ''' + _ + Item4004 + + ''' + _ + Item4040 + + ''' + _ + Item6502 + + ''' + _ + Item65816 + + ''' + _ + Item8008 + + ''' + _ + Item8051 + + ''' + _ + Item8080 + + ''' + _ + Item8085 + + ''' + aarch64 + + ''' + am29000 + + ''' + amd64 + + ''' + apx432 + + ''' + arm + + ''' + avr + + ''' + avr32 + + ''' + axp + + ''' + clipper + + ''' + cray + + ''' + esa390 + + ''' + hobbit + + ''' + i86 + + ''' + i860 + + ''' + i960 + + ''' + ia32 + + ''' + ia64 + + ''' + m56k + + ''' + m6800 + + ''' + m6801 + + ''' + m6805 + + ''' + m6809 + + ''' + m68k + + ''' + m88k + + ''' + mcs41 + + ''' + mcs48 + + ''' + mips32 + + ''' + mips64 + + ''' + msp430 + + ''' + nios2 + + ''' + openrisc + + ''' + parisc + + ''' + pdp1 + + ''' + pdp10 + + ''' + pdp11 + + ''' + pdp7 + + ''' + pdp8 + + ''' + pic + + ''' + power + + ''' + ppc + + ''' + ppc64 + + ''' + prism + + ''' + renesasrx + + ''' + riscv + + ''' + s360 + + ''' + s370 + + ''' + sh + + ''' + sh1 + + ''' + sh2 + + ''' + sh3 + + ''' + sh4 + + ''' + sh5 + + ''' + sh64 + + ''' + sparc + + ''' + sparc64 + + ''' + transputer + + ''' + vax + + ''' + we32000 + + ''' + x32 + + ''' + z80 + + ''' + z800 + + ''' + z8000 + + ''' + z80000 + + ''' + zarch + End Enum +End Namespace diff --git a/CICMMetadata/java/generated/ATAType.java b/CICMMetadata/java/generated/ATAType.java new file mode 100644 index 0000000..044a1b1 --- /dev/null +++ b/CICMMetadata/java/generated/ATAType.java @@ -0,0 +1,71 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Contains ATA/ATAPI device information + * + *

Clase Java para ATAType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="ATAType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Identify" type="{}DumpType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ATAType", propOrder = { + "identify" +}) +public class ATAType { + + @XmlElement(name = "Identify", required = true) + protected DumpType identify; + + /** + * Obtiene el valor de la propiedad identify. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getIdentify() { + return identify; + } + + /** + * Define el valor de la propiedad identify. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setIdentify(DumpType value) { + this.identify = value; + } + +} diff --git a/CICMMetadata/java/generated/AdvertisementType.java b/CICMMetadata/java/generated/AdvertisementType.java new file mode 100644 index 0000000..d6fbdf5 --- /dev/null +++ b/CICMMetadata/java/generated/AdvertisementType.java @@ -0,0 +1,390 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para AdvertisementType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="AdvertisementType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Manufacturer" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Product" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="File" type="{}FileType"/>
+ *         <element name="FileSize" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="Frames" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" minOccurs="0"/>
+ *         <element name="Duration" type="{http://www.w3.org/2001/XMLSchema}double"/>
+ *         <element name="MeanFrameRate" type="{http://www.w3.org/2001/XMLSchema}float" minOccurs="0"/>
+ *         <element name="Checksums" type="{}ChecksumsType"/>
+ *         <element name="AudioTrack" type="{}AudioTracksType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="VideoTrack" type="{}VideoTracksType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="SubtitleTrack" type="{}SubtitleTracksType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="Recording" type="{}RecordingType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AdvertisementType", propOrder = { + "manufacturer", + "product", + "file", + "fileSize", + "frames", + "duration", + "meanFrameRate", + "checksums", + "audioTrack", + "videoTrack", + "subtitleTrack", + "recording" +}) +public class AdvertisementType { + + @XmlElement(name = "Manufacturer", required = true) + protected String manufacturer; + @XmlElement(name = "Product", required = true) + protected String product; + @XmlElement(name = "File", required = true) + protected FileType file; + @XmlElement(name = "FileSize", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger fileSize; + @XmlElement(name = "Frames") + @XmlSchemaType(name = "unsignedLong") + protected BigInteger frames; + @XmlElement(name = "Duration") + protected double duration; + @XmlElement(name = "MeanFrameRate") + protected Float meanFrameRate; + @XmlElement(name = "Checksums", required = true) + protected ChecksumsType checksums; + @XmlElement(name = "AudioTrack") + protected List audioTrack; + @XmlElement(name = "VideoTrack") + protected List videoTrack; + @XmlElement(name = "SubtitleTrack") + protected List subtitleTrack; + @XmlElement(name = "Recording") + protected RecordingType recording; + + /** + * Obtiene el valor de la propiedad manufacturer. + * + * @return + * possible object is + * {@link String } + * + */ + public String getManufacturer() { + return manufacturer; + } + + /** + * Define el valor de la propiedad manufacturer. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setManufacturer(String value) { + this.manufacturer = value; + } + + /** + * Obtiene el valor de la propiedad product. + * + * @return + * possible object is + * {@link String } + * + */ + public String getProduct() { + return product; + } + + /** + * Define el valor de la propiedad product. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setProduct(String value) { + this.product = value; + } + + /** + * Obtiene el valor de la propiedad file. + * + * @return + * possible object is + * {@link FileType } + * + */ + public FileType getFile() { + return file; + } + + /** + * Define el valor de la propiedad file. + * + * @param value + * allowed object is + * {@link FileType } + * + */ + public void setFile(FileType value) { + this.file = value; + } + + /** + * Obtiene el valor de la propiedad fileSize. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getFileSize() { + return fileSize; + } + + /** + * Define el valor de la propiedad fileSize. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setFileSize(BigInteger value) { + this.fileSize = value; + } + + /** + * Obtiene el valor de la propiedad frames. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getFrames() { + return frames; + } + + /** + * Define el valor de la propiedad frames. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setFrames(BigInteger value) { + this.frames = value; + } + + /** + * Obtiene el valor de la propiedad duration. + * + */ + public double getDuration() { + return duration; + } + + /** + * Define el valor de la propiedad duration. + * + */ + public void setDuration(double value) { + this.duration = value; + } + + /** + * Obtiene el valor de la propiedad meanFrameRate. + * + * @return + * possible object is + * {@link Float } + * + */ + public Float getMeanFrameRate() { + return meanFrameRate; + } + + /** + * Define el valor de la propiedad meanFrameRate. + * + * @param value + * allowed object is + * {@link Float } + * + */ + public void setMeanFrameRate(Float value) { + this.meanFrameRate = value; + } + + /** + * Obtiene el valor de la propiedad checksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getChecksums() { + return checksums; + } + + /** + * Define el valor de la propiedad checksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setChecksums(ChecksumsType value) { + this.checksums = value; + } + + /** + * Gets the value of the audioTrack property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the audioTrack property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAudioTrack().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link AudioTracksType } + * + * + */ + public List getAudioTrack() { + if (audioTrack == null) { + audioTrack = new ArrayList(); + } + return this.audioTrack; + } + + /** + * Gets the value of the videoTrack property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the videoTrack property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getVideoTrack().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link VideoTracksType } + * + * + */ + public List getVideoTrack() { + if (videoTrack == null) { + videoTrack = new ArrayList(); + } + return this.videoTrack; + } + + /** + * Gets the value of the subtitleTrack property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the subtitleTrack property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSubtitleTrack().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link SubtitleTracksType } + * + * + */ + public List getSubtitleTrack() { + if (subtitleTrack == null) { + subtitleTrack = new ArrayList(); + } + return this.subtitleTrack; + } + + /** + * Obtiene el valor de la propiedad recording. + * + * @return + * possible object is + * {@link RecordingType } + * + */ + public RecordingType getRecording() { + return recording; + } + + /** + * Define el valor de la propiedad recording. + * + * @param value + * allowed object is + * {@link RecordingType } + * + */ + public void setRecording(RecordingType value) { + this.recording = value; + } + +} diff --git a/CICMMetadata/java/generated/ArchitecturesType.java b/CICMMetadata/java/generated/ArchitecturesType.java new file mode 100644 index 0000000..1838f6c --- /dev/null +++ b/CICMMetadata/java/generated/ArchitecturesType.java @@ -0,0 +1,156 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * CPU architectures this set is intended to be run on + * + * + *

Clase Java para ArchitecturesType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="ArchitecturesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Architecture" maxOccurs="unbounded">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *               <enumeration value="4004"/>
+ *               <enumeration value="4040"/>
+ *               <enumeration value="6502"/>
+ *               <enumeration value="65816"/>
+ *               <enumeration value="8008"/>
+ *               <enumeration value="8051"/>
+ *               <enumeration value="8080"/>
+ *               <enumeration value="8085"/>
+ *               <enumeration value="aarch64"/>
+ *               <enumeration value="am29000"/>
+ *               <enumeration value="amd64"/>
+ *               <enumeration value="apx432"/>
+ *               <enumeration value="arm"/>
+ *               <enumeration value="avr"/>
+ *               <enumeration value="avr32"/>
+ *               <enumeration value="axp"/>
+ *               <enumeration value="clipper"/>
+ *               <enumeration value="cray"/>
+ *               <enumeration value="esa390"/>
+ *               <enumeration value="hobbit"/>
+ *               <enumeration value="i86"/>
+ *               <enumeration value="i860"/>
+ *               <enumeration value="i960"/>
+ *               <enumeration value="ia32"/>
+ *               <enumeration value="ia64"/>
+ *               <enumeration value="m56k"/>
+ *               <enumeration value="m6800"/>
+ *               <enumeration value="m6801"/>
+ *               <enumeration value="m6805"/>
+ *               <enumeration value="m6809"/>
+ *               <enumeration value="m68k"/>
+ *               <enumeration value="m88k"/>
+ *               <enumeration value="mcs41"/>
+ *               <enumeration value="mcs48"/>
+ *               <enumeration value="mips32"/>
+ *               <enumeration value="mips64"/>
+ *               <enumeration value="msp430"/>
+ *               <enumeration value="nios2"/>
+ *               <enumeration value="openrisc"/>
+ *               <enumeration value="parisc"/>
+ *               <enumeration value="pdp1"/>
+ *               <enumeration value="pdp10"/>
+ *               <enumeration value="pdp11"/>
+ *               <enumeration value="pdp7"/>
+ *               <enumeration value="pdp8"/>
+ *               <enumeration value="pic"/>
+ *               <enumeration value="power"/>
+ *               <enumeration value="ppc"/>
+ *               <enumeration value="ppc64"/>
+ *               <enumeration value="prism"/>
+ *               <enumeration value="renesasrx"/>
+ *               <enumeration value="riscv"/>
+ *               <enumeration value="s360"/>
+ *               <enumeration value="s370"/>
+ *               <enumeration value="sh"/>
+ *               <enumeration value="sh1"/>
+ *               <enumeration value="sh2"/>
+ *               <enumeration value="sh3"/>
+ *               <enumeration value="sh4"/>
+ *               <enumeration value="sh5"/>
+ *               <enumeration value="sh64"/>
+ *               <enumeration value="sparc"/>
+ *               <enumeration value="sparc64"/>
+ *               <enumeration value="transputer"/>
+ *               <enumeration value="vax"/>
+ *               <enumeration value="we32000"/>
+ *               <enumeration value="x32"/>
+ *               <enumeration value="z80"/>
+ *               <enumeration value="z800"/>
+ *               <enumeration value="z8000"/>
+ *               <enumeration value="z80000"/>
+ *               <enumeration value="zarch"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ArchitecturesType", propOrder = { + "architecture" +}) +public class ArchitecturesType { + + @XmlElement(name = "Architecture", required = true) + protected List architecture; + + /** + * Gets the value of the architecture property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the architecture property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getArchitecture().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getArchitecture() { + if (architecture == null) { + architecture = new ArrayList(); + } + return this.architecture; + } + +} diff --git a/CICMMetadata/java/generated/AudioBlockType.java b/CICMMetadata/java/generated/AudioBlockType.java new file mode 100644 index 0000000..70a785a --- /dev/null +++ b/CICMMetadata/java/generated/AudioBlockType.java @@ -0,0 +1,186 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + * Information about "blocks" in audio based media + * + *

Clase Java para AudioBlockType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="AudioBlockType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Image" type="{}ImageType"/>
+ *         <element name="Size" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="AccoustID" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Checksums" type="{}ChecksumsType"/>
+ *         <element name="Format" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AudioBlockType", propOrder = { + "image", + "size", + "accoustID", + "checksums", + "format" +}) +public class AudioBlockType { + + @XmlElement(name = "Image", required = true) + protected ImageType image; + @XmlElement(name = "Size", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger size; + @XmlElement(name = "AccoustID", required = true) + protected String accoustID; + @XmlElement(name = "Checksums", required = true) + protected ChecksumsType checksums; + @XmlElement(name = "Format") + protected String format; + + /** + * Obtiene el valor de la propiedad image. + * + * @return + * possible object is + * {@link ImageType } + * + */ + public ImageType getImage() { + return image; + } + + /** + * Define el valor de la propiedad image. + * + * @param value + * allowed object is + * {@link ImageType } + * + */ + public void setImage(ImageType value) { + this.image = value; + } + + /** + * Obtiene el valor de la propiedad size. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSize() { + return size; + } + + /** + * Define el valor de la propiedad size. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSize(BigInteger value) { + this.size = value; + } + + /** + * Obtiene el valor de la propiedad accoustID. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAccoustID() { + return accoustID; + } + + /** + * Define el valor de la propiedad accoustID. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAccoustID(String value) { + this.accoustID = value; + } + + /** + * Obtiene el valor de la propiedad checksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getChecksums() { + return checksums; + } + + /** + * Define el valor de la propiedad checksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setChecksums(ChecksumsType value) { + this.checksums = value; + } + + /** + * Obtiene el valor de la propiedad format. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFormat() { + return format; + } + + /** + * Define el valor de la propiedad format. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFormat(String value) { + this.format = value; + } + +} diff --git a/CICMMetadata/java/generated/AudioMediaType.java b/CICMMetadata/java/generated/AudioMediaType.java new file mode 100644 index 0000000..6bc6206 --- /dev/null +++ b/CICMMetadata/java/generated/AudioMediaType.java @@ -0,0 +1,447 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes a dump of a media that is stored in an audio device (like a ZX Spectrum + * cassette) + * + * + *

Clase Java para AudioMediaType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="AudioMediaType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Image" type="{}ImageType"/>
+ *         <element name="Size" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="Checksums" type="{}ChecksumsType"/>
+ *         <element name="Sequence" type="{}SequenceType"/>
+ *         <element name="PartNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="SerialNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Manufacturer" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Model" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="AccoustID" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Block" type="{}AudioBlockType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="CopyProtection" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Dimensions" type="{}DimensionsType"/>
+ *         <element name="Scans" type="{}ScansType" minOccurs="0"/>
+ *         <element name="DumpHardwareArray" type="{}DumpHardwareArrayType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AudioMediaType", propOrder = { + "image", + "size", + "checksums", + "sequence", + "partNumber", + "serialNumber", + "manufacturer", + "model", + "accoustID", + "block", + "copyProtection", + "dimensions", + "scans", + "dumpHardwareArray" +}) +public class AudioMediaType { + + @XmlElement(name = "Image", required = true) + protected ImageType image; + @XmlElement(name = "Size", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger size; + @XmlElement(name = "Checksums", required = true) + protected ChecksumsType checksums; + @XmlElement(name = "Sequence", required = true) + protected SequenceType sequence; + @XmlElement(name = "PartNumber") + protected String partNumber; + @XmlElement(name = "SerialNumber") + protected String serialNumber; + @XmlElement(name = "Manufacturer") + protected String manufacturer; + @XmlElement(name = "Model") + protected String model; + @XmlElement(name = "AccoustID") + protected String accoustID; + @XmlElement(name = "Block") + protected List block; + @XmlElement(name = "CopyProtection") + protected String copyProtection; + @XmlElement(name = "Dimensions", required = true) + protected DimensionsType dimensions; + @XmlElement(name = "Scans") + protected ScansType scans; + @XmlElement(name = "DumpHardwareArray") + protected DumpHardwareArrayType dumpHardwareArray; + + /** + * Obtiene el valor de la propiedad image. + * + * @return + * possible object is + * {@link ImageType } + * + */ + public ImageType getImage() { + return image; + } + + /** + * Define el valor de la propiedad image. + * + * @param value + * allowed object is + * {@link ImageType } + * + */ + public void setImage(ImageType value) { + this.image = value; + } + + /** + * Obtiene el valor de la propiedad size. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSize() { + return size; + } + + /** + * Define el valor de la propiedad size. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSize(BigInteger value) { + this.size = value; + } + + /** + * Obtiene el valor de la propiedad checksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getChecksums() { + return checksums; + } + + /** + * Define el valor de la propiedad checksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setChecksums(ChecksumsType value) { + this.checksums = value; + } + + /** + * Obtiene el valor de la propiedad sequence. + * + * @return + * possible object is + * {@link SequenceType } + * + */ + public SequenceType getSequence() { + return sequence; + } + + /** + * Define el valor de la propiedad sequence. + * + * @param value + * allowed object is + * {@link SequenceType } + * + */ + public void setSequence(SequenceType value) { + this.sequence = value; + } + + /** + * Obtiene el valor de la propiedad partNumber. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPartNumber() { + return partNumber; + } + + /** + * Define el valor de la propiedad partNumber. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPartNumber(String value) { + this.partNumber = value; + } + + /** + * Obtiene el valor de la propiedad serialNumber. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSerialNumber() { + return serialNumber; + } + + /** + * Define el valor de la propiedad serialNumber. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSerialNumber(String value) { + this.serialNumber = value; + } + + /** + * Obtiene el valor de la propiedad manufacturer. + * + * @return + * possible object is + * {@link String } + * + */ + public String getManufacturer() { + return manufacturer; + } + + /** + * Define el valor de la propiedad manufacturer. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setManufacturer(String value) { + this.manufacturer = value; + } + + /** + * Obtiene el valor de la propiedad model. + * + * @return + * possible object is + * {@link String } + * + */ + public String getModel() { + return model; + } + + /** + * Define el valor de la propiedad model. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setModel(String value) { + this.model = value; + } + + /** + * Obtiene el valor de la propiedad accoustID. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAccoustID() { + return accoustID; + } + + /** + * Define el valor de la propiedad accoustID. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAccoustID(String value) { + this.accoustID = value; + } + + /** + * Gets the value of the block property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the block property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getBlock().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link AudioBlockType } + * + * + */ + public List getBlock() { + if (block == null) { + block = new ArrayList(); + } + return this.block; + } + + /** + * Obtiene el valor de la propiedad copyProtection. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCopyProtection() { + return copyProtection; + } + + /** + * Define el valor de la propiedad copyProtection. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCopyProtection(String value) { + this.copyProtection = value; + } + + /** + * Obtiene el valor de la propiedad dimensions. + * + * @return + * possible object is + * {@link DimensionsType } + * + */ + public DimensionsType getDimensions() { + return dimensions; + } + + /** + * Define el valor de la propiedad dimensions. + * + * @param value + * allowed object is + * {@link DimensionsType } + * + */ + public void setDimensions(DimensionsType value) { + this.dimensions = value; + } + + /** + * Obtiene el valor de la propiedad scans. + * + * @return + * possible object is + * {@link ScansType } + * + */ + public ScansType getScans() { + return scans; + } + + /** + * Define el valor de la propiedad scans. + * + * @param value + * allowed object is + * {@link ScansType } + * + */ + public void setScans(ScansType value) { + this.scans = value; + } + + /** + * Obtiene el valor de la propiedad dumpHardwareArray. + * + * @return + * possible object is + * {@link DumpHardwareArrayType } + * + */ + public DumpHardwareArrayType getDumpHardwareArray() { + return dumpHardwareArray; + } + + /** + * Define el valor de la propiedad dumpHardwareArray. + * + * @param value + * allowed object is + * {@link DumpHardwareArrayType } + * + */ + public void setDumpHardwareArray(DumpHardwareArrayType value) { + this.dumpHardwareArray = value; + } + +} diff --git a/CICMMetadata/java/generated/AudioTracksType.java b/CICMMetadata/java/generated/AudioTracksType.java new file mode 100644 index 0000000..d471eb7 --- /dev/null +++ b/CICMMetadata/java/generated/AudioTracksType.java @@ -0,0 +1,208 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para AudioTracksType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="AudioTracksType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Languages" type="{}LanguagesType" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="TrackNumber" use="required">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}unsignedInt">
+ *             <minInclusive value="1"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="AccoustID" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="Codec" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="Channels" use="required" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
+ *       <attribute name="SampleRate" use="required" type="{http://www.w3.org/2001/XMLSchema}double" />
+ *       <attribute name="MeanBitrate" use="required" type="{http://www.w3.org/2001/XMLSchema}long" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "AudioTracksType", propOrder = { + "languages" +}) +public class AudioTracksType { + + @XmlElement(name = "Languages") + protected LanguagesType languages; + @XmlAttribute(name = "TrackNumber", required = true) + protected long trackNumber; + @XmlAttribute(name = "AccoustID") + protected String accoustID; + @XmlAttribute(name = "Codec", required = true) + protected String codec; + @XmlAttribute(name = "Channels", required = true) + @XmlSchemaType(name = "unsignedInt") + protected long channels; + @XmlAttribute(name = "SampleRate", required = true) + protected double sampleRate; + @XmlAttribute(name = "MeanBitrate", required = true) + protected long meanBitrate; + + /** + * Obtiene el valor de la propiedad languages. + * + * @return + * possible object is + * {@link LanguagesType } + * + */ + public LanguagesType getLanguages() { + return languages; + } + + /** + * Define el valor de la propiedad languages. + * + * @param value + * allowed object is + * {@link LanguagesType } + * + */ + public void setLanguages(LanguagesType value) { + this.languages = value; + } + + /** + * Obtiene el valor de la propiedad trackNumber. + * + */ + public long getTrackNumber() { + return trackNumber; + } + + /** + * Define el valor de la propiedad trackNumber. + * + */ + public void setTrackNumber(long value) { + this.trackNumber = value; + } + + /** + * Obtiene el valor de la propiedad accoustID. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAccoustID() { + return accoustID; + } + + /** + * Define el valor de la propiedad accoustID. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAccoustID(String value) { + this.accoustID = value; + } + + /** + * Obtiene el valor de la propiedad codec. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCodec() { + return codec; + } + + /** + * Define el valor de la propiedad codec. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCodec(String value) { + this.codec = value; + } + + /** + * Obtiene el valor de la propiedad channels. + * + */ + public long getChannels() { + return channels; + } + + /** + * Define el valor de la propiedad channels. + * + */ + public void setChannels(long value) { + this.channels = value; + } + + /** + * Obtiene el valor de la propiedad sampleRate. + * + */ + public double getSampleRate() { + return sampleRate; + } + + /** + * Define el valor de la propiedad sampleRate. + * + */ + public void setSampleRate(double value) { + this.sampleRate = value; + } + + /** + * Obtiene el valor de la propiedad meanBitrate. + * + */ + public long getMeanBitrate() { + return meanBitrate; + } + + /** + * Define el valor de la propiedad meanBitrate. + * + */ + public void setMeanBitrate(long value) { + this.meanBitrate = value; + } + +} diff --git a/CICMMetadata/java/generated/BarcodeType.java b/CICMMetadata/java/generated/BarcodeType.java new file mode 100644 index 0000000..b4c191d --- /dev/null +++ b/CICMMetadata/java/generated/BarcodeType.java @@ -0,0 +1,129 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + *

Clase Java para BarcodeType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="BarcodeType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *       <attribute name="type" use="required">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="aztec"/>
+ *             <enumeration value="codabar"/>
+ *             <enumeration value="code11"/>
+ *             <enumeration value="code128"/>
+ *             <enumeration value="code39"/>
+ *             <enumeration value="code93"/>
+ *             <enumeration value="cpcbinary"/>
+ *             <enumeration value="ezcode"/>
+ *             <enumeration value="fim"/>
+ *             <enumeration value="itf"/>
+ *             <enumeration value="itf14"/>
+ *             <enumeration value="ean13"/>
+ *             <enumeration value="ean8"/>
+ *             <enumeration value="maxicode"/>
+ *             <enumeration value="isbn"/>
+ *             <enumeration value="isrc"/>
+ *             <enumeration value="msi"/>
+ *             <enumeration value="tof"/>
+ *             <enumeration value="shotcode"/>
+ *             <enumeration value="rm4scc"/>
+ *             <enumeration value="qr"/>
+ *             <enumeration value="ean5"/>
+ *             <enumeration value="ean2"/>
+ *             <enumeration value="qr"/>
+ *             <enumeration value="postnet"/>
+ *             <enumeration value="postbar"/>
+ *             <enumeration value="plessey"/>
+ *             <enumeration value="pharmacode"/>
+ *             <enumeration value="pdf417"/>
+ *             <enumeration value="patchcode"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "BarcodeType", propOrder = { + "value" +}) +public class BarcodeType { + + @XmlValue + protected String value; + @XmlAttribute(name = "type", required = true) + protected String type; + + /** + * Obtiene el valor de la propiedad value. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Define el valor de la propiedad value. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Obtiene el valor de la propiedad type. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Define el valor de la propiedad type. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + +} diff --git a/CICMMetadata/java/generated/BarcodesType.java b/CICMMetadata/java/generated/BarcodesType.java new file mode 100644 index 0000000..0aef5f6 --- /dev/null +++ b/CICMMetadata/java/generated/BarcodesType.java @@ -0,0 +1,78 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Barcodes for this release + * + *

Clase Java para BarcodesType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="BarcodesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Barcode" type="{}BarcodeType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "BarcodesType", propOrder = { + "barcode" +}) +public class BarcodesType { + + @XmlElement(name = "Barcode", required = true) + protected List barcode; + + /** + * Gets the value of the barcode property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the barcode property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getBarcode().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link BarcodeType } + * + * + */ + public List getBarcode() { + if (barcode == null) { + barcode = new ArrayList(); + } + return this.barcode; + } + +} diff --git a/CICMMetadata/java/generated/BlockMediaType.java b/CICMMetadata/java/generated/BlockMediaType.java new file mode 100644 index 0000000..8e1ba38 --- /dev/null +++ b/CICMMetadata/java/generated/BlockMediaType.java @@ -0,0 +1,1051 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes a dump of a block (sector) layered media + * + *

Clase Java para BlockMediaType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="BlockMediaType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Image" type="{}ImageType"/>
+ *         <element name="Size" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="Checksums" type="{}ChecksumsType"/>
+ *         <element name="ContentChecksums" type="{}ChecksumsType"/>
+ *         <element name="Sequence" type="{}SequenceType"/>
+ *         <element name="Manufacturer" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Model" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Serial" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Firmware" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Interface" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="PartNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="SerialNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="PhysicalBlockSize" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
+ *         <element name="LogicalBlockSize" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
+ *         <element name="LogicalBlocks" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="VariableBlockSize" type="{}VariableBlockSizeType" minOccurs="0"/>
+ *         <element name="TapeInformation" type="{}TapeInformationType" minOccurs="0"/>
+ *         <element name="Scans" type="{}ScansType" minOccurs="0"/>
+ *         <element name="ATA" type="{}ATAType" minOccurs="0"/>
+ *         <element name="PCI" type="{}PCIType" minOccurs="0"/>
+ *         <element name="PCMCIA" type="{}PCMCIAType" minOccurs="0"/>
+ *         <element name="SecureDigital" type="{}SecureDigitalType" minOccurs="0"/>
+ *         <element name="MultiMediaCard" type="{}MultiMediaCardType" minOccurs="0"/>
+ *         <element name="SCSI" type="{}SCSIType" minOccurs="0"/>
+ *         <element name="USB" type="{}USBType" minOccurs="0"/>
+ *         <element name="MAM" type="{}DumpType" minOccurs="0"/>
+ *         <element name="Heads" type="{http://www.w3.org/2001/XMLSchema}unsignedShort" minOccurs="0"/>
+ *         <element name="Cylinders" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/>
+ *         <element name="SectorsPerTrack" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" minOccurs="0"/>
+ *         <element name="Track" type="{}BlockTrackType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="CopyProtection" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Dimensions" type="{}DimensionsType"/>
+ *         <element name="FileSystemInformation" type="{}FileSystemInformationType" minOccurs="0"/>
+ *         <element name="DumpHardwareArray" type="{}DumpHardwareArrayType" minOccurs="0"/>
+ *         <element name="DiskType" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="DiskSubType" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "BlockMediaType", propOrder = { + "image", + "size", + "checksums", + "contentChecksums", + "sequence", + "manufacturer", + "model", + "serial", + "firmware", + "_interface", + "partNumber", + "serialNumber", + "physicalBlockSize", + "logicalBlockSize", + "logicalBlocks", + "variableBlockSize", + "tapeInformation", + "scans", + "ata", + "pci", + "pcmcia", + "secureDigital", + "multiMediaCard", + "scsi", + "usb", + "mam", + "heads", + "cylinders", + "sectorsPerTrack", + "track", + "copyProtection", + "dimensions", + "fileSystemInformation", + "dumpHardwareArray", + "diskType", + "diskSubType" +}) +public class BlockMediaType { + + @XmlElement(name = "Image", required = true) + protected ImageType image; + @XmlElement(name = "Size", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger size; + @XmlElement(name = "Checksums", required = true) + protected ChecksumsType checksums; + @XmlElement(name = "ContentChecksums", required = true) + protected ChecksumsType contentChecksums; + @XmlElement(name = "Sequence", required = true) + protected SequenceType sequence; + @XmlElement(name = "Manufacturer") + protected String manufacturer; + @XmlElement(name = "Model") + protected String model; + @XmlElement(name = "Serial") + protected String serial; + @XmlElement(name = "Firmware") + protected String firmware; + @XmlElement(name = "Interface") + protected String _interface; + @XmlElement(name = "PartNumber") + protected String partNumber; + @XmlElement(name = "SerialNumber") + protected String serialNumber; + @XmlElement(name = "PhysicalBlockSize") + @XmlSchemaType(name = "unsignedInt") + protected long physicalBlockSize; + @XmlElement(name = "LogicalBlockSize") + @XmlSchemaType(name = "unsignedInt") + protected long logicalBlockSize; + @XmlElement(name = "LogicalBlocks", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger logicalBlocks; + @XmlElement(name = "VariableBlockSize") + protected VariableBlockSizeType variableBlockSize; + @XmlElement(name = "TapeInformation") + protected TapeInformationType tapeInformation; + @XmlElement(name = "Scans") + protected ScansType scans; + @XmlElement(name = "ATA") + protected ATAType ata; + @XmlElement(name = "PCI") + protected PCIType pci; + @XmlElement(name = "PCMCIA") + protected PCMCIAType pcmcia; + @XmlElement(name = "SecureDigital") + protected SecureDigitalType secureDigital; + @XmlElement(name = "MultiMediaCard") + protected MultiMediaCardType multiMediaCard; + @XmlElement(name = "SCSI") + protected SCSIType scsi; + @XmlElement(name = "USB") + protected USBType usb; + @XmlElement(name = "MAM") + protected DumpType mam; + @XmlElement(name = "Heads") + @XmlSchemaType(name = "unsignedShort") + protected Integer heads; + @XmlElement(name = "Cylinders") + @XmlSchemaType(name = "unsignedInt") + protected Long cylinders; + @XmlElement(name = "SectorsPerTrack") + @XmlSchemaType(name = "unsignedLong") + protected BigInteger sectorsPerTrack; + @XmlElement(name = "Track") + protected List track; + @XmlElement(name = "CopyProtection") + protected String copyProtection; + @XmlElement(name = "Dimensions", required = true) + protected DimensionsType dimensions; + @XmlElement(name = "FileSystemInformation") + protected FileSystemInformationType fileSystemInformation; + @XmlElement(name = "DumpHardwareArray") + protected DumpHardwareArrayType dumpHardwareArray; + @XmlElement(name = "DiskType", required = true) + protected String diskType; + @XmlElement(name = "DiskSubType", required = true) + protected String diskSubType; + + /** + * Obtiene el valor de la propiedad image. + * + * @return + * possible object is + * {@link ImageType } + * + */ + public ImageType getImage() { + return image; + } + + /** + * Define el valor de la propiedad image. + * + * @param value + * allowed object is + * {@link ImageType } + * + */ + public void setImage(ImageType value) { + this.image = value; + } + + /** + * Obtiene el valor de la propiedad size. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSize() { + return size; + } + + /** + * Define el valor de la propiedad size. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSize(BigInteger value) { + this.size = value; + } + + /** + * Obtiene el valor de la propiedad checksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getChecksums() { + return checksums; + } + + /** + * Define el valor de la propiedad checksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setChecksums(ChecksumsType value) { + this.checksums = value; + } + + /** + * Obtiene el valor de la propiedad contentChecksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getContentChecksums() { + return contentChecksums; + } + + /** + * Define el valor de la propiedad contentChecksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setContentChecksums(ChecksumsType value) { + this.contentChecksums = value; + } + + /** + * Obtiene el valor de la propiedad sequence. + * + * @return + * possible object is + * {@link SequenceType } + * + */ + public SequenceType getSequence() { + return sequence; + } + + /** + * Define el valor de la propiedad sequence. + * + * @param value + * allowed object is + * {@link SequenceType } + * + */ + public void setSequence(SequenceType value) { + this.sequence = value; + } + + /** + * Obtiene el valor de la propiedad manufacturer. + * + * @return + * possible object is + * {@link String } + * + */ + public String getManufacturer() { + return manufacturer; + } + + /** + * Define el valor de la propiedad manufacturer. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setManufacturer(String value) { + this.manufacturer = value; + } + + /** + * Obtiene el valor de la propiedad model. + * + * @return + * possible object is + * {@link String } + * + */ + public String getModel() { + return model; + } + + /** + * Define el valor de la propiedad model. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setModel(String value) { + this.model = value; + } + + /** + * Obtiene el valor de la propiedad serial. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSerial() { + return serial; + } + + /** + * Define el valor de la propiedad serial. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSerial(String value) { + this.serial = value; + } + + /** + * Obtiene el valor de la propiedad firmware. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFirmware() { + return firmware; + } + + /** + * Define el valor de la propiedad firmware. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFirmware(String value) { + this.firmware = value; + } + + /** + * Obtiene el valor de la propiedad interface. + * + * @return + * possible object is + * {@link String } + * + */ + public String getInterface() { + return _interface; + } + + /** + * Define el valor de la propiedad interface. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setInterface(String value) { + this._interface = value; + } + + /** + * Obtiene el valor de la propiedad partNumber. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPartNumber() { + return partNumber; + } + + /** + * Define el valor de la propiedad partNumber. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPartNumber(String value) { + this.partNumber = value; + } + + /** + * Obtiene el valor de la propiedad serialNumber. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSerialNumber() { + return serialNumber; + } + + /** + * Define el valor de la propiedad serialNumber. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSerialNumber(String value) { + this.serialNumber = value; + } + + /** + * Obtiene el valor de la propiedad physicalBlockSize. + * + */ + public long getPhysicalBlockSize() { + return physicalBlockSize; + } + + /** + * Define el valor de la propiedad physicalBlockSize. + * + */ + public void setPhysicalBlockSize(long value) { + this.physicalBlockSize = value; + } + + /** + * Obtiene el valor de la propiedad logicalBlockSize. + * + */ + public long getLogicalBlockSize() { + return logicalBlockSize; + } + + /** + * Define el valor de la propiedad logicalBlockSize. + * + */ + public void setLogicalBlockSize(long value) { + this.logicalBlockSize = value; + } + + /** + * Obtiene el valor de la propiedad logicalBlocks. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getLogicalBlocks() { + return logicalBlocks; + } + + /** + * Define el valor de la propiedad logicalBlocks. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setLogicalBlocks(BigInteger value) { + this.logicalBlocks = value; + } + + /** + * Obtiene el valor de la propiedad variableBlockSize. + * + * @return + * possible object is + * {@link VariableBlockSizeType } + * + */ + public VariableBlockSizeType getVariableBlockSize() { + return variableBlockSize; + } + + /** + * Define el valor de la propiedad variableBlockSize. + * + * @param value + * allowed object is + * {@link VariableBlockSizeType } + * + */ + public void setVariableBlockSize(VariableBlockSizeType value) { + this.variableBlockSize = value; + } + + /** + * Obtiene el valor de la propiedad tapeInformation. + * + * @return + * possible object is + * {@link TapeInformationType } + * + */ + public TapeInformationType getTapeInformation() { + return tapeInformation; + } + + /** + * Define el valor de la propiedad tapeInformation. + * + * @param value + * allowed object is + * {@link TapeInformationType } + * + */ + public void setTapeInformation(TapeInformationType value) { + this.tapeInformation = value; + } + + /** + * Obtiene el valor de la propiedad scans. + * + * @return + * possible object is + * {@link ScansType } + * + */ + public ScansType getScans() { + return scans; + } + + /** + * Define el valor de la propiedad scans. + * + * @param value + * allowed object is + * {@link ScansType } + * + */ + public void setScans(ScansType value) { + this.scans = value; + } + + /** + * Obtiene el valor de la propiedad ata. + * + * @return + * possible object is + * {@link ATAType } + * + */ + public ATAType getATA() { + return ata; + } + + /** + * Define el valor de la propiedad ata. + * + * @param value + * allowed object is + * {@link ATAType } + * + */ + public void setATA(ATAType value) { + this.ata = value; + } + + /** + * Obtiene el valor de la propiedad pci. + * + * @return + * possible object is + * {@link PCIType } + * + */ + public PCIType getPCI() { + return pci; + } + + /** + * Define el valor de la propiedad pci. + * + * @param value + * allowed object is + * {@link PCIType } + * + */ + public void setPCI(PCIType value) { + this.pci = value; + } + + /** + * Obtiene el valor de la propiedad pcmcia. + * + * @return + * possible object is + * {@link PCMCIAType } + * + */ + public PCMCIAType getPCMCIA() { + return pcmcia; + } + + /** + * Define el valor de la propiedad pcmcia. + * + * @param value + * allowed object is + * {@link PCMCIAType } + * + */ + public void setPCMCIA(PCMCIAType value) { + this.pcmcia = value; + } + + /** + * Obtiene el valor de la propiedad secureDigital. + * + * @return + * possible object is + * {@link SecureDigitalType } + * + */ + public SecureDigitalType getSecureDigital() { + return secureDigital; + } + + /** + * Define el valor de la propiedad secureDigital. + * + * @param value + * allowed object is + * {@link SecureDigitalType } + * + */ + public void setSecureDigital(SecureDigitalType value) { + this.secureDigital = value; + } + + /** + * Obtiene el valor de la propiedad multiMediaCard. + * + * @return + * possible object is + * {@link MultiMediaCardType } + * + */ + public MultiMediaCardType getMultiMediaCard() { + return multiMediaCard; + } + + /** + * Define el valor de la propiedad multiMediaCard. + * + * @param value + * allowed object is + * {@link MultiMediaCardType } + * + */ + public void setMultiMediaCard(MultiMediaCardType value) { + this.multiMediaCard = value; + } + + /** + * Obtiene el valor de la propiedad scsi. + * + * @return + * possible object is + * {@link SCSIType } + * + */ + public SCSIType getSCSI() { + return scsi; + } + + /** + * Define el valor de la propiedad scsi. + * + * @param value + * allowed object is + * {@link SCSIType } + * + */ + public void setSCSI(SCSIType value) { + this.scsi = value; + } + + /** + * Obtiene el valor de la propiedad usb. + * + * @return + * possible object is + * {@link USBType } + * + */ + public USBType getUSB() { + return usb; + } + + /** + * Define el valor de la propiedad usb. + * + * @param value + * allowed object is + * {@link USBType } + * + */ + public void setUSB(USBType value) { + this.usb = value; + } + + /** + * Obtiene el valor de la propiedad mam. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getMAM() { + return mam; + } + + /** + * Define el valor de la propiedad mam. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setMAM(DumpType value) { + this.mam = value; + } + + /** + * Obtiene el valor de la propiedad heads. + * + * @return + * possible object is + * {@link Integer } + * + */ + public Integer getHeads() { + return heads; + } + + /** + * Define el valor de la propiedad heads. + * + * @param value + * allowed object is + * {@link Integer } + * + */ + public void setHeads(Integer value) { + this.heads = value; + } + + /** + * Obtiene el valor de la propiedad cylinders. + * + * @return + * possible object is + * {@link Long } + * + */ + public Long getCylinders() { + return cylinders; + } + + /** + * Define el valor de la propiedad cylinders. + * + * @param value + * allowed object is + * {@link Long } + * + */ + public void setCylinders(Long value) { + this.cylinders = value; + } + + /** + * Obtiene el valor de la propiedad sectorsPerTrack. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSectorsPerTrack() { + return sectorsPerTrack; + } + + /** + * Define el valor de la propiedad sectorsPerTrack. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSectorsPerTrack(BigInteger value) { + this.sectorsPerTrack = value; + } + + /** + * Gets the value of the track property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the track property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getTrack().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link BlockTrackType } + * + * + */ + public List getTrack() { + if (track == null) { + track = new ArrayList(); + } + return this.track; + } + + /** + * Obtiene el valor de la propiedad copyProtection. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCopyProtection() { + return copyProtection; + } + + /** + * Define el valor de la propiedad copyProtection. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCopyProtection(String value) { + this.copyProtection = value; + } + + /** + * Obtiene el valor de la propiedad dimensions. + * + * @return + * possible object is + * {@link DimensionsType } + * + */ + public DimensionsType getDimensions() { + return dimensions; + } + + /** + * Define el valor de la propiedad dimensions. + * + * @param value + * allowed object is + * {@link DimensionsType } + * + */ + public void setDimensions(DimensionsType value) { + this.dimensions = value; + } + + /** + * Obtiene el valor de la propiedad fileSystemInformation. + * + * @return + * possible object is + * {@link FileSystemInformationType } + * + */ + public FileSystemInformationType getFileSystemInformation() { + return fileSystemInformation; + } + + /** + * Define el valor de la propiedad fileSystemInformation. + * + * @param value + * allowed object is + * {@link FileSystemInformationType } + * + */ + public void setFileSystemInformation(FileSystemInformationType value) { + this.fileSystemInformation = value; + } + + /** + * Obtiene el valor de la propiedad dumpHardwareArray. + * + * @return + * possible object is + * {@link DumpHardwareArrayType } + * + */ + public DumpHardwareArrayType getDumpHardwareArray() { + return dumpHardwareArray; + } + + /** + * Define el valor de la propiedad dumpHardwareArray. + * + * @param value + * allowed object is + * {@link DumpHardwareArrayType } + * + */ + public void setDumpHardwareArray(DumpHardwareArrayType value) { + this.dumpHardwareArray = value; + } + + /** + * Obtiene el valor de la propiedad diskType. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDiskType() { + return diskType; + } + + /** + * Define el valor de la propiedad diskType. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDiskType(String value) { + this.diskType = value; + } + + /** + * Obtiene el valor de la propiedad diskSubType. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDiskSubType() { + return diskSubType; + } + + /** + * Define el valor de la propiedad diskSubType. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDiskSubType(String value) { + this.diskSubType = value; + } + +} diff --git a/CICMMetadata/java/generated/BlockSizeType.java b/CICMMetadata/java/generated/BlockSizeType.java new file mode 100644 index 0000000..89fd262 --- /dev/null +++ b/CICMMetadata/java/generated/BlockSizeType.java @@ -0,0 +1,81 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + *

Clase Java para BlockSizeType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="BlockSizeType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>unsignedInt">
+ *       <attribute name="startingBlock" use="required" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "BlockSizeType", propOrder = { + "value" +}) +public class BlockSizeType { + + @XmlValue + @XmlSchemaType(name = "unsignedInt") + protected long value; + @XmlAttribute(name = "startingBlock", required = true) + @XmlSchemaType(name = "unsignedInt") + protected long startingBlock; + + /** + * Obtiene el valor de la propiedad value. + * + */ + public long getValue() { + return value; + } + + /** + * Define el valor de la propiedad value. + * + */ + public void setValue(long value) { + this.value = value; + } + + /** + * Obtiene el valor de la propiedad startingBlock. + * + */ + public long getStartingBlock() { + return startingBlock; + } + + /** + * Define el valor de la propiedad startingBlock. + * + */ + public void setStartingBlock(long value) { + this.startingBlock = value; + } + +} diff --git a/CICMMetadata/java/generated/BlockTrackType.java b/CICMMetadata/java/generated/BlockTrackType.java new file mode 100644 index 0000000..6e26813 --- /dev/null +++ b/CICMMetadata/java/generated/BlockTrackType.java @@ -0,0 +1,308 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + * Information about track in non-abstracted block based media + * + *

Clase Java para BlockTrackType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="BlockTrackType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Image" type="{}ImageType"/>
+ *         <element name="Size" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="Head" type="{http://www.w3.org/2001/XMLSchema}unsignedShort"/>
+ *         <element name="Cylinder" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
+ *         <element name="StartSector" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="EndSector" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="Sectors" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="BytesPerSector" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
+ *         <element name="Checksums" type="{}ChecksumsType"/>
+ *         <element name="Format" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "BlockTrackType", propOrder = { + "image", + "size", + "head", + "cylinder", + "startSector", + "endSector", + "sectors", + "bytesPerSector", + "checksums", + "format" +}) +public class BlockTrackType { + + @XmlElement(name = "Image", required = true) + protected ImageType image; + @XmlElement(name = "Size", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger size; + @XmlElement(name = "Head") + @XmlSchemaType(name = "unsignedShort") + protected int head; + @XmlElement(name = "Cylinder") + @XmlSchemaType(name = "unsignedInt") + protected long cylinder; + @XmlElement(name = "StartSector", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger startSector; + @XmlElement(name = "EndSector", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger endSector; + @XmlElement(name = "Sectors", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger sectors; + @XmlElement(name = "BytesPerSector") + @XmlSchemaType(name = "unsignedInt") + protected long bytesPerSector; + @XmlElement(name = "Checksums", required = true) + protected ChecksumsType checksums; + @XmlElement(name = "Format") + protected String format; + + /** + * Obtiene el valor de la propiedad image. + * + * @return + * possible object is + * {@link ImageType } + * + */ + public ImageType getImage() { + return image; + } + + /** + * Define el valor de la propiedad image. + * + * @param value + * allowed object is + * {@link ImageType } + * + */ + public void setImage(ImageType value) { + this.image = value; + } + + /** + * Obtiene el valor de la propiedad size. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSize() { + return size; + } + + /** + * Define el valor de la propiedad size. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSize(BigInteger value) { + this.size = value; + } + + /** + * Obtiene el valor de la propiedad head. + * + */ + public int getHead() { + return head; + } + + /** + * Define el valor de la propiedad head. + * + */ + public void setHead(int value) { + this.head = value; + } + + /** + * Obtiene el valor de la propiedad cylinder. + * + */ + public long getCylinder() { + return cylinder; + } + + /** + * Define el valor de la propiedad cylinder. + * + */ + public void setCylinder(long value) { + this.cylinder = value; + } + + /** + * Obtiene el valor de la propiedad startSector. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getStartSector() { + return startSector; + } + + /** + * Define el valor de la propiedad startSector. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setStartSector(BigInteger value) { + this.startSector = value; + } + + /** + * Obtiene el valor de la propiedad endSector. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getEndSector() { + return endSector; + } + + /** + * Define el valor de la propiedad endSector. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setEndSector(BigInteger value) { + this.endSector = value; + } + + /** + * Obtiene el valor de la propiedad sectors. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSectors() { + return sectors; + } + + /** + * Define el valor de la propiedad sectors. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSectors(BigInteger value) { + this.sectors = value; + } + + /** + * Obtiene el valor de la propiedad bytesPerSector. + * + */ + public long getBytesPerSector() { + return bytesPerSector; + } + + /** + * Define el valor de la propiedad bytesPerSector. + * + */ + public void setBytesPerSector(long value) { + this.bytesPerSector = value; + } + + /** + * Obtiene el valor de la propiedad checksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getChecksums() { + return checksums; + } + + /** + * Define el valor de la propiedad checksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setChecksums(ChecksumsType value) { + this.checksums = value; + } + + /** + * Obtiene el valor de la propiedad format. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFormat() { + return format; + } + + /** + * Define el valor de la propiedad format. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFormat(String value) { + this.format = value; + } + +} diff --git a/CICMMetadata/java/generated/BookType.java b/CICMMetadata/java/generated/BookType.java new file mode 100644 index 0000000..556d5b9 --- /dev/null +++ b/CICMMetadata/java/generated/BookType.java @@ -0,0 +1,325 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Clase Java para BookType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="BookType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Barcodes" type="{}BarcodesType"/>
+ *         <element name="Cover" type="{}CoverType" minOccurs="0"/>
+ *         <element name="Name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Editorial" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Author" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="PublicationDate" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
+ *         <element name="Language" type="{}LanguagesType" minOccurs="0"/>
+ *         <element name="Pages" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/>
+ *         <element name="PageSize" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Scan" type="{}ScanType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "BookType", propOrder = { + "barcodes", + "cover", + "name", + "editorial", + "author", + "publicationDate", + "language", + "pages", + "pageSize", + "scan" +}) +public class BookType { + + @XmlElement(name = "Barcodes", required = true) + protected BarcodesType barcodes; + @XmlElement(name = "Cover") + protected CoverType cover; + @XmlElement(name = "Name", required = true) + protected String name; + @XmlElement(name = "Editorial") + protected String editorial; + @XmlElement(name = "Author", required = true) + protected String author; + @XmlElement(name = "PublicationDate") + @XmlSchemaType(name = "date") + protected XMLGregorianCalendar publicationDate; + @XmlElement(name = "Language") + protected LanguagesType language; + @XmlElement(name = "Pages") + @XmlSchemaType(name = "unsignedInt") + protected Long pages; + @XmlElement(name = "PageSize") + protected String pageSize; + @XmlElement(name = "Scan", required = true) + protected ScanType scan; + + /** + * Obtiene el valor de la propiedad barcodes. + * + * @return + * possible object is + * {@link BarcodesType } + * + */ + public BarcodesType getBarcodes() { + return barcodes; + } + + /** + * Define el valor de la propiedad barcodes. + * + * @param value + * allowed object is + * {@link BarcodesType } + * + */ + public void setBarcodes(BarcodesType value) { + this.barcodes = value; + } + + /** + * Obtiene el valor de la propiedad cover. + * + * @return + * possible object is + * {@link CoverType } + * + */ + public CoverType getCover() { + return cover; + } + + /** + * Define el valor de la propiedad cover. + * + * @param value + * allowed object is + * {@link CoverType } + * + */ + public void setCover(CoverType value) { + this.cover = value; + } + + /** + * Obtiene el valor de la propiedad name. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Define el valor de la propiedad name. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Obtiene el valor de la propiedad editorial. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEditorial() { + return editorial; + } + + /** + * Define el valor de la propiedad editorial. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEditorial(String value) { + this.editorial = value; + } + + /** + * Obtiene el valor de la propiedad author. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAuthor() { + return author; + } + + /** + * Define el valor de la propiedad author. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAuthor(String value) { + this.author = value; + } + + /** + * Obtiene el valor de la propiedad publicationDate. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getPublicationDate() { + return publicationDate; + } + + /** + * Define el valor de la propiedad publicationDate. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setPublicationDate(XMLGregorianCalendar value) { + this.publicationDate = value; + } + + /** + * Obtiene el valor de la propiedad language. + * + * @return + * possible object is + * {@link LanguagesType } + * + */ + public LanguagesType getLanguage() { + return language; + } + + /** + * Define el valor de la propiedad language. + * + * @param value + * allowed object is + * {@link LanguagesType } + * + */ + public void setLanguage(LanguagesType value) { + this.language = value; + } + + /** + * Obtiene el valor de la propiedad pages. + * + * @return + * possible object is + * {@link Long } + * + */ + public Long getPages() { + return pages; + } + + /** + * Define el valor de la propiedad pages. + * + * @param value + * allowed object is + * {@link Long } + * + */ + public void setPages(Long value) { + this.pages = value; + } + + /** + * Obtiene el valor de la propiedad pageSize. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPageSize() { + return pageSize; + } + + /** + * Define el valor de la propiedad pageSize. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPageSize(String value) { + this.pageSize = value; + } + + /** + * Obtiene el valor de la propiedad scan. + * + * @return + * possible object is + * {@link ScanType } + * + */ + public ScanType getScan() { + return scan; + } + + /** + * Define el valor de la propiedad scan. + * + * @param value + * allowed object is + * {@link ScanType } + * + */ + public void setScan(ScanType value) { + this.scan = value; + } + +} diff --git a/CICMMetadata/java/generated/BorderType.java b/CICMMetadata/java/generated/BorderType.java new file mode 100644 index 0000000..8d9b450 --- /dev/null +++ b/CICMMetadata/java/generated/BorderType.java @@ -0,0 +1,162 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para BorderType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="BorderType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Image" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Size" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="Checksums" type="{}ChecksumsType"/>
+ *       </sequence>
+ *       <attribute name="session">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}unsignedInt">
+ *             <minInclusive value="1"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "BorderType", propOrder = { + "image", + "size", + "checksums" +}) +public class BorderType { + + @XmlElement(name = "Image", required = true) + protected String image; + @XmlElement(name = "Size", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger size; + @XmlElement(name = "Checksums", required = true) + protected ChecksumsType checksums; + @XmlAttribute(name = "session") + protected Long session; + + /** + * Obtiene el valor de la propiedad image. + * + * @return + * possible object is + * {@link String } + * + */ + public String getImage() { + return image; + } + + /** + * Define el valor de la propiedad image. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setImage(String value) { + this.image = value; + } + + /** + * Obtiene el valor de la propiedad size. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSize() { + return size; + } + + /** + * Define el valor de la propiedad size. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSize(BigInteger value) { + this.size = value; + } + + /** + * Obtiene el valor de la propiedad checksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getChecksums() { + return checksums; + } + + /** + * Define el valor de la propiedad checksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setChecksums(ChecksumsType value) { + this.checksums = value; + } + + /** + * Obtiene el valor de la propiedad session. + * + * @return + * possible object is + * {@link Long } + * + */ + public Long getSession() { + return session; + } + + /** + * Define el valor de la propiedad session. + * + * @param value + * allowed object is + * {@link Long } + * + */ + public void setSession(Long value) { + this.session = value; + } + +} diff --git a/CICMMetadata/java/generated/CICMMetadataType.java b/CICMMetadata/java/generated/CICMMetadataType.java new file mode 100644 index 0000000..09bf383 --- /dev/null +++ b/CICMMetadata/java/generated/CICMMetadataType.java @@ -0,0 +1,886 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + * Digital Asset Metadata + * + *

Clase Java para CICMMetadataType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="CICMMetadataType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Developer" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="Publisher" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="Author" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="Performer" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="Name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="ReleaseType" minOccurs="0">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *               <enumeration value="Retail"/>
+ *               <enumeration value="Bundle"/>
+ *               <enumeration value="Coverdisc"/>
+ *               <enumeration value="Subscription"/>
+ *               <enumeration value="Demo"/>
+ *               <enumeration value="OEM"/>
+ *               <enumeration value="Shareware"/>
+ *               <enumeration value="FOSS"/>
+ *               <enumeration value="Adware"/>
+ *               <enumeration value="Donationware"/>
+ *               <enumeration value="Digital download"/>
+ *               <enumeration value="SaaS"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *         <element name="ReleaseDate" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
+ *         <element name="Barcodes" type="{}BarcodesType" minOccurs="0"/>
+ *         <element name="PartNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="SerialNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Keywords" type="{}KeywordsType" minOccurs="0"/>
+ *         <element name="Magazine" type="{}MagazineType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="Book" type="{}BookType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="Categories" type="{}CategoriesType" minOccurs="0"/>
+ *         <element name="Subcategories" type="{}SubcategoriesType" minOccurs="0"/>
+ *         <element name="Languages" type="{}LanguagesType" minOccurs="0"/>
+ *         <element name="Systems" type="{}SystemsType" minOccurs="0"/>
+ *         <element name="Architectures" type="{}ArchitecturesType" minOccurs="0"/>
+ *         <element name="RequiredOperatingSystems" type="{}RequiredOperatingSystemsType" minOccurs="0"/>
+ *         <element name="UserManual" type="{}UserManualType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="OpticalDisc" type="{}OpticalDiscType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="Advertisement" type="{}AdvertisementType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="LinearMedia" type="{}LinearMediaType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="PCICard" type="{}PCIType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="BlockMedia" type="{}BlockMediaType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="AudioMedia" type="{}AudioMediaType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CICMMetadataType", propOrder = { + "developer", + "publisher", + "author", + "performer", + "name", + "version", + "releaseType", + "releaseDate", + "barcodes", + "partNumber", + "serialNumber", + "keywords", + "magazine", + "book", + "categories", + "subcategories", + "languages", + "systems", + "architectures", + "requiredOperatingSystems", + "userManual", + "opticalDisc", + "advertisement", + "linearMedia", + "pciCard", + "blockMedia", + "audioMedia" +}) +public class CICMMetadataType { + + @XmlElement(name = "Developer") + protected List developer; + @XmlElement(name = "Publisher") + protected List publisher; + @XmlElement(name = "Author") + protected List author; + @XmlElement(name = "Performer") + protected List performer; + @XmlElement(name = "Name", required = true) + protected String name; + @XmlElement(name = "Version") + protected String version; + @XmlElement(name = "ReleaseType") + protected String releaseType; + @XmlElement(name = "ReleaseDate") + @XmlSchemaType(name = "date") + protected XMLGregorianCalendar releaseDate; + @XmlElement(name = "Barcodes") + protected BarcodesType barcodes; + @XmlElement(name = "PartNumber") + protected String partNumber; + @XmlElement(name = "SerialNumber") + protected String serialNumber; + @XmlElement(name = "Keywords") + protected KeywordsType keywords; + @XmlElement(name = "Magazine") + protected List magazine; + @XmlElement(name = "Book") + protected List book; + @XmlElement(name = "Categories") + protected CategoriesType categories; + @XmlElement(name = "Subcategories") + protected SubcategoriesType subcategories; + @XmlElement(name = "Languages") + protected LanguagesType languages; + @XmlElement(name = "Systems") + protected SystemsType systems; + @XmlElement(name = "Architectures") + protected ArchitecturesType architectures; + @XmlElement(name = "RequiredOperatingSystems") + protected RequiredOperatingSystemsType requiredOperatingSystems; + @XmlElement(name = "UserManual") + protected List userManual; + @XmlElement(name = "OpticalDisc") + protected List opticalDisc; + @XmlElement(name = "Advertisement") + protected List advertisement; + @XmlElement(name = "LinearMedia") + protected List linearMedia; + @XmlElement(name = "PCICard") + protected List pciCard; + @XmlElement(name = "BlockMedia") + protected List blockMedia; + @XmlElement(name = "AudioMedia") + protected List audioMedia; + + /** + * Gets the value of the developer property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the developer property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getDeveloper().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getDeveloper() { + if (developer == null) { + developer = new ArrayList(); + } + return this.developer; + } + + /** + * Gets the value of the publisher property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the publisher property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getPublisher().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getPublisher() { + if (publisher == null) { + publisher = new ArrayList(); + } + return this.publisher; + } + + /** + * Gets the value of the author property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the author property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAuthor().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getAuthor() { + if (author == null) { + author = new ArrayList(); + } + return this.author; + } + + /** + * Gets the value of the performer property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the performer property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getPerformer().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getPerformer() { + if (performer == null) { + performer = new ArrayList(); + } + return this.performer; + } + + /** + * Obtiene el valor de la propiedad name. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Define el valor de la propiedad name. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Obtiene el valor de la propiedad version. + * + * @return + * possible object is + * {@link String } + * + */ + public String getVersion() { + return version; + } + + /** + * Define el valor de la propiedad version. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setVersion(String value) { + this.version = value; + } + + /** + * Obtiene el valor de la propiedad releaseType. + * + * @return + * possible object is + * {@link String } + * + */ + public String getReleaseType() { + return releaseType; + } + + /** + * Define el valor de la propiedad releaseType. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setReleaseType(String value) { + this.releaseType = value; + } + + /** + * Obtiene el valor de la propiedad releaseDate. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getReleaseDate() { + return releaseDate; + } + + /** + * Define el valor de la propiedad releaseDate. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setReleaseDate(XMLGregorianCalendar value) { + this.releaseDate = value; + } + + /** + * Obtiene el valor de la propiedad barcodes. + * + * @return + * possible object is + * {@link BarcodesType } + * + */ + public BarcodesType getBarcodes() { + return barcodes; + } + + /** + * Define el valor de la propiedad barcodes. + * + * @param value + * allowed object is + * {@link BarcodesType } + * + */ + public void setBarcodes(BarcodesType value) { + this.barcodes = value; + } + + /** + * Obtiene el valor de la propiedad partNumber. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPartNumber() { + return partNumber; + } + + /** + * Define el valor de la propiedad partNumber. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPartNumber(String value) { + this.partNumber = value; + } + + /** + * Obtiene el valor de la propiedad serialNumber. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSerialNumber() { + return serialNumber; + } + + /** + * Define el valor de la propiedad serialNumber. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSerialNumber(String value) { + this.serialNumber = value; + } + + /** + * Obtiene el valor de la propiedad keywords. + * + * @return + * possible object is + * {@link KeywordsType } + * + */ + public KeywordsType getKeywords() { + return keywords; + } + + /** + * Define el valor de la propiedad keywords. + * + * @param value + * allowed object is + * {@link KeywordsType } + * + */ + public void setKeywords(KeywordsType value) { + this.keywords = value; + } + + /** + * Gets the value of the magazine property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the magazine property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getMagazine().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link MagazineType } + * + * + */ + public List getMagazine() { + if (magazine == null) { + magazine = new ArrayList(); + } + return this.magazine; + } + + /** + * Gets the value of the book property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the book property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getBook().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link BookType } + * + * + */ + public List getBook() { + if (book == null) { + book = new ArrayList(); + } + return this.book; + } + + /** + * Obtiene el valor de la propiedad categories. + * + * @return + * possible object is + * {@link CategoriesType } + * + */ + public CategoriesType getCategories() { + return categories; + } + + /** + * Define el valor de la propiedad categories. + * + * @param value + * allowed object is + * {@link CategoriesType } + * + */ + public void setCategories(CategoriesType value) { + this.categories = value; + } + + /** + * Obtiene el valor de la propiedad subcategories. + * + * @return + * possible object is + * {@link SubcategoriesType } + * + */ + public SubcategoriesType getSubcategories() { + return subcategories; + } + + /** + * Define el valor de la propiedad subcategories. + * + * @param value + * allowed object is + * {@link SubcategoriesType } + * + */ + public void setSubcategories(SubcategoriesType value) { + this.subcategories = value; + } + + /** + * Obtiene el valor de la propiedad languages. + * + * @return + * possible object is + * {@link LanguagesType } + * + */ + public LanguagesType getLanguages() { + return languages; + } + + /** + * Define el valor de la propiedad languages. + * + * @param value + * allowed object is + * {@link LanguagesType } + * + */ + public void setLanguages(LanguagesType value) { + this.languages = value; + } + + /** + * Obtiene el valor de la propiedad systems. + * + * @return + * possible object is + * {@link SystemsType } + * + */ + public SystemsType getSystems() { + return systems; + } + + /** + * Define el valor de la propiedad systems. + * + * @param value + * allowed object is + * {@link SystemsType } + * + */ + public void setSystems(SystemsType value) { + this.systems = value; + } + + /** + * Obtiene el valor de la propiedad architectures. + * + * @return + * possible object is + * {@link ArchitecturesType } + * + */ + public ArchitecturesType getArchitectures() { + return architectures; + } + + /** + * Define el valor de la propiedad architectures. + * + * @param value + * allowed object is + * {@link ArchitecturesType } + * + */ + public void setArchitectures(ArchitecturesType value) { + this.architectures = value; + } + + /** + * Obtiene el valor de la propiedad requiredOperatingSystems. + * + * @return + * possible object is + * {@link RequiredOperatingSystemsType } + * + */ + public RequiredOperatingSystemsType getRequiredOperatingSystems() { + return requiredOperatingSystems; + } + + /** + * Define el valor de la propiedad requiredOperatingSystems. + * + * @param value + * allowed object is + * {@link RequiredOperatingSystemsType } + * + */ + public void setRequiredOperatingSystems(RequiredOperatingSystemsType value) { + this.requiredOperatingSystems = value; + } + + /** + * Gets the value of the userManual property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the userManual property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getUserManual().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link UserManualType } + * + * + */ + public List getUserManual() { + if (userManual == null) { + userManual = new ArrayList(); + } + return this.userManual; + } + + /** + * Gets the value of the opticalDisc property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the opticalDisc property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getOpticalDisc().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link OpticalDiscType } + * + * + */ + public List getOpticalDisc() { + if (opticalDisc == null) { + opticalDisc = new ArrayList(); + } + return this.opticalDisc; + } + + /** + * Gets the value of the advertisement property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the advertisement property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAdvertisement().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link AdvertisementType } + * + * + */ + public List getAdvertisement() { + if (advertisement == null) { + advertisement = new ArrayList(); + } + return this.advertisement; + } + + /** + * Gets the value of the linearMedia property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the linearMedia property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getLinearMedia().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link LinearMediaType } + * + * + */ + public List getLinearMedia() { + if (linearMedia == null) { + linearMedia = new ArrayList(); + } + return this.linearMedia; + } + + /** + * Gets the value of the pciCard property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the pciCard property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getPCICard().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link PCIType } + * + * + */ + public List getPCICard() { + if (pciCard == null) { + pciCard = new ArrayList(); + } + return this.pciCard; + } + + /** + * Gets the value of the blockMedia property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the blockMedia property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getBlockMedia().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link BlockMediaType } + * + * + */ + public List getBlockMedia() { + if (blockMedia == null) { + blockMedia = new ArrayList(); + } + return this.blockMedia; + } + + /** + * Gets the value of the audioMedia property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the audioMedia property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAudioMedia().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link AudioMediaType } + * + * + */ + public List getAudioMedia() { + if (audioMedia == null) { + audioMedia = new ArrayList(); + } + return this.audioMedia; + } + +} diff --git a/CICMMetadata/java/generated/CaseScanType.java b/CICMMetadata/java/generated/CaseScanType.java new file mode 100644 index 0000000..c982b55 --- /dev/null +++ b/CICMMetadata/java/generated/CaseScanType.java @@ -0,0 +1,111 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para CaseScanType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="CaseScanType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CaseScanElement">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *               <enumeration value="sleeve"/>
+ *               <enumeration value="inner"/>
+ *               <enumeration value="inlay"/>
+ *               <enumeration value="frontback"/>
+ *               <enumeration value="frontfull"/>
+ *               <enumeration value="boxfront"/>
+ *               <enumeration value="boxback"/>
+ *               <enumeration value="boxspine"/>
+ *               <enumeration value="external"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *         <element name="Scan" type="{}ScanType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CaseScanType", propOrder = { + "caseScanElement", + "scan" +}) +public class CaseScanType { + + @XmlElement(name = "CaseScanElement", required = true) + protected String caseScanElement; + @XmlElement(name = "Scan", required = true) + protected ScanType scan; + + /** + * Obtiene el valor de la propiedad caseScanElement. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCaseScanElement() { + return caseScanElement; + } + + /** + * Define el valor de la propiedad caseScanElement. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCaseScanElement(String value) { + this.caseScanElement = value; + } + + /** + * Obtiene el valor de la propiedad scan. + * + * @return + * possible object is + * {@link ScanType } + * + */ + public ScanType getScan() { + return scan; + } + + /** + * Define el valor de la propiedad scan. + * + * @param value + * allowed object is + * {@link ScanType } + * + */ + public void setScan(ScanType value) { + this.scan = value; + } + +} diff --git a/CICMMetadata/java/generated/CaseType.java b/CICMMetadata/java/generated/CaseType.java new file mode 100644 index 0000000..9482fc2 --- /dev/null +++ b/CICMMetadata/java/generated/CaseType.java @@ -0,0 +1,129 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para CaseType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="CaseType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CaseType">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *               <enumeration value="jewel"/>
+ *               <enumeration value="bigjewel"/>
+ *               <enumeration value="slimjewel"/>
+ *               <enumeration value="sleeve"/>
+ *               <enumeration value="qpack"/>
+ *               <enumeration value="digisleeve"/>
+ *               <enumeration value="discboxslider"/>
+ *               <enumeration value="compacplus"/>
+ *               <enumeration value="keepcase"/>
+ *               <enumeration value="snapcase"/>
+ *               <enumeration value="softcase"/>
+ *               <enumeration value="ecopack"/>
+ *               <enumeration value="liftlock"/>
+ *               <enumeration value="spindle"/>
+ *               <enumeration value="ps2case"/>
+ *               <enumeration value="ps3case"/>
+ *               <enumeration value="bluraykeepcase"/>
+ *               <enumeration value="pscase"/>
+ *               <enumeration value="dccase"/>
+ *               <enumeration value="saturncase"/>
+ *               <enumeration value="xboxcase"/>
+ *               <enumeration value="xbox360case"/>
+ *               <enumeration value="xboxonecase"/>
+ *               <enumeration value="saturnbigcase"/>
+ *               <enumeration value="gccase"/>
+ *               <enumeration value="wiicase"/>
+ *               <enumeration value="unknown"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *         <element name="Scans" type="{}ScansType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CaseType", propOrder = { + "caseType", + "scans" +}) +public class CaseType { + + @XmlElement(name = "CaseType", required = true) + protected String caseType; + @XmlElement(name = "Scans", required = true) + protected ScansType scans; + + /** + * Obtiene el valor de la propiedad caseType. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCaseType() { + return caseType; + } + + /** + * Define el valor de la propiedad caseType. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCaseType(String value) { + this.caseType = value; + } + + /** + * Obtiene el valor de la propiedad scans. + * + * @return + * possible object is + * {@link ScansType } + * + */ + public ScansType getScans() { + return scans; + } + + /** + * Define el valor de la propiedad scans. + * + * @param value + * allowed object is + * {@link ScansType } + * + */ + public void setScans(ScansType value) { + this.scans = value; + } + +} diff --git a/CICMMetadata/java/generated/CategoriesType.java b/CICMMetadata/java/generated/CategoriesType.java new file mode 100644 index 0000000..372cbec --- /dev/null +++ b/CICMMetadata/java/generated/CategoriesType.java @@ -0,0 +1,76 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para CategoriesType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="CategoriesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Category" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CategoriesType", propOrder = { + "category" +}) +public class CategoriesType { + + @XmlElement(name = "Category", required = true) + protected List category; + + /** + * Gets the value of the category property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the category property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getCategory().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getCategory() { + if (category == null) { + category = new ArrayList(); + } + return this.category; + } + +} diff --git a/CICMMetadata/java/generated/ChecksumType.java b/CICMMetadata/java/generated/ChecksumType.java new file mode 100644 index 0000000..33d2430 --- /dev/null +++ b/CICMMetadata/java/generated/ChecksumType.java @@ -0,0 +1,125 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + *

Clase Java para ChecksumType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="ChecksumType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *       <attribute name="type" use="required">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="fletcher16"/>
+ *             <enumeration value="fletcher32"/>
+ *             <enumeration value="adler32"/>
+ *             <enumeration value="crc16"/>
+ *             <enumeration value="crc16ccitt"/>
+ *             <enumeration value="crc32"/>
+ *             <enumeration value="crc64"/>
+ *             <enumeration value="md4"/>
+ *             <enumeration value="md5"/>
+ *             <enumeration value="dm6"/>
+ *             <enumeration value="ripemd128"/>
+ *             <enumeration value="ripemd160"/>
+ *             <enumeration value="ripemed320"/>
+ *             <enumeration value="sha1"/>
+ *             <enumeration value="sha224"/>
+ *             <enumeration value="sha256"/>
+ *             <enumeration value="sha384"/>
+ *             <enumeration value="sha512"/>
+ *             <enumeration value="sha3"/>
+ *             <enumeration value="skein"/>
+ *             <enumeration value="snefru"/>
+ *             <enumeration value="blake256"/>
+ *             <enumeration value="blake512"/>
+ *             <enumeration value="tiger"/>
+ *             <enumeration value="whirlpool"/>
+ *             <enumeration value="spamsum"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ChecksumType", propOrder = { + "value" +}) +public class ChecksumType { + + @XmlValue + protected String value; + @XmlAttribute(name = "type", required = true) + protected String type; + + /** + * Obtiene el valor de la propiedad value. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Define el valor de la propiedad value. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Obtiene el valor de la propiedad type. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Define el valor de la propiedad type. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + +} diff --git a/CICMMetadata/java/generated/ChecksumsType.java b/CICMMetadata/java/generated/ChecksumsType.java new file mode 100644 index 0000000..328f0bf --- /dev/null +++ b/CICMMetadata/java/generated/ChecksumsType.java @@ -0,0 +1,78 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Checksum of file element + * + *

Clase Java para ChecksumsType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="ChecksumsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Checksum" type="{}ChecksumType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ChecksumsType", propOrder = { + "checksum" +}) +public class ChecksumsType { + + @XmlElement(name = "Checksum", required = true) + protected List checksum; + + /** + * Gets the value of the checksum property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the checksum property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getChecksum().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ChecksumType } + * + * + */ + public List getChecksum() { + if (checksum == null) { + checksum = new ArrayList(); + } + return this.checksum; + } + +} diff --git a/CICMMetadata/java/generated/ContentsFileType.java b/CICMMetadata/java/generated/ContentsFileType.java new file mode 100644 index 0000000..fb9fef9 --- /dev/null +++ b/CICMMetadata/java/generated/ContentsFileType.java @@ -0,0 +1,492 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Clase Java para ContentsFileType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="ContentsFileType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Checksums" type="{}ChecksumsType"/>
+ *         <element name="ExtendedAttributes" type="{}ExtendedAttributesType"/>
+ *       </sequence>
+ *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="creationTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
+ *       <attribute name="accessTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
+ *       <attribute name="statusChangeTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
+ *       <attribute name="backupTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
+ *       <attribute name="lastWriteTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
+ *       <attribute name="attributes" use="required" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
+ *       <attribute name="posixMode" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
+ *       <attribute name="deviceNumber" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
+ *       <attribute name="posixGroupId" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
+ *       <attribute name="inode" use="required" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
+ *       <attribute name="links" use="required" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
+ *       <attribute name="posixUserId" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
+ *       <attribute name="length" use="required" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ContentsFileType", propOrder = { + "checksums", + "extendedAttributes" +}) +public class ContentsFileType { + + @XmlElement(name = "Checksums", required = true) + protected ChecksumsType checksums; + @XmlElement(name = "ExtendedAttributes", required = true) + protected ExtendedAttributesType extendedAttributes; + @XmlAttribute(name = "name", required = true) + protected String name; + @XmlAttribute(name = "creationTime") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar creationTime; + @XmlAttribute(name = "accessTime") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar accessTime; + @XmlAttribute(name = "statusChangeTime") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar statusChangeTime; + @XmlAttribute(name = "backupTime") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar backupTime; + @XmlAttribute(name = "lastWriteTime") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar lastWriteTime; + @XmlAttribute(name = "attributes", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger attributes; + @XmlAttribute(name = "posixMode") + @XmlSchemaType(name = "unsignedInt") + protected Long posixMode; + @XmlAttribute(name = "deviceNumber") + @XmlSchemaType(name = "unsignedLong") + protected BigInteger deviceNumber; + @XmlAttribute(name = "posixGroupId") + @XmlSchemaType(name = "unsignedLong") + protected BigInteger posixGroupId; + @XmlAttribute(name = "inode", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger inode; + @XmlAttribute(name = "links", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger links; + @XmlAttribute(name = "posixUserId") + @XmlSchemaType(name = "unsignedLong") + protected BigInteger posixUserId; + @XmlAttribute(name = "length", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger length; + + /** + * Obtiene el valor de la propiedad checksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getChecksums() { + return checksums; + } + + /** + * Define el valor de la propiedad checksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setChecksums(ChecksumsType value) { + this.checksums = value; + } + + /** + * Obtiene el valor de la propiedad extendedAttributes. + * + * @return + * possible object is + * {@link ExtendedAttributesType } + * + */ + public ExtendedAttributesType getExtendedAttributes() { + return extendedAttributes; + } + + /** + * Define el valor de la propiedad extendedAttributes. + * + * @param value + * allowed object is + * {@link ExtendedAttributesType } + * + */ + public void setExtendedAttributes(ExtendedAttributesType value) { + this.extendedAttributes = value; + } + + /** + * Obtiene el valor de la propiedad name. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Define el valor de la propiedad name. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Obtiene el valor de la propiedad creationTime. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getCreationTime() { + return creationTime; + } + + /** + * Define el valor de la propiedad creationTime. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setCreationTime(XMLGregorianCalendar value) { + this.creationTime = value; + } + + /** + * Obtiene el valor de la propiedad accessTime. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getAccessTime() { + return accessTime; + } + + /** + * Define el valor de la propiedad accessTime. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setAccessTime(XMLGregorianCalendar value) { + this.accessTime = value; + } + + /** + * Obtiene el valor de la propiedad statusChangeTime. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getStatusChangeTime() { + return statusChangeTime; + } + + /** + * Define el valor de la propiedad statusChangeTime. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setStatusChangeTime(XMLGregorianCalendar value) { + this.statusChangeTime = value; + } + + /** + * Obtiene el valor de la propiedad backupTime. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getBackupTime() { + return backupTime; + } + + /** + * Define el valor de la propiedad backupTime. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setBackupTime(XMLGregorianCalendar value) { + this.backupTime = value; + } + + /** + * Obtiene el valor de la propiedad lastWriteTime. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getLastWriteTime() { + return lastWriteTime; + } + + /** + * Define el valor de la propiedad lastWriteTime. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setLastWriteTime(XMLGregorianCalendar value) { + this.lastWriteTime = value; + } + + /** + * Obtiene el valor de la propiedad attributes. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getAttributes() { + return attributes; + } + + /** + * Define el valor de la propiedad attributes. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setAttributes(BigInteger value) { + this.attributes = value; + } + + /** + * Obtiene el valor de la propiedad posixMode. + * + * @return + * possible object is + * {@link Long } + * + */ + public Long getPosixMode() { + return posixMode; + } + + /** + * Define el valor de la propiedad posixMode. + * + * @param value + * allowed object is + * {@link Long } + * + */ + public void setPosixMode(Long value) { + this.posixMode = value; + } + + /** + * Obtiene el valor de la propiedad deviceNumber. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getDeviceNumber() { + return deviceNumber; + } + + /** + * Define el valor de la propiedad deviceNumber. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setDeviceNumber(BigInteger value) { + this.deviceNumber = value; + } + + /** + * Obtiene el valor de la propiedad posixGroupId. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getPosixGroupId() { + return posixGroupId; + } + + /** + * Define el valor de la propiedad posixGroupId. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setPosixGroupId(BigInteger value) { + this.posixGroupId = value; + } + + /** + * Obtiene el valor de la propiedad inode. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getInode() { + return inode; + } + + /** + * Define el valor de la propiedad inode. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setInode(BigInteger value) { + this.inode = value; + } + + /** + * Obtiene el valor de la propiedad links. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getLinks() { + return links; + } + + /** + * Define el valor de la propiedad links. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setLinks(BigInteger value) { + this.links = value; + } + + /** + * Obtiene el valor de la propiedad posixUserId. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getPosixUserId() { + return posixUserId; + } + + /** + * Define el valor de la propiedad posixUserId. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setPosixUserId(BigInteger value) { + this.posixUserId = value; + } + + /** + * Obtiene el valor de la propiedad length. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getLength() { + return length; + } + + /** + * Define el valor de la propiedad length. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setLength(BigInteger value) { + this.length = value; + } + +} diff --git a/CICMMetadata/java/generated/CoordinatesType.java b/CICMMetadata/java/generated/CoordinatesType.java new file mode 100644 index 0000000..39fd6ea --- /dev/null +++ b/CICMMetadata/java/generated/CoordinatesType.java @@ -0,0 +1,81 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para CoordinatesType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="CoordinatesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Latitude" type="{http://www.w3.org/2001/XMLSchema}double"/>
+ *         <element name="Longitude" type="{http://www.w3.org/2001/XMLSchema}double"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CoordinatesType", propOrder = { + "latitude", + "longitude" +}) +public class CoordinatesType { + + @XmlElement(name = "Latitude") + protected double latitude; + @XmlElement(name = "Longitude") + protected double longitude; + + /** + * Obtiene el valor de la propiedad latitude. + * + */ + public double getLatitude() { + return latitude; + } + + /** + * Define el valor de la propiedad latitude. + * + */ + public void setLatitude(double value) { + this.latitude = value; + } + + /** + * Obtiene el valor de la propiedad longitude. + * + */ + public double getLongitude() { + return longitude; + } + + /** + * Define el valor de la propiedad longitude. + * + */ + public void setLongitude(double value) { + this.longitude = value; + } + +} diff --git a/CICMMetadata/java/generated/CoverType.java b/CICMMetadata/java/generated/CoverType.java new file mode 100644 index 0000000..f3923db --- /dev/null +++ b/CICMMetadata/java/generated/CoverType.java @@ -0,0 +1,123 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para CoverType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="CoverType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="File" type="{}FileType"/>
+ *         <element name="Checksums" type="{}ChecksumsType"/>
+ *         <element name="Thumbnail" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "CoverType", propOrder = { + "file", + "checksums", + "thumbnail" +}) +public class CoverType { + + @XmlElement(name = "File", required = true) + protected FileType file; + @XmlElement(name = "Checksums", required = true) + protected ChecksumsType checksums; + @XmlElement(name = "Thumbnail", required = true) + protected byte[] thumbnail; + + /** + * Obtiene el valor de la propiedad file. + * + * @return + * possible object is + * {@link FileType } + * + */ + public FileType getFile() { + return file; + } + + /** + * Define el valor de la propiedad file. + * + * @param value + * allowed object is + * {@link FileType } + * + */ + public void setFile(FileType value) { + this.file = value; + } + + /** + * Obtiene el valor de la propiedad checksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getChecksums() { + return checksums; + } + + /** + * Define el valor de la propiedad checksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setChecksums(ChecksumsType value) { + this.checksums = value; + } + + /** + * Obtiene el valor de la propiedad thumbnail. + * + * @return + * possible object is + * byte[] + */ + public byte[] getThumbnail() { + return thumbnail; + } + + /** + * Define el valor de la propiedad thumbnail. + * + * @param value + * allowed object is + * byte[] + */ + public void setThumbnail(byte[] value) { + this.thumbnail = value; + } + +} diff --git a/CICMMetadata/java/generated/DimensionsType.java b/CICMMetadata/java/generated/DimensionsType.java new file mode 100644 index 0000000..dd020b6 --- /dev/null +++ b/CICMMetadata/java/generated/DimensionsType.java @@ -0,0 +1,147 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Dimensions of media + * + *

Clase Java para DimensionsType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="DimensionsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Diameter" type="{http://www.w3.org/2001/XMLSchema}double" minOccurs="0"/>
+ *         <element name="Height" type="{http://www.w3.org/2001/XMLSchema}double" minOccurs="0"/>
+ *         <element name="Width" type="{http://www.w3.org/2001/XMLSchema}double" minOccurs="0"/>
+ *         <element name="Thickness" type="{http://www.w3.org/2001/XMLSchema}double"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DimensionsType", propOrder = { + "diameter", + "height", + "width", + "thickness" +}) +public class DimensionsType { + + @XmlElement(name = "Diameter") + protected Double diameter; + @XmlElement(name = "Height") + protected Double height; + @XmlElement(name = "Width") + protected Double width; + @XmlElement(name = "Thickness") + protected double thickness; + + /** + * Obtiene el valor de la propiedad diameter. + * + * @return + * possible object is + * {@link Double } + * + */ + public Double getDiameter() { + return diameter; + } + + /** + * Define el valor de la propiedad diameter. + * + * @param value + * allowed object is + * {@link Double } + * + */ + public void setDiameter(Double value) { + this.diameter = value; + } + + /** + * Obtiene el valor de la propiedad height. + * + * @return + * possible object is + * {@link Double } + * + */ + public Double getHeight() { + return height; + } + + /** + * Define el valor de la propiedad height. + * + * @param value + * allowed object is + * {@link Double } + * + */ + public void setHeight(Double value) { + this.height = value; + } + + /** + * Obtiene el valor de la propiedad width. + * + * @return + * possible object is + * {@link Double } + * + */ + public Double getWidth() { + return width; + } + + /** + * Define el valor de la propiedad width. + * + * @param value + * allowed object is + * {@link Double } + * + */ + public void setWidth(Double value) { + this.width = value; + } + + /** + * Obtiene el valor de la propiedad thickness. + * + */ + public double getThickness() { + return thickness; + } + + /** + * Define el valor de la propiedad thickness. + * + */ + public void setThickness(double value) { + this.thickness = value; + } + +} diff --git a/CICMMetadata/java/generated/DirectoryType.java b/CICMMetadata/java/generated/DirectoryType.java new file mode 100644 index 0000000..ec3e432 --- /dev/null +++ b/CICMMetadata/java/generated/DirectoryType.java @@ -0,0 +1,476 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Clase Java para DirectoryType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="DirectoryType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="File" type="{}ContentsFileType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="Directory" type="{}DirectoryType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="creationTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
+ *       <attribute name="accessTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
+ *       <attribute name="statusChangeTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
+ *       <attribute name="backupTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
+ *       <attribute name="lastWriteTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
+ *       <attribute name="attributes" use="required" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
+ *       <attribute name="posixMode" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
+ *       <attribute name="deviceNumber" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
+ *       <attribute name="posixGroupId" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
+ *       <attribute name="inode" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
+ *       <attribute name="links" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
+ *       <attribute name="posixUserId" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DirectoryType", propOrder = { + "file", + "directory" +}) +public class DirectoryType { + + @XmlElement(name = "File") + protected List file; + @XmlElement(name = "Directory") + protected List directory; + @XmlAttribute(name = "name", required = true) + protected String name; + @XmlAttribute(name = "creationTime") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar creationTime; + @XmlAttribute(name = "accessTime") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar accessTime; + @XmlAttribute(name = "statusChangeTime") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar statusChangeTime; + @XmlAttribute(name = "backupTime") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar backupTime; + @XmlAttribute(name = "lastWriteTime") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar lastWriteTime; + @XmlAttribute(name = "attributes", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger attributes; + @XmlAttribute(name = "posixMode") + @XmlSchemaType(name = "unsignedInt") + protected Long posixMode; + @XmlAttribute(name = "deviceNumber") + @XmlSchemaType(name = "unsignedLong") + protected BigInteger deviceNumber; + @XmlAttribute(name = "posixGroupId") + @XmlSchemaType(name = "unsignedLong") + protected BigInteger posixGroupId; + @XmlAttribute(name = "inode") + @XmlSchemaType(name = "unsignedLong") + protected BigInteger inode; + @XmlAttribute(name = "links") + @XmlSchemaType(name = "unsignedLong") + protected BigInteger links; + @XmlAttribute(name = "posixUserId") + @XmlSchemaType(name = "unsignedLong") + protected BigInteger posixUserId; + + /** + * Gets the value of the file property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the file property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getFile().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ContentsFileType } + * + * + */ + public List getFile() { + if (file == null) { + file = new ArrayList(); + } + return this.file; + } + + /** + * Gets the value of the directory property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the directory property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getDirectory().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link DirectoryType } + * + * + */ + public List getDirectory() { + if (directory == null) { + directory = new ArrayList(); + } + return this.directory; + } + + /** + * Obtiene el valor de la propiedad name. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Define el valor de la propiedad name. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Obtiene el valor de la propiedad creationTime. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getCreationTime() { + return creationTime; + } + + /** + * Define el valor de la propiedad creationTime. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setCreationTime(XMLGregorianCalendar value) { + this.creationTime = value; + } + + /** + * Obtiene el valor de la propiedad accessTime. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getAccessTime() { + return accessTime; + } + + /** + * Define el valor de la propiedad accessTime. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setAccessTime(XMLGregorianCalendar value) { + this.accessTime = value; + } + + /** + * Obtiene el valor de la propiedad statusChangeTime. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getStatusChangeTime() { + return statusChangeTime; + } + + /** + * Define el valor de la propiedad statusChangeTime. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setStatusChangeTime(XMLGregorianCalendar value) { + this.statusChangeTime = value; + } + + /** + * Obtiene el valor de la propiedad backupTime. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getBackupTime() { + return backupTime; + } + + /** + * Define el valor de la propiedad backupTime. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setBackupTime(XMLGregorianCalendar value) { + this.backupTime = value; + } + + /** + * Obtiene el valor de la propiedad lastWriteTime. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getLastWriteTime() { + return lastWriteTime; + } + + /** + * Define el valor de la propiedad lastWriteTime. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setLastWriteTime(XMLGregorianCalendar value) { + this.lastWriteTime = value; + } + + /** + * Obtiene el valor de la propiedad attributes. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getAttributes() { + return attributes; + } + + /** + * Define el valor de la propiedad attributes. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setAttributes(BigInteger value) { + this.attributes = value; + } + + /** + * Obtiene el valor de la propiedad posixMode. + * + * @return + * possible object is + * {@link Long } + * + */ + public Long getPosixMode() { + return posixMode; + } + + /** + * Define el valor de la propiedad posixMode. + * + * @param value + * allowed object is + * {@link Long } + * + */ + public void setPosixMode(Long value) { + this.posixMode = value; + } + + /** + * Obtiene el valor de la propiedad deviceNumber. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getDeviceNumber() { + return deviceNumber; + } + + /** + * Define el valor de la propiedad deviceNumber. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setDeviceNumber(BigInteger value) { + this.deviceNumber = value; + } + + /** + * Obtiene el valor de la propiedad posixGroupId. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getPosixGroupId() { + return posixGroupId; + } + + /** + * Define el valor de la propiedad posixGroupId. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setPosixGroupId(BigInteger value) { + this.posixGroupId = value; + } + + /** + * Obtiene el valor de la propiedad inode. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getInode() { + return inode; + } + + /** + * Define el valor de la propiedad inode. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setInode(BigInteger value) { + this.inode = value; + } + + /** + * Obtiene el valor de la propiedad links. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getLinks() { + return links; + } + + /** + * Define el valor de la propiedad links. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setLinks(BigInteger value) { + this.links = value; + } + + /** + * Obtiene el valor de la propiedad posixUserId. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getPosixUserId() { + return posixUserId; + } + + /** + * Define el valor de la propiedad posixUserId. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setPosixUserId(BigInteger value) { + this.posixUserId = value; + } + +} diff --git a/CICMMetadata/java/generated/DiscScanType.java b/CICMMetadata/java/generated/DiscScanType.java new file mode 100644 index 0000000..ba8ab06 --- /dev/null +++ b/CICMMetadata/java/generated/DiscScanType.java @@ -0,0 +1,108 @@ +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2015.11.07 at 05:27:06 AM WET +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Java class for DiscScanType complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="DiscScanType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DiscScanElement">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *               <enumeration value="up"/>
+ *               <enumeration value="down"/>
+ *               <enumeration value="front"/>
+ *               <enumeration value="back"/>
+ *               <enumeration value="left"/>
+ *               <enumeration value="right"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *         <element name="Scan" type="{}ScanType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DiscScanType", propOrder = { + "discScanElement", + "scan" +}) +public class DiscScanType { + + @XmlElement(name = "DiscScanElement", required = true) + protected String discScanElement; + @XmlElement(name = "Scan", required = true) + protected ScanType scan; + + /** + * Gets the value of the discScanElement property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDiscScanElement() { + return discScanElement; + } + + /** + * Sets the value of the discScanElement property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDiscScanElement(String value) { + this.discScanElement = value; + } + + /** + * Gets the value of the scan property. + * + * @return + * possible object is + * {@link ScanType } + * + */ + public ScanType getScan() { + return scan; + } + + /** + * Sets the value of the scan property. + * + * @param value + * allowed object is + * {@link ScanType } + * + */ + public void setScan(ScanType value) { + this.scan = value; + } + +} diff --git a/CICMMetadata/java/generated/DumpHardwareArrayType.java b/CICMMetadata/java/generated/DumpHardwareArrayType.java new file mode 100644 index 0000000..de9565b --- /dev/null +++ b/CICMMetadata/java/generated/DumpHardwareArrayType.java @@ -0,0 +1,78 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Array of drives information + * + *

Clase Java para DumpHardwareArrayType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="DumpHardwareArrayType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="DumpHardware" type="{}DumpHardwareType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DumpHardwareArrayType", propOrder = { + "dumpHardware" +}) +public class DumpHardwareArrayType { + + @XmlElement(name = "DumpHardware", required = true) + protected List dumpHardware; + + /** + * Gets the value of the dumpHardware property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the dumpHardware property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getDumpHardware().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link DumpHardwareType } + * + * + */ + public List getDumpHardware() { + if (dumpHardware == null) { + dumpHardware = new ArrayList(); + } + return this.dumpHardware; + } + +} diff --git a/CICMMetadata/java/generated/DumpHardwareType.java b/CICMMetadata/java/generated/DumpHardwareType.java new file mode 100644 index 0000000..4c37cb1 --- /dev/null +++ b/CICMMetadata/java/generated/DumpHardwareType.java @@ -0,0 +1,237 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para DumpHardwareType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="DumpHardwareType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Manufacturer" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Model" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Revision" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Firmware" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Serial" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Extents" type="{}ExtentsType"/>
+ *         <element name="Software" type="{}SoftwareType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DumpHardwareType", propOrder = { + "manufacturer", + "model", + "revision", + "firmware", + "serial", + "extents", + "software" +}) +public class DumpHardwareType { + + @XmlElement(name = "Manufacturer", required = true) + protected String manufacturer; + @XmlElement(name = "Model", required = true) + protected String model; + @XmlElement(name = "Revision", required = true) + protected String revision; + @XmlElement(name = "Firmware", required = true) + protected String firmware; + @XmlElement(name = "Serial", required = true) + protected String serial; + @XmlElement(name = "Extents", required = true) + protected ExtentsType extents; + @XmlElement(name = "Software", required = true) + protected SoftwareType software; + + /** + * Obtiene el valor de la propiedad manufacturer. + * + * @return + * possible object is + * {@link String } + * + */ + public String getManufacturer() { + return manufacturer; + } + + /** + * Define el valor de la propiedad manufacturer. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setManufacturer(String value) { + this.manufacturer = value; + } + + /** + * Obtiene el valor de la propiedad model. + * + * @return + * possible object is + * {@link String } + * + */ + public String getModel() { + return model; + } + + /** + * Define el valor de la propiedad model. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setModel(String value) { + this.model = value; + } + + /** + * Obtiene el valor de la propiedad revision. + * + * @return + * possible object is + * {@link String } + * + */ + public String getRevision() { + return revision; + } + + /** + * Define el valor de la propiedad revision. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setRevision(String value) { + this.revision = value; + } + + /** + * Obtiene el valor de la propiedad firmware. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFirmware() { + return firmware; + } + + /** + * Define el valor de la propiedad firmware. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFirmware(String value) { + this.firmware = value; + } + + /** + * Obtiene el valor de la propiedad serial. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSerial() { + return serial; + } + + /** + * Define el valor de la propiedad serial. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSerial(String value) { + this.serial = value; + } + + /** + * Obtiene el valor de la propiedad extents. + * + * @return + * possible object is + * {@link ExtentsType } + * + */ + public ExtentsType getExtents() { + return extents; + } + + /** + * Define el valor de la propiedad extents. + * + * @param value + * allowed object is + * {@link ExtentsType } + * + */ + public void setExtents(ExtentsType value) { + this.extents = value; + } + + /** + * Obtiene el valor de la propiedad software. + * + * @return + * possible object is + * {@link SoftwareType } + * + */ + public SoftwareType getSoftware() { + return software; + } + + /** + * Define el valor de la propiedad software. + * + * @param value + * allowed object is + * {@link SoftwareType } + * + */ + public void setSoftware(SoftwareType value) { + this.software = value; + } + +} diff --git a/CICMMetadata/java/generated/DumpType.java b/CICMMetadata/java/generated/DumpType.java new file mode 100644 index 0000000..749bf9a --- /dev/null +++ b/CICMMetadata/java/generated/DumpType.java @@ -0,0 +1,131 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + * Information about dumped structure + * + * + *

Clase Java para DumpType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="DumpType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Image" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Size" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="Checksums" type="{}ChecksumsType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "DumpType", propOrder = { + "image", + "size", + "checksums" +}) +public class DumpType { + + @XmlElement(name = "Image", required = true) + protected String image; + @XmlElement(name = "Size", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger size; + @XmlElement(name = "Checksums", required = true) + protected ChecksumsType checksums; + + /** + * Obtiene el valor de la propiedad image. + * + * @return + * possible object is + * {@link String } + * + */ + public String getImage() { + return image; + } + + /** + * Define el valor de la propiedad image. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setImage(String value) { + this.image = value; + } + + /** + * Obtiene el valor de la propiedad size. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSize() { + return size; + } + + /** + * Define el valor de la propiedad size. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSize(BigInteger value) { + this.size = value; + } + + /** + * Obtiene el valor de la propiedad checksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getChecksums() { + return checksums; + } + + /** + * Define el valor de la propiedad checksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setChecksums(ChecksumsType value) { + this.checksums = value; + } + +} diff --git a/CICMMetadata/java/generated/EVPDType.java b/CICMMetadata/java/generated/EVPDType.java new file mode 100644 index 0000000..901ece1 --- /dev/null +++ b/CICMMetadata/java/generated/EVPDType.java @@ -0,0 +1,163 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para EVPDType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="EVPDType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Image" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Size" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="Checksums" type="{}ChecksumsType"/>
+ *       </sequence>
+ *       <attribute name="page">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}unsignedByte">
+ *             <minInclusive value="1"/>
+ *             <maxInclusive value="255"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "EVPDType", propOrder = { + "image", + "size", + "checksums" +}) +public class EVPDType { + + @XmlElement(name = "Image", required = true) + protected String image; + @XmlElement(name = "Size", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger size; + @XmlElement(name = "Checksums", required = true) + protected ChecksumsType checksums; + @XmlAttribute(name = "page") + protected Short page; + + /** + * Obtiene el valor de la propiedad image. + * + * @return + * possible object is + * {@link String } + * + */ + public String getImage() { + return image; + } + + /** + * Define el valor de la propiedad image. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setImage(String value) { + this.image = value; + } + + /** + * Obtiene el valor de la propiedad size. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSize() { + return size; + } + + /** + * Define el valor de la propiedad size. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSize(BigInteger value) { + this.size = value; + } + + /** + * Obtiene el valor de la propiedad checksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getChecksums() { + return checksums; + } + + /** + * Define el valor de la propiedad checksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setChecksums(ChecksumsType value) { + this.checksums = value; + } + + /** + * Obtiene el valor de la propiedad page. + * + * @return + * possible object is + * {@link Short } + * + */ + public Short getPage() { + return page; + } + + /** + * Define el valor de la propiedad page. + * + * @param value + * allowed object is + * {@link Short } + * + */ + public void setPage(Short value) { + this.page = value; + } + +} diff --git a/CICMMetadata/java/generated/ExtendedAttributeType.java b/CICMMetadata/java/generated/ExtendedAttributeType.java new file mode 100644 index 0000000..a7c441f --- /dev/null +++ b/CICMMetadata/java/generated/ExtendedAttributeType.java @@ -0,0 +1,127 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para ExtendedAttributeType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="ExtendedAttributeType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Checksums" type="{}ChecksumsType"/>
+ *       </sequence>
+ *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="length" use="required" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ExtendedAttributeType", propOrder = { + "checksums" +}) +public class ExtendedAttributeType { + + @XmlElement(name = "Checksums", required = true) + protected ChecksumsType checksums; + @XmlAttribute(name = "name", required = true) + protected String name; + @XmlAttribute(name = "length", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger length; + + /** + * Obtiene el valor de la propiedad checksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getChecksums() { + return checksums; + } + + /** + * Define el valor de la propiedad checksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setChecksums(ChecksumsType value) { + this.checksums = value; + } + + /** + * Obtiene el valor de la propiedad name. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Define el valor de la propiedad name. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Obtiene el valor de la propiedad length. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getLength() { + return length; + } + + /** + * Define el valor de la propiedad length. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setLength(BigInteger value) { + this.length = value; + } + +} diff --git a/CICMMetadata/java/generated/ExtendedAttributesType.java b/CICMMetadata/java/generated/ExtendedAttributesType.java new file mode 100644 index 0000000..b4f48dd --- /dev/null +++ b/CICMMetadata/java/generated/ExtendedAttributesType.java @@ -0,0 +1,76 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para ExtendedAttributesType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="ExtendedAttributesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="ExtendedAttribute" type="{}ExtendedAttributeType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ExtendedAttributesType", propOrder = { + "extendedAttribute" +}) +public class ExtendedAttributesType { + + @XmlElement(name = "ExtendedAttribute", required = true) + protected List extendedAttribute; + + /** + * Gets the value of the extendedAttribute property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the extendedAttribute property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getExtendedAttribute().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ExtendedAttributeType } + * + * + */ + public List getExtendedAttribute() { + if (extendedAttribute == null) { + extendedAttribute = new ArrayList(); + } + return this.extendedAttribute; + } + +} diff --git a/CICMMetadata/java/generated/ExtentType.java b/CICMMetadata/java/generated/ExtentType.java new file mode 100644 index 0000000..21860e4 --- /dev/null +++ b/CICMMetadata/java/generated/ExtentType.java @@ -0,0 +1,101 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para ExtentType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="ExtentType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Start" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="End" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ExtentType", propOrder = { + "start", + "end" +}) +public class ExtentType { + + @XmlElement(name = "Start", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger start; + @XmlElement(name = "End", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger end; + + /** + * Obtiene el valor de la propiedad start. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getStart() { + return start; + } + + /** + * Define el valor de la propiedad start. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setStart(BigInteger value) { + this.start = value; + } + + /** + * Obtiene el valor de la propiedad end. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getEnd() { + return end; + } + + /** + * Define el valor de la propiedad end. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setEnd(BigInteger value) { + this.end = value; + } + +} diff --git a/CICMMetadata/java/generated/ExtentsType.java b/CICMMetadata/java/generated/ExtentsType.java new file mode 100644 index 0000000..ab5d4ee --- /dev/null +++ b/CICMMetadata/java/generated/ExtentsType.java @@ -0,0 +1,76 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para ExtentsType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="ExtentsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Extent" type="{}ExtentType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ExtentsType", propOrder = { + "extent" +}) +public class ExtentsType { + + @XmlElement(name = "Extent", required = true) + protected List extent; + + /** + * Gets the value of the extent property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the extent property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getExtent().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ExtentType } + * + * + */ + public List getExtent() { + if (extent == null) { + extent = new ArrayList(); + } + return this.extent; + } + +} diff --git a/CICMMetadata/java/generated/FileSystemInformationType.java b/CICMMetadata/java/generated/FileSystemInformationType.java new file mode 100644 index 0000000..1df2c74 --- /dev/null +++ b/CICMMetadata/java/generated/FileSystemInformationType.java @@ -0,0 +1,76 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para FileSystemInformationType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="FileSystemInformationType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Partition" type="{}PartitionType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "FileSystemInformationType", propOrder = { + "partition" +}) +public class FileSystemInformationType { + + @XmlElement(name = "Partition", required = true) + protected List partition; + + /** + * Gets the value of the partition property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the partition property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getPartition().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link PartitionType } + * + * + */ + public List getPartition() { + if (partition == null) { + partition = new ArrayList(); + } + return this.partition; + } + +} diff --git a/CICMMetadata/java/generated/FileSystemType.java b/CICMMetadata/java/generated/FileSystemType.java new file mode 100644 index 0000000..bf7fa70 --- /dev/null +++ b/CICMMetadata/java/generated/FileSystemType.java @@ -0,0 +1,591 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + * Information about a filesystem + * + *

Clase Java para FileSystemType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="FileSystemType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Type" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="CreationDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
+ *         <element name="ModificationDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
+ *         <element name="BackupDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
+ *         <element name="ClusterSize" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
+ *         <element name="Clusters" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="Files" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" minOccurs="0"/>
+ *         <element name="Bootable" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         <element name="VolumeSerial" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="VolumeName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="FreeClusters" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" minOccurs="0"/>
+ *         <element name="Dirty" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
+ *         <element name="ExpirationDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
+ *         <element name="EffectiveDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
+ *         <element name="SystemIdentifier" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="VolumeSetIdentifier" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="PublisherIdentifier" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="DataPreparerIdentifier" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="ApplicationIdentifier" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Contents" type="{}FilesystemContentsType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "FileSystemType", propOrder = { + "type", + "creationDate", + "modificationDate", + "backupDate", + "clusterSize", + "clusters", + "files", + "bootable", + "volumeSerial", + "volumeName", + "freeClusters", + "dirty", + "expirationDate", + "effectiveDate", + "systemIdentifier", + "volumeSetIdentifier", + "publisherIdentifier", + "dataPreparerIdentifier", + "applicationIdentifier", + "contents" +}) +public class FileSystemType { + + @XmlElement(name = "Type", required = true) + protected String type; + @XmlElement(name = "CreationDate") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar creationDate; + @XmlElement(name = "ModificationDate") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar modificationDate; + @XmlElement(name = "BackupDate") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar backupDate; + @XmlElement(name = "ClusterSize") + @XmlSchemaType(name = "unsignedInt") + protected long clusterSize; + @XmlElement(name = "Clusters", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger clusters; + @XmlElement(name = "Files") + @XmlSchemaType(name = "unsignedLong") + protected BigInteger files; + @XmlElement(name = "Bootable") + protected boolean bootable; + @XmlElement(name = "VolumeSerial") + protected String volumeSerial; + @XmlElement(name = "VolumeName") + protected String volumeName; + @XmlElement(name = "FreeClusters") + @XmlSchemaType(name = "unsignedLong") + protected BigInteger freeClusters; + @XmlElement(name = "Dirty") + protected boolean dirty; + @XmlElement(name = "ExpirationDate") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar expirationDate; + @XmlElement(name = "EffectiveDate") + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar effectiveDate; + @XmlElement(name = "SystemIdentifier") + protected String systemIdentifier; + @XmlElement(name = "VolumeSetIdentifier") + protected String volumeSetIdentifier; + @XmlElement(name = "PublisherIdentifier") + protected String publisherIdentifier; + @XmlElement(name = "DataPreparerIdentifier") + protected String dataPreparerIdentifier; + @XmlElement(name = "ApplicationIdentifier") + protected String applicationIdentifier; + @XmlElement(name = "Contents") + protected FilesystemContentsType contents; + + /** + * Obtiene el valor de la propiedad type. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Define el valor de la propiedad type. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Obtiene el valor de la propiedad creationDate. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getCreationDate() { + return creationDate; + } + + /** + * Define el valor de la propiedad creationDate. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setCreationDate(XMLGregorianCalendar value) { + this.creationDate = value; + } + + /** + * Obtiene el valor de la propiedad modificationDate. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getModificationDate() { + return modificationDate; + } + + /** + * Define el valor de la propiedad modificationDate. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setModificationDate(XMLGregorianCalendar value) { + this.modificationDate = value; + } + + /** + * Obtiene el valor de la propiedad backupDate. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getBackupDate() { + return backupDate; + } + + /** + * Define el valor de la propiedad backupDate. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setBackupDate(XMLGregorianCalendar value) { + this.backupDate = value; + } + + /** + * Obtiene el valor de la propiedad clusterSize. + * + */ + public long getClusterSize() { + return clusterSize; + } + + /** + * Define el valor de la propiedad clusterSize. + * + */ + public void setClusterSize(long value) { + this.clusterSize = value; + } + + /** + * Obtiene el valor de la propiedad clusters. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getClusters() { + return clusters; + } + + /** + * Define el valor de la propiedad clusters. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setClusters(BigInteger value) { + this.clusters = value; + } + + /** + * Obtiene el valor de la propiedad files. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getFiles() { + return files; + } + + /** + * Define el valor de la propiedad files. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setFiles(BigInteger value) { + this.files = value; + } + + /** + * Obtiene el valor de la propiedad bootable. + * + */ + public boolean isBootable() { + return bootable; + } + + /** + * Define el valor de la propiedad bootable. + * + */ + public void setBootable(boolean value) { + this.bootable = value; + } + + /** + * Obtiene el valor de la propiedad volumeSerial. + * + * @return + * possible object is + * {@link String } + * + */ + public String getVolumeSerial() { + return volumeSerial; + } + + /** + * Define el valor de la propiedad volumeSerial. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setVolumeSerial(String value) { + this.volumeSerial = value; + } + + /** + * Obtiene el valor de la propiedad volumeName. + * + * @return + * possible object is + * {@link String } + * + */ + public String getVolumeName() { + return volumeName; + } + + /** + * Define el valor de la propiedad volumeName. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setVolumeName(String value) { + this.volumeName = value; + } + + /** + * Obtiene el valor de la propiedad freeClusters. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getFreeClusters() { + return freeClusters; + } + + /** + * Define el valor de la propiedad freeClusters. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setFreeClusters(BigInteger value) { + this.freeClusters = value; + } + + /** + * Obtiene el valor de la propiedad dirty. + * + */ + public boolean isDirty() { + return dirty; + } + + /** + * Define el valor de la propiedad dirty. + * + */ + public void setDirty(boolean value) { + this.dirty = value; + } + + /** + * Obtiene el valor de la propiedad expirationDate. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getExpirationDate() { + return expirationDate; + } + + /** + * Define el valor de la propiedad expirationDate. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setExpirationDate(XMLGregorianCalendar value) { + this.expirationDate = value; + } + + /** + * Obtiene el valor de la propiedad effectiveDate. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getEffectiveDate() { + return effectiveDate; + } + + /** + * Define el valor de la propiedad effectiveDate. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setEffectiveDate(XMLGregorianCalendar value) { + this.effectiveDate = value; + } + + /** + * Obtiene el valor de la propiedad systemIdentifier. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSystemIdentifier() { + return systemIdentifier; + } + + /** + * Define el valor de la propiedad systemIdentifier. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSystemIdentifier(String value) { + this.systemIdentifier = value; + } + + /** + * Obtiene el valor de la propiedad volumeSetIdentifier. + * + * @return + * possible object is + * {@link String } + * + */ + public String getVolumeSetIdentifier() { + return volumeSetIdentifier; + } + + /** + * Define el valor de la propiedad volumeSetIdentifier. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setVolumeSetIdentifier(String value) { + this.volumeSetIdentifier = value; + } + + /** + * Obtiene el valor de la propiedad publisherIdentifier. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPublisherIdentifier() { + return publisherIdentifier; + } + + /** + * Define el valor de la propiedad publisherIdentifier. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPublisherIdentifier(String value) { + this.publisherIdentifier = value; + } + + /** + * Obtiene el valor de la propiedad dataPreparerIdentifier. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDataPreparerIdentifier() { + return dataPreparerIdentifier; + } + + /** + * Define el valor de la propiedad dataPreparerIdentifier. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDataPreparerIdentifier(String value) { + this.dataPreparerIdentifier = value; + } + + /** + * Obtiene el valor de la propiedad applicationIdentifier. + * + * @return + * possible object is + * {@link String } + * + */ + public String getApplicationIdentifier() { + return applicationIdentifier; + } + + /** + * Define el valor de la propiedad applicationIdentifier. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setApplicationIdentifier(String value) { + this.applicationIdentifier = value; + } + + /** + * Obtiene el valor de la propiedad contents. + * + * @return + * possible object is + * {@link FilesystemContentsType } + * + */ + public FilesystemContentsType getContents() { + return contents; + } + + /** + * Define el valor de la propiedad contents. + * + * @param value + * allowed object is + * {@link FilesystemContentsType } + * + */ + public void setContents(FilesystemContentsType value) { + this.contents = value; + } + +} diff --git a/CICMMetadata/java/generated/FileSystemsType.java b/CICMMetadata/java/generated/FileSystemsType.java new file mode 100644 index 0000000..1d41f4a --- /dev/null +++ b/CICMMetadata/java/generated/FileSystemsType.java @@ -0,0 +1,76 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para FileSystemsType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="FileSystemsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="FileSystem" type="{}FileSystemType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "FileSystemsType", propOrder = { + "fileSystem" +}) +public class FileSystemsType { + + @XmlElement(name = "FileSystem", required = true) + protected List fileSystem; + + /** + * Gets the value of the fileSystem property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the fileSystem property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getFileSystem().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link FileSystemType } + * + * + */ + public List getFileSystem() { + if (fileSystem == null) { + fileSystem = new ArrayList(); + } + return this.fileSystem; + } + +} diff --git a/CICMMetadata/java/generated/FileType.java b/CICMMetadata/java/generated/FileType.java new file mode 100644 index 0000000..7541bca --- /dev/null +++ b/CICMMetadata/java/generated/FileType.java @@ -0,0 +1,96 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + * File + * + *

Clase Java para FileType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="FileType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *       <attribute name="format" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "FileType", propOrder = { + "value" +}) +public class FileType { + + @XmlValue + protected String value; + @XmlAttribute(name = "format") + protected String format; + + /** + * Obtiene el valor de la propiedad value. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Define el valor de la propiedad value. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Obtiene el valor de la propiedad format. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFormat() { + return format; + } + + /** + * Define el valor de la propiedad format. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFormat(String value) { + this.format = value; + } + +} diff --git a/CICMMetadata/java/generated/FilesystemContentsType.java b/CICMMetadata/java/generated/FilesystemContentsType.java new file mode 100644 index 0000000..204c355 --- /dev/null +++ b/CICMMetadata/java/generated/FilesystemContentsType.java @@ -0,0 +1,137 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para FilesystemContentsType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="FilesystemContentsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="File" type="{}ContentsFileType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="Directory" type="{}DirectoryType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="namespace" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "FilesystemContentsType", propOrder = { + "file", + "directory" +}) +public class FilesystemContentsType { + + @XmlElement(name = "File") + protected List file; + @XmlElement(name = "Directory") + protected List directory; + @XmlAttribute(name = "namespace") + protected String namespace; + + /** + * Gets the value of the file property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the file property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getFile().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ContentsFileType } + * + * + */ + public List getFile() { + if (file == null) { + file = new ArrayList(); + } + return this.file; + } + + /** + * Gets the value of the directory property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the directory property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getDirectory().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link DirectoryType } + * + * + */ + public List getDirectory() { + if (directory == null) { + directory = new ArrayList(); + } + return this.directory; + } + + /** + * Obtiene el valor de la propiedad namespace. + * + * @return + * possible object is + * {@link String } + * + */ + public String getNamespace() { + return namespace; + } + + /** + * Define el valor de la propiedad namespace. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setNamespace(String value) { + this.namespace = value; + } + +} diff --git a/CICMMetadata/java/generated/ImageType.java b/CICMMetadata/java/generated/ImageType.java new file mode 100644 index 0000000..565733b --- /dev/null +++ b/CICMMetadata/java/generated/ImageType.java @@ -0,0 +1,127 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + * File containing track dump, and format, binary, yranib, or audio/video container + * + * + *

Clase Java para ImageType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="ImageType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *       <attribute name="format" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="offset" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ImageType", propOrder = { + "value" +}) +public class ImageType { + + @XmlValue + protected String value; + @XmlAttribute(name = "format") + protected String format; + @XmlAttribute(name = "offset") + @XmlSchemaType(name = "unsignedLong") + protected BigInteger offset; + + /** + * Obtiene el valor de la propiedad value. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Define el valor de la propiedad value. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Obtiene el valor de la propiedad format. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFormat() { + return format; + } + + /** + * Define el valor de la propiedad format. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFormat(String value) { + this.format = value; + } + + /** + * Obtiene el valor de la propiedad offset. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getOffset() { + return offset; + } + + /** + * Define el valor de la propiedad offset. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setOffset(BigInteger value) { + this.offset = value; + } + +} diff --git a/CICMMetadata/java/generated/KeywordsType.java b/CICMMetadata/java/generated/KeywordsType.java new file mode 100644 index 0000000..bdab9c5 --- /dev/null +++ b/CICMMetadata/java/generated/KeywordsType.java @@ -0,0 +1,76 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para KeywordsType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="KeywordsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Keyword" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "KeywordsType", propOrder = { + "keyword" +}) +public class KeywordsType { + + @XmlElement(name = "Keyword", required = true) + protected List keyword; + + /** + * Gets the value of the keyword property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the keyword property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getKeyword().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getKeyword() { + if (keyword == null) { + keyword = new ArrayList(); + } + return this.keyword; + } + +} diff --git a/CICMMetadata/java/generated/LanguagesType.java b/CICMMetadata/java/generated/LanguagesType.java new file mode 100644 index 0000000..a99bc2f --- /dev/null +++ b/CICMMetadata/java/generated/LanguagesType.java @@ -0,0 +1,567 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para LanguagesType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="LanguagesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Language" maxOccurs="unbounded">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *               <enumeration value="aar"/>
+ *               <enumeration value="abk"/>
+ *               <enumeration value="ace"/>
+ *               <enumeration value="ach"/>
+ *               <enumeration value="ada"/>
+ *               <enumeration value="ady"/>
+ *               <enumeration value="afa"/>
+ *               <enumeration value="afh"/>
+ *               <enumeration value="afr"/>
+ *               <enumeration value="ain"/>
+ *               <enumeration value="aka"/>
+ *               <enumeration value="akk"/>
+ *               <enumeration value="alb"/>
+ *               <enumeration value="ale"/>
+ *               <enumeration value="alg"/>
+ *               <enumeration value="alt"/>
+ *               <enumeration value="amh"/>
+ *               <enumeration value="ang"/>
+ *               <enumeration value="anp"/>
+ *               <enumeration value="apa"/>
+ *               <enumeration value="ara"/>
+ *               <enumeration value="arc"/>
+ *               <enumeration value="arg"/>
+ *               <enumeration value="arm"/>
+ *               <enumeration value="arn"/>
+ *               <enumeration value="arp"/>
+ *               <enumeration value="art"/>
+ *               <enumeration value="arw"/>
+ *               <enumeration value="asm"/>
+ *               <enumeration value="ast"/>
+ *               <enumeration value="ath"/>
+ *               <enumeration value="aus"/>
+ *               <enumeration value="ava"/>
+ *               <enumeration value="ave"/>
+ *               <enumeration value="awa"/>
+ *               <enumeration value="aym"/>
+ *               <enumeration value="aze"/>
+ *               <enumeration value="bad"/>
+ *               <enumeration value="bai"/>
+ *               <enumeration value="bak"/>
+ *               <enumeration value="bal"/>
+ *               <enumeration value="bam"/>
+ *               <enumeration value="ban"/>
+ *               <enumeration value="baq"/>
+ *               <enumeration value="bas"/>
+ *               <enumeration value="bat"/>
+ *               <enumeration value="bej"/>
+ *               <enumeration value="bel"/>
+ *               <enumeration value="bem"/>
+ *               <enumeration value="ben"/>
+ *               <enumeration value="ber"/>
+ *               <enumeration value="bho"/>
+ *               <enumeration value="bih"/>
+ *               <enumeration value="bik"/>
+ *               <enumeration value="bin"/>
+ *               <enumeration value="bis"/>
+ *               <enumeration value="bla"/>
+ *               <enumeration value="bnt"/>
+ *               <enumeration value="bos"/>
+ *               <enumeration value="bra"/>
+ *               <enumeration value="bre"/>
+ *               <enumeration value="btk"/>
+ *               <enumeration value="bua"/>
+ *               <enumeration value="bug"/>
+ *               <enumeration value="bul"/>
+ *               <enumeration value="bur"/>
+ *               <enumeration value="byn"/>
+ *               <enumeration value="cad"/>
+ *               <enumeration value="cai"/>
+ *               <enumeration value="car"/>
+ *               <enumeration value="cat"/>
+ *               <enumeration value="cau"/>
+ *               <enumeration value="ceb"/>
+ *               <enumeration value="cel"/>
+ *               <enumeration value="cha"/>
+ *               <enumeration value="chb"/>
+ *               <enumeration value="che"/>
+ *               <enumeration value="chg"/>
+ *               <enumeration value="chi"/>
+ *               <enumeration value="chk"/>
+ *               <enumeration value="chm"/>
+ *               <enumeration value="chn"/>
+ *               <enumeration value="cho"/>
+ *               <enumeration value="chp"/>
+ *               <enumeration value="chr"/>
+ *               <enumeration value="chu"/>
+ *               <enumeration value="chv"/>
+ *               <enumeration value="chy"/>
+ *               <enumeration value="cmc"/>
+ *               <enumeration value="cop"/>
+ *               <enumeration value="cor"/>
+ *               <enumeration value="cos"/>
+ *               <enumeration value="cpe"/>
+ *               <enumeration value="cpf"/>
+ *               <enumeration value="cpp"/>
+ *               <enumeration value="cre"/>
+ *               <enumeration value="crh"/>
+ *               <enumeration value="crp"/>
+ *               <enumeration value="csb"/>
+ *               <enumeration value="cus"/>
+ *               <enumeration value="cze"/>
+ *               <enumeration value="dak"/>
+ *               <enumeration value="dan"/>
+ *               <enumeration value="dar"/>
+ *               <enumeration value="day"/>
+ *               <enumeration value="del"/>
+ *               <enumeration value="den"/>
+ *               <enumeration value="dgr"/>
+ *               <enumeration value="din"/>
+ *               <enumeration value="div"/>
+ *               <enumeration value="doi"/>
+ *               <enumeration value="dra"/>
+ *               <enumeration value="dsb"/>
+ *               <enumeration value="dua"/>
+ *               <enumeration value="dum"/>
+ *               <enumeration value="dut"/>
+ *               <enumeration value="dyu"/>
+ *               <enumeration value="dzo"/>
+ *               <enumeration value="efi"/>
+ *               <enumeration value="egy"/>
+ *               <enumeration value="eka"/>
+ *               <enumeration value="elx"/>
+ *               <enumeration value="eng"/>
+ *               <enumeration value="enm"/>
+ *               <enumeration value="epo"/>
+ *               <enumeration value="est"/>
+ *               <enumeration value="ewe"/>
+ *               <enumeration value="ewo"/>
+ *               <enumeration value="fan"/>
+ *               <enumeration value="fao"/>
+ *               <enumeration value="fat"/>
+ *               <enumeration value="fij"/>
+ *               <enumeration value="fil"/>
+ *               <enumeration value="fin"/>
+ *               <enumeration value="fiu"/>
+ *               <enumeration value="fon"/>
+ *               <enumeration value="fre"/>
+ *               <enumeration value="frm"/>
+ *               <enumeration value="fro"/>
+ *               <enumeration value="frr"/>
+ *               <enumeration value="frs"/>
+ *               <enumeration value="fry"/>
+ *               <enumeration value="ful"/>
+ *               <enumeration value="fur"/>
+ *               <enumeration value="gaa"/>
+ *               <enumeration value="gay"/>
+ *               <enumeration value="gba"/>
+ *               <enumeration value="gem"/>
+ *               <enumeration value="geo"/>
+ *               <enumeration value="ger"/>
+ *               <enumeration value="gez"/>
+ *               <enumeration value="gil"/>
+ *               <enumeration value="gla"/>
+ *               <enumeration value="gle"/>
+ *               <enumeration value="glg"/>
+ *               <enumeration value="glv"/>
+ *               <enumeration value="gmh"/>
+ *               <enumeration value="goh"/>
+ *               <enumeration value="gon"/>
+ *               <enumeration value="gor"/>
+ *               <enumeration value="got"/>
+ *               <enumeration value="grb"/>
+ *               <enumeration value="grc"/>
+ *               <enumeration value="gre"/>
+ *               <enumeration value="grn"/>
+ *               <enumeration value="gsw"/>
+ *               <enumeration value="guj"/>
+ *               <enumeration value="gwi"/>
+ *               <enumeration value="hai"/>
+ *               <enumeration value="hat"/>
+ *               <enumeration value="hau"/>
+ *               <enumeration value="haw"/>
+ *               <enumeration value="heb"/>
+ *               <enumeration value="her"/>
+ *               <enumeration value="hil"/>
+ *               <enumeration value="him"/>
+ *               <enumeration value="hin"/>
+ *               <enumeration value="hit"/>
+ *               <enumeration value="hmn"/>
+ *               <enumeration value="hmo"/>
+ *               <enumeration value="hrv"/>
+ *               <enumeration value="hsb"/>
+ *               <enumeration value="hun"/>
+ *               <enumeration value="hup"/>
+ *               <enumeration value="iba"/>
+ *               <enumeration value="ibo"/>
+ *               <enumeration value="ice"/>
+ *               <enumeration value="ido"/>
+ *               <enumeration value="iii"/>
+ *               <enumeration value="ijo"/>
+ *               <enumeration value="iku"/>
+ *               <enumeration value="ile"/>
+ *               <enumeration value="ilo"/>
+ *               <enumeration value="ina"/>
+ *               <enumeration value="inc"/>
+ *               <enumeration value="ind"/>
+ *               <enumeration value="ine"/>
+ *               <enumeration value="inh"/>
+ *               <enumeration value="ipk"/>
+ *               <enumeration value="ira"/>
+ *               <enumeration value="iro"/>
+ *               <enumeration value="ita"/>
+ *               <enumeration value="jav"/>
+ *               <enumeration value="jbo"/>
+ *               <enumeration value="jpn"/>
+ *               <enumeration value="jpr"/>
+ *               <enumeration value="jrb"/>
+ *               <enumeration value="kaa"/>
+ *               <enumeration value="kab"/>
+ *               <enumeration value="kac"/>
+ *               <enumeration value="kal"/>
+ *               <enumeration value="kam"/>
+ *               <enumeration value="kan"/>
+ *               <enumeration value="kar"/>
+ *               <enumeration value="kas"/>
+ *               <enumeration value="kau"/>
+ *               <enumeration value="kaw"/>
+ *               <enumeration value="kaz"/>
+ *               <enumeration value="kbd"/>
+ *               <enumeration value="kha"/>
+ *               <enumeration value="khi"/>
+ *               <enumeration value="khm"/>
+ *               <enumeration value="kho"/>
+ *               <enumeration value="kik"/>
+ *               <enumeration value="kin"/>
+ *               <enumeration value="kir"/>
+ *               <enumeration value="kmb"/>
+ *               <enumeration value="kok"/>
+ *               <enumeration value="kom"/>
+ *               <enumeration value="kon"/>
+ *               <enumeration value="kor"/>
+ *               <enumeration value="kos"/>
+ *               <enumeration value="kpe"/>
+ *               <enumeration value="krc"/>
+ *               <enumeration value="krl"/>
+ *               <enumeration value="kro"/>
+ *               <enumeration value="kru"/>
+ *               <enumeration value="kua"/>
+ *               <enumeration value="kum"/>
+ *               <enumeration value="kur"/>
+ *               <enumeration value="kut"/>
+ *               <enumeration value="lad"/>
+ *               <enumeration value="lah"/>
+ *               <enumeration value="lam"/>
+ *               <enumeration value="lao"/>
+ *               <enumeration value="lat"/>
+ *               <enumeration value="lav"/>
+ *               <enumeration value="lez"/>
+ *               <enumeration value="lim"/>
+ *               <enumeration value="lin"/>
+ *               <enumeration value="lit"/>
+ *               <enumeration value="lol"/>
+ *               <enumeration value="loz"/>
+ *               <enumeration value="ltz"/>
+ *               <enumeration value="lua"/>
+ *               <enumeration value="lub"/>
+ *               <enumeration value="lug"/>
+ *               <enumeration value="lui"/>
+ *               <enumeration value="lun"/>
+ *               <enumeration value="luo"/>
+ *               <enumeration value="lus"/>
+ *               <enumeration value="mac"/>
+ *               <enumeration value="mad"/>
+ *               <enumeration value="mag"/>
+ *               <enumeration value="mah"/>
+ *               <enumeration value="mai"/>
+ *               <enumeration value="mak"/>
+ *               <enumeration value="mal"/>
+ *               <enumeration value="man"/>
+ *               <enumeration value="mao"/>
+ *               <enumeration value="map"/>
+ *               <enumeration value="mar"/>
+ *               <enumeration value="mas"/>
+ *               <enumeration value="may"/>
+ *               <enumeration value="mdf"/>
+ *               <enumeration value="mdr"/>
+ *               <enumeration value="men"/>
+ *               <enumeration value="mga"/>
+ *               <enumeration value="mic"/>
+ *               <enumeration value="min"/>
+ *               <enumeration value="mis"/>
+ *               <enumeration value="mkh"/>
+ *               <enumeration value="mlg"/>
+ *               <enumeration value="mlt"/>
+ *               <enumeration value="mnc"/>
+ *               <enumeration value="mni"/>
+ *               <enumeration value="mno"/>
+ *               <enumeration value="moh"/>
+ *               <enumeration value="mon"/>
+ *               <enumeration value="mos"/>
+ *               <enumeration value="mul"/>
+ *               <enumeration value="mun"/>
+ *               <enumeration value="mus"/>
+ *               <enumeration value="mwl"/>
+ *               <enumeration value="mwr"/>
+ *               <enumeration value="myn"/>
+ *               <enumeration value="myv"/>
+ *               <enumeration value="nah"/>
+ *               <enumeration value="nai"/>
+ *               <enumeration value="nap"/>
+ *               <enumeration value="nau"/>
+ *               <enumeration value="nav"/>
+ *               <enumeration value="nbl"/>
+ *               <enumeration value="nde"/>
+ *               <enumeration value="ndo"/>
+ *               <enumeration value="nds"/>
+ *               <enumeration value="nep"/>
+ *               <enumeration value="new"/>
+ *               <enumeration value="nia"/>
+ *               <enumeration value="nic"/>
+ *               <enumeration value="niu"/>
+ *               <enumeration value="nno"/>
+ *               <enumeration value="nob"/>
+ *               <enumeration value="nog"/>
+ *               <enumeration value="non"/>
+ *               <enumeration value="nor"/>
+ *               <enumeration value="nqo"/>
+ *               <enumeration value="nso"/>
+ *               <enumeration value="nub"/>
+ *               <enumeration value="nwc"/>
+ *               <enumeration value="nya"/>
+ *               <enumeration value="nym"/>
+ *               <enumeration value="nyn"/>
+ *               <enumeration value="nyo"/>
+ *               <enumeration value="nzi"/>
+ *               <enumeration value="oci"/>
+ *               <enumeration value="oji"/>
+ *               <enumeration value="ori"/>
+ *               <enumeration value="orm"/>
+ *               <enumeration value="osa"/>
+ *               <enumeration value="oss"/>
+ *               <enumeration value="ota"/>
+ *               <enumeration value="oto"/>
+ *               <enumeration value="paa"/>
+ *               <enumeration value="pag"/>
+ *               <enumeration value="pal"/>
+ *               <enumeration value="pam"/>
+ *               <enumeration value="pan"/>
+ *               <enumeration value="pap"/>
+ *               <enumeration value="pau"/>
+ *               <enumeration value="peo"/>
+ *               <enumeration value="per"/>
+ *               <enumeration value="phi"/>
+ *               <enumeration value="phn"/>
+ *               <enumeration value="pli"/>
+ *               <enumeration value="pol"/>
+ *               <enumeration value="pon"/>
+ *               <enumeration value="por"/>
+ *               <enumeration value="pra"/>
+ *               <enumeration value="pro"/>
+ *               <enumeration value="pus"/>
+ *               <enumeration value="qaa-qtz"/>
+ *               <enumeration value="que"/>
+ *               <enumeration value="raj"/>
+ *               <enumeration value="rap"/>
+ *               <enumeration value="rar"/>
+ *               <enumeration value="roa"/>
+ *               <enumeration value="roh"/>
+ *               <enumeration value="rom"/>
+ *               <enumeration value="rum"/>
+ *               <enumeration value="run"/>
+ *               <enumeration value="rup"/>
+ *               <enumeration value="rus"/>
+ *               <enumeration value="sad"/>
+ *               <enumeration value="sag"/>
+ *               <enumeration value="sah"/>
+ *               <enumeration value="sai"/>
+ *               <enumeration value="sal"/>
+ *               <enumeration value="sam"/>
+ *               <enumeration value="san"/>
+ *               <enumeration value="sas"/>
+ *               <enumeration value="sat"/>
+ *               <enumeration value="scn"/>
+ *               <enumeration value="sco"/>
+ *               <enumeration value="sel"/>
+ *               <enumeration value="sem"/>
+ *               <enumeration value="sga"/>
+ *               <enumeration value="sgn"/>
+ *               <enumeration value="shn"/>
+ *               <enumeration value="sid"/>
+ *               <enumeration value="sin"/>
+ *               <enumeration value="sio"/>
+ *               <enumeration value="sit"/>
+ *               <enumeration value="sla"/>
+ *               <enumeration value="slo"/>
+ *               <enumeration value="slv"/>
+ *               <enumeration value="sma"/>
+ *               <enumeration value="sme"/>
+ *               <enumeration value="smi"/>
+ *               <enumeration value="smj"/>
+ *               <enumeration value="smn"/>
+ *               <enumeration value="smo"/>
+ *               <enumeration value="sms"/>
+ *               <enumeration value="sna"/>
+ *               <enumeration value="snd"/>
+ *               <enumeration value="snk"/>
+ *               <enumeration value="sog"/>
+ *               <enumeration value="som"/>
+ *               <enumeration value="son"/>
+ *               <enumeration value="sot"/>
+ *               <enumeration value="spa"/>
+ *               <enumeration value="srd"/>
+ *               <enumeration value="srn"/>
+ *               <enumeration value="srp"/>
+ *               <enumeration value="srr"/>
+ *               <enumeration value="ssa"/>
+ *               <enumeration value="ssw"/>
+ *               <enumeration value="suk"/>
+ *               <enumeration value="sun"/>
+ *               <enumeration value="sus"/>
+ *               <enumeration value="sux"/>
+ *               <enumeration value="swa"/>
+ *               <enumeration value="swe"/>
+ *               <enumeration value="syc"/>
+ *               <enumeration value="syr"/>
+ *               <enumeration value="tah"/>
+ *               <enumeration value="tai"/>
+ *               <enumeration value="tam"/>
+ *               <enumeration value="tat"/>
+ *               <enumeration value="tel"/>
+ *               <enumeration value="tem"/>
+ *               <enumeration value="ter"/>
+ *               <enumeration value="tet"/>
+ *               <enumeration value="tgk"/>
+ *               <enumeration value="tgl"/>
+ *               <enumeration value="tha"/>
+ *               <enumeration value="tib"/>
+ *               <enumeration value="tig"/>
+ *               <enumeration value="tir"/>
+ *               <enumeration value="tiv"/>
+ *               <enumeration value="tkl"/>
+ *               <enumeration value="tlh"/>
+ *               <enumeration value="tli"/>
+ *               <enumeration value="tmh"/>
+ *               <enumeration value="tog"/>
+ *               <enumeration value="ton"/>
+ *               <enumeration value="tpi"/>
+ *               <enumeration value="tsi"/>
+ *               <enumeration value="tsn"/>
+ *               <enumeration value="tso"/>
+ *               <enumeration value="tuk"/>
+ *               <enumeration value="tum"/>
+ *               <enumeration value="tup"/>
+ *               <enumeration value="tur"/>
+ *               <enumeration value="tut"/>
+ *               <enumeration value="tvl"/>
+ *               <enumeration value="twi"/>
+ *               <enumeration value="tyv"/>
+ *               <enumeration value="udm"/>
+ *               <enumeration value="uga"/>
+ *               <enumeration value="uig"/>
+ *               <enumeration value="ukr"/>
+ *               <enumeration value="umb"/>
+ *               <enumeration value="und"/>
+ *               <enumeration value="urd"/>
+ *               <enumeration value="uzb"/>
+ *               <enumeration value="vai"/>
+ *               <enumeration value="ven"/>
+ *               <enumeration value="vie"/>
+ *               <enumeration value="vol"/>
+ *               <enumeration value="vot"/>
+ *               <enumeration value="wak"/>
+ *               <enumeration value="wal"/>
+ *               <enumeration value="war"/>
+ *               <enumeration value="was"/>
+ *               <enumeration value="wel"/>
+ *               <enumeration value="wen"/>
+ *               <enumeration value="wln"/>
+ *               <enumeration value="wol"/>
+ *               <enumeration value="xal"/>
+ *               <enumeration value="xho"/>
+ *               <enumeration value="yao"/>
+ *               <enumeration value="yap"/>
+ *               <enumeration value="yid"/>
+ *               <enumeration value="yor"/>
+ *               <enumeration value="ypk"/>
+ *               <enumeration value="zap"/>
+ *               <enumeration value="zbl"/>
+ *               <enumeration value="zen"/>
+ *               <enumeration value="zgh"/>
+ *               <enumeration value="zha"/>
+ *               <enumeration value="znd"/>
+ *               <enumeration value="zul"/>
+ *               <enumeration value="zun"/>
+ *               <enumeration value="zxx"/>
+ *               <enumeration value="zza"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LanguagesType", propOrder = { + "language" +}) +public class LanguagesType { + + @XmlElement(name = "Language", required = true) + protected List language; + + /** + * Gets the value of the language property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the language property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getLanguage().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getLanguage() { + if (language == null) { + language = new ArrayList(); + } + return this.language; + } + +} diff --git a/CICMMetadata/java/generated/LayeredTextType.java b/CICMMetadata/java/generated/LayeredTextType.java new file mode 100644 index 0000000..cb452be --- /dev/null +++ b/CICMMetadata/java/generated/LayeredTextType.java @@ -0,0 +1,100 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + *

Clase Java para LayeredTextType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="LayeredTextType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ *       <attribute name="layer">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}unsignedInt">
+ *             <minInclusive value="0"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LayeredTextType", propOrder = { + "value" +}) +public class LayeredTextType { + + @XmlValue + protected String value; + @XmlAttribute(name = "layer") + protected Long layer; + + /** + * Obtiene el valor de la propiedad value. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Define el valor de la propiedad value. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Obtiene el valor de la propiedad layer. + * + * @return + * possible object is + * {@link Long } + * + */ + public Long getLayer() { + return layer; + } + + /** + * Define el valor de la propiedad layer. + * + * @param value + * allowed object is + * {@link Long } + * + */ + public void setLayer(Long value) { + this.layer = value; + } + +} diff --git a/CICMMetadata/java/generated/LayersType.java b/CICMMetadata/java/generated/LayersType.java new file mode 100644 index 0000000..fea8757 --- /dev/null +++ b/CICMMetadata/java/generated/LayersType.java @@ -0,0 +1,111 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para LayersType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="LayersType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Sectors" type="{}SectorsType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *       <attribute name="type">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *             <enumeration value="PTP"/>
+ *             <enumeration value="OTP"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LayersType", propOrder = { + "sectors" +}) +public class LayersType { + + @XmlElement(name = "Sectors", required = true) + protected List sectors; + @XmlAttribute(name = "type") + protected String type; + + /** + * Gets the value of the sectors property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the sectors property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSectors().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link SectorsType } + * + * + */ + public List getSectors() { + if (sectors == null) { + sectors = new ArrayList(); + } + return this.sectors; + } + + /** + * Obtiene el valor de la propiedad type. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Define el valor de la propiedad type. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + +} diff --git a/CICMMetadata/java/generated/LinearMediaType.java b/CICMMetadata/java/generated/LinearMediaType.java new file mode 100644 index 0000000..95998da --- /dev/null +++ b/CICMMetadata/java/generated/LinearMediaType.java @@ -0,0 +1,583 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + * Describes a dump of a linear media, that is, a media that is read byte-by-byte like for + * example, a ROM chip, a game cartridge, a PCMCIA SRAM card, etc... + * + * + *

Clase Java para LinearMediaType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="LinearMediaType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Image" type="{}ImageType"/>
+ *         <element name="Size" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="ImageChecksums" type="{}ChecksumsType"/>
+ *         <element name="Checksums" type="{}ChecksumsType" minOccurs="0"/>
+ *         <element name="PartNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="SerialNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Title" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Sequence" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/>
+ *         <element name="ImageInterleave" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/>
+ *         <element name="Interleave" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/>
+ *         <element name="Manufacturer" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Model" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Package" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Interface" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Dimensions" type="{}DimensionsType" minOccurs="0"/>
+ *         <element name="Scans" type="{}ScansType" minOccurs="0"/>
+ *         <element name="DumpHardwareArray" type="{}DumpHardwareArrayType" minOccurs="0"/>
+ *         <element name="PCMCIA" type="{}PCMCIAType" minOccurs="0"/>
+ *         <element name="CopyProtection" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "LinearMediaType", propOrder = { + "image", + "size", + "imageChecksums", + "checksums", + "partNumber", + "serialNumber", + "title", + "sequence", + "imageInterleave", + "interleave", + "manufacturer", + "model", + "_package", + "_interface", + "dimensions", + "scans", + "dumpHardwareArray", + "pcmcia", + "copyProtection" +}) +public class LinearMediaType { + + @XmlElement(name = "Image", required = true) + protected ImageType image; + @XmlElement(name = "Size", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger size; + @XmlElement(name = "ImageChecksums", required = true) + protected ChecksumsType imageChecksums; + @XmlElement(name = "Checksums") + protected ChecksumsType checksums; + @XmlElement(name = "PartNumber") + protected String partNumber; + @XmlElement(name = "SerialNumber") + protected String serialNumber; + @XmlElement(name = "Title", required = true) + protected String title; + @XmlElement(name = "Sequence") + @XmlSchemaType(name = "unsignedInt") + protected Long sequence; + @XmlElement(name = "ImageInterleave") + @XmlSchemaType(name = "unsignedInt") + protected Long imageInterleave; + @XmlElement(name = "Interleave") + @XmlSchemaType(name = "unsignedInt") + protected Long interleave; + @XmlElement(name = "Manufacturer") + protected String manufacturer; + @XmlElement(name = "Model") + protected String model; + @XmlElement(name = "Package", required = true) + protected String _package; + @XmlElement(name = "Interface") + protected String _interface; + @XmlElement(name = "Dimensions") + protected DimensionsType dimensions; + @XmlElement(name = "Scans") + protected ScansType scans; + @XmlElement(name = "DumpHardwareArray") + protected DumpHardwareArrayType dumpHardwareArray; + @XmlElement(name = "PCMCIA") + protected PCMCIAType pcmcia; + @XmlElement(name = "CopyProtection") + protected String copyProtection; + + /** + * Obtiene el valor de la propiedad image. + * + * @return + * possible object is + * {@link ImageType } + * + */ + public ImageType getImage() { + return image; + } + + /** + * Define el valor de la propiedad image. + * + * @param value + * allowed object is + * {@link ImageType } + * + */ + public void setImage(ImageType value) { + this.image = value; + } + + /** + * Obtiene el valor de la propiedad size. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSize() { + return size; + } + + /** + * Define el valor de la propiedad size. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSize(BigInteger value) { + this.size = value; + } + + /** + * Obtiene el valor de la propiedad imageChecksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getImageChecksums() { + return imageChecksums; + } + + /** + * Define el valor de la propiedad imageChecksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setImageChecksums(ChecksumsType value) { + this.imageChecksums = value; + } + + /** + * Obtiene el valor de la propiedad checksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getChecksums() { + return checksums; + } + + /** + * Define el valor de la propiedad checksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setChecksums(ChecksumsType value) { + this.checksums = value; + } + + /** + * Obtiene el valor de la propiedad partNumber. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPartNumber() { + return partNumber; + } + + /** + * Define el valor de la propiedad partNumber. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPartNumber(String value) { + this.partNumber = value; + } + + /** + * Obtiene el valor de la propiedad serialNumber. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSerialNumber() { + return serialNumber; + } + + /** + * Define el valor de la propiedad serialNumber. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSerialNumber(String value) { + this.serialNumber = value; + } + + /** + * Obtiene el valor de la propiedad title. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTitle() { + return title; + } + + /** + * Define el valor de la propiedad title. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTitle(String value) { + this.title = value; + } + + /** + * Obtiene el valor de la propiedad sequence. + * + * @return + * possible object is + * {@link Long } + * + */ + public Long getSequence() { + return sequence; + } + + /** + * Define el valor de la propiedad sequence. + * + * @param value + * allowed object is + * {@link Long } + * + */ + public void setSequence(Long value) { + this.sequence = value; + } + + /** + * Obtiene el valor de la propiedad imageInterleave. + * + * @return + * possible object is + * {@link Long } + * + */ + public Long getImageInterleave() { + return imageInterleave; + } + + /** + * Define el valor de la propiedad imageInterleave. + * + * @param value + * allowed object is + * {@link Long } + * + */ + public void setImageInterleave(Long value) { + this.imageInterleave = value; + } + + /** + * Obtiene el valor de la propiedad interleave. + * + * @return + * possible object is + * {@link Long } + * + */ + public Long getInterleave() { + return interleave; + } + + /** + * Define el valor de la propiedad interleave. + * + * @param value + * allowed object is + * {@link Long } + * + */ + public void setInterleave(Long value) { + this.interleave = value; + } + + /** + * Obtiene el valor de la propiedad manufacturer. + * + * @return + * possible object is + * {@link String } + * + */ + public String getManufacturer() { + return manufacturer; + } + + /** + * Define el valor de la propiedad manufacturer. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setManufacturer(String value) { + this.manufacturer = value; + } + + /** + * Obtiene el valor de la propiedad model. + * + * @return + * possible object is + * {@link String } + * + */ + public String getModel() { + return model; + } + + /** + * Define el valor de la propiedad model. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setModel(String value) { + this.model = value; + } + + /** + * Obtiene el valor de la propiedad package. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPackage() { + return _package; + } + + /** + * Define el valor de la propiedad package. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPackage(String value) { + this._package = value; + } + + /** + * Obtiene el valor de la propiedad interface. + * + * @return + * possible object is + * {@link String } + * + */ + public String getInterface() { + return _interface; + } + + /** + * Define el valor de la propiedad interface. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setInterface(String value) { + this._interface = value; + } + + /** + * Obtiene el valor de la propiedad dimensions. + * + * @return + * possible object is + * {@link DimensionsType } + * + */ + public DimensionsType getDimensions() { + return dimensions; + } + + /** + * Define el valor de la propiedad dimensions. + * + * @param value + * allowed object is + * {@link DimensionsType } + * + */ + public void setDimensions(DimensionsType value) { + this.dimensions = value; + } + + /** + * Obtiene el valor de la propiedad scans. + * + * @return + * possible object is + * {@link ScansType } + * + */ + public ScansType getScans() { + return scans; + } + + /** + * Define el valor de la propiedad scans. + * + * @param value + * allowed object is + * {@link ScansType } + * + */ + public void setScans(ScansType value) { + this.scans = value; + } + + /** + * Obtiene el valor de la propiedad dumpHardwareArray. + * + * @return + * possible object is + * {@link DumpHardwareArrayType } + * + */ + public DumpHardwareArrayType getDumpHardwareArray() { + return dumpHardwareArray; + } + + /** + * Define el valor de la propiedad dumpHardwareArray. + * + * @param value + * allowed object is + * {@link DumpHardwareArrayType } + * + */ + public void setDumpHardwareArray(DumpHardwareArrayType value) { + this.dumpHardwareArray = value; + } + + /** + * Obtiene el valor de la propiedad pcmcia. + * + * @return + * possible object is + * {@link PCMCIAType } + * + */ + public PCMCIAType getPCMCIA() { + return pcmcia; + } + + /** + * Define el valor de la propiedad pcmcia. + * + * @param value + * allowed object is + * {@link PCMCIAType } + * + */ + public void setPCMCIA(PCMCIAType value) { + this.pcmcia = value; + } + + /** + * Obtiene el valor de la propiedad copyProtection. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCopyProtection() { + return copyProtection; + } + + /** + * Define el valor de la propiedad copyProtection. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCopyProtection(String value) { + this.copyProtection = value; + } + +} diff --git a/CICMMetadata/java/generated/MagazineType.java b/CICMMetadata/java/generated/MagazineType.java new file mode 100644 index 0000000..3d4f9fd --- /dev/null +++ b/CICMMetadata/java/generated/MagazineType.java @@ -0,0 +1,326 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Clase Java para MagazineType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="MagazineType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Barcodes" type="{}BarcodesType" minOccurs="0"/>
+ *         <element name="Cover" type="{}CoverType" minOccurs="0"/>
+ *         <element name="Name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Editorial" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="PublicationDate" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
+ *         <element name="Number" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/>
+ *         <element name="Language" type="{}LanguagesType" minOccurs="0"/>
+ *         <element name="Pages" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/>
+ *         <element name="PageSize" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Scan" type="{}ScanType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MagazineType", propOrder = { + "barcodes", + "cover", + "name", + "editorial", + "publicationDate", + "number", + "language", + "pages", + "pageSize", + "scan" +}) +public class MagazineType { + + @XmlElement(name = "Barcodes") + protected BarcodesType barcodes; + @XmlElement(name = "Cover") + protected CoverType cover; + @XmlElement(name = "Name", required = true) + protected String name; + @XmlElement(name = "Editorial") + protected String editorial; + @XmlElement(name = "PublicationDate") + @XmlSchemaType(name = "date") + protected XMLGregorianCalendar publicationDate; + @XmlElement(name = "Number") + @XmlSchemaType(name = "unsignedInt") + protected Long number; + @XmlElement(name = "Language") + protected LanguagesType language; + @XmlElement(name = "Pages") + @XmlSchemaType(name = "unsignedInt") + protected Long pages; + @XmlElement(name = "PageSize") + protected String pageSize; + @XmlElement(name = "Scan") + protected ScanType scan; + + /** + * Obtiene el valor de la propiedad barcodes. + * + * @return + * possible object is + * {@link BarcodesType } + * + */ + public BarcodesType getBarcodes() { + return barcodes; + } + + /** + * Define el valor de la propiedad barcodes. + * + * @param value + * allowed object is + * {@link BarcodesType } + * + */ + public void setBarcodes(BarcodesType value) { + this.barcodes = value; + } + + /** + * Obtiene el valor de la propiedad cover. + * + * @return + * possible object is + * {@link CoverType } + * + */ + public CoverType getCover() { + return cover; + } + + /** + * Define el valor de la propiedad cover. + * + * @param value + * allowed object is + * {@link CoverType } + * + */ + public void setCover(CoverType value) { + this.cover = value; + } + + /** + * Obtiene el valor de la propiedad name. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Define el valor de la propiedad name. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Obtiene el valor de la propiedad editorial. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEditorial() { + return editorial; + } + + /** + * Define el valor de la propiedad editorial. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEditorial(String value) { + this.editorial = value; + } + + /** + * Obtiene el valor de la propiedad publicationDate. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getPublicationDate() { + return publicationDate; + } + + /** + * Define el valor de la propiedad publicationDate. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setPublicationDate(XMLGregorianCalendar value) { + this.publicationDate = value; + } + + /** + * Obtiene el valor de la propiedad number. + * + * @return + * possible object is + * {@link Long } + * + */ + public Long getNumber() { + return number; + } + + /** + * Define el valor de la propiedad number. + * + * @param value + * allowed object is + * {@link Long } + * + */ + public void setNumber(Long value) { + this.number = value; + } + + /** + * Obtiene el valor de la propiedad language. + * + * @return + * possible object is + * {@link LanguagesType } + * + */ + public LanguagesType getLanguage() { + return language; + } + + /** + * Define el valor de la propiedad language. + * + * @param value + * allowed object is + * {@link LanguagesType } + * + */ + public void setLanguage(LanguagesType value) { + this.language = value; + } + + /** + * Obtiene el valor de la propiedad pages. + * + * @return + * possible object is + * {@link Long } + * + */ + public Long getPages() { + return pages; + } + + /** + * Define el valor de la propiedad pages. + * + * @param value + * allowed object is + * {@link Long } + * + */ + public void setPages(Long value) { + this.pages = value; + } + + /** + * Obtiene el valor de la propiedad pageSize. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPageSize() { + return pageSize; + } + + /** + * Define el valor de la propiedad pageSize. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPageSize(String value) { + this.pageSize = value; + } + + /** + * Obtiene el valor de la propiedad scan. + * + * @return + * possible object is + * {@link ScanType } + * + */ + public ScanType getScan() { + return scan; + } + + /** + * Define el valor de la propiedad scan. + * + * @param value + * allowed object is + * {@link ScanType } + * + */ + public void setScan(ScanType value) { + this.scan = value; + } + +} diff --git a/CICMMetadata/java/generated/MediaScanType.java b/CICMMetadata/java/generated/MediaScanType.java new file mode 100644 index 0000000..3fb4213 --- /dev/null +++ b/CICMMetadata/java/generated/MediaScanType.java @@ -0,0 +1,108 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para MediaScanType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="MediaScanType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MediaScanElement">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *               <enumeration value="up"/>
+ *               <enumeration value="down"/>
+ *               <enumeration value="front"/>
+ *               <enumeration value="back"/>
+ *               <enumeration value="left"/>
+ *               <enumeration value="right"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *         <element name="Scan" type="{}ScanType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MediaScanType", propOrder = { + "mediaScanElement", + "scan" +}) +public class MediaScanType { + + @XmlElement(name = "MediaScanElement", required = true) + protected String mediaScanElement; + @XmlElement(name = "Scan", required = true) + protected ScanType scan; + + /** + * Obtiene el valor de la propiedad mediaScanElement. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMediaScanElement() { + return mediaScanElement; + } + + /** + * Define el valor de la propiedad mediaScanElement. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMediaScanElement(String value) { + this.mediaScanElement = value; + } + + /** + * Obtiene el valor de la propiedad scan. + * + * @return + * possible object is + * {@link ScanType } + * + */ + public ScanType getScan() { + return scan; + } + + /** + * Define el valor de la propiedad scan. + * + * @param value + * allowed object is + * {@link ScanType } + * + */ + public void setScan(ScanType value) { + this.scan = value; + } + +} diff --git a/CICMMetadata/java/generated/MultiMediaCardType.java b/CICMMetadata/java/generated/MultiMediaCardType.java new file mode 100644 index 0000000..e5d73d5 --- /dev/null +++ b/CICMMetadata/java/generated/MultiMediaCardType.java @@ -0,0 +1,155 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Contains MultiMediaCard device information + * + *

Clase Java para MultiMediaCardType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="MultiMediaCardType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CID" type="{}DumpType"/>
+ *         <element name="CSD" type="{}DumpType" minOccurs="0"/>
+ *         <element name="ExtendedCSD" type="{}DumpType" minOccurs="0"/>
+ *         <element name="OCR" type="{}DumpType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "MultiMediaCardType", propOrder = { + "cid", + "csd", + "extendedCSD", + "ocr" +}) +public class MultiMediaCardType { + + @XmlElement(name = "CID", required = true) + protected DumpType cid; + @XmlElement(name = "CSD") + protected DumpType csd; + @XmlElement(name = "ExtendedCSD") + protected DumpType extendedCSD; + @XmlElement(name = "OCR") + protected DumpType ocr; + + /** + * Obtiene el valor de la propiedad cid. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getCID() { + return cid; + } + + /** + * Define el valor de la propiedad cid. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setCID(DumpType value) { + this.cid = value; + } + + /** + * Obtiene el valor de la propiedad csd. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getCSD() { + return csd; + } + + /** + * Define el valor de la propiedad csd. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setCSD(DumpType value) { + this.csd = value; + } + + /** + * Obtiene el valor de la propiedad extendedCSD. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getExtendedCSD() { + return extendedCSD; + } + + /** + * Define el valor de la propiedad extendedCSD. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setExtendedCSD(DumpType value) { + this.extendedCSD = value; + } + + /** + * Obtiene el valor de la propiedad ocr. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getOCR() { + return ocr; + } + + /** + * Define el valor de la propiedad ocr. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setOCR(DumpType value) { + this.ocr = value; + } + +} diff --git a/CICMMetadata/java/generated/OCRType.java b/CICMMetadata/java/generated/OCRType.java new file mode 100644 index 0000000..f98aabf --- /dev/null +++ b/CICMMetadata/java/generated/OCRType.java @@ -0,0 +1,153 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para OCRType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="OCRType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Author" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Software" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="SoftwareVersion" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Language" type="{}LanguagesType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "OCRType", propOrder = { + "author", + "software", + "softwareVersion", + "language" +}) +public class OCRType { + + @XmlElement(name = "Author", required = true) + protected String author; + @XmlElement(name = "Software", required = true) + protected String software; + @XmlElement(name = "SoftwareVersion", required = true) + protected String softwareVersion; + @XmlElement(name = "Language", required = true) + protected LanguagesType language; + + /** + * Obtiene el valor de la propiedad author. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAuthor() { + return author; + } + + /** + * Define el valor de la propiedad author. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAuthor(String value) { + this.author = value; + } + + /** + * Obtiene el valor de la propiedad software. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSoftware() { + return software; + } + + /** + * Define el valor de la propiedad software. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSoftware(String value) { + this.software = value; + } + + /** + * Obtiene el valor de la propiedad softwareVersion. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSoftwareVersion() { + return softwareVersion; + } + + /** + * Define el valor de la propiedad softwareVersion. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSoftwareVersion(String value) { + this.softwareVersion = value; + } + + /** + * Obtiene el valor de la propiedad language. + * + * @return + * possible object is + * {@link LanguagesType } + * + */ + public LanguagesType getLanguage() { + return language; + } + + /** + * Define el valor de la propiedad language. + * + * @param value + * allowed object is + * {@link LanguagesType } + * + */ + public void setLanguage(LanguagesType value) { + this.language = value; + } + +} diff --git a/CICMMetadata/java/generated/ObjectFactory.java b/CICMMetadata/java/generated/ObjectFactory.java new file mode 100644 index 0000000..3659c13 --- /dev/null +++ b/CICMMetadata/java/generated/ObjectFactory.java @@ -0,0 +1,716 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the generated package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _CICMMetadata_QNAME = new QName("", "CICMMetadata"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: generated + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link CICMMetadataType } + * + */ + public CICMMetadataType createCICMMetadataType() { + return new CICMMetadataType(); + } + + /** + * Create an instance of {@link VideoTracksType } + * + */ + public VideoTracksType createVideoTracksType() { + return new VideoTracksType(); + } + + /** + * Create an instance of {@link CoverType } + * + */ + public CoverType createCoverType() { + return new CoverType(); + } + + /** + * Create an instance of {@link ExtentsType } + * + */ + public ExtentsType createExtentsType() { + return new ExtentsType(); + } + + /** + * Create an instance of {@link FileSystemInformationType } + * + */ + public FileSystemInformationType createFileSystemInformationType() { + return new FileSystemInformationType(); + } + + /** + * Create an instance of {@link SecuritySectorsType } + * + */ + public SecuritySectorsType createSecuritySectorsType() { + return new SecuritySectorsType(); + } + + /** + * Create an instance of {@link DumpHardwareType } + * + */ + public DumpHardwareType createDumpHardwareType() { + return new DumpHardwareType(); + } + + /** + * Create an instance of {@link ArchitecturesType } + * + */ + public ArchitecturesType createArchitecturesType() { + return new ArchitecturesType(); + } + + /** + * Create an instance of {@link FileSystemsType } + * + */ + public FileSystemsType createFileSystemsType() { + return new FileSystemsType(); + } + + /** + * Create an instance of {@link ChecksumType } + * + */ + public ChecksumType createChecksumType() { + return new ChecksumType(); + } + + /** + * Create an instance of {@link SoftwareType } + * + */ + public SoftwareType createSoftwareType() { + return new SoftwareType(); + } + + /** + * Create an instance of {@link ImageType } + * + */ + public ImageType createImageType() { + return new ImageType(); + } + + /** + * Create an instance of {@link SubtitleTracksType } + * + */ + public SubtitleTracksType createSubtitleTracksType() { + return new SubtitleTracksType(); + } + + /** + * Create an instance of {@link DirectoryType } + * + */ + public DirectoryType createDirectoryType() { + return new DirectoryType(); + } + + /** + * Create an instance of {@link TrackIndexesType } + * + */ + public TrackIndexesType createTrackIndexesType() { + return new TrackIndexesType(); + } + + /** + * Create an instance of {@link DumpHardwareArrayType } + * + */ + public DumpHardwareArrayType createDumpHardwareArrayType() { + return new DumpHardwareArrayType(); + } + + /** + * Create an instance of {@link SubChannelType } + * + */ + public SubChannelType createSubChannelType() { + return new SubChannelType(); + } + + /** + * Create an instance of {@link MediaScanType } + * + */ + public MediaScanType createMediaScanType() { + return new MediaScanType(); + } + + /** + * Create an instance of {@link SCSIType } + * + */ + public SCSIType createSCSIType() { + return new SCSIType(); + } + + /** + * Create an instance of {@link ScanProcessingType } + * + */ + public ScanProcessingType createScanProcessingType() { + return new ScanProcessingType(); + } + + /** + * Create an instance of {@link RecordingType } + * + */ + public RecordingType createRecordingType() { + return new RecordingType(); + } + + /** + * Create an instance of {@link LinearMediaType } + * + */ + public LinearMediaType createLinearMediaType() { + return new LinearMediaType(); + } + + /** + * Create an instance of {@link FilesystemContentsType } + * + */ + public FilesystemContentsType createFilesystemContentsType() { + return new FilesystemContentsType(); + } + + /** + * Create an instance of {@link RequiredOperatingSystemType } + * + */ + public RequiredOperatingSystemType createRequiredOperatingSystemType() { + return new RequiredOperatingSystemType(); + } + + /** + * Create an instance of {@link RequiredOperatingSystemsType } + * + */ + public RequiredOperatingSystemsType createRequiredOperatingSystemsType() { + return new RequiredOperatingSystemsType(); + } + + /** + * Create an instance of {@link SecureDigitalType } + * + */ + public SecureDigitalType createSecureDigitalType() { + return new SecureDigitalType(); + } + + /** + * Create an instance of {@link TapeInformationType } + * + */ + public TapeInformationType createTapeInformationType() { + return new TapeInformationType(); + } + + /** + * Create an instance of {@link TrackIndexType } + * + */ + public TrackIndexType createTrackIndexType() { + return new TrackIndexType(); + } + + /** + * Create an instance of {@link VariableBlockSizeType } + * + */ + public VariableBlockSizeType createVariableBlockSizeType() { + return new VariableBlockSizeType(); + } + + /** + * Create an instance of {@link BlockTrackType } + * + */ + public BlockTrackType createBlockTrackType() { + return new BlockTrackType(); + } + + /** + * Create an instance of {@link SystemsType } + * + */ + public SystemsType createSystemsType() { + return new SystemsType(); + } + + /** + * Create an instance of {@link TrackSequenceType } + * + */ + public TrackSequenceType createTrackSequenceType() { + return new TrackSequenceType(); + } + + /** + * Create an instance of {@link TapePartitionType } + * + */ + public TapePartitionType createTapePartitionType() { + return new TapePartitionType(); + } + + /** + * Create an instance of {@link PartitionType } + * + */ + public PartitionType createPartitionType() { + return new PartitionType(); + } + + /** + * Create an instance of {@link CaseScanType } + * + */ + public CaseScanType createCaseScanType() { + return new CaseScanType(); + } + + /** + * Create an instance of {@link TapeFileType } + * + */ + public TapeFileType createTapeFileType() { + return new TapeFileType(); + } + + /** + * Create an instance of {@link ScanType } + * + */ + public ScanType createScanType() { + return new ScanType(); + } + + /** + * Create an instance of {@link KeywordsType } + * + */ + public KeywordsType createKeywordsType() { + return new KeywordsType(); + } + + /** + * Create an instance of {@link BookType } + * + */ + public BookType createBookType() { + return new BookType(); + } + + /** + * Create an instance of {@link SubcategoriesType } + * + */ + public SubcategoriesType createSubcategoriesType() { + return new SubcategoriesType(); + } + + /** + * Create an instance of {@link CaseType } + * + */ + public CaseType createCaseType() { + return new CaseType(); + } + + /** + * Create an instance of {@link MagazineType } + * + */ + public MagazineType createMagazineType() { + return new MagazineType(); + } + + /** + * Create an instance of {@link DumpType } + * + */ + public DumpType createDumpType() { + return new DumpType(); + } + + /** + * Create an instance of {@link TrackFlagsType } + * + */ + public TrackFlagsType createTrackFlagsType() { + return new TrackFlagsType(); + } + + /** + * Create an instance of {@link LayersType } + * + */ + public LayersType createLayersType() { + return new LayersType(); + } + + /** + * Create an instance of {@link CategoriesType } + * + */ + public CategoriesType createCategoriesType() { + return new CategoriesType(); + } + + /** + * Create an instance of {@link BarcodeType } + * + */ + public BarcodeType createBarcodeType() { + return new BarcodeType(); + } + + /** + * Create an instance of {@link BorderType } + * + */ + public BorderType createBorderType() { + return new BorderType(); + } + + /** + * Create an instance of {@link ATAType } + * + */ + public ATAType createATAType() { + return new ATAType(); + } + + /** + * Create an instance of {@link LanguagesType } + * + */ + public LanguagesType createLanguagesType() { + return new LanguagesType(); + } + + /** + * Create an instance of {@link ChecksumsType } + * + */ + public ChecksumsType createChecksumsType() { + return new ChecksumsType(); + } + + /** + * Create an instance of {@link ScannerType } + * + */ + public ScannerType createScannerType() { + return new ScannerType(); + } + + /** + * Create an instance of {@link SequenceType } + * + */ + public SequenceType createSequenceType() { + return new SequenceType(); + } + + /** + * Create an instance of {@link EVPDType } + * + */ + public EVPDType createEVPDType() { + return new EVPDType(); + } + + /** + * Create an instance of {@link BlockSizeType } + * + */ + public BlockSizeType createBlockSizeType() { + return new BlockSizeType(); + } + + /** + * Create an instance of {@link OpticalDiscType } + * + */ + public OpticalDiscType createOpticalDiscType() { + return new OpticalDiscType(); + } + + /** + * Create an instance of {@link OCRType } + * + */ + public OCRType createOCRType() { + return new OCRType(); + } + + /** + * Create an instance of {@link ExtentType } + * + */ + public ExtentType createExtentType() { + return new ExtentType(); + } + + /** + * Create an instance of {@link ExtendedAttributeType } + * + */ + public ExtendedAttributeType createExtendedAttributeType() { + return new ExtendedAttributeType(); + } + + /** + * Create an instance of {@link XboxSecuritySectorsType } + * + */ + public XboxSecuritySectorsType createXboxSecuritySectorsType() { + return new XboxSecuritySectorsType(); + } + + /** + * Create an instance of {@link PCMCIAType } + * + */ + public PCMCIAType createPCMCIAType() { + return new PCMCIAType(); + } + + /** + * Create an instance of {@link ScansType } + * + */ + public ScansType createScansType() { + return new ScansType(); + } + + /** + * Create an instance of {@link PCIType } + * + */ + public PCIType createPCIType() { + return new PCIType(); + } + + /** + * Create an instance of {@link USBType } + * + */ + public USBType createUSBType() { + return new USBType(); + } + + /** + * Create an instance of {@link MultiMediaCardType } + * + */ + public MultiMediaCardType createMultiMediaCardType() { + return new MultiMediaCardType(); + } + + /** + * Create an instance of {@link UserManualType } + * + */ + public UserManualType createUserManualType() { + return new UserManualType(); + } + + /** + * Create an instance of {@link AdvertisementType } + * + */ + public AdvertisementType createAdvertisementType() { + return new AdvertisementType(); + } + + /** + * Create an instance of {@link BarcodesType } + * + */ + public BarcodesType createBarcodesType() { + return new BarcodesType(); + } + + /** + * Create an instance of {@link AudioMediaType } + * + */ + public AudioMediaType createAudioMediaType() { + return new AudioMediaType(); + } + + /** + * Create an instance of {@link ExtendedAttributesType } + * + */ + public ExtendedAttributesType createExtendedAttributesType() { + return new ExtendedAttributesType(); + } + + /** + * Create an instance of {@link CoordinatesType } + * + */ + public CoordinatesType createCoordinatesType() { + return new CoordinatesType(); + } + + /** + * Create an instance of {@link ContentsFileType } + * + */ + public ContentsFileType createContentsFileType() { + return new ContentsFileType(); + } + + /** + * Create an instance of {@link SectorsType } + * + */ + public SectorsType createSectorsType() { + return new SectorsType(); + } + + /** + * Create an instance of {@link AudioTracksType } + * + */ + public AudioTracksType createAudioTracksType() { + return new AudioTracksType(); + } + + /** + * Create an instance of {@link LayeredTextType } + * + */ + public LayeredTextType createLayeredTextType() { + return new LayeredTextType(); + } + + /** + * Create an instance of {@link BlockMediaType } + * + */ + public BlockMediaType createBlockMediaType() { + return new BlockMediaType(); + } + + /** + * Create an instance of {@link FileType } + * + */ + public FileType createFileType() { + return new FileType(); + } + + /** + * Create an instance of {@link DimensionsType } + * + */ + public DimensionsType createDimensionsType() { + return new DimensionsType(); + } + + /** + * Create an instance of {@link TrackType } + * + */ + public TrackType createTrackType() { + return new TrackType(); + } + + /** + * Create an instance of {@link FileSystemType } + * + */ + public FileSystemType createFileSystemType() { + return new FileSystemType(); + } + + /** + * Create an instance of {@link XboxType } + * + */ + public XboxType createXboxType() { + return new XboxType(); + } + + /** + * Create an instance of {@link PS3EncryptionType } + * + */ + public PS3EncryptionType createPS3EncryptionType() { + return new PS3EncryptionType(); + } + + /** + * Create an instance of {@link AudioBlockType } + * + */ + public AudioBlockType createAudioBlockType() { + return new AudioBlockType(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link CICMMetadataType }{@code >}} + * + */ + @XmlElementDecl(namespace = "", name = "CICMMetadata") + public JAXBElement createCICMMetadata(CICMMetadataType value) { + return new JAXBElement(_CICMMetadata_QNAME, CICMMetadataType.class, null, value); + } + +} diff --git a/CICMMetadata/java/generated/OpticalDiscType.java b/CICMMetadata/java/generated/OpticalDiscType.java new file mode 100644 index 0000000..4084b01 --- /dev/null +++ b/CICMMetadata/java/generated/OpticalDiscType.java @@ -0,0 +1,1406 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para OpticalDiscType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="OpticalDiscType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Image" type="{}ImageType"/>
+ *         <element name="Size" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="Sequence" type="{}SequenceType"/>
+ *         <element name="Layers" type="{}LayersType" minOccurs="0"/>
+ *         <element name="Checksums" type="{}ChecksumsType"/>
+ *         <element name="PartNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="SerialNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="RingCode" type="{}LayeredTextType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="MasteringSID" type="{}LayeredTextType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="Toolstamp" type="{}LayeredTextType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="MouldSID" type="{}LayeredTextType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="MouldText" type="{}LayeredTextType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="DiscType" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="DiscSubType" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Offset" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
+ *         <element name="Tracks" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" maxOccurs="unbounded"/>
+ *         <element name="Sessions" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
+ *         <element name="CopyProtection" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Dimensions" type="{}DimensionsType"/>
+ *         <element name="Case" type="{}CaseType" minOccurs="0"/>
+ *         <element name="Scans" type="{}ScansType" minOccurs="0"/>
+ *         <element name="PFI" type="{}DumpType" minOccurs="0"/>
+ *         <element name="DMI" type="{}DumpType" minOccurs="0"/>
+ *         <element name="CMI" type="{}DumpType" minOccurs="0"/>
+ *         <element name="BCA" type="{}DumpType" minOccurs="0"/>
+ *         <element name="ATIP" type="{}DumpType" minOccurs="0"/>
+ *         <element name="ADIP" type="{}DumpType" minOccurs="0"/>
+ *         <element name="PMA" type="{}DumpType" minOccurs="0"/>
+ *         <element name="DDS" type="{}DumpType" minOccurs="0"/>
+ *         <element name="SAI" type="{}DumpType" minOccurs="0"/>
+ *         <element name="LastRMD" type="{}DumpType" minOccurs="0"/>
+ *         <element name="PRI" type="{}DumpType" minOccurs="0"/>
+ *         <element name="MediaID" type="{}DumpType" minOccurs="0"/>
+ *         <element name="PFIR" type="{}DumpType" minOccurs="0"/>
+ *         <element name="DCB" type="{}DumpType" minOccurs="0"/>
+ *         <element name="DI" type="{}DumpType" minOccurs="0"/>
+ *         <element name="PAC" type="{}DumpType" minOccurs="0"/>
+ *         <element name="TOC" type="{}DumpType" minOccurs="0"/>
+ *         <element name="LeadInCdText" type="{}DumpType" minOccurs="0"/>
+ *         <element name="FirstTrackPregrap" type="{}BorderType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="LeadIn" type="{}BorderType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="LeadOut" type="{}BorderType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="Xbox" type="{}XboxType" minOccurs="0"/>
+ *         <element name="PS3Encryption" type="{}PS3EncryptionType" minOccurs="0"/>
+ *         <element name="MediaCatalogueNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Track" type="{}TrackType" maxOccurs="unbounded"/>
+ *         <element name="DumpHardwareArray" type="{}DumpHardwareArrayType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "OpticalDiscType", propOrder = { + "image", + "size", + "sequence", + "layers", + "checksums", + "partNumber", + "serialNumber", + "ringCode", + "masteringSID", + "toolstamp", + "mouldSID", + "mouldText", + "discType", + "discSubType", + "offset", + "tracks", + "sessions", + "copyProtection", + "dimensions", + "_case", + "scans", + "pfi", + "dmi", + "cmi", + "bca", + "atip", + "adip", + "pma", + "dds", + "sai", + "lastRMD", + "pri", + "mediaID", + "pfir", + "dcb", + "di", + "pac", + "toc", + "leadInCdText", + "firstTrackPregrap", + "leadIn", + "leadOut", + "xbox", + "ps3Encryption", + "mediaCatalogueNumber", + "track", + "dumpHardwareArray" +}) +public class OpticalDiscType { + + @XmlElement(name = "Image", required = true) + protected ImageType image; + @XmlElement(name = "Size", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger size; + @XmlElement(name = "Sequence", required = true) + protected SequenceType sequence; + @XmlElement(name = "Layers") + protected LayersType layers; + @XmlElement(name = "Checksums", required = true) + protected ChecksumsType checksums; + @XmlElement(name = "PartNumber") + protected String partNumber; + @XmlElement(name = "SerialNumber") + protected String serialNumber; + @XmlElement(name = "RingCode") + protected List ringCode; + @XmlElement(name = "MasteringSID") + protected List masteringSID; + @XmlElement(name = "Toolstamp") + protected List toolstamp; + @XmlElement(name = "MouldSID") + protected List mouldSID; + @XmlElement(name = "MouldText") + protected List mouldText; + @XmlElement(name = "DiscType", required = true) + protected String discType; + @XmlElement(name = "DiscSubType", required = true) + protected String discSubType; + @XmlElement(name = "Offset") + protected Integer offset; + @XmlElement(name = "Tracks", type = Long.class) + @XmlSchemaType(name = "unsignedInt") + protected List tracks; + @XmlElement(name = "Sessions") + @XmlSchemaType(name = "unsignedInt") + protected long sessions; + @XmlElement(name = "CopyProtection") + protected String copyProtection; + @XmlElement(name = "Dimensions", required = true) + protected DimensionsType dimensions; + @XmlElement(name = "Case") + protected CaseType _case; + @XmlElement(name = "Scans") + protected ScansType scans; + @XmlElement(name = "PFI") + protected DumpType pfi; + @XmlElement(name = "DMI") + protected DumpType dmi; + @XmlElement(name = "CMI") + protected DumpType cmi; + @XmlElement(name = "BCA") + protected DumpType bca; + @XmlElement(name = "ATIP") + protected DumpType atip; + @XmlElement(name = "ADIP") + protected DumpType adip; + @XmlElement(name = "PMA") + protected DumpType pma; + @XmlElement(name = "DDS") + protected DumpType dds; + @XmlElement(name = "SAI") + protected DumpType sai; + @XmlElement(name = "LastRMD") + protected DumpType lastRMD; + @XmlElement(name = "PRI") + protected DumpType pri; + @XmlElement(name = "MediaID") + protected DumpType mediaID; + @XmlElement(name = "PFIR") + protected DumpType pfir; + @XmlElement(name = "DCB") + protected DumpType dcb; + @XmlElement(name = "DI") + protected DumpType di; + @XmlElement(name = "PAC") + protected DumpType pac; + @XmlElement(name = "TOC") + protected DumpType toc; + @XmlElement(name = "LeadInCdText") + protected DumpType leadInCdText; + @XmlElement(name = "FirstTrackPregrap") + protected List firstTrackPregrap; + @XmlElement(name = "LeadIn") + protected List leadIn; + @XmlElement(name = "LeadOut") + protected List leadOut; + @XmlElement(name = "Xbox") + protected XboxType xbox; + @XmlElement(name = "PS3Encryption") + protected PS3EncryptionType ps3Encryption; + @XmlElement(name = "MediaCatalogueNumber") + protected String mediaCatalogueNumber; + @XmlElement(name = "Track", required = true) + protected List track; + @XmlElement(name = "DumpHardwareArray") + protected DumpHardwareArrayType dumpHardwareArray; + + /** + * Obtiene el valor de la propiedad image. + * + * @return + * possible object is + * {@link ImageType } + * + */ + public ImageType getImage() { + return image; + } + + /** + * Define el valor de la propiedad image. + * + * @param value + * allowed object is + * {@link ImageType } + * + */ + public void setImage(ImageType value) { + this.image = value; + } + + /** + * Obtiene el valor de la propiedad size. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSize() { + return size; + } + + /** + * Define el valor de la propiedad size. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSize(BigInteger value) { + this.size = value; + } + + /** + * Obtiene el valor de la propiedad sequence. + * + * @return + * possible object is + * {@link SequenceType } + * + */ + public SequenceType getSequence() { + return sequence; + } + + /** + * Define el valor de la propiedad sequence. + * + * @param value + * allowed object is + * {@link SequenceType } + * + */ + public void setSequence(SequenceType value) { + this.sequence = value; + } + + /** + * Obtiene el valor de la propiedad layers. + * + * @return + * possible object is + * {@link LayersType } + * + */ + public LayersType getLayers() { + return layers; + } + + /** + * Define el valor de la propiedad layers. + * + * @param value + * allowed object is + * {@link LayersType } + * + */ + public void setLayers(LayersType value) { + this.layers = value; + } + + /** + * Obtiene el valor de la propiedad checksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getChecksums() { + return checksums; + } + + /** + * Define el valor de la propiedad checksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setChecksums(ChecksumsType value) { + this.checksums = value; + } + + /** + * Obtiene el valor de la propiedad partNumber. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPartNumber() { + return partNumber; + } + + /** + * Define el valor de la propiedad partNumber. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPartNumber(String value) { + this.partNumber = value; + } + + /** + * Obtiene el valor de la propiedad serialNumber. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSerialNumber() { + return serialNumber; + } + + /** + * Define el valor de la propiedad serialNumber. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSerialNumber(String value) { + this.serialNumber = value; + } + + /** + * Gets the value of the ringCode property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the ringCode property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getRingCode().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link LayeredTextType } + * + * + */ + public List getRingCode() { + if (ringCode == null) { + ringCode = new ArrayList(); + } + return this.ringCode; + } + + /** + * Gets the value of the masteringSID property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the masteringSID property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getMasteringSID().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link LayeredTextType } + * + * + */ + public List getMasteringSID() { + if (masteringSID == null) { + masteringSID = new ArrayList(); + } + return this.masteringSID; + } + + /** + * Gets the value of the toolstamp property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the toolstamp property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getToolstamp().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link LayeredTextType } + * + * + */ + public List getToolstamp() { + if (toolstamp == null) { + toolstamp = new ArrayList(); + } + return this.toolstamp; + } + + /** + * Gets the value of the mouldSID property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the mouldSID property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getMouldSID().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link LayeredTextType } + * + * + */ + public List getMouldSID() { + if (mouldSID == null) { + mouldSID = new ArrayList(); + } + return this.mouldSID; + } + + /** + * Gets the value of the mouldText property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the mouldText property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getMouldText().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link LayeredTextType } + * + * + */ + public List getMouldText() { + if (mouldText == null) { + mouldText = new ArrayList(); + } + return this.mouldText; + } + + /** + * Obtiene el valor de la propiedad discType. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDiscType() { + return discType; + } + + /** + * Define el valor de la propiedad discType. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDiscType(String value) { + this.discType = value; + } + + /** + * Obtiene el valor de la propiedad discSubType. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDiscSubType() { + return discSubType; + } + + /** + * Define el valor de la propiedad discSubType. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDiscSubType(String value) { + this.discSubType = value; + } + + /** + * Obtiene el valor de la propiedad offset. + * + * @return + * possible object is + * {@link Integer } + * + */ + public Integer getOffset() { + return offset; + } + + /** + * Define el valor de la propiedad offset. + * + * @param value + * allowed object is + * {@link Integer } + * + */ + public void setOffset(Integer value) { + this.offset = value; + } + + /** + * Gets the value of the tracks property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the tracks property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getTracks().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Long } + * + * + */ + public List getTracks() { + if (tracks == null) { + tracks = new ArrayList(); + } + return this.tracks; + } + + /** + * Obtiene el valor de la propiedad sessions. + * + */ + public long getSessions() { + return sessions; + } + + /** + * Define el valor de la propiedad sessions. + * + */ + public void setSessions(long value) { + this.sessions = value; + } + + /** + * Obtiene el valor de la propiedad copyProtection. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCopyProtection() { + return copyProtection; + } + + /** + * Define el valor de la propiedad copyProtection. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCopyProtection(String value) { + this.copyProtection = value; + } + + /** + * Obtiene el valor de la propiedad dimensions. + * + * @return + * possible object is + * {@link DimensionsType } + * + */ + public DimensionsType getDimensions() { + return dimensions; + } + + /** + * Define el valor de la propiedad dimensions. + * + * @param value + * allowed object is + * {@link DimensionsType } + * + */ + public void setDimensions(DimensionsType value) { + this.dimensions = value; + } + + /** + * Obtiene el valor de la propiedad case. + * + * @return + * possible object is + * {@link CaseType } + * + */ + public CaseType getCase() { + return _case; + } + + /** + * Define el valor de la propiedad case. + * + * @param value + * allowed object is + * {@link CaseType } + * + */ + public void setCase(CaseType value) { + this._case = value; + } + + /** + * Obtiene el valor de la propiedad scans. + * + * @return + * possible object is + * {@link ScansType } + * + */ + public ScansType getScans() { + return scans; + } + + /** + * Define el valor de la propiedad scans. + * + * @param value + * allowed object is + * {@link ScansType } + * + */ + public void setScans(ScansType value) { + this.scans = value; + } + + /** + * Obtiene el valor de la propiedad pfi. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getPFI() { + return pfi; + } + + /** + * Define el valor de la propiedad pfi. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setPFI(DumpType value) { + this.pfi = value; + } + + /** + * Obtiene el valor de la propiedad dmi. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getDMI() { + return dmi; + } + + /** + * Define el valor de la propiedad dmi. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setDMI(DumpType value) { + this.dmi = value; + } + + /** + * Obtiene el valor de la propiedad cmi. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getCMI() { + return cmi; + } + + /** + * Define el valor de la propiedad cmi. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setCMI(DumpType value) { + this.cmi = value; + } + + /** + * Obtiene el valor de la propiedad bca. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getBCA() { + return bca; + } + + /** + * Define el valor de la propiedad bca. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setBCA(DumpType value) { + this.bca = value; + } + + /** + * Obtiene el valor de la propiedad atip. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getATIP() { + return atip; + } + + /** + * Define el valor de la propiedad atip. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setATIP(DumpType value) { + this.atip = value; + } + + /** + * Obtiene el valor de la propiedad adip. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getADIP() { + return adip; + } + + /** + * Define el valor de la propiedad adip. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setADIP(DumpType value) { + this.adip = value; + } + + /** + * Obtiene el valor de la propiedad pma. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getPMA() { + return pma; + } + + /** + * Define el valor de la propiedad pma. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setPMA(DumpType value) { + this.pma = value; + } + + /** + * Obtiene el valor de la propiedad dds. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getDDS() { + return dds; + } + + /** + * Define el valor de la propiedad dds. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setDDS(DumpType value) { + this.dds = value; + } + + /** + * Obtiene el valor de la propiedad sai. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getSAI() { + return sai; + } + + /** + * Define el valor de la propiedad sai. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setSAI(DumpType value) { + this.sai = value; + } + + /** + * Obtiene el valor de la propiedad lastRMD. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getLastRMD() { + return lastRMD; + } + + /** + * Define el valor de la propiedad lastRMD. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setLastRMD(DumpType value) { + this.lastRMD = value; + } + + /** + * Obtiene el valor de la propiedad pri. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getPRI() { + return pri; + } + + /** + * Define el valor de la propiedad pri. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setPRI(DumpType value) { + this.pri = value; + } + + /** + * Obtiene el valor de la propiedad mediaID. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getMediaID() { + return mediaID; + } + + /** + * Define el valor de la propiedad mediaID. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setMediaID(DumpType value) { + this.mediaID = value; + } + + /** + * Obtiene el valor de la propiedad pfir. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getPFIR() { + return pfir; + } + + /** + * Define el valor de la propiedad pfir. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setPFIR(DumpType value) { + this.pfir = value; + } + + /** + * Obtiene el valor de la propiedad dcb. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getDCB() { + return dcb; + } + + /** + * Define el valor de la propiedad dcb. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setDCB(DumpType value) { + this.dcb = value; + } + + /** + * Obtiene el valor de la propiedad di. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getDI() { + return di; + } + + /** + * Define el valor de la propiedad di. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setDI(DumpType value) { + this.di = value; + } + + /** + * Obtiene el valor de la propiedad pac. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getPAC() { + return pac; + } + + /** + * Define el valor de la propiedad pac. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setPAC(DumpType value) { + this.pac = value; + } + + /** + * Obtiene el valor de la propiedad toc. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getTOC() { + return toc; + } + + /** + * Define el valor de la propiedad toc. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setTOC(DumpType value) { + this.toc = value; + } + + /** + * Obtiene el valor de la propiedad leadInCdText. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getLeadInCdText() { + return leadInCdText; + } + + /** + * Define el valor de la propiedad leadInCdText. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setLeadInCdText(DumpType value) { + this.leadInCdText = value; + } + + /** + * Gets the value of the firstTrackPregrap property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the firstTrackPregrap property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getFirstTrackPregrap().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link BorderType } + * + * + */ + public List getFirstTrackPregrap() { + if (firstTrackPregrap == null) { + firstTrackPregrap = new ArrayList(); + } + return this.firstTrackPregrap; + } + + /** + * Gets the value of the leadIn property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the leadIn property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getLeadIn().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link BorderType } + * + * + */ + public List getLeadIn() { + if (leadIn == null) { + leadIn = new ArrayList(); + } + return this.leadIn; + } + + /** + * Gets the value of the leadOut property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the leadOut property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getLeadOut().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link BorderType } + * + * + */ + public List getLeadOut() { + if (leadOut == null) { + leadOut = new ArrayList(); + } + return this.leadOut; + } + + /** + * Obtiene el valor de la propiedad xbox. + * + * @return + * possible object is + * {@link XboxType } + * + */ + public XboxType getXbox() { + return xbox; + } + + /** + * Define el valor de la propiedad xbox. + * + * @param value + * allowed object is + * {@link XboxType } + * + */ + public void setXbox(XboxType value) { + this.xbox = value; + } + + /** + * Obtiene el valor de la propiedad ps3Encryption. + * + * @return + * possible object is + * {@link PS3EncryptionType } + * + */ + public PS3EncryptionType getPS3Encryption() { + return ps3Encryption; + } + + /** + * Define el valor de la propiedad ps3Encryption. + * + * @param value + * allowed object is + * {@link PS3EncryptionType } + * + */ + public void setPS3Encryption(PS3EncryptionType value) { + this.ps3Encryption = value; + } + + /** + * Obtiene el valor de la propiedad mediaCatalogueNumber. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMediaCatalogueNumber() { + return mediaCatalogueNumber; + } + + /** + * Define el valor de la propiedad mediaCatalogueNumber. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMediaCatalogueNumber(String value) { + this.mediaCatalogueNumber = value; + } + + /** + * Gets the value of the track property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the track property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getTrack().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link TrackType } + * + * + */ + public List getTrack() { + if (track == null) { + track = new ArrayList(); + } + return this.track; + } + + /** + * Obtiene el valor de la propiedad dumpHardwareArray. + * + * @return + * possible object is + * {@link DumpHardwareArrayType } + * + */ + public DumpHardwareArrayType getDumpHardwareArray() { + return dumpHardwareArray; + } + + /** + * Define el valor de la propiedad dumpHardwareArray. + * + * @param value + * allowed object is + * {@link DumpHardwareArrayType } + * + */ + public void setDumpHardwareArray(DumpHardwareArrayType value) { + this.dumpHardwareArray = value; + } + +} diff --git a/CICMMetadata/java/generated/PCIType.java b/CICMMetadata/java/generated/PCIType.java new file mode 100644 index 0000000..c106305 --- /dev/null +++ b/CICMMetadata/java/generated/PCIType.java @@ -0,0 +1,153 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Contains PCI/PCI-X/PCIe card information + * + *

Clase Java para PCIType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="PCIType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="VendorID">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}unsignedShort">
+ *               <minInclusive value="1"/>
+ *               <maxInclusive value="65534"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *         <element name="DeviceID">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}unsignedShort">
+ *               <minInclusive value="1"/>
+ *               <maxInclusive value="65534"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *         <element name="Configuration" type="{}DumpType" minOccurs="0"/>
+ *         <element name="ExpansionROM" type="{}LinearMediaType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PCIType", propOrder = { + "vendorID", + "deviceID", + "configuration", + "expansionROM" +}) +public class PCIType { + + @XmlElement(name = "VendorID") + protected int vendorID; + @XmlElement(name = "DeviceID") + protected int deviceID; + @XmlElement(name = "Configuration") + protected DumpType configuration; + @XmlElement(name = "ExpansionROM") + protected LinearMediaType expansionROM; + + /** + * Obtiene el valor de la propiedad vendorID. + * + */ + public int getVendorID() { + return vendorID; + } + + /** + * Define el valor de la propiedad vendorID. + * + */ + public void setVendorID(int value) { + this.vendorID = value; + } + + /** + * Obtiene el valor de la propiedad deviceID. + * + */ + public int getDeviceID() { + return deviceID; + } + + /** + * Define el valor de la propiedad deviceID. + * + */ + public void setDeviceID(int value) { + this.deviceID = value; + } + + /** + * Obtiene el valor de la propiedad configuration. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getConfiguration() { + return configuration; + } + + /** + * Define el valor de la propiedad configuration. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setConfiguration(DumpType value) { + this.configuration = value; + } + + /** + * Obtiene el valor de la propiedad expansionROM. + * + * @return + * possible object is + * {@link LinearMediaType } + * + */ + public LinearMediaType getExpansionROM() { + return expansionROM; + } + + /** + * Define el valor de la propiedad expansionROM. + * + * @param value + * allowed object is + * {@link LinearMediaType } + * + */ + public void setExpansionROM(LinearMediaType value) { + this.expansionROM = value; + } + +} diff --git a/CICMMetadata/java/generated/PCMCIAType.java b/CICMMetadata/java/generated/PCMCIAType.java new file mode 100644 index 0000000..0b40c6b --- /dev/null +++ b/CICMMetadata/java/generated/PCMCIAType.java @@ -0,0 +1,249 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + * Contains PCMCIA card information + * + *

Clase Java para PCMCIAType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="PCMCIAType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CIS" type="{}DumpType"/>
+ *         <element name="Compliance" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="ManufacturerCode" type="{http://www.w3.org/2001/XMLSchema}unsignedShort" minOccurs="0"/>
+ *         <element name="CardCode" type="{http://www.w3.org/2001/XMLSchema}unsignedShort" minOccurs="0"/>
+ *         <element name="Manufacturer" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="ProductName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="AdditionalInformation" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PCMCIAType", propOrder = { + "cis", + "compliance", + "manufacturerCode", + "cardCode", + "manufacturer", + "productName", + "additionalInformation" +}) +public class PCMCIAType { + + @XmlElement(name = "CIS", required = true) + protected DumpType cis; + @XmlElement(name = "Compliance") + protected String compliance; + @XmlElement(name = "ManufacturerCode") + @XmlSchemaType(name = "unsignedShort") + protected Integer manufacturerCode; + @XmlElement(name = "CardCode") + @XmlSchemaType(name = "unsignedShort") + protected Integer cardCode; + @XmlElement(name = "Manufacturer") + protected String manufacturer; + @XmlElement(name = "ProductName") + protected String productName; + @XmlElement(name = "AdditionalInformation") + protected List additionalInformation; + + /** + * Obtiene el valor de la propiedad cis. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getCIS() { + return cis; + } + + /** + * Define el valor de la propiedad cis. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setCIS(DumpType value) { + this.cis = value; + } + + /** + * Obtiene el valor de la propiedad compliance. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCompliance() { + return compliance; + } + + /** + * Define el valor de la propiedad compliance. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCompliance(String value) { + this.compliance = value; + } + + /** + * Obtiene el valor de la propiedad manufacturerCode. + * + * @return + * possible object is + * {@link Integer } + * + */ + public Integer getManufacturerCode() { + return manufacturerCode; + } + + /** + * Define el valor de la propiedad manufacturerCode. + * + * @param value + * allowed object is + * {@link Integer } + * + */ + public void setManufacturerCode(Integer value) { + this.manufacturerCode = value; + } + + /** + * Obtiene el valor de la propiedad cardCode. + * + * @return + * possible object is + * {@link Integer } + * + */ + public Integer getCardCode() { + return cardCode; + } + + /** + * Define el valor de la propiedad cardCode. + * + * @param value + * allowed object is + * {@link Integer } + * + */ + public void setCardCode(Integer value) { + this.cardCode = value; + } + + /** + * Obtiene el valor de la propiedad manufacturer. + * + * @return + * possible object is + * {@link String } + * + */ + public String getManufacturer() { + return manufacturer; + } + + /** + * Define el valor de la propiedad manufacturer. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setManufacturer(String value) { + this.manufacturer = value; + } + + /** + * Obtiene el valor de la propiedad productName. + * + * @return + * possible object is + * {@link String } + * + */ + public String getProductName() { + return productName; + } + + /** + * Define el valor de la propiedad productName. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setProductName(String value) { + this.productName = value; + } + + /** + * Gets the value of the additionalInformation property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the additionalInformation property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getAdditionalInformation().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getAdditionalInformation() { + if (additionalInformation == null) { + additionalInformation = new ArrayList(); + } + return this.additionalInformation; + } + +} diff --git a/CICMMetadata/java/generated/PS3EncryptionType.java b/CICMMetadata/java/generated/PS3EncryptionType.java new file mode 100644 index 0000000..22c10cf --- /dev/null +++ b/CICMMetadata/java/generated/PS3EncryptionType.java @@ -0,0 +1,97 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para PS3EncryptionType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="PS3EncryptionType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Key" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Serial" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PS3EncryptionType", propOrder = { + "key", + "serial" +}) +public class PS3EncryptionType { + + @XmlElement(name = "Key", required = true) + protected String key; + @XmlElement(name = "Serial", required = true) + protected String serial; + + /** + * Obtiene el valor de la propiedad key. + * + * @return + * possible object is + * {@link String } + * + */ + public String getKey() { + return key; + } + + /** + * Define el valor de la propiedad key. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setKey(String value) { + this.key = value; + } + + /** + * Obtiene el valor de la propiedad serial. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSerial() { + return serial; + } + + /** + * Define el valor de la propiedad serial. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSerial(String value) { + this.serial = value; + } + +} diff --git a/CICMMetadata/java/generated/PartitionType.java b/CICMMetadata/java/generated/PartitionType.java new file mode 100644 index 0000000..a876b9e --- /dev/null +++ b/CICMMetadata/java/generated/PartitionType.java @@ -0,0 +1,239 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para PartitionType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="PartitionType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Sequence">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}unsignedInt">
+ *               <minInclusive value="1"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *         <element name="Name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="StartSector" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="EndSector" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="Description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="FileSystems" type="{}FileSystemsType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "PartitionType", propOrder = { + "sequence", + "name", + "type", + "startSector", + "endSector", + "description", + "fileSystems" +}) +public class PartitionType { + + @XmlElement(name = "Sequence") + protected long sequence; + @XmlElement(name = "Name") + protected String name; + @XmlElement(name = "Type") + protected String type; + @XmlElement(name = "StartSector", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger startSector; + @XmlElement(name = "EndSector", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger endSector; + @XmlElement(name = "Description") + protected String description; + @XmlElement(name = "FileSystems", required = true) + protected FileSystemsType fileSystems; + + /** + * Obtiene el valor de la propiedad sequence. + * + */ + public long getSequence() { + return sequence; + } + + /** + * Define el valor de la propiedad sequence. + * + */ + public void setSequence(long value) { + this.sequence = value; + } + + /** + * Obtiene el valor de la propiedad name. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Define el valor de la propiedad name. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Obtiene el valor de la propiedad type. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Define el valor de la propiedad type. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Obtiene el valor de la propiedad startSector. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getStartSector() { + return startSector; + } + + /** + * Define el valor de la propiedad startSector. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setStartSector(BigInteger value) { + this.startSector = value; + } + + /** + * Obtiene el valor de la propiedad endSector. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getEndSector() { + return endSector; + } + + /** + * Define el valor de la propiedad endSector. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setEndSector(BigInteger value) { + this.endSector = value; + } + + /** + * Obtiene el valor de la propiedad description. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDescription() { + return description; + } + + /** + * Define el valor de la propiedad description. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDescription(String value) { + this.description = value; + } + + /** + * Obtiene el valor de la propiedad fileSystems. + * + * @return + * possible object is + * {@link FileSystemsType } + * + */ + public FileSystemsType getFileSystems() { + return fileSystems; + } + + /** + * Define el valor de la propiedad fileSystems. + * + * @param value + * allowed object is + * {@link FileSystemsType } + * + */ + public void setFileSystems(FileSystemsType value) { + this.fileSystems = value; + } + +} diff --git a/CICMMetadata/java/generated/RecordingType.java b/CICMMetadata/java/generated/RecordingType.java new file mode 100644 index 0000000..1267e5d --- /dev/null +++ b/CICMMetadata/java/generated/RecordingType.java @@ -0,0 +1,292 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.datatype.XMLGregorianCalendar; + + +/** + *

Clase Java para RecordingType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="RecordingType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Broadcaster" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="BroadcastPlatform" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="SourceFormat">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *               <enumeration value="ITU-A"/>
+ *               <enumeration value="ITU-B"/>
+ *               <enumeration value="ITU-C"/>
+ *               <enumeration value="ITU-D"/>
+ *               <enumeration value="ITU-E"/>
+ *               <enumeration value="ITU-F"/>
+ *               <enumeration value="ITU-G"/>
+ *               <enumeration value="ITU-H"/>
+ *               <enumeration value="ITU-I"/>
+ *               <enumeration value="ITU-J"/>
+ *               <enumeration value="ITU-K"/>
+ *               <enumeration value="ITU-L"/>
+ *               <enumeration value="ITU-M"/>
+ *               <enumeration value="ITU-N"/>
+ *               <enumeration value="PAL-B"/>
+ *               <enumeration value="SECAM-B"/>
+ *               <enumeration value="PAL-D"/>
+ *               <enumeration value="SECAM-D"/>
+ *               <enumeration value="PAL-G"/>
+ *               <enumeration value="SECAM-G"/>
+ *               <enumeration value="PAL-H"/>
+ *               <enumeration value="PAL-I"/>
+ *               <enumeration value="PAL-K"/>
+ *               <enumeration value="SECAM-K"/>
+ *               <enumeration value="NTSC-M"/>
+ *               <enumeration value="PAL-N"/>
+ *               <enumeration value="PAL-M"/>
+ *               <enumeration value="SECAM-M"/>
+ *               <enumeration value="MUSE"/>
+ *               <enumeration value="PALplus"/>
+ *               <enumeration value="FM"/>
+ *               <enumeration value="AM"/>
+ *               <enumeration value="COFDM"/>
+ *               <enumeration value="CAM-D"/>
+ *               <enumeration value="DAB"/>
+ *               <enumeration value="DAB+"/>
+ *               <enumeration value="DRM"/>
+ *               <enumeration value="DRM+"/>
+ *               <enumeration value="FMeXtra"/>
+ *               <enumeration value="ATSC"/>
+ *               <enumeration value="ATSC2"/>
+ *               <enumeration value="ATSC3"/>
+ *               <enumeration value="ATSC-M/H"/>
+ *               <enumeration value="DVB-T"/>
+ *               <enumeration value="DVB-T2"/>
+ *               <enumeration value="DVB-S"/>
+ *               <enumeration value="DVB-S2"/>
+ *               <enumeration value="DVB-S2X"/>
+ *               <enumeration value="DVB-C"/>
+ *               <enumeration value="DVB-C2"/>
+ *               <enumeration value="DVB-H"/>
+ *               <enumeration value="DVB-NGH"/>
+ *               <enumeration value="DVB-SH"/>
+ *               <enumeration value="ISDB-T"/>
+ *               <enumeration value="ISDB-Tb"/>
+ *               <enumeration value="ISDB-S"/>
+ *               <enumeration value="ISDB-C"/>
+ *               <enumeration value="1seg"/>
+ *               <enumeration value="DTMB"/>
+ *               <enumeration value="CCMB"/>
+ *               <enumeration value="T-DMB"/>
+ *               <enumeration value="S-DMB"/>
+ *               <enumeration value="IPTV"/>
+ *               <enumeration value="DVB-MT"/>
+ *               <enumeration value="DVB-MC"/>
+ *               <enumeration value="DVB-MS"/>
+ *               <enumeration value="ADR"/>
+ *               <enumeration value="SDR"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *         <element name="Timestamp" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
+ *         <element name="Software" type="{}SoftwareType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="Coordinates" type="{}CoordinatesType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RecordingType", propOrder = { + "broadcaster", + "broadcastPlatform", + "sourceFormat", + "timestamp", + "software", + "coordinates" +}) +public class RecordingType { + + @XmlElement(name = "Broadcaster") + protected String broadcaster; + @XmlElement(name = "BroadcastPlatform") + protected String broadcastPlatform; + @XmlElement(name = "SourceFormat", required = true) + protected String sourceFormat; + @XmlElement(name = "Timestamp", required = true) + @XmlSchemaType(name = "dateTime") + protected XMLGregorianCalendar timestamp; + @XmlElement(name = "Software") + protected List software; + @XmlElement(name = "Coordinates") + protected CoordinatesType coordinates; + + /** + * Obtiene el valor de la propiedad broadcaster. + * + * @return + * possible object is + * {@link String } + * + */ + public String getBroadcaster() { + return broadcaster; + } + + /** + * Define el valor de la propiedad broadcaster. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setBroadcaster(String value) { + this.broadcaster = value; + } + + /** + * Obtiene el valor de la propiedad broadcastPlatform. + * + * @return + * possible object is + * {@link String } + * + */ + public String getBroadcastPlatform() { + return broadcastPlatform; + } + + /** + * Define el valor de la propiedad broadcastPlatform. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setBroadcastPlatform(String value) { + this.broadcastPlatform = value; + } + + /** + * Obtiene el valor de la propiedad sourceFormat. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSourceFormat() { + return sourceFormat; + } + + /** + * Define el valor de la propiedad sourceFormat. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSourceFormat(String value) { + this.sourceFormat = value; + } + + /** + * Obtiene el valor de la propiedad timestamp. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getTimestamp() { + return timestamp; + } + + /** + * Define el valor de la propiedad timestamp. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setTimestamp(XMLGregorianCalendar value) { + this.timestamp = value; + } + + /** + * Gets the value of the software property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the software property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSoftware().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link SoftwareType } + * + * + */ + public List getSoftware() { + if (software == null) { + software = new ArrayList(); + } + return this.software; + } + + /** + * Obtiene el valor de la propiedad coordinates. + * + * @return + * possible object is + * {@link CoordinatesType } + * + */ + public CoordinatesType getCoordinates() { + return coordinates; + } + + /** + * Define el valor de la propiedad coordinates. + * + * @param value + * allowed object is + * {@link CoordinatesType } + * + */ + public void setCoordinates(CoordinatesType value) { + this.coordinates = value; + } + +} diff --git a/CICMMetadata/java/generated/RequiredOperatingSystemType.java b/CICMMetadata/java/generated/RequiredOperatingSystemType.java new file mode 100644 index 0000000..7f381d9 --- /dev/null +++ b/CICMMetadata/java/generated/RequiredOperatingSystemType.java @@ -0,0 +1,104 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para RequiredOperatingSystemType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="RequiredOperatingSystemType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Version" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RequiredOperatingSystemType", propOrder = { + "name", + "version" +}) +public class RequiredOperatingSystemType { + + @XmlElement(name = "Name", required = true) + protected String name; + @XmlElement(name = "Version", required = true) + protected List version; + + /** + * Obtiene el valor de la propiedad name. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Define el valor de la propiedad name. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the version property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the version property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getVersion().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getVersion() { + if (version == null) { + version = new ArrayList(); + } + return this.version; + } + +} diff --git a/CICMMetadata/java/generated/RequiredOperatingSystemsType.java b/CICMMetadata/java/generated/RequiredOperatingSystemsType.java new file mode 100644 index 0000000..7a355e6 --- /dev/null +++ b/CICMMetadata/java/generated/RequiredOperatingSystemsType.java @@ -0,0 +1,76 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para RequiredOperatingSystemsType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="RequiredOperatingSystemsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="RequiredOperatingSystem" type="{}RequiredOperatingSystemType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "RequiredOperatingSystemsType", propOrder = { + "requiredOperatingSystem" +}) +public class RequiredOperatingSystemsType { + + @XmlElement(name = "RequiredOperatingSystem", required = true) + protected List requiredOperatingSystem; + + /** + * Gets the value of the requiredOperatingSystem property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the requiredOperatingSystem property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getRequiredOperatingSystem().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link RequiredOperatingSystemType } + * + * + */ + public List getRequiredOperatingSystem() { + if (requiredOperatingSystem == null) { + requiredOperatingSystem = new ArrayList(); + } + return this.requiredOperatingSystem; + } + +} diff --git a/CICMMetadata/java/generated/SCSIType.java b/CICMMetadata/java/generated/SCSIType.java new file mode 100644 index 0000000..6b588a4 --- /dev/null +++ b/CICMMetadata/java/generated/SCSIType.java @@ -0,0 +1,190 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Contains SCSI device information + * + *

Clase Java para SCSIType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="SCSIType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Inquiry" type="{}DumpType"/>
+ *         <element name="EVPD" type="{}EVPDType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="ModeSense" type="{}DumpType" minOccurs="0"/>
+ *         <element name="ModeSense10" type="{}DumpType" minOccurs="0"/>
+ *         <element name="LogSense" type="{}DumpType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SCSIType", propOrder = { + "inquiry", + "evpd", + "modeSense", + "modeSense10", + "logSense" +}) +public class SCSIType { + + @XmlElement(name = "Inquiry", required = true) + protected DumpType inquiry; + @XmlElement(name = "EVPD") + protected List evpd; + @XmlElement(name = "ModeSense") + protected DumpType modeSense; + @XmlElement(name = "ModeSense10") + protected DumpType modeSense10; + @XmlElement(name = "LogSense") + protected DumpType logSense; + + /** + * Obtiene el valor de la propiedad inquiry. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getInquiry() { + return inquiry; + } + + /** + * Define el valor de la propiedad inquiry. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setInquiry(DumpType value) { + this.inquiry = value; + } + + /** + * Gets the value of the evpd property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the evpd property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getEVPD().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link EVPDType } + * + * + */ + public List getEVPD() { + if (evpd == null) { + evpd = new ArrayList(); + } + return this.evpd; + } + + /** + * Obtiene el valor de la propiedad modeSense. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getModeSense() { + return modeSense; + } + + /** + * Define el valor de la propiedad modeSense. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setModeSense(DumpType value) { + this.modeSense = value; + } + + /** + * Obtiene el valor de la propiedad modeSense10. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getModeSense10() { + return modeSense10; + } + + /** + * Define el valor de la propiedad modeSense10. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setModeSense10(DumpType value) { + this.modeSense10 = value; + } + + /** + * Obtiene el valor de la propiedad logSense. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getLogSense() { + return logSense; + } + + /** + * Define el valor de la propiedad logSense. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setLogSense(DumpType value) { + this.logSense = value; + } + +} diff --git a/CICMMetadata/java/generated/ScanProcessingType.java b/CICMMetadata/java/generated/ScanProcessingType.java new file mode 100644 index 0000000..e0f1d8f --- /dev/null +++ b/CICMMetadata/java/generated/ScanProcessingType.java @@ -0,0 +1,128 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Information about any scan processing done + * + * + *

Clase Java para ScanProcessingType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="ScanProcessingType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Author" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Software" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="SoftwareVersion" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ScanProcessingType", propOrder = { + "author", + "software", + "softwareVersion" +}) +public class ScanProcessingType { + + @XmlElement(name = "Author", required = true) + protected String author; + @XmlElement(name = "Software", required = true) + protected String software; + @XmlElement(name = "SoftwareVersion", required = true) + protected String softwareVersion; + + /** + * Obtiene el valor de la propiedad author. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAuthor() { + return author; + } + + /** + * Define el valor de la propiedad author. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAuthor(String value) { + this.author = value; + } + + /** + * Obtiene el valor de la propiedad software. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSoftware() { + return software; + } + + /** + * Define el valor de la propiedad software. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSoftware(String value) { + this.software = value; + } + + /** + * Obtiene el valor de la propiedad softwareVersion. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSoftwareVersion() { + return softwareVersion; + } + + /** + * Define el valor de la propiedad softwareVersion. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSoftwareVersion(String value) { + this.softwareVersion = value; + } + +} diff --git a/CICMMetadata/java/generated/ScanType.java b/CICMMetadata/java/generated/ScanType.java new file mode 100644 index 0000000..c523ca2 --- /dev/null +++ b/CICMMetadata/java/generated/ScanType.java @@ -0,0 +1,198 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para ScanType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="ScanType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="File" type="{}FileType"/>
+ *         <element name="Checksums" type="{}ChecksumsType"/>
+ *         <element name="Scanner" type="{}ScannerType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="ScanProcessing" type="{}ScanProcessingType" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="OCR" type="{}OCRType" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ScanType", propOrder = { + "file", + "checksums", + "scanner", + "scanProcessing", + "ocr" +}) +public class ScanType { + + @XmlElement(name = "File", required = true) + protected FileType file; + @XmlElement(name = "Checksums", required = true) + protected ChecksumsType checksums; + @XmlElement(name = "Scanner") + protected List scanner; + @XmlElement(name = "ScanProcessing") + protected List scanProcessing; + @XmlElement(name = "OCR") + protected List ocr; + + /** + * Obtiene el valor de la propiedad file. + * + * @return + * possible object is + * {@link FileType } + * + */ + public FileType getFile() { + return file; + } + + /** + * Define el valor de la propiedad file. + * + * @param value + * allowed object is + * {@link FileType } + * + */ + public void setFile(FileType value) { + this.file = value; + } + + /** + * Obtiene el valor de la propiedad checksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getChecksums() { + return checksums; + } + + /** + * Define el valor de la propiedad checksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setChecksums(ChecksumsType value) { + this.checksums = value; + } + + /** + * Gets the value of the scanner property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the scanner property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getScanner().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ScannerType } + * + * + */ + public List getScanner() { + if (scanner == null) { + scanner = new ArrayList(); + } + return this.scanner; + } + + /** + * Gets the value of the scanProcessing property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the scanProcessing property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getScanProcessing().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link ScanProcessingType } + * + * + */ + public List getScanProcessing() { + if (scanProcessing == null) { + scanProcessing = new ArrayList(); + } + return this.scanProcessing; + } + + /** + * Gets the value of the ocr property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the ocr property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getOCR().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link OCRType } + * + * + */ + public List getOCR() { + if (ocr == null) { + ocr = new ArrayList(); + } + return this.ocr; + } + +} diff --git a/CICMMetadata/java/generated/ScannerType.java b/CICMMetadata/java/generated/ScannerType.java new file mode 100644 index 0000000..292a2af --- /dev/null +++ b/CICMMetadata/java/generated/ScannerType.java @@ -0,0 +1,211 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Information about scanning + * + *

Clase Java para ScannerType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="ScannerType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Author" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Manufacturer" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Model" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Serial" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Software" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="SoftwareVersion" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ScannerType", propOrder = { + "author", + "manufacturer", + "model", + "serial", + "software", + "softwareVersion" +}) +public class ScannerType { + + @XmlElement(name = "Author", required = true) + protected String author; + @XmlElement(name = "Manufacturer", required = true) + protected String manufacturer; + @XmlElement(name = "Model", required = true) + protected String model; + @XmlElement(name = "Serial", required = true) + protected String serial; + @XmlElement(name = "Software", required = true) + protected String software; + @XmlElement(name = "SoftwareVersion", required = true) + protected String softwareVersion; + + /** + * Obtiene el valor de la propiedad author. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAuthor() { + return author; + } + + /** + * Define el valor de la propiedad author. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAuthor(String value) { + this.author = value; + } + + /** + * Obtiene el valor de la propiedad manufacturer. + * + * @return + * possible object is + * {@link String } + * + */ + public String getManufacturer() { + return manufacturer; + } + + /** + * Define el valor de la propiedad manufacturer. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setManufacturer(String value) { + this.manufacturer = value; + } + + /** + * Obtiene el valor de la propiedad model. + * + * @return + * possible object is + * {@link String } + * + */ + public String getModel() { + return model; + } + + /** + * Define el valor de la propiedad model. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setModel(String value) { + this.model = value; + } + + /** + * Obtiene el valor de la propiedad serial. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSerial() { + return serial; + } + + /** + * Define el valor de la propiedad serial. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSerial(String value) { + this.serial = value; + } + + /** + * Obtiene el valor de la propiedad software. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSoftware() { + return software; + } + + /** + * Define el valor de la propiedad software. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSoftware(String value) { + this.software = value; + } + + /** + * Obtiene el valor de la propiedad softwareVersion. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSoftwareVersion() { + return softwareVersion; + } + + /** + * Define el valor de la propiedad softwareVersion. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setSoftwareVersion(String value) { + this.softwareVersion = value; + } + +} diff --git a/CICMMetadata/java/generated/ScansType.java b/CICMMetadata/java/generated/ScansType.java new file mode 100644 index 0000000..1833ae2 --- /dev/null +++ b/CICMMetadata/java/generated/ScansType.java @@ -0,0 +1,97 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para ScansType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="ScansType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CaseScan" type="{}CaseScanType" minOccurs="0"/>
+ *         <element name="Scan" type="{}MediaScanType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ScansType", propOrder = { + "caseScan", + "scan" +}) +public class ScansType { + + @XmlElement(name = "CaseScan") + protected CaseScanType caseScan; + @XmlElement(name = "Scan") + protected MediaScanType scan; + + /** + * Obtiene el valor de la propiedad caseScan. + * + * @return + * possible object is + * {@link CaseScanType } + * + */ + public CaseScanType getCaseScan() { + return caseScan; + } + + /** + * Define el valor de la propiedad caseScan. + * + * @param value + * allowed object is + * {@link CaseScanType } + * + */ + public void setCaseScan(CaseScanType value) { + this.caseScan = value; + } + + /** + * Obtiene el valor de la propiedad scan. + * + * @return + * possible object is + * {@link MediaScanType } + * + */ + public MediaScanType getScan() { + return scan; + } + + /** + * Define el valor de la propiedad scan. + * + * @param value + * allowed object is + * {@link MediaScanType } + * + */ + public void setScan(MediaScanType value) { + this.scan = value; + } + +} diff --git a/CICMMetadata/java/generated/SectorsType.java b/CICMMetadata/java/generated/SectorsType.java new file mode 100644 index 0000000..3a27ec9 --- /dev/null +++ b/CICMMetadata/java/generated/SectorsType.java @@ -0,0 +1,98 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + *

Clase Java para SectorsType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="SectorsType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>unsignedLong">
+ *       <attribute name="layer" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SectorsType", propOrder = { + "value" +}) +public class SectorsType { + + @XmlValue + @XmlSchemaType(name = "unsignedLong") + protected BigInteger value; + @XmlAttribute(name = "layer") + @XmlSchemaType(name = "unsignedInt") + protected Long layer; + + /** + * Obtiene el valor de la propiedad value. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getValue() { + return value; + } + + /** + * Define el valor de la propiedad value. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setValue(BigInteger value) { + this.value = value; + } + + /** + * Obtiene el valor de la propiedad layer. + * + * @return + * possible object is + * {@link Long } + * + */ + public Long getLayer() { + return layer; + } + + /** + * Define el valor de la propiedad layer. + * + * @param value + * allowed object is + * {@link Long } + * + */ + public void setLayer(Long value) { + this.layer = value; + } + +} diff --git a/CICMMetadata/java/generated/SecureDigitalType.java b/CICMMetadata/java/generated/SecureDigitalType.java new file mode 100644 index 0000000..8ab9337 --- /dev/null +++ b/CICMMetadata/java/generated/SecureDigitalType.java @@ -0,0 +1,155 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Contains SecureDigital device information + * + *

Clase Java para SecureDigitalType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="SecureDigitalType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="CID" type="{}DumpType"/>
+ *         <element name="CSD" type="{}DumpType" minOccurs="0"/>
+ *         <element name="SCR" type="{}DumpType" minOccurs="0"/>
+ *         <element name="OCR" type="{}DumpType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SecureDigitalType", propOrder = { + "cid", + "csd", + "scr", + "ocr" +}) +public class SecureDigitalType { + + @XmlElement(name = "CID", required = true) + protected DumpType cid; + @XmlElement(name = "CSD") + protected DumpType csd; + @XmlElement(name = "SCR") + protected DumpType scr; + @XmlElement(name = "OCR") + protected DumpType ocr; + + /** + * Obtiene el valor de la propiedad cid. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getCID() { + return cid; + } + + /** + * Define el valor de la propiedad cid. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setCID(DumpType value) { + this.cid = value; + } + + /** + * Obtiene el valor de la propiedad csd. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getCSD() { + return csd; + } + + /** + * Define el valor de la propiedad csd. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setCSD(DumpType value) { + this.csd = value; + } + + /** + * Obtiene el valor de la propiedad scr. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getSCR() { + return scr; + } + + /** + * Define el valor de la propiedad scr. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setSCR(DumpType value) { + this.scr = value; + } + + /** + * Obtiene el valor de la propiedad ocr. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getOCR() { + return ocr; + } + + /** + * Define el valor de la propiedad ocr. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setOCR(DumpType value) { + this.ocr = value; + } + +} diff --git a/CICMMetadata/java/generated/SecuritySectorsType.java b/CICMMetadata/java/generated/SecuritySectorsType.java new file mode 100644 index 0000000..15017ae --- /dev/null +++ b/CICMMetadata/java/generated/SecuritySectorsType.java @@ -0,0 +1,104 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + * Start and end of XGD's security sectors + * + * + *

Clase Java para SecuritySectorsType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="SecuritySectorsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Start" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="End" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SecuritySectorsType", propOrder = { + "start", + "end" +}) +public class SecuritySectorsType { + + @XmlElement(name = "Start", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger start; + @XmlElement(name = "End", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger end; + + /** + * Obtiene el valor de la propiedad start. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getStart() { + return start; + } + + /** + * Define el valor de la propiedad start. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setStart(BigInteger value) { + this.start = value; + } + + /** + * Obtiene el valor de la propiedad end. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getEnd() { + return end; + } + + /** + * Define el valor de la propiedad end. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setEnd(BigInteger value) { + this.end = value; + } + +} diff --git a/CICMMetadata/java/generated/SequenceType.java b/CICMMetadata/java/generated/SequenceType.java new file mode 100644 index 0000000..f9eec7d --- /dev/null +++ b/CICMMetadata/java/generated/SequenceType.java @@ -0,0 +1,190 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + * Sequence information about a disc + * + * + *

Clase Java para SequenceType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="SequenceType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="MediaTitle" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="MediaSequence" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
+ *         <element name="TotalMedia">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}unsignedInt">
+ *               <minInclusive value="1"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *         <element name="Side" minOccurs="0">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}unsignedByte">
+ *               <maxInclusive value="2"/>
+ *               <minInclusive value="1"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *         <element name="Layer" minOccurs="0">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}unsignedByte">
+ *               <minInclusive value="0"/>
+ *               <maxInclusive value="1"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SequenceType", propOrder = { + "mediaTitle", + "mediaSequence", + "totalMedia", + "side", + "layer" +}) +public class SequenceType { + + @XmlElement(name = "MediaTitle") + protected String mediaTitle; + @XmlElement(name = "MediaSequence") + @XmlSchemaType(name = "unsignedInt") + protected long mediaSequence; + @XmlElement(name = "TotalMedia") + protected long totalMedia; + @XmlElement(name = "Side") + protected Short side; + @XmlElement(name = "Layer") + protected Short layer; + + /** + * Obtiene el valor de la propiedad mediaTitle. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMediaTitle() { + return mediaTitle; + } + + /** + * Define el valor de la propiedad mediaTitle. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMediaTitle(String value) { + this.mediaTitle = value; + } + + /** + * Obtiene el valor de la propiedad mediaSequence. + * + */ + public long getMediaSequence() { + return mediaSequence; + } + + /** + * Define el valor de la propiedad mediaSequence. + * + */ + public void setMediaSequence(long value) { + this.mediaSequence = value; + } + + /** + * Obtiene el valor de la propiedad totalMedia. + * + */ + public long getTotalMedia() { + return totalMedia; + } + + /** + * Define el valor de la propiedad totalMedia. + * + */ + public void setTotalMedia(long value) { + this.totalMedia = value; + } + + /** + * Obtiene el valor de la propiedad side. + * + * @return + * possible object is + * {@link Short } + * + */ + public Short getSide() { + return side; + } + + /** + * Define el valor de la propiedad side. + * + * @param value + * allowed object is + * {@link Short } + * + */ + public void setSide(Short value) { + this.side = value; + } + + /** + * Obtiene el valor de la propiedad layer. + * + * @return + * possible object is + * {@link Short } + * + */ + public Short getLayer() { + return layer; + } + + /** + * Define el valor de la propiedad layer. + * + * @param value + * allowed object is + * {@link Short } + * + */ + public void setLayer(Short value) { + this.layer = value; + } + +} diff --git a/CICMMetadata/java/generated/SoftwareType.java b/CICMMetadata/java/generated/SoftwareType.java new file mode 100644 index 0000000..78649bd --- /dev/null +++ b/CICMMetadata/java/generated/SoftwareType.java @@ -0,0 +1,127 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Software used for disc reading + * + *

Clase Java para SoftwareType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="SoftwareType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Name" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="Version" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *         <element name="OperatingSystem" type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SoftwareType", propOrder = { + "name", + "version", + "operatingSystem" +}) +public class SoftwareType { + + @XmlElement(name = "Name", required = true) + protected String name; + @XmlElement(name = "Version", required = true) + protected String version; + @XmlElement(name = "OperatingSystem", required = true) + protected String operatingSystem; + + /** + * Obtiene el valor de la propiedad name. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Define el valor de la propiedad name. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Obtiene el valor de la propiedad version. + * + * @return + * possible object is + * {@link String } + * + */ + public String getVersion() { + return version; + } + + /** + * Define el valor de la propiedad version. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setVersion(String value) { + this.version = value; + } + + /** + * Obtiene el valor de la propiedad operatingSystem. + * + * @return + * possible object is + * {@link String } + * + */ + public String getOperatingSystem() { + return operatingSystem; + } + + /** + * Define el valor de la propiedad operatingSystem. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setOperatingSystem(String value) { + this.operatingSystem = value; + } + +} diff --git a/CICMMetadata/java/generated/SubChannelType.java b/CICMMetadata/java/generated/SubChannelType.java new file mode 100644 index 0000000..d43affc --- /dev/null +++ b/CICMMetadata/java/generated/SubChannelType.java @@ -0,0 +1,130 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + * Track's subchannel information + * + *

Clase Java para SubChannelType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="SubChannelType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Image" type="{}ImageType"/>
+ *         <element name="Size" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="Checksums" type="{}ChecksumsType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SubChannelType", propOrder = { + "image", + "size", + "checksums" +}) +public class SubChannelType { + + @XmlElement(name = "Image", required = true) + protected ImageType image; + @XmlElement(name = "Size", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger size; + @XmlElement(name = "Checksums", required = true) + protected ChecksumsType checksums; + + /** + * Obtiene el valor de la propiedad image. + * + * @return + * possible object is + * {@link ImageType } + * + */ + public ImageType getImage() { + return image; + } + + /** + * Define el valor de la propiedad image. + * + * @param value + * allowed object is + * {@link ImageType } + * + */ + public void setImage(ImageType value) { + this.image = value; + } + + /** + * Obtiene el valor de la propiedad size. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSize() { + return size; + } + + /** + * Define el valor de la propiedad size. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSize(BigInteger value) { + this.size = value; + } + + /** + * Obtiene el valor de la propiedad checksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getChecksums() { + return checksums; + } + + /** + * Define el valor de la propiedad checksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setChecksums(ChecksumsType value) { + this.checksums = value; + } + +} diff --git a/CICMMetadata/java/generated/SubcategoriesType.java b/CICMMetadata/java/generated/SubcategoriesType.java new file mode 100644 index 0000000..6a334b5 --- /dev/null +++ b/CICMMetadata/java/generated/SubcategoriesType.java @@ -0,0 +1,76 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para SubcategoriesType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="SubcategoriesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Subcategory" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SubcategoriesType", propOrder = { + "subcategory" +}) +public class SubcategoriesType { + + @XmlElement(name = "Subcategory", required = true) + protected List subcategory; + + /** + * Gets the value of the subcategory property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the subcategory property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSubcategory().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getSubcategory() { + if (subcategory == null) { + subcategory = new ArrayList(); + } + return this.subcategory; + } + +} diff --git a/CICMMetadata/java/generated/SubtitleTracksType.java b/CICMMetadata/java/generated/SubtitleTracksType.java new file mode 100644 index 0000000..17616fe --- /dev/null +++ b/CICMMetadata/java/generated/SubtitleTracksType.java @@ -0,0 +1,122 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para SubtitleTracksType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="SubtitleTracksType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Languages" type="{}LanguagesType" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="TrackNumber" use="required">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}unsignedInt">
+ *             <minInclusive value="1"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="Codec" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SubtitleTracksType", propOrder = { + "languages" +}) +public class SubtitleTracksType { + + @XmlElement(name = "Languages") + protected LanguagesType languages; + @XmlAttribute(name = "TrackNumber", required = true) + protected long trackNumber; + @XmlAttribute(name = "Codec", required = true) + protected String codec; + + /** + * Obtiene el valor de la propiedad languages. + * + * @return + * possible object is + * {@link LanguagesType } + * + */ + public LanguagesType getLanguages() { + return languages; + } + + /** + * Define el valor de la propiedad languages. + * + * @param value + * allowed object is + * {@link LanguagesType } + * + */ + public void setLanguages(LanguagesType value) { + this.languages = value; + } + + /** + * Obtiene el valor de la propiedad trackNumber. + * + */ + public long getTrackNumber() { + return trackNumber; + } + + /** + * Define el valor de la propiedad trackNumber. + * + */ + public void setTrackNumber(long value) { + this.trackNumber = value; + } + + /** + * Obtiene el valor de la propiedad codec. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCodec() { + return codec; + } + + /** + * Define el valor de la propiedad codec. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCodec(String value) { + this.codec = value; + } + +} diff --git a/CICMMetadata/java/generated/SystemsType.java b/CICMMetadata/java/generated/SystemsType.java new file mode 100644 index 0000000..0dc9d85 --- /dev/null +++ b/CICMMetadata/java/generated/SystemsType.java @@ -0,0 +1,76 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para SystemsType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="SystemsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="System" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "SystemsType", propOrder = { + "system" +}) +public class SystemsType { + + @XmlElement(name = "System") + protected List system; + + /** + * Gets the value of the system property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the system property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSystem().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link String } + * + * + */ + public List getSystem() { + if (system == null) { + system = new ArrayList(); + } + return this.system; + } + +} diff --git a/CICMMetadata/java/generated/TapeFileType.java b/CICMMetadata/java/generated/TapeFileType.java new file mode 100644 index 0000000..ec401ba --- /dev/null +++ b/CICMMetadata/java/generated/TapeFileType.java @@ -0,0 +1,246 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + * Tape file information + * + *

Clase Java para TapeFileType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="TapeFileType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Image" type="{}ImageType"/>
+ *         <element name="Size" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="Sequence" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="BlockSize" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="StartBlock" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="EndBlock" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="Checksums" type="{}ChecksumsType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TapeFileType", propOrder = { + "image", + "size", + "sequence", + "blockSize", + "startBlock", + "endBlock", + "checksums" +}) +public class TapeFileType { + + @XmlElement(name = "Image", required = true) + protected ImageType image; + @XmlElement(name = "Size", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger size; + @XmlElement(name = "Sequence", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger sequence; + @XmlElement(name = "BlockSize", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger blockSize; + @XmlElement(name = "StartBlock", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger startBlock; + @XmlElement(name = "EndBlock", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger endBlock; + @XmlElement(name = "Checksums", required = true) + protected ChecksumsType checksums; + + /** + * Obtiene el valor de la propiedad image. + * + * @return + * possible object is + * {@link ImageType } + * + */ + public ImageType getImage() { + return image; + } + + /** + * Define el valor de la propiedad image. + * + * @param value + * allowed object is + * {@link ImageType } + * + */ + public void setImage(ImageType value) { + this.image = value; + } + + /** + * Obtiene el valor de la propiedad size. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSize() { + return size; + } + + /** + * Define el valor de la propiedad size. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSize(BigInteger value) { + this.size = value; + } + + /** + * Obtiene el valor de la propiedad sequence. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSequence() { + return sequence; + } + + /** + * Define el valor de la propiedad sequence. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSequence(BigInteger value) { + this.sequence = value; + } + + /** + * Obtiene el valor de la propiedad blockSize. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getBlockSize() { + return blockSize; + } + + /** + * Define el valor de la propiedad blockSize. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setBlockSize(BigInteger value) { + this.blockSize = value; + } + + /** + * Obtiene el valor de la propiedad startBlock. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getStartBlock() { + return startBlock; + } + + /** + * Define el valor de la propiedad startBlock. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setStartBlock(BigInteger value) { + this.startBlock = value; + } + + /** + * Obtiene el valor de la propiedad endBlock. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getEndBlock() { + return endBlock; + } + + /** + * Define el valor de la propiedad endBlock. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setEndBlock(BigInteger value) { + this.endBlock = value; + } + + /** + * Obtiene el valor de la propiedad checksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getChecksums() { + return checksums; + } + + /** + * Define el valor de la propiedad checksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setChecksums(ChecksumsType value) { + this.checksums = value; + } + +} diff --git a/CICMMetadata/java/generated/TapeInformationType.java b/CICMMetadata/java/generated/TapeInformationType.java new file mode 100644 index 0000000..556cd86 --- /dev/null +++ b/CICMMetadata/java/generated/TapeInformationType.java @@ -0,0 +1,76 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para TapeInformationType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="TapeInformationType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Partition" type="{}TapePartitionType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TapeInformationType", propOrder = { + "partition" +}) +public class TapeInformationType { + + @XmlElement(name = "Partition", required = true) + protected List partition; + + /** + * Gets the value of the partition property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the partition property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getPartition().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link TapePartitionType } + * + * + */ + public List getPartition() { + if (partition == null) { + partition = new ArrayList(); + } + return this.partition; + } + +} diff --git a/CICMMetadata/java/generated/TapePartitionType.java b/CICMMetadata/java/generated/TapePartitionType.java new file mode 100644 index 0000000..570dad0 --- /dev/null +++ b/CICMMetadata/java/generated/TapePartitionType.java @@ -0,0 +1,254 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + * Partition information + * + *

Clase Java para TapePartitionType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="TapePartitionType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Image" type="{}ImageType"/>
+ *         <element name="Size" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="Sequence" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="StartBlock" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="EndBlock" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="Checksums" type="{}ChecksumsType"/>
+ *         <sequence>
+ *           <element name="File" type="{}TapeFileType" maxOccurs="unbounded"/>
+ *         </sequence>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TapePartitionType", propOrder = { + "image", + "size", + "sequence", + "startBlock", + "endBlock", + "checksums", + "file" +}) +public class TapePartitionType { + + @XmlElement(name = "Image", required = true) + protected ImageType image; + @XmlElement(name = "Size", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger size; + @XmlElement(name = "Sequence", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger sequence; + @XmlElement(name = "StartBlock", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger startBlock; + @XmlElement(name = "EndBlock", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger endBlock; + @XmlElement(name = "Checksums", required = true) + protected ChecksumsType checksums; + @XmlElement(name = "File", required = true) + protected List file; + + /** + * Obtiene el valor de la propiedad image. + * + * @return + * possible object is + * {@link ImageType } + * + */ + public ImageType getImage() { + return image; + } + + /** + * Define el valor de la propiedad image. + * + * @param value + * allowed object is + * {@link ImageType } + * + */ + public void setImage(ImageType value) { + this.image = value; + } + + /** + * Obtiene el valor de la propiedad size. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSize() { + return size; + } + + /** + * Define el valor de la propiedad size. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSize(BigInteger value) { + this.size = value; + } + + /** + * Obtiene el valor de la propiedad sequence. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSequence() { + return sequence; + } + + /** + * Define el valor de la propiedad sequence. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSequence(BigInteger value) { + this.sequence = value; + } + + /** + * Obtiene el valor de la propiedad startBlock. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getStartBlock() { + return startBlock; + } + + /** + * Define el valor de la propiedad startBlock. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setStartBlock(BigInteger value) { + this.startBlock = value; + } + + /** + * Obtiene el valor de la propiedad endBlock. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getEndBlock() { + return endBlock; + } + + /** + * Define el valor de la propiedad endBlock. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setEndBlock(BigInteger value) { + this.endBlock = value; + } + + /** + * Obtiene el valor de la propiedad checksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getChecksums() { + return checksums; + } + + /** + * Define el valor de la propiedad checksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setChecksums(ChecksumsType value) { + this.checksums = value; + } + + /** + * Gets the value of the file property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the file property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getFile().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link TapeFileType } + * + * + */ + public List getFile() { + if (file == null) { + file = new ArrayList(); + } + return this.file; + } + +} diff --git a/CICMMetadata/java/generated/TrackFlagsType.java b/CICMMetadata/java/generated/TrackFlagsType.java new file mode 100644 index 0000000..964a867 --- /dev/null +++ b/CICMMetadata/java/generated/TrackFlagsType.java @@ -0,0 +1,141 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para TrackFlagsType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="TrackFlagsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Quadraphonic">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}boolean">
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *         <element name="Data">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}boolean">
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *         <element name="CopyPermitted">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}boolean">
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *         <element name="PreEmphasis">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}boolean">
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TrackFlagsType", propOrder = { + "quadraphonic", + "data", + "copyPermitted", + "preEmphasis" +}) +public class TrackFlagsType { + + @XmlElement(name = "Quadraphonic") + protected boolean quadraphonic; + @XmlElement(name = "Data") + protected boolean data; + @XmlElement(name = "CopyPermitted") + protected boolean copyPermitted; + @XmlElement(name = "PreEmphasis") + protected boolean preEmphasis; + + /** + * Obtiene el valor de la propiedad quadraphonic. + * + */ + public boolean isQuadraphonic() { + return quadraphonic; + } + + /** + * Define el valor de la propiedad quadraphonic. + * + */ + public void setQuadraphonic(boolean value) { + this.quadraphonic = value; + } + + /** + * Obtiene el valor de la propiedad data. + * + */ + public boolean isData() { + return data; + } + + /** + * Define el valor de la propiedad data. + * + */ + public void setData(boolean value) { + this.data = value; + } + + /** + * Obtiene el valor de la propiedad copyPermitted. + * + */ + public boolean isCopyPermitted() { + return copyPermitted; + } + + /** + * Define el valor de la propiedad copyPermitted. + * + */ + public void setCopyPermitted(boolean value) { + this.copyPermitted = value; + } + + /** + * Obtiene el valor de la propiedad preEmphasis. + * + */ + public boolean isPreEmphasis() { + return preEmphasis; + } + + /** + * Define el valor de la propiedad preEmphasis. + * + */ + public void setPreEmphasis(boolean value) { + this.preEmphasis = value; + } + +} diff --git a/CICMMetadata/java/generated/TrackIndexType.java b/CICMMetadata/java/generated/TrackIndexType.java new file mode 100644 index 0000000..b6c4ecb --- /dev/null +++ b/CICMMetadata/java/generated/TrackIndexType.java @@ -0,0 +1,80 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; + + +/** + *

Clase Java para TrackIndexType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="TrackIndexType">
+ *   <simpleContent>
+ *     <extension base="<http://www.w3.org/2001/XMLSchema>int">
+ *       <attribute name="index" use="required" type="{http://www.w3.org/2001/XMLSchema}unsignedShort" />
+ *     </extension>
+ *   </simpleContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TrackIndexType", propOrder = { + "value" +}) +public class TrackIndexType { + + @XmlValue + protected int value; + @XmlAttribute(name = "index", required = true) + @XmlSchemaType(name = "unsignedShort") + protected int index; + + /** + * Obtiene el valor de la propiedad value. + * + */ + public int getValue() { + return value; + } + + /** + * Define el valor de la propiedad value. + * + */ + public void setValue(int value) { + this.value = value; + } + + /** + * Obtiene el valor de la propiedad index. + * + */ + public int getIndex() { + return index; + } + + /** + * Define el valor de la propiedad index. + * + */ + public void setIndex(int value) { + this.index = value; + } + +} diff --git a/CICMMetadata/java/generated/TrackIndexesType.java b/CICMMetadata/java/generated/TrackIndexesType.java new file mode 100644 index 0000000..52ab2a1 --- /dev/null +++ b/CICMMetadata/java/generated/TrackIndexesType.java @@ -0,0 +1,76 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para TrackIndexesType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="TrackIndexesType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Index" type="{}TrackIndexType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TrackIndexesType", propOrder = { + "index" +}) +public class TrackIndexesType { + + @XmlElement(name = "Index", required = true) + protected List index; + + /** + * Gets the value of the index property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the index property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getIndex().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link TrackIndexType } + * + * + */ + public List getIndex() { + if (index == null) { + index = new ArrayList(); + } + return this.index; + } + +} diff --git a/CICMMetadata/java/generated/TrackSequenceType.java b/CICMMetadata/java/generated/TrackSequenceType.java new file mode 100644 index 0000000..83fc43c --- /dev/null +++ b/CICMMetadata/java/generated/TrackSequenceType.java @@ -0,0 +1,92 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + * Sequence information about a track + * + * + *

Clase Java para TrackSequenceType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="TrackSequenceType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="TrackNumber" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
+ *         <element name="Session">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}unsignedInt">
+ *               <minInclusive value="1"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TrackSequenceType", propOrder = { + "trackNumber", + "session" +}) +public class TrackSequenceType { + + @XmlElement(name = "TrackNumber") + @XmlSchemaType(name = "unsignedInt") + protected long trackNumber; + @XmlElement(name = "Session") + protected long session; + + /** + * Obtiene el valor de la propiedad trackNumber. + * + */ + public long getTrackNumber() { + return trackNumber; + } + + /** + * Define el valor de la propiedad trackNumber. + * + */ + public void setTrackNumber(long value) { + this.trackNumber = value; + } + + /** + * Obtiene el valor de la propiedad session. + * + */ + public long getSession() { + return session; + } + + /** + * Define el valor de la propiedad session. + * + */ + public void setSession(long value) { + this.session = value; + } + +} diff --git a/CICMMetadata/java/generated/TrackType.java b/CICMMetadata/java/generated/TrackType.java new file mode 100644 index 0000000..f69657a --- /dev/null +++ b/CICMMetadata/java/generated/TrackType.java @@ -0,0 +1,504 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.math.BigInteger; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + * Track information + * + *

Clase Java para TrackType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="TrackType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Image" type="{}ImageType"/>
+ *         <element name="Size" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="Sequence" type="{}TrackSequenceType"/>
+ *         <element name="StartMSF" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="EndMSF" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="StartSector" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="EndSector" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
+ *         <element name="Indexes" type="{}TrackIndexesType" minOccurs="0"/>
+ *         <element name="Flags" type="{}TrackFlagsType" minOccurs="0"/>
+ *         <element name="ISRC" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="TrackType">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *               <enumeration value="audio"/>
+ *               <enumeration value="mode0"/>
+ *               <enumeration value="mode1"/>
+ *               <enumeration value="mode2"/>
+ *               <enumeration value="m2f1"/>
+ *               <enumeration value="m2f2"/>
+ *               <enumeration value="dvd"/>
+ *               <enumeration value="hddvd"/>
+ *               <enumeration value="bluray"/>
+ *               <enumeration value="ddcd"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *         <element name="BytesPerSector" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
+ *         <element name="AccoustID" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Checksums" type="{}ChecksumsType"/>
+ *         <element name="SubChannel" type="{}SubChannelType" minOccurs="0"/>
+ *         <element name="FileSystemInformation" type="{}FileSystemInformationType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "TrackType", propOrder = { + "image", + "size", + "sequence", + "startMSF", + "endMSF", + "startSector", + "endSector", + "indexes", + "flags", + "isrc", + "trackType", + "bytesPerSector", + "accoustID", + "checksums", + "subChannel", + "fileSystemInformation" +}) +public class TrackType { + + @XmlElement(name = "Image", required = true) + protected ImageType image; + @XmlElement(name = "Size", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger size; + @XmlElement(name = "Sequence", required = true) + protected TrackSequenceType sequence; + @XmlElement(name = "StartMSF") + protected String startMSF; + @XmlElement(name = "EndMSF") + protected String endMSF; + @XmlElement(name = "StartSector", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger startSector; + @XmlElement(name = "EndSector", required = true) + @XmlSchemaType(name = "unsignedLong") + protected BigInteger endSector; + @XmlElement(name = "Indexes") + protected TrackIndexesType indexes; + @XmlElement(name = "Flags") + protected TrackFlagsType flags; + @XmlElement(name = "ISRC") + protected String isrc; + @XmlElement(name = "TrackType", required = true) + protected String trackType; + @XmlElement(name = "BytesPerSector") + @XmlSchemaType(name = "unsignedInt") + protected long bytesPerSector; + @XmlElement(name = "AccoustID") + protected String accoustID; + @XmlElement(name = "Checksums", required = true) + protected ChecksumsType checksums; + @XmlElement(name = "SubChannel") + protected SubChannelType subChannel; + @XmlElement(name = "FileSystemInformation") + protected FileSystemInformationType fileSystemInformation; + + /** + * Obtiene el valor de la propiedad image. + * + * @return + * possible object is + * {@link ImageType } + * + */ + public ImageType getImage() { + return image; + } + + /** + * Define el valor de la propiedad image. + * + * @param value + * allowed object is + * {@link ImageType } + * + */ + public void setImage(ImageType value) { + this.image = value; + } + + /** + * Obtiene el valor de la propiedad size. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getSize() { + return size; + } + + /** + * Define el valor de la propiedad size. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setSize(BigInteger value) { + this.size = value; + } + + /** + * Obtiene el valor de la propiedad sequence. + * + * @return + * possible object is + * {@link TrackSequenceType } + * + */ + public TrackSequenceType getSequence() { + return sequence; + } + + /** + * Define el valor de la propiedad sequence. + * + * @param value + * allowed object is + * {@link TrackSequenceType } + * + */ + public void setSequence(TrackSequenceType value) { + this.sequence = value; + } + + /** + * Obtiene el valor de la propiedad startMSF. + * + * @return + * possible object is + * {@link String } + * + */ + public String getStartMSF() { + return startMSF; + } + + /** + * Define el valor de la propiedad startMSF. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setStartMSF(String value) { + this.startMSF = value; + } + + /** + * Obtiene el valor de la propiedad endMSF. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEndMSF() { + return endMSF; + } + + /** + * Define el valor de la propiedad endMSF. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEndMSF(String value) { + this.endMSF = value; + } + + /** + * Obtiene el valor de la propiedad startSector. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getStartSector() { + return startSector; + } + + /** + * Define el valor de la propiedad startSector. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setStartSector(BigInteger value) { + this.startSector = value; + } + + /** + * Obtiene el valor de la propiedad endSector. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + public BigInteger getEndSector() { + return endSector; + } + + /** + * Define el valor de la propiedad endSector. + * + * @param value + * allowed object is + * {@link BigInteger } + * + */ + public void setEndSector(BigInteger value) { + this.endSector = value; + } + + /** + * Obtiene el valor de la propiedad indexes. + * + * @return + * possible object is + * {@link TrackIndexesType } + * + */ + public TrackIndexesType getIndexes() { + return indexes; + } + + /** + * Define el valor de la propiedad indexes. + * + * @param value + * allowed object is + * {@link TrackIndexesType } + * + */ + public void setIndexes(TrackIndexesType value) { + this.indexes = value; + } + + /** + * Obtiene el valor de la propiedad flags. + * + * @return + * possible object is + * {@link TrackFlagsType } + * + */ + public TrackFlagsType getFlags() { + return flags; + } + + /** + * Define el valor de la propiedad flags. + * + * @param value + * allowed object is + * {@link TrackFlagsType } + * + */ + public void setFlags(TrackFlagsType value) { + this.flags = value; + } + + /** + * Obtiene el valor de la propiedad isrc. + * + * @return + * possible object is + * {@link String } + * + */ + public String getISRC() { + return isrc; + } + + /** + * Define el valor de la propiedad isrc. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setISRC(String value) { + this.isrc = value; + } + + /** + * Obtiene el valor de la propiedad trackType. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTrackType() { + return trackType; + } + + /** + * Define el valor de la propiedad trackType. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTrackType(String value) { + this.trackType = value; + } + + /** + * Obtiene el valor de la propiedad bytesPerSector. + * + */ + public long getBytesPerSector() { + return bytesPerSector; + } + + /** + * Define el valor de la propiedad bytesPerSector. + * + */ + public void setBytesPerSector(long value) { + this.bytesPerSector = value; + } + + /** + * Obtiene el valor de la propiedad accoustID. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAccoustID() { + return accoustID; + } + + /** + * Define el valor de la propiedad accoustID. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAccoustID(String value) { + this.accoustID = value; + } + + /** + * Obtiene el valor de la propiedad checksums. + * + * @return + * possible object is + * {@link ChecksumsType } + * + */ + public ChecksumsType getChecksums() { + return checksums; + } + + /** + * Define el valor de la propiedad checksums. + * + * @param value + * allowed object is + * {@link ChecksumsType } + * + */ + public void setChecksums(ChecksumsType value) { + this.checksums = value; + } + + /** + * Obtiene el valor de la propiedad subChannel. + * + * @return + * possible object is + * {@link SubChannelType } + * + */ + public SubChannelType getSubChannel() { + return subChannel; + } + + /** + * Define el valor de la propiedad subChannel. + * + * @param value + * allowed object is + * {@link SubChannelType } + * + */ + public void setSubChannel(SubChannelType value) { + this.subChannel = value; + } + + /** + * Obtiene el valor de la propiedad fileSystemInformation. + * + * @return + * possible object is + * {@link FileSystemInformationType } + * + */ + public FileSystemInformationType getFileSystemInformation() { + return fileSystemInformation; + } + + /** + * Define el valor de la propiedad fileSystemInformation. + * + * @param value + * allowed object is + * {@link FileSystemInformationType } + * + */ + public void setFileSystemInformation(FileSystemInformationType value) { + this.fileSystemInformation = value; + } + +} diff --git a/CICMMetadata/java/generated/USBType.java b/CICMMetadata/java/generated/USBType.java new file mode 100644 index 0000000..66c5159 --- /dev/null +++ b/CICMMetadata/java/generated/USBType.java @@ -0,0 +1,125 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * Contains USB device information + * + *

Clase Java para USBType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="USBType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="VendorID">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}unsignedShort">
+ *               <minInclusive value="1"/>
+ *               <maxInclusive value="65534"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *         <element name="ProductID">
+ *           <simpleType>
+ *             <restriction base="{http://www.w3.org/2001/XMLSchema}unsignedShort">
+ *               <minInclusive value="1"/>
+ *               <maxInclusive value="65534"/>
+ *             </restriction>
+ *           </simpleType>
+ *         </element>
+ *         <element name="Descriptors" type="{}DumpType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "USBType", propOrder = { + "vendorID", + "productID", + "descriptors" +}) +public class USBType { + + @XmlElement(name = "VendorID") + protected int vendorID; + @XmlElement(name = "ProductID") + protected int productID; + @XmlElement(name = "Descriptors") + protected DumpType descriptors; + + /** + * Obtiene el valor de la propiedad vendorID. + * + */ + public int getVendorID() { + return vendorID; + } + + /** + * Define el valor de la propiedad vendorID. + * + */ + public void setVendorID(int value) { + this.vendorID = value; + } + + /** + * Obtiene el valor de la propiedad productID. + * + */ + public int getProductID() { + return productID; + } + + /** + * Define el valor de la propiedad productID. + * + */ + public void setProductID(int value) { + this.productID = value; + } + + /** + * Obtiene el valor de la propiedad descriptors. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getDescriptors() { + return descriptors; + } + + /** + * Define el valor de la propiedad descriptors. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setDescriptors(DumpType value) { + this.descriptors = value; + } + +} diff --git a/CICMMetadata/java/generated/UserManualType.java b/CICMMetadata/java/generated/UserManualType.java new file mode 100644 index 0000000..ab538b0 --- /dev/null +++ b/CICMMetadata/java/generated/UserManualType.java @@ -0,0 +1,150 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + * User manual or user guide accompanying this set. Can be more than one. + * + * + *

Clase Java para UserManualType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="UserManualType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Language" type="{}LanguagesType" minOccurs="0"/>
+ *         <element name="Pages" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
+ *         <element name="PageSize" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *         <element name="Scan" type="{}ScanType" minOccurs="0"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "UserManualType", propOrder = { + "language", + "pages", + "pageSize", + "scan" +}) +public class UserManualType { + + @XmlElement(name = "Language") + protected LanguagesType language; + @XmlElement(name = "Pages") + @XmlSchemaType(name = "unsignedInt") + protected long pages; + @XmlElement(name = "PageSize") + protected String pageSize; + @XmlElement(name = "Scan") + protected ScanType scan; + + /** + * Obtiene el valor de la propiedad language. + * + * @return + * possible object is + * {@link LanguagesType } + * + */ + public LanguagesType getLanguage() { + return language; + } + + /** + * Define el valor de la propiedad language. + * + * @param value + * allowed object is + * {@link LanguagesType } + * + */ + public void setLanguage(LanguagesType value) { + this.language = value; + } + + /** + * Obtiene el valor de la propiedad pages. + * + */ + public long getPages() { + return pages; + } + + /** + * Define el valor de la propiedad pages. + * + */ + public void setPages(long value) { + this.pages = value; + } + + /** + * Obtiene el valor de la propiedad pageSize. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPageSize() { + return pageSize; + } + + /** + * Define el valor de la propiedad pageSize. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPageSize(String value) { + this.pageSize = value; + } + + /** + * Obtiene el valor de la propiedad scan. + * + * @return + * possible object is + * {@link ScanType } + * + */ + public ScanType getScan() { + return scan; + } + + /** + * Define el valor de la propiedad scan. + * + * @param value + * allowed object is + * {@link ScanType } + * + */ + public void setScan(ScanType value) { + this.scan = value; + } + +} diff --git a/CICMMetadata/java/generated/VariableBlockSizeType.java b/CICMMetadata/java/generated/VariableBlockSizeType.java new file mode 100644 index 0000000..e458a01 --- /dev/null +++ b/CICMMetadata/java/generated/VariableBlockSizeType.java @@ -0,0 +1,76 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para VariableBlockSizeType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="VariableBlockSizeType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="BlockSize" type="{}BlockSizeType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "VariableBlockSizeType", propOrder = { + "blockSize" +}) +public class VariableBlockSizeType { + + @XmlElement(name = "BlockSize", required = true) + protected List blockSize; + + /** + * Gets the value of the blockSize property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the blockSize property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getBlockSize().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link BlockSizeType } + * + * + */ + public List getBlockSize() { + if (blockSize == null) { + blockSize = new ArrayList(); + } + return this.blockSize; + } + +} diff --git a/CICMMetadata/java/generated/VideoTracksType.java b/CICMMetadata/java/generated/VideoTracksType.java new file mode 100644 index 0000000..4cd675f --- /dev/null +++ b/CICMMetadata/java/generated/VideoTracksType.java @@ -0,0 +1,201 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para VideoTracksType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="VideoTracksType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="Languages" type="{}LanguagesType" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="TrackNumber" use="required">
+ *         <simpleType>
+ *           <restriction base="{http://www.w3.org/2001/XMLSchema}unsignedInt">
+ *             <minInclusive value="1"/>
+ *           </restriction>
+ *         </simpleType>
+ *       </attribute>
+ *       <attribute name="Codec" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="Horizontal" use="required" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
+ *       <attribute name="Vertical" use="required" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" />
+ *       <attribute name="MeanBitrate" use="required" type="{http://www.w3.org/2001/XMLSchema}long" />
+ *       <attribute name="ThreeD" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "VideoTracksType", propOrder = { + "languages" +}) +public class VideoTracksType { + + @XmlElement(name = "Languages") + protected LanguagesType languages; + @XmlAttribute(name = "TrackNumber", required = true) + protected long trackNumber; + @XmlAttribute(name = "Codec", required = true) + protected String codec; + @XmlAttribute(name = "Horizontal", required = true) + @XmlSchemaType(name = "unsignedInt") + protected long horizontal; + @XmlAttribute(name = "Vertical", required = true) + @XmlSchemaType(name = "unsignedInt") + protected long vertical; + @XmlAttribute(name = "MeanBitrate", required = true) + protected long meanBitrate; + @XmlAttribute(name = "ThreeD", required = true) + protected boolean threeD; + + /** + * Obtiene el valor de la propiedad languages. + * + * @return + * possible object is + * {@link LanguagesType } + * + */ + public LanguagesType getLanguages() { + return languages; + } + + /** + * Define el valor de la propiedad languages. + * + * @param value + * allowed object is + * {@link LanguagesType } + * + */ + public void setLanguages(LanguagesType value) { + this.languages = value; + } + + /** + * Obtiene el valor de la propiedad trackNumber. + * + */ + public long getTrackNumber() { + return trackNumber; + } + + /** + * Define el valor de la propiedad trackNumber. + * + */ + public void setTrackNumber(long value) { + this.trackNumber = value; + } + + /** + * Obtiene el valor de la propiedad codec. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCodec() { + return codec; + } + + /** + * Define el valor de la propiedad codec. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCodec(String value) { + this.codec = value; + } + + /** + * Obtiene el valor de la propiedad horizontal. + * + */ + public long getHorizontal() { + return horizontal; + } + + /** + * Define el valor de la propiedad horizontal. + * + */ + public void setHorizontal(long value) { + this.horizontal = value; + } + + /** + * Obtiene el valor de la propiedad vertical. + * + */ + public long getVertical() { + return vertical; + } + + /** + * Define el valor de la propiedad vertical. + * + */ + public void setVertical(long value) { + this.vertical = value; + } + + /** + * Obtiene el valor de la propiedad meanBitrate. + * + */ + public long getMeanBitrate() { + return meanBitrate; + } + + /** + * Define el valor de la propiedad meanBitrate. + * + */ + public void setMeanBitrate(long value) { + this.meanBitrate = value; + } + + /** + * Obtiene el valor de la propiedad threeD. + * + */ + public boolean isThreeD() { + return threeD; + } + + /** + * Define el valor de la propiedad threeD. + * + */ + public void setThreeD(boolean value) { + this.threeD = value; + } + +} diff --git a/CICMMetadata/java/generated/XboxSecuritySectorsType.java b/CICMMetadata/java/generated/XboxSecuritySectorsType.java new file mode 100644 index 0000000..2e541dc --- /dev/null +++ b/CICMMetadata/java/generated/XboxSecuritySectorsType.java @@ -0,0 +1,112 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlSchemaType; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para XboxSecuritySectorsType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="XboxSecuritySectorsType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="RequestVersion" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
+ *         <element name="RequestNumber" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
+ *         <element name="SecuritySectors" type="{}DumpType"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "XboxSecuritySectorsType", propOrder = { + "requestVersion", + "requestNumber", + "securitySectors" +}) +public class XboxSecuritySectorsType { + + @XmlElement(name = "RequestVersion") + @XmlSchemaType(name = "unsignedInt") + protected long requestVersion; + @XmlElement(name = "RequestNumber") + @XmlSchemaType(name = "unsignedInt") + protected long requestNumber; + @XmlElement(name = "SecuritySectors", required = true) + protected DumpType securitySectors; + + /** + * Obtiene el valor de la propiedad requestVersion. + * + */ + public long getRequestVersion() { + return requestVersion; + } + + /** + * Define el valor de la propiedad requestVersion. + * + */ + public void setRequestVersion(long value) { + this.requestVersion = value; + } + + /** + * Obtiene el valor de la propiedad requestNumber. + * + */ + public long getRequestNumber() { + return requestNumber; + } + + /** + * Define el valor de la propiedad requestNumber. + * + */ + public void setRequestNumber(long value) { + this.requestNumber = value; + } + + /** + * Obtiene el valor de la propiedad securitySectors. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getSecuritySectors() { + return securitySectors; + } + + /** + * Define el valor de la propiedad securitySectors. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setSecuritySectors(DumpType value) { + this.securitySectors = value; + } + +} diff --git a/CICMMetadata/java/generated/XboxType.java b/CICMMetadata/java/generated/XboxType.java new file mode 100644 index 0000000..fcc3a14 --- /dev/null +++ b/CICMMetadata/java/generated/XboxType.java @@ -0,0 +1,132 @@ +// +// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.8-b130911.1802 +// Visite http://java.sun.com/xml/jaxb +// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen. +// Generado el: 2020.07.12 a las 10:42:39 PM WEST +// + + +package generated; + +import java.util.ArrayList; +import java.util.List; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + + +/** + *

Clase Java para XboxType complex type. + * + *

El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. + * + *

+ * <complexType name="XboxType">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="PFI" type="{}DumpType"/>
+ *         <element name="DMI" type="{}DumpType"/>
+ *         <element name="SecuritySectors" type="{}XboxSecuritySectorsType" maxOccurs="unbounded"/>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "XboxType", propOrder = { + "pfi", + "dmi", + "securitySectors" +}) +public class XboxType { + + @XmlElement(name = "PFI", required = true) + protected DumpType pfi; + @XmlElement(name = "DMI", required = true) + protected DumpType dmi; + @XmlElement(name = "SecuritySectors", required = true) + protected List securitySectors; + + /** + * Obtiene el valor de la propiedad pfi. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getPFI() { + return pfi; + } + + /** + * Define el valor de la propiedad pfi. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setPFI(DumpType value) { + this.pfi = value; + } + + /** + * Obtiene el valor de la propiedad dmi. + * + * @return + * possible object is + * {@link DumpType } + * + */ + public DumpType getDMI() { + return dmi; + } + + /** + * Define el valor de la propiedad dmi. + * + * @param value + * allowed object is + * {@link DumpType } + * + */ + public void setDMI(DumpType value) { + this.dmi = value; + } + + /** + * Gets the value of the securitySectors property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the securitySectors property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getSecuritySectors().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link XboxSecuritySectorsType } + * + * + */ + public List getSecuritySectors() { + if (securitySectors == null) { + securitySectors = new ArrayList(); + } + return this.securitySectors; + } + +} diff --git a/CICMMetadata/samples/advertisement.xml b/CICMMetadata/samples/advertisement.xml new file mode 100644 index 0000000..1587e8e --- /dev/null +++ b/CICMMetadata/samples/advertisement.xml @@ -0,0 +1,56 @@ + + + Nintendo + Luigi's Mansion 2 + + advertising + nintendo + 3DS + + + Game + + + Platformer + + + spa + + + System + + + Nintendo + Luigi's Mansion 2 + luigi_mansion2_ad.ts + 8509632 + 501 + 20 + 25 + + 8818e1db + bdc169fd31d3142067c532013e7c2446 + 521709692e8551748f0d14c791fba823d268cef3 + d28bf7829846cdcc633699f51e551b332bb10ef3f596bdf8948ec0b390f4f3e0 + 8b4aaa13b8f417482a8e37293aa33235a1236582fefd63e9 + 5ac087379b37afb22f65b0f6f2208c2e44708ea0bec0c233ab3ee5b85312fa4e656cc092e160f8626343033937aec90eadd674ee3e714f1243ff9e47285f8fae + 196608:KPzYb83jgXvTbe8Z48I5qKki6VaBK+qxLrP:szYbOjovTjvjKWV5xX + + + + + Xplora + DVB-T + 2013-04-02T07:15:00 + + ArgusTV + 2.0 + Windows 8 Professional + + + 28.1666667 + 15.4166667 + + + + diff --git a/CICMMetadata/samples/floppy_and_cd.xml b/CICMMetadata/samples/floppy_and_cd.xml new file mode 100644 index 0000000..e200ab3 --- /dev/null +++ b/CICMMetadata/samples/floppy_and_cd.xml @@ -0,0 +1,241 @@ + + + Be + BeOS + R4 + Retail + 1998-11-04 + + BeOS + + + Operating System + + + eng + + + i686 + Gestalt 67 + Gestalt 58 + Gestalt 69 + Gestalt 68 + Gestalt 108 + Gestalt 109 + Gestalt 514 + + + ia32 + ppc + + + BeOS R4 (Retail).cue + 174 + + 1 + 1 + + + c7e095e1fc98e98b36b8cde5b003f08d + 4f5a6b4e11bf644b1f77566b8149acab15db4276 + d7eba58afdc121da4fb47418c9d328393670bb58095baf035ca6c29d33300ccf + e5c5f17baa5dfcc6793808321b90ca8a2a396acdf5ea950d + f1902ad54a53c45a535b5ae456f000980463ddeef51e4b1510f1a5e0b79f6fa4e1460eb2d97253b7d68b83995003f6a6faeae7b5faf097fa9604441428b9c28c + + CD + CD-ROM + 3 + 1 + + 120 + 1.2 + + + jewel + + + + BeOS R4 (Retail).bin + 6967296 + + 1 + 1 + + 00:00:00 + 00:45:26 + 0 + 3401 + mode1 + 2048 + + 0xa66c658c + 0x9e60 + 0x26d3d260 + 0xfaf6cd8f8534541e + 9c3facd2d33cc29b4d80850c3387230a + 2800a377d2b9c2afe85ea2327f691f91f9b6600f + 9cf4335ca0b8b12fd343f46e69fc1e183d011456 + 44e780def14f136f082ab4ddfb8f1c3af0d58089edeaab706040eb2642335000 + 7c37209d84239d4c65eca58dcab9f4940731711b4d35725f15e464fd1dfb1729269b298ae16a6e7bd4f4a98cb9368b1c + a803a4d28aa6604db9c09b5cf7ce2937cce422311607f6d34b3560be07bb1634814a912cb94581305d2ffef3236b47941501a30909f11c236dd0e35ebb2a4d12 + 98304:Qddx6TKP6TK4oRdrcHcUTvwoRdrcHjkF4xGbUd8LtV1yV:Qddxb7I38k2xGYdzV + + + + 1 + 0 + 3401 + + + HFS + 1998-11-12T18:11:46 + 1998-11-12T18:11:46 + 2048 + 3251 + 53 + false + BEOS_TOOLS + false + + + ISO9660 + 1998-11-12T18:11:46 + 1998-11-12T18:11:46 + 2001-12-31T12:00:00 + 2048 + 3402 + false + BEOS_TOOLS + false + 1998-11-12T18:11:46 + LINUX + + + + + + + BeOS R4 (Retail).bin + 321093632 + + 2 + 1 + + 00:45:27 + 35:35:61 + 3402 + 160185 + mode1 + 2048 + + 0x37a31ed0 + 0x5eeb + 0x0c662ba1 + 0x4b5b4492dc1cc3f8 + f80c9ca884734c09af0f47b2d1d7651c + 05e62ddecaee1bcd11698420c4543f7c41cbbe95 + 153fe34de33d95b07d7a9be4cd3db9f4be1c31ae + b58f269bb7fbb7cf2a9bb65c05d64c9ec9179b63217ba9fe940198f6861e5cfb + 897f8a0beb90748599514fa9c2ae397af955c14d1e1234135ce8a1239cdf839fce17056778b3e2c270dacc000ab1dd0b + 683a79dfbd8c0322060e8758fd25e300276583dcfdbc50eddf039fefc2ce9ee9434d70a41a70a4aa9f24c33e8ffddb0b6012a08370822fdf329f8594c60e9499 + 3145728:3r8ksS8IcP98ENRE9n5HaT0aIYgAd4Rd4Td4BDXr6sN/LG6SVULduen89Jk9:QVYgRE9sTEYghv6sN/L9SURF0Jg + + + + 1 + 3402 + 160185 + + + BeFS + 2048 + 156633 + true + BeOS Intel R4 + 26875 + false + + + + + + + BeOS R4 (Retail).bin + 315621376 + + 3 + 1 + + 35:35:61 + 69:50:47 + 160186 + 314297 + mode1 + 2048 + + 0x668b9c98 + 0x133c + 0xee1fb301 + 0x620f86425be5befb + fa7b1d52ce2ed23368a10ffe2b1fc7a2 + 56cc151dfde1b61f6618bb94b5426b68be44a3a7 + 519a04b69ce217715c0956a2920c5236d6c61f0a + 45029b9e510fe693d19289a42b721e8ff3e42e64b788db039e9fe5d1012337f6 + e9e19e326eac5354a3385d0a9feaa678bf52911e94ddb5fa9aaa6959b9d2413334f4d4175f61154ab8f08ae930e2db30 + b6e81acb40dac35df3024caad103f175fb41df379722d9ae72b6a61076392b08c1269708f2a7068a660b054ad81e4d9687b95f7dc9584dd37c838f2555072cc9 + 3145728:fn9GWd4Rd4Td4Mkw8EIfIaT0aImglUrl6sN/LGxRZeL8dVXLdye:fn9Gy2ZTEmgg6sN/L6awXRJ + + + + 1 + 160186 + 314297 + + + BeFS (big-endian) + 2048 + 154112 + true + BeOS PPC R4 + 33959 + false + + + + + + + + BeOS R4 (Retail).dsk + 1474560 + + 0x80e618cd + 0x9dcc + 0x72d3b76c + 0xc179638a190b4a91 + 49b8f5d1465eca87dcc572143d182f83 + 95b57c12e48484ca47de69a048c895cce3fe1606 + 46ddb1d066270cfff6307b360976846fda0862ad + 899c49eaee12e42b789ecaca0e52297a52fde74072339a0a59e480dd961f265f + dfefa36cb6b91a25387d2230a6704e115c8fa22f3a58475177f20149ac468607044f9a5f6459b183ac3e3c35f9e1b3bf + b23716bfbbdf188a927c63d0ee3b000d452796ff7ec13047c61b501629b42e9f9631caf5bb09a6f7a8e3016f25bf1e098c0b8b6373f6fb5850c720e37654fccf + 6144:RAfUvvrKRWRe3PrBZZpPV4rnJP8W93Fh8Vg3k+0jN1rGs+gaAeCeV1:NvjKpTB38F0gwV+n0jj+zmeV1 + + + 1 + 1 + + 512 + 512 + 2880 + + 2 + 80 + 18 + + 93.7 + 90.0 + 3.3 + + + diff --git a/CICMMetadata/samples/mixedcd.xml b/CICMMetadata/samples/mixedcd.xml new file mode 100644 index 0000000..1e684ff --- /dev/null +++ b/CICMMetadata/samples/mixedcd.xml @@ -0,0 +1,258 @@ + + + id Software + Quake + 1.10 + Retail + 1996-06-22 + + Games + + + First-person shooter + + + eng + + + i486 + + + ia32 + + + Image + 1082 + + 1 + 1 + + + a8ddf932 + a7cc48685663e781d6e4500bae9ddeb7 + def9f25a68bfe05c7e3bc352ca70438abd1411bf + + CD + CD-ROM + 11 + 1 + + 93.7 + 90.0 + 3.3 + + + jewel + + + + + cdrom (Track 01).bin + 39010272 + + 1 + 1 + + 0 + 16585 + mode2 + 2352 + + 124b015f + c36160718b39c97bf02fd3dcf94dfc2a + 0654a3a9f8f6ba09b6cca9a1bd00ad67c7603fd3 + 786432:spNjXNBnlKQ4jYf6YN1t6gCQss+fyPra7JBCpRk3qxlIVWnuL4D+9YbYXZje:spdMQ4UXCq+6ProIRk3qxaVWnuLzJje, + + + + cdrom (Track 02).bin + 54818064 + + 2 + 1 + + 16586 + 39892 + audio + 2352 + AQADtEkUhVEURVKA4_gPHfgLLc-OC02mCF2YoZ9wMTr4F-eO9ESPPoXB_OiN1LnBQx9BZfhwHt20xMKlHD_uoA8axhUOvTnSXLiW40YzJxT6zPhyDT_6FM2LHLo6hE8sPGdRkcKL2heaEU-GMKUiIlHI6Ph049JRheHRVMGPH9fYCCEHfUiTJhYYLpPxp8JFD-VDNIyOPLGhZT9CSce1DE2eoxSJJ8dx6QhTZcmhq4jF49uH6ikeFV-GRN8RZtJxZTE20UX1oKmYIzwFfQku6uiD5_g1-Mck64Mu46MO6RZ-MsM5CebxQZ_h_YidXLg2NBF1oS_OCznaZYeWMyGOT4qHbnVQWQqOMz1ERmCXXMh9OHqOT8Gbo4l81EmOS8fR5_CLnPgYaE-CmxcuEtmPJkfIJfxwIuG-Bs-Db0eTxAmLXniGJ0TyC2EoEeVxH8_ENDgFZJegM8mFvKgUBb8x8gt89NLxJviFPsmRy4f6Y2eIfDxsKailCS9u1DvCUDp4EVp2FSGZHZ9yootgR0f1VsOFX3jUI8uPD-otNCKDnFGOU-hDNIyIPNDegwnDHXeUIVwoNOHxBPmLC30GVwwu_GrRVTfOHCdRmRe0HF_Q80KT5oee7WjkDKGoCZ-OWkd6HHpU5IfTxMRPNI9S3MOF7EgqBs9onHmG6jP8RBdq4fiLS9nR0zjDDA-YzwiPxqXwC3oO87jD4oSY5niPb8oRJiT6Feg_AX6IvHB1QU_g7Aj3Dt9FNHHRhza-LEhvPDnuHZoi7fCIkrmMXHiEMM-CnniPT7KgV8FX_EOYo-Iu5Ao0Gw0f5E2OSxr6F67yoheOXFkcnNCk5bC0GBXFUHgDqWzRp0g5jJISWHxx6oOfIaQP5czQ3saV44Frgs9i_IdIbNrR44qL9kcTqsh3PDycHVdyvEHj6BKq78jVCdCPehHMo5c6PJJyPMWOG_SPidJxpUQNvYrx9WgUoWpyXBKuox0FLVWWGscbHZ04Dro-VI_QhzAf1Ar6I0x-4Q-6SIHTCHUtPEGuF9-hKyzynagSHk2-DN-D08gn6EoQShosKYcj-Tj8oMeHq0GdJMeRZoe2W7iObw72RXgDHuER5uDRQ8txKgpC_fBY9CJKwuiHagqDMHcD2UGYo_iFvkezF090hLlRWYK-RDiqjfC3oqSO4guLL0d64b3QL0duHIdz_LiooIlvhMcl7agEl3ERPtCv4DeypMpClNlRNZkpfDf6DZyP-II-EdGDJ8lxHV0P_yjyjviHp0apfWjGEl-gPEYpHQfTcdtwMDm0oz3CHI8a4mi6HP3xCR-FF9Uj_Mi14YrhHNqPo_lRjUXI7_DRHf-FkIetGfoOf8jx0MUtHTluHjo14Ucu-Cx6CsyPNHUObTqLGyELW8GHHsxVOFrCI9c3HOKYpfCJ58EtCd8hJlOU4qIQzZXxfMGHX_DKI7TxXNB8_Di2yCouLqAP_5Cv4xy-IMdX_MORn1itBzr8IjeOej36HfmEy_jxJMRWyyiu49fQN3iK_tCPHo1-TJtwwT_s4JF0fDlc4E18uMKP3zj8HYd7PBR-KB_8GFePXAif4KrQH1NenMR7QTt8C8J__DCPFz4N4RssSugjBhcKv8GH_viaHOEueD-qEznR7MeJ9yjJ44rxHHmUox985IwkPDnS4EbQqDR-5MgT6JSKloh2rsEBV1txTYimjfgm6B92w__RJ7gIXQXZo1cR7cfx5vAzD_nR31DwLbiPLMWHK7hwscLGo8ePcBc-ZTh1-MQjfCfEE31xhDz84_i2HOl34RCv4cYbGofO43kDv9DxC76M8A-e4xe6RvCN_jhFow-OyzoeuCGNi7h7_EB4XBm0Mdg5pP3h8zgF1zJ6XGiOyPgDLcd340d_iL_wDz7qo2oOQ3uHR8jxIjfKJxceC_4hZtyLl8jDw-fRE0XzFWdwI993fMehY9Jx5fAlTN5xsg7y4EFTMSF6XMcr4UlwlJEOTza-4wvCPbiFv9B3XMiL_8d1ND_6HeFlNDz0B2eOMGLdIK-GD-J5XEd-D9_xHDnsQruQ8zhOEc0TC11u5EQrRYE4_GgeB0fjHqWGH_2Nk4mhHfuJLE9xXhh_PMeV43ik40qJJmyoCPmH4zoe5agf6Mcf-Bq640mG89izGH0pNFVu_MjyDl6ObdaF-vgOf8dz9Dsa9cN__OvQXEXXDBeNS8h3HIcelBph0ciPw6804VXgrSeO44Gp8Lh8-EePXzhyH9ojeCPCS8d5ATeuojr8o8e1BydR6UeYQz_yF79wdGhq8fgO_Gh2_PjhbD36TPjRB3Y45McPPQiPHz18_LC2dArC406Q4Mfl-OgRBn9x6yv0Scd1oYd-pDp6TsN_5EN9NMd76IWWcAz6IQ9yHSjJ9GgeC9-hZYzToQ-uyACSlAIEOYTEANAAQ4AERDBAiGPIIESBcsYYYYAgCAoBCEKAMKCUEcAQIgwjAgAkDBIACCEUEMUgYQQwjiFBgDQGESaUQUIJoQQRADDpgBBACEIEKAAEx4AxTBgjJBFEmCGBYQAAQQwCDDEDjGAgOAoAoIQYIQgBgiEigDDAAAMEo0YBogwBABFjEAEKEAGUAsAAppQgggEAmDEAOAEIEEARAZ4QVBABoCcCACEgQAQI4YRhCBEEmDRIKAIIIEIBgwQwiAEgBAAFCKAEAI4gQQAAACgg2GGCIAGMFQYgowgQAAAEABMKCCYEAMIgA4ERAAGAoAKAKUoYCMgJAIAgBhjAjCCKEGWAA8whQEDVkDhmCARGKIyhI1YQYQhAAABhGFFACEIcAMAIAqBjxikhBCAIEcEEIEYgRBhRiAiAlCIMGXGRJUQAogQxDDAFFFbAEgQAJEAAKYxEDBAAgDHACaGAAYApIQAAiBkEETCKM4OUIBRYJAASgBlQmHHCCaGkIgQocIWxAimhFCCQEEERYAAABQAwwAEjlELOKURAkMQpIxRSwghmhAJMISAQIQIIwYghTjkDlVJEAoYAg8QgAsiiikiAAEIGCcYYUEAJghAwIiIFzCREAQMocgSQIhgkSgBGLKACCaIMEUQB5QhUxAHFiKAUAMkEAsIAoYWiRJBhmDEGAUEBR8IpIAYQAACCCBCEKCgEMIggwAhQRIilnIAMcOAcQxISxggAwChBBDIEIaKUAwApQYSyilmiHDFCOYKoEkQBwo1STAgECXKEIMgEJIYYhoxDQBBiDECMSMgAgQAQToRBwghiiDGORCeEGEaAQhlxwDAqEFBAEEOskkIyJShBCEjAHBEFCEIcs8gJoZhyRAhhEFOWSEsMIMAQJIAQSGDiIBESeIAJkJI6QAxwygE + + 9b64e30b + 4770ac46843190af09bd1a77b54c06f5 + 5bcb4bdd387aad4c8836b6151e57dac945a13ace + 786432:9062IpIjKxEtfyWPRVLLHjUcvmjoozcIInI0fLYcYqVuwI:906/Wo8fyERTIcujvzcjrT8Uy + + + + cdrom (Track 03).bin + 26137776 + + 3 + 1 + + 39893 + 51005 + audio + 2352 + AQADtFEShVEURYlw4PmL_EDQ5LmhIxcaaeuO7gp-vOHQH7Y840ZOSLqOsNTw4ZyFc8N5hD9EHjmXwz3CP3hu6B36E3Hi4_zAI1eTQteEEL-GxxHaollx8ciFpyJ0VGKCnXhwHn-aQKcNH72GFz-D_mjWIT-aH9PpCP2RUzn6Q018ZFHTo0Gt8PCHx3DEFuGRPMp09Dn8o1YufMwxP0NoHlrSMBvy8EHFIwxHQJz241-C3MJ3tCR89NSDaz--E6nyHHeGjzOa8YHMI09QNQz-40d0XNohZUWa4x-oSKrRHmeC5j2SnchxoTr8DH1D9MglnkieHD2u4NoxH3U5IU0jZXjeQ10gDmiO3ArxR7imUMh_9IJvlDfiP7h0NGMWPDAniQm-E2m8Q3wYhKJxYYzLCD94DSH0I2RGJ-B53CHCoUkTltCZHKGVBT4OJ81ShD90ok4S5Uh5oo0ePAr2HKhIIxV7qBQNHeaDBj8uXUK-zMG1IrwKj0I_mcQfPPnhZ8eHcskc-LjRNctx4Rpm9dAvPOnR5IHWH4_xSId3HJUzQ9RzXAoNnzoejXgI8eJgjkf4LLiOPceTI3fQQ0yq1Tic44c-2JdRHvmJEzvO4Ea6FzzaHc2HH1qcHI-NoORxHzdxRXuEuIf2I62EHr2DZgSP68ihH5Gswzf8o9-Rx4KuIM-OZ8f1BX2QN4I9aPKOnMrxDOeF8ETzUNB-pERfPBJ-PEOzH_3RH9ulHGV3_FEKhtkjIcf2DDd6nA9-hFoUo5EcHI9k9EGDHxH0IPw04x9q_eAp9EJKaCdKuUmMn3CVoWeGQ3l6vMdnQxMaDnlw_PiT48sR5mQNTWKLZ8VzVHck-FKgw1zQB70Ojzk8MuiN73jS5MGPSLlQHjf-5Gh3hDn0I1dxB73h_IgTBvp0_ES-HHlkKoF-PGjOILrU4iq-JEeVHOnZQDv-HMGHl8LrHD1X-Ai5SPgfqMllNHXQUsGlCM3pIMdzXEMvHE-PfISeF9GFSxLxHDdRb0eYC4eeg_tR5YYd6Dk8hF2GcxeOK0d_o9mDRydySJGzFM1l7MoNXD1xQdPloA_aLLB91PtxVNvRJC2u5ei1QEv140N4-GiaBqd4PNWDiDv0a0j74mpxwcd1_Lii4xfC9EEf4zeqNEJ4_LiSXMGTB3ngE8oT5PiOanmQJrGIH-IVhMEnXMenUUH4HeLR54euIs5RmanQXDn6CQ3XBiGvQjyPPEPzAE-P-8R5JBcRHT_-EL3ho89xBMdz3BF6Kbh0tEqWKtD1IIef4Qr24tGLWHohlxRCHd5Rmzh_PMfzIAxVSXgGjaQH9cd_hDoaZ8nxoo0yw3vw5bgyIeSaC190yGKOvB-aP8iFK4fmhC7K5GiiN3gU7EFTRZPwMHAXHYfzGVU6HbmGS9mRJ7mCB3qwvUeObzyupA-qnIJ39FmQG9-hIwyV7EE-4zx09Mfz4L-g5UuOdokQsjOaBz2uow--6HhE4U4s_Gg4HeHx59AtF1eOFB-m_LiWGUZ_hEoawfEEjZTwJMuDJ7bwB30w5dB1PEmE_M9R5TqaGBcuJ8h56EeYZxwe4Tla4vtxHc8Pn5ZxomRg9vjhVYefHJUsJJ4Q28QfOBZ-fNKIOy_S5cFN6MX0R3AVJYdODsadGU1SRTh0bUee5AoeNMd0HHmyIBn1oEku8fhx4lTwH3mQ7MoT-MyEH2eJysfz44fnHUfD1UTpFT3xHD1zxInx6cL3QEfIW0NTHvlxMjgfeDp0Yc83-FFinD7CdQ8c58KF5sEVHc87nE_Q50SYCzoVRFYyfM_R7EaVoySqxUEOPT_eBs2DdjmeGz9iPXiO5rnRZ8EllNIiBr7x5EMuMYem9viEWFfwB5dy9A-a-shjosyOZhJTKM-KKxfCWEKt0KiOOD0e5ehx5ngSerieQA_EE3twQZ1m4Yl6NN-hHb9wPOuRo5UW43GRHtqDH89__DAzCaegPQ_sycXRZzny8XiE-MdP6NmhZb6GXjlO5vh2lFKO5niOKUe9xdB04amOZ-gjnD30JNlxPXjgIzpy4VpeqIk-NLGO_viPWzjxPDm0j0LjaNA5EX9kHH8gJs9xCjl3eAwb3EV_PEH54BOPpwnyKBd-Bc2M_sGdQw8fNOPRF9dkROtxqfiNJ8eTo2eQ89CTJHOC0E7RB82JPbiIXDySKZF4Dj4nVD9e4tKRC1-OZNec45F1nIc59Hhu4XoceNSOo-HCBqVX9Dmeo2-Oi0OuQl10oUcz6tAjXB_x8PAfHIeidB_Chyh5XEeVDjkT4Qz0JFmqIJcdHH7wYRZy8YUq8QhXUmjy48fj4DnyHM8DkWOKT8cvxDp-VL_gD89hKyvatUEpLTL8IL1yaErkI5aS4MevoBfS54Fm53iUIOQZNG-B6UIYh1ClJsZ7VNehSzmOPNFR6h3-BH0Q5lB-PEmEXK1Q5YGD8sKZIyf01Aiv_LBDKvB5-Efx43l-NJfRh0dDHv1RmkifD5-gZcej6Th-CvmHkFouNLvwHyVzND1OKMrRL0MzGZUPNY1i9AODADDMCKIAYIYpgBghSAAGjABEKIEYEQAYYIgQyFAEJBWHGkgEEkIAhYBSBggAiGBAEGABEwYoIowBwAEiBSHIOUMFAAooIQAAhikCDDMcEMOMIAAIhigQTAhDMGICCgFIg4QQIQAQBDDHCCCAQQEAFQAAgoEySBDEHAEQOIoEkQAACgAQxFAAgAEIAUKEkIY4ZgQBBjDEBHFEMmEQAQYQBBkxrVGojgDFGAAwEQAJa5VDTipnGAKGQKYIMcQoaYAggAmlHDFKU2EQsAQYoRDgCKFioADKGgiBIwgwRBQQBACghHTMIAUMA0xAApS1AHBjAAAAUGQYMIJwQ7UQCBBlhCCKAUOAgcARwZBTgpgghCPAM8QUAEYrgQgRDADlBCIGEQLEEkoIgkAiiCAhCDGAZGIAAqAJgASQTACFFBPEIaSYU8AIpgghSgFnCFLMEgQCMUIAQyAQjgAgFAIGACIUcIgAxoRBFEAgiAJKASgIEpwYYJRixAkioDCAOCaQAEoIQACDgglnFICAKCIEAgkwQwQARAhjMAXICaQggEAIwChYSBEEAGKCGwAAMlAAIgwChBmhiCUCAMAEJMQaBpQFDBAgACDAESoUAsQ5hQBhCgADELBACAQGI0QBAQRBBiEFBFDOYAEIoIwBhoQAxCAlEEPECOQMAAAIAhFBBhAjGCLGAAGaEcghoBgRDkAjhEHMCCGEcoIZRARCBgFtmDEEGaIQcAQIAEwB2DDxTAAGAAKQI4IwAYQBQjAhjCCEAAOMYgAIIJghQBDCGIDCACMUIoQhowwgghkCCGGECCUUE8AAQphQAgFADHPMAQUAU0IRIIAjBACBDGHQGASAEk6gQABgDijmgADAYAEKIAQYC4IwQAomBAOQACIkwcZRpJwgigkwJAGEUUCEcIQJYQQgBkihAECAEgSYEcpYIqBgziAghBDAAgkEEEQAKhBATAAEDGFAUCMAQVYQZQA + + b390a7f7 + c97130e7c689edfa0d031572c7f37982 + b7f9d5076028f94eef095c6e680c55d085594382 + 786432:TCbF/70nHyRynTGUpO3cf1xqHeedPBbF0f0U5kcDaOU4:TGFgH/TGUpscedPxF0f0UKcv5 + + + + cdrom (Track 04).bin + 88625712 + + 4 + 1 + + 51006 + 88686 + audio + 2352 + AQADtEmSKFIURRGDBznwB8fRPAbSLJo23IFO5D-aZ2NQCz_CHL1y49CLnsdxAccNAxYu4ADgHMYPAMDxHjgu4LhhANZxHADw4zgA4HgPHBdw3DAACxcOAPhxHABwvAeO4zhgGYCFCwcA_DgOADh-HAcu4LAMwMKFAwCcw_gBAPjx4sAFHDcMGDeOA4BzGMcBAMd74DiO44YBWMdxAMCP4wCA4z1wXAAOywAsXDgA4MdxAMDx4zhwAYdlABYuHADgHMYPAMCPFwcu4LAMwLgFHACcw_gBAPjx4sAFHDcMwDqOAwB-HAcAHO-B4ziOGwZgHccBAD-OAwCO98BxATgsA7Bw4QCAH8cBAMeP48CFA5YBWLhwAIBzGD8AAD9eHLiA44YB4xZwAHAO4wcA4HgPHBdw3DCOwzqOA8BxHAcAHO-BH8eBH_4BWLhwADgOHAcA_DiO4zh--IBxXDgA4MeN4wdwHD8O3LhwwMcBH8cPHIAPB8cB5PjxIy8OXNBx40aKw8ctBIeAI_5x_AhgAD7yHgcuHEeqFz-An_BVHNBhHM6PA8BxHHIPHBeAm4KPA9ZxHQcA_DgOADh-HMcFHLB8HId1XDgAwDmMHwCAHy8OXMBxwzh83AIOAM5h_MAB4C9eHMeBH4dxWDiAGzdw4MAPwz9w4DhuHIdz_IAP4IcPwAcOHMeBu8AB_MBhHDDi48dx4PhxHAGE4MWPH_gEBOKD-0gPHK8GxIeB4DisCzgA_wjeBz6OA4eo44Bx4_hxAM7h4xCA4zjeA8cFHLfhQ4fxdzgOAMKPHwCA4z3w4ziOw8DhH8e143ih47C06HjhQw8OvHhwHA9-HG-A93gD-JPwGPCLH8cL5_Dx47jh4_DxCzeO4zF-vLgPHz8OP7hHHD8eCd8JH98By_GE4zieZviFH3ePc8bxD74U_HiOMzgPHzpx4g78Gj9eWD10HMd_nBQ-XMfxCyd-XMJ__PCFAz4uvC8ufPgpnFzx4wtOOD4Oy8SJEydwHCcO4-txmCSO4zSs4vBD4T5--LhrHFaL4zgeHG9x43h4-PjxDT6DEy_xhcJx4_AHfTzuSLB66McJhCEhCQlIhAAKKSBIEcRJKxwAgjkhmLRCOACA4E4IJq1wAADBnRBMWusAAII7wRiT1gEgmAOCSSuEBEBwJwST1grhAACCOyGYtA4AILgTjDFpHQCCOSCYtAIAwRwQTFohHABAcCcEk9YK4QAAgjshmLQOACC4E4wxaR0AgjkgmLRCACCYE4JJKzgXDgAnuBOCMSuFEcoBBwR3QFjJmDBCOACwMMEBx4QAEijHJABYCK4YcgAwia7gUAARDBtMAMGkuNIBoQTwLADBmBNMCsuZEwAAwZ1gjElrRGcOAMEcEExawaEAQDDzgLBMCuOkA8AJBwRwwgLJkFPGKaWEeWYAQBwGmkjxAOPCCcYQU8JA4QhwSAwjALDSMickcOwJwZgTgkkrLBbCAQAEc0IwJqx1UgkngGiKCaYQY0xYJo0VTAjAAACMASAMc8AKYYCzDDAmFBDKAmAZYwYIIJhlggkCgDAiAMCEI4wBpJgBTjGmLDUAGOoEFcIY5wQBlBinnBDSAGYooE4wxpyTjhkhunkSAMCQAOYxy5gQkgnEkANaGGCZEAQgxBw + + 84352eee + 6a63b7fe799e37c708773c2d84139c90 + b8f0cb2272b819eb039462f2683c279a81168d26 + 1572864:QlPHeSEsqc+CJsfmp+lkRZTNElwARxBkvnbuDoFw3ymsWiOkRhh36I0w9K:Q5eIJs5lG/ElwWBkvbeH3s7OgJnk + + + + cdrom (Track 05).bin + 64835232 + + 5 + 1 + + 88687 + 116252 + audio + 2352 + AQADtEmSKIyiKJKCXHiCHzcePMefDxfxCG7CMCt4EvBRS3h2VNzxMMORPyi0HeY0hBd6C46JkzgP-IePcIWOF0dX-NwkfCN0H1fx4zv8oE-G_DrawWvRHx9-JDfySqik40_xsfDdHN_xcDD8nuhJ4DseXcihaT-sakYu3IJj4hlRHYV_-AhXHHqBHu6y4ztwDbmU44eP8JnxoyQhS8LVccKPTD96lML2Ff2PnoOrociLQz1y4j6HX-gdNMeP_jDlFZ_g35hOvPhxpyEy_NCm8khf4zycC2eONjsq_PCRqqihFyj84lHiAscVGjkP6-ijDnGj4XugdRnSwR8H_-jxorfwHj07HD9yvDy0H3mLe4W5HNfxDW98mGRwHodPmuiD4zh1IccPTUeqUsXxq_CZo82OCocPq0doCC8KH8-yFcdxhsh1-Oh35Ek2dIG-DJc2ZB981MdQ7ofbw5fQH3-RD2p4xHgn9C-aejhq6sYHUyrhEucxecOFHncaZH9QQWsPqw1y4oJj4sRz_PDhI1yh4wWa41l2_MCFXAoNH9XxbEN8dCGh87g6bgh89EcJH9d0XDma4ztiHIn7EMdJDfXww8yJ_7iPB8cXHT1r4IrwxUJ-HPrRqCLy41bhmDiP5zh8-EdeaMYLdD18C1-O9_BBncd5-Bc08tgTUgir9Iaf4Ud__MihScjpLqj8Eb_Ri0Zz3OjFw_Yz1JsW4dERST5ERkXIHVcCXmEa9AuL8Mc_PMqRa4V_3LmCrySez7iPE5HCOCH0HdMRUkpwKbDDHWWVo4epJEf540uNE6icIxVz4ofOHF6-IU-iw0e_48d_lM3RVTpiCLlGo4-M73CV48SLmzmOH9dwHI-Ono2EHD-0qYffHDluFY6Jj8MH-PARrtDxAj0sZ8dH4niKizlyZDr6XNClacLU-Ug3HT9-9D6uF0e5IxR5PH0GXd8R5kQ_4T_64HJGPB-F68UjeDLcX-jDA9MPH7cQtxB3wyqFXMfhtMcX4jwOwzXCFYfuQkdXbKeFPPrx45lw9B96pE9mtDv6w2OOP0MPFfmFLpbh8HgCV5fQN8Wpo__hCteOD1-J1i9-_IihKNJEhDZ6C1RatAtxviiOI1yh4wV6-Nnx6MA15FIOB71waYhRkpATCVc4HJmKoj6MiXMt9IOroceP_DPUDznelBm-oxf8D6XZFS_aT8Y79MdeEn1hnEGmy1AvWEf4ENdRaYdPPOPw4_CRqqih40dBOYXO4znw0NClwz8UrYmHq4h1tEoG74I_-Dj6yMTZHnmhnUWOn0A3HR9-oc2Ot3gquNNxvIQZFe9gSjt-odaM4YucCbmIH1JupGl4vDBuJkK1DD2uw4dVhIZeoPDxKNkKHJdC5IePPjoebQgXGV_AdlA_-Bjqo98Pdxc8aejx48fzEqqJkDphpyFq9Ib_4z0eTcZz_Bz8Hn3w48EvRGR16GAWpBe-wznxhcOJH4aPcBOgF0dznBY-GSeu4szhHMwzPNkGlUdJIk-IkRuHEz5-nIKdDxfcET3xf8aP-7iOIw8fJGfRVoR_oi9-9Dn844ePHyfe486BHPo0RKsl3HBMXMT34jiOLJtwSHcBbYWPfTly3PiI74J9PBw-wT6F58N_FEclWMd5wr-G_kg-FmE8tD-u4ybaozH-FX3w4oB_VEegaIoEP8gpwTke5mh5MOJx-EhV1NBxFD7O7LiO41N45DyMUN6FJxv0B-0ypIM_LvBR5_jxU2CW_phkHseRR9AcLTDSo5dwRSPx5-j3wglO9Dw-HT-O53jRI5-h3UJ87EcvDjQu3ALCTQT04tBmmNMOTUfPwVaOoAS_CeGFH-LmDHm4Y-fxosc1HE9-hD169IcvHi-P61B-pI90eBPa4wOPB0dv-BsqlPyGVPFwiIwqhCcuom_QkC9OFNbhH_mh4T2uoYitXUir4MdV9BkpHNrRXMjDHu0Or0WPf0fuDyqPnCR6_EpwUjtcESf6BBeO63h0occP_wj3Q4-KoIfzor5RjbgLH5ZHVNSQQ3_wI4txCR_xH66IB88O_3iC7BE8DnpOOOqMTEf_4Jgo1bDV41YPk0Jv_MgJ7S9i_ERV4xfRNzCPh7hwoccX4ieuozoH4xuiiaEOkRzCDw8eA3QQIxEAYBA2jCsCKDNQKmGAIQgRKgYgAjnGhBVKCOYcgAoYBhAAxjBAhIEMSCEkM44ghKAQRjBhADYEOIAgEdYAJIhJHgCiCEOgKOGQYIopAxAAjCgmAEQIAgORgFYQJxQw2RArADdYEAIUoAg5RJgwQDF1gDRSMKCAABAxCgyDxCAtBBKAEqEAEEIgSQ4DShNriRLGCaKwMwZggggFRjDBhCaOCwWoEVYKJwA2DABmAXGEMMGYgQIxg4CQEjAnjAEEEUCRMgAwIABBRggDABFCMuwAcQAgYxAAXFCOBAAEEaSAAQYKAJRRRDBEHBHCUWQABoYgoIRwFAAChCFGMe2UcBQZhhgSBiACgGQIEESoEIYqYAwRBhgKDQIGISWJBAQAgQFSAhEnDPAAASEEgEARTAyAUBEviADAKieQBgIgioBSAiohDBDCKIMYcIoCAQykhAohjGDCYOcAI6gyAwgAhCBklCDKGeAJMYARAgzAEEFlhFKCAWgMslBAEYhgAgbHHECIKSEfcw4ZY4gBAgiGEAQGEoW0EMo4LAEBgCmNHCBGKAAIMAgRAhghzDFDJCHKGAARgiI4gxAxGDAKwFaICDCAAAIBgRhIQDGBDAMKQKQEM5QJYIBgCiAEqQIKKA0QE4oZwARhhGEAgCCGAOcMAwgIZgWjSmElAIQIemAEElAYgQQDVCjFDVDCEE6KEIghAAQjzCBkBCPCEOaEAAhAKwAhjkAhnFEMNQAAQkwYQYiDxAEllGUKKiC8gAIwiYABgjBhIBJSASUEA0AAQQRnwggmKHPIGAwMYQgIogBUHAKmnAECMeEAYlYAKBAFRghLHCDCMcG4QpAwJIwzEBimAA + + f8cfa40c + edb23ca81238eada2e14a77f12d7bca1 + 03aaf7341b3c9933e4aef8146fb42b452c2548b9 + 1572864:VCCL1nhYju6Pkyh89Kj6ykfggUo2Vy1SdSK9ZjZGC5afvPh4PheAKf:VXL1nhYjuykK8Uj6Fwo2AnK9ZjZGrfvPhaKP + + + + cdrom (Track 06).bin + 78806112 + + 6 + 1 + + 116253 + 149758 + audio + 2352 + AQADtIqiLFEURVKAH2eRQ8jxMAE4t8OnIN-8QXVwGLhD-MfxHP5xHOKJH9BpuMB1WA2BwzxeAScN48MPH8dh_MSDf_Dxw-eA4zC_4cfhE9D3ws_xQ4floz0qCs9xGCec48fh58APHx9wLYdfHD984niPBz5-CodzHA_8GvjhEzh-mPnx47rghzge-Mdx-DigE-KNF28OxzVa1MPh4-EK_4iPI_fh43gOv8Oh4wsN97hyPIRP6Dj84V9xw6cFvMcd-Dic4zhu-MPxw-eAG-JpHA8OywQOczl044WP38K3DJeEE34Ov7jxwz_eHMcPf3iGH88hVh2OHz4PyD384AZ-WMfxHcaHf_CJ48YP98dx1YLVAHfg4yIOPzihRoPqXHCPC8_hbD2KKsYP_3g4HA7-4z_c48edwa_xmfgH-MSPf7Bu_PjhHj8--KHx4w3E48YP8bjw44Mv4_jhhzgu6Bl84jjE4zh-uCfeHX6I48SXwcdf-MRxvJHhH8fhEz9-_PDx4xEcT8B9iD0O_fAJHId747gOP8Tx4Dt84IcPHD98Co9gFcdzfIcv_LgP5weeAT4ewn_x4IfjHD8Od8Mf4_igCz50WA2OH3d0uMePHz7wHI6PGz984MMvuLiGK4ffA2_gH7qIwzKO4xB54RXeHI5r4MThfnjh5_jx4yoc9jj-wyd-nCJx5fDxHj5-yDgPMTeOHz6NH5-OO4Nx4oePnzjMGy8e-DSODz98Cj9--PihL_BrHIco06iOdsEllTB-PIRz_MdzuPpw_PAV9Bna44Zv4QF8JUbR7zh-4_BDw4fwCeaCF4e5EDo-BSfc4_BxHPdh4ieewy-OH18O9zgO68Z9fMxx-LjDFf6BGx98nPjhE8cDxzUEfbjhAz9cXLgOVyFqdM1xHz5-OMdxHOaNt_hhLjSOO7jgE_CFHz9O-MaPw6fR6UTFHYeP97gDC8fPwb2BwzmNEy_xwDmBw8ePy7COAz98HN9h_MYPH8cDf8dx-MSB8xCP4zrMhejRZ9AHX8KLK8rh48Nx-MVD-Dh-uAp-HD8NHz8OkfkmQIdPCz_xKTjh47gP48JzPIKl44dPALcEMweu5fCL48Ph4xbE_DiOj4fYWzhu-KHRnUU1DudhPBx-_LB-fIePH1d2-NNQaMcXGu7xQ7YEHz--4fCFw3GOH_rxKB-c4_AvfHGg4x4c_MQDH8d9XNEhHscLPxmOw6GSQz9-wSR6dD2elXCId_ADHIefC8cvnHBu4Ib7DcfhE8IDV4c-HO5odCh--LjwC45DAi--HO6P44d5_Lhx-Hjg49BxLYf1Q8dHGg1QD8hx57gGP8XHI3a4A3fh54d-HM_hajp-_PAhA4dz4IGP44G54zfg48ePqxPc4zh84tB3uMpxHKdhOsB3iD1uvPBDYxJ64cd1fLgzWEevHt8y9DAPf4LVcENxTD8O9_DxSAd06CHc48dpOMdxZYVxHA5-4sE_uMcPHz--4_BlHD-shoC-wD9eAZZIo4fqDD1-5MWd40hvHHc4vDLuwD-6Gy_64YTx4g58_Hhg7sB5iD_-D3cEV3VxQR_8EPhxBz6OK7BaHHrgf_hw4fDx4CqE08aJ33ixD-7h48vheMGPXkf1ZVAX43gCS-uO7keLfdAPH36IC7hx-HhgFXhLPIeZ48txGgYO5xQOWBYOnIcPnJJhAA2g11QYDwARDAAkxRBMIeQcMgIAaR1AjAklhRBOGCmGEMAg4IxgyjssHANACGGFAVwKYYRgFiCHPANSCOEMEAYhBDgDyIphhUJCmMKAEB4AK5gBEhkjGAPQQSOMEAIoD6wX0AopjEBGNCWREAYgDwCAAAMiABVCUEGYMYkJIYB1xlAHrGBCGGeAMAgAyYA1RjIjkAGEceEAAIBRBYAAQFECgLDCAYYAA8gIYBETUhBnEEOAIqSkU94ZB4QBgBmLjOBAAITEEAQYZxRiTABmCRPcAY4Q4IwJ5YxyQipmmTDIICQMEgYyIAAjADEKDHdOIssIEAgBZxQTyAohrDMSGSAEQE5c7xwSwojDgAJOOCcoMEAIApBRSAiADEAIEGGAEMACYIRxAhmBBABKCgCUcAIgaRATzAkAmBIUMaGAUEYQIhAQADDEoGAACSuFMYIZIBgxBkhnEAGAEgCERBY4ozzDQjkjEQIAKSmAFU4gJgRASgAknFHISAEUlUwADwBAgAqGnALESeuMEsgg4ITyDAgrhjBGIYSUQJIJo4BDkAHOiBQIACSIA04YIJjyQkhmjEBMCCYMAEgsCYQVAAAJAEGAMQGEAwhYqhAAwkDjEMBIHGaEQcwAJIUBWCDAgAUECSUGMIxIAYhCjAHOgEAIOSIAEoMhKQGwkhFhDBDSGYGg8IoBi4QxggAKlDAGCACAkMgwg4xASDjEgGXICAGgMA4gMcwQxiLnCFMCAISkMEAagAwAgigWABMIMSGcYcg6YRgTADGBgDDOiMYEQEgJhBRQwjCAABCGEsCAFIIhJxAQhAAvACNAcSQREFY8ZZwwACmElFHCGQAsEwQgxxRAwismmAEAOYfENUYZ + + 83f51b3c + 1c5bee7cd55c07b77ea356aa065032e7 + 0e395e1620ab9b89a1ba9a1a2f8a8e8c772f0d87 + 1572864:ZHQAKEnRnE44EkTdkkJfSPWNsuyuTfAMdk0CMQBA+AHw+NlZSbdsjR+NyNe0:pBKgE44EkTdkHUNOp0ChBHA1Z+sZ + + + + cdrom (Track 07).bin + 91796208 + + 7 + 1 + + 149759 + 188787 + audio + 2352 + AQADtIqiMIqiSBGO__hx_AjKPMcPTf5h5SNOFf5xfCuOH38O7cTTB6F-Da7xo5koo0X64Q4PbT9-obQeuCquwFULPfBR5XhwJvTwB55l6Mc53FnwXUYlGX426EIpJahj-BcOJ12C6idyScLlotQj-HiP8MS9WFBz9EhHwcwy5yhXhFYuiD_6LEf848UlG4-M-sgP_7hzaDt-4ulR6rCTHK5TQc_geOgc4e5wHa3swNOh6yjuCPJx2WiPZnqGPhdcokdzVEmFWwryJLXwozcuNCuP2Lh8_IV2uNJQDk0X9JeGozqJRmGEX3hevMd51NThOOh-qLiN9njyoNQio8_gkUF1vBlxUqlwXWBSp0J4CUceDp-D6xaqH5IuHV90mEkYhD_C7KjMxAHZ6GAkQU8mCllIzTiNo4lzlNKRUX6CNxCjE89x5Ug_xH_wfGh-tJmCS0kZ6Mc74zOFpkMXZsb5GD0PLbPwBeVSuDpK5tAuNEkykjiVCHlc_EHpI-WG6sMjdRq4gxeao1eE60UZDl8QKi3uxHhlPD3CDE_04jo0uXijCz9y-egLdzS-wx2H9KjUQe4RL72CvsR7tA9-NCqNUGJofIKWHf2hKzd2Xmh69MR1NDoq7hrKFe6D_PA4YQtq5XjOBfGHhnF-aFaOB2GmagzyC03kQ27wRUe-o-YF_0G_4IjFsAJ5DmIWHgfLo1eOpmqhZ0cTL-jaIRYT4UlqIfQNQ9fhC03U4Rouy8Iz_GhqQ3OUHe9YPEd8HteE8_hRP_jga-iDeMvxVJCPJq5RD-GjIY2kzLB6aA_uMMclfEeb-zhNwQ-0H_eEHz-aSjpKBkwVHs2k5NDQPMtxEvFvfCcqDR-PC86HPAKz4y96nDy0JjsuG4eWeDm64o9wMRO-o3YKs0LJ444S_Mdla9B6vIansXh6PMGZofrwDqpSBZct_OiNC03UDF-h5tVQ_jh01DmJo0eTH38QS1rQXwibGz9Kwj8qkxq0PfjhscgzwkYp5fgr9ESTiDoiSyTepoIe9MeUkcHHGT2D9R1U-njEHEce4ooSI9_hQVMmZsUzhCqaPWgdeCz-Ix1zdJ-gaYevIl9yhEetWsPx5IO_Q9MifER_-B8uHvk95GHw49Ce4ySRJzNKVUgfXIeooxqRSxd-oi6cIyRxLSMq6fB16Bv8fLgI_ygZCU-C78d94od2uKLRGueO7qkQyiR6pEef4kKtwqPg_MjFGJd0HO5l9EP54-tRansQtRd-aOk_lJLwHI-LfoHjRIYoVD5y5XjyoHzhC33wD3nIDOr6BL-H0GKOxgouIvzw6NCUHB-DXBeuHP0Fv0fIB_9wjSmkXWhOgXkrfDQeuHfw6qiORj0uKTyuHVomrkGPL6h-dGFmfEcvEj6DD4-UwxU9-EHl5chNfJOJKy56C-7hUUPKo3IU6HgutNXRTMqOfNHQxkjXA1riJcd9xExIlDp-_EkLI5S0ERfkX2jCF31mIRfRymgm5chfaDoa9YglpVTQJgWTHX2ONGZwiJqOH3zg46UC89CXmMJ1OA-6VMGJPNfxWagPv-gTEjeD8HDSHToL_0GtFl9y1FfgH3eG96ikhnjUFMeFJlR2dOGFD_2h5T2eaigVykRTEX2Uwzm6Zkcl6UFD4TrCozkuEZVz3Mh_nCr-QI8Kb8mIXEefCv9RJYmCMM7xT9DPHKEIjzw6LTNKHc4Rkj36wYxuPAu-jMhBRT_6gVXSOGBSq0FY_If2JSEcMcPh7LgfgfpkXBGhzzhxh8hYyXCkB632gBWYx0gPx0QXKVD3oJkt9FOO7Bku5KHQ4z9ko5KkD49Q8_Bx_OimjLioCz-apyiZ6HiIH_xy_HheDVcm46jjFD_OwzuqEXJIXHKm4UeYo1WIa8vRH_4S-EKlC7miXBGu9ajxBPdhpUeoDeWDDz6PUouQN0YbHTpJ_KsR7sGFiuFxnId55KjcQJeJI0uiHyeP49pxHjG5DdpCIV4UfEbBH-kJ9UeohMQDFEwYJ0cu5dBspDHuwfmFC8yL6yh8_LiPysRl9Eg_XJEMLcYVVEaj1sYVSJuK0MfxwznK7viEG6E8WdAZ4jHy7cY1OHuK3yilF6GaHPoRHid-ND9qHT9C0dBy5MqF3nBlcA6sIj-qSYdGqQ9yw8GJZ8TLI8U3HlKoLUfPI__hLRna6EN5OD7CTVGy4lJqaMV_IQf1I5aU4To4GhdOXMOLnFvg_sJ_vEQTdiy-w4yD_MeP6rOCZjzk42h4XDm8xYXmEdXRCGeIatGuwNuJHrXg4x0c4w8sOSzuisGjEKJDlFKOHnqFizyuKMK1C81DXE0TcBuaD9oaFn9QNC--o8_hKngPMdGOHpeSCbeF_vBVVGJxzkI34b9AHedxfGHgKiNOw_mET9lxLUfDPDh6ojl-dA3EHN4bfDz00fCWHteKp4HjFuFn1DIeHelk-BaO_2jUzLh0_GhuoWQO5TmaqnhYnMTFwEoiVAyTQhf2oF-QH-lIcfiC5_hj-DjxMHB7OA8eZqis4_bQbw7cF9-Io9NCAEOMQkohDgRxCBCAAFwOAQKQAkoIpQAAhAAJFDLgAcSEIEAohAShAAijCAMEEAYIIgIQKQBhShkAlAWGCEgQIEohBAxgDAiGgEBMMSEIQJgAc4AwQAFihDCEISSIAEYJqoAASACBACGCCMYRA5QogwwCRjigAEIEACAAYgQBQ4EAgiIACGDAIkAMM8IA64RQQikAkABAWikMUUQwAhwBjDAihASAKEYYMEIJBQQliEKAkCAACSMAZQgQKYARACjEQECAAiAQEIggIIhgAggIDBACAEaMUAYQqTRAhhBCLAEAEcWAIAQAhgRjQBClFDKCAEYUKEYICggARSABLDGECAO4ckAIYIBDiDAGgRGUASOIcIAIQBRQAhgCAKBgAYIAIFQgRZBgRBhAEBIAEQGEUhwgghFwAAGAlBJEAAEEMAAwhYQwxCgCEABAEAEQY4QCY4gyAggAgKBIIAUIcAwAIxRDADgDkAJAAECYAhIwQAQRAinjCAAFAGGAMkgBBJwCogECADIGICGgUAJwogAgRikABCAiFAGQAIAJhIQiTCliMCAEOCMMUkQQBRARQDAjiFIACEeIE0JAJABRDDiCFAOAICgAUIYQKgECwjhEFAJEACMIQFAwB4BxmBgEBHIAACGBMcACgBACgiBgmnAMCEAIcUowQQAAwFCAgAAGAaQUMAJJDhBCjBmAgEDACEKAIIgQxwgAxFhhgSHAAAQoMQIAIQQwAAhpABGAAiWQZEQxIABAgiAhAFPACCAQkAQQrIhxwBglAREAIYIABQgAxoQhAClgDDBAMeEIQ0IAxohQwDhjABEIEOIUAwQAboACBDMKIBeMACGBQUwBIwwCwAA + + ce208f21 + 043d474b33f9a4a5abf6bdbc6776329a + 5b67b55f9cb239d6f82bfbf37e23f33011874d3b + 1572864:ROux5XKaLtemPbgKDNiBWdI1zLwRy53zJX3KpCH8g1IyiCxBQPSItEUMQtUp6fW3:8uSa9g74dI1fwRszJX3aZgiEUvfIfFd + + + + cdrom (Track 08).bin + 59637312 + + 8 + 1 + + 188788 + 214143 + audio + 2352 + AQADtEmSKIyiKFICPfiRHzxOGj-cJ8hvNBFf6GqF_EJ_bJSOk3iWYcd3xISvC6cy-IP24-jhoydeXEc_-DD4EEdzHIcGH8yJs9DRHj7E40fx4cXB_GhGPDz-QHBM8Md14WRQ68WLJxfx48UHEZ2Hb8jR_CipBwjD7eg8XMdx4CbCweiPSPChnRWO5lLRHj8uo-ch_jh5-PhhmUfnHUdv-EPLHy_0Q4M__PDRHT_yBxeHo-HREzm94X_QqEXZ3fjRnNAH-Ih_9EbedLgG_eiRFx_e4jg8Hv1ynEJ-9HhN5Dv-XPiLvEVX6MuG_gjzA6eCHz2J9MtxCVpGU8GpHDlTNCNK5jieGj0RhhQuHj3-BL6FD9rxo_3RrByOo2SOhsePHs2Ls5g6wn-MHsePHtYH7ThyfAd-9PDRIz_ugcePH72JD8Z--D20Bz96OD963IwE1ah12DqhkvALa8N9_IOuw_rxx3jx47hx7Ohz6KKIE2yOS0cPv-gBHb0S-BH6H_ODhgt6_EcPnwjv4bjxoVeJBj9a-MjhF7-MPxn64HiPvtDyDa9k5GNQMjr8Imfg7yih8_iTQiNz-JTRfbhwHuctNMcH_caJBz5a6JiCzvOhG7_w4yzeoxf82NCzw-MT9MOP5uiM3ziaSOgPfodeFsjR79hxFc_hrTz64EKe4sePHv3xseiIj_DxH_rxtMOFXpqAnh58_DjhH8fhB98PnSu2ox-Oo-7h84bRCz84H0_xHl3RHG_woD2mqMV7_Ghu_PBxlEd3HIdzBOaOnvhR_fDxIvx0XIf-o0dzEX9xHM0VXKnwD97RB-dxFs2lo-zE4Tv-9Ch5uIN_-AteAZeKaryO0zWm04PPQ8OPD2FkVCf-IDyo72Dw4A603miOZ8dRuYZP_HjAw8IH7ceFHN-B1yh89EN-3Dhwoj-MPysOv9DK40eboTmeDv-hD8177MeJF5UO1A984diPLyZRXJEEMnxC_OibCH6UYzpyG2GWPUSPHz2siQ3MHz_0ToarPcOH42PwHFYO7U9xWYjNEOdxofmPHg-qvQi9o9fho9uP_ngiVTBv_OiH9wm0Mzhu3AnsZCip4-XxJUsM7TDroyfxhBXxCfqH9odcsjhV-Ef440era_AvhHuHH9WhBQ_-o5cAx8VDfTjMMUYpHrUOf0fJ4jfxUDaahxuuHj3eDdeMP9Dew8eNJv7x4Md9NBemhhl0HDq6kKph9MZnFC5kJ0dz5Md14dmRow-cHxrOI7_Bo5aO_-h65LpRXYYJ6IH5QjyO4sUrFUeD6sOPQ8sP5sKP12iO4zgOH9oNBMe34vhR_YOPHtmPPxB4yKXRw_lwCv_h3zh89Dv04yFuHT8eHu-N8-iZgsmPC4eeo6l0dN5xPfjR7Kid40N_2MWPP8R7-Ed5PB-O9h60vLhmXEVz40yIH_5xqgY-6DLuIO_xo_jRHvaHPtGR4zLw40d3BcZu-DiNDzpOPPCNLz-qF72wa8N7aPgiZEmq48aPw89QjUV0C4X8wBlyHulb1Mf34IT2YTv64JAi8gmamPgxovmO_gh__Eh1HD8U_fgR_MePH90NH_xd5MkhV4fxHOfxT4X7QrqP6njwo4NjvC7Cz7jQsnCHw8ePNIfm6RhC_7CPr-iRoyd89PgL7UJz_PgeHFOK_nh19AYTTheO7-gK8Uc9Hv1xH9uNY3oE7chf3OiHn-gN70fl40SO-1B-NDn64M0xRzlO1I4GPzu0HyhJ-Oh340fZwQ_044celOIR_Ud_XD989AwQwut-CEZJyMdxUWiO6riCF1oDx0zRP9B3BT20nMGXHEeD4tNxfNCeHPlxlDwe40dJNP-RLzr-Ak214eKRW7iGc0VarugzQ93QD2HG4kf-FD-0KAzC4_RRDvt4XAh_SEXuo9ex9Smq9UCP9EZNebigRUfv4S3-o1WE5niO_Wiyo29o6H1Q-Zji4MePPoT_o-6hH--RZ9aOXjjFwKLwo2dj3EWuoxbuC9px6OKFO2g-9AZ6G2LnDYePHj_6sDgAgjRxHBpPACBEQAYsYYYAIAwlBhRHrBNIOCscuMS4JpQAIIOhGBLQGCYAI4JRYKlzgxDAKLaMEELEAI5QIowwgEEBCFnECOcINVAYCSSgUBBlAABAMYUN0UIAqIBmVBzCGGRKMCEEMAYIBQAyBBoBmAGKiCqYskIiKxwhyFLKBFfAAUREREoRU7RgDFPBLIAIWCZAogJYpBxiZiAimFCIICYAIpxgJNoByESgsCJoCGGEE0QoBggRRzCDlGBGSMYMYUIQQpQgSBhAgAUNEmSNAFASACQwQCJEBADGEKsQM3AohgBVQFNlkGCEOoCsIAgJAAhhChEikHEGWCodAIpaZ4EQhCljjQACNEIYoswK6pRxgiIqiMGMKCYEUAwYQYmAjghsCAGCESOENEAIQgARAgDvFIFWEEYBcAIER6XWREmyBaOCWWayYABoZaBQDhigBIAIkwsQSQoBAiQAUEijgEMCMQQIoYYZCRgxECEAhEiAAACEIEoIQhUQjhkjCMFIKIkMAAoo4iQAwBimgDROCICcYIIZoAAEiikqBADICMOQIMC1zhwhTBFFkGdAAqGMFgQQIwFRQltrQGBGBIMcYcDBMSix2jIkBCAEAwQVdoQAYRgggCgIDGMEEcKAEJCBoAkUggKHHEFWCKMAEYAREYCiQDCrBEDSOAQMQwIJqKgFzAginOBOIgCEAkIYpChicjjBAIAGYYMEGI4AIQwhUEqQCCEWEISQZYgAIJhEBBIDADAGUSYJEZEpB4QiCGFILEIAUIGUMAQJwQRIBhgmDFAKEO2QIEwxB7BTSClDAEFGAyUUJQAJSwEkDhkFBBUACAIAMAhJx4hBQAEjxDEEISQJUtQAYYAyhAgoRRMKACGMtkABQYwwAhBgiFJCOQAIYIQLJoAxzjIMiAGIIUKEsAAAwRAhhoICFCTACOQIQQA + + f2e1d23d + b16f6bf64d62005e08e01292ef2fcce9 + d39945531f75c0b25e6519420d445b4024db07d3 + 1572864:uG9F/U3AjoCHF1xF/Z76oXmTcDnhEU0V75xi:FswjoCH7fScbhaVb + + + + cdrom (Track 09).bin + 68986512 + + 9 + 1 + + 214144 + 243474 + audio + 2352 + AQADtEoShVEURVJw_PiFQEfgOirOHLxuOOkSC7eR7DnyHk-CyR-ewM-PPrh0_ELytEJ4OBe64sfv48crGf8L4MeP-5h-_AgZPDx05TgRrgz8ox8i8YPjPLgUHH7wFSF__OgN58GRHxZz9Inx41okNHxQ68J7aM_hGj10NF-O8JJx4hVxohGRHzqzHFt8PMKz4zx8PMeJND9KPNTR7zDC5_gDHz_OnPiLMEfYhcdR_WgeyOZxHf0Fj63wuch1_C784MGzHD8Odz8q2sdrHH-C_sefo4gO6AoRXgd-4ERz5MeP6wirLHCk40ffKviOZ0TI_XAf9FmQE8dl4T-mU8fFS-iO8_iBPsKP9IIYOkEkPFdQKQ98_DgOH8-Oh3CoHvfQD1fxHO3hKi2OI72JB3pveEB-_EiLPkMPH5Uv5M2DRuJRScKNPNiO63iG8-gPj9lRphfkozeaBzduaMLho1YW6GiC8MHDHQ9CNNWNR8GNHD5-4slQoYkYHTN5_PiNfzj-o4fPIz2e4_AP7Tt-9DTSXzj8A2fxwzn-41sO-zgu4YR_3EP9I061B9p5hKGOB8dFhPBxHsqOvkdMdN3xH95x6zjhI7xxH4f2wCr26LjhGc-u4MoD10afBflR8_CR5_jhQ5WOTqfQL4fPoz1-RDqeCl5CGZ0vhDf8QxMN5EaP-LB2I5-Cv_BnXPiA9OiZ48JR-Dy-5MAfmIyO6ziPI0R3_GieAC_6G9t19PhyoUdzHjf6DP7R40fYFf4h3sPRLjP6w9yCE-LI42IGfxWhxx6uB-mNHr0GH_9Q_ngTHT_-o83xw-txRPtRqCZudB38C5oeHGUQ5scXBid65MdR9sJ3FedQ_fgEkxl-YtLRG66KHveNHhb6KIeuDz8akUHIKBfOHAhv-OEQPjSO-vCPT3nwInVayOkQaj9-XMeNXkF66MPDB3lvnMHx4MARnng6BZcGRdIvmKM1_IfywykVhMdzfNFRn2ie48ePxiH6hEN1WO2NsjP-C-2RH344fPSQHl-QHtVH9BCd6ahu9Ed6Hbl4HCJ5XDqOszguqJaObg9i4Tn6oDlx4sM-HCUv_DL-4D36_Dhe1Dp8_HBMhMatQ4dGHo3k4w-eCtcNzceUH3uIHz3OGaL-4dTR24SOZjomUbtwHif6wtnQ6zjyByWJfw-uHbfw6sjzA3rww5SOP-iHH0elFfsyiDx-NF-QK9iP_oIfhJ9x9Id4ofPRw_xxSujjQbuRPujxo_MJfxeqrTd-NOiJz2jO7OiPI5cOLTcO__iRJsY7fMihHkdn3EcPv-hPoz-eC_pcnD_SiLiP40cwcoF-InwenMgzE_-gHekjodSD50I_NM-MXAr6vNCh4x9cnNkhfEYY5zhuooQfhGuLY3qN4xWCIkcv6Pge9MeZHBpZmEPIDveLHz1z-IlwGOEafDHG-mjGHn2ODxMPV0WPo4eWWAK-Hmjio-x8_EJ7NB9eozlK4qGhU0YfNGN240eF9NnRdTJ2VIersEOP_vCL6uh5WGFQi0DIy0iyKoO_oGtxPWjhGd_wI9fxCXIzOMoV4w90obYRfnhxmDxCcsd7_EXuY0909HBv9HhuNEefBTn0o1JyWDu-pHg14LyQcse1cLiJLdXwECeeoGcqfMNzXESfo4l9vJmID6F-eIzQf-gN0ZuP_vgv9DvEETduuCp6ASV3Bc4edBGhPtgPLffRFydOofAuwEePozpEtBw-lL_hG52BHj4Of-hxfIdG5ki5CyVzoLnRF4-C5jL648EVhJkO7UIPd0eLmSF-aOeRXnh51HfwIyyh5UfeHd9RHd4Go6-LnkaY70iutMOj40dPI70UaDpy8XiOPjpyp4Oe6AhJVMqNzTn6Fz9yopcA_ULJCP-xfjcKc8WL4y-s76hofOiPZuKDjzn-A-Jn4_gQnrB1lEf1Fs0eE2fxIzwD7xZ6KOovuEdLHb_RchAVFj9-pCf6ybj44ugzwsdV5JzgEzqPH-KPPgvKQ0vwjETlCX47lFKOV9B4-CfqLUVOoz_840Rv3HiOZj_xLccfuCi74PzxVSia78OXHI2eCrUkVB_St8ehpUJ045pRXChD_PiDP3hElIftoj9OnD7y4OHxNMd_7Nlx6jEuVD98yCR2Io2EMhd-FeFnQayD4sjRjDl6AKQwYi4QYjCBQiLADBACGQoMM0AQQQwkCgAJqAIMMCgEMoIJJJxhIhihGFKGOYEQFQAgQhSwaDDBAIMAAGYcIEgxwqQQhABBAPHMEGQcEswAgyBQxBkEDFKEEMgIEEwJIJAAQCAOEBgIQ4MccAw6gRBBQgkFiWEEAIAoksAQpIxwjiLAQGDOAmGBBII55RBQ0hFhjBHGgImYYEAhQoRUCAyqmBDKIKYkIFAJBgVTAjJghAVQKMmIIMAyAgwBykmCBEAAYVEcEQAAICACTRFikADGCOABcUABg4gBgBhkhIICKEIF0kQAwQBihBqlgMcGCICEQZYgZABgiiECpDMMUgWEUMIIYggASgCkhBiGWiwcAEQQhhggzgkHgAAAAciUYZRAIiwByDHhgCNMUAQEEVQpYAgBxFggiFEAkAYYAgwB4pygBnNiBGFUQbAAJ4IIgIgSDiCDBBUEAAkAMEAZYCxTCBukARBIkEIQc9AJR5gFzglojAOEAUKAIAg4ApwywiEqAAPKICaMAcAA84QDBBDBCAAAMEGFVEAY4owBREiCHBWCGEQAIkA5o4QAhChkCQACAEKEA0goNRhiQiHNgCIGKASEQIIpgQywQDiiEBJEOGCBI0wCJYhnABAAkAMAAEYYQcApQgxACgkGAAOCGAMJJQIoAQkUzDOiBDMAkCmwAEAAAJRRzhjDGIHIKEKEElYYYRAGRhkFGDLMMQCUQMIQMZCSTAAlLDJCCUCcAYAICw5wxikkhEMOMZMcIIoQKARoRBmDBKOCMegEM1QIaAkCzgoDiGFWCKEYUQQIAIQgThCDBEOEUMcEMsAQAIhYCCAmDDGCCCEsFNQBIZgRggAABBUMASkIMEIoIIBQDAElBAPIOICUkMIwRikQBBACGQAQAGIIAERERUBwhkgDhXQAMmEMAAgYQggzgBrGEHEeKQ + + c02692e1 + 54f1a5a8a02c56ee3a7bb412b88fabb7 + 75cba3f2871a809732f5b73a2da0891111f2641a + 1572864:3vtCFjJahS9n07BF3YwSbpqz9S2b4pU1s54JfUg:wtsEnvpqz111s54JfUg + + + + cdrom (Track 10).bin + 37876608 + + 10 + 1 + + 243475 + 259578 + audio + 2352 + AQADtEoShVEUZUnw4_hx_cihG2Hy4OUyXJFRNRrhUDqOEL8KfUGesPjBW0YPn6gto3vx5iAujS3yJ_B36DBznDm-GM15_OClQ-_xdwhDKsd04Tx62M2F_IeOrwqs4ulo7Mwhhj7a4hf6oOkr6IhfNC465IeuGj-ipgeqw2dR8sJpfEPr48hzXPhxiD-iSzAfHD-acHiR40O3E0cfVG9x-A_2QDyOPDh-OD5qHz-QG9qbBmn9YMKP3nD2FaVEazgixTU0ssOVREeOHxUfWLEo4SWeHZ1cIseDarugwsx2oWdGfA9-7EMPx8eFi3AeMIc28YG5FeFx52BEDj4eHT_SS1BO9MH34cSP3snhL8d1FTpOengZDr_gFz5x9nCpQzuLkkfz4T0eFnpNNCd-hHmCKzv-oftl-CH6ZCS-I8dvyJFxh0dzGv1xXMmhhzrycLgYCk8UhkZ-9Ggu4s2hSsIvaM-O5oyOO2IOOdtx48ePf-g1C86DPhf-lMJ3NKco_NGhX3Au1DoKi8mH3sSPPt-Q6sRZ5CQ-_AS0S3iNo5IHX8FP9DkeJepwPHiPnpCNH3mD88dxwceuWMhn_MKXLUep5FCuQHu6ojmPD1eH80FHiOSGij-O_HjwKyjSo-KgH2eNXDiOoZuP9MfI6TgRHD98XE8B50bI4g90Cs9xSkfzoMd7HHou9MFZGUgDdO1xnD-C0_hN9A8s_McP_9A3D33R40fT4yIuCzjCX0g14_hh9IT-B_Vm-EeOH01-fGYQRkF_4zxxHn2EJ0O6hUfZ45dxKeij49SIkDh3KEr0NOiPR6KFH6dyfEOPS3sRffBT_ER_xB9x6M3xthn6wHmKXsGPnlXgNMzxHdVfnOhepDzxXcWPO7CL73gunEKoH_iOH6qfoM-PhnizHJegT_CFS0fO42rRP4WNf4jkHerWMziJA_8ERbmC8Dye9sGjEReZ4znCH02cKIeO5w_OC72E5sdPVOrRlUG-45hv9DXCfC--4yeULztOND-KHj6Ff7COEMePHv5xo8cRLvqNElCv4-jxD8f94nB0FM-L7og2-QjPYhqpo_nx49CN_zj0o5wdOEePH5pvOL_R4zl6OD80qsePH-34wId2_Dou3EOP4xOe4z9cNUafefiO8B18HZUZoxeeUPhipOvwrRsUbQ2u4eGFo_zh4_iP7xPcrQr2Hd5x49qhdcUv_MI1C82XDF384xEqdSmaH_nwXpj84Zhi4xmD6xya7ejx413RHD3aEX5RH-EPv-gNPRuAT-gOux6uo8fHo9vx8cCDH0Lt47iG_LhQTUFOfHg96BeaHw-e4xqPPkWz4z2OY_Lh77hw_Nhx6HCQB8cP_-iv4MeR44KeorvhBz3048X148ehyMsK__iH8EfuEeXRnBN08ThahYW_YNx0WD2-4HrwHn_wPniQRlYQcho-4YeekOh57LLw41Er6Mqxo2lD4k-QK_zwXEN5HOlpnAgvHdcJVKeQckuF0yp-9Be6Q8xk9CKuGu0x5bi044cUaXCNXDtwHFcdZFaWQ9_xYjvyLchHlDP-_HiO5nzQB6p4dCKa57iI_fh4DT0ewsej44nwYct95CRhoseP5z3-Bz2e4yhqhYe5oyd-dNQx5R9eD_kFLfURakvxK8fVoMkeoztxKsMvhIcvBX12jMfxP9DyCz2Pwkd16egFkRm34Hjh8-jxD6exV-ihHvsXnDnyDxe-DocrtOfxHEf0zIKe48ErfXguVD2aZ6B1Qj9cx8FJI3x8hIk4PPzw_WjONIL2EB-6cD98UM6PL8cH59Dk43SAphf6E9Uh5uiFnkJDEvrRqD165PtxND3KHx_C7MnRqTp-fHVQUWHh67gIPxJ-dL1Rb4eutHCFD8-FPjpetMvSoTnxC-dxiA_u6mhjC2Ee_MKFdvkQRpehFz9yYpeDy8Ep4y9CndDy4OmQ48Fx5tiD82ieBP_QLOqDBz_6E9sXVNfwI1_Qx_ATkdCShh4-pnh6-A8ephr-CSVj4xch4nqM50gvHNbRFy-O_KgeXEcPdIdlvtB-NO_QA42O3riG49A87MaPH4aO_sh-1NThC48PW8uE0D30ouERngd3CkfTLUc_HH2Wwz-cFn16HDlqvRDPoyeqo1GLH00_od-RX2jOoM88EM2zDqGMX9PRDn9wHT-6LYf0C82Dd0g_9McXFb-OhiRqH_mhF81bIjyYo8l3PNqQ_0FTHcwz6DnwDVem4TJ-nA_CXEG3o70BA5FyhAERjBQIJIGQkEIgg4QxCgDpBENAAAmMAQgIARQGBBDkFFLEEQQ8YkhIQaxAzAFTmEOACwWdpQISB6AiBgGkIAFFMkGQFERIJcQRpDjGGHHgEKGAQQwrhZBQAgiokGWQCCCYYQoIwQwHAggICAPKSAYYAQ4YRIADAgEjyWJAASVEIgZAIIzDRiClhAAGAEIBYoYJYAEgQjAAABEMGiEMAII4YwiTDAwmlDCgASUUEwAQ6qxiRACgrAICMWIAo4SJ4hAggognlCBOKSUIMJJQwwRACiAyGHJOAgAYAAog4IRUgEBzABBQFGIBI0AIBcBDhiACDCIMU2aAcMAw4wRBAiCkjDXEKkkIAcIAgA0RUAiEBKEGIEKJdcAJJZBhSBkBiABEBEWEEcIIggQhiRAggCBAMKWAQkAIYohQUBij4BECGCUUIMgQLRwxyBGsHCUUAALYgsIgYKlDRBCHhHIQHCDAUoYoRoxQThDjCCXMAEoAAUZYspgRQAjhEHGAAgiMYAOYiAAgBFgHCCCOIQUAMQhwYgh1QCAtiEEQOGIUF8o4IQzhwIgwhFGKgSwIAEiQo4BQAiDxnCACAQvFIIICQYVhCjFoCBUKmSCEQiIJ4gQiVgBiBlEOAIKcMsQLYJ0QhgJjkAMGACUgAk4QYpQDhhBikUREOAAUc4gQJAoggADAEBDKIIIYAQBTZASDRighqAEEGCIYosAIAAkQCgjBhIDCASYwEAZzIQQgyhgAMLNAEGaoYBgg4ZhAkASjJDWGMSEgcIAgQwgSDBECgCOAIoGEQcYxIxAxCiFhDRAGCKIAcEwRgAAwwACBpAFCBCaMIQkBhAEIAAHCAMSKOCS8EsMghghBgDJGgBBEEQWMEMIoYJiAQBkBxABwGQCdJgQopQhQYDwBACLAOSOoAUYDIowIRABBiQBMMkGEAQAQpwgQQAjiDFOMEWIUE8IwAQFRwgCFAFQEACOgAQgyYYwAEg + + 7aa314f4 + 712af004d77a3ca1719428ff8850b651 + 9f45738a70bc6d6ef5dac6aff1b792e4fe16383f + 786432:PxICYbz9zb6VilMy8n/5nwCnNeXIXbo4it7ryWCF9bMfdbHQyuvhVgtyGN:PxJQNeiTHSNeXIAhrMF9ceGN + + + + cdrom (Track 11).bin + 56019936 + + 11 + 1 + + 259579 + 283396 + audio + 2352 + AQADtEkUhVEURYnw4zmiswhyHM3W4KGF_3CcxcElHSEXrdBzOC8eOP7xB9_Qu8KVZcVvaOcDf8d3bEpHVFtaMNyLq8Yz9MePUPxhsRc8aYdfhHIOFq9c9BdMJRFCPhP-4P5QpeHh6Ub4Q9cp5BFOBn3gJ8eTd2h-_M8QfkiWLTz-44mIssvRSMd__MSLaxqH8DG0jPRQzocWNcPNQ0PzLN-gGheaHz1DI2KTo0eTh7gU4j_OH2H2Q-eDPtAR6sqOZpFmPD_6pcIUXRV-IZQOfUf8HZsYcyi5KjjSHz-URxf6Y50y4s8h9nhyxA268jhfXD_yjEHzD_-gTCEzVFuOcjl4B5eCPsdnhKJzWOwFT9pxZEl-4GrioqeQUopQPsW_4P7QeTkcijVC-tBPIWdwMkEf-Dkusmj04daHfBDHHnEZ44mIl4elCz_-4z0-jUO4B81-aGSPxoGa5hD83rizQxb6ozlDI26C6UGTh7gU4j_OI-Q_iD965dARXjwcRVqKLj_6WWj0WNi7CLEO7UHERzcsxhxKrsMR5jx66NSFPsenjMIfQj9cJUfcoCuPv7gyIme2oPmFf4d4BpOSLB_6HOwdXEK_4LMRij4sNvCkXeBzpF9RHX9iTDaFlFJQPsW54PowxsvRhGKH8rh2I8e5JNB3owl3dCFDoskdI-yOo42Ywls4VFQ4_MRD3Dv2HNeFsEoOlS-C_2iOHx_eSMctDj2NNLKO82gcLSLuHPIH57j24vgh5qGOnAtuDz8a5SmqawJCnoN45uiV40h2EU00La1w4V2DRs-DvhOuR0j2HPF3XESjLHuEawjzBT0F3UefL7CmzHAe4odY5Ygt9CHuV3iG2HXQv4J_OA6hKcnIYXpy_A48Cf6Cfkco2sYffNmF-4OfhUYoH_Nz1M4EcwlCLsxxKrg-PB6amPkQUs_xHvqP_MIfNA8usoT1odfxB8nyDiFXD_eKR2iULkd7Hg9OXA2HV0KY_UNPC95SvBn-Q8tROcuhHxf8401OIT-a_Ogb4tFy4wj_Q9yPXsnxFzrCRFaOTkpmnEQjs0J_4S8R8oW-4I2IRjm-KuiHJmZC6NvR5NC85ehOBT9cZUF4oaoK6ynaC7HuoB8r-IfjENpCShin5OiLawOfoQ-RxbrwpsQnPhH-wGeIysGN6cGXfEi_QHscfIkLVWSOSXnxHFfR_LiFP4b2BFpidqh_aOEm49g7hHHwhRu6GOh5NGPxDOFlaPGRM6pkvBouBbWKhqOI58jVbriG7jm0nGgc7ei0jND5oDn6LLiGP_AevMmM_Eaz9Qza41SG_IO2tGjKrvikQb_iwNeRM3h-_EYb1fA64-iPHLq0IGeuoslERkG4kOiT5UWT4wqeozKX4YVVlBOP-MG3zMGPMDrRM7Ghf-h-OFq44FVM7IF-8Bk0_ci3ozf-qAkukO2Rh8GPLVeMdl6QL0HzovaD-6hiHp70Fe-R7MiTYCf6wOcx5haal_gQ0iKS5WGHM3jGokuXo8EZEu-P_C4ejdDyGBWqX2gs4tHQoyGXC_fxQ4uOcmGO2PlQ_mhy4uOFU8d_Igzjo8-hT9AR9pngB8fDacVV4peQLxHEc4i3RbD8oY-s4IdPBI-pQvuHZ8p0_BAnHX2OuCl6Hp2P7yJyLhb6a_AWqGlY-BSDPbLxTYnxRBmqf0VeHtOZCl4SBdePK8iz8KiOO8YvGWElHs1kCsclC_GXHM34DIoU5cGVD1eCntDyIN-CD88blDfSH0l0Hf9xJsdnovOJvxqmH_kXJLzxj3jU45-HJqkW9Mne4MuxB2GrGD9UT0d3He8hhyf-wg_OHT86NFxp5Dneo8lDdFJ4_Md5hIf3B9p36KjmEGGURimOZ-jyVHC2i8iZ8tAe5Me35GjEMyirI8yZFb3wE9rzBfKUifiL_0ifrHhTdKVwlhUu8sgL_Rz6MMeWE3EStnhdHLki-EHPCqEPR2uOVD3cH5VzXCfmx2geCj1yZcJVFccTKcsxyWyEtFB0HHlUfMnRrBcusoOFysgHLWMRql3xfXi0aCEaHrWIHz-upcilDt51XD2cjziT4xv8499x9Gh0Ds8RPnzgF-1xXsT3IvwFcaSHfznKQ487hDmPykKfJRQ8khW-w-tz5BnEH6G0I5wYEs2uoFeg5clx6uivBN-GH-Kd48pE5BSuBZ2PKz_yOGisF_oHP8S1kEOu5YjYBx-0D_pxHuWaI79w8WhiBrlyPEdvw4zyo6eF_NlUnCIazTmu49Lxo1cm4TPy5GiO-sUP_cK3IxKc44Ll44yFhiN-IT-0HCEfDsefo9vhZSbC4XxxXP0ELYz4oDy0u3Ca5MUDLeKgqsfZ4bmDZuRRHcGf6Dh3VNYDnzPMMQglLXIE_UK4K_CzDaGOSlxEeBlzdI4rqEZ9BX4qHD7iLS_MiA5g9FuPVw_CQ2yF8HiZoTr2w5oCc8eXB3kylciJPnOQh0yhVYmNtMdNUCR-vAIlxReOhJtu5Lhp4Y9hZx_2JchzNNEN5aeKvDmuH_5x_8iPN5Khx0IoWNhj-BFyMvAXHVp7fMhN9Edz40FffJKJzrrwRy7yRocufEen9QhzOsKXI0ejC_WhP0F-NCf6Bc9xxRmeHs13lB015GkaaHfh6Mij48xxCulz9Ed-3GmCUz96Fs2XNDiDsAoP8QxCise74-1R7RduwtqL_Eh-VHqP60GfHv8s3EOlrEW-HFOGGy_hLytU5DsOxQiRLhlGDGAIIYGAE0QBYYQQwgJEGEOOAAAIEEgIgRgwABkhFCQYICAABIIwAghggDgiGFICAQAAEIgJo40AwBgAhFAAGQEEE4Q4IhgAzilBDBECAaQYE8wQIIAUCAADFVHIAUAsEEQJZIABQjhEsECAAqMFIwA4whBQyAhBgAEAIMUANgIAY4AQShBhDGCCEMQUEGAIBwRAAiAPBHMEKKEAEAAACAhxQjAgPAGCImOcIZIYgpDkAjBAECLKACIUY0AQZAQhAhiFlJCGGSAEU8IoIIhQRhACCGCKAcEAFwIIIJAIBAhCCEACOAIEEYIQgQSQAACKDAAIGGIAEYAhAahggALgABFMHAGAEMAAbJAVSgChkBEAGEMAEIIIxbAhCgAgFHCMACIBAdIQSwgSxiIiDBCAAIAUAUAZQJhRgBIDABDIGALEcEIQZggTBAEEvBAgCKAUEEAoAAAwSglABKlAEUEAkKIhSxAgjghFgDGYCIIQIIAABACyQigAjCBGAGgIEAY4oJgwAgEClDEACAGY4cQIAZBBwgAAiAJEBUEaZYIoAhgTSgigjCNECCQIIsIAQwggAAiihFPAIqKQaIAQRgQUxBADhCTKIGCIAQogQZVQRDACABCEYBAAAYQAYJRBQCwDmGEAGAMUAUQAzwQSQgkBEADAEAMEQIgBAAwASgEBnPLGECsQAAIpYYgzIAgSBQMKaAaEAEMpoYAAAAkDlAFAkHOYAwAAYQAUAgAAgVDCGAIkIkYRBIgARACEABLAAQYkgAIA4AwjBCABmEHCUMEAAUIIBoAykBlDEQKAKSeQoBAxRwhEhBIBLBMOEECEkIgaoCwRxBBhkAGAAoMIJkAAos2TzhlilBLAASAsAIkBIgCQQhgACCCACCOAkgQ6IQAgFAilmDCACAG4EwwgoQQUjBFAAEQGAIKAJYYYjJhgjCCBAAEEAkGAAMAAgKAQRDACBABCOUQAgAo + + 866d4fc3 + 27a3b0f5b0af73daf0fbfe62410f40ce + 162fa75f3621bf0ebb53c649dd01419012945740 + 786432:dQlcqW4q03P92YPsY3Kw6mdcutJb7USKPAldww7dQaFIZrws4B4SuBUCrS:dy3PsYDJ5/bYtPA31JQTZcsZJUCrS + + + + diff --git a/CICMMetadata/samples/multiple_floppies.xml b/CICMMetadata/samples/multiple_floppies.xml new file mode 100644 index 0000000..6f56710 --- /dev/null +++ b/CICMMetadata/samples/multiple_floppies.xml @@ -0,0 +1,198 @@ + + + id Software + DOOM + 1.2 + Retail + 1994-02-17 + + doom + + + Games + + + First-person shooter + + + eng + + + i386 + + + ia32 + + + Doom v1.2 (1994)(id Software)(Disk 1 of 4).dsk + 1474560 + + 0x367d + 0x749f9b21 + 2729a2775d700d062f0da7ed2b14fc08 + 117637a9e42b59f75ce6b7e17be21370c3ca4ee1 + 24576:vfEFUAvpAvRlGnnyz+7lB1ODidGpZIY53x/9jO6J1sSSLNS87Q8LpeOIU8MeF79G:vfyOvwB1FGnIY5hxNWSHt8LLd8B7MaO + + + 1 + 4 + + 512 + 512 + 2880 + + 2 + 80 + 18 + + 93.7 + 90.0 + 3.3 + + + + 1 + 0 + 2879 + + + FAT12 + 512 + 2880 + false + false + + + + + + + Doom v1.2 (1994)(id Software)(Disk 2 of 4).dsk + 1474560 + + 0x594d + 0x13a68229 + ee087c084194ecd7f0acd2fec259f700 + 5c5b647d42d1b89d9199c6529486f1d52baacf57 + 24576:OPCNu5fOvENtXe/WmeVGeRTsAmExgydvKmaGhr1GYwGAjdCEQQY0kan:OPIuVHNl84PTDRKmNhUYtAjdCzQdkY + + + 2 + 4 + + 512 + 512 + 2880 + + 2 + 80 + 18 + + 93.7 + 90.0 + 3.3 + + + + 1 + 0 + 2879 + + + FAT12 + 512 + 2880 + false + false + + + + + + + Doom v1.2 (1994)(id Software)(Disk 3 of 4).dsk + 1474560 + + 0x124f + 0x70f8d3a0 + 4d5e5f40b12b485d180012fea59b2ba7 + 3fde0fbd3a33c9a5f8ec7cb9fc570bd1ee5adc36 + 24576:CHH7fNNK2sBYoNPjhkz96eEpE3GRjrgtmbNcc9tYLB590THjl1:CHH7fjK/BY8kzYeEptHg8NccI6/ + + + 3 + 4 + + 512 + 512 + 2880 + + 2 + 80 + 18 + + 93.7 + 90.0 + 3.3 + + + + 1 + 0 + 2879 + + + FAT12 + 512 + 2880 + false + false + + + + + + + Doom v1.2 (1994)(id Software)(Disk 4 of 4).dsk + 1474560 + + 0xe123 + 0x43f9330e + 5757c3329058db08f8ecd6108520be83 + 845707cb49faf201e057a19cbb8911b00fe0ea29 + 24576:DlhsgMwAmM1+mK62iQYVJ2K0BxVyaWRnjakQ:3CfaiQYP2VBxVCRnjaH + + + 4 + 4 + + 512 + 512 + 2880 + + 2 + 80 + 18 + + 93.7 + 90.0 + 3.3 + + + + 1 + 0 + 2879 + + + FAT12 + 512 + 2880 + false + false + + + + + + diff --git a/CICMMetadata/samples/pcirom.xml b/CICMMetadata/samples/pcirom.xml new file mode 100644 index 0000000..5b94d55 --- /dev/null +++ b/CICMMetadata/samples/pcirom.xml @@ -0,0 +1,42 @@ + + + Adaptec + AHA-2940U2/U2W + + ia32 + + + 36869 + 16 + + aha2940u2.conf.bin + 256 + + 5f9b59691890feb957c01340e7bef4ad + 940ff2632bec7fa4274c256f2128d41069c414b7 + 458efd04ee7d5b8cd90a269b568c59181b51e770cc8aa255580cdeefb2436462 + b3f3520aaef141096eedd1316c8fabae8c9ce8728e8f9514 + d87fca5176f174e6ce5b4e303b595e41ae561e51ad332b838375394d66777dfe402e403acd4d071279693b24af5e55c25cfd6944b34a9bb229fa854d849ecbb8 + + + + aha2940u2.rom + 40960 + + 0x49eee01b + 0xb943 + 0x041bd908 + 0x3ee7cc130a1c280d + e86d20cac3727a0ebaf901eeef1a283a + 064b2b8050296caa535aa08de35d051e9e3fb6c7 + 9c2f1b6c07a00c16e35c82ee79050a459568f645 + 150366229d7bf649646f432bae95b31dc2ef51d23d43c2b5cac990aaa9b389e4 + 8e87bc09e451a69cc065cacc9a22d4f52df665f8229810d8cebeb50b505a2b2a6ea55cf282454ba7b53da15b0a2c4d73 + 2328d06b688925c5807dec9b958e270ed90d6117a755aee74d2f8d688159e94f39ed4d38e58bd02c7f81a3254fea0b011ff2f9bf7a846597728803d02c9e5e14 + 768:k9kvYRjE4p9FmqPG8A/dBBHMRkxOZkw73R7Ph86W35zD:k9kgOc9N2DHy8W998t + + Adaptec AHA-2940U2B SCSI BIOS v2.20.0 + PLCC + + + diff --git a/CICMMetadata/samples/pspumd.xml b/CICMMetadata/samples/pspumd.xml new file mode 100644 index 0000000..5a35c82 --- /dev/null +++ b/CICMMetadata/samples/pspumd.xml @@ -0,0 +1,263 @@ + + + EA LA + EA Games + Medal of Honor Heroes™ 2 + 1.00 + Retail + 2007-11-30 + + 5030934059299 + + DWX05805828D + ULES-00956 + + Games + + + First-person shooter + + + deu + fra + ita + spa + + + PlayStation Portable System Software + + + psp + + + + PlayStation Portable System Software + 3.51 + + + + spa + 22 + 84x170 + + manual_es.pdf + + 5ac6e3c1 + 8fb25698d2ce5f8d413bc92282d18720 + 70f4c9bfb092c5bb5875a73ebe47d762bee3ac10 + 5e022c7dfd12b54d1aa9ce98ea10f7dd81b5b1ec001ac49ad567a5d8d456a66f + 393216:muQhmo9jxgpVM0fwLGviZjylkxf0eZw4CSf4rlzpEA6hm:muOjZ6AGWyla0iGNr0Y + + + Natalia Portillo + Epson + Perfection 2400 + xxxxxxxxxxxxxxxxxx + Image Capture.app + 6.3 (502.1) + + + Natalia Portillo + ScanTailor + 0.9.11.1 + + + Natalia Portillo + Adobe Acrobat + 11.0.3 + spa + + + + + Medal of Honor Heroes 2 (Europe) (De,Es,Fr,It).iso + 1226768384 + + -1 + + + 8f47eb95 + 1417 + a7c1c1bc + 36ded46fce50efd2 + 7c472f83140e3af1a2fcdcdbadec850a + d9cf3cb3a2dea71ef8168797dc64e19b665c41d3 + 261898a262cdc8652e8d2c0e978e72c1c34a26fa + e6260e593c986e7c914b1588ab842e683170a7efb2b04cca5b08bcdac5595427 + c6b5acb50e5edd85e8615495b37d1f7abf754c41b6c6f45f3c082cbe6b01bb20eb5881d7cb36f5272ba6c58764aa6e82 + 5e9e2e8400d73ed5dd42253a0059a0bfe4dd0b451c9a757cd48818c87adacb1ca6698ae5a3cf93c72a16164fef4b6b35f60116b01d6dda83824a80372857868a + 12582912:kL8uYHoKqsJhjI6kejtUDRJWJCJiJ3JmJ+JwJDrjr1JdJnJhJ8rqyrwrqLrhrcPG:GVYIVQ1IWQ + + A0100878064-A911 16 + IFPI L556 Sony DADC + A2 + A0100878064-B911 17 + IFPI L557 Sony DADC + A1 + UMD + DL + 1 + 1 + MagicGate + + 60 + 32 + 64 + + + PSP + + + cover + + cover_es.png + + 864d127f + 5edb007ebc612bde8ed770a119863b22 + a98cb55d1c241a02bbaa6b621524276898821b72 + 67079e60209d30f0b6fa47bd8c786a020fda98f9a6b95ddeeaaf7f6aa665baa7 + 786432:JRB18CIZlzYWQWcj2qnzKFZXSx9VGh1DoWDaL8hII9Z16r6:PB18CIZtYWkjfz1xWmwQ8hIq2r6 + + + Natalia Portillo + Epson + Perfection 2400 + xxxxxxxxxxxxxxxxxx + Image Capture.app + 6.3 (502.1) + + + Natalia Portillo + Preview.app + 7.0 (826) + + + + + + + + label + + disc_label.png + + 4581778a + 0ef2c3333f773fe0578b9f2688813969 + 3721908aa68fcc0b417843508e08e4c4bffba47e + 6defc6c15d16b85d4a03287e64f07c42fb99afe028eac45d8a2d56f1da19c329 + 98304:OuOsmvSE/00ZxNSnbUGZASJw84/jWOrpuu9HOTy79DtaMr/wVeh:OuOsmvPxN6UAJ4rWOg0uToDtfmeh + + + Natalia Portillo + Epson + Perfection 2400 + xxxxxxxxxxxxxxxxxx + Image Capture.app + 6.3 (502.1) + + + Natalia Portillo + Preview.app + 7.0 (826) + + + + + data + + disc_data.png + + a84cafe4 + a24a06ef4f45e0ea7d89508b616fb5fa + 13e988df0bbff40666fd902c3e26454973df6ea9 + 805230c3037f342b18c9a9b0eaad35a216582dc71607b599c7a58cb7e83458ac + 49152:++RUFqSn6d20+rI9W+wIqUen2IHrwCINYD+CGS4rFM88UlVenKCCMGB4gm6A+Gp2:+g26y4boqCgAT4rFMElsnKhhzA+Yri + + + Natalia Portillo + Epson + Perfection 2400 + xxxxxxxxxxxxxxxxxx + Image Capture.app + 6.3 (502.1) + + + Natalia Portillo + Preview.app + 7.0 (826) + + + + + + Medal of Honor Heroes 2 (Europe) (De,Es,Fr,It).iso + 1226768384 + + 1 + 1 + + 0 + 599007 + data + 2048 + + 8f47eb95 + 1417 + a7c1c1bc + 36ded46fce50efd2 + 7c472f83140e3af1a2fcdcdbadec850a + d9cf3cb3a2dea71ef8168797dc64e19b665c41d3 + 261898a262cdc8652e8d2c0e978e72c1c34a26fa + e6260e593c986e7c914b1588ab842e683170a7efb2b04cca5b08bcdac5595427 + c6b5acb50e5edd85e8615495b37d1f7abf754c41b6c6f45f3c082cbe6b01bb20eb5881d7cb36f5272ba6c58764aa6e82 + 5e9e2e8400d73ed5dd42253a0059a0bfe4dd0b451c9a757cd48818c87adacb1ca6698ae5a3cf93c72a16164fef4b6b35f60116b01d6dda83824a80372857868a + 12582912:kL8uYHoKqsJhjI6kejtUDRJWJCJiJ3JmJ+JwJDrjr1JdJnJhJ8rqyrwrqLrhrcPG:GVYIVQ1IWQ + + + + 1 + 0 + 599007 + + + ISO9660 + 2007/10/11 20:26:37 + 2048 + 599008 + 550 + false + + MOH + 0 + False + PSP GAME + MOH + ELECTRONIC ARTS + ELECTRONIC ARTS + PSP GAME + + + + + + + + Sony + PSP3004 + 6.60 + xx-xxxxxxxx-xxxxxxx-PSP3004 + + + 0 + 599007 + + + + PlayStation Portable System Software + CFW 6.60 + PlayStation Portable System Software + + + + + diff --git a/GzipBenchmark.sln b/GzipBenchmark.sln new file mode 100644 index 0000000..229f802 --- /dev/null +++ b/GzipBenchmark.sln @@ -0,0 +1,40 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AaruBenchmark", "AaruBenchmark\AaruBenchmark.csproj", "{19D6E240-64A0-4F06-BF38-EEE93BE86F30}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aaru.Checksums", "Aaru.Checksums\Aaru.Checksums.csproj", "{CC48B324-A532-4A45-87A6-6F91F7141E8D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aaru.CommonTypes", "Aaru.CommonTypes\Aaru.CommonTypes.csproj", "{F2B84194-26EB-4227-B1C5-6602517E85AE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aaru.Console", "Aaru.Console\Aaru.Console.csproj", "{CCAA7AFE-C094-4D82-A66D-630DE8A3F545}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aaru.Helpers", "Aaru.Helpers\Aaru.Helpers.csproj", "{F8BDF57B-1571-4CD0-84B3-B422088D359A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {19D6E240-64A0-4F06-BF38-EEE93BE86F30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {19D6E240-64A0-4F06-BF38-EEE93BE86F30}.Debug|Any CPU.Build.0 = Debug|Any CPU + {19D6E240-64A0-4F06-BF38-EEE93BE86F30}.Release|Any CPU.ActiveCfg = Release|Any CPU + {19D6E240-64A0-4F06-BF38-EEE93BE86F30}.Release|Any CPU.Build.0 = Release|Any CPU + {CC48B324-A532-4A45-87A6-6F91F7141E8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CC48B324-A532-4A45-87A6-6F91F7141E8D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC48B324-A532-4A45-87A6-6F91F7141E8D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CC48B324-A532-4A45-87A6-6F91F7141E8D}.Release|Any CPU.Build.0 = Release|Any CPU + {F2B84194-26EB-4227-B1C5-6602517E85AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F2B84194-26EB-4227-B1C5-6602517E85AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F2B84194-26EB-4227-B1C5-6602517E85AE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F2B84194-26EB-4227-B1C5-6602517E85AE}.Release|Any CPU.Build.0 = Release|Any CPU + {CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CCAA7AFE-C094-4D82-A66D-630DE8A3F545}.Release|Any CPU.Build.0 = Release|Any CPU + {F8BDF57B-1571-4CD0-84B3-B422088D359A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F8BDF57B-1571-4CD0-84B3-B422088D359A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F8BDF57B-1571-4CD0-84B3-B422088D359A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F8BDF57B-1571-4CD0-84B3-B422088D359A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/LICENSE.LGPL b/LICENSE.LGPL new file mode 100644 index 0000000..e5ab03e --- /dev/null +++ b/LICENSE.LGPL @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/global.json b/global.json new file mode 100644 index 0000000..f443bd4 --- /dev/null +++ b/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "6.0", + "rollForward": "latestMajor", + "allowPrerelease": true + } +} \ No newline at end of file