Tracker Common Library Reference Manual | ||||
---|---|---|---|---|
#include <libtracker-common/tracker-hal.h> TrackerHal; TrackerHal* tracker_hal_new (void); gboolean tracker_hal_get_battery_exists (TrackerHal *hal); gboolean tracker_hal_get_battery_in_use (TrackerHal *hal); GList* tracker_hal_get_mounted_directory_roots (TrackerHal *hal); GList* tracker_hal_get_removable_device_roots (TrackerHal *hal);
"battery-exists" gboolean : Read "battery-in-use" gboolean : Read "battery-percentage" gdouble : Read
TrackerHal* tracker_hal_new (void);
Creates a new instance of TrackerHal.
Returns : | The newly created TrackerHal. |
gboolean tracker_hal_get_battery_exists (TrackerHal *hal);
Returns whether the computer has batteries.
hal : |
A TrackerHal |
Returns : | TRUE if the computer has batteries available. |
gboolean tracker_hal_get_battery_in_use (TrackerHal *hal);
Returns whether the computer battery (if any) is currently in use.
hal : |
A TrackerHal. |
Returns : | TRUE if the computer is running on battery power. |
GList* tracker_hal_get_mounted_directory_roots (TrackerHal *hal);
Returns a Glist of strings containing the root directories for mounted devices.
Each element must be freed using g_free()
and the list itself using g_list_free()
.
hal : |
A TrackerHal |
Returns : | The list of root directories. |
GList* tracker_hal_get_removable_device_roots (TrackerHal *hal);
Returns a GList of strings containing the root directories for removable devices.
Each element must be freed using g_free()
and the list itself through g_list_free()
.
hal : |
A TrackerHal |
Returns : | The list of root directories. |
"battery-exists"
property"battery-exists" gboolean : Read
There is a battery on this machine.
Default value: FALSE
"battery-in-use"
property"battery-in-use" gboolean : Read
Whether the battery is being used.
Default value: FALSE
"battery-percentage"
property"battery-percentage" gdouble : Read
Battery percentage.
Allowed values: [0,1]
Default value: 0
"mount-point-added"
signalvoid user_function (TrackerHal *trackerhal, gchar *arg1, gchar *arg2, gpointer user_data) : Run Last
trackerhal : |
the object which received the signal. |
arg1 : |
|
arg2 : |
|
user_data : |
user data set when the signal handler was connected. |
"mount-point-removed"
signalvoid user_function (TrackerHal *trackerhal, gchar *arg1, gchar *arg2, gpointer user_data) : Run Last
trackerhal : |
the object which received the signal. |
arg1 : |
|
arg2 : |
|
user_data : |
user data set when the signal handler was connected. |