Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

GTaskGenericTask


Data Structures

struct  _GTaskGenericTask
struct  _GTaskGenericTaskClass
struct  _GTaskGenericTaskPrivate

Defines

#define GTASK_GENERIC_TASK_TYPE   (gtask_generic_task_get_type())
#define GTASK_GENERIC_TASK(obj)
#define GTASK_GENERIC_TASK_CLASS(klass)
#define GTASK_IS_GENERIC_TASK(obj)
#define GTASK_IS_GENERIC_TASK_CLASS(klass)
#define GTASK_GENERIC_TASK_GET_CLASS(obj)
#define GTASK_TIME_LEFT_UNKNOWN   -1
#define GTASK_ACTIVITY_STATE_TYPE   (gtask_activity_state_get_type())

Typedefs

typedef _GTaskGenericTask GTaskGenericTask
typedef _GTaskGenericTaskPrivate GTaskGenericTaskPrivate
typedef _GTaskGenericTaskClass GTaskGenericTaskClass

Enumerations

enum  {
  C_PROP_0, C_PROP_APP, C_PROP_ID, C_PROP_TITLE,
  C_PROP_PERCENT, C_PROP_ACTIVITY_STATE, C_PROP_STATUS, C_PROP_ERROR,
  C_PROP_CATEGORY, C_PROP_THUMBNAIL
}
enum  GTaskActivityState { GTASK_ACTIVITY_STATE_ACTIVE = 1 << 0, GTASK_ACTIVITY_STATE_INACTIVE = 1 << 1, GTASK_ACTIVITY_STATE_COMPLETED = 1 << 2 }

Functions

void gtask_generic_task_class_init (GTaskGenericTaskClass *klass)
void gtask_generic_task_init (GTaskGenericTask *gtask)
gboolean gtask_generic_task_fill_xml_doc (GTaskGenericTask *task, xmlDocPtr doc)
 fills the document with at least a root node (task) and any sub elements that need to be sent to

void gtask_generic_task_dispose (GObject *obj)
void gtask_generic_task_finalize (GObject *obj)
void gtask_generic_task_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec)
void gtask_generic_task_get_property (GObject *object, guint param_id, GValue *value, GParamSpec *pspec)
GType gtask_activity_state_get_type ()
GType gtask_generic_task_get_type ()
gboolean gtask_generic_task_serialize_to (GTaskGenericTask *task, GTaskConnection *conn)
 outputs the task to the specified connection

gboolean gtask_generic_task_serialize (GTaskGenericTask *task)
 outputs the task packet to the default connection

GTaskGenericTaskgtask_generic_task_new ()
 creates a new GTaskGenericTask

GTaskGenericTaskgtask_generic_task_new_with_connection_group (GTaskConnectionGroup *conn_group)
 creates a new GTaskGenericTask bound to the passed in GTaskConnection

void gtask_generic_task_set_application (GTaskGenericTask *task, const gchar *app)
 sets the name of the application that is performing the task

const gchar * gtask_generic_task_get_application (GTaskGenericTask *task)
 returns the name of the application that is performing the task

void gtask_generic_task_set_id (GTaskGenericTask *task, const gchar *id)
 sets the id associated with the passed in task

const gchar * gtask_generic_task_get_id (GTaskGenericTask *task)
 returns the id associated with the passed in task

void gtask_generic_task_set_title (GTaskGenericTask *task, const gchar *title)
 sets the title associated with the passed in task

const gchar * gtask_generic_task_get_title (GTaskGenericTask *task)
 Returns the title associated with the passed in task.

void gtask_generic_task_set_thumbnail_uri (GTaskGenericTask *task, const gchar *uri)
 Sets the thumbnail uri of the passed in GTaskGenericTask.

const gchar * gtask_generic_task_get_thumbnail_uri (GTaskGenericTask *task)
 returns the uri of the thumbnail associated with the passed in task

void gtask_generic_task_set_percent_done (GTaskGenericTask *task, gfloat percent)
 sets the percentage of the task that has been completed

gfloat gtask_generic_task_get_percent_done (GTaskGenericTask *task)
 returns the percentage of the task that has been completed

void gtask_generic_task_set_activity_state (GTaskGenericTask *task, GTaskActivityState state)
 sets the activity state of the passed in task

GTaskActivityState gtask_generic_task_get_activity_state (GTaskGenericTask *task)
 returns the activity state of the task

const gchar * gtask_generic_task_get_activity_state_as_string (GTaskGenericTask *task)
 returns the activity state of the task as a lowercase string

