f19967666d3667d8f223d3d4cc27a319cb940f52
[framework/web/wrt-plugins-common.git] / src / modules / API / Messaging / Subject.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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  *
18  *
19  * @file       Subject.h
20  * @author     Pawel Misiak (p.misiak@samsung.com)
21  * @version    0.1
22  * @brief
23  */
24 #ifndef SUBJECT_H
25 #define SUBJECT_H
26
27 #include <string>
28 #include "IMessagingTypes.h"
29
30 namespace WrtDeviceApis {
31 namespace Messaging {
32 namespace Api {
33 //--------------------------------------------------------------------------
34
35 class Subject
36 {
37   private:   // fields
38     /**
39      * abstract subject value of message
40      */
41     std::string m_subject;
42
43     /**
44      * information if abstract message body has been changed and need update
45      * in low level
46      */
47     bool m_validSubject;
48
49   public:   // methods
50
51     Subject();
52
53     virtual ~Subject();
54
55     /**
56      * setter of subject value
57      */
58     void setSubject(const std::string& value);
59
60     /**
61      * getter of subject value
62      */
63     std::string getSubject() const;
64
65     /**
66      * getter of subject value
67      */
68     const std::string& getSubjectRef() const;
69
70     /**
71      * check validity state
72      */
73     bool isSubjectValid() const;
74
75     /**
76      * setter for validity state
77      */
78     void setSubjectValidity(bool state);
79 };
80 }
81 }
82 }
83 #endif