## IdeSessionAddin IdeSessionAddin |

## Functions

void | ide_session_addin_save_async ()
GVariant * | ide_session_addin_save_finish ()
void | ide_session_addin_restore_async ()
gboolean | ide_session_addin_restore_finish ()

## Types and Values

#define | IDE_TYPE_SESSION_ADDIN
struct | IdeSessionAddinInterface
| IdeSessionAddin

## Object Hierarchy

        GInterface
        ╰── IdeSessionAddin

## Prerequisites

IdeSessionAddin requires IdeObject.

## Description

## Functions

### ide_session_addin_save_async ()

    void
    ide_session_addin_save_async (IdeSessionAddin *self,
                                  IdeWorkbench *workbench,
                                  GCancellable *cancellable,
                                  GAsyncReadyCallback callback,
                                  gpointer user_data);

Asynchronous request to save state about the session.

The resulting state will be provided when restoring the addin at a future time.

#### Parameters

self | a IdeSessionAddin |
workbench | an IdeWorkbench |
cancellable | A GCancellable or `NULL`. | [nullable]
callback | callback to execute upon completion |
user_data | closure data for `callback` |

Since: 3.30

### ide_session_addin_save_finish ()

    GVariant *
    ide_session_addin_save_finish (IdeSessionAddin *self,
                                   GAsyncResult *result,
                                   GError **error);

Completes an asynchronous request to save session state.

The resulting GVariant will be used to restore state at a future time.

#### Parameters

self | a IdeSessionAddin |

#### Returns

a GVariant or `NULL`.

[transfer full][nullable]

Since: 3.30

### ide_session_addin_restore_async ()

    void
    ide_session_addin_restore_async (IdeSessionAddin *self,
                                     IdeWorkbench *workbench,
                                     GVariant *state,
                                     GCancellable *cancellable,
                                     GAsyncReadyCallback callback,
                                     gpointer user_data);

Asynchronous request to restore session state by the addin.

#### Parameters

self | a IdeSessionAddin |
workbench | an IdeWorkbench |
state | a GVariant of previous state |
cancellable | A GCancellable or `NULL`. | [nullable]
callback | callback to execute upon completion |
user_data | closure data for `callback` |

Since: 3.30

### ide_session_addin_restore_finish ()

    gboolean
    ide_session_addin_restore_finish (IdeSessionAddin *self,
                                      GAsyncResult *result,
                                      GError **error);

## Types and Values

### IDE_TYPE_SESSION_ADDIN

    #define IDE_TYPE_SESSION_ADDIN (ide_session_addin_get_type ())

### struct IdeSessionAddinInterface

    struct IdeSessionAddinInterface {
      GTypeInterface parent;

      void      (*save_async)     (IdeSessionAddin      *self,
                                   IdeWorkbench         *workbench,
                                   GCancellable         *cancellable,
                                   GAsyncReadyCallback   callback,
                                   gpointer              user_data);
      GVariant *(*save_finish)    (IdeSessionAddin      *self,
                                   GAsyncResult         *result,
                                   GError              **error);
      void      (*restore_async)  (IdeSessionAddin      *self,
                                   IdeWorkbench         *workbench,
                                   GVariant             *state,
                                   GCancellable         *cancellable,
                                   GAsyncReadyCallback   callback,
                                   gpointer              user_data);
      gboolean  (*restore_finish) (IdeSessionAddin      *self,
                                   GAsyncResult         *result,
                                   GError              **error);
    };

### IdeSessionAddin

    typedef struct _IdeSessionAddin IdeSessionAddin;