00001 #ifndef GTASK_FACTORY_H
00002 #define GTASK_FACTORY_H
00003
00004 #include <glib-2.0/glib-object.h>
00005
00006 #include <gtask/gtask-generic-task.h>
00007 #include <gtask/gtask-connection-group.h>
00008
00011
00012
00013 typedef struct _GTaskFactory GTaskFactory;
00014 typedef struct _GTaskFactoryPrivate GTaskFactoryPrivate;
00015 typedef struct _GTaskFactoryClass GTaskFactoryClass;
00016
00018 #define GTASK_FACTORY_TYPE (gtask_factory_get_type())
00019
00021 #define GTASK_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST( (obj), \
00022 GTASK_FACTORY_TYPE, \
00023 GTaskFactory ))
00024
00026 #define GTASK_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST( (klass), \
00027 GTASK_FACTORY_TYPE, \
00028 GTaskFactoryClass ))
00029
00034 #define GTASK_IS_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE( (obj), \
00035 GTASK_FACTORY_TYPE ))
00036
00041 #define GTASK_IS_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE( (klass), \
00042 GTASK_FACTORY_TYPE ))
00043
00044 #define GTASK_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS( (obj), \
00045 GTASK_FACTORY_TYPE, \
00046 GTaskFactoryClass ))
00047
00048 struct _GTaskFactory {
00049 GObject parent;
00050 GTaskFactoryPrivate *private;
00051 };
00052
00053 struct _GTaskFactoryPrivate {
00054 GTaskConnectionGroup *conn_group;
00055 GString *application;
00056 GString *program;
00057 guint last_task_id;
00058 gboolean dispose_has_run;
00059 };
00060
00061 struct _GTaskFactoryClass {
00062 GObjectClass parent;
00063 };
00064
00065 GType gtask_factory_get_type( void );
00066
00067 GTaskFactory *
00068 gtask_factory_new( void );
00069
00070 GTaskFactory *
00071 gtask_factory_new_with_resources( GTaskConnectionGroup *conn_group,
00072 const gchar *program,
00073 const gchar *application );
00074
00075 const gchar *
00076 gtask_factory_get_program( GTaskFactory *factory );
00077
00078 void
00079 gtask_factory_set_program( GTaskFactory *factory, const gchar *program );
00080
00081 const gchar *
00082 gtask_factory_get_application( GTaskFactory *factory );
00083
00084 void
00085 gtask_factory_set_application( GTaskFactory *factory, const gchar *application );
00086
00087 GTaskGenericTask *
00088 gtask_factory_create_task( GTaskFactory *factory, gchar *task_type );
00089
00090 GTaskConnectionGroup *
00091 gtask_factory_get_connection_group( GTaskFactory *factory );
00092
00093 void
00094 gtask_factory_set_connection_group( GTaskFactory *factory,
00095 GTaskConnectionGroup *conn_group );
00096
00097
00098
00099 #endif