• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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=8596e5de45842c1e1de8e6377c2b7d932218c370$
13 //
14 
15 #include "libcef_dll/cpptoc/sslstatus_cpptoc.h"
16 #include "libcef_dll/cpptoc/x509certificate_cpptoc.h"
17 #include "libcef_dll/shutdown_checker.h"
18 
19 namespace {
20 
21 // MEMBER FUNCTIONS - Body may be edited by hand.
22 
sslstatus_is_secure_connection(struct _cef_sslstatus_t * self)23 int CEF_CALLBACK sslstatus_is_secure_connection(struct _cef_sslstatus_t* self) {
24   shutdown_checker::AssertNotShutdown();
25 
26   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
27 
28   DCHECK(self);
29   if (!self)
30     return 0;
31 
32   // Execute
33   bool _retval = CefSSLStatusCppToC::Get(self)->IsSecureConnection();
34 
35   // Return type: bool
36   return _retval;
37 }
38 
39 cef_cert_status_t CEF_CALLBACK
sslstatus_get_cert_status(struct _cef_sslstatus_t * self)40 sslstatus_get_cert_status(struct _cef_sslstatus_t* self) {
41   shutdown_checker::AssertNotShutdown();
42 
43   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
44 
45   DCHECK(self);
46   if (!self)
47     return CERT_STATUS_NONE;
48 
49   // Execute
50   cef_cert_status_t _retval = CefSSLStatusCppToC::Get(self)->GetCertStatus();
51 
52   // Return type: simple
53   return _retval;
54 }
55 
56 cef_ssl_version_t CEF_CALLBACK
sslstatus_get_sslversion(struct _cef_sslstatus_t * self)57 sslstatus_get_sslversion(struct _cef_sslstatus_t* self) {
58   shutdown_checker::AssertNotShutdown();
59 
60   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
61 
62   DCHECK(self);
63   if (!self)
64     return SSL_CONNECTION_VERSION_UNKNOWN;
65 
66   // Execute
67   cef_ssl_version_t _retval = CefSSLStatusCppToC::Get(self)->GetSSLVersion();
68 
69   // Return type: simple
70   return _retval;
71 }
72 
73 cef_ssl_content_status_t CEF_CALLBACK
sslstatus_get_content_status(struct _cef_sslstatus_t * self)74 sslstatus_get_content_status(struct _cef_sslstatus_t* self) {
75   shutdown_checker::AssertNotShutdown();
76 
77   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
78 
79   DCHECK(self);
80   if (!self)
81     return SSL_CONTENT_NORMAL_CONTENT;
82 
83   // Execute
84   cef_ssl_content_status_t _retval =
85       CefSSLStatusCppToC::Get(self)->GetContentStatus();
86 
87   // Return type: simple
88   return _retval;
89 }
90 
91 struct _cef_x509certificate_t* CEF_CALLBACK
sslstatus_get_x509certificate(struct _cef_sslstatus_t * self)92 sslstatus_get_x509certificate(struct _cef_sslstatus_t* self) {
93   shutdown_checker::AssertNotShutdown();
94 
95   // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
96 
97   DCHECK(self);
98   if (!self)
99     return NULL;
100 
101   // Execute
102   CefRefPtr<CefX509Certificate> _retval =
103       CefSSLStatusCppToC::Get(self)->GetX509Certificate();
104 
105   // Return type: refptr_same
106   return CefX509CertificateCppToC::Wrap(_retval);
107 }
108 
109 }  // namespace
110 
111 // CONSTRUCTOR - Do not edit by hand.
112 
CefSSLStatusCppToC()113 CefSSLStatusCppToC::CefSSLStatusCppToC() {
114   GetStruct()->is_secure_connection = sslstatus_is_secure_connection;
115   GetStruct()->get_cert_status = sslstatus_get_cert_status;
116   GetStruct()->get_sslversion = sslstatus_get_sslversion;
117   GetStruct()->get_content_status = sslstatus_get_content_status;
118   GetStruct()->get_x509certificate = sslstatus_get_x509certificate;
119 }
120 
121 // DESTRUCTOR - Do not edit by hand.
122 
~CefSSLStatusCppToC()123 CefSSLStatusCppToC::~CefSSLStatusCppToC() {
124   shutdown_checker::AssertNotShutdown();
125 }
126 
127 template <>
128 CefRefPtr<CefSSLStatus>
129 CefCppToCRefCounted<CefSSLStatusCppToC, CefSSLStatus, cef_sslstatus_t>::
UnwrapDerived(CefWrapperType type,cef_sslstatus_t * s)130     UnwrapDerived(CefWrapperType type, cef_sslstatus_t* s) {
131   NOTREACHED() << "Unexpected class type: " << type;
132   return nullptr;
133 }
134 
135 template <>
136 CefWrapperType CefCppToCRefCounted<CefSSLStatusCppToC,
137                                    CefSSLStatus,
138                                    cef_sslstatus_t>::kWrapperType =
139     WT_SSLSTATUS;
140