Wp.SiAcquisition¶
- Implementations:
None
Methods¶
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
Properties¶
None
Signals¶
None
Fields¶
None
Class Details¶
- class Wp.SiAcquisition¶
- Bases:
- Structure:
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 aWp.SiLinkable
viaWp.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:
acquisitor (
Wp.SiLink
) – the link that is trying to acquire a port info itemitem (
Wp.SiLinkable
) – the item that is being acquiredcallback (
Gio.AsyncReadyCallback
orNone
) – the callback to call when the operation is done
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:
- Returns:
- Return type:
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 itemitem (
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:
acquisitor (
Wp.SiLink
) – the link that is trying to acquire a port info itemitem (
Wp.SiLinkable
) – the item that is being acquiredcallback (
Gio.AsyncReadyCallback
orNone
) – the callback to call when the operation is done
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:
- Return type:
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 itemitem (
Wp.SiLinkable
) – the port info that is being released
Releases the item, which means that it is being unlinked.