diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2020-09-21 14:48:37 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2020-09-30 10:46:37 +0300 |
commit | 257077a60c719bf98915c17fa71dc6c68fb0c3e9 (patch) | |
tree | f8a261b0aaaf8bab90bf5ba1fb96612b46d1fce7 /lib/rpmts_internal.h | |
parent | 45449d5acfb8f68eb841fef5eed912fd9d9dc48e (diff) | |
download | rpm-257077a60c719bf98915c17fa71dc6c68fb0c3e9.tar.gz |
Implement a transaction set change notification callback
Add support for an optional callback hook for reveiving notifications
about added and deleted transaction elements. This lets API clients
easily track which elements get created and/or replaced by a single
rpmtsAddFoo() call and adjust their own book-keeping accordingly.
Also makes for an easy place to set application private data pointers
for newly added elements.
Currently there's no way to delete individual transaction elements from
the API but that can happen via rpmtsEmpty(), which we do send notifications
for. rpmtsFree() does NOT send notification though, it would be precarious
and most likely totally pointless to do so when the ts is being torn down.
Diffstat (limited to 'lib/rpmts_internal.h')
-rw-r--r-- | lib/rpmts_internal.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/rpmts_internal.h b/lib/rpmts_internal.h index 8105b19a6..4fd7ea307 100644 --- a/lib/rpmts_internal.h +++ b/lib/rpmts_internal.h @@ -51,6 +51,9 @@ struct rpmts_s { rpmCallbackFunction notify; /*!< Callback function. */ rpmCallbackData notifyData; /*!< Callback private data. */ + rpmtsChangeFunction change; /*!< Change callback function. */ + void *changeData; /*!< Change callback private data. */ + rpmprobFilterFlags ignoreSet; /*!< Bits to filter current problems. */ @@ -123,6 +126,10 @@ RPM_GNUC_INTERNAL rpmRC runScript(rpmts ts, rpmte te, Header h, ARGV_const_t prefixes, rpmScript script, int arg1, int arg2); + +RPM_GNUC_INTERNAL +int rpmtsNotifyChange(rpmts ts, int event, rpmte te, rpmte other); + #ifdef __cplusplus } #endif |