[Ivan] >> Tracker uses HAL or DeviceKit (depending on the platform) to detect >> the volumes. Tracker doesn't abstract the filesystem or the mounting >> logic. Yes, Tracker uses the API but doesn't "wrap" it for other >> applications. >> >> If you want to use similar code in your application, you can always >> take a look into the tracker source code (and respect the license, of >> course). IIRC it should be somewhere in libtracker-miner...
[Aleksander] > Actually... we're just using GIO's GVolumeMonitor object for all that. More specifcally, where to look: $ cd /usr/src/tracker-0.8.17/ && find . -type f -print0|xargs -0 grep -Hn GVolumeMonitor|grep -v '^Binary file' ./.pc/01-upower.patch/src/miners/fs/tracker-miner-files.c:69: GVolumeMonitor *volume_monitor; ./.pc/01-upower.patch/src/miners/fs/tracker-miner-files.c:112:static void mount_pre_unmount_cb (GVolumeMonitor *volume_monitor, ./.pc/01-upower.patch/src/miners/fs/tracker-miner-files.c:1127:mount_pre_unmount_cb (GVolumeMonitor *volume_monitor, ./NEWS:3002:- Added initial code to use GVolumeMonitor::monitor-pre-unmount, GIO patch is pending, was not implemented ./ChangeLog.pre-0-6-93:404: Make GVolumeMonitor::mount-pre-unmount cancel any ongoing operation in ./ChangeLog.pre-0-6-93:422: (tracker_indexer_init): Hook to GVolumeMonitor::mount-pre-unmount, so ./src/libtracker-miner/tracker-storage.c:46: GVolumeMonitor *volume_monitor; ./src/libtracker-miner/tracker-storage.c:75:static void mount_added_cb (GVolumeMonitor *monitor, ./src/libtracker-miner/tracker-storage.c:78:static void mount_removed_cb (GVolumeMonitor *monitor, ./src/libtracker-miner/tracker-storage.c:677: * Note that GVolumeMonitor shows only those mounts which are ./src/libtracker-miner/tracker-storage.c:690:mount_added_cb (GVolumeMonitor *monitor, ./src/libtracker-miner/tracker-storage.c:698:mount_removed_cb (GVolumeMonitor *monitor, ./src/miners/fs/tracker-miner-files.c:69: GVolumeMonitor *volume_monitor; ./src/miners/fs/tracker-miner-files.c:112:static void mount_pre_unmount_cb (GVolumeMonitor *volume_monitor, ./src/miners/fs/tracker-miner-files.c:1127:mount_pre_unmount_cb (GVolumeMonitor *volume_monitor, Hmm- this may also be relevant: in file NEWS: ... NEW in 0.8.12 - 2010-06-17 ========================== ... * libtracker-miner: Use GMount instead of GVolume which is for user-mountable devices only * libtracker-miner: Detect removable devices using GDrive API, not guessing * libtracker-miner: Ignore GMounts which are considered shadowed mounts ... -- Best Regards. This is unedited. P-) _______________________________________________ tracker-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/tracker-list
