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.
19 * @file ReqReceiverMessage.h
20 * @author Pawel Misiak (p.misiak@samsung.com)
24 #ifndef REQRECEIVERMESSAGE_H
25 #define REQRECEIVERMESSAGE_H
27 #include <dpl/singleton.h>
29 #include "EventSendMessage.h"
30 #include "EventUpdateMessage.h"
31 #include "EventDeleteMessage.h"
32 #include "EventFindMessage.h"
34 namespace WrtDeviceApis {
37 typedef Commons::EventRequestReceiver<EventSendMessage>
38 EventSendMessageReqReceiver;
39 typedef Commons::EventRequestReceiver<EventUpdateMessage>
40 EventUpdateMessageReqReceiver;
41 typedef Commons::EventRequestReceiver<EventDeleteMessage>
42 EventDeleteMessageReqReceiver;
43 typedef Commons::EventRequestReceiver<EventFindMessage>
44 EventFindMessageReqReceiver;
46 class ReqReceiverMessage : public EventSendMessageReqReceiver,
47 public EventUpdateMessageReqReceiver,
48 public EventDeleteMessageReqReceiver,
49 public EventFindMessageReqReceiver
54 ~ReqReceiverMessage();
56 void sendMessage(const EventSendMessagePtr& event);
58 void updateMessage(const EventUpdateMessagePtr& event);
60 void deleteMessage(const EventDeleteMessagePtr& event);
62 void findMessage(const EventFindMessagePtr& event);
65 void OnRequestReceived(const EventSendMessagePtr& event);
67 void OnRequestReceived(const EventUpdateMessagePtr& event);
69 void OnRequestReceived(const EventDeleteMessagePtr& event);
71 void OnRequestReceived(const EventFindMessagePtr& event);
74 typedef DPL::Singleton<ReqReceiverMessage> ReqReceiverMessageSingleton;
78 #endif // REQRECEIVERMESSAGE_H