Struct libpulse_binding::operation::Operation
[−]
[src]
pub struct Operation { /* fields omitted */ }
An asynchronous operation object. This acts as a safe Rust wrapper for the actual C object.
Methods
impl Operation
[src]
fn from_raw(ptr: *mut OperationInternal) -> Self
[src]
Create a new Operation
from an existing OperationInternal
pointer.
fn from_raw_weak(ptr: *mut OperationInternal) -> Self
[src]
Create a new Operation
from an existing OperationInternal
pointer. This is the 'weak' version, for use in callbacks, which avoids destroying the
internal object when dropped.
fn cancel(&self)
[src]
Cancel the operation.
Beware! This will not necessarily cancel the execution of the operation on the server side. However it will make sure that the callback associated with this operation will not be called anymore, effectively disabling the operation from the client side's view.
fn get_state(&self) -> State
[src]
Return the current status of the operation
fn set_state_callback(&self, cb: Option<(NotifyCb, *mut c_void)>)
[src]
Set the callback function that is called when the operation state changes.
Usually this is not necessary, since the functions that create Operation
objects already
take a callback that is called when the operation finishes. Registering a state change
callback is mainly useful, if you want to get called back also if the operation gets
cancelled.