void gtask_generic_task_set_activity_state_from_string (GTaskGenericTask *task, const char *state)
 attempts to set the activity state of the task from the passed in string. If the state is unparsable, then the task is marked as GTASK_ACTIVITY_STATE_INACTIVE

void gtask_generic_task_set_status_message (GTaskGenericTask *task, const gchar *msg)
 sets the status message associate with the passed in task

const gchar * gtask_generic_task_get_status_message (GTaskGenericTask *task)
 returns the status message associated with the passed in task

void gtask_generic_task_set_error_message (GTaskGenericTask *task, const gchar *msg)
 sets the error message associated with the passed in task

const gchar * gtask_generic_task_get_error_message (GTaskGenericTask *task)
 returns the error message associated with the passed in task

void gtask_generic_task_set_category (GTaskGenericTask *task, const gchar *cat)
 sets the category of the passed in GTaskGenericTask

const gchar * gtask_generic_task_get_category (GTaskGenericTask *task)
 returns the category of the passed in GTaskGenericTask

void gtask_generic_task_dump (GTaskGenericTask *task)
 Prints out some information about the passed in GTaskGenericTask.

void gtask_generic_task_set_time_left (GTaskGenericTask *task, glong time_left)
 Sets the amount of time left (in seconds) until the passed in GTaskGenericTask will be completed.

glong gtask_generic_task_get_time_left (GTaskGenericTask *task)
 Returns the number of seconds until the passed in GTaskGenericTask will be completed.

void gtask_generic_task_add_file (GTaskGenericTask *task, GTaskFile *file)
 Adds the passed in GTaskFile to the list of GTaskFile's associated with the passed in GTaskGenericTask.

void gtask_generic_task_add_files (GTaskGenericTask *task, GList *files)
 Adds a the GList of GTaskFiles to the passed in GTaskGenericTask.

GList * gtask_generic_task_get_files (GTaskGenericTask *task)
 Returns a GList of GTaskFiles.

void gtask_generic_task_clear_files (GTaskGenericTask *task)
 Removes all GTaskFiles associated with the passed in GTaskGenericTask.

void gtask_generic_task_set_activity_state_from_string (GTaskGenericTask *task, const gchar *state)

Variables

gpointer parent_class

Define Documentation

#define GTASK_ACTIVITY_STATE_TYPE   (gtask_activity_state_get_type())
 

Definition at line 61 of file gtask-generic-task.h.

#define GTASK_GENERIC_TASK obj   ) 
 

Value:

(G_TYPE_CHECK_INSTANCE_CAST( (obj), \
                                            GTASK_GENERIC_TASK_TYPE, \
                                            GTaskGenericTask))
casts the passed in object to a GTaskGenericTask

Definition at line 24 of file gtask-generic-task.h.

#define GTASK_GENERIC_TASK_CLASS klass   ) 
 

Value:

(G_TYPE_CHECK_CLASS_CAST( (klass), \
                                            GTASK_GENERIC_TASK_TYPE, \
                                            GTaskGenericTaskClass ))
casts the passed in object to a GTaskGenericTaskClass

Definition at line 29 of file gtask-generic-task.h.

#define GTASK_GENERIC_TASK_GET_CLASS obj   ) 
 

Value:

(G_TYPE_INSTANCE_GET_CLASS( (obj), \
                                            GTASK_GENERIC_TASK_TYPE, \
                                            GTaskGenericClass ))

Definition at line 47 of file gtask-generic-task.h.

#define GTASK_GENERIC_TASK_TYPE   (gtask_generic_task_get_type())
 

returns a GType of GTaskGenericTask

Definition at line 21 of file gtask-generic-task.h.

#define GTASK_IS_GENERIC_TASK obj   ) 
 

Value:

(G_TYPE_CHECK_INSTANCE_TYPE( (obj), \
                                            GTASK_GENERIC_TASK_TYPE ))
returns TRUE if the passed in object is a GTaskGenericTask, FALSE otherwise

Definition at line 37 of file gtask-generic-task.h.

#define GTASK_IS_GENERIC_TASK_CLASS klass   ) 
 

Value:

(G_TYPE_CHECK_CLASS_TYPE( (klass), \
                                            GTASK_GENERIC_TASK_TYPE ))
returns TRUE if the passed in object is a GTaskGenericTaskClass, FALSE otherwise

Definition at line 44 of file gtask-generic-task.h.

#define GTASK_TIME_LEFT_UNKNOWN   -1
 

