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.
21 #include <dpl/application.h>
22 #include <dpl/generic_event.h>
23 #include <dpl/event/controller.h>
24 #include <dpl/type_list.h>
25 #include <dpl/named_input_pipe.h>
26 #include <dpl/named_output_pipe.h>
27 #include <dpl/waitable_handle_watch_support.h>
28 #include <dpl/binary_queue.h>
29 #include "popup_controller.h"
33 DECLARE_GENERIC_EVENT_0(QuitEvent)
36 class IPopup : public Renderer::PopupControllerUser
39 virtual void show(DPL::BinaryQueueAutoPtr data, WrtPopup* parent) = 0;
43 typedef std::unique_ptr<IPopup> IPopupPtr;
46 public DPL::WaitableHandleWatchSupport::WaitableHandleListener,
47 public DPL::Application,
48 private DPL::Event::Controller<DPL::TypeListDecl<QuitEvent>::Type>
51 WrtPopup(int argc, char **argv);
54 void response(DPL::BinaryQueue result);
57 //DPL::Application functions
58 virtual void OnStop();
59 virtual void OnCreate();
60 virtual void OnResume();
61 virtual void OnPause();
62 virtual void OnReset(bundle *b);
63 virtual void OnTerminate();
64 virtual void OnEventReceived(const QuitEvent &event);
65 virtual void OnWaitableHandleEvent(DPL::WaitableHandle waitableHandle,
66 DPL::WaitMode::Type mode);
70 void showAcePrompt(DPL::BinaryQueueAutoPtr data);
71 void communicationBoxResponse(int buttonAnswer,
81 DPL::NamedInputPipe m_input;
82 DPL::NamedOutputPipe m_output;