diff options
author | William Jon McCann <jmccann@redhat.com> | 2012-07-17 18:09:04 -0400 |
---|---|---|
committer | William Jon McCann <jmccann@redhat.com> | 2012-07-18 10:57:32 -0400 |
commit | 79869fd920fcc70a901044c7ee362038ea42b27a (patch) | |
tree | 0c66e3d2fc43be0d227eabfa34b07a37c8727009 /libnautilus-private/nautilus-search-provider.h | |
parent | 5b7f3b7ca2f7c5899d2335d28be8b057ff77abe6 (diff) | |
download | nautilus-79869fd920fcc70a901044c7ee362038ea42b27a.tar.gz |
Collect results from both search providers
Previously we would only use the compiled in search provider. Now
it has been changed to run both providers at the same time and
merge the results by URI.
https://bugzilla.gnome.org/show_bug.cgi?id=680137
Diffstat (limited to 'libnautilus-private/nautilus-search-provider.h')
-rw-r--r-- | libnautilus-private/nautilus-search-provider.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/libnautilus-private/nautilus-search-provider.h b/libnautilus-private/nautilus-search-provider.h new file mode 100644 index 000000000..07f2bff92 --- /dev/null +++ b/libnautilus-private/nautilus-search-provider.h @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2012 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef NAUTILUS_SEARCH_PROVIDER_H +#define NAUTILUS_SEARCH_PROVIDER_H + +#include <glib-object.h> +#include <libnautilus-private/nautilus-query.h> + +G_BEGIN_DECLS + +#define NAUTILUS_TYPE_SEARCH_PROVIDER (nautilus_search_provider_get_type ()) +#define NAUTILUS_SEARCH_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_SEARCH_PROVIDER, NautilusSearchProvider)) +#define NAUTILUS_IS_SEARCH_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_SEARCH_PROVIDER)) +#define NAUTILUS_SEARCH_PROVIDER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), NAUTILUS_TYPE_SEARCH_PROVIDER, NautilusSearchProviderIface)) + +typedef struct _NautilusSearchProvider NautilusSearchProvider; +typedef struct _NautilusSearchProviderIface NautilusSearchProviderIface; + +struct _NautilusSearchProviderIface { + GTypeInterface g_iface; + + /* VTable */ + void (*set_query) (NautilusSearchProvider *provider, NautilusQuery *query); + void (*start) (NautilusSearchProvider *provider); + void (*stop) (NautilusSearchProvider *provider); + + /* Signals */ + void (*hits_added) (NautilusSearchProvider *provider, GList *hits); + void (*hits_subtracted) (NautilusSearchProvider *provider, GList *hits); + void (*finished) (NautilusSearchProvider *provider); + void (*error) (NautilusSearchProvider *provider, const char *error_message); +}; + +GType nautilus_search_provider_get_type (void) G_GNUC_CONST; + +/* Interface Functions */ +void nautilus_search_provider_set_query (NautilusSearchProvider *provider, + NautilusQuery *query); +void nautilus_search_provider_start (NautilusSearchProvider *provider); +void nautilus_search_provider_stop (NautilusSearchProvider *provider); + +void nautilus_search_provider_hits_added (NautilusSearchProvider *provider, + GList *hits); +void nautilus_search_provider_hits_subtracted (NautilusSearchProvider *provider, + GList *hits); +void nautilus_search_provider_finished (NautilusSearchProvider *provider); +void nautilus_search_provider_error (NautilusSearchProvider *provider, + const char *error_message); + +G_END_DECLS + +#endif |