\section{KNetwork::KHttp\-Proxy\-Socket\-Device Class Reference}
\label{classKNetwork_1_1KHttpProxySocketDevice}\index{KNetwork::KHttpProxySocketDevice@{KNetwork::KHttpProxySocketDevice}}
The low-level backend for HTTP proxying.  


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

Inheritance diagram for KNetwork::KHttp\-Proxy\-Socket\-Device:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=183pt]{classKNetwork_1_1KHttpProxySocketDevice__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KNetwork::KHttp\-Proxy\-Socket\-Device:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=192pt]{classKNetwork_1_1KHttpProxySocketDevice__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KHttp\-Proxy\-Socket\-Device} (const {\bf KSocket\-Base} $\ast$=0L)
\item 
{\bf KHttp\-Proxy\-Socket\-Device} (const {\bf KResolver\-Entry} \&proxy)
\item 
virtual {\bf $\sim$KHttp\-Proxy\-Socket\-Device} ()
\item 
virtual int {\bf capabilities} () const 
\item 
const {\bf KResolver\-Entry} \& {\bf proxy\-Server} () const 
\item 
void {\bf set\-Proxy\-Server} (const {\bf KResolver\-Entry} \&proxy)
\item 
virtual void {\bf close} ()
\item 
virtual bool {\bf connect} (const {\bf KResolver\-Entry} \&address)
\item 
virtual bool {\bf connect} (const {\bf QString} \&name, const {\bf QString} \&service)
\item 
virtual {\bf KSocket\-Address} {\bf peer\-Address} () const 
\item 
virtual {\bf KSocket\-Address} {\bf external\-Address} () const 
\end{CompactItemize}
\subsection*{Static Public Attributes}
\begin{CompactItemize}
\item 
static {\bf KResolver\-Entry} {\bf default\-Proxy}
\end{CompactItemize}


\subsection{Detailed Description}
The low-level backend for HTTP proxying. 

This class derives from {\bf KSocket\-Device}{\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice})} and implements the necessary calls to make a connection through an HTTP proxy.

\begin{Desc}
\item[Author:]Thiago Macieira $<${\tt thiago.macieira@kdemail.net}$>$ \end{Desc}




Definition at line 43 of file khttpproxysocketdevice.h.

\subsection{Constructor \& Destructor Documentation}
\index{KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}!KHttpProxySocketDevice@{KHttpProxySocketDevice}}
\index{KHttpProxySocketDevice@{KHttpProxySocketDevice}!KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KHttp\-Proxy\-Socket\-Device::KHttp\-Proxy\-Socket\-Device (const {\bf KSocket\-Base} $\ast$ = {\tt 0L})}\label{classKNetwork_1_1KHttpProxySocketDevice_a0}


Constructor. 



Definition at line 55 of file khttpproxysocketdevice.cpp.\index{KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}!KHttpProxySocketDevice@{KHttpProxySocketDevice}}
\index{KHttpProxySocketDevice@{KHttpProxySocketDevice}!KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KHttp\-Proxy\-Socket\-Device::KHttp\-Proxy\-Socket\-Device (const {\bf KResolver\-Entry} \& {\em proxy})}\label{classKNetwork_1_1KHttpProxySocketDevice_a1}


Constructor with proxy server's address. 



Definition at line 60 of file khttpproxysocketdevice.cpp.\index{KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}!~KHttpProxySocketDevice@{$\sim$KHttpProxySocketDevice}}
\index{~KHttpProxySocketDevice@{$\sim$KHttpProxySocketDevice}!KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KHttp\-Proxy\-Socket\-Device::$\sim${\bf KHttp\-Proxy\-Socket\-Device} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KHttpProxySocketDevice_a2}


Destructor. 



Definition at line 66 of file khttpproxysocketdevice.cpp.

\subsection{Member Function Documentation}
\index{KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}!capabilities@{capabilities}}
\index{capabilities@{capabilities}!KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KHttp\-Proxy\-Socket\-Device::capabilities () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KHttpProxySocketDevice_a3}


