Ide.SessionAddin.save_page_async

### Method

# Ide SessionAddinsave_page_async

#### Declaration

    void
    ide_session_addin_save_page_async (
      IdeSessionAddin* self,
      IdePage* page,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description

Asynchronous request to save a page’s session state.

The addin implementation must not attempt to save the page’s position within its parent `IdeGrid`. Instead it must only save how to restore the content of the page (e.g. opening URI foo://path/to/file at position X:Y). It is the `IdeSession` that manages the position of the pages, which means session addins implementation can be much simpler. See also ide_session_addin_save_page_finish().

The resulting state will be provided when restoring the page at a future time with ide_session_addin_restore_page_async().

Available since: | 41

#### Parameters

`page` | `IdePage`
| An `IdePage` supported by `ide_session_addin_can_save_page()`
| The data is owned by the caller of the function.
`cancellable` | `GCancellable`
| A `GCancellable` or `NULL`.
| The argument can be `NULL`.
| The data is owned by the caller of the function.
`callback` | `GAsyncReadyCallback`
| Callback to execute upon completion.
| The argument can be `NULL`.
`user_data` | `gpointer`
| Closure data for `callback`.
| The argument can be `NULL`.
| The data is owned by the caller of the function.