1425bb815Sopenharmony_ci/* Copyright JS Foundation and other contributors, http://js.foundation
2425bb815Sopenharmony_ci *
3425bb815Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4425bb815Sopenharmony_ci * you may not use this file except in compliance with the License.
5425bb815Sopenharmony_ci * You may obtain a copy of the License at
6425bb815Sopenharmony_ci *
7425bb815Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8425bb815Sopenharmony_ci *
9425bb815Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10425bb815Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS
11425bb815Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12425bb815Sopenharmony_ci * See the License for the specific language governing permissions and
13425bb815Sopenharmony_ci * limitations under the License.
14425bb815Sopenharmony_ci */
15425bb815Sopenharmony_ci
16425bb815Sopenharmony_ci#ifndef ECMA_PROXY_OBJECT_H
17425bb815Sopenharmony_ci#define ECMA_PROXY_OBJECT_H
18425bb815Sopenharmony_ci
19425bb815Sopenharmony_ci#include "ecma-globals.h"
20425bb815Sopenharmony_ci
21425bb815Sopenharmony_ci/** \addtogroup ecma ECMA
22425bb815Sopenharmony_ci * @{
23425bb815Sopenharmony_ci *
24425bb815Sopenharmony_ci * \addtogroup ecmaproxyobject ECMA Proxy object related routines
25425bb815Sopenharmony_ci * @{
26425bb815Sopenharmony_ci */
27425bb815Sopenharmony_ci
28425bb815Sopenharmony_ci#if ENABLED (JERRY_ES2015_BUILTIN_PROXY)
29425bb815Sopenharmony_ci
30425bb815Sopenharmony_ciecma_object_t *
31425bb815Sopenharmony_ciecma_proxy_create (ecma_value_t target,
32425bb815Sopenharmony_ci                   ecma_value_t handler);
33425bb815Sopenharmony_ci
34425bb815Sopenharmony_ciecma_object_t *
35425bb815Sopenharmony_ciecma_proxy_create_revocable (ecma_value_t target,
36425bb815Sopenharmony_ci                             ecma_value_t handler);
37425bb815Sopenharmony_ci
38425bb815Sopenharmony_ciecma_value_t
39425bb815Sopenharmony_ciecma_proxy_revoke_cb (const ecma_value_t function_obj,
40425bb815Sopenharmony_ci                      const ecma_value_t this_val,
41425bb815Sopenharmony_ci                      const ecma_value_t args_p[],
42425bb815Sopenharmony_ci                      const ecma_length_t args_count);
43425bb815Sopenharmony_ci
44425bb815Sopenharmony_cijmem_cpointer_t
45425bb815Sopenharmony_ciecma_proxy_object_prototype_to_cp (ecma_value_t proto);
46425bb815Sopenharmony_ci
47425bb815Sopenharmony_ciecma_value_t
48425bb815Sopenharmony_ciecma_proxy_object_find (ecma_object_t *obj_p,
49425bb815Sopenharmony_ci                        ecma_string_t *prop_name_p);
50425bb815Sopenharmony_ci
51425bb815Sopenharmony_ci/* Interal operations */
52425bb815Sopenharmony_ci
53425bb815Sopenharmony_ciecma_value_t
54425bb815Sopenharmony_ciecma_proxy_object_get_prototype_of (ecma_object_t *obj_p);
55425bb815Sopenharmony_ci
56425bb815Sopenharmony_ciecma_value_t
57425bb815Sopenharmony_ciecma_proxy_object_set_prototype_of (ecma_object_t *obj_p,
58425bb815Sopenharmony_ci                                    ecma_value_t proto);
59425bb815Sopenharmony_ci
60425bb815Sopenharmony_ciecma_value_t
61425bb815Sopenharmony_ciecma_proxy_object_is_extensible (ecma_object_t *obj_p);
62425bb815Sopenharmony_ci
63425bb815Sopenharmony_ciecma_value_t
64425bb815Sopenharmony_ciecma_proxy_object_prevent_extensions (ecma_object_t *obj_p);
65425bb815Sopenharmony_ci
66425bb815Sopenharmony_ciecma_value_t
67425bb815Sopenharmony_ciecma_proxy_object_get_own_property_descriptor (ecma_object_t *obj_p,
68425bb815Sopenharmony_ci                                               ecma_string_t *prop_name_p,
69425bb815Sopenharmony_ci                                               ecma_property_descriptor_t *prop_desc_p);
70425bb815Sopenharmony_ci
71425bb815Sopenharmony_ciecma_value_t
72425bb815Sopenharmony_ciecma_proxy_object_define_own_property (ecma_object_t *obj_p,
73425bb815Sopenharmony_ci                                       ecma_string_t *prop_name_p,
74425bb815Sopenharmony_ci                                       const ecma_property_descriptor_t *prop_desc_p);
75425bb815Sopenharmony_ci
76425bb815Sopenharmony_ciecma_value_t
77425bb815Sopenharmony_ciecma_proxy_object_has (ecma_object_t *obj_p,
78425bb815Sopenharmony_ci                       ecma_string_t *prop_name_p);
79425bb815Sopenharmony_ci
80425bb815Sopenharmony_ciecma_value_t
81425bb815Sopenharmony_ciecma_proxy_object_get (ecma_object_t *obj_p,
82425bb815Sopenharmony_ci                       ecma_string_t *prop_name_p,
83425bb815Sopenharmony_ci                       ecma_value_t receiver);
84425bb815Sopenharmony_ci
85425bb815Sopenharmony_ciecma_value_t
86425bb815Sopenharmony_ciecma_proxy_object_set (ecma_object_t *obj_p,
87425bb815Sopenharmony_ci                       ecma_string_t *prop_name_p,
88425bb815Sopenharmony_ci                       ecma_value_t name,
89425bb815Sopenharmony_ci                       ecma_value_t receiver);
90425bb815Sopenharmony_ci
91425bb815Sopenharmony_ciecma_value_t
92425bb815Sopenharmony_ciecma_proxy_object_delete_property (ecma_object_t *obj_p,
93425bb815Sopenharmony_ci                                   ecma_string_t *prop_name_p);
94425bb815Sopenharmony_ci
95425bb815Sopenharmony_ciecma_value_t
96425bb815Sopenharmony_ciecma_proxy_object_enumerate (ecma_object_t *obj_p);
97425bb815Sopenharmony_ci
98425bb815Sopenharmony_ciecma_collection_t *
99425bb815Sopenharmony_ciecma_proxy_object_own_property_keys (ecma_object_t *obj_p);
100425bb815Sopenharmony_ci
101425bb815Sopenharmony_ciecma_value_t
102425bb815Sopenharmony_ciecma_proxy_object_call (ecma_object_t *obj_p,
103425bb815Sopenharmony_ci                        ecma_value_t this_argument,
104425bb815Sopenharmony_ci                        const ecma_value_t *args_p,
105425bb815Sopenharmony_ci                        ecma_length_t argc);
106425bb815Sopenharmony_ci
107425bb815Sopenharmony_ciecma_value_t
108425bb815Sopenharmony_ciecma_proxy_object_construct (ecma_object_t *obj_p,
109425bb815Sopenharmony_ci                             ecma_object_t *new_target_p,
110425bb815Sopenharmony_ci                             const ecma_value_t *args_p,
111425bb815Sopenharmony_ci                             ecma_length_t argc);
112425bb815Sopenharmony_ci
113425bb815Sopenharmony_ci#endif /* ENABLED (JERRY_ES2015_BUILTIN_PROXY) */
114425bb815Sopenharmony_ci
115425bb815Sopenharmony_ci/**
116425bb815Sopenharmony_ci * @}
117425bb815Sopenharmony_ci * @}
118425bb815Sopenharmony_ci */
119425bb815Sopenharmony_ci
120425bb815Sopenharmony_ci#endif /* !ECMA_PROXY_OBJECT_H */
121