\section{KUnix\-Socket\-Address Class Reference}
\label{classKUnixSocketAddress}\index{KUnixSocketAddress@{KUnixSocketAddress}}
A Unix socket address a Unix socket address.  


{\tt \#include $<$ksockaddr.h$>$}

Inheritance diagram for KUnix\-Socket\-Address:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=76pt]{classKUnixSocketAddress__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KUnix\-Socket\-Address:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=76pt]{classKUnixSocketAddress__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KUnix\-Socket\-Address} ()
\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
{\bf KUnix\-Socket\-Address} (const  sockaddr\_\-un $\ast$raw\_\-data, ksocklen\_\-t size)
\begin{CompactList}\small\item\em Constructor from raw data. \item\end{CompactList}\item 
{\bf KUnix\-Socket\-Address} ({\bf QCString} pathname)
\begin{CompactList}\small\item\em Constructor from pathname. \item\end{CompactList}\item 
virtual {\bf $\sim$KUnix\-Socket\-Address} ()
\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
bool {\bf set\-Address} (const  sockaddr\_\-un $\ast$socket\_\-address, ksocklen\_\-t size)
\begin{CompactList}\small\item\em Sets this to given sockaddr\_\-un. \item\end{CompactList}\item 
bool {\bf set\-Address} ({\bf QCString} path)
\begin{CompactList}\small\item\em Sets this to given pathname. \item\end{CompactList}\item 
{\bf QCString} {\bf pathname} () const 
\begin{CompactList}\small\item\em Returns the pathname. \item\end{CompactList}\item 
virtual {\bf QString} {\bf pretty} () const 
\begin{CompactList}\small\item\em Returns pretty representation of this socket. \item\end{CompactList}\item 
virtual {\bf QString} {\bf service\-Name} () const 
\begin{CompactList}\small\item\em Returns the service name for this socket, as {\bf KExtended\-Socket::lookup}{\rm (p.\,\pageref{classKExtendedSocket_a38})} expects as the service argument. \item\end{CompactList}\item 
const  sockaddr\_\-un $\ast$ {\bf address} () const 
\begin{CompactList}\small\item\em Returns raw socket address. \item\end{CompactList}\item 
{\bf operator const sockaddr\_\-un $\ast$} () const 
\begin{CompactList}\small\item\em Returns raw socket address. \item\end{CompactList}\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
bool {\bf are\-Equal\-Unix} (const  {\bf KSocket\-Address} \&s1, const  {\bf KSocket\-Address} \&s2, bool core\-Only)
\begin{CompactList}\small\item\em Compares two unix socket addresses. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKUnixSocketAddress_b0}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf KExtended\-Socket}\label{classKUnixSocketAddress_n0}

\end{CompactItemize}


\subsection{Detailed Description}
A Unix socket address a Unix socket address. 

This is a Unix socket address.

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

\begin{Desc}
\item[Author:]Thiago Macieira $<${\tt thiagom@mail.com}$>$ \end{Desc}
\begin{Desc}
\item[Version:]\begin{Desc}
\item[Id]{\bf ksockaddr.h}{\rm (p.\,\pageref{ksockaddr_8h})},v 1.15 2002/09/09 21:11:35 tjansen Exp \end{Desc}
\end{Desc}




Definition at line 588 of file ksockaddr.h.

\subsection{Constructor \& Destructor Documentation}
\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!KUnixSocketAddress@{KUnixSocketAddress}}
\index{KUnixSocketAddress@{KUnixSocketAddress}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KUnix\-Socket\-Address::KUnix\-Socket\-Address ()}\label{classKUnixSocketAddress_a0}


Default constructor. 



Definition at line 741 of file ksockaddr.cpp.\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!KUnixSocketAddress@{KUnixSocketAddress}}
\index{KUnixSocketAddress@{KUnixSocketAddress}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KUnix\-Socket\-Address::KUnix\-Socket\-Address (const sockaddr\_\-un $\ast$ {\em raw\_\-data}, ksocklen\_\-t {\em size})}\label{classKUnixSocketAddress_a1}


Constructor from raw data. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em raw\_\-data}]raw data \item[{\em size}]data length \end{description}
\end{Desc}


Definition at line 746 of file ksockaddr.cpp.

References set\-Address(), and KSocket\-Address::size().\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!KUnixSocketAddress@{KUnixSocketAddress}}
\index{KUnixSocketAddress@{KUnixSocketAddress}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KUnix\-Socket\-Address::KUnix\-Socket\-Address ({\bf QCString} {\em pathname})}\label{classKUnixSocketAddress_a2}


Constructor from pathname. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em path}]pathname \end{description}
\end{Desc}


Definition at line 752 of file ksockaddr.cpp.

References pathname(), and set\-Address().\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!~KUnixSocketAddress@{$\sim$KUnixSocketAddress}}
\index{~KUnixSocketAddress@{$\sim$KUnixSocketAddress}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KUnix\-Socket\-Address::$\sim${\bf KUnix\-Socket\-Address} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKUnixSocketAddress_a3}


Destructor. 



Definition at line 758 of file ksockaddr.cpp.

