glibmm: Gio::UnixCredentialsMessage Class Reference

UnixCredentialsMessage - A SocketControlMessage containing credentials. More...

#include <giomm/unixcredentialsmessage.h>

Inheritance diagram for Gio::UnixCredentialsMessage:

List of all members.

Public Member Functions

virtual ~UnixCredentialsMessage ()
GUnixCredentialsMessage* gobj ()
 Provides access to the underlying C GObject.

const GUnixCredentialsMessage* gobj () const
 Provides access to the underlying C GObject.

GUnixCredentialsMessage* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Glib::RefPtr< Credentialsget_credentials ()
 Gets the credentials stored in message.

Glib::RefPtr< const Credentialsget_credentials () const
 Gets the credentials stored in message.

Glib::PropertyProxy_ReadOnly

< Glib::RefPtr< Credentials > > 
property_credentials () const
 The credentials stored in the message.

Static Public Member Functions

static Glib::RefPtr

< UnixCredentialsMessage
create ()
 Creates a new UnixCredentialsMessage with credentials matching the current processes.

static Glib::RefPtr

< UnixCredentialsMessage
create (const Glib::RefPtr< Credentials >& credentials)
 Creates a new UnixCredentialsMessage holding credentials.

static bool is_supported ()
 Checks if passing a Credential on a Socket is supported on this platform.

Protected Member Functions

 UnixCredentialsMessage ()
 UnixCredentialsMessage (const Glib::RefPtr< Credentials >& credentials)

Related Functions

(Note that these are not member functions.)

Glib::RefPtr

< Gio::UnixCredentialsMessage
wrap (GUnixCredentialsMessage* object, bool take_copy=false)
 A Glib::wrap() method for this object.


Detailed Description

UnixCredentialsMessage - A SocketControlMessage containing credentials.

This SocketControlMessage contains a Credentials instance. It may be sent using Gio::Socket::send() and received using Gio::Socket::receive() over UNIX sockets (ie: sockets in the Gio::SOCKET_FAMILY_UNIX family).

For an easier way to send and receive credentials over stream-oriented UNIX sockets, see Gio::UnixConnection::send_credentials() and Gio::UnixConnection::receive_credentials(). To receive credentials of a foreign process connected to a socket, use Gio::Socket::get_credentials().

Since glibmm 2.28:

Constructor & Destructor Documentation

virtual Gio::UnixCredentialsMessage::~UnixCredentialsMessage ( ) [virtual]
Gio::UnixCredentialsMessage::UnixCredentialsMessage ( ) [protected]
Gio::UnixCredentialsMessage::UnixCredentialsMessage ( const Glib::RefPtr< Credentials >&  credentials) [explicit, protected]

Member Function Documentation

static Glib::RefPtr<UnixCredentialsMessage> Gio::UnixCredentialsMessage::create ( ) [static]

Creates a new UnixCredentialsMessage with credentials matching the current processes.

Since glibmm 2.26:
Returns:
A new UnixCredentialsMessage.
static Glib::RefPtr<UnixCredentialsMessage> Gio::UnixCredentialsMessage::create ( const Glib::RefPtr< Credentials >&  credentials) [static]

Creates a new UnixCredentialsMessage holding credentials.

Since glibmm 2.26:
Parameters:
credentialsA Credentials object.
Returns:
A new UnixCredentialsMessage.
Glib::RefPtr<Credentials> Gio::UnixCredentialsMessage::get_credentials ( )

Gets the credentials stored in message.

Since glibmm 2.26:
Returns:
A Credentials instance. Do not free, it is owned by message.
Glib::RefPtr<const Credentials> Gio::UnixCredentialsMessage::get_credentials ( ) const

Gets the credentials stored in message.

Since glibmm 2.26:
Returns:
A Credentials instance. Do not free, it is owned by message.
const GUnixCredentialsMessage* Gio::UnixCredentialsMessage::gobj ( ) const [inline]

Provides access to the underlying C GObject.

Reimplemented from Gio::SocketControlMessage.

GUnixCredentialsMessage* Gio::UnixCredentialsMessage::gobj ( ) [inline]

Provides access to the underlying C GObject.

Reimplemented from Gio::SocketControlMessage.

GUnixCredentialsMessage* Gio::UnixCredentialsMessage::gobj_copy ( )

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Reimplemented from Gio::SocketControlMessage.

static bool Gio::UnixCredentialsMessage::is_supported ( ) [static]

Checks if passing a Credential on a Socket is supported on this platform.

Since glibmm 2.26:
Returns:
true if supported, false otherwise.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Credentials> > Gio::UnixCredentialsMessage::property_credentials ( ) const

The credentials stored in the message.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Friends And Related Function Documentation

Glib::RefPtr< Gio::UnixCredentialsMessage > wrap ( GUnixCredentialsMessage *  object,
bool  take_copy = false 
) [related]

A Glib::wrap() method for this object.

Parameters:
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.