1 /* ide-toolchain-provider.h 2 * 3 * Copyright 2018 Collabora Ltd. 4 * 5 * This program is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, either version 3 of the License, or 8 * (at your option) any later version. 9 * 10 * This program 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 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 * 18 * Authors: Corentin Noël <corentin.noel@collabora.com> 19 * 20 * SPDX-License-Identifier: GPL-3.0-or-later 21 */ 22 23 #pragma once 24 25 #if !defined (IDE_FOUNDRY_INSIDE) && !defined (IDE_FOUNDRY_COMPILATION) 26 # error "Only <libide-foundry.h> can be included directly." 27 #endif 28 29 #include <libide-core.h> 30 31 #include "ide-foundry-types.h" 32 33 G_BEGIN_DECLS 34 35 #define IDE_TYPE_TOOLCHAIN_PROVIDER (ide_toolchain_provider_get_type()) 36 37 IDE_AVAILABLE_IN_3_32 38 G_DECLARE_INTERFACE (IdeToolchainProvider, ide_toolchain_provider, IDE, TOOLCHAIN_PROVIDER, IdeObject) 39 40 struct _IdeToolchainProviderInterface 41 { 42 GTypeInterface parent_iface; 43 44 void (*load_async) (IdeToolchainProvider *self, 45 GCancellable *cancellable, 46 GAsyncReadyCallback callback, 47 gpointer user_data); 48 gboolean (*load_finish) (IdeToolchainProvider *self, 49 GAsyncResult *result, 50 GError **error); 51 void (*unload) (IdeToolchainProvider *self, 52 IdeToolchainManager *manager); 53 void (*added) (IdeToolchainProvider *self, 54 IdeToolchain *toolchain); 55 void (*removed) (IdeToolchainProvider *self, 56 IdeToolchain *toolchain); 57 }; 58 59 IDE_AVAILABLE_IN_3_32 60 void ide_toolchain_provider_load_async (IdeToolchainProvider *self, 61 GCancellable *cancellable, 62 GAsyncReadyCallback callback, 63 gpointer user_data); 64 IDE_AVAILABLE_IN_3_32 65 gboolean ide_toolchain_provider_load_finish (IdeToolchainProvider *self, 66 GAsyncResult *result, 67 GError **error); 68 IDE_AVAILABLE_IN_3_32 69 void ide_toolchain_provider_unload (IdeToolchainProvider *self, 70 IdeToolchainManager *manager); 71 IDE_AVAILABLE_IN_3_32 72 void ide_toolchain_provider_emit_added (IdeToolchainProvider *self, 73 IdeToolchain *toolchain); 74 IDE_AVAILABLE_IN_3_32 75 void ide_toolchain_provider_emit_removed (IdeToolchainProvider *self, 76 IdeToolchain *toolchain); 77 78 G_END_DECLS 79