1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ 2 /* 3 * GData Client 4 * Copyright (C) 2014 Carlos Garnacho <carlosg@gnome.org> 5 * 6 * GData Client is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2.1 of the License, or (at your option) any later version. 10 * 11 * GData Client is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with GData Client. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 #ifndef GDATA_FREEBASE_SEARCH_QUERY_H 21 #define GDATA_FREEBASE_SEARCH_QUERY_H 22 23 #include <glib.h> 24 #include <glib-object.h> 25 26 #include <gdata/gdata-query.h> 27 #include <gdata/gdata-types.h> 28 29 G_BEGIN_DECLS 30 31 #ifndef LIBGDATA_DISABLE_DEPRECATED 32 33 #define GDATA_TYPE_FREEBASE_SEARCH_QUERY (gdata_freebase_search_query_get_type ()) 34 #define GDATA_FREEBASE_SEARCH_QUERY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_FREEBASE_SEARCH_QUERY, GDataFreebaseSearchQuery)) 35 #define GDATA_FREEBASE_SEARCH_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_FREEBASE_SEARCH_QUERY, GDataFreebaseSearchQueryClass)) 36 #define GDATA_IS_FREEBASE_SEARCH_QUERY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_FREEBASE_SEARCH_QUERY)) 37 #define GDATA_IS_FREEBASE_SEARCH_QUERY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_FREEBASE_SEARCH_QUERY)) 38 #define GDATA_FREEBASE_SEARCH_QUERY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_FREEBASE_SEARCH_QUERY, GDataFreebaseSearchQueryClass)) 39 40 typedef struct _GDataFreebaseSearchQueryPrivate GDataFreebaseSearchQueryPrivate; 41 42 /** 43 * GDataFreebaseSearchFilterType: 44 * @GDATA_FREEBASE_SEARCH_FILTER_ALL: all enclosed elements must match, logically an AND 45 * @GDATA_FREEBASE_SEARCH_FILTER_ANY: any of the enclosed elements must match, logically an OR 46 * @GDATA_FREEBASE_SEARCH_FILTER_NOT: the match is inverted. 47 * 48 * Search filter container types. 49 * 50 * Since: 0.15.1 51 */ 52 typedef enum { 53 GDATA_FREEBASE_SEARCH_FILTER_ALL, 54 GDATA_FREEBASE_SEARCH_FILTER_ANY, 55 GDATA_FREEBASE_SEARCH_FILTER_NOT 56 } GDataFreebaseSearchFilterType; 57 58 /** 59 * GDataFreebaseSearchQuery: 60 * 61 * All the fields in the #GDataFreebaseSearchQuery structure are private and should never be accessed directly. 62 * 63 * Since: 0.15.1 64 */ 65 typedef struct { 66 GDataQuery parent; 67 GDataFreebaseSearchQueryPrivate *priv; 68 } GDataFreebaseSearchQuery; 69 70 /** 71 * GDataFreebaseSearchQueryClass: 72 * 73 * All the fields in the #GDataFreebaseSearchQueryClass structure are private and should never be accessed directly. 74 * 75 * Since: 0.15.1 76 */ 77 typedef struct { 78 /*< private >*/ 79 GDataQueryClass parent; 80 81 /*< private >*/ 82 /* Padding for future expansion */ 83 void (*_g_reserved0) (void); 84 void (*_g_reserved1) (void); 85 } GDataFreebaseSearchQueryClass; 86 87 GType gdata_freebase_search_query_get_type (void) G_GNUC_CONST G_GNUC_DEPRECATED; 88 89 GDataFreebaseSearchQuery *gdata_freebase_search_query_new (const gchar *search_terms) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC G_GNUC_DEPRECATED; 90 91 void gdata_freebase_search_query_open_filter (GDataFreebaseSearchQuery *self, GDataFreebaseSearchFilterType filter_type) G_GNUC_DEPRECATED; 92 void gdata_freebase_search_query_close_filter (GDataFreebaseSearchQuery *self) G_GNUC_DEPRECATED; 93 void gdata_freebase_search_query_add_filter (GDataFreebaseSearchQuery *self, const gchar *property, const gchar *value) G_GNUC_DEPRECATED; 94 void gdata_freebase_search_query_add_location (GDataFreebaseSearchQuery *self, guint64 radius, gdouble lat, gdouble lon) G_GNUC_DEPRECATED; 95 96 void gdata_freebase_search_query_set_language (GDataFreebaseSearchQuery *self, const gchar *lang) G_GNUC_DEPRECATED; 97 const gchar * gdata_freebase_search_query_get_language (GDataFreebaseSearchQuery *self) G_GNUC_DEPRECATED; 98 99 void gdata_freebase_search_query_set_stemmed (GDataFreebaseSearchQuery *self, gboolean stemmed) G_GNUC_DEPRECATED; 100 gboolean gdata_freebase_search_query_get_stemmed (GDataFreebaseSearchQuery *self) G_GNUC_DEPRECATED; 101 102 #endif /* !LIBGDATA_DISABLE_DEPRECATED */ 103 104 G_END_DECLS 105 106 #endif /* !GDATA_FREEBASE_SEARCH_QUERY_H */ 107