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.
22 * @author Pawel Misiak (p.misiak@samsung.com)
23 * @author Grzegorz Krawczyk (g.krawczyk@samsung.com)
30 #include <API/Messaging/IMms.h>
31 #include <API/Messaging/MmsSlides.h>
33 #include "ISendingObserver.h"
37 #include <MapiTransport.h>
44 class Mms : public Api::Messaging::IMms,
45 public ISendingObserver,
46 public Api::Messaging::MmsSlides
49 explicit Mms(const std::string& id = "");
53 // implementation of interface of IMessage class
54 virtual void update(bool draftsOnly = false);
56 virtual void readAllData();
58 virtual void moveToFolder(const Api::Messaging::FolderType newFolder);
60 virtual void moveToFolder(const std::string& newFolder);
62 virtual void copyToFolder(const Api::Messaging::FolderType newFolder);
64 virtual void copyToFolder(const std::string& newFolder);
66 virtual void remove();
70 virtual void sendingCallback(MSG_SENT_STATUS_S *sent_status);
72 virtual void sendCancel(int handle);
74 virtual bool hasAttachment();
76 void setSendingStatusOk();
78 void setSendingStatusFailed();
80 static Api::Messaging::FolderType toFolder(const std::string &folder);
84 void updatePriority();
86 void updateRecipientList();
90 void updateBodyAndAttachments();
92 void updateReadStatus();
98 void addMessageToDraft();
100 void readPriority(msg_message_t& messageData);
102 void readRecipientList(msg_message_t& messageData);
104 void readSubject(msg_message_t& messageData);
106 void readBodyAndAttachments(msg_message_t& messageData);
108 void readFolder(msg_message_t& messageData);
110 void readDateTime(msg_message_t& messageData);
112 void readReadStatus(msg_message_t& messageData);
114 void createNewMessage();
116 void readExistingMessage();
120 std::string m_bodyFilePath;
122 msg_message_t m_messageData;
125 typedef DPL::SharedPtr<Mms> MmsPtr;