34e0bcdcf1cef20b77130e7f4682c315b6447610
[framework/web/wrt-plugins-common.git] / src / modules / API / Messaging / Subject.cpp
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.cpp
20  * @author     Pawel Misiak (p.misiak@samsung.com)
21  * @version    0.1
22  * @brief
23  */
24 #include "Subject.h"
25
26 using namespace std;
27
28 namespace WrtDeviceApis {
29 namespace Messaging {
30 namespace Api {
31 Subject::Subject() :
32     m_subject(""),
33     m_validSubject(false)
34 {
35 }
36
37 Subject::~Subject()
38 {
39 }
40
41 void Subject::setSubject(const string& value)
42 {
43     m_validSubject = false;
44     m_subject = value;
45 }
46
47 string Subject::getSubject() const
48 {
49     return m_subject;
50 }
51
52 const std::string& Subject::getSubjectRef() const
53 {
54     return m_subject;
55 }
56
57 bool Subject::isSubjectValid() const
58 {
59     return m_validSubject;
60 }
61
62 void Subject::setSubjectValidity(bool state)
63 {
64     m_validSubject = state;
65 }
66 }}
67 }