Tizen 2.1 base
[platform/framework/web/wrt-plugins-common.git] / src / wrt-popup / ace / popup-runner / popup-runner.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  * @file        popup-runner.h
18  * @author      Janusz Kozerski (j.kozerski@samsung.com)
19  * @version     1.0
20  */
21
22 #include <ace_api_client.h>
23 #include <vector>
24
25 #include <dpl/serialization.h>
26
27 namespace Wrt {
28 namespace Popup {
29
30 class BinaryStream : public DPL::IStream {
31   public:
32     void Read (size_t num,       void * bytes);
33     void Write(size_t num, const void * bytes);
34
35     BinaryStream();
36     ~BinaryStream();
37
38     const unsigned char* char_pointer() const;
39     size_t size() const;
40
41   private:
42     std::vector<unsigned char> m_data;
43     size_t m_readPosition;
44 };
45
46 ace_return_t run_popup(
47         ace_popup_t popup_type,
48         const ace_resource_t resource_name,
49         const ace_session_id_t session_id,
50         const ace_param_list_t* ace_param_list,
51         ace_widget_handle_t handle,
52         ace_bool_t* validation_result
53         );
54
55 } // Popup
56 } // Wrt