IdeToolchainProvider: Builder SDK Reference

## IdeToolchainProvider IdeToolchainProvider |

## Functions

void | ide_toolchain_provider_load_async ()
gboolean | ide_toolchain_provider_load_finish ()
void | ide_toolchain_provider_unload ()
void | ide_toolchain_provider_emit_added ()
void | ide_toolchain_provider_emit_removed ()

## Signals

void | added | Run Last
void | removed | Run Last

## Types and Values

#define | IDE_TYPE_TOOLCHAIN_PROVIDER
struct | IdeToolchainProviderInterface
| IdeToolchainProvider

## Object Hierarchy

        GInterface
        ╰── IdeToolchainProvider

## Prerequisites

IdeToolchainProvider requires IdeObject.

## Description

## Functions

### ide_toolchain_provider_load_async ()

    void
    ide_toolchain_provider_load_async (IdeToolchainProvider *self,
                                       GCancellable *cancellable,
                                       GAsyncReadyCallback callback,
                                       gpointer user_data);

This function is called to initialize the toolchain provider after the plugin instance has been created. The provider should locate any toolchain within the project and call `ide_toolchain_provider_emit_added()` before completing the asynchronous function so that the toolchain manager may be made aware of the toolchains.

#### Parameters

self | a IdeToolchainProvider |
cancellable | a GCancellable or `NULL`. | [nullable]
callback | a callback to execute upon completion |
user_data | closure data for `callback` |

Since: 3.32

### ide_toolchain_provider_load_finish ()

    gboolean
    ide_toolchain_provider_load_finish (IdeToolchainProvider *self,
                                        GAsyncResult *result,
                                        GError **error);

Completes an asynchronous request to `ide_toolchain_provider_load_async()`.

#### Parameters

self | a IdeToolchainProvider |
result | a GAsyncResult |
error | a location for a GError, or `NULL` |

#### Returns

`TRUE` if successful; otherwise `FALSE` and `error` is set.

Since: 3.32

### ide_toolchain_provider_unload ()

    void
    ide_toolchain_provider_unload (IdeToolchainProvider *self,
                                   IdeToolchainManager *manager);

### ide_toolchain_provider_emit_added ()

    void
    ide_toolchain_provider_emit_added (IdeToolchainProvider *self,
                                       IdeToolchain *toolchain);

IdeToolchainProvider implementations should call this function with a `toolchain` when it has discovered a new toolchain.

#### Parameters

self | an IdeToolchainProvider |
toolchain | an IdeToolchain |

Since: 3.32

### ide_toolchain_provider_emit_removed ()

    void
    ide_toolchain_provider_emit_removed (IdeToolchainProvider *self,
                                         IdeToolchain *toolchain);

IdeToolchainProvider implementations should call this function with a `toolchain` when the toolchain was removed.

#### Parameters

self | an IdeToolchainProvider |
toolchain | an IdeToolchain |

Since: 3.32

## Types and Values

### IDE_TYPE_TOOLCHAIN_PROVIDER

    #define IDE_TYPE_TOOLCHAIN_PROVIDER (ide_toolchain_provider_get_type())

### struct IdeToolchainProviderInterface

    struct IdeToolchainProviderInterface {
      GTypeInterface parent_iface;

      void        (*load_async)       (IdeToolchainProvider  *self,
                                       GCancellable          *cancellable,
                                       GAsyncReadyCallback    callback,
                                       gpointer               user_data);
      gboolean    (*load_finish)      (IdeToolchainProvider  *self,
                                       GAsyncResult          *result,
                                       GError               **error);
      void        (*unload)           (IdeToolchainProvider  *self,
                                       IdeToolchainManager   *manager);
      void        (*added)            (IdeToolchainProvider  *self,
                                       IdeToolchain          *toolchain);
      void        (*removed)          (IdeToolchainProvider  *self,
                                       IdeToolchain          *toolchain);
    };

### IdeToolchainProvider

    typedef struct _IdeToolchainProvider IdeToolchainProvider;

## Signal Details

### The `“added”` signal

    void
    user_function (IdeToolchainProvider *idetoolchainprovider,
                   IdeToolchain         *arg1,
                   gpointer              user_data)

Flags: Run Last

### The `“removed”` signal

    void
    user_function (IdeToolchainProvider *idetoolchainprovider,
                   IdeToolchain         *arg1,
                   gpointer              user_data)

Flags: Run Last