1 // Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights
2 // reserved. Use of this source code is governed by a BSD-style license that
3 // can be found in the LICENSE file.
4 //
5 // ---------------------------------------------------------------------------
6 //
7 // This file was generated by the CEF translator tool. If making changes by
8 // hand only do so within the body of existing method and function
9 // implementations. See the translator.README.txt file in the tools directory
10 // for more information.
11 //
12 // $hash=1799aec02f9d2491056fbf3042b4ba89498adaf4$
13 //
14
15 #include "libcef_dll/ctocpp/x509cert_principal_ctocpp.h"
16 #include "libcef_dll/shutdown_checker.h"
17 #include "libcef_dll/transfer_util.h"
18
19 // VIRTUAL METHODS - Body may be edited by hand.
20
21 NO_SANITIZE("cfi-icall")
GetDisplayName()22 CefString CefX509CertPrincipalCToCpp::GetDisplayName() {
23 shutdown_checker::AssertNotShutdown();
24
25 cef_x509cert_principal_t* _struct = GetStruct();
26 if (CEF_MEMBER_MISSING(_struct, get_display_name))
27 return CefString();
28
29 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
30
31 // Execute
32 cef_string_userfree_t _retval = _struct->get_display_name(_struct);
33
34 // Return type: string
35 CefString _retvalStr;
36 _retvalStr.AttachToUserFree(_retval);
37 return _retvalStr;
38 }
39
GetCommonName()40 NO_SANITIZE("cfi-icall") CefString CefX509CertPrincipalCToCpp::GetCommonName() {
41 shutdown_checker::AssertNotShutdown();
42
43 cef_x509cert_principal_t* _struct = GetStruct();
44 if (CEF_MEMBER_MISSING(_struct, get_common_name))
45 return CefString();
46
47 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
48
49 // Execute
50 cef_string_userfree_t _retval = _struct->get_common_name(_struct);
51
52 // Return type: string
53 CefString _retvalStr;
54 _retvalStr.AttachToUserFree(_retval);
55 return _retvalStr;
56 }
57
58 NO_SANITIZE("cfi-icall")
GetLocalityName()59 CefString CefX509CertPrincipalCToCpp::GetLocalityName() {
60 shutdown_checker::AssertNotShutdown();
61
62 cef_x509cert_principal_t* _struct = GetStruct();
63 if (CEF_MEMBER_MISSING(_struct, get_locality_name))
64 return CefString();
65
66 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
67
68 // Execute
69 cef_string_userfree_t _retval = _struct->get_locality_name(_struct);
70
71 // Return type: string
72 CefString _retvalStr;
73 _retvalStr.AttachToUserFree(_retval);
74 return _retvalStr;
75 }
76
77 NO_SANITIZE("cfi-icall")
GetStateOrProvinceName()78 CefString CefX509CertPrincipalCToCpp::GetStateOrProvinceName() {
79 shutdown_checker::AssertNotShutdown();
80
81 cef_x509cert_principal_t* _struct = GetStruct();
82 if (CEF_MEMBER_MISSING(_struct, get_state_or_province_name))
83 return CefString();
84
85 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
86
87 // Execute
88 cef_string_userfree_t _retval = _struct->get_state_or_province_name(_struct);
89
90 // Return type: string
91 CefString _retvalStr;
92 _retvalStr.AttachToUserFree(_retval);
93 return _retvalStr;
94 }
95
96 NO_SANITIZE("cfi-icall")
GetCountryName()97 CefString CefX509CertPrincipalCToCpp::GetCountryName() {
98 shutdown_checker::AssertNotShutdown();
99
100 cef_x509cert_principal_t* _struct = GetStruct();
101 if (CEF_MEMBER_MISSING(_struct, get_country_name))
102 return CefString();
103
104 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
105
106 // Execute
107 cef_string_userfree_t _retval = _struct->get_country_name(_struct);
108
109 // Return type: string
110 CefString _retvalStr;
111 _retvalStr.AttachToUserFree(_retval);
112 return _retvalStr;
113 }
114
115 NO_SANITIZE("cfi-icall")
GetStreetAddresses(std::vector<CefString> & addresses)116 void CefX509CertPrincipalCToCpp::GetStreetAddresses(
117 std::vector<CefString>& addresses) {
118 shutdown_checker::AssertNotShutdown();
119
120 cef_x509cert_principal_t* _struct = GetStruct();
121 if (CEF_MEMBER_MISSING(_struct, get_street_addresses))
122 return;
123
124 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
125
126 // Translate param: addresses; type: string_vec_byref
127 cef_string_list_t addressesList = cef_string_list_alloc();
128 DCHECK(addressesList);
129 if (addressesList)
130 transfer_string_list_contents(addresses, addressesList);
131
132 // Execute
133 _struct->get_street_addresses(_struct, addressesList);
134
135 // Restore param:addresses; type: string_vec_byref
136 if (addressesList) {
137 addresses.clear();
138 transfer_string_list_contents(addressesList, addresses);
139 cef_string_list_free(addressesList);
140 }
141 }
142
143 NO_SANITIZE("cfi-icall")
GetOrganizationNames(std::vector<CefString> & names)144 void CefX509CertPrincipalCToCpp::GetOrganizationNames(
145 std::vector<CefString>& names) {
146 shutdown_checker::AssertNotShutdown();
147
148 cef_x509cert_principal_t* _struct = GetStruct();
149 if (CEF_MEMBER_MISSING(_struct, get_organization_names))
150 return;
151
152 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
153
154 // Translate param: names; type: string_vec_byref
155 cef_string_list_t namesList = cef_string_list_alloc();
156 DCHECK(namesList);
157 if (namesList)
158 transfer_string_list_contents(names, namesList);
159
160 // Execute
161 _struct->get_organization_names(_struct, namesList);
162
163 // Restore param:names; type: string_vec_byref
164 if (namesList) {
165 names.clear();
166 transfer_string_list_contents(namesList, names);
167 cef_string_list_free(namesList);
168 }
169 }
170
171 NO_SANITIZE("cfi-icall")
GetOrganizationUnitNames(std::vector<CefString> & names)172 void CefX509CertPrincipalCToCpp::GetOrganizationUnitNames(
173 std::vector<CefString>& names) {
174 shutdown_checker::AssertNotShutdown();
175
176 cef_x509cert_principal_t* _struct = GetStruct();
177 if (CEF_MEMBER_MISSING(_struct, get_organization_unit_names))
178 return;
179
180 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
181
182 // Translate param: names; type: string_vec_byref
183 cef_string_list_t namesList = cef_string_list_alloc();
184 DCHECK(namesList);
185 if (namesList)
186 transfer_string_list_contents(names, namesList);
187
188 // Execute
189 _struct->get_organization_unit_names(_struct, namesList);
190
191 // Restore param:names; type: string_vec_byref
192 if (namesList) {
193 names.clear();
194 transfer_string_list_contents(namesList, names);
195 cef_string_list_free(namesList);
196 }
197 }
198
199 NO_SANITIZE("cfi-icall")
GetDomainComponents(std::vector<CefString> & components)200 void CefX509CertPrincipalCToCpp::GetDomainComponents(
201 std::vector<CefString>& components) {
202 shutdown_checker::AssertNotShutdown();
203
204 cef_x509cert_principal_t* _struct = GetStruct();
205 if (CEF_MEMBER_MISSING(_struct, get_domain_components))
206 return;
207
208 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
209
210 // Translate param: components; type: string_vec_byref
211 cef_string_list_t componentsList = cef_string_list_alloc();
212 DCHECK(componentsList);
213 if (componentsList)
214 transfer_string_list_contents(components, componentsList);
215
216 // Execute
217 _struct->get_domain_components(_struct, componentsList);
218
219 // Restore param:components; type: string_vec_byref
220 if (componentsList) {
221 components.clear();
222 transfer_string_list_contents(componentsList, components);
223 cef_string_list_free(componentsList);
224 }
225 }
226
227 // CONSTRUCTOR - Do not edit by hand.
228
CefX509CertPrincipalCToCpp()229 CefX509CertPrincipalCToCpp::CefX509CertPrincipalCToCpp() {}
230
231 // DESTRUCTOR - Do not edit by hand.
232
~CefX509CertPrincipalCToCpp()233 CefX509CertPrincipalCToCpp::~CefX509CertPrincipalCToCpp() {
234 shutdown_checker::AssertNotShutdown();
235 }
236
237 template <>
238 cef_x509cert_principal_t* CefCToCppRefCounted<
239 CefX509CertPrincipalCToCpp,
240 CefX509CertPrincipal,
UnwrapDerived(CefWrapperType type,CefX509CertPrincipal * c)241 cef_x509cert_principal_t>::UnwrapDerived(CefWrapperType type,
242 CefX509CertPrincipal* c) {
243 NOTREACHED() << "Unexpected class type: " << type;
244 return nullptr;
245 }
246
247 template <>
248 CefWrapperType CefCToCppRefCounted<CefX509CertPrincipalCToCpp,
249 CefX509CertPrincipal,
250 cef_x509cert_principal_t>::kWrapperType =
251 WT_X509CERT_PRINCIPAL;
252