Skip to content

Commit

Permalink
Merge pull request #30 from NidhiHemanth/master
Browse files Browse the repository at this point in the history
Added states for Hardware
  • Loading branch information
sn99 committed Jun 26, 2023
2 parents 7820553 + ca694ef commit ce4ba40
Show file tree
Hide file tree
Showing 14 changed files with 5,200 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/bin/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ async fn main() {

let mut k = windows_snapshot::state::Windows::default();

//k.async_update().await;
//k.update(); // for synchronous update
// k.async_update().await;
// k.update(); // for synchronous update

// println!("{k:#?}");
k.async_update().await;
// k.startup_commands.update();
// k.async_update().await;
k.video_controllers.update();

println!("{:#?}", k);
println!("{:#?}", k.video_controllers);
}
739 changes: 739 additions & 0 deletions src/hardware/cooling_device.rs

Large diffs are not rendered by default.

429 changes: 429 additions & 0 deletions src/hardware/input_device.rs

Large diffs are not rendered by default.

1,116 changes: 1,116 additions & 0 deletions src/hardware/mass_storage.rs

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions src/hardware/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//! [Computer System Hardware Classes](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/computer-system-hardware-classes)
//!
//! The Computer System Hardware category groups classes together that represent hardware related
//! objects. Examples include input devices, hard disks, expansion cards, video devices, networking
//! devices, and system power.
//!
//! The Hardware System category is grouped into the following subcategories:
//!
//! - [Cooling Device Classes](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/computer-system-hardware-classes#cooling-device-classes)
//! - [Input Device Classes](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/computer-system-hardware-classes#input-device-classes)
//! - [Mass Storage Classes](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/computer-system-hardware-classes#mass-storage-classes)
//! - [Networking Device Classes](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/computer-system-hardware-classes#networking-device-classes)
//! - [Power Classes](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/computer-system-hardware-classes#power-classes)
//! - [Telephony Classes](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/computer-system-hardware-classes#telephony-classes)
//! - [Video and Monitor Classes](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/computer-system-hardware-classes#video-and-monitor-classes)

