## Module files

Module files — Implementation of files for Tracker modules.

## Synopsis

    #include <libtracker-module/tracker-module-file.h>

    typedef             TrackerModuleFile;
    GFile*              tracker_module_file_get_file        (TrackerModuleFile *file);
    const gchar*        tracker_module_file_get_service_type
                                                            (TrackerModuleFile *file);
    gchar*              tracker_module_file_get_uri         (TrackerModuleFile *file);
    gchar*              tracker_module_file_get_text        (TrackerModuleFile *file);
    TrackerModuleMetadata* tracker_module_file_get_metadata (TrackerModuleFile *file);

## Object Hierarchy

      GObject
       +----TrackerModuleFile

## Known Derived Interfaces

TrackerModuleFile is required by TrackerModuleIteratable.

## Properties

      "cancelled"                gboolean              : Read / Write
      "file"                     GFile*                : Read / Write / Construct Only

## Description

TrackerModuleFile represents a file, providing the necessary methods to provide information that Tracker can index. Files could also implement the TrackerModuleIteratable interface for files that could contain a set individual entities that could be relevant to Tracker (such as mail summaries)

## Details

### TrackerModuleFile

    typedef struct TrackerModuleFile TrackerModuleFile;

Representation of a given file, used by the Tracker indexer to index contents.

### tracker_module_file_get_file ()

    GFile*              tracker_module_file_get_file        (TrackerModuleFile *file);

Returns a GFile corresponding to the file managed by TrackerModuleFile.

`file` : | A TrackerModuleFile
Returns : | a GFile, this object should not be unreferenced.

### tracker_module_file_get_service_type ()

    const gchar*        tracker_module_file_get_service_type
                                                            (TrackerModuleFile *file);

Returns the service type for `file` in the current state (See TrackerModuleIteratable).

`file` : | A TrackerModuleFile
Returns : | The service type name.

### tracker_module_file_get_uri ()

    gchar*              tracker_module_file_get_uri         (TrackerModuleFile *file);

Returns a unique URI for `file` in the current state (See TrackerModuleIteratable)

`file` : | A TrackerModuleFile
Returns : | A newly allocated string containing the URI for the element.

### tracker_module_file_get_text ()

    gchar*              tracker_module_file_get_text        (TrackerModuleFile *file);

Extracts all the text that `file` could contain in the current state (see TrackerModuleIteratable) or `NULL` if the element does not contain any text.

`file` : | A TrackerModuleFile
Returns : | A newly allocated string containing valid UTF-8, or `NULL`.

### tracker_module_file_get_metadata ()

    TrackerModuleMetadata* tracker_module_file_get_metadata (TrackerModuleFile *file);

Extracts all the metadata corresponding to `file` in the current state (see TrackerModuleIteratable) or `NULL` if the element should not be indexed.

`file` : | A TrackerModuleFile
Returns : | A newly created TrackerModuleMetadata containing all the extracted metadata, or `NULL`.

## Property Details

### The `"cancelled"` property

      "cancelled"                gboolean              : Read / Write

Whether operations on this file were cancelled.

Default value: FALSE

### The `"file"` property

      "file"                     GFile*                : Read / Write / Construct Only

The GFile that corresponds to the TrackerModuleFile

## See Also

TrackerModuleIteratable