\subsection{Member Function Documentation}
\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!setAddress@{setAddress}}
\index{setAddress@{setAddress}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KUnix\-Socket\-Address::set\-Address (const sockaddr\_\-un $\ast$ {\em socket\_\-address}, ksocklen\_\-t {\em size})}\label{classKUnixSocketAddress_a4}


Sets this to given sockaddr\_\-un. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em socket\_\-address}]socket address \item[{\em size}]the socket length \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}


Definition at line 763 of file ksockaddr.cpp.

Referenced by KUnix\-Socket\-Address().\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!setAddress@{setAddress}}
\index{setAddress@{setAddress}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KUnix\-Socket\-Address::set\-Address ({\bf QCString} {\em path})}\label{classKUnixSocketAddress_a5}


Sets this to given pathname. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em path}]pathname \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}


Definition at line 802 of file ksockaddr.cpp.

References QCString::length().\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!pathname@{pathname}}
\index{pathname@{pathname}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QCString} KUnix\-Socket\-Address::pathname () const}\label{classKUnixSocketAddress_a6}


Returns the pathname. 

\begin{Desc}
\item[Returns:]the pathname, can be QCString::null if uninitialized, or \char`\"{}\char`\"{} if unknown \end{Desc}


Definition at line 838 of file ksockaddr.cpp.

Referenced by KUnix\-Socket\-Address(), pretty(), and service\-Name().\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!pretty@{pretty}}
\index{pretty@{pretty}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KUnix\-Socket\-Address::pretty () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKUnixSocketAddress_a7}


Returns pretty representation of this socket. 

\begin{Desc}
\item[Returns:]a pretty text representation of the socket. \end{Desc}


Reimplemented from {\bf KSocket\-Address} {\rm (p.\,\pageref{classKSocketAddress_a1})}.

Definition at line 849 of file ksockaddr.cpp.

References QFile::decode\-Name(), QCString::is\-Empty(), and pathname().\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!serviceName@{serviceName}}
\index{serviceName@{serviceName}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KUnix\-Socket\-Address::service\-Name () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKUnixSocketAddress_a8}


Returns the service name for this socket, as {\bf KExtended\-Socket::lookup}{\rm (p.\,\pageref{classKExtendedSocket_a38})} expects as the service argument. 

In the case of Internet sockets, this is the port number. The default implementation returns QString::null. \begin{Desc}
\item[Returns:]the service name, can be QString::null \end{Desc}


Reimplemented from {\bf KSocket\-Address} {\rm (p.\,\pageref{classKSocketAddress_a13})}.

Definition at line 857 of file ksockaddr.cpp.

References QString::from\-Utf8(), and pathname().\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!address@{address}}
\index{address@{address}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const  sockaddr\_\-un $\ast$ KUnix\-Socket\-Address::address () const}\label{classKUnixSocketAddress_a9}


Returns raw socket address. 

\begin{Desc}
\item[Returns:]the raw socket address (can be 0 if uninitialized) \end{Desc}


Reimplemented from {\bf KSocket\-Address} {\rm (p.\,\pageref{classKSocketAddress_a2})}.

Definition at line 862 of file ksockaddr.cpp.

Referenced by operator const sockaddr\_\-un $\ast$().\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!operator const sockaddr_un *@{operator const sockaddr\_\-un $\ast$}}
\index{operator const sockaddr_un *@{operator const sockaddr\_\-un $\ast$}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KUnix\-Socket\-Address::operator const sockaddr\_\-un $\ast$ () const\hspace{0.3cm}{\tt  [inline]}}\label{classKUnixSocketAddress_a10}


Returns raw socket address. 

\begin{Desc}
\item[Returns:]the raw socket address (can be 0 if uninitialized) \end{Desc}
\begin{Desc}
\item[See also:]{\bf address()}{\rm (p.\,\pageref{classKUnixSocketAddress_a9})} \end{Desc}


Definition at line 662 of file ksockaddr.h.

References address().\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!areEqualUnix@{areEqualUnix}}
\index{areEqualUnix@{areEqualUnix}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KUnix\-Socket\-Address::are\-Equal\-Unix (const {\bf KSocket\-Address} \& {\em s1}, const {\bf KSocket\-Address} \& {\em s2}, bool {\em core\-Only})\hspace{0.3cm}{\tt  [static]}}\label{classKUnixSocketAddress_e0}


Compares two unix socket addresses. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s1}]the first address to compare \item[{\em s2}]the second address to compare \item[{\em core\-Only}]true if only core parts should be compared (currently unused) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if the given addresses are equal. \end{Desc}
\begin{Desc}
\item[See also:]{\bf KSocket\-Address::is\-Equal()}{\rm (p.\,\pageref{classKSocketAddress_a7})} 

{\bf KSocket\-Address::is\-Core\-Equal()}{\rm (p.\,\pageref{classKSocketAddress_a10})} \end{Desc}


Definition at line 867 of file ksockaddr.cpp.

References KSocket\-Address::address(), KSocket\-Address::family(), and KSocket\-Address::size().

Referenced by KSocket\-Address::is\-Core\-Equal(), and KSocket\-Address::is\-Equal().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
ksockaddr.h\item 
ksockaddr.cpp\end{CompactItemize}
