1 /* ide-code-index-entries.h 2 * 3 * Copyright 2017-2019 Christian Hergert <chergert@redhat.com> 4 * Copyright 2017 Anoop Chandu <anoopchandu96@gmail.com> 5 * 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * This program 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 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program. If not, see <http://www.gnu.org/licenses/>. 18 * 19 * SPDX-License-Identifier: GPL-3.0-or-later 20 */ 21 22 #pragma once 23 24 #if !defined (IDE_CODE_INSIDE) && !defined (IDE_CODE_COMPILATION) 25 # error "Only <libide-core.h> can be included directly." 26 #endif 27 28 #include <libide-core.h> 29 30 #include "ide-code-types.h" 31 32 G_BEGIN_DECLS 33 34 #define IDE_TYPE_CODE_INDEX_ENTRIES (ide_code_index_entries_get_type()) 35 36 IDE_AVAILABLE_IN_3_32 37 G_DECLARE_INTERFACE (IdeCodeIndexEntries, ide_code_index_entries, IDE, CODE_INDEX_ENTRIES, GObject) 38 39 struct _IdeCodeIndexEntriesInterface 40 { 41 GTypeInterface parent_iface; 42 43 GFile *(*get_file) (IdeCodeIndexEntries *self); 44 IdeCodeIndexEntry *(*get_next_entry) (IdeCodeIndexEntries *self); 45 void (*next_entries_async) (IdeCodeIndexEntries *self, 46 GCancellable *cancellable, 47 GAsyncReadyCallback callback, 48 gpointer user_data); 49 GPtrArray *(*next_entries_finish) (IdeCodeIndexEntries *self, 50 GAsyncResult *result, 51 GError **error); 52 }; 53 54 IDE_AVAILABLE_IN_3_32 55 IdeCodeIndexEntry *ide_code_index_entries_get_next_entry (IdeCodeIndexEntries *self); 56 IDE_AVAILABLE_IN_3_32 57 GFile *ide_code_index_entries_get_file (IdeCodeIndexEntries *self); 58 IDE_AVAILABLE_IN_3_32 59 void ide_code_index_entries_next_entries_async (IdeCodeIndexEntries *self, 60 GCancellable *cancellable, 61 GAsyncReadyCallback callback, 62 gpointer user_data); 63 IDE_AVAILABLE_IN_3_32 64 GPtrArray *ide_code_index_entries_next_entries_finish (IdeCodeIndexEntries *self, 65 GAsyncResult *result, 66 GError **error); 67 IDE_AVAILABLE_IN_3_32 68 void ide_code_index_entries_collect_async (IdeCodeIndexEntries *self, 69 GCancellable *cancellable, 70 GAsyncReadyCallback callback, 71 gpointer user_data); 72 IDE_AVAILABLE_IN_3_32 73 GPtrArray *ide_code_index_entries_collect_finish (IdeCodeIndexEntries *self, 74 GAsyncResult *result, 75 GError **error); 76 77 G_END_DECLS 78