Xdp.Session
Description: Reference for Xdp.Session

### Class

# XdpSession

#### Description [src]

    final class Xdp.Session : GObject.Object
    {
      /* No available fields */
    }

A representation of long-lived screencast portal interactions.

The XdpSession object is used to represent portal interactions with the screencast or remote desktop portals that extend over multiple portal calls.

To find out what kind of session an XdpSession object represents and whether it is still active, you can use `xdp_session_get_session_type()` and `xdp_session_get_session_state()`.

All sessions start in an initial state. They can be made active by calling `xdp_session_start()`, and ended by calling `xdp_session_close()`.

#### Ancestors

- GObject

#### Instance methods

###### xdp_session_close

Closes the session.

###### xdp_session_connect_to_eis

Connect this XdpRemoteDesktopSession to an EIS implementation and return the fd. This fd can be passed into ei_setup_backend_fd(). See the libei documentation for details.

###### xdp_session_get_devices

Obtains the devices that the user selected.

###### xdp_session_get_persist_mode

Retrieves the effective persist mode of `session`.

###### xdp_session_get_restore_token

Retrieves the restore token of `session`.

###### xdp_session_get_selection_mime_types

Get the currently advertised mime types of the current clipboard selection owner.

###### xdp_session_get_session_state

Obtains information about the state of the session that is represented by `session`.

###### xdp_session_get_session_type

Obtains information about the type of session that is represented by `session`.

###### xdp_session_get_streams

Obtains the streams that the user selected.

###### xdp_session_is_clipboard_enabled

Returns TRUE if the session has enabled clipboard integration.

###### xdp_session_is_selection_owned_by_session

Return TRUE if the most recently received clipboard selection owner is the selection of this session.

###### xdp_session_keyboard_key

Changes the state of the key to `state`.

###### xdp_session_open_pipewire_remote

Opens a file descriptor to the pipewire remote where the screencast streams are available.

###### xdp_session_pointer_axis

The axis movement from a smooth scroll device, such as a touchpad. When applicable, the size of the motion delta should be equivalent to the motion vector of a pointer motion done using the same advice.

###### xdp_session_pointer_axis_discrete

The axis movement from a discrete scroll device.

###### xdp_session_pointer_button

Changes the state of the button to `state`.

###### xdp_session_pointer_motion

Moves the pointer from its current position.

###### xdp_session_pointer_position

Moves the pointer to a new position in the given streams logical coordinate space.

###### xdp_session_request_clipboard

Requests clipboard integration on the session.

###### xdp_session_selection_read

Request to read the contents of the current clipboard selection in the passed mime type format. On success a file descriptor is returned, which can be read from to retrieve the clipboard selection content.

###### xdp_session_selection_write

Retrieve a file descriptor to write the content of the clipboard selection to. The content should be formatted according to the mime type of the mime type passed via the `XdpSession::selection-transfer` that carried the passed serial number.

###### xdp_session_selection_write_done

Notify whether a clipboard selection write operation associated with the passed serial was successful or not.

###### xdp_session_set_selection

Set the clipboard selection to advertise support for the passed list of mime types.

###### xdp_session_start

Starts the session.

###### xdp_session_start_finish

Finishes the session-start request.

###### xdp_session_touch_down

Notify about a new touch down event.

###### xdp_session_touch_position

Notify about a new touch motion event.

###### xdp_session_touch_up

Notify about a new touch up event.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Signals

###### Xdp.Session::closed

Emitted when a session is closed externally.

###### Xdp.Session::selection-owner-changed

No description available.

###### Xdp.Session::selection-transfer

No description available.

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct XdpSessionClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.