summaryrefslogtreecommitdiff
path: root/src/locker.h
diff options
context:
space:
mode:
authorJohannes Winkelmann <jw@smts.ch>2005-11-09 21:43:05 +0000
committerJohannes Winkelmann <jw@smts.ch>2005-11-09 21:43:05 +0000
commitd8c1e157ab01cb214872b5e4606d92dfd8495650 (patch)
tree806e18cc4cc272e39508d28f8c3839fccfcc7749 /src/locker.h
downloadprt-get-d8c1e157ab01cb214872b5e4606d92dfd8495650.tar.gz
prt-get-d8c1e157ab01cb214872b5e4606d92dfd8495650.tar.xz
introduce svn-typical layout
git-svn-id: https://crux.nu/svn/tools/prt-get/trunk@9 0b5ae1c7-2405-0410-a7fc-ba219f786e1e
Diffstat (limited to 'src/locker.h')
-rw-r--r--src/locker.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/locker.h b/src/locker.h
new file mode 100644
index 0000000..44968cc
--- /dev/null
+++ b/src/locker.h
@@ -0,0 +1,51 @@
+////////////////////////////////////////////////////////////////////////
+// FILE: locker.h
+// AUTHOR: Johannes Winkelmann, jw@tks6.net
+// COPYRIGHT: (c) 2002 by Johannes Winkelmann
+// ---------------------------------------------------------------------
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+////////////////////////////////////////////////////////////////////////
+
+#ifndef _LOCKER_H_
+#define _LOCKER_H_
+
+#include <string>
+#include <vector>
+
+using namespace std;
+
+/**
+ * prt-get can place packages in the locker, which are then not updated
+ * anymore.
+ * Locked packages are:
+ * - marked in prt-get diff
+ * - not shown in prt-get quickdiff
+ * - not updated in prt-get sysup
+ */
+class Locker
+{
+public:
+ Locker();
+
+ bool store();
+
+ bool lock( const string& package );
+ bool unlock( const string& package );
+ bool isLocked( const string& package ) const;
+
+ const vector<string>& lockedPackages() const;
+
+ bool openFailed() const;
+private:
+
+ vector<string> m_packages;
+ static const string LOCKER_FILE;
+ static const string LOCKER_FILE_PATH;
+
+ bool m_openFailed;
+};
+
+#endif /* _LOCKER_H_ */

Generated by cgit