Skip to content

Commit

Permalink
Add get_base() to libdnf::transaction::Transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
kontura authored and jan-kolarik committed Oct 24, 2024
1 parent 47bd21d commit 956c46e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/libdnf5/transaction/transaction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ class LIBDNF_API Transaction {
/// into a `libdnf5::Goal` and replayed.
std::string serialize();

/// @return A `Base` object to which the transaction belongs.
BaseWeakPtr get_base() const;

private:
friend Transformer;
friend libdnf5::base::Transaction;
Expand Down
4 changes: 4 additions & 0 deletions libdnf5/transaction/transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,10 @@ TransactionState Transaction::get_state() const noexcept {
return p_impl->state;
}

BaseWeakPtr Transaction::get_base() const {
return p_impl->base;
}


// Setters
void Transaction::set_id(int64_t value) {
Expand Down

0 comments on commit 956c46e

Please sign in to comment.