ffead.server.doc
Message.h
1 /*
2  Copyright 2009-2012, Sumeet Chhetri
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 */
16 /*
17  * Message.h
18  *
19  * Created on: Sep 21, 2009
20  * Author: sumeet
21  */
22 
23 #ifndef MESSAGE_H_
24 #define MESSAGE_H_
25 #include "Destination.h"
26 
27 #include "InvalidMessageException.h"
28 #include "XmlParser.h"
29 
30 class Message {
31  Destination destination;
32  string timestamp;
33  string type;
34  string priority;
35  string userId;
36  string encoding;
37  string body;
38 public:
39  Message(string);
41  Message();
42  virtual ~Message();
43  Destination getDestination() const;
44  void setDestination(Destination);
45  string getTimestamp() const;
46  void setTimestamp(string);
47  string getType() const;
48  void setType(string);
49  string getPriority() const;
50  void setPriority(string);
51  string getUserId() const;
52  void setUserId(string);
53  string getBody() const;
54  void setBody(string);
55  string getEncoding() const;
56  void setEncoding(string);
57  string toXml();
58 };
59 
60 #endif /* MESSAGE_H_ */