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=18492d14d83b0dfd272ddd9dd95a2fc292bf8904$
13 //
14
15 #include "libcef_dll/ctocpp/sslstatus_ctocpp.h"
16 #include "libcef_dll/ctocpp/x509certificate_ctocpp.h"
17 #include "libcef_dll/shutdown_checker.h"
18
19 // VIRTUAL METHODS - Body may be edited by hand.
20
IsSecureConnection()21 NO_SANITIZE("cfi-icall") bool CefSSLStatusCToCpp::IsSecureConnection() {
22 shutdown_checker::AssertNotShutdown();
23
24 cef_sslstatus_t* _struct = GetStruct();
25 if (CEF_MEMBER_MISSING(_struct, is_secure_connection))
26 return false;
27
28 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
29
30 // Execute
31 int _retval = _struct->is_secure_connection(_struct);
32
33 // Return type: bool
34 return _retval ? true : false;
35 }
36
GetCertStatus()37 NO_SANITIZE("cfi-icall") cef_cert_status_t CefSSLStatusCToCpp::GetCertStatus() {
38 shutdown_checker::AssertNotShutdown();
39
40 cef_sslstatus_t* _struct = GetStruct();
41 if (CEF_MEMBER_MISSING(_struct, get_cert_status))
42 return CERT_STATUS_NONE;
43
44 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
45
46 // Execute
47 cef_cert_status_t _retval = _struct->get_cert_status(_struct);
48
49 // Return type: simple
50 return _retval;
51 }
52
GetSSLVersion()53 NO_SANITIZE("cfi-icall") cef_ssl_version_t CefSSLStatusCToCpp::GetSSLVersion() {
54 shutdown_checker::AssertNotShutdown();
55
56 cef_sslstatus_t* _struct = GetStruct();
57 if (CEF_MEMBER_MISSING(_struct, get_sslversion))
58 return SSL_CONNECTION_VERSION_UNKNOWN;
59
60 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
61
62 // Execute
63 cef_ssl_version_t _retval = _struct->get_sslversion(_struct);
64
65 // Return type: simple
66 return _retval;
67 }
68
69 NO_SANITIZE("cfi-icall")
GetContentStatus()70 cef_ssl_content_status_t CefSSLStatusCToCpp::GetContentStatus() {
71 shutdown_checker::AssertNotShutdown();
72
73 cef_sslstatus_t* _struct = GetStruct();
74 if (CEF_MEMBER_MISSING(_struct, get_content_status))
75 return SSL_CONTENT_NORMAL_CONTENT;
76
77 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
78
79 // Execute
80 cef_ssl_content_status_t _retval = _struct->get_content_status(_struct);
81
82 // Return type: simple
83 return _retval;
84 }
85
86 NO_SANITIZE("cfi-icall")
GetX509Certificate()87 CefRefPtr<CefX509Certificate> CefSSLStatusCToCpp::GetX509Certificate() {
88 shutdown_checker::AssertNotShutdown();
89
90 cef_sslstatus_t* _struct = GetStruct();
91 if (CEF_MEMBER_MISSING(_struct, get_x509certificate))
92 return nullptr;
93
94 // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
95
96 // Execute
97 cef_x509certificate_t* _retval = _struct->get_x509certificate(_struct);
98
99 // Return type: refptr_same
100 return CefX509CertificateCToCpp::Wrap(_retval);
101 }
102
103 // CONSTRUCTOR - Do not edit by hand.
104
CefSSLStatusCToCpp()105 CefSSLStatusCToCpp::CefSSLStatusCToCpp() {}
106
107 // DESTRUCTOR - Do not edit by hand.
108
~CefSSLStatusCToCpp()109 CefSSLStatusCToCpp::~CefSSLStatusCToCpp() {
110 shutdown_checker::AssertNotShutdown();
111 }
112
113 template <>
114 cef_sslstatus_t*
115 CefCToCppRefCounted<CefSSLStatusCToCpp, CefSSLStatus, cef_sslstatus_t>::
UnwrapDerived(CefWrapperType type,CefSSLStatus * c)116 UnwrapDerived(CefWrapperType type, CefSSLStatus* c) {
117 NOTREACHED() << "Unexpected class type: " << type;
118 return nullptr;
119 }
120
121 template <>
122 CefWrapperType CefCToCppRefCounted<CefSSLStatusCToCpp,
123 CefSSLStatus,
124 cef_sslstatus_t>::kWrapperType =
125 WT_SSLSTATUS;
126