StoragedBaseJob

StoragedBaseJob — Base class for jobs.

Synopsis

                    StoragedBaseJob;
struct              StoragedBaseJobClass;
StoragedDaemon *    storaged_base_job_get_daemon        (StoragedBaseJob *job);
GCancellable *      storaged_base_job_get_cancellable   (StoragedBaseJob *job);
gboolean            storaged_base_job_get_auto_estimate (StoragedBaseJob *job);
void                storaged_base_job_set_auto_estimate (StoragedBaseJob *job,
                                                         gboolean value);
void                storaged_base_job_add_object        (StoragedBaseJob *job,
                                                         StoragedObject *object);
void                storaged_base_job_remove_object     (StoragedBaseJob *job,
                                                         StoragedObject *object);

Object Hierarchy

  GObject
   +----GDBusInterfaceSkeleton
         +----StoragedJobSkeleton
               +----StoragedBaseJob
                     +----StoragedSpawnedJob
                     +----StoragedThreadedJob
                     +----StoragedSimpleJob

Implemented Interfaces

StoragedBaseJob implements GDBusInterface and StoragedJob.

Properties

  "auto-estimate"            gboolean              : Read / Write
  "cancellable"              GCancellable*         : Read / Write / Construct Only
  "daemon"                   StoragedDaemon*       : Read / Write / Construct Only

Description

This type provides common features needed by all job types.

Details

StoragedBaseJob

typedef struct _StoragedBaseJob StoragedBaseJob;

The StoragedBaseJob structure contains only private data and should only be accessed using the provided API.


struct StoragedBaseJobClass

struct StoragedBaseJobClass {
  StoragedJobSkeletonClass parent_class;
};

Class structure for StoragedBaseJob.

StoragedJobSkeletonClass parent_class;

Parent class.

storaged_base_job_get_daemon ()

StoragedDaemon *    storaged_base_job_get_daemon        (StoragedBaseJob *job);

Gets the StoragedDaemon for job.

job :

A StoragedBaseJob.

Returns :

A StoragedDaemon. Do not free, the object belongs to job.

storaged_base_job_get_cancellable ()

GCancellable *      storaged_base_job_get_cancellable   (StoragedBaseJob *job);

Gets the GCancellable for job.

job :

A StoragedBaseJob.

Returns :

A GCancellable. Do not free, the object belongs to job.

storaged_base_job_get_auto_estimate ()

gboolean            storaged_base_job_get_auto_estimate (StoragedBaseJob *job);

Gets whether auto-estimation is being used.

job :

A StoragedBaseJob.

Returns :

TRUE if auto-estimation is being used, FALSE otherwise.

storaged_base_job_set_auto_estimate ()

void                storaged_base_job_set_auto_estimate (StoragedBaseJob *job,
                                                         gboolean value);

Sets whether auto-estimation is being used.

job :

A StoragedBaseJob.

value :

TRUE if auto-estimation is to be use, FALSE otherwise.

storaged_base_job_add_object ()

void                storaged_base_job_add_object        (StoragedBaseJob *job,
                                                         StoragedObject *object);

Adds the object path for object to the Objects array. If the object path is already in the array, does nothing.

job :

A StoragedBaseJob.

object :

A StoragedObject.

storaged_base_job_remove_object ()

void                storaged_base_job_remove_object     (StoragedBaseJob *job,
                                                         StoragedObject *object);

Removes the object path for object to the Objects array. If the object path is not in the array, does nothing.

job :

A StoragedBaseJob.

object :

A StoragedObject.

Property Details

The "auto-estimate" property

  "auto-estimate"            gboolean              : Read / Write

If TRUE, the "expected-end-time" property will be automatically updated every time the "progress" property is updated.

Default value: FALSE


The "cancellable" property

  "cancellable"              GCancellable*         : Read / Write / Construct Only

The GCancellable to use.


The "daemon" property

  "daemon"                   StoragedDaemon*       : Read / Write / Construct Only

The StoragedDaemon the object is for.