Defines | |
#define | DIE(expr) do {printf("*** [DIE] %s:%s():%d : ", __FILE__, __FUNCTION__, __LINE__); printf expr; printf("\n"); exit(1); } while(0) |
Macro for terminating the program on an unrecoverable error. | |
Functions | |
void | dump_devices () |
Dump all devices to stdout. | |
void | device_added (const char *udi) |
Invoked when a device is added to the Global Device List. | |
void | device_removed (const char *udi) |
Invoked when a device is removed from the Global Device List. | |
void | device_new_capability (const char *udi, const char *capability) |
Invoked when device in the Global Device List acquires a new capability. | |
void | print_property (const char *udi, const char *key) |
Acquires and prints the value of of a property to stderr. | |
void | property_modified (const char *udi, const char *key, dbus_bool_t is_removed, dbus_bool_t is_added) |
Invoked when a property of a device in the Global Device List is changed, and we have we have subscribed to changes for that device. | |
void | device_condition (const char *udi, const char *condition_name, DBusMessage *message) |
Invoked when a property of a device in the Global Device List is changed, and we have we have subscribed to changes for that device. | |
void | mainloop_integration (DBusConnection *dbus_connection) |
Invoked by libhal for integration with our mainloop. | |
void | usage (int argc, char *argv[]) |
Print out program usage. | |
int | main (int argc, char *argv[]) |
Entry point. |
|
Invoked when a device is added to the Global Device List. Simply prints a message on stderr.
Definition at line 137 of file lshal.c. References dump_devices(). Referenced by main(). |
|
Invoked when a property of a device in the Global Device List is changed, and we have we have subscribed to changes for that device.
Definition at line 236 of file lshal.c. Referenced by main(). |
|
Invoked when device in the Global Device List acquires a new capability. Prints the name of the capability to stderr.
Definition at line 160 of file lshal.c. Referenced by main(). |
|
Invoked when a device is removed from the Global Device List. Simply prints a message on stderr.
Definition at line 148 of file lshal.c. References dump_devices(). Referenced by main(). |
|
Entry point.
Definition at line 284 of file lshal.c. References device_added(), device_condition(), device_new_capability(), device_removed(), dump_devices(), hal_device_property_watch_all(), hal_initialize(), hal_shutdown(), LibHalFunctions, mainloop_integration(), property_modified(), and usage(). |
|
Invoked by libhal for integration with our mainloop. We take the easy route and use link with glib for painless integrate.
Definition at line 252 of file lshal.c. Referenced by main(). |
|
Acquires and prints the value of of a property to stderr.
Definition at line 173 of file lshal.c. References hal_device_get_property_bool(), hal_device_get_property_double(), hal_device_get_property_int(), hal_device_get_property_string(), hal_device_get_property_type(), and hal_free_string(). Referenced by property_modified(). |
|
Invoked when a property of a device in the Global Device List is changed, and we have we have subscribed to changes for that device.
Definition at line 214 of file lshal.c. References print_property(). Referenced by main(). |
|
Print out program usage.
|