diff -r 000000000000 -r 99d80cbe2eb4 plover-gtk/transactionhelper.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plover-gtk/transactionhelper.h Mon Apr 18 15:04:47 2016 +0100 @@ -0,0 +1,102 @@ +#ifndef __PLOVER_TRANSACTION_HELPER_H__ +#define __PLOVER_TRANSACTION_HELPER_H__ + +#include +#include +#include +#include + +#define PLOVER_TYPE_TRANSACTION_HELPER plover_transaction_helper_get_type() +#define PLOVER_TRANSACTION_HELPER(obj) G_TYPE_CHECK_INSTANCE_CAST(obj,\ + PLOVER_TYPE_TRANSACTION_HELPER,\ + PloverTransactionHelper) +#define PLOVER_TRANSACTION_HELPER_CLASS(klass) \ + G_TYPE_CHECK_CLASS_CAST(klass,\ + PLOVER_TYPE_TRANSACTION_HELPER,\ + PloverTransactionHelperClass) +#define PLOVER_IS_TRANSACTION_HELPER(obj) \ + G_TYPE_CHECK_INSTANCE_TYPE(obj,\ + PLOVER_TYPE_TRANSACTION_HELPER) +#define PLOVER_IS_TRANSACTION_HELPER_CLASS(klass) \ + G_TYPE_CHECK_CLASS_TYPE(obj,\ + PLOVER_TYPE_TRANSACTION_HELPER) +#define PLOVER_TRANSACTION_HELPER_GET_CLASS(obj) \ + G_TYPE_INSTANCE_GET_CLASS(obj,\ + PLOVER_TYPE_TRANSACTION_HELPER,\ + PloverTransactionHelperClass) + +typedef struct _PloverTransactionHelper { + GObject parent_instance; + PloverPackageSet *installed; + PloverRepository *upstream; + PloverPackageSet *relocated_upstream; + gchar *base; + gchar *unsatisfied; + struct comps *comps; + gboolean check_vendor; + gboolean report_adding_dependencies; + gboolean report_removing_dependants; + struct plover_vector *report_adding,*report_removing; + GSList *transactions; + GtkBuilder *ui; + GtkAssistant *assistant; + guint pulse_handler; + GError *error; + gchar *error_primary_text; + GtkWidget *error_dialog; +} PloverTransactionHelper; + +typedef struct _PloverTransactionHelperClass { + GObjectClass parent_class; +} PloverTransactionHelperClass; + +GType plover_transaction_helper_get_type(void); +PloverTransactionHelper *plover_transaction_helper_new(GtkBuilder *ui); +PloverPackageSet * + plover_transaction_helper_get_installed(PloverTransactionHelper *helper); +void plover_transaction_helper_set_installed(PloverTransactionHelper *helper, + PloverPackageSet *installed); +PloverRepository * + plover_transaction_helper_get_upstream(PloverTransactionHelper *helper, + GError **error); +void plover_transaction_helper_set_upstream(PloverTransactionHelper *helper, + PloverRepository *upstream); +const char *plover_transaction_helper_get_base(PloverTransactionHelper *helper); +void plover_transaction_helper_set_base(PloverTransactionHelper *helper, + const char *base); +struct comps * + plover_transaction_helper_get_comps(PloverTransactionHelper *helper, + GError **error); +const char * + plover_transaction_helper_get_prefix(PloverTransactionHelper *helper, + GError **error); +void plover_transaction_helper_set_check_vendor(PloverTransactionHelper *helper, + gboolean check_vendor); +const char * + plover_transaction_helper_get_unsatisfied(PloverTransactionHelper *helper); +gboolean + plover_transaction_helper_add_transaction(PloverTransactionHelper *helper, + PloverTransaction *transaction,struct plover_vector *report_packages, + enum razor_install_action report_action,GError **error); +struct plover_vector *plover_transaction_helper_group_get_default_packages( + PloverTransactionHelper *helper,const char *group,GError **error); +gboolean + plover_transaction_helper_install_packages(PloverTransactionHelper *helper, + struct plover_vector *packages,GError **error); +gboolean + plover_transaction_helper_install_group(PloverTransactionHelper *helper, + const char *group,GError **error); +gboolean + plover_transaction_helper_remove_group(PloverTransactionHelper *helper, + const char *group,GError **error); +gboolean + plover_transaction_helper_update(PloverTransactionHelper *helper, + GError **error); +gboolean plover_transaction_helper_get_visible(PloverTransactionHelper *helper); +void plover_transaction_helper_present(PloverTransactionHelper *helper); +const char *plover_transaction_helper_get_error(PloverTransactionHelper *helper, + const GError **error); +void plover_transaction_helper_set_error(PloverTransactionHelper *helper, + const GError *error,const char *primary_text); + +#endif /* __PLOVER_TRANSACTION_HELPER_H__ */