### Class

# Xdp Session

unstable since: 1.0

#### 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()`.

Available since: 1.0

#### Ancestors

- GObject

#### Instance methods

###### xdp_session_close

Closes the session.

unstable since: 1.0

###### 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.

unstable since: 1.0

###### xdp_session_get_devices

Obtains the devices that the user selected.

unstable since: 1.0

###### xdp_session_get_persist_mode

Retrieves the effective persist mode of `session`.

unstable since: 1.0

###### xdp_session_get_restore_token

Retrieves the restore token of `session`.

unstable since: 1.0

###### xdp_session_get_session_state

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

unstable since: 1.0

###### xdp_session_get_session_type

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

unstable since: 1.0

###### xdp_session_get_streams

Obtains the streams that the user selected.

unstable since: 1.0

###### xdp_session_keyboard_key

Changes the state of the key to `state`.

unstable since: 1.0

###### xdp_session_open_pipewire_remote

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

unstable since: 1.0

###### 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.

unstable since: 1.0

###### xdp_session_pointer_axis_discrete

The axis movement from a discrete scroll device.

unstable since: 1.0

###### xdp_session_pointer_button

Changes the state of the button to `state`.

unstable since: 1.0

###### xdp_session_pointer_motion

Moves the pointer from its current position.

unstable since: 1.0

###### xdp_session_pointer_position

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

unstable since: 1.0

###### xdp_session_start

Starts the session.

unstable since: 1.0

###### xdp_session_start_finish

Finishes the session-start request.

unstable since: 1.0

###### xdp_session_touch_down

Notify about a new touch down event.

unstable since: 1.0

###### xdp_session_touch_position

Notify about a new touch motion event.

unstable since: 1.0

###### xdp_session_touch_up

Notify about a new touch up event.

unstable since: 1.0

##### 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.

unstable since: 1.0

##### 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.

unstable since: 2.0

#### Class structure

    struct XdpSessionClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`
  No description available.