Definition at line 59 of file gtask-generic-task.h.


Typedef Documentation

typedef struct _GTaskGenericTask GTaskGenericTask
 

Definition at line 16 of file gtask-generic-task.h.

typedef struct _GTaskGenericTaskClass GTaskGenericTaskClass
 

Definition at line 18 of file gtask-generic-task.h.

typedef struct _GTaskGenericTaskPrivate GTaskGenericTaskPrivate
 

Definition at line 17 of file gtask-generic-task.h.


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
C_PROP_0 
C_PROP_APP 
C_PROP_ID 
C_PROP_TITLE 
C_PROP_PERCENT 
C_PROP_ACTIVITY_STATE 
C_PROP_STATUS 
C_PROP_ERROR 
C_PROP_CATEGORY 
C_PROP_THUMBNAIL 

Definition at line 9 of file gtask-generic-task.c.

enum GTaskActivityState
 

An enumeration of the possible activity states a task may have

Enumeration values:
GTASK_ACTIVITY_STATE_ACTIVE 
GTASK_ACTIVITY_STATE_INACTIVE 
GTASK_ACTIVITY_STATE_COMPLETED 

Definition at line 53 of file gtask-generic-task.h.


Function Documentation

GType gtask_activity_state_get_type void   ) 
 

Definition at line 52 of file gtask-generic-task.c.

void gtask_generic_task_add_file GTaskGenericTask task,
GTaskFile file
 

Adds the passed in GTaskFile to the list of GTaskFile's associated with the passed in GTaskGenericTask.

Attention:
This function will increment the reference count of the passed in GTaskFile.
Parameters:
task a GTaskGenericTask
file a GTaskFile

Definition at line 1048 of file gtask-generic-task.c.

void gtask_generic_task_add_files GTaskGenericTask task,
GList *  files
 

Adds a the GList of GTaskFiles to the passed in GTaskGenericTask.

Attention:
This function will increment the reference count of the passed in GTaskFiles found in the GList.
Parameters:
task a GTaskGenericTask
files a GList whose data elements are of type GTaskFile

Definition at line 1067 of file gtask-generic-task.c.

void gtask_generic_task_class_init GTaskGenericTaskClass klass  )  [static]
 

Definition at line 316 of file gtask-generic-task.c.

void gtask_generic_task_clear_files GTaskGenericTask task  ) 
 

Removes all GTaskFiles associated with the passed in GTaskGenericTask.

Parameters:
task a GTaskGenericTask

Definition at line 1106 of file gtask-generic-task.c.

void gtask_generic_task_dispose GObject *  obj  )  [static]
 

Definition at line 402 of file gtask-generic-task.c.

void gtask_generic_task_dump GTaskGenericTask task  ) 
 

Prints out some information about the passed in GTaskGenericTask.

Parameters:
task a GTaskGenericTask

Definition at line 989 of file gtask-generic-task.c.

gboolean gtask_generic_task_fill_xml_doc GTaskGenericTask task,
xmlDocPtr  doc
[static]
 

fills the document with at least a root node (task) and any sub elements that need to be sent to

Author:
Michael Henson
Parameters:
task a GTaskGenericTask
doc a libxml2 document pointer
Returns:
the success/failure of the operation

Definition at line 179 of file gtask-generic-task.c.

void gtask_generic_task_finalize GObject *  obj  )  [static]
 

Definition at line 424 of file gtask-generic-task.c.

GTaskActivityState gtask_generic_task_get_activity_state GTaskGenericTask task  ) 
 

returns the activity state of the task

Author:
Michael Henson
Parameters:
task a GTaskGenericTask
Returns:
the activity state

Definition at line 807 of file gtask-generic-task.c.

const gchar * gtask_generic_task_get_activity_state_as_string GTaskGenericTask task  ) 
 

returns the activity state of the task as a lowercase string

Attention:
The returned string should be considered read only.
Parameters:
task a GTaskGenericTask
Returns:
the activity status

Definition at line 824 of file gtask-generic-task.c.

const gchar * gtask_generic_task_get_application GTaskGenericTask task  ) 
 

returns the name of the application that is performing the task

Attention:
The returned string should be considered read only.
Author:
Michael Henson
Parameters:
task a GTaskGenericTask
Returns:
the application performing the task (its name)

Definition at line 594 of file gtask-generic-task.c.

const gchar * gtask_generic_task_get_category GTaskGenericTask task  ) 
 

returns the category of the passed in GTaskGenericTask