Sets our capabilities. 



Reimplemented from {\bf KNetwork::KSocket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a4})}.

Definition at line 74 of file khttpproxysocketdevice.cpp.\index{KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}!proxyServer@{proxyServer}}
\index{proxyServer@{proxyServer}!KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf KResolver\-Entry} \& KHttp\-Proxy\-Socket\-Device::proxy\-Server () const}\label{classKNetwork_1_1KHttpProxySocketDevice_a4}


Retrieves the proxy server address. 



Definition at line 80 of file khttpproxysocketdevice.cpp.\index{KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}!setProxyServer@{setProxyServer}}
\index{setProxyServer@{setProxyServer}!KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHttp\-Proxy\-Socket\-Device::set\-Proxy\-Server (const {\bf KResolver\-Entry} \& {\em proxy})}\label{classKNetwork_1_1KHttpProxySocketDevice_a5}


Sets the proxy server address. 



Definition at line 85 of file khttpproxysocketdevice.cpp.\index{KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}!close@{close}}
\index{close@{close}!KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHttp\-Proxy\-Socket\-Device::close ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KHttpProxySocketDevice_a6}


Closes the socket. 



Reimplemented from {\bf KNetwork::KSocket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a7})}.

Definition at line 90 of file khttpproxysocketdevice.cpp.\index{KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}!connect@{connect}}
\index{connect@{connect}!KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KHttp\-Proxy\-Socket\-Device::connect (const {\bf KResolver\-Entry} \& {\em address})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KHttpProxySocketDevice_a7}


Overrides connection. 



Reimplemented from {\bf KNetwork::KSocket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a13})}.

Definition at line 109 of file khttpproxysocketdevice.cpp.

References QIODevice::is\-Open(), and KNetwork::KActive\-Socket\-Base::reset\-Error().\index{KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}!connect@{connect}}
\index{connect@{connect}!KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KHttp\-Proxy\-Socket\-Device::connect (const {\bf QString} \& {\em name}, const {\bf QString} \& {\em service})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KHttpProxySocketDevice_a8}


Name-based connection. 

We can tell the HTTP proxy server the full name. 

Definition at line 131 of file khttpproxysocketdevice.cpp.

References QString::arg(), QString::from\-Latin1(), QIODevice::is\-Open(), QString::latin1(), and KNetwork::KActive\-Socket\-Base::set\-Error().\index{KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}!peerAddress@{peerAddress}}
\index{peerAddress@{peerAddress}!KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KSocket\-Address} KHttp\-Proxy\-Socket\-Device::peer\-Address () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KHttpProxySocketDevice_a9}


Return the peer address. 



Reimplemented from {\bf KNetwork::KSocket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a25})}.

Definition at line 97 of file khttpproxysocketdevice.cpp.

References QIODevice::is\-Open().\index{KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}!externalAddress@{externalAddress}}
\index{externalAddress@{externalAddress}!KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KSocket\-Address} KHttp\-Proxy\-Socket\-Device::external\-Address () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KHttpProxySocketDevice_a10}


Return the externally visible address. 

We can't tell what that address is, so this function always returns an empty object. 

Reimplemented from {\bf KNetwork::KSocket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a26})}.

Definition at line 104 of file khttpproxysocketdevice.cpp.

\subsection{Member Data Documentation}
\index{KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}!defaultProxy@{defaultProxy}}
\index{defaultProxy@{defaultProxy}!KNetwork::KHttpProxySocketDevice@{KNetwork::KHttp\-Proxy\-Socket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KResolver\-Entry} {\bf KHttp\-Proxy\-Socket\-Device::default\-Proxy}\hspace{0.3cm}{\tt  [static]}}\label{classKNetwork_1_1KHttpProxySocketDevice_s0}


This is the default proxy server to be used. 

Applications may want to set this value so that calling {\bf set\-Proxy\-Server}{\rm (p.\,\pageref{classKNetwork_1_1KHttpProxySocketDevice_a5})} is unnecessary. 

Definition at line 40 of file khttpproxysocketdevice.cpp.

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