1 // Generated by gmmproc 2.64.2 -- DO NOT MODIFY!
2 #ifndef _GIOMM_UNIXCREDENTIALSMESSAGE_H
3 #define _GIOMM_UNIXCREDENTIALSMESSAGE_H
4 
5 
6 #include <glibmm/ustring.h>
7 #include <sigc++/sigc++.h>
8 
9 /* Copyright (C) 2010 The giomm Development Team
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Lesser General Public
13  * License as published by the Free Software Foundation; either
14  * version 2.1 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public
22  * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
23  */
24 
25 #include <giomm/socketcontrolmessage.h>
26 
27 
28 #ifndef DOXYGEN_SHOULD_SKIP_THIS
29 using GUnixCredentialsMessage = struct _GUnixCredentialsMessage;
30 using GUnixCredentialsMessageClass = struct _GUnixCredentialsMessageClass;
31 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
32 
33 
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 namespace Gio
36 { class GIOMM_API UnixCredentialsMessage_Class; } // namespace Gio
37 #endif //DOXYGEN_SHOULD_SKIP_THIS
38 
39 namespace Gio
40 {
41 
42 class GIOMM_API Credentials;
43 
44 /** UnixCredentialsMessage - A SocketControlMessage containing credentials.
45  * This SocketControlMessage contains a Credentials instance. It may be sent
46  * using Gio::Socket::send() and received using Gio::Socket::receive()
47  * over UNIX sockets (ie: sockets in the Gio::SOCKET_FAMILY_UNIX family).
48  *
49  * For an easier way to send and receive credentials over stream-oriented UNIX
50  * sockets, see Gio::UnixConnection::send_credentials() and
51  * Gio::UnixConnection::receive_credentials(). To receive credentials of a
52  * foreign process connected to a socket, use Gio::Socket::get_credentials().
53  *
54  * @ingroup NetworkIO
55  * @newin{2,28}
56  */
57 
58 class GIOMM_API UnixCredentialsMessage : public SocketControlMessage
59 {
60 
61 #ifndef DOXYGEN_SHOULD_SKIP_THIS
62 
63 public:
64   using CppObjectType = UnixCredentialsMessage;
65   using CppClassType = UnixCredentialsMessage_Class;
66   using BaseObjectType = GUnixCredentialsMessage;
67   using BaseClassType = GUnixCredentialsMessageClass;
68 
69   // noncopyable
70   UnixCredentialsMessage(const UnixCredentialsMessage&) = delete;
71   UnixCredentialsMessage& operator=(const UnixCredentialsMessage&) = delete;
72 
73 private:  friend class UnixCredentialsMessage_Class;
74   static CppClassType unixcredentialsmessage_class_;
75 
76 protected:
77   explicit UnixCredentialsMessage(const Glib::ConstructParams& construct_params);
78   explicit UnixCredentialsMessage(GUnixCredentialsMessage* castitem);
79 
80 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
81 
82 public:
83 
84   UnixCredentialsMessage(UnixCredentialsMessage&& src) noexcept;
85   UnixCredentialsMessage& operator=(UnixCredentialsMessage&& src) noexcept;
86 
87   ~UnixCredentialsMessage() noexcept override;
88 
89   /** Get the GType for this class, for use with the underlying GObject type system.
90    */
91   static GType get_type()      G_GNUC_CONST;
92 
93 #ifndef DOXYGEN_SHOULD_SKIP_THIS
94 
95 
96   static GType get_base_type() G_GNUC_CONST;
97 #endif
98 
99   ///Provides access to the underlying C GObject.
gobj()100   GUnixCredentialsMessage*       gobj()       { return reinterpret_cast<GUnixCredentialsMessage*>(gobject_); }
101 
102   ///Provides access to the underlying C GObject.
gobj()103   const GUnixCredentialsMessage* gobj() const { return reinterpret_cast<GUnixCredentialsMessage*>(gobject_); }
104 
105   ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
106   GUnixCredentialsMessage* gobj_copy();
107 
108 private:
109 
110   //This is not available on Win32.
111 //This source file will not be compiled on Win32,
112 //and no class defined in it will be registered by wrap_init().
113 
114 
115 protected:
116   UnixCredentialsMessage();
117     explicit UnixCredentialsMessage(const Glib::RefPtr<Credentials>& credentials);
118 
119 
120 public:
121 
122   /** Creates a new UnixCredentialsMessage with credentials matching the current processes.
123    *
124    * @newin{2,26}
125    *
126    * @return A new UnixCredentialsMessage.
127    */
128 
129 
130   static Glib::RefPtr<UnixCredentialsMessage> create();
131 
132 
133   /** Creates a new UnixCredentialsMessage holding @a credentials.
134    *
135    * @newin{2,26}
136    *
137    * @param credentials A Credentials object.
138    * @return A new UnixCredentialsMessage.
139    */
140 
141 
142   static Glib::RefPtr<UnixCredentialsMessage> create(const Glib::RefPtr<Credentials>& credentials);
143 
144 
145   /** Gets the credentials stored in @a message.
146    *
147    * @newin{2,26}
148    *
149    * @return A Credentials instance. Do not free, it is owned by @a message.
150    */
151   Glib::RefPtr<Credentials> get_credentials();
152 
153   /** Gets the credentials stored in @a message.
154    *
155    * @newin{2,26}
156    *
157    * @return A Credentials instance. Do not free, it is owned by @a message.
158    */
159   Glib::RefPtr<const Credentials> get_credentials() const;
160 
161   /** Checks if passing Credentials on a Socket is supported on this platform.
162    *
163    * @newin{2,26}
164    *
165    * @return <tt>true</tt> if supported, <tt>false</tt> otherwise.
166    */
167   static bool is_supported();
168 
169   /** The credentials stored in the message.
170    *
171    * @newin{2,26}
172    *
173    * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
174    * or receive notification when the value of the property changes.
175    */
176   Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Credentials> > property_credentials() const;
177 
178 
179 public:
180 
181 public:
182   //C++ methods used to invoke GTK+ virtual functions:
183 
184 protected:
185   //GTK+ Virtual Functions (override these to change behaviour):
186 
187   //Default Signal Handlers::
188 
189 
190 };
191 
192 } // namespace Gio
193 
194 
195 namespace Glib
196 {
197   /** A Glib::wrap() method for this object.
198    *
199    * @param object The C instance.
200    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
201    * @result A C++ instance that wraps this C instance.
202    *
203    * @relates Gio::UnixCredentialsMessage
204    */
205   GIOMM_API
206   Glib::RefPtr<Gio::UnixCredentialsMessage> wrap(GUnixCredentialsMessage* object, bool take_copy = false);
207 }
208 
209 
210 #endif /* _GIOMM_UNIXCREDENTIALSMESSAGE_H */
211 
212