Attention:
The returned string should be considered read only.
Author:
Michael Henson
Parameters:
task a GTaskGenericTask
Returns:
the category of the task

Definition at line 977 of file gtask-generic-task.c.

const gchar * gtask_generic_task_get_error_message GTaskGenericTask task  ) 
 

returns the error message associated with the passed in task

Attention:
The returned string should be considered read only.
Author:
Michael Henson
Parameters:
task a GTaskGenericTask
Returns:
the error message, or an empty string if there is none

Definition at line 941 of file gtask-generic-task.c.

GList * gtask_generic_task_get_files GTaskGenericTask task  ) 
 

Returns a GList of GTaskFiles.

Attention:
The return GList should be considered read only.
Parameters:
task a GTaskGenericTask
Returns:
a GList of GTaskFiles

Definition at line 1094 of file gtask-generic-task.c.

const gchar * gtask_generic_task_get_id GTaskGenericTask task  ) 
 

returns the id associated with the passed in task

Attention:
The returned string should be considered read only.
Author:
Michael Henson
Parameters:
task a GTaskGenericTask
Returns:
the id of the task

Definition at line 630 of file gtask-generic-task.c.

gfloat gtask_generic_task_get_percent_done GTaskGenericTask task  ) 
 

returns the percentage of the task that has been completed

Author:
Michael Henson
Parameters:
task a GTaskGenericTask
Returns:
the percent completion (between 0.0 and 1.0)

Definition at line 753 of file gtask-generic-task.c.

void gtask_generic_task_get_property GObject *  object,
guint  param_id,
GValue *  value,
GParamSpec *  pspec
[static]
 

Definition at line 485 of file gtask-generic-task.c.

const gchar * gtask_generic_task_get_status_message GTaskGenericTask task  ) 
 

returns the status message associated with the passed in task

Attention:
The returned string should be considered read only.
Author:
Michael Henson
Parameters:
task a GTaskGenericTask
Returns:
the status message or an empty string if there is none

Definition at line 903 of file gtask-generic-task.c.

const gchar * gtask_generic_task_get_thumbnail_uri GTaskGenericTask task  ) 
 

returns the uri of the thumbnail associated with the passed in task

Attention:
The returned string should be considered read only.
Author:
Michael Henson
Parameters:
task a GTaskGenericTask
Returns:
the uri of the thumbnail

Definition at line 702 of file gtask-generic-task.c.

glong gtask_generic_task_get_time_left GTaskGenericTask task  ) 
 

Returns the number of seconds until the passed in GTaskGenericTask will be completed.

Parameters:
task a GTaskGenericTask
Returns:
the number of seconds left

Definition at line 1030 of file gtask-generic-task.c.

const gchar * gtask_generic_task_get_title GTaskGenericTask task  ) 
 

Returns the title associated with the passed in task.

Attention:
The returned string should be considered read only.
Author:
Michael Henson
Parameters:
task a GTaskGenericTask
Returns:
the title of the task

Definition at line 666 of file gtask-generic-task.c.

GType gtask_generic_task_get_type void   ) 
 

Definition at line 69 of file gtask-generic-task.c.

void gtask_generic_task_init GTaskGenericTask gtask  )  [static]
 

Definition at line 95 of file gtask-generic-task.c.

GTaskGenericTask * gtask_generic_task_new void   ) 
 

creates a new GTaskGenericTask

Author:
Michael Henson
Returns:
the new GTaskGenericTask

Definition at line 532 of file gtask-generic-task.c.

GTaskGenericTask * gtask_generic_task_new_with_connection_group GTaskConnectionGroup conn_group  ) 
 

creates a new GTaskGenericTask bound to the passed in GTaskConnection

Attention:
This function will increase the reference count of the passed in GTaskConnectionGroup
Author:
Michael Henson
Parameters:
conn_group a GTaskConnectionGroup
Returns:
the new GTaskGenericTask

Definition at line 549 of file gtask-generic-task.c.

gboolean gtask_generic_task_serialize GTaskGenericTask task  ) 
 

outputs the task packet to the default connection

Author:
Michael Henson
Parameters:
task a GTaskGenericTask
Returns:
the success/failure of the operation

Definition at line 296 of file gtask-generic-task.c.

gboolean gtask_generic_task_serialize_to GTaskGenericTask task,
GTaskConnection conn
 

outputs the task to the specified connection

Author:
Michael Henson
Parameters:
task a GTaskGenericTask
conn a GTaskConnection
Returns:
the success/failure of the operation
Todo:
eventually we need to walk down the class heirarchy and fill this document in a bit

