1use crate::operating_system::{
4 desktop, drivers, file_system, processes, registry, services, users, event_log, memory_and_pagefiles, scheduler_jobs, product_activation, software_license_provider, shares, multimedia_audio_visual, storage
5};
6use serde::{Deserialize, Serialize};
7use tokio::join;
8
9#[derive(Default, Deserialize, Serialize, Debug, Clone)]
13pub struct Windows {
14 pub processes: processes::Processes,
16 pub threads: processes::Threads,
18 pub drivers: drivers::Drivers,
20 pub registry: registry::Registry,
22 pub services: services::Services,
24 pub desktops: desktop::Desktops,
26 pub environment: desktop::Environments,
28 pub timezones: desktop::TimeZones,
30 pub user_accounts: users::UserAccounts,
32 pub groups: users::Groups,
42 pub logon_sessions: users::LogonSessions,
44 pub network_login_profiles: users::NetworkLoginProfiles,
46 pub system_accounts: users::SystemAccounts,
48 pub directories: file_system::Directories,
50 pub directories_specifications: file_system::DirectorySpecifications,
52 pub disk_partition: file_system::DiskPartitions,
54 pub logical_disks: file_system::LogicalDisks,
56 pub mapped_logical_disks: file_system::MappedLogicalDisks,
58 pub quota_settings: file_system::QuotaSettings,
60 pub shortcut_files: file_system::ShortcutFiles,
62 pub volumes: file_system::Volumes,
64 pub nt_event_log_files: event_log::NTEventlogFiles,
66 pub nt_log_events: event_log::NTLogEvents,
68 pub pagefiles: memory_and_pagefiles::PageFiles,
70 pub pagefile_settings: memory_and_pagefiles::PageFileSettings,
72 pub pagefile_usages: memory_and_pagefiles::PageFileUsages,
74 pub scheduled_jobs: scheduler_jobs::ScheduledJobs,
76 pub local_times: scheduler_jobs::LocalTimes,
78 pub utc_times: scheduler_jobs::UTCTimes,
80 pub proxys: product_activation::Proxys,
82 pub windows_product_activations: product_activation::WindowsProductActivations,
84 pub software_licensing_products: software_license_provider::SoftwareLicensingProducts,
86 pub software_licensing_services: software_license_provider::SoftwareLicensingServices,
88 pub software_licensing_token_activation_licenses: software_license_provider::SoftwareLicensingTokenActivationLicenses,
90 pub server_connections: shares::ServerConnections,
92 pub server_sessions: shares::ServerSessions,
94 pub shares: shares::Shares,
96 pub codec_files: multimedia_audio_visual::CodecFiles,
98 pub shadow_copys: storage::ShadowCopys,
100 pub shadow_contexts: storage::ShadowContexts,
102 pub shadow_providers: storage::ShadowProviders,
104}
105
106impl Windows {
107 pub fn update(&mut self) {
109 self.processes.update();
110 self.threads.update();
111 self.drivers.update();
112 self.registry.update();
113 self.services.update();
114 self.desktops.update();
115 self.environment.update();
116 self.timezones.update();
117 self.user_accounts.update();
118 self.groups.update();
121 self.logon_sessions.update();
122 self.network_login_profiles.update();
123 self.system_accounts.update();
124 self.directories.update();
125 self.directories_specifications.update();
126 self.disk_partition.update();
127 self.logical_disks.update();
128 self.mapped_logical_disks.update();
129 self.quota_settings.update();
130 self.shortcut_files.update();
131 self.volumes.update();
132 self.nt_event_log_files.update();
133 self.nt_log_events.update();
134 self.pagefiles.update();
135 self.pagefile_settings.update();
136 self.pagefile_usages.update();
137 self.scheduled_jobs.update();
138 self.local_times.update();
139 self.utc_times.update();
140 self.software_licensing_products.update();
141 self.software_licensing_services.update();
142 self.software_licensing_token_activation_licenses.update();
143 self.server_connections.update();
144 self.server_sessions.update();
145 self.shares.update();
146 self.codec_files.update();
147 self.shadow_copys.update();
148 self.shadow_contexts.update();
149 self.shadow_providers.update();
150 }
151
152 pub async fn async_update(&mut self) {
154 join!(
155 self.threads.async_update(),
156 self.processes.async_update(),
157 self.drivers.async_update(),
158 self.registry.async_update(),
159 self.services.async_update(),
160 self.desktops.async_update(),
161 self.environment.async_update(),
162 self.timezones.async_update(),
163 self.user_accounts.async_update(),
164 self.groups.async_update(),
167 self.logon_sessions.async_update(),
168 self.network_login_profiles.async_update(),
169 self.system_accounts.async_update(),
170 self.directories.async_update(),
171 self.directories_specifications.async_update(),
172 self.disk_partition.async_update(),
173 self.logical_disks.async_update(),
174 self.mapped_logical_disks.async_update(),
175 self.quota_settings.async_update(),
176 self.shortcut_files.async_update(),
177 self.volumes.async_update(),
178 self.nt_event_log_files.async_update(),
179 self.nt_log_events.async_update(),
180 self.pagefiles.async_update(),
181 self.pagefile_settings.async_update(),
182 self.pagefile_usages.async_update(),
183 self.scheduled_jobs.async_update(),
184 self.local_times.async_update(),
185 self.utc_times.async_update(),
186 self.software_licensing_products.async_update(),
187 self.software_licensing_services.async_update(),
188 self.software_licensing_token_activation_licenses.async_update(),
189 self.server_connections.async_update(),
190 self.server_sessions.async_update(),
191 self.shares.async_update(),
192 self.codec_files.async_update(),
193 self.shadow_copys.async_update(),
194 self.shadow_contexts.async_update(),
195 self.shadow_providers.async_update(),
196 );
197 }
198}