![]() |
![]() |
![]() |
Tracker Miner Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <libtracker-miner/tracker-miner.h> struct TrackerStorage; struct TrackerStorageClass; enum TrackerStorageType; #define TRACKER_STORAGE_TYPE_IS_REMOVABLE (type) #define TRACKER_STORAGE_TYPE_IS_OPTICAL (type) TrackerStorage * tracker_storage_new (void
); GSList * tracker_storage_get_device_roots (TrackerStorage *storage
,TrackerStorageType type
,gboolean exact_match
); GSList * tracker_storage_get_device_uuids (TrackerStorage *storage
,TrackerStorageType type
,gboolean exact_match
); const gchar * tracker_storage_get_mount_point_for_uuid (TrackerStorage *storage
,const gchar *uuid
); TrackerStorageType tracker_storage_get_type_for_uuid (TrackerStorage *storage
,const gchar *uuid
); const gchar * tracker_storage_get_uuid_for_file (TrackerStorage *storage
,GFile *file
);
This API is a convenience to to be able to keep track of volumes which are mounted and also the type of removable media available. The API is built upon the top of GIO's GMount, GDrive and GVolume API.
struct TrackerStorage { GObject parent; };
A storage API for using mount points and devices
GObject |
parent object |
struct TrackerStorageClass { GObjectClass parent_class; };
A storage class for TrackerStorage.
GObjectClass |
parent object class |
typedef enum { TRACKER_STORAGE_REMOVABLE = 1 << 0, TRACKER_STORAGE_OPTICAL = 1 << 1 } TrackerStorageType;
Flags specifying properties of the type of storage.
Storage is a removable media | |
Storage is an optical disc |
Since 0.8
#define TRACKER_STORAGE_TYPE_IS_REMOVABLE(type) ((type & TRACKER_STORAGE_REMOVABLE) ? TRUE : FALSE)
Check if the given storage type is marked as being removable media.
|
Mask of TrackerStorageType flags |
Returns : |
TRUE if the storage is marked as removable media, FALSE otherwise |
Since 0.10
#define TRACKER_STORAGE_TYPE_IS_OPTICAL(type) ((type & TRACKER_STORAGE_OPTICAL) ? TRUE : FALSE)
Check if the given storage type is marked as being optical disc
|
Mask of TrackerStorageType flags |
Returns : |
TRUE if the storage is marked as optical disc, FALSE otherwise |
Since 0.10
TrackerStorage * tracker_storage_new (void
);
Creates a new instance of TrackerStorage.
Returns : |
The newly created TrackerStorage. |
Since 0.8
GSList * tracker_storage_get_device_roots (TrackerStorage *storage
,TrackerStorageType type
,gboolean exact_match
);
|
A TrackerStorage |
|
A TrackerStorageType |
|
if all devices should exactly match the types |
Returns : |
a GSList of strings
containing the root directories for devices with type based on
exact_match . Each element must be freed using g_free() and the
list itself through g_slist_free() . [transfer full][element-type utf8]
|
Since 0.8
GSList * tracker_storage_get_device_uuids (TrackerStorage *storage
,TrackerStorageType type
,gboolean exact_match
);
|
A TrackerStorage |
|
A TrackerStorageType |
|
if all devices should exactly match the types |
Returns : |
a GSList of
strings containing the UUID for devices with type based
on exact_match . Each element must be freed using g_free()
and the list itself through g_slist_free() . [transfer full][element-type utf8]
|
Since 0.8
const gchar * tracker_storage_get_mount_point_for_uuid (TrackerStorage *storage
,const gchar *uuid
);
|
A TrackerStorage |
|
A string pointer to the UUID for the GVolume . |
Returns : |
The mount point for uuid , this should not be freed. |
Since 0.8
TrackerStorageType tracker_storage_get_type_for_uuid (TrackerStorage *storage
,const gchar *uuid
);
|
A TrackerStorage |
|
A string pointer to the UUID for the GVolume . |
Returns : |
The type flags for uuid . |
Since 0.10
const gchar * tracker_storage_get_uuid_for_file (TrackerStorage *storage
,GFile *file
);
Returns the UUID of the removable device for file
|
A TrackerStorage |
|
a file |
Returns : |
Returns the UUID of the removable device for file , this
should not be freed. |
Since 0.8