mdbindex.c File Reference

#include <glib-object.h>
#include <gtk/gtk.h>
#include "log.h"
#include "index.h"
#include "index_ipc.h"
Include dependency graph for mdbindex.c:

Go to the source code of this file.

Functions

void sync (void)
int main (int argc, char *argv[])

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 36 of file mdbindex.c.

References getCurrentTime(), index_full(), ipc_set_services(), and ipc_unset_services().

00037 {
00038     gtk_init(&argc, &argv);
00039     g_type_init();
00040 
00041     if (argc != 2 && argc != 3) {
00042         fprintf(stderr, "Usage: mdbindex [dir] <--quick>\n");
00043         return 1;
00044     }
00045     gboolean skip_thumbnails = (argc == 3);
00046 
00047     ipc_set_services(NULL, NULL);
00048 
00049     printf("mdbindex: indexing %s  (thumbs=%d)\n", argv[1], 1 - skip_thumbnails);
00050     u_int64_t start = getCurrentTime();
00051 
00052     index_full(argv[1], skip_thumbnails);
00053 
00054     u_int64_t end = getCurrentTime();
00055     u_int64_t diff = end - start;
00056     printf("mdbindex: indexing took %lld ms\n", diff / 1000);
00057     ipc_unset_services();
00058 
00059     return 0;
00060 }

Here is the call graph for this function:

void sync ( void   ) 

Copyright (C) 2008 iRex Technologies B.V. All rights reserved.

Referenced by close_database(), hal_unmount_all_volumes(), and on_reset_button_clicked().

Here is the caller graph for this function:

Generated by  doxygen 1.6.2-20100208