Update change log and spec for wrt-plugins-tizen_0.2.73
[profile/ivi/wrt-plugins-tizen.git] / src / platform / Tizen / Messaging / MessagingServiceManager.h
1 /*
2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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. 
15 */
16
17
18 /*
19  * @author
20  */
21
22 #ifndef WRTPLUGINS_PLATFORM_MESSAGING_SERVICE_MANAGER_H_
23 #define WRTPLUGINS_PLATFORM_MESSAGING_SERVICE_MANAGER_H_
24
25 #include <map>
26 #include <dpl/generic_event.h>
27 #include <dpl/shared_ptr.h>
28 #include <dpl/noncopyable.h>
29 //#include <Commons/Emitters.h>
30
31 #include <API/Messaging/IMessagingServiceManager.h>
32 #include <API/Messaging/MessagingFactory.h>
33 #include <API/Messaging/EmailAccountInfo.h>
34
35 namespace TizenApis {
36 namespace Platform {
37 namespace Messaging {
38
39 //DECLARE_GENERIC_EVENT_0(JobDoneEvent)
40 //=============================================================================
41 class MessagingServiceManager: 
42    public Api::Messaging::IMessagingServiceManager
43 {
44
45     friend class Api::Messaging::MessagingFactory;
46 public:
47         virtual ~MessagingServiceManager();
48
49         //virtual void getMessagingService(const EventGetMessagingServicePtr& event);
50         virtual void getMessagingServiceManager (const Api::Messaging::EventGetMessagingServicePtr& event);
51         
52         static std::vector<Api::Messaging::EmailAccountInfo> m_EmailAccounts;
53         
54 protected:
55         MessagingServiceManager();
56         virtual void OnRequestReceived(const Api::Messaging::EventGetMessagingServicePtr& event);
57
58 private:
59         
60 #if 0   
61         void getMessagingServiceAll(const Api::Messaging::EventGetMessagingServicePtr& event);
62         void getMessagingServiceAccount(const Api::Messaging::EventGetMessagingServicePtr& event);
63 #endif
64
65         void initialize();
66         int create_messaging_service();
67 #if 0
68         void getEmailAccountList(std::vector<Api::Messaging::EmailAccountInfo>& accounts);
69 #endif
70         std::vector<Api::Messaging::EmailAccountInfo> getEmailAccounts();
71
72         bool m_initialized;
73         
74         enum {
75                 MessagingServiceManager_ERROR_NONE = 0,
76                 MessagingServiceManager_ERROR_INVALID_PARAMETER = 1,
77                 MessagingServiceManager_ERROR_PLATFORM_SERVICE_NOT_AVAILABLE = 2,
78                 MessagingServiceManager_ERROR_UNKNOWN = 3,
79         };
80
81         int messaging_service_handler;          //for test, now temporary.
82 };
83
84 }
85 }
86 }
87 #endif /* WRTPLUGINS_PLATFORM_MESSAGING_SERVICE_MANAGER_H_ */