summaryrefslogtreecommitdiff
path: root/apt-pkg/statechanges.h
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/statechanges.h')
-rw-r--r--apt-pkg/statechanges.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/apt-pkg/statechanges.h b/apt-pkg/statechanges.h
index fa60c5864..1eaf21a3a 100644
--- a/apt-pkg/statechanges.h
+++ b/apt-pkg/statechanges.h
@@ -14,14 +14,20 @@ class APT_PUBLIC StateChanges
{
public:
// getter/setter for the different states
- APT::VersionVector& Hold();
- void Hold(pkgCache::VerIterator const &Ver);
- APT::VersionVector& Unhold();
- void Unhold(pkgCache::VerIterator const &Ver);
+#define APT_GETTERSETTER(Name) \
+ APT::VersionVector& Name(); \
+ void Name(pkgCache::VerIterator const &Ver)
+ APT_GETTERSETTER(Hold);
+ APT_GETTERSETTER(Unhold);
+ APT_GETTERSETTER(Install);
+ APT_GETTERSETTER(Remove);
+ APT_GETTERSETTER(Purge);
APT::VersionVector& Error();
+#undef APT_GETTERSETTER
- // forgets all unsaved changes
- void Discard();
+ // operate on all containers at once
+ void clear();
+ bool empty() const;
/** commit the staged changes to the database(s).
*