4 #include <rpm/rpmutil.h>
5 #include "lib/rpmscript.h"
10 unsigned int priority;
13 typedef struct rpmtriggers_s {
14 struct triggerInfo_s *triggerInfo;
25 rpmtriggers rpmtriggersCreate(unsigned int hint);
28 rpmtriggers rpmtriggersFree(rpmtriggers triggers);
31 * Prepare post trans uninstall file triggers. After transcation uninstalled
32 * files are not saved anywhere. So we need during uninstalation of every
33 * package, in time when the files to uninstall are still available,
34 * to determine and store triggers that should be set off after transaction.
37 void rpmtriggersPrepPostUnTransFileTrigs(rpmts ts, rpmte te);
39 /* Run triggers stored in ts */
41 int runPostUnTransFileTrigs(rpmts ts);
44 * It runs file triggers in other package(s) this package/transaction sets off.
45 * If tm is RPMSCRIPT_FILETRIGGERSCRIPT then it runs file triggers that are
46 * fired by files in transaction entry. If tm is RPMSCRIPT_TRANSFILETRIGGERSCRIPT
47 * then it runs file triggers that are fired by all files in transaction set.
48 * In that case te can be NULL.
50 * @param ts transaction set
51 * @param te transaction entry
52 * @param sense defines which triggers should be set off (triggerin,
53 * triggerun, triggerpostun)
54 * @param tm trigger mode, (filetrigger/transfiletrigger)
55 * @param priorityClass 1 to run triggers that should be executed before
57 * 2 to run triggers that should be executed after
59 * 0 to run all triggers
62 rpmRC runFileTriggers(rpmts ts, rpmte te, rpmsenseFlags sense,
63 rpmscriptTriggerModes tm, int priorityClass);
65 /* Run file triggers in this te other package(s) set off.
66 * @param ts transaction set
67 * @param te transaction entry
68 * @param sense defines which triggers should be set off (triggerin,
69 * triggerun, triggerpostun)
70 * @param tm trigger mode, (filetrigger/transfiletrigger)
71 * @param priorityClass 1 to run triggers that should be executed before
73 * 2 to run triggers that should be executed after
75 * 0 to run all triggers
78 rpmRC runImmedFileTriggers(rpmts ts, rpmte te, rpmsenseFlags sense,
79 rpmscriptTriggerModes tm, int priorityClass);
83 #endif /* _RPMTRIGGERS_H */