IdeRuntimeProvider: Builder SDK Reference

## IdeRuntimeProvider IdeRuntimeProvider |

## Functions

void | ide_runtime_provider_load ()
void | ide_runtime_provider_unload ()
gboolean | ide_runtime_provider_can_install ()
void | ide_runtime_provider_install_async ()
gboolean | ide_runtime_provider_install_finish ()
void | ide_runtime_provider_bootstrap_async ()
IdeRuntime * | ide_runtime_provider_bootstrap_finish ()

## Types and Values

#define | IDE_TYPE_RUNTIME_PROVIDER
struct | IdeRuntimeProviderInterface
| IdeRuntimeProvider

## Object Hierarchy

        GInterface
        ╰── IdeRuntimeProvider

## Prerequisites

IdeRuntimeProvider requires IdeObject.

## Description

## Functions

### ide_runtime_provider_load ()

    void
    ide_runtime_provider_load (IdeRuntimeProvider *self,
                               IdeRuntimeManager *manager);

### ide_runtime_provider_unload ()

    void
    ide_runtime_provider_unload (IdeRuntimeProvider *self,
                                 IdeRuntimeManager *manager);

### ide_runtime_provider_can_install ()

    gboolean
    ide_runtime_provider_can_install (IdeRuntimeProvider *self,
                                      const gchar *runtime_id);

### ide_runtime_provider_install_async ()

    void
    ide_runtime_provider_install_async (IdeRuntimeProvider *self,
                                        const gchar *runtime_id,
                                        GCancellable *cancellable,
                                        GAsyncReadyCallback callback,
                                        gpointer user_data);

### ide_runtime_provider_install_finish ()

    gboolean
    ide_runtime_provider_install_finish (IdeRuntimeProvider *self,
                                         GAsyncResult *result,
                                         GError **error);

### ide_runtime_provider_bootstrap_async ()

    void
    ide_runtime_provider_bootstrap_async (IdeRuntimeProvider *self,
                                          IdePipeline *pipeline,
                                          GCancellable *cancellable,
                                          GAsyncReadyCallback callback,
                                          gpointer user_data);

This function allows to the runtime provider to install dependent runtimes similar to `ide_runtime_provider_install_async()`, but with the added benefit that it can access the pipeline for more information. For example, it may want to check the architecture of the pipeline, or the connected device for tweaks as to what runtime to use.

Some runtime providers like Flatpak might use this to locate SDK extensions and install those too.

This function should be used instead of `ide_runtime_provider_install_async()`.

#### Parameters

self | a IdeRuntimeProvider |
pipeline | an IdePipeline |
cancellable | a GCancellable or `NULL`. | [nullable]
callback | a GAsyncReadyCallback or `NULL` |
user_data | closure data for `callback` |

Since: 3.32

### ide_runtime_provider_bootstrap_finish ()

    IdeRuntime *
    ide_runtime_provider_bootstrap_finish (IdeRuntimeProvider *self,
                                           GAsyncResult *result,
                                           GError **error);

Completes the asynchronous request to bootstrap.

The resulting runtime will be set as the runtime to use for the build pipeline.

#### Parameters

self | a IdeRuntimeProvider |
result | a GAsyncResult provided to callback |
error | a location for a GError, or `NULL` |

#### Returns

an IdeRuntime if successful; otherwise `NULL` and `error` is set.

[transfer full]

Since: 3.32

## Types and Values

### IDE_TYPE_RUNTIME_PROVIDER

    #define IDE_TYPE_RUNTIME_PROVIDER (ide_runtime_provider_get_type ())

### struct IdeRuntimeProviderInterface

    struct IdeRuntimeProviderInterface {
      GTypeInterface parent;

      void        (*load)             (IdeRuntimeProvider   *self,
                                       IdeRuntimeManager    *manager);
      void        (*unload)           (IdeRuntimeProvider   *self,
                                       IdeRuntimeManager    *manager);
      gboolean    (*can_install)      (IdeRuntimeProvider   *self,
                                       const gchar          *runtime_id);
      void        (*install_async)    (IdeRuntimeProvider   *self,
                                       const gchar          *runtime_id,
                                       GCancellable         *cancellable,
                                       GAsyncReadyCallback   callback,
                                       gpointer              user_data);
      gboolean    (*install_finish)   (IdeRuntimeProvider   *self,
                                       GAsyncResult         *result,
                                       GError              **error);
      void        (*bootstrap_async)  (IdeRuntimeProvider   *self,
                                       IdePipeline     *pipeline,
                                       GCancellable         *cancellable,
                                       GAsyncReadyCallback   callback,
                                       gpointer              user_data);
      IdeRuntime *(*bootstrap_finish) (IdeRuntimeProvider   *self,
                                       GAsyncResult         *result,
                                       GError              **error);
    };

### IdeRuntimeProvider

    typedef struct _IdeRuntimeProvider IdeRuntimeProvider;