## TrackerExtractInfo

TrackerExtractInfo — struct used to pass information to and from a Tracker extract module

## Stability Level

Stable, unless otherwise indicated

## Synopsis

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

                        TrackerExtractInfo;
    TrackerExtractInfo *   tracker_extract_info_new         (GFile *file,
                                                             const gchar *mimetype,
                                                             const gchar *graph);
    TrackerExtractInfo *   tracker_extract_info_ref         (TrackerExtractInfo *info);
    void                tracker_extract_info_unref          (TrackerExtractInfo *info);
    TrackerSparqlBuilder * tracker_extract_info_get_preupdate_builder
                                                            (TrackerExtractInfo *info);
    TrackerSparqlBuilder * tracker_extract_info_get_metadata_builder
                                                            (TrackerExtractInfo *info);
    const gchar *          tracker_extract_info_get_where_clause
                                                            (TrackerExtractInfo *info);
    void                tracker_extract_info_set_where_clause
                                                            (TrackerExtractInfo *info,
                                                             const gchar *where);
    GFile *                tracker_extract_info_get_file    (TrackerExtractInfo *info);
    const gchar *          tracker_extract_info_get_mimetype
                                                            (TrackerExtractInfo *info);
    const gchar *          tracker_extract_info_get_graph   (TrackerExtractInfo *info);

## Description

The TrackerExtractInfo structure is used to pass information on the file being extracted to an extractor module and contains objects to hold the SPARQL updates generated by the extractor.

## Details

### TrackerExtractInfo

    typedef struct _TrackerExtractInfo TrackerExtractInfo;

### tracker_extract_info_new ()

    TrackerExtractInfo *   tracker_extract_info_new         (GFile *file,
                                                             const gchar *mimetype,
                                                             const gchar *graph);

Returns a newly created TrackerExtractInfo

`file` : | a GFile
`mimetype` : | mimetype for `file`
`graph` : | SPARQL graph used for inserting data
Returns : | (boxed): A newly allocated TrackerExtractInfo. [transfer full]

Since 0.12

### tracker_extract_info_ref ()

    TrackerExtractInfo *   tracker_extract_info_ref         (TrackerExtractInfo *info);

Increases the reference count of `info`

`info` : | a TrackerExtractInfo
Returns : | A new reference to `info`

Since 0.12

### tracker_extract_info_unref ()

    void                tracker_extract_info_unref          (TrackerExtractInfo *info);

Decreases the reference count of `info`, freeing all its associated resources if it reaches 0.

`info` : | a TrackerExtractInfo

Since 0.12

### tracker_extract_info_get_preupdate_builder ()

    TrackerSparqlBuilder * tracker_extract_info_get_preupdate_builder
                                                            (TrackerExtractInfo *info);

Returns a TrackerSparqlBuilder containing any separate updates that could apply to the file, such as author/band information in audio files, and so on.

`info` : | a TrackerExtractInfo
Returns : | miscellaneous metadata. [transfer none]

Since 0.12

### tracker_extract_info_get_metadata_builder ()

    TrackerSparqlBuilder * tracker_extract_info_get_metadata_builder
                                                            (TrackerExtractInfo *info);

Returns a TrackerSparqlBuilder containing the file metadata.

`info` : | a TrackerExtractInfo
Returns : | the file metadata. [transfer none]

Since 0.12

### tracker_extract_info_get_where_clause ()

    const gchar *          tracker_extract_info_get_where_clause
                                                            (TrackerExtractInfo *info);

Returns the where clause that will apply to the other metadata contained in `info`.

`info` : | a TrackerExtractInfo
Returns : | The where clause. [transfer none]

Since 0.12

### tracker_extract_info_set_where_clause ()

    void                tracker_extract_info_set_where_clause
                                                            (TrackerExtractInfo *info,
                                                             const gchar *where);

Sets the where clause for the returned metadata.

`info` : | a TrackerExtractInfo
`where` : | Where clause for the file update.

Since 0.12

### tracker_extract_info_get_file ()

    GFile *                tracker_extract_info_get_file    (TrackerExtractInfo *info);

Returns a GFile pointing to the file being affected by the metadata extraction represented by `info`

`info` : | a TrackerExtractInfo
Returns : | The file being inspected. [transfer none]

Since 0.12

### tracker_extract_info_get_mimetype ()

    const gchar *          tracker_extract_info_get_mimetype
                                                            (TrackerExtractInfo *info);

Returns the mimetype being used for the file metadata extraction.

`info` : | a TrackerExtractInfo
Returns : | the mimetype being used for extraction. [transfer none]

Since 0.12

### tracker_extract_info_get_graph ()

    const gchar *          tracker_extract_info_get_graph   (TrackerExtractInfo *info);

Returns the SPARQL graph that will be used when inserting metadata.

`info` : | a TrackerExtractInfo
Returns : | The SPARQL graph the extract operation belongs to. [transfer none]

Since 0.12