CernVM-FS  2.13.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
messages.h
Go to the documentation of this file.
1 
5 #ifndef CVMFS_NOTIFY_MESSAGES_H_
6 #define CVMFS_NOTIFY_MESSAGES_H_
7 
8 #include <string>
9 
10 namespace notify {
11 
12 namespace msg {
13 
14 enum Version {
16 };
17 
24 class Message {
25  public:
26  virtual void ToJSONString(std::string *s) = 0;
27  virtual bool FromJSONString(const std::string &s) = 0;
28 
29  virtual ~Message() { }
30 };
31 
38 class Activity : public Message {
39  public:
40  Activity();
41  virtual ~Activity();
42 
43  bool operator==(const Activity &other) const;
44 
45  virtual void ToJSONString(std::string *s);
46  virtual bool FromJSONString(const std::string &s);
47 
48  int version_;
49  std::string timestamp_;
50  std::string repository_;
51  std::string manifest_;
52 };
53 
54 } // namespace msg
55 
56 } // namespace notify
57 
58 #endif // CVMFS_NOTIFY_MESSAGES_H_
std::string manifest_
Definition: messages.h:51
virtual bool FromJSONString(const std::string &s)=0
bool operator==(const Activity &other) const
Definition: messages.cc:29
virtual ~Message()
Definition: messages.h:29
virtual void ToJSONString(std::string *s)=0
std::string timestamp_
Definition: messages.h:49
std::string repository_
Definition: messages.h:50
virtual bool FromJSONString(const std::string &s)
Definition: messages.cc:44
virtual ~Activity()
Definition: messages.cc:27
virtual void ToJSONString(std::string *s)
Definition: messages.cc:36