Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

KUnixSocketAddress Class Reference

a Unix socket address More...

#include <ksockaddr.h>

Inheritance diagram for KUnixSocketAddress:

KSocketAddress List of all members.

Public Methods

 KUnixSocketAddress ()
 KUnixSocketAddress (const sockaddr_un *raw_data, ksocklen_t size)
 KUnixSocketAddress (QCString pathname)
virtual ~KUnixSocketAddress ()
bool setAddress (const sockaddr_un *socket_address, ksocklen_t size)
bool setAddress (QCString path)
QCString pathname () const
virtual QString pretty () const
virtual QString serviceName () const
const sockaddr_un * address () const
 operator const sockaddr_un * () const

Static Public Methods

bool areEqualUnix (const KSocketAddress &s1, const KSocketAddress &s2, bool coreOnly)

Protected Methods

virtual void virtual_hook (int id, void *data)

Friends

class KExtendedSocket

Detailed Description

a Unix socket address

A Unix socket address

This is a Unix socket address.

This class expects QCString instead of QString values, which means the filenames should be encoded in whatever form locale/system deems necessary before passing down to the function

Author:
Thiago Macieira <thiagom@mail.com>
Version:
Id:
ksockaddr.h,v 1.15 2002/09/09 21:11:35 tjansen Exp

Definition at line 588 of file ksockaddr.h.


Constructor & Destructor Documentation

KUnixSocketAddress::KUnixSocketAddress  
 

Default constructor

KUnixSocketAddress::KUnixSocketAddress const sockaddr_un *    raw_data,
ksocklen_t    size
 

Constructor from raw data.

Parameters:
raw_data  raw data
size  data length

KUnixSocketAddress::KUnixSocketAddress QCString    pathname
 

Constructor from pathname.

Parameters:
path  pathname

virtual KUnixSocketAddress::~KUnixSocketAddress   [virtual]
 

Destructor


Member Function Documentation

const sockaddr_un* KUnixSocketAddress::address  
 

Returns raw socket address.

Returns:
the raw socket address (can be 0 if uninitialized)

Reimplemented from KSocketAddress.

Referenced by operator const sockaddr_un *().

bool KUnixSocketAddress::areEqualUnix const KSocketAddress   s1,
const KSocketAddress   s2,
bool    coreOnly
[static]
 

Compares two unix socket addresses.

Parameters:
s1  the first address to compare
s2  the second address to compare
coreOnly  true if only core parts should be compared (currently unused)
Returns:
true if the given addresses are equal.
See also:
KSocketAddress::isEqual() , KSocketAddress::isCoreEqual()

KUnixSocketAddress::operator const sockaddr_un *   const [inline]
 

Returns raw socket address.

Returns:
the raw socket address (can be 0 if uninitialized)
See also:
address()

Definition at line 662 of file ksockaddr.h.

References address().

QCString KUnixSocketAddress::pathname  
 

Returns the pathname.

Returns:
the pathname, can be QCString::null if uninitialized, or "" if unknown

virtual QString KUnixSocketAddress::pretty   [virtual]
 

Returns pretty representation of this socket.

Returns:
a pretty text representation of the socket.

Reimplemented from KSocketAddress.

virtual QString KUnixSocketAddress::serviceName   [virtual]
 

Returns the service name for this socket, as KExtendedSocket::lookup expects as the service argument. In the case of Internet sockets, this is the port number. The default implementation returns QString::null.

Returns:
the service name, can be QString::null

Reimplemented from KSocketAddress.

bool KUnixSocketAddress::setAddress QCString    path
 

Sets this to given pathname.

Parameters:
path  pathname
Returns:
true if successful, false otherwise

bool KUnixSocketAddress::setAddress const sockaddr_un *    socket_address,
ksocklen_t    size
 

Sets this to given sockaddr_un.

Parameters:
socket_address  socket address
size  the socket length
Returns:
true if successful, false otherwise


The documentation for this class was generated from the following file:
Generated on Wed Aug 13 23:30:27 2003 for kdelibs by doxygen1.2.18