• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdecore
 

kdecore

Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
KUnixSocketAddress Class Reference

#include <ksockaddr.h>

Inheritance diagram for KUnixSocketAddress:
KSocketAddress

List of all members.

Public Member Functions

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

Static Public Member Functions

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

Protected Member Functions

virtual void virtual_hook (int id, void *data)

Friends

class KExtendedSocket

Detailed Description

A Unix socket address.

This is a Unix socket address.

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

Author:
Thiago Macieira <thiago.macieira@kdemail.net> a Unix socket address

Definition at line 584 of file ksockaddr.h.


Constructor & Destructor Documentation

KUnixSocketAddress::KUnixSocketAddress ( )

Default constructor.

Definition at line 741 of file ksockaddr.cpp.

KUnixSocketAddress::KUnixSocketAddress ( const sockaddr_un *  raw_data,
ksocklen_t  size 
)

Constructor from raw data.

Parameters:
raw_dataraw data
sizedata length

Definition at line 746 of file ksockaddr.cpp.

KUnixSocketAddress::KUnixSocketAddress ( TQCString  pathname)

Constructor from pathname.

Parameters:
pathnamepathname

Definition at line 752 of file ksockaddr.cpp.

KUnixSocketAddress::~KUnixSocketAddress ( ) [virtual]

Destructor.

Definition at line 758 of file ksockaddr.cpp.


Member Function Documentation

const sockaddr_un * KUnixSocketAddress::address ( ) const

Returns raw socket address.

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

Reimplemented from KSocketAddress.

Definition at line 862 of file ksockaddr.cpp.

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

Compares two unix socket addresses.

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

Definition at line 867 of file ksockaddr.cpp.

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 658 of file ksockaddr.h.

TQCString KUnixSocketAddress::pathname ( ) const

Returns the pathname.

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

Definition at line 838 of file ksockaddr.cpp.

TQString KUnixSocketAddress::pretty ( ) const [virtual]

Returns pretty representation of this socket.

Returns:
a pretty text representation of the socket.

Reimplemented from KSocketAddress.

Definition at line 849 of file ksockaddr.cpp.

TQString KUnixSocketAddress::serviceName ( ) const [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 TQString::null.

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

Reimplemented from KSocketAddress.

Definition at line 857 of file ksockaddr.cpp.

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

Sets this to given sockaddr_un.

Parameters:
socket_addresssocket address
sizethe socket length
Returns:
true if successful, false otherwise

Definition at line 763 of file ksockaddr.cpp.

bool KUnixSocketAddress::setAddress ( TQCString  path)

Sets this to given pathname.

Parameters:
pathpathname
Returns:
true if successful, false otherwise

Definition at line 802 of file ksockaddr.cpp.


The documentation for this class was generated from the following files:
  • ksockaddr.h
  • ksockaddr.cpp

kdecore

Skip menu "kdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdecore

Skip menu "kdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdecore by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |