Dont add null mimetypes. Fixes bgo# 337431. The patch hasnt been officially accepted...
[beagle.git] / libbeagle / beagle / beagle-indexable.h
blobf63a0e0a981e642c8589decbfb8d2d7ba7ac9480
1 /*
2 * beagle-indexable.h
4 * Copyright (C) 2005 Novell, Inc.
6 */
8 /*
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software.
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 * DEALINGS IN THE SOFTWARE.
28 #ifndef __BEAGLE_INDEXABLE_H
29 #define __BEAGLE_INDEXABLE_H
31 #include <glib-object.h>
32 #include <beagle/beagle-property.h>
33 #include <beagle/beagle-timestamp.h>
35 typedef struct _BeagleIndexable BeagleIndexable;
37 typedef enum {
38 BEAGLE_INDEXABLE_TYPE_ADD,
39 BEAGLE_INDEXABLE_TYPE_REMOVE,
40 BEAGLE_INDEXABLE_TYPE_PROPERTY_CHANGE
41 } BeagleIndexableType;
43 typedef enum {
44 BEAGLE_INDEXABLE_FILTERING_ALWAYS,
45 BEAGLE_INDEXABLE_FILTERING_ALREADY_FILTERED,
46 BEAGLE_INDEXABLE_FILTERING_AUTOMATIC,
47 BEAGLE_INDEXABLE_FILTERING_NEVER
48 } BeagleIndexableFiltering;
50 BeagleIndexable *beagle_indexable_new (const char *uri);
52 void beagle_indexable_free (BeagleIndexable *indexable);
54 void beagle_indexable_add_property (BeagleIndexable *indexable,
55 BeagleProperty *prop);
57 BeagleIndexableType beagle_indexable_get_type (BeagleIndexable *indexable);
58 void beagle_indexable_set_type (BeagleIndexable *indexable,
59 BeagleIndexableType type);
61 G_CONST_RETURN char *
62 beagle_indexable_get_uri (BeagleIndexable *indexable);
63 void beagle_indexable_set_uri (BeagleIndexable *indexable,
64 const char *uri);
66 G_CONST_RETURN char *
67 beagle_indexable_get_parent_uri (BeagleIndexable *indexable);
68 void beagle_indexable_set_parent_uri (BeagleIndexable *indexable,
69 const char *uri);
71 G_CONST_RETURN char *
72 beagle_indexable_get_content_uri (BeagleIndexable *indexable);
74 void beagle_indexable_set_content_uri (BeagleIndexable *indexable,
75 const char *content_uri);
77 G_CONST_RETURN char *
78 beagle_indexable_get_hot_content_uri (BeagleIndexable *indexable);
79 void
80 beagle_indexable_set_hot_content_uri (BeagleIndexable *indexable,
81 const char *hot_content_uri);
83 BeagleTimestamp *beagle_indexable_get_timestamp (BeagleIndexable *indexable);
84 void beagle_indexable_set_timestamp (BeagleIndexable *indexable,
85 BeagleTimestamp *timestamp);
87 gboolean beagle_indexable_get_delete_content (BeagleIndexable *indexable);
88 void beagle_indexable_set_delete_content (BeagleIndexable *indexable,
89 gboolean delete_content);
91 gboolean beagle_indexable_get_crawled (BeagleIndexable *indexable);
92 void beagle_indexable_set_crawled (BeagleIndexable *indexable, gboolean crawled);
94 gboolean beagle_indexable_get_no_content (BeagleIndexable *indexable);
95 void beagle_indexable_set_no_content (BeagleIndexable *indexable,
96 gboolean no_content);
98 gboolean beagle_indexable_get_cache_content(BeagleIndexable *indexable);
99 void beagle_indexable_set_cache_content(BeagleIndexable *indexable,
100 gboolean cache_content);
102 BeagleIndexableFiltering
103 beagle_indexable_get_filtering (BeagleIndexable *indexable);
104 void beagle_indexable_set_filtering (BeagleIndexable *indexable,
105 BeagleIndexableFiltering filtering);
107 G_CONST_RETURN char *beagle_indexable_get_hit_type (BeagleIndexable *indexable);
108 void beagle_indexable_set_hit_type (BeagleIndexable *indexable,
109 const char *hit_type);
111 G_CONST_RETURN char *beagle_indexable_get_mime_type(BeagleIndexable *indexable);
112 void beagle_indexable_set_mime_type (BeagleIndexable *indexable,
113 const char *mime_type);
115 G_CONST_RETURN char *beagle_indexable_get_source (BeagleIndexable *indexable);
116 void beagle_indexable_set_source (BeagleIndexable *indexable,
117 const char *source);
119 #endif /* __BEAGLE_INDEXABLE_H */