winbrew_models\msi_inventory/
records.rs1use serde::{Deserialize, Serialize};
4
5use crate::install::InstallScope;
6use crate::shared::HashAlgorithm;
7
8#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
10pub struct MsiInventoryReceipt {
11 pub package_name: String,
13 pub product_code: String,
15 pub upgrade_code: Option<String>,
17 pub scope: InstallScope,
19}
20
21#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
23pub struct MsiFileRecord {
24 pub package_name: String,
26 pub path: String,
28 pub normalized_path: String,
30 pub hash_algorithm: Option<HashAlgorithm>,
32 pub hash_hex: Option<String>,
34 pub is_config_file: bool,
36}
37
38#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
40pub struct MsiRegistryRecord {
41 pub package_name: String,
43 pub hive: String,
45 pub key_path: String,
47 pub normalized_key_path: String,
49 pub value_name: String,
51 pub value_data: Option<String>,
53 pub previous_value: Option<String>,
55}
56
57#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
59pub struct MsiShortcutRecord {
60 pub package_name: String,
62 pub path: String,
64 pub normalized_path: String,
66 pub target_path: Option<String>,
68 pub normalized_target_path: Option<String>,
70}
71
72#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
74pub struct MsiComponentRecord {
75 pub package_name: String,
77 pub component_id: String,
79 pub path: Option<String>,
81 pub normalized_path: Option<String>,
83}
84
85#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
87pub struct MsiInventorySnapshot {
88 pub receipt: MsiInventoryReceipt,
90 pub files: Vec<MsiFileRecord>,
92 pub registry_entries: Vec<MsiRegistryRecord>,
94 pub shortcuts: Vec<MsiShortcutRecord>,
96 pub components: Vec<MsiComponentRecord>,
98}