ali@24: #ifndef __PLOVER_TRANSACTION_HELPER_H__ ali@24: #define __PLOVER_TRANSACTION_HELPER_H__ ali@24: ali@24: #include ali@24: #include ali@24: #include ali@24: #include ali@24: ali@24: #define PLOVER_TYPE_TRANSACTION_HELPER plover_transaction_helper_get_type() ali@24: #define PLOVER_TRANSACTION_HELPER(obj) G_TYPE_CHECK_INSTANCE_CAST(obj,\ ali@24: PLOVER_TYPE_TRANSACTION_HELPER,\ ali@24: PloverTransactionHelper) ali@24: #define PLOVER_TRANSACTION_HELPER_CLASS(klass) \ ali@24: G_TYPE_CHECK_CLASS_CAST(klass,\ ali@24: PLOVER_TYPE_TRANSACTION_HELPER,\ ali@24: PloverTransactionHelperClass) ali@24: #define PLOVER_IS_TRANSACTION_HELPER(obj) \ ali@24: G_TYPE_CHECK_INSTANCE_TYPE(obj,\ ali@24: PLOVER_TYPE_TRANSACTION_HELPER) ali@24: #define PLOVER_IS_TRANSACTION_HELPER_CLASS(klass) \ ali@24: G_TYPE_CHECK_CLASS_TYPE(obj,\ ali@24: PLOVER_TYPE_TRANSACTION_HELPER) ali@24: #define PLOVER_TRANSACTION_HELPER_GET_CLASS(obj) \ ali@24: G_TYPE_INSTANCE_GET_CLASS(obj,\ ali@24: PLOVER_TYPE_TRANSACTION_HELPER,\ ali@24: PloverTransactionHelperClass) ali@24: ali@38: typedef enum { ali@38: PLOVER_TRANSACTION_HELPER_REPORT_INSTALL=RAZOR_INSTALL_ACTION_ADD, ali@38: PLOVER_TRANSACTION_HELPER_REPORT_REMOVE=RAZOR_INSTALL_ACTION_REMOVE, ali@38: PLOVER_TRANSACTION_HELPER_REPORT_UPDATE ali@38: } PloverTransactionHelperReportAction; ali@38: ali@24: typedef struct _PloverTransactionHelper { ali@24: GObject parent_instance; ali@24: PloverPackageSet *installed; ali@24: PloverRepository *upstream; ali@24: PloverPackageSet *relocated_upstream; ali@24: gchar *base; ali@24: gchar *unsatisfied; ali@24: struct comps *comps; ali@24: gboolean check_vendor; ali@24: gboolean report_adding_dependencies; ali@24: gboolean report_removing_dependants; ali@24: struct plover_vector *report_adding,*report_removing; ali@24: GSList *transactions; ali@24: GtkBuilder *ui; ali@24: GtkAssistant *assistant; ali@24: guint pulse_handler; ali@24: GError *error; ali@24: gchar *error_primary_text; ali@24: GtkWidget *error_dialog; ali@24: } PloverTransactionHelper; ali@24: ali@24: typedef struct _PloverTransactionHelperClass { ali@24: GObjectClass parent_class; ali@24: } PloverTransactionHelperClass; ali@24: ali@24: GType plover_transaction_helper_get_type(void); ali@24: PloverTransactionHelper *plover_transaction_helper_new(GtkBuilder *ui); ali@24: PloverPackageSet * ali@24: plover_transaction_helper_get_installed(PloverTransactionHelper *helper); ali@24: void plover_transaction_helper_set_installed(PloverTransactionHelper *helper, ali@24: PloverPackageSet *installed); ali@24: PloverRepository * ali@24: plover_transaction_helper_get_upstream(PloverTransactionHelper *helper, ali@24: GError **error); ali@24: void plover_transaction_helper_set_upstream(PloverTransactionHelper *helper, ali@24: PloverRepository *upstream); ali@24: const char *plover_transaction_helper_get_base(PloverTransactionHelper *helper); ali@24: void plover_transaction_helper_set_base(PloverTransactionHelper *helper, ali@24: const char *base); ali@24: struct comps * ali@24: plover_transaction_helper_get_comps(PloverTransactionHelper *helper, ali@24: GError **error); ali@24: const char * ali@24: plover_transaction_helper_get_prefix(PloverTransactionHelper *helper, ali@24: GError **error); ali@24: void plover_transaction_helper_set_check_vendor(PloverTransactionHelper *helper, ali@24: gboolean check_vendor); ali@24: const char * ali@24: plover_transaction_helper_get_unsatisfied(PloverTransactionHelper *helper); ali@24: gboolean ali@24: plover_transaction_helper_add_transaction(PloverTransactionHelper *helper, ali@24: PloverTransaction *transaction,struct plover_vector *report_packages, ali@38: PloverTransactionHelperReportAction report_action,GError **error); ali@24: struct plover_vector *plover_transaction_helper_group_get_default_packages( ali@24: PloverTransactionHelper *helper,const char *group,GError **error); ali@24: gboolean ali@24: plover_transaction_helper_install_packages(PloverTransactionHelper *helper, ali@24: struct plover_vector *packages,GError **error); ali@24: gboolean ali@24: plover_transaction_helper_install_group(PloverTransactionHelper *helper, ali@24: const char *group,GError **error); ali@24: gboolean ali@24: plover_transaction_helper_remove_group(PloverTransactionHelper *helper, ali@24: const char *group,GError **error); ali@24: gboolean ali@24: plover_transaction_helper_update(PloverTransactionHelper *helper, ali@24: GError **error); ali@24: gboolean plover_transaction_helper_get_visible(PloverTransactionHelper *helper); ali@24: void plover_transaction_helper_present(PloverTransactionHelper *helper); ali@24: const char *plover_transaction_helper_get_error(PloverTransactionHelper *helper, ali@24: const GError **error); ali@24: void plover_transaction_helper_set_error(PloverTransactionHelper *helper, ali@24: const GError *error,const char *primary_text); ali@24: ali@24: #endif /* __PLOVER_TRANSACTION_HELPER_H__ */