DSWaylandServer: swap tizen_policy_ext files to tizen-policy-ext
[platform/core/uifw/libds.git] / src / DSWaylandServer / DSWaylandTizenPolicyExtPrivate.h
1 /*
2 * Copyright © 2020 Samsung Electronics co., Ltd. All Rights Reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
22 */
23
24 #ifndef _DS_WAYLAND_TIZEN_POLICY_EXT_PRIVATE_H_
25 #define _DS_WAYLAND_TIZEN_POLICY_EXT_PRIVATE_H_
26
27 #include "dswayland-server-tizen-policy-ext.h"
28 #include "DSWaylandTizenPolicyExt.h"
29
30 namespace display_server
31 {
32
33 class DS_DECL_EXPORT DSWaylandTizenRotationPrivate : public DSObjectPrivate, public DSWaylandServer::tizen_rotation
34 {
35 DS_PIMPL_USE_PUBLIC(DSWaylandTizenRotation);
36
37 public:
38         DSWaylandTizenRotationPrivate() = delete;
39         DSWaylandTizenRotationPrivate(DSWaylandTizenRotation *p_ptr, struct ::wl_client *client, uint32_t id, struct ::wl_resource *surface);
40         ~DSWaylandTizenRotationPrivate() override;
41
42         struct ::wl_resource *getRotationSurface(void);
43
44 protected:
45         void tizen_rotation_bind_resource(Resource *resource) override;
46         void tizen_rotation_destroy_resource(Resource *resource) override;
47         void tizen_rotation_destroy(Resource *resource) override;
48 private:
49         struct ::wl_resource *__surface;
50         uint32_t __resource_id;
51 };
52
53 class DS_DECL_EXPORT DSWaylandTizenPolicyExtPrivate : public DSObjectPrivate, public DSWaylandServer::tizen_policy_ext
54 {
55 DS_PIMPL_USE_PUBLIC(DSWaylandTizenPolicyExt);
56
57 public:
58         DSWaylandTizenPolicyExtPrivate() = delete;
59         DSWaylandTizenPolicyExtPrivate(DSWaylandTizenPolicyExt *p_ptr, DSWaylandCompositor *compositor);
60         ~DSWaylandTizenPolicyExtPrivate() override;
61
62         DSWaylandTizenRotation *getTizenRotation(struct ::wl_resource *surface);
63         void delTizenRotation(DSWaylandTizenRotation *resource);
64
65 protected:
66         void tizen_policy_ext_bind_resource(Resource *resource) override;
67         void tizen_policy_ext_destroy_resource(Resource *resource) override;
68         void tizen_policy_ext_get_rotation(Resource *resource, uint32_t id, struct ::wl_resource *surface) override;
69
70 private:
71         std::list<DSWaylandTizenRotation *> __rotationList;
72         uint32_t __resource_id_cnt; //TO DO : have to manage more proper class
73 };
74
75 }
76
77 #endif