My favorites | Sign in
Project Logo
                
Code license: MIT License
Labels: hal, hal-sharp, mono, c, hardware
Feeds:
People details
Project owners:
  lukaslipka
Project committers:
bill.farrow

hal-sharp is a managed implementation for the HAL project (http://www.freedesktop.org/wiki/Software/hal) written in C#. This implementation is written using the exposed Hal D-Bus interface.

A very simple example of AC adapter presence monitoring (courtesy of Beagle - http://www.beagle-project.org/):

using Hal;

...

Manager manager = new Manager (new Context ());

foreach (Device device in manager.FindDeviceByCapability ("ac_adapter")) {
	Console.WriteLine ("Found HAL device AC adapter for battery monitoring.");
	Console.WriteLine ("On AC: {0}", device.GetPropertyBoolean ("ac_adapter.present"));

	device.PropertyModified += OnPropertyModified;
}








Hosted by Google Code