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)
27 #include <dpl/shared_ptr.h>
28 #include "IMessagingTypes.h"
30 #include "IBinarySms.h"
33 #include "VirtualMessage.h"
34 #include "MessageFactory.h"
35 #include "IEmailAccount.h"
36 #include "MessageFilter.h"
37 #include "EmitterMessageReceived.h"
39 namespace WrtDeviceApis {
42 class IMessaging : private DPL::Noncopyable,
46 static IMessaging& getInstance();
49 virtual ~IMessaging() = 0;
51 virtual void getNumberOfMessages(MessageType msgType,
56 virtual std::vector<IMessagePtr> findMessages(
57 const std::vector<MessageType>& msgTypes,
59 const Api::MessageFilterPtr& filter) = 0;
61 virtual std::vector<IMessagePtr> findMessages(
62 const std::vector<MessageType>& msgTypes,
63 const std::string &folder,
64 const Api::MessageFilterPtr& filter) = 0;
66 virtual std::vector<std::string> getMessageIds(MessageType msgType,
67 FolderType folder) = 0;
69 virtual void createFolder(MessageType msgType,
70 const std::string& userFolder) = 0;
72 virtual void deleteFolder(MessageType msgType,
73 const std::string& userFolder) = 0;
75 virtual std::vector<std::string> getFolderNames(MessageType msgType) = 0;
77 virtual void addOnMessageReceived(const EmitterMessageReceivedPtr& emitter)
80 virtual void removeOnMessageReceived(EmitterMessageReceived::IdType id) = 0;
82 virtual void fetchEmailHeaders() = 0;