2007-12-11 A. Walton <awalton@svn.gnome.org>
[nautilus.git] / libnautilus-private / nautilus-query.h
blob8d92c3ddf0ba7047c280bceb8944e0a5e56cfe76
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /*
3 * Copyright (C) 2005 Novell, Inc.
5 * Nautilus is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
10 * Nautilus is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public
16 * License along with this program; see the file COPYING. If not,
17 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
20 * Author: Anders Carlsson <andersca@imendio.com>
24 #ifndef NAUTILUS_QUERY_H
25 #define NAUTILUS_QUERY_H
27 #include <glib-object.h>
29 #define NAUTILUS_TYPE_QUERY (nautilus_query_get_type ())
30 #define NAUTILUS_QUERY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_QUERY, NautilusQuery))
31 #define NAUTILUS_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_QUERY, NautilusQueryClass))
32 #define NAUTILUS_IS_QUERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_QUERY))
33 #define NAUTILUS_IS_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_QUERY))
34 #define NAUTILUS_QUERY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NAUTILUS_TYPE_QUERY, NautilusQueryClass))
36 typedef struct NautilusQueryDetails NautilusQueryDetails;
38 typedef struct NautilusQuery {
39 GObject parent;
40 NautilusQueryDetails *details;
41 } NautilusQuery;
43 typedef struct {
44 GObjectClass parent_class;
45 } NautilusQueryClass;
47 GType nautilus_query_get_type (void);
48 gboolean nautilus_query_enabled (void);
50 NautilusQuery* nautilus_query_new (void);
52 char * nautilus_query_get_text (NautilusQuery *query);
53 void nautilus_query_set_text (NautilusQuery *query, const char *text);
55 char * nautilus_query_get_location (NautilusQuery *query);
56 void nautilus_query_set_location (NautilusQuery *query, const char *uri);
58 GList * nautilus_query_get_mime_types (NautilusQuery *query);
59 void nautilus_query_set_mime_types (NautilusQuery *query, GList *mime_types);
60 void nautilus_query_add_mime_type (NautilusQuery *query, const char *mime_type);
62 char * nautilus_query_to_readable_string (NautilusQuery *query);
63 NautilusQuery *nautilus_query_load (char *file);
64 gboolean nautilus_query_save (NautilusQuery *query, char *file);
66 #endif /* NAUTILUS_QUERY_H */