wxWidgets/docs/latex/wx/protocol.tex
Vadim Zeitlin 154b6b0f0e spelling fixes (patch 1495562)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-28 23:56:51 +00:00

107 lines
3.5 KiB
TeX

\section{\class{wxProtocol}}\label{wxprotocol}
\wxheading{Derived from}
\helpref{wxSocketClient}{wxsocketclient}
\wxheading{Include files}
<wx/protocol/protocol.h>
\wxheading{See also}
\helpref{wxSocketBase}{wxsocketbase}, \helpref{wxURL}{wxurl}
% ----------------------------------------------------------------------------
% Members
% ----------------------------------------------------------------------------
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxProtocol::Reconnect}\label{wxprotocolreconnect}
\func{bool}{Reconnect}{\void}
Tries to reestablish a previous opened connection (close and renegotiate connection).
\wxheading{Return value}
true, if the connection is established, else false.
% ----------------------------------------------------------------------------
\membersection{wxProtocol::GetInputStream}\label{wxprotocolgetinput}
\func{wxInputStream *}{GetInputStream}{\param{const wxString\&}{ path}}
Creates a new input stream on the specified path. You can use all but seek
functionality of wxStream. Seek isn't available on all streams. For example,
HTTP or FTP streams don't deal with it. Other functions like StreamSize and
Tell aren't available for the moment for this sort of stream.
You will be notified when the EOF is reached by an error.
\wxheading{Return value}
Returns the initialized stream. You will have to delete it yourself once you
don't use it anymore. The destructor closes the network connection.
\wxheading{See also}
\helpref{wxInputStream}{wxinputstream}
% ----------------------------------------------------------------------------
\membersection{wxProtocol::Abort}\label{wxprotocolabort}
\func{bool}{Abort}{\void}
Abort the current stream.
\wxheading{Warning}
It is advised to destroy the input stream instead of aborting the stream this way.
\wxheading{Return value}
Returns true, if successful, else false.
% ----------------------------------------------------------------------------
\membersection{wxProtocol::GetError}\label{wxprotocolgeterror}
\func{wxProtocolError}{GetError}{\void}
Returns the last occurred error.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf wxPROTO\_NOERR}}{No error.}
\twocolitem{{\bf wxPROTO\_NETERR}}{A generic network error occurred.}
\twocolitem{{\bf wxPROTO\_PROTERR}}{An error occurred during negotiation.}
\twocolitem{{\bf wxPROTO\_CONNERR}}{The client failed to connect the server.}
\twocolitem{{\bf wxPROTO\_INVVAL}}{Invalid value.}
\twocolitem{{\bf wxPROTO\_NOHNDLR}}{.}
\twocolitem{{\bf wxPROTO\_NOFILE}}{The remote file doesn't exist.}
\twocolitem{{\bf wxPROTO\_ABRT}}{Last action aborted.}
\twocolitem{{\bf wxPROTO\_RCNCT}}{An error occurred during reconnection.}
\twocolitem{{\bf wxPROTO\_STREAM}}{Someone tried to send a command during a transfer.}
\end{twocollist}
% ----------------------------------------------------------------------------
\membersection{wxProtocol::GetContentType}\label{wxprotocolgetcontenttype}
\func{wxString}{GetContentType}{\void}
Returns the type of the content of the last opened stream. It is a mime-type.
% ----------------------------------------------------------------------------
\membersection{wxProtocol::SetUser}\label{wxprotocolsetuser}
\func{void }{SetUser}{\param{const wxString\&}{ user}}
Sets the authentication user. It is mainly useful when FTP is used.
\membersection{wxProtocol::SetPassword}\label{wxprotocolsetpassword}
\func{void}{SetPassword}{\param{const wxString\&}{ user}}
Sets the authentication password. It is mainly useful when FTP is used.