pre-inst should install 'installer' group rather than the hardcoded plover-gtkui
1 #ifndef __PLOVER_TRANSACTION_HELPER_H__
2 #define __PLOVER_TRANSACTION_HELPER_H__
5 #include <plover/packageset.h>
6 #include <plover/repository.h>
7 #include <plover/transaction.h>
9 #define PLOVER_TYPE_TRANSACTION_HELPER plover_transaction_helper_get_type()
10 #define PLOVER_TRANSACTION_HELPER(obj) G_TYPE_CHECK_INSTANCE_CAST(obj,\
11 PLOVER_TYPE_TRANSACTION_HELPER,\
12 PloverTransactionHelper)
13 #define PLOVER_TRANSACTION_HELPER_CLASS(klass) \
14 G_TYPE_CHECK_CLASS_CAST(klass,\
15 PLOVER_TYPE_TRANSACTION_HELPER,\
16 PloverTransactionHelperClass)
17 #define PLOVER_IS_TRANSACTION_HELPER(obj) \
18 G_TYPE_CHECK_INSTANCE_TYPE(obj,\
19 PLOVER_TYPE_TRANSACTION_HELPER)
20 #define PLOVER_IS_TRANSACTION_HELPER_CLASS(klass) \
21 G_TYPE_CHECK_CLASS_TYPE(obj,\
22 PLOVER_TYPE_TRANSACTION_HELPER)
23 #define PLOVER_TRANSACTION_HELPER_GET_CLASS(obj) \
24 G_TYPE_INSTANCE_GET_CLASS(obj,\
25 PLOVER_TYPE_TRANSACTION_HELPER,\
26 PloverTransactionHelperClass)
29 PLOVER_TRANSACTION_HELPER_REPORT_INSTALL=RAZOR_INSTALL_ACTION_ADD,
30 PLOVER_TRANSACTION_HELPER_REPORT_REMOVE=RAZOR_INSTALL_ACTION_REMOVE,
31 PLOVER_TRANSACTION_HELPER_REPORT_UPDATE
32 } PloverTransactionHelperReportAction;
34 typedef struct _PloverTransactionHelper {
35 GObject parent_instance;
36 PloverPackageSet *alternate_installed,*installed;
37 PloverRepository *upstream;
38 PloverPackageSet *relocated_upstream;
42 gboolean check_vendor;
43 gboolean report_adding_dependencies;
44 gboolean report_removing_dependants;
45 struct plover_vector *report_adding,*report_removing;
48 GtkAssistant *assistant;
51 gchar *error_primary_text;
52 GtkWidget *error_dialog;
53 } PloverTransactionHelper;
55 typedef struct _PloverTransactionHelperClass {
56 GObjectClass parent_class;
57 } PloverTransactionHelperClass;
59 GType plover_transaction_helper_get_type(void);
60 PloverTransactionHelper *plover_transaction_helper_new(GtkBuilder *ui);
62 plover_transaction_helper_get_installed(PloverTransactionHelper *helper);
63 void plover_transaction_helper_set_installed(PloverTransactionHelper *helper,
64 PloverPackageSet *installed);
66 plover_transaction_helper_get_upstream(PloverTransactionHelper *helper,
68 void plover_transaction_helper_set_upstream(PloverTransactionHelper *helper,
69 PloverRepository *upstream);
70 const char *plover_transaction_helper_get_base(PloverTransactionHelper *helper);
71 void plover_transaction_helper_set_base(PloverTransactionHelper *helper,
74 plover_transaction_helper_get_comps(PloverTransactionHelper *helper,
77 plover_transaction_helper_get_prefix(PloverTransactionHelper *helper,
79 void plover_transaction_helper_set_check_vendor(PloverTransactionHelper *helper,
80 gboolean check_vendor);
82 plover_transaction_helper_get_unsatisfied(PloverTransactionHelper *helper);
84 plover_transaction_helper_add_transaction(PloverTransactionHelper *helper,
85 PloverTransaction *transaction,struct plover_vector *report_packages,
86 PloverTransactionHelperReportAction report_action,GError **error);
87 struct plover_vector *plover_transaction_helper_group_get_default_packages(
88 PloverTransactionHelper *helper,const char *group,GError **error);
90 plover_transaction_helper_install_packages(PloverTransactionHelper *helper,
91 struct plover_vector *packages,GError **error);
93 plover_transaction_helper_install_group(PloverTransactionHelper *helper,
94 const char *group,GError **error);
96 plover_transaction_helper_remove_group(PloverTransactionHelper *helper,
97 const char *group,GError **error);
99 plover_transaction_helper_update(PloverTransactionHelper *helper,
101 gboolean plover_transaction_helper_get_visible(PloverTransactionHelper *helper);
102 void plover_transaction_helper_present(PloverTransactionHelper *helper);
103 const char *plover_transaction_helper_get_error(PloverTransactionHelper *helper,
104 const GError **error);
105 void plover_transaction_helper_set_error(PloverTransactionHelper *helper,
106 const GError *error,const char *primary_text);
108 #endif /* __PLOVER_TRANSACTION_HELPER_H__ */