Tracker Miner Library Reference Manual: TrackerStorage

## TrackerStorage TrackerStorage — Removable storage and mount point convenience API |

## Functions

GSList * | tracker_storage_get_device_roots ()
GSList * | tracker_storage_get_device_uuids ()
const gchar * | tracker_storage_get_mount_point_for_uuid ()
TrackerStorageType | tracker_storage_get_type_for_uuid ()
const gchar * | tracker_storage_get_uuid_for_file ()
TrackerStorage * | tracker_storage_new ()

## Types and Values

struct | TrackerStorage
struct | TrackerStorageClass
enum | TrackerStorageType

## Object Hierarchy

## Includes

    #include <libtracker-miner/tracker-miner.h>

## Description

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.

## Functions

### tracker_storage_get_device_roots ()

    GSList *
    tracker_storage_get_device_roots (TrackerStorage *storage,
                                      TrackerStorageType type,
                                      gboolean exact_match);

#### Parameters

storage | A TrackerStorage |
type | A TrackerStorageType |
exact_match | 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

### tracker_storage_get_device_uuids ()

    GSList *
    tracker_storage_get_device_uuids (TrackerStorage *storage,
                                      TrackerStorageType type,
                                      gboolean exact_match);

#### Parameters

storage | A TrackerStorage |
type | A TrackerStorageType |
exact_match | 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

### tracker_storage_get_mount_point_for_uuid ()

    const gchar *
    tracker_storage_get_mount_point_for_uuid
                                   (TrackerStorage *storage,
                                    const gchar *uuid);

#### Parameters

storage | A TrackerStorage |
uuid | A string pointer to the UUID for the `GVolume`. |

#### Returns

The mount point for `uuid` , this should not be freed.

Since 0.8

### tracker_storage_get_type_for_uuid ()

    TrackerStorageType
    tracker_storage_get_type_for_uuid (TrackerStorage *storage,
                                       const gchar *uuid);

#### Parameters

storage | A TrackerStorage |
uuid | A string pointer to the UUID for the `GVolume`. |

#### Returns

The type flags for `uuid` .

Since 0.10

### tracker_storage_get_uuid_for_file ()

    const gchar *
    tracker_storage_get_uuid_for_file (TrackerStorage *storage,
                                       GFile *file);

Returns the UUID of the removable device for `file`

#### Parameters

storage | A TrackerStorage |
file | a file |

#### Returns

Returns the UUID of the removable device for `file` , this should not be freed.

Since 0.8

### tracker_storage_new ()

    TrackerStorage *
    tracker_storage_new (void);

Creates a new instance of TrackerStorage.

#### Returns

The newly created TrackerStorage.

Since 0.8

## Types and Values

### struct TrackerStorage

    struct TrackerStorage {
    	GObject parent;
    };

A storage API for using mount points and devices

#### Members

GObject `parent`; | parent object |

### struct TrackerStorageClass

    struct TrackerStorageClass {
    	GObjectClass parent_class;
    };

A storage class for TrackerStorage.

#### Members

GObjectClass `parent_class`; | parent object class |

### enum TrackerStorageType

Flags specifying properties of the type of storage.

#### Members

TRACKER_STORAGE_REMOVABLE | Storage is a removable media |
TRACKER_STORAGE_OPTICAL | Storage is an optical disc |

Since 0.8