File: search.h

package info (click to toggle)
gthumb 0.9.8-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,168 kB
  • ctags: 2,392
  • sloc: ansic: 25,514; sh: 8,889; makefile: 502; sed: 93
file content (82 lines) | stat: -rw-r--r-- 2,358 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */

/*
 *  GThumb
 *
 *  Copyright (C) 2001 The Free Software Foundation, Inc.
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
 */

#ifndef SEARCH_H
#define SEARCH_H

#include <time.h>

typedef enum {
	DATE_ANY      = 0,
	DATE_BEFORE   = 1,
	DATE_EQUAL_TO = 2,
	DATE_AFTER    = 3
} DateScope;


typedef struct {
	gchar *   start_from;
	gboolean  recursive;
	gchar *   file_pattern;
	gchar *   comment_pattern;
	gchar *   place_pattern;
	gchar *   keywords_pattern; 
	time_t    date;
	DateScope date_scope;
} SearchData;


SearchData* search_data_new                  ();

void        search_data_free                 (SearchData *data);

void        search_data_set_start_from       (SearchData *data,
					      gchar *start_from);

void        search_data_set_recursive        (SearchData *data,
					      gboolean recursive);

void        search_data_set_file_pattern     (SearchData *data,
					      gchar *file_pattern);

void        search_data_set_comment_pattern  (SearchData *data,
					      gchar *comment_pattern);

void        search_data_set_place_pattern    (SearchData *data,
					      gchar *place_pattern);

void        search_data_set_keywords_pattern (SearchData *data,
					      gchar *keywords_pattern);

void        search_data_set_date             (SearchData *data,
					      time_t date);

void        search_data_set_date_scope       (SearchData *data,
					      DateScope date_scope);

void        search_data_copy                 (SearchData *dest,
					      SearchData *source);

gchar **    search_util_get_patterns         (gchar *pattern_string);


#endif /* SEARCH_H */