1 // Generated by gmmproc 2.64.2 -- DO NOT MODIFY!
2 
3 
4 #include <glibmm.h>
5 
6 #include <giomm/tlsserverconnection.h>
7 #include <giomm/private/tlsserverconnection_p.h>
8 
9 
10 /* Copyright (C) 2013 The giomm Development Team
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  * Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
24  */
25 
26 #include <gio/gio.h>
27 
28 namespace Gio
29 {
30 
TlsServerConnection(GTlsServerConnection * castitem)31 TlsServerConnection::TlsServerConnection(GTlsServerConnection* castitem)
32 : TlsConnection(G_TLS_CONNECTION(castitem))
33 {
34 }
35 
36 } // namespace Gio
37 
38 namespace
39 {
40 } // anonymous namespace
41 
42 
43 namespace Glib
44 {
45 
wrap(GTlsServerConnection * object,bool take_copy)46 Glib::RefPtr<Gio::TlsServerConnection> wrap(GTlsServerConnection* object, bool take_copy)
47 {
48   return Glib::RefPtr<Gio::TlsServerConnection>( dynamic_cast<Gio::TlsServerConnection*> (Glib::wrap_auto_interface<Gio::TlsServerConnection> ((GObject*)(object), take_copy)) );
49   //We use dynamic_cast<> in case of multiple inheritance.
50 }
51 
52 } // namespace Glib
53 
54 
55 namespace Gio
56 {
57 
58 
59 /* The *_Class implementation: */
60 
init()61 const Glib::Interface_Class& TlsServerConnection_Class::init()
62 {
63   if(!gtype_) // create the GType if necessary
64   {
65     // Glib::Interface_Class has to know the interface init function
66     // in order to add interfaces to implementing types.
67     class_init_func_ = &TlsServerConnection_Class::iface_init_function;
68 
69     // We can not derive from another interface, and it is not necessary anyway.
70     gtype_ = g_tls_server_connection_get_type();
71   }
72 
73   return *this;
74 }
75 
iface_init_function(void * g_iface,void *)76 void TlsServerConnection_Class::iface_init_function(void* g_iface, void*)
77 {
78   const auto klass = static_cast<BaseClassType*>(g_iface);
79 
80   //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
81   //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
82   g_assert(klass != nullptr);
83 
84 
85 }
86 
87 
wrap_new(GObject * object)88 Glib::ObjectBase* TlsServerConnection_Class::wrap_new(GObject* object)
89 {
90   return new TlsServerConnection((GTlsServerConnection*)(object));
91 }
92 
93 
94 /* The implementation: */
95 
TlsServerConnection()96 TlsServerConnection::TlsServerConnection()
97 :
98   Glib::Interface(tlsserverconnection_class_.init())
99 {}
100 
101 
TlsServerConnection(const Glib::Interface_Class & interface_class)102 TlsServerConnection::TlsServerConnection(const Glib::Interface_Class& interface_class)
103 : Glib::Interface(interface_class)
104 {
105 }
106 
TlsServerConnection(TlsServerConnection && src)107 TlsServerConnection::TlsServerConnection(TlsServerConnection&& src) noexcept
108 : Glib::Interface(std::move(src))
109 {}
110 
operator =(TlsServerConnection && src)111 TlsServerConnection& TlsServerConnection::operator=(TlsServerConnection&& src) noexcept
112 {
113   Glib::Interface::operator=(std::move(src));
114   return *this;
115 }
116 
~TlsServerConnection()117 TlsServerConnection::~TlsServerConnection() noexcept
118 {}
119 
120 // static
add_interface(GType gtype_implementer)121 void TlsServerConnection::add_interface(GType gtype_implementer)
122 {
123   tlsserverconnection_class_.init().add_interface(gtype_implementer);
124 }
125 
126 TlsServerConnection::CppClassType TlsServerConnection::tlsserverconnection_class_; // initialize static member
127 
get_type()128 GType TlsServerConnection::get_type()
129 {
130   return tlsserverconnection_class_.init().get_type();
131 }
132 
133 
get_base_type()134 GType TlsServerConnection::get_base_type()
135 {
136   return g_tls_server_connection_get_type();
137 }
138 
139 
create(const Glib::RefPtr<IOStream> & base_io_stream,const Glib::RefPtr<TlsCertificate> & certificate)140 Glib::RefPtr<IOStream> TlsServerConnection::create(const Glib::RefPtr<IOStream>& base_io_stream, const Glib::RefPtr<TlsCertificate>& certificate)
141 {
142   GError* gerror = nullptr;
143   Glib::RefPtr<IOStream> retvalue = Glib::wrap(g_tls_server_connection_new(Glib::unwrap(base_io_stream), Glib::unwrap(certificate), &(gerror)));
144   if(gerror)
145     ::Glib::Error::throw_exception(gerror);
146   return retvalue;
147 }
148 
149 
property_authentication_mode()150 Glib::PropertyProxy< TlsAuthenticationMode > TlsServerConnection::property_authentication_mode()
151 {
152   return Glib::PropertyProxy< TlsAuthenticationMode >(this, "authentication-mode");
153 }
154 
property_authentication_mode() const155 Glib::PropertyProxy_ReadOnly< TlsAuthenticationMode > TlsServerConnection::property_authentication_mode() const
156 {
157   return Glib::PropertyProxy_ReadOnly< TlsAuthenticationMode >(this, "authentication-mode");
158 }
159 
160 
161 } // namespace Gio
162 
163 
164