Definition at line 130 of file gtask-generic-task.c.

void gtask_generic_task_set_activity_state GTaskGenericTask task,
GTaskActivityState  state
 

sets the activity state of the passed in task

Attention:
If the passed in activity state is GTASK_ACTIVITY_STATE_COMPLETED then the completed property on all GTaskFiles associated with the GTaskGenericTask will be set to TRUE.
Author:
Michael Henson
Parameters:
task a GTaskGenericTask
status the new activity status

Definition at line 772 of file gtask-generic-task.c.

void gtask_generic_task_set_activity_state_from_string GTaskGenericTask task,
const gchar *  state
 

void gtask_generic_task_set_activity_state_from_string GTaskGenericTask task,
const char *  state
 

attempts to set the activity state of the task from the passed in string. If the state is unparsable, then the task is marked as GTASK_ACTIVITY_STATE_INACTIVE

Author:
Michael Henson
Parameters:
task a GTaskGenericTask
state the activity state to set

Definition at line 852 of file gtask-generic-task.c.

void gtask_generic_task_set_application GTaskGenericTask task,
const gchar *  app
 

sets the name of the application that is performing the task

Author:
Michael Henson
Parameters:
task a GTaskGenericTask
app the name of the application

Definition at line 572 of file gtask-generic-task.c.

void gtask_generic_task_set_category GTaskGenericTask task,
const gchar *  cat
 

sets the category of the passed in GTaskGenericTask

Author:
Michael Henson
Parameters:
task a GTaskGenericTask
cat the category of the task

Definition at line 956 of file gtask-generic-task.c.

void gtask_generic_task_set_error_message GTaskGenericTask task,
const gchar *  msg
 

sets the error message associated with the passed in task

Author:
Michael Henosn
Parameters:
task a GTaskGenericTask
msg the error message to set

Definition at line 918 of file gtask-generic-task.c.

void gtask_generic_task_set_id GTaskGenericTask task,
const gchar *  id
 

sets the id associated with the passed in task

Author:
Michael Henson
Parameters:
task a GTaskGenericTask
id the id of the task

Definition at line 609 of file gtask-generic-task.c.

void gtask_generic_task_set_percent_done GTaskGenericTask task,
gfloat  percent
 

sets the percentage of the task that has been completed

Attention:
If the passed in percentage is greater than 1.0 then the activity state of the GTaskGenericTask will be set to GTASK_ACTIVITY_STATE_ACTIVE which in turn will cause all GTaskFiles associated with the task to have their completed property set to TRUE.
Author:
Michael Henson
Parameters:
task a GTaskGenericTask
percent the percentage of the task that has been completed

Definition at line 723 of file gtask-generic-task.c.

void gtask_generic_task_set_property GObject *  object,
guint  param_id,
const GValue *  value,
GParamSpec *  pspec
[static]
 

Definition at line 447 of file gtask-generic-task.c.

void gtask_generic_task_set_status_message GTaskGenericTask task,
const gchar *  msg
 

sets the status message associate with the passed in task

Author:
Michael Henson
Parameters:
task a GTaskGenericTask
msg the status message to set

Definition at line 881 of file gtask-generic-task.c.

void gtask_generic_task_set_thumbnail_uri GTaskGenericTask task,
const gchar *  uri
 

Sets the thumbnail uri of the passed in GTaskGenericTask.

Parameters:
task a GTaskGenericTask
uri the thumbnail uri

Definition at line 679 of file gtask-generic-task.c.

void gtask_generic_task_set_time_left GTaskGenericTask task,
glong  time_left
 

Sets the amount of time left (in seconds) until the passed in GTaskGenericTask will be completed.

Todo:
perhaps use GTimeVal -- do we really need a higher granularity?
Parameters:
task a GTaskGenericTask
time_left the number of seconds remaining or GTASK_TIME_LEFT_UNKNOWN if the amount of time remaining is unknown

Definition at line 1015 of file gtask-generic-task.c.

void gtask_generic_task_set_title GTaskGenericTask task,
const gchar *  title
 

sets the title associated with the passed in task

Author:
Michael Henson
Parameters:
task a GTaskGenericTask
title the title of the task

Definition at line 645 of file gtask-generic-task.c.


Variable Documentation

gpointer parent_class [static]
 

Definition at line 22 of file gtask-generic-task.c.


Generated on Mon Feb 2 21:26:17 2004 for libgtask by doxygen 1.3.4