Commit 8c6485a3 authored by Rico Tzschichholz's avatar Rico Tzschichholz Committed by Martyn Russell

libtracker-miner: Fix API break with tracker_indexing_tree_new()

Previously it took void and it was changed to take a GFile.

https://bugzilla.gnome.org/show_bug.cgi?id=737243
parent 73a93c16
......@@ -122,6 +122,7 @@ tracker_file_enumerator_get_type
TrackerIndexingTree
TrackerIndexingTreeClass
tracker_indexing_tree_new
tracker_indexing_tree_new_with_root
tracker_indexing_tree_add
tracker_indexing_tree_remove
tracker_indexing_tree_add_filter
......
......@@ -313,14 +313,33 @@ tracker_indexing_tree_init (TrackerIndexingTree *tree)
/**
* tracker_indexing_tree_new:
*
* Returns a newly created #TrackerIndexingTree
*
* Returns: a newly allocated #TrackerIndexingTree
*
* Since: 0.14.0
**/
TrackerIndexingTree *
tracker_indexing_tree_new (void)
{
return g_object_new (TRACKER_TYPE_INDEXING_TREE, NULL);
}
/**
* tracker_indexing_tree_new_with_root:
* @root: The top level URL
*
* If @root is %NULL, the default value is 'file:///'.
* If @root is %NULL, the default value is 'file:///'. Using %NULL
* here is the equivalent to calling tracker_indexing_tree_new() which
* takes no @root argument.
*
* Returns: a newly allocated #TrackerIndexingTree
*
* Since: 1.2.2
**/
TrackerIndexingTree *
tracker_indexing_tree_new (GFile *root)
tracker_indexing_tree_new_with_root (GFile *root)
{
return g_object_new (TRACKER_TYPE_INDEXING_TREE,
"root", root,
......
......@@ -77,7 +77,9 @@ typedef struct {
GType tracker_indexing_tree_get_type (void) G_GNUC_CONST;
TrackerIndexingTree * tracker_indexing_tree_new (GFile *root);
TrackerIndexingTree * tracker_indexing_tree_new (void);
TrackerIndexingTree * tracker_indexing_tree_new_with_root (GFile *root);
void tracker_indexing_tree_add (TrackerIndexingTree *tree,
GFile *directory,
......
......@@ -885,7 +885,7 @@ fs_constructed (GObject *object)
}
/* Create indexing tree */
priv->indexing_tree = tracker_indexing_tree_new (priv->root);
priv->indexing_tree = tracker_indexing_tree_new_with_root (priv->root);
}
static void
......
......@@ -46,7 +46,7 @@ namespace Tracker {
[CCode (cheader_filename = "libtracker-miner/tracker-miner.h", type_id = "tracker_indexing_tree_get_type ()")]
public class IndexingTree : GLib.Object {
[CCode (has_construct_function = false)]
public IndexingTree (GLib.File root);
public IndexingTree ();
public void add (GLib.File directory, Tracker.DirectoryFlags flags);
public void add_filter (Tracker.FilterType filter, string glob_string);
public void clear_filters (Tracker.FilterType type);
......@@ -62,6 +62,8 @@ namespace Tracker {
public void remove (GLib.File directory);
public void set_default_policy (Tracker.FilterType filter, Tracker.FilterPolicy policy);
public void set_filter_hidden (bool filter_hidden);
[CCode (has_construct_function = false)]
public IndexingTree.with_root (GLib.File root);
public bool filter_hidden { get; set; }
[NoAccessorMethod]
public GLib.File root { owned get; construct; }
......
......@@ -274,7 +274,7 @@ test_common_context_setup (TestCommonContext *fixture,
CREATE_FOLDER (fixture, "non-recursive");
CREATE_FOLDER (fixture, "non-indexed");
fixture->indexing_tree = tracker_indexing_tree_new (NULL);
fixture->indexing_tree = tracker_indexing_tree_new ();
tracker_indexing_tree_set_filter_hidden (fixture->indexing_tree, TRUE);
fixture->main_loop = g_main_loop_new (NULL, FALSE);
......
......@@ -96,7 +96,7 @@ test_common_context_setup (TestCommonContext *fixture,
for (i = 0; i < TEST_DIRECTORY_LAST; i++)
fixture->test_dir[i] = g_file_new_for_path (test_directories_subpaths[i]);
fixture->tree = tracker_indexing_tree_new (NULL);
fixture->tree = tracker_indexing_tree_new ();
}
static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment