Top | ![]() |
![]() |
![]() |
![]() |
guint64 | bytes | Read / Write |
gboolean | cancelable | Read / Write |
guint64 | expected-end-time | Read / Write |
GStrv | objects | Read / Write |
gchar * | operation | Read / Write |
gdouble | progress | Read / Write |
gboolean | progress-valid | Read / Write |
guint64 | rate | Read / Write |
guint64 | start-time | Read / Write |
guint | started-by-uid | Read / Write |
StoragedJob | |
struct | StoragedJobIface |
struct | StoragedJobProxy |
struct | StoragedJobProxyClass |
struct | StoragedJobSkeleton |
struct | StoragedJobSkeletonClass |
GInterface ╰── StoragedJob GObject ├── GDBusInterfaceSkeleton │ ╰── StoragedJobSkeleton │ ╰── StoragedBaseJob ╰── GDBusProxy ╰── StoragedJobProxy
StoragedJobProxy implements GDBusInterface, GInitable, GAsyncInitable and StoragedJob.
StoragedJobSkeleton implements GDBusInterface and StoragedJob.
StoragedJob is implemented by StoragedBaseJob, StoragedJobProxy, StoragedJobSkeleton, StoragedSimpleJob, StoragedSpawnedJob and StoragedThreadedJob.
This section contains code for working with the org.storaged.Storaged.Job D-Bus interface in C.
GDBusInterfaceInfo *
storaged_job_interface_info (void
);
Gets a machine-readable description of the org.storaged.Storaged.Job D-Bus interface.
guint storaged_job_override_properties (GObjectClass *klass
,guint property_id_begin
);
Overrides all GObject properties in the StoragedJob interface for a concrete class. The properties are overridden in the order they are defined.
void storaged_job_call_cancel (StoragedJob *proxy
,GVariant *arg_options
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously invokes the Cancel()
D-Bus method on proxy
.
When the operation is finished, callback
will be invoked in the thread-default main loop of the thread you are calling this method from.
You can then call storaged_job_call_cancel_finish()
to get the result of the operation.
See storaged_job_call_cancel_sync()
for the synchronous, blocking version of this method.
gboolean storaged_job_call_cancel_finish (StoragedJob *proxy
,GAsyncResult *res
,GError **error
);
Finishes an operation started with storaged_job_call_cancel()
.
proxy |
||
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
gboolean storaged_job_call_cancel_sync (StoragedJob *proxy
,GVariant *arg_options
,GCancellable *cancellable
,GError **error
);
Synchronously invokes the Cancel()
D-Bus method on proxy
. The calling thread is blocked until a reply is received.
See storaged_job_call_cancel()
for the asynchronous version of this method.
void storaged_job_complete_cancel (StoragedJob *object
,GDBusMethodInvocation *invocation
);
Helper function used in service implementations to finish handling invocations of the Cancel()
D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error()
or similar.
This method will free invocation
, you cannot use it afterwards.
void storaged_job_emit_completed (StoragedJob *object
,gboolean arg_success
,const gchar *arg_message
);
Emits the "Completed" D-Bus signal.
object |
A StoragedJob. |
|
arg_success |
Argument to pass with the signal. |
|
arg_message |
Argument to pass with the signal. |
guint64
storaged_job_get_expected_end_time (StoragedJob *object
);
Gets the value of the "ExpectedEndTime" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
gdouble
storaged_job_get_progress (StoragedJob *object
);
Gets the value of the "Progress" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
guint64
storaged_job_get_bytes (StoragedJob *object
);
Gets the value of the "Bytes" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
Since: 2.0.0
guint64
storaged_job_get_rate (StoragedJob *object
);
Gets the value of the "Rate" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
Since: 2.0.0
guint64
storaged_job_get_start_time (StoragedJob *object
);
Gets the value of the "StartTime" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
const gchar *const *
storaged_job_get_objects (StoragedJob *object
);
Gets the value of the "Objects" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
object
was constructed. Use storaged_job_dup_objects()
if on another thread.[skip]
gboolean
storaged_job_get_cancelable (StoragedJob *object
);
Gets the value of the "Cancelable" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
const gchar *
storaged_job_get_operation (StoragedJob *object
);
Gets the value of the "Operation" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
object
was constructed. Use storaged_job_dup_operation()
if on another thread.[skip]
gboolean
storaged_job_get_progress_valid (StoragedJob *object
);
Gets the value of the "ProgressValid" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
guint
storaged_job_get_started_by_uid (StoragedJob *object
);
Gets the value of the "StartedByUID" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
gchar **
storaged_job_dup_objects (StoragedJob *object
);
Gets a copy of the "Objects" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
gchar *
storaged_job_dup_operation (StoragedJob *object
);
Gets a copy of the "Operation" D-Bus property.
Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
[skip]
void storaged_job_set_expected_end_time (StoragedJob *object
,guint64 value
);
Sets the "ExpectedEndTime" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void storaged_job_set_progress (StoragedJob *object
,gdouble value
);
Sets the "Progress" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void storaged_job_set_bytes (StoragedJob *object
,guint64 value
);
Sets the "Bytes" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
Since: 2.0.0
void storaged_job_set_rate (StoragedJob *object
,guint64 value
);
Sets the "Rate" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
Since: 2.0.0
void storaged_job_set_start_time (StoragedJob *object
,guint64 value
);
Sets the "StartTime" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void storaged_job_set_objects (StoragedJob *object
,const gchar *const *value
);
Sets the "Objects" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void storaged_job_set_cancelable (StoragedJob *object
,gboolean value
);
Sets the "Cancelable" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void storaged_job_set_operation (StoragedJob *object
,const gchar *value
);
Sets the "Operation" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void storaged_job_set_progress_valid (StoragedJob *object
,gboolean value
);
Sets the "ProgressValid" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void storaged_job_set_started_by_uid (StoragedJob *object
,guint value
);
Sets the "StartedByUID" D-Bus property to value
.
Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
[skip]
void storaged_job_proxy_new (GDBusConnection *connection
,GDBusProxyFlags flags
,const gchar *name
,const gchar *object_path
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously creates a proxy for the D-Bus interface org.storaged.Storaged.Job. See g_dbus_proxy_new()
for more details.
When the operation is finished, callback
will be invoked in the thread-default main loop of the thread you are calling this method from.
You can then call storaged_job_proxy_new_finish()
to get the result of the operation.
See storaged_job_proxy_new_sync()
for the synchronous, blocking version of this constructor.
connection |
A GDBusConnection. |
|
flags |
Flags from the GDBusProxyFlags enumeration. |
|
name |
A bus name (well-known or unique) or |
[allow-none] |
object_path |
An object path. |
|
cancellable |
A GCancellable or |
[allow-none] |
callback |
A GAsyncReadyCallback to call when the request is satisfied. |
|
user_data |
User data to pass to |
StoragedJob * storaged_job_proxy_new_finish (GAsyncResult *res
,GError **error
);
Finishes an operation started with storaged_job_proxy_new()
.
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
StoragedJob * storaged_job_proxy_new_sync (GDBusConnection *connection
,GDBusProxyFlags flags
,const gchar *name
,const gchar *object_path
,GCancellable *cancellable
,GError **error
);
Synchronously creates a proxy for the D-Bus interface org.storaged.Storaged.Job. See g_dbus_proxy_new_sync()
for more details.
The calling thread is blocked until a reply is received.
See storaged_job_proxy_new()
for the asynchronous version of this constructor.
connection |
A GDBusConnection. |
|
flags |
Flags from the GDBusProxyFlags enumeration. |
|
name |
A bus name (well-known or unique) or |
[allow-none] |
object_path |
An object path. |
|
cancellable |
A GCancellable or |
[allow-none] |
error |
Return location for error or |
void storaged_job_proxy_new_for_bus (GBusType bus_type
,GDBusProxyFlags flags
,const gchar *name
,const gchar *object_path
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Like storaged_job_proxy_new()
but takes a GBusType instead of a GDBusConnection.
When the operation is finished, callback
will be invoked in the thread-default main loop of the thread you are calling this method from.
You can then call storaged_job_proxy_new_for_bus_finish()
to get the result of the operation.
See storaged_job_proxy_new_for_bus_sync()
for the synchronous, blocking version of this constructor.
bus_type |
A GBusType. |
|
flags |
Flags from the GDBusProxyFlags enumeration. |
|
name |
A bus name (well-known or unique). |
|
object_path |
An object path. |
|
cancellable |
A GCancellable or |
[allow-none] |
callback |
A GAsyncReadyCallback to call when the request is satisfied. |
|
user_data |
User data to pass to |
StoragedJob * storaged_job_proxy_new_for_bus_finish (GAsyncResult *res
,GError **error
);
Finishes an operation started with storaged_job_proxy_new_for_bus()
.
res |
The GAsyncResult obtained from the GAsyncReadyCallback passed to |
|
error |
Return location for error or |
StoragedJob * storaged_job_proxy_new_for_bus_sync (GBusType bus_type
,GDBusProxyFlags flags
,const gchar *name
,const gchar *object_path
,GCancellable *cancellable
,GError **error
);
Like storaged_job_proxy_new_sync()
but takes a GBusType instead of a GDBusConnection.
The calling thread is blocked until a reply is received.
See storaged_job_proxy_new_for_bus()
for the asynchronous version of this constructor.
StoragedJob *
storaged_job_skeleton_new (void
);
Creates a skeleton object for the D-Bus interface org.storaged.Storaged.Job.
typedef struct _StoragedJob StoragedJob;
Abstract interface type for the D-Bus interface org.storaged.Storaged.Job.
struct StoragedJobIface { GTypeInterface parent_iface; gboolean (*handle_cancel) ( StoragedJob *object, GDBusMethodInvocation *invocation, GVariant *arg_options); gboolean (*get_cancelable) (StoragedJob *object); guint64 (*get_expected_end_time) (StoragedJob *object); const gchar *const * (*get_objects) (StoragedJob *object); const gchar * (*get_operation) (StoragedJob *object); gdouble (*get_progress) (StoragedJob *object); gboolean (*get_progress_valid) (StoragedJob *object); guint64 (*get_start_time) (StoragedJob *object); guint (*get_started_by_uid) (StoragedJob *object); void (*completed) ( StoragedJob *object, gboolean arg_success, const gchar *arg_message); guint64 (*get_bytes) (StoragedJob *object); guint64 (*get_rate) (StoragedJob *object); };
Virtual table for the D-Bus interface org.storaged.Storaged.Job.
The parent interface. |
||
Handler for the “handle-cancel” signal. |
||
Getter for the “cancelable” property. |
||
Getter for the “expected-end-time” property. |
||
Getter for the “objects” property. |
||
Getter for the “operation” property. |
||
Getter for the “progress” property. |
||
Getter for the “progress-valid” property. |
||
Getter for the “start-time” property. |
||
Getter for the “started-by-uid” property. |
||
Handler for the “completed” signal. |
||
Getter for the “bytes” property. |
||
Getter for the “rate” property. |
struct StoragedJobProxy;
The StoragedJobProxy structure contains only private data and should only be accessed using the provided API.
struct StoragedJobProxyClass { GDBusProxyClass parent_class; };
Class structure for StoragedJobProxy.
struct StoragedJobSkeleton;
The StoragedJobSkeleton structure contains only private data and should only be accessed using the provided API.
struct StoragedJobSkeletonClass { GDBusInterfaceSkeletonClass parent_class; };
Class structure for StoragedJobSkeleton.
“bytes”
property “bytes” guint64
Represents the D-Bus property "Bytes".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Flags: Read / Write
Default value: 0
Since: 2.0.0
“cancelable”
property “cancelable” gboolean
Represents the D-Bus property "Cancelable".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Flags: Read / Write
Default value: FALSE
“expected-end-time”
property “expected-end-time” guint64
Represents the D-Bus property "ExpectedEndTime".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Flags: Read / Write
Default value: 0
“objects”
property “objects” GStrv
Represents the D-Bus property "Objects".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Flags: Read / Write
“operation”
property “operation” gchar *
Represents the D-Bus property "Operation".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Flags: Read / Write
Default value: NULL
“progress”
property “progress” gdouble
Represents the D-Bus property "Progress".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Flags: Read / Write
Default value: 0
“progress-valid”
property “progress-valid” gboolean
Represents the D-Bus property "ProgressValid".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Flags: Read / Write
Default value: FALSE
“rate”
property “rate” guint64
Represents the D-Bus property "Rate".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Flags: Read / Write
Default value: 0
Since: 2.0.0
“start-time”
property “start-time” guint64
Represents the D-Bus property "StartTime".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Flags: Read / Write
Default value: 0
“started-by-uid”
property “started-by-uid” guint
Represents the D-Bus property "StartedByUID".
Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
Flags: Read / Write
Default value: 0
“completed”
signalvoid user_function (StoragedJob *object, gboolean arg_success, gchar *arg_message, gpointer user_data)
On the client-side, this signal is emitted whenever the D-Bus signal "Completed" is received.
On the service-side, this signal can be used with e.g. g_signal_emit_by_name()
to make the object emit the D-Bus signal.
object |
A StoragedJob. |
|
arg_success |
Argument. |
|
arg_message |
Argument. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“handle-cancel”
signalgboolean user_function (StoragedJob *object, GDBusMethodInvocation *invocation, GVariant *arg_options, gpointer user_data)
Signal emitted when a remote caller is invoking the Cancel()
D-Bus method.
If a signal handler returns TRUE
, it means the signal handler will handle the invocation (e.g. take a reference to invocation
and eventually call storaged_job_complete_cancel()
or e.g. g_dbus_method_invocation_return_error()
on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD
error is returned.
object |
A StoragedJob. |
|
invocation |
A GDBusMethodInvocation. |
|
arg_options |
Argument passed by remote caller. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last