Camel.Operation¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
Virtual Methods¶
- Inherited:
|
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Camel.Operation(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod cancel_all()¶
Cancel all outstanding operations.
- classmethod dup_message(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
orNone
- Returns:
a copy of the last text set by camel_operation_push_message(), or
None
, when none is set.- Return type:
Duplicates current operation message, or returns
None
, if no such is available. The message as the last text set by camel_operation_push_message().Free the returned text with
GLib.free
(), when no longer needed.This function only works if cancellable is a
Camel.Operation
cast as aGio.Cancellable
. If cancellable is a plainGio.Cancellable
orNone
, the function does nothing and returns silently.New in version 3.52.
- classmethod new()¶
- Returns:
A new operation handle.
- Return type:
Create a new camel operation handle. Camel operation handles can be used in a multithreaded application (or a single operation handle can be used in a non threaded appliation) to cancel running operations and to obtain notification messages of the internal status of messages.
- classmethod new_proxy(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
to proxy- Returns:
A new operation handle, proxying cancellable.
- Return type:
Proxies the cancellable in a way that if it is cancelled, then the returned cancellable is also cancelled, but when the returned cancellable is cancelled, then it doesn’t influence the original cancellable. Other
Camel.Operation
actions being done on the returned cancellable are also propagated to the cancellable.The passed-in cancellable can be
None
, in which case a plainCamel.Operation
is returned.This is useful when some operation can be cancelled from elsewhere (like by a user), but also by the code on its own, when it doesn’t make sense to cancel also any larger operation to which the passed-in cancellable belongs.
New in version 3.24.
- classmethod pop_message(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
Pops the most recently pushed message.
This function only works if cancellable is a
Camel.Operation
cast as aGio.Cancellable
. If cancellable is a plainGio.Cancellable
orNone
, the function does nothing and returns silently.
- classmethod progress(cancellable, percent)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
orNone
percent (
int
) – percent complete, 0 to 100.
Report progress on the current operation. percent reports the current percentage of completion, which should be in the range of 0 to 100.
This function only works if cancellable is a
Camel.Operation
cast as aGio.Cancellable
. If cancellable is a plainGio.Cancellable
orNone
, the function does nothing and returns silently.
Signal Details¶
- Camel.Operation.signals.pop_message(operation)¶
- Signal Name:
pop-message
- Flags:
- Parameters:
operation (
Camel.Operation
) – The object which received the signal
- Camel.Operation.signals.progress(operation, object)¶
- Signal Name:
progress
- Flags:
- Parameters:
operation (
Camel.Operation
) – The object which received the signalobject (
int
) –
- Camel.Operation.signals.push_message(operation, object)¶
- Signal Name:
push-message
- Flags:
- Parameters:
operation (
Camel.Operation
) – The object which received the signalobject (
str
) –
- Camel.Operation.signals.status(operation, object, p0)¶
- Signal Name:
status
- Flags:
- Parameters:
operation (
Camel.Operation
) – The object which received the signalobject (
str
) –p0 (
int
) –