kdecore Library API Documentation

KNetwork::KUnixSocketAddress Class Reference

A Unix (local) socket address. More...

#include <ksocketaddress.h>

Inheritance diagram for KNetwork::KUnixSocketAddress:

Inheritance graph
[legend]
Collaboration diagram for KNetwork::KUnixSocketAddress:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 KUnixSocketAddress ()
 KUnixSocketAddress (const sockaddr *sa, Q_UINT16 len)
 KUnixSocketAddress (const KUnixSocketAddress &other)
 KUnixSocketAddress (const QString &pathname)
virtual ~KUnixSocketAddress ()
KUnixSocketAddressoperator= (const KUnixSocketAddress &other)
 operator const sockaddr_un * () const
QString pathname () const
KUnixSocketAddresssetPathname (const QString &path)

Protected Member Functions

 KUnixSocketAddress (KSocketAddressData *d)

Detailed Description

A Unix (local) socket address.

This is a Unix socket address.

Note that this class uses QStrings to represent filenames, which means the proper encoding is used to translate into valid filesystem file names.

Author:
Thiago Macieira <thiago.macieira@kdemail.net>

Definition at line 830 of file ksocketaddress.h.


Constructor & Destructor Documentation

KNetwork::KUnixSocketAddress::KUnixSocketAddress  ) 
 

Default constructor.

Creates an empty object.

KNetwork::KUnixSocketAddress::KUnixSocketAddress const sockaddr *  sa,
Q_UINT16  len
 

Creates this object with the given raw data.

If the sockaddr structure does not contain a Local namespace (Unix) socket, this object will be created empty.

Parameters:
sa the socket address structure
len the structure's length

KNetwork::KUnixSocketAddress::KUnixSocketAddress const KUnixSocketAddress other  ) 
 

Copy constructor.

Creates a copy of the other object, sharing the data explicitly.

Parameters:
other the other object

KNetwork::KUnixSocketAddress::KUnixSocketAddress const QString pathname  ) 
 

Constructs an object from the given pathname.

virtual KNetwork::KUnixSocketAddress::~KUnixSocketAddress  )  [virtual]
 

Destructor.


Member Function Documentation

KUnixSocketAddress& KNetwork::KUnixSocketAddress::operator= const KUnixSocketAddress other  ) 
 

Copy operator.

Copies the contents of the other object into this one. Data is explicitly shared.

Parameters:
other the other

KNetwork::KUnixSocketAddress::operator const sockaddr_un *  )  const [inline]
 

Cast operator to sockaddr_un.

Definition at line 878 of file ksocketaddress.h.

QString KNetwork::KUnixSocketAddress::pathname  )  const
 

Returns the pathname associated with this object.

Will return QString::null if this object is empty.

KUnixSocketAddress& KNetwork::KUnixSocketAddress::setPathname const QString path  ) 
 

Sets the pathname for the object.

Returns:
a reference to itself


The documentation for this class was generated from the following file:
KDE Logo
This file is part of the documentation for kdecore Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Apr 14 00:08:29 2005 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003