Wp.SiAcquisition

g GObject.GInterface GObject.GInterface Wp.SiAcquisition Wp.SiAcquisition GObject.GInterface->Wp.SiAcquisition

Implementations:

None

Methods

acquire (acquisitor, item, callback, *data)

acquire_finish (res)

release (acquisitor, item)

Virtual Methods

do_acquire (acquisitor, item, callback, data)

do_acquire_finish (res)

do_release (acquisitor, item)

Properties

None

Signals

None

Fields

None

Class Details

class Wp.SiAcquisition
Bases:

GObject.GInterface

Structure:

Wp.SiAcquisitionInterface

This interface provides a way to request an item for linking before doing so. This allows item implementations to apply internal policy rules. A Wp.SiAcquisition is associated directly with a Wp.SiLinkable via Wp.SiLinkable.get_acquisition(). In order to allow switching policies, it is recommended that port info implementations use a separate session item to implement this interface and allow replacing it.

acquire(acquisitor, item, callback, *data)
Parameters:

Acquires the item for linking by acquisitor.

When a link is not allowed by policy, this operation should return an error. When a link needs to be delayed for a short amount of time (ex. to apply a fade out effect on another item), this operation should finish with a delay. It is safe to assume that after this operation completes, the item will be linked immediately.

acquire_finish(res)
Parameters:

res (Gio.AsyncResult) – the async result

Raises:

GLib.Error

Returns:

True on success, False if there was an error

Return type:

bool

Finishes the operation started by Wp.SiAcquisition.acquire(). This is meant to be called in the callback that was passed to that method.

release(acquisitor, item)
Parameters:
  • acquisitor (Wp.SiLink) – the link that had previously acquired the item

  • item (Wp.SiLinkable) – the port info that is being released

Releases the item, which means that it is being unlinked.

do_acquire(acquisitor, item, callback, data) virtual
Parameters:

Acquires the item for linking by acquisitor.

When a link is not allowed by policy, this operation should return an error. When a link needs to be delayed for a short amount of time (ex. to apply a fade out effect on another item), this operation should finish with a delay. It is safe to assume that after this operation completes, the item will be linked immediately.

do_acquire_finish(res) virtual
Parameters:

res (Gio.AsyncResult) – the async result

Returns:

True on success, False if there was an error

Return type:

bool

Finishes the operation started by Wp.SiAcquisition.acquire(). This is meant to be called in the callback that was passed to that method.

do_release(acquisitor, item) virtual
Parameters:
  • acquisitor (Wp.SiLink) – the link that had previously acquired the item

  • item (Wp.SiLinkable) – the port info that is being released

Releases the item, which means that it is being unlinked.