2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 * @file MessageFilter.h
20 * @author Pawel Misiak (p.misiak@samsung.com)
24 #ifndef MESSAGEFILTER_H
25 #define MESSAGEFILTER_H
28 #include <dpl/shared_ptr.h>
31 #include "MessagePriority.h"
32 #include "Recipient.h"
37 namespace WrtDeviceApis {
40 //--------------------------------------------------------------------------
44 typedef DPL::SharedPtr<MessageFilter> MessageFilterPtr;
54 bool m_startTimeCheck;
68 std::string m_subject;
80 MessagePriority::Priority m_messagePriority;
81 bool m_messagePriorityCheck;
86 * constructor of messageFilter
90 virtual ~MessageFilter();
92 void setMsgId(const std::string& value);
94 void setTo(const Recipients& value); // the same as destination address
96 void setCc(const Recipients& value);
98 void setBcc(const Recipients& value);
100 void setSubject(const std::string& value);
102 void setBody(const std::string& value);
104 void setFrom(const std::string& value); //email account from email was sent
106 void setStartTime(const time_t& value);
108 void setEndTime(const time_t& value);
110 void setIsRead(bool value);
112 void setMessagePriority(const MessagePriority::Priority& value);
114 bool isValid() const;
116 bool compare(const ISmsPtr& msg) const;
118 bool compare(const IMmsPtr& msg) const;
120 bool compare(const IEmailPtr& msg) const;
123 pcrecpp::RE reCreate(const std::string& value) const;
125 bool idCheck(const std::string& value) const;
127 bool timeCheck(tm value) const;
129 bool bodyCheck(const std::string& value) const;
131 bool toCheck(const Recipients& value) const;
133 bool ccCheck(const Recipients& value) const;
135 bool bccCheck(const Recipients& value) const;
137 bool recipientCheck(const Recipients& filter,
138 const Recipients& value) const;
140 bool fromCheck(const std::string& value) const;
142 bool subjectCheck(const std::string& value) const;
144 bool isReadCheck(bool value) const;
146 bool priorityCheck(MessagePriority::Priority value) const;