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.
20 * @author Pawel Misiak (p.misiak@samsung.com)
21 * @author Grzegorz Krawczyk (g.krawczyk@samsung.com)
28 #include <API/Messaging/IMms.h>
29 #include <API/Messaging/MmsSlides.h>
31 #include "ISendingObserver.h"
35 #include <MapiTransport.h>
38 namespace WrtDeviceApis {
40 class Mms : public Api::IMms,
41 public ISendingObserver,
45 explicit Mms(const std::string& id = "");
49 // implementation of interface of IMessage class
50 virtual void update(bool draftsOnly = false);
52 virtual void readAllData();
54 virtual void moveToFolder(const Api::FolderType newFolder);
56 virtual void moveToFolder(const std::string& newFolder);
58 virtual void copyToFolder(const Api::FolderType newFolder);
60 virtual void copyToFolder(const std::string& newFolder);
62 virtual void remove();
66 virtual void sendingCallback(MSG_SENT_STATUS_S *sent_status);
68 virtual void sendCancel();
70 void setSendingStatusOk();
72 void setSendingStatusFailed();
74 static Api::FolderType toFolder(const std::string &folder);
78 void updatePriority();
80 void updateRecipientList();
84 void updateBodyAndAttachments();
86 void updateReadStatus();
88 void readPriority(msg_message_t& messageData);
90 void readRecipientList(msg_message_t& messageData);
92 void readSubject(msg_message_t& messageData);
94 void readBodyAndAttachments(msg_message_t& messageData);
96 void readFolder(msg_message_t& messageData);
98 void readDateTime(msg_message_t& messageData);
100 void readReadStatus(msg_message_t& messageData);
102 void createNewMessage();
104 void readExistingMessage();
108 std::string m_bodyFilePath;
110 msg_message_t m_messageData;
113 typedef DPL::SharedPtr<Mms> MmsPtr;