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 #ifndef WRTPLUGINS_PLATFORM_MESSAGING_SERVICE_MANAGER_H_
23 #define WRTPLUGINS_PLATFORM_MESSAGING_SERVICE_MANAGER_H_
26 #include <dpl/generic_event.h>
27 #include <dpl/shared_ptr.h>
28 #include <dpl/noncopyable.h>
29 //#include <Commons/Emitters.h>
31 #include <API/Messaging/IMessagingServiceManager.h>
32 #include <API/Messaging/MessagingFactory.h>
33 #include <API/Messaging/EmailAccountInfo.h>
39 //DECLARE_GENERIC_EVENT_0(JobDoneEvent)
40 //=============================================================================
41 class MessagingServiceManager:
42 public Api::Messaging::IMessagingServiceManager
45 friend class Api::Messaging::MessagingFactory;
47 virtual ~MessagingServiceManager();
49 //virtual void getMessagingService(const EventGetMessagingServicePtr& event);
50 virtual void getMessagingServiceManager (const Api::Messaging::EventGetMessagingServicePtr& event);
52 static std::vector<Api::Messaging::EmailAccountInfo> m_EmailAccounts;
55 MessagingServiceManager();
56 virtual void OnRequestReceived(const Api::Messaging::EventGetMessagingServicePtr& event);
61 void getMessagingServiceAll(const Api::Messaging::EventGetMessagingServicePtr& event);
62 void getMessagingServiceAccount(const Api::Messaging::EventGetMessagingServicePtr& event);
66 int create_messaging_service();
68 void getEmailAccountList(std::vector<Api::Messaging::EmailAccountInfo>& accounts);
70 std::vector<Api::Messaging::EmailAccountInfo> getEmailAccounts();
75 MessagingServiceManager_ERROR_NONE = 0,
76 MessagingServiceManager_ERROR_INVALID_PARAMETER = 1,
77 MessagingServiceManager_ERROR_PLATFORM_SERVICE_NOT_AVAILABLE = 2,
78 MessagingServiceManager_ERROR_UNKNOWN = 3,
81 int messaging_service_handler; //for test, now temporary.
87 #endif /* WRTPLUGINS_PLATFORM_MESSAGING_SERVICE_MANAGER_H_ */