ctb/include/db.h
Go to the documentation of this file.00001 #ifndef __DB_H__
00002 #define __DB_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #include <gtk/gtk.h>
00033 #include <libermetadb/ermetadb.h>
00034 #include "filemodel.h"
00035
00036
00037
00038 typedef enum
00039 {
00040 COL_FILENAME = 0,
00041 COL_DIRECTORY_PATH,
00042 COL_SORT_PRIORITY,
00043 COL_IS_DIRECTORY,
00044 COL_FILETYPE,
00045 COL_FILESIZE,
00046 COL_FILETIME_MODIFIED,
00047 COL_FILETIME_LASTREAD,
00048 COL_FILETIME_ADDED,
00049 COL_TITLE,
00050 COL_AUTHOR,
00051 COL_THUMB_MINI,
00052 COL_THUMB_SMALL,
00053 COL_THUMB_MEDIUM,
00054 COL_THUMB_LARGE,
00055 N_METADATA_COLUMNS
00056 } mdb_column_idx_t;
00057
00058 erMetadb get_database();
00059
00060 void close_database();
00061
00062 int open_global_database ( const gchar *current_dir );
00063
00064 int db_query_create( int column1, ... );
00065
00066 int db_query_execute(int sort_order,
00067 gboolean sort_asc,
00068 metadata_table **values,
00069 const gchar *tag_filter);
00070
00071 int db_query_execute_recent(metadata_table **values, int limit);
00072
00073 int db_query_execute_search_filter(int sort_order,
00074 gboolean sort_asc,
00075 metadata_table **values,
00076 const gchar* search_filter);
00077
00078 int db_query_execute_path_filter(int sort_order,
00079 gboolean sort_asc,
00080 metadata_table **values,
00081 const gchar* path_filter,
00082 gboolean show_filenames);
00083
00084 int db_query_get_metadata(const gchar* filename,
00085 const gchar* dirpath,
00086 metadata_table **values);
00087
00088 int db_query_update_lastread(const GString *filename, const GString *directory, int value);
00089
00090 #endif
00091