2 // Tizen Web Device API
3 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file MessageMMS.cpp
22 #include <PlatformException.h>
24 #include "MessageMMS.h"
25 #include <GlobalContextManager.h>
30 MessageMMS::MessageMMS():
33 LOGD("MessageMMS constructor.");
34 this->m_type = MessageType(MessageType(MMS));
37 MessageMMS::~MessageMMS()
39 LOGD("MessageMMS destructor.");
42 // *** overrided methods
43 void MessageMMS::setCC(std::vector<std::string> &cc)
45 // CC recipient's format validation should be done by email service
49 LOGD("Recipient's list cleared");
54 void MessageMMS::setBCC(std::vector<std::string> &bcc)
56 // BCC recipient's format validation should be done by email service
60 LOGD("Recipient's list cleared");
65 void MessageMMS::setSubject(std::string subject)
70 void MessageMMS::setMessageAttachments(AttachmentPtrVector &attachments)
72 m_attachments = attachments;
74 m_has_attachment = true;
75 if(m_attachments.empty()) {
76 LOGD("Recipient's list cleared");
77 m_has_attachment = false;
81 bool MessageMMS::getHasAttachment() const
83 LOGD("MessageMMS::getHasAttachment()");
84 // TODO: Analyze relation between hasAttachment flag and inlineAttachments
85 return m_has_attachment;