[Tracker] [PATCH] Initial removable media support (mount point) + HAL code refactoring



What was made in this patch:

- Added support for unmount event (-u mount_point). The watch is set only
if the mount point is already mounted. On unmount, by now, every file
and subdir is treated as in deleted event. IMO (further development) the file
must stay in a hidden state, and recovered after mount point remounting.

- Added HAL detection for "volume" devices. Now we can detect if a mount
point was mounted. HAL watches for all new devices added and if the
device is a "volume", watches for property changes. When the is_mounted
property changes to TRUE, if the mount point is in the mount point list,
scan the whole directory.

- Moved HAL stuff to a isolated source file.

- Removed leading and trailing spaces.

- A lot o refactorings in the HAL code. Now we have both battery
and mount detection support in the same source file.

- Removed tracker->battery_udi from main tracker struct. This
struct member is being used to determine if a computer is a laptop
or not. So I've added a new function tracker_is_laptop() using
HAL formfactor property.

There are plans in HAL to report embedded device as "tablet". Will be quite
easy now to implement tracker_is_tablet() if this feature is already
available in HAL.

Note: I saw some batteryless "notebooks" in Brazil once, belive me
or not. Thank god I never heard about these freaks again.

- Added INdT copyright notice.

- Added Doxygen documentation for HAL related functions.

Attachment: removable_media.patch
Description: Text Data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]