1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ 2 /* 3 * Copyright (C) 2005 Novell, Inc. 4 * 5 * Nemo 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. 9 * 10 * Nemo 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. 14 * 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., 51 Franklin Street - Suite 500, 18 * Boston, MA 02110-1335, USA. 19 * 20 * Author: Anders Carlsson <andersca@imendio.com> 21 * 22 */ 23 24 #ifndef NEMO_QUERY_H 25 #define NEMO_QUERY_H 26 27 #include <glib-object.h> 28 29 #define NEMO_TYPE_QUERY (nemo_query_get_type ()) 30 #define NEMO_QUERY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NEMO_TYPE_QUERY, NemoQuery)) 31 #define NEMO_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NEMO_TYPE_QUERY, NemoQueryClass)) 32 #define NEMO_IS_QUERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NEMO_TYPE_QUERY)) 33 #define NEMO_IS_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NEMO_TYPE_QUERY)) 34 #define NEMO_QUERY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NEMO_TYPE_QUERY, NemoQueryClass)) 35 36 typedef struct NemoQueryDetails NemoQueryDetails; 37 38 typedef struct NemoQuery { 39 GObject parent; 40 NemoQueryDetails *details; 41 } NemoQuery; 42 43 typedef struct { 44 GObjectClass parent_class; 45 } NemoQueryClass; 46 47 GType nemo_query_get_type (void); 48 gboolean nemo_query_enabled (void); 49 50 NemoQuery* nemo_query_new (void); 51 52 char * nemo_query_get_text (NemoQuery *query); 53 void nemo_query_set_text (NemoQuery *query, const char *text); 54 55 char * nemo_query_get_location (NemoQuery *query); 56 void nemo_query_set_location (NemoQuery *query, const char *uri); 57 58 GList * nemo_query_get_mime_types (NemoQuery *query); 59 void nemo_query_set_mime_types (NemoQuery *query, GList *mime_types); 60 void nemo_query_add_mime_type (NemoQuery *query, const char *mime_type); 61 62 void nemo_query_set_show_hidden (NemoQuery *query, gboolean hidden); 63 gboolean nemo_query_get_show_hidden (NemoQuery *query); 64 65 char * nemo_query_to_readable_string (NemoQuery *query); 66 NemoQuery *nemo_query_load (char *file); 67 gboolean nemo_query_save (NemoQuery *query, char *file); 68 69 #endif /* NEMO_QUERY_H */ 70