CernVM-FS  2.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
repository_util.h
Go to the documentation of this file.
1 
7 #ifndef CVMFS_PUBLISH_REPOSITORY_UTIL_H_
8 #define CVMFS_PUBLISH_REPOSITORY_UTIL_H_
9 
10 #include <string>
11 
12 #include "hash.h"
13 
14 namespace publish {
15 
17  public:
19  const std::string &t,
20  const std::string &b,
21  const shash::Any &h,
22  const std::string &p)
23  : tag_(t), branch_(b), hash_(h), previous_branch_(p)
24  {}
25 
26  static CheckoutMarker *CreateFrom(const std::string &path);
27  void SaveAs(const std::string &path) const;
28 
29  std::string tag() const { return tag_; }
30  std::string branch() const { return branch_; }
31  shash::Any hash() const { return hash_; }
32  std::string previous_branch() const { return previous_branch_; }
33 
34  private:
35  std::string tag_;
36  std::string branch_;
38  std::string previous_branch_;
39 };
40 
41 
49  public:
50  static bool Acquire(const std::string &path, bool ignore_stale);
51  static void Release(const std::string &path);
52  static bool IsLocked(const std::string &path, bool ignore_stale);
53 };
54 
55 
59 void RunSuidHelper(const std::string &verb, const std::string &fqrn);
60 
61 
66 void SetInConfig(const std::string &path,
67  const std::string &key, const std::string &value);
68 
69 std::string SendTalkCommand(const std::string &socket, const std::string &cmd);
70 
71 } // namespace publish
72 
73 #endif // CVMFS_PUBLISH_REPOSITORY_UTIL_H_
std::string branch() const
std::string tag() const
shash::Any hash() const
std::string previous_branch() const
CheckoutMarker(const std::string &t, const std::string &b, const shash::Any &h, const std::string &p)
void SetInConfig(const std::string &path, const std::string &key, const std::string &value)
static bool Acquire(const std::string &path, bool ignore_stale)
void SaveAs(const std::string &path) const
std::string SendTalkCommand(const std::string &socket, const std::string &cmd)
void RunSuidHelper(const std::string &verb, const std::string &fqrn)
static void Release(const std::string &path)
static bool IsLocked(const std::string &path, bool ignore_stale)
static CheckoutMarker * CreateFrom(const std::string &path)