pub mod cooling_device;
pub mod input_device;
pub mod mass_storage;
pub mod networking_device;
pub mod power;
pub mod telephony;
pub mod video_monitor;
55 changes: 55 additions & 0 deletions src/hardware/motherboard_controller_port.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
//! The Motherboard, Controllers, and Ports subcategory groups classes that represent system devices. Examples include system memory, cache memory, and controllers.
//!
//! | Class | Description |
//! |-----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
//! | [**Win32\_1394Controller**](win32-1394controller) | Represents the capabilities and management of a 1394 controller.<br/> |
//! | [**Win32\_1394ControllerDevice**](win32-1394controllerdevice) | Relates the high-speed serial bus (IEEE 1394 Firewire) Controller and the [**CIM\_LogicalDevice**](cim-logicaldevice) instance connected to it.<br/> |
//! | [**Win32\_AllocatedResource**](win32-allocatedresource) | Relates a logical device to a system resource.<br/> |
//! | [**Win32\_AssociatedProcessorMemory**](win32-associatedprocessormemory) | Relates a processor and its cache memory.<br/> |
//! | [**Win32\_BaseBoard**](win32-baseboard) | Represents a baseboard (also known as a motherboard or system board).<br/> |
//! | [**Win32\_BIOS**](win32-bios) | Represents the attributes of the computer system's basic input or output services (BIOS) that are installed on the computer.<br/> |
//! | [**Win32\_Bus**](win32-bus) | Represents a physical bus as seen by a Windows operating system.<br/> |
//! | [**Win32\_CacheMemory**](win32-cachememory) | Represents cache memory (internal and external) on a computer system.<br/> |
//! | [**Win32\_ControllerHasHub**](/previous-versions/windows/desktop/cimwin32a/win32-controllerhashub) | Represents the hubs downstream from the universal serial bus (USB) controller.<br/> |
//! | [**Win32\_DeviceBus**](win32-devicebus) | Relates a system bus and a logical device using the bus.<br/> |
//! | [**Win32\_DeviceMemoryAddress**](win32-devicememoryaddress) | Represents a device memory address on a Windows system.<br/> |
//! | [**Win32\_DeviceSettings**](win32-devicesettings) | Relates a logical device and a setting that can be applied to it.<br/> |
//! | [**Win32\_DMAChannel**](win32-dmachannel) | Represents a direct memory access (DMA) channel on a computer system running Windows.<br/> |
//! | [**Win32\_FloppyController**](win32-floppycontroller) | Represents the capabilities and management capacity of a floppy disk drive controller.<br/> |
//! | [**Win32\_IDEController**](win32-idecontroller) | Represents the capabilities of an Integrated Drive Electronics (IDE) controller device.<br/> |
//! | [**Win32\_IDEControllerDevice**](win32-idecontrollerdevice) | Association class that relates an IDE controller and the logical device.<br/> |
//! | [**Win32\_InfraredDevice**](win32-infrareddevice) | Represents the capabilities and management of an infrared device.<br/> |
//! | [**Win32\_IRQResource**](win32-irqresource) | Represents an interrupt request line (IRQ) number on a Windows computer system.<br/> |
//! | [**Win32\_MemoryArray**](win32-memoryarray) | Represents the properties of the computer system memory array and mapped addresses.<br/> |
//! | [**Win32\_MemoryArrayLocation**](win32-memoryarraylocation) | Relates a logical memory array and the physical memory array upon which it exists.<br/> |
//! | [**Win32\_MemoryDevice**](win32-memorydevice) | Represents the properties of a computer system's memory device along with its associated mapped addresses.<br/> |
//! | [**Win32\_MemoryDeviceArray**](win32-memorydevicearray) | Relates a memory device and the memory array in which it resides.<br/> |
//! | [**Win32\_MemoryDeviceLocation**](win32-memorydevicelocation) | Association class that relates a memory device and the physical memory on which it exists.<br/> |
//! | [**Win32\_MotherboardDevice**](win32-motherboarddevice) | Represents a device that contains the central components of the computer system running Windows.<br/> |
//! | [**Win32\_OnBoardDevice**](win32-onboarddevice) | Represents common adapter devices built into the motherboard (system board).<br/> |
//! | [**Win32\_ParallelPort**](win32-parallelport) | Represents the properties of a parallel port on a computer system running Windows.<br/> |
//! | [**Win32\_PCMCIAController**](win32-pcmciacontroller) | Manages the capabilities of a Personal Computer Memory Card Interface Adapter (PCMCIA) controller device.<br/> |
//! | [**Win32\_PhysicalMemory**](win32-physicalmemory) | Represents a physical memory device located on a computer as available to the operating system.<br/> |
//! | [**Win32\_PhysicalMemoryArray**](win32-physicalmemoryarray) | Represents details about the computer system's physical memory.<br/> |
//! | [**Win32\_PhysicalMemoryLocation**](win32-physicalmemorylocation) | Relates an array of physical memory and its physical memory.<br/> |
//! | [**Win32\_PNPAllocatedResource**](win32-pnpallocatedresource) | Represents an association between logical devices and system resources.<br/> |
//! | [**Win32\_PNPDevice**](win32-pnpdevice) | Relates a device (known to Configuration Manager as a PNPEntity), and the function it performs.<br/> |
//! | [**Win32\_PNPEntity**](win32-pnpentity) | Represents the properties of a Plug and Play device.<br/> |
//! | [**Win32\_PortConnector**](win32-portconnector) | Represents physical connection ports, such as DB-25 pin male, Centronics, and PS/2.<br/> |
//! | [**Win32\_PortResource**](win32-portresource) | Represents an I/O port on a computer system running Windows.<br/> |
//! | [**Win32\_Processor**](win32-processor) | Represents a device capable of interpreting a sequence of machine instructions on a computer system running Windows.<br/> |
//! | [**Win32\_SCSIController**](win32-scsicontroller) | Represents a small computer system interface (SCSI) controller on a computer system running Windows.<br/> |
//! | [**Win32\_SCSIControllerDevice**](win32-scsicontrollerdevice) | Relates a SCSI controller and the logical device (disk drive) connected to it.<br/> |
//! | [**Win32\_SerialPort**](win32-serialport) | Represents a serial port on a computer system running Windows.<br/> |
//! | [**Win32\_SerialPortConfiguration**](win32-serialportconfiguration) | Represents the settings for data transmission on a Windows serial port.<br/> |
//! | [**Win32\_SerialPortSetting**](win32-serialportsetting) | Relates a serial port and its configuration settings.<br/> |
//! | [**Win32\_SMBIOSMemory**](win32-smbiosmemory) | Represents the capabilities and management of memory-related logical devices.<br/> |
//! | [**Win32\_SoundDevice**](win32-sounddevice) | Represents the properties of a sound device on a computer system running Windows.<br/> |
//! | [**Win32\_SystemBIOS**](win32-systembios) | Relates a computer system (including data such as startup properties, time zones, boot configurations, or administrative passwords) and a system BIOS (services, languages, and system management properties).<br/> |
//! | [**Win32\_SystemDriverPNPEntity**](win32-systemdriverpnpentity) | Relates a Plug and Play device on the Windows computer system and the driver that supports the Plug and Play device.<br/> |
//! | [**Win32\_SystemEnclosure**](win32-systemenclosure) | Represents the properties associated with a physical system enclosure.<br/> |
//! | [**Win32\_SystemMemoryResource**](win32-systemmemoryresource) | Represents a system memory resource on a Windows system.<br/> |
//! | [**Win32\_SystemSlot**](win32-systemslot) | Represents physical connection points including ports, motherboard slots and peripherals, and proprietary connections points.<br/> |
//! | [**Win32\_USBController**](win32-usbcontroller) | Manages the capabilities of a universal serial bus (USB) controller.<br/> |
//! | [**Win32\_USBControllerDevice**](win32-usbcontrollerdevice) | Relates a USB controller and the [**CIM\_LogicalDevice**](cim-logicaldevice) instances connected to it.<br/> |
//! | [**Win32\_USBHub**](/previous-versions/windows/desktop/cimwin32a/win32-usbhub) | Represents the management characteristics of a USB hub.<br/> |
Loading

0 comments on commit ce4ba40

Please sign in to comment.