/* gcc index-file-for-process.c $(pkg-config --cflags --libs
   tracker-control-1.0 gio-2.0 glib-2.0) */

#include <gio/gio.h>
#include <glib.h>
#include <libtracker-control/tracker-control.h>

int
main (void)
{
  GError *error;
  GFile *file;
  TrackerMinerManager *manager;

  file = g_file_new_for_uri ("file:///home/rishi/devel");
  manager = tracker_miner_manager_new ();

  error = NULL;
  if (!tracker_miner_manager_index_file_for_process (manager,
                                                     file,
                                                     NULL,
                                                     &error))
    {
      g_warning ("%s", error->message);
      g_error_free (error);
    }

  g_object_unref (manager);
  g_object_unref (file);

  return 0;
}
