10a6404b0d6b2f3c57576b7b034d50d651ad0b51
[platform/framework/web/wrt-plugins-tizen.git] / src / Messaging / EventMessageReceived.h
1 //
2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 #ifndef WRTPLUGINS_MESSAGING_EVENTMESSAGERECEIVED_H_
19 #define WRTPLUGINS_MESSAGING_EVENTMESSAGERECEIVED_H_
20
21 #include <dpl/shared_ptr.h>
22 #include <Commons/ListenerEvent.h>
23 #include "IMessage.h"
24 #include "IConversation.h"
25 #include "IMessageFolder.h"
26
27 namespace DeviceAPI {
28 namespace Messaging {
29
30 class EventMessageReceived : public WrtDeviceApis::Commons::ListenerEvent<
31         EventMessageReceived>
32 {
33   public:
34     typedef enum
35     {
36           MSG_ADDED = 0,
37           MSG_UPDATED = 1,
38           MSG_DELETED = 2,
39           MSG_MULTIPLE = 3,
40     } Msg_EventType;
41
42     virtual ~EventMessageReceived();
43
44     IMessagePtr getMessage() const;
45     IConversationPtr getConversation() const;
46     IMessageFolderPtr getMessageFolder() const;
47         
48     void setMessage(const IMessagePtr& message);
49     void setConversation(const IConversationPtr &conversation);
50     void setMessageFolder(const IMessageFolderPtr &messagefolder);
51
52     void setMsg_Event_Type(Msg_EventType state);
53     Msg_EventType getMsg_Event_Type() {   return m_msg_event_type;}
54
55
56   private:
57     IConversationPtr m_conversation;
58     IMessagePtr m_message;
59     IMessageFolderPtr m_messagefolder;  
60     Msg_EventType m_msg_event_type;
61         
62 };
63
64 typedef DPL::SharedPtr<EventMessageReceived> EventMessageReceivedPtr;
65 } // Messaging
66 } // DeviceAPI
67 #endif // WRTPLUGINS_MESSAGING_EVENTMESSAGERECEIVED_H_