]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/protocol.tex
[ 1537065 ] wxImage: Higher quality scaling/sampling
[wxWidgets.git] / docs / latex / wx / protocol.tex
CommitLineData
7d2946d2
GL
1\section{\class{wxProtocol}}\label{wxprotocol}
2
3\wxheading{Derived from}
4
5\helpref{wxSocketClient}{wxsocketclient}
641d44ae
VZ
6\helpref{wxSocketBase}{wxsocketbase}
7\helpref{wxObject}{wxobject}
7d2946d2 8
954b8ae6
JS
9\wxheading{Include files}
10
11<wx/protocol/protocol.h>
12
7d2946d2
GL
13\wxheading{See also}
14
15\helpref{wxSocketBase}{wxsocketbase}, \helpref{wxURL}{wxurl}
16
17% ----------------------------------------------------------------------------
18% Members
19% ----------------------------------------------------------------------------
296ec7d3 20
fa482912 21\latexignore{\rtfignore{\wxheading{Members}}}
7d2946d2 22
3e79fa75 23\membersection{wxProtocol::Reconnect}\label{wxprotocolreconnect}
7d2946d2
GL
24
25\func{bool}{Reconnect}{\void}
26
27Tries to reestablish a previous opened connection (close and renegotiate connection).
28
29\wxheading{Return value}
30
cc81d32f 31true, if the connection is established, else false.
7d2946d2
GL
32
33% ----------------------------------------------------------------------------
3e79fa75 34\membersection{wxProtocol::GetInputStream}\label{wxprotocolgetinput}
7d2946d2
GL
35
36\func{wxInputStream *}{GetInputStream}{\param{const wxString\&}{ path}}
37
43e8916f 38Creates a new input stream on the specified path. You can use all but seek
154b6b0f
VZ
39functionality of wxStream. Seek isn't available on all streams. For example,
40HTTP or FTP streams don't deal with it. Other functions like StreamSize and
7f42cff1
GL
41Tell aren't available for the moment for this sort of stream.
42You will be notified when the EOF is reached by an error.
7d2946d2
GL
43
44\wxheading{Return value}
45
7f42cff1
GL
46Returns the initialized stream. You will have to delete it yourself once you
47don't use it anymore. The destructor closes the network connection.
48
49\wxheading{See also}
50
51\helpref{wxInputStream}{wxinputstream}
7d2946d2
GL
52
53% ----------------------------------------------------------------------------
3e79fa75 54\membersection{wxProtocol::Abort}\label{wxprotocolabort}
7d2946d2 55
6be663cf 56\func{bool}{Abort}{\void}
7d2946d2
GL
57
58Abort the current stream.
6be663cf 59
7f42cff1
GL
60\wxheading{Warning}
61
62It is advised to destroy the input stream instead of aborting the stream this way.
7d2946d2
GL
63
64\wxheading{Return value}
65
cc81d32f 66Returns true, if successful, else false.
7d2946d2
GL
67
68% ----------------------------------------------------------------------------
3e79fa75 69\membersection{wxProtocol::GetError}\label{wxprotocolgeterror}
7d2946d2 70
6be663cf 71\func{wxProtocolError}{GetError}{\void}
7d2946d2 72
f6bcfd97 73Returns the last occurred error.
7d2946d2 74
7da42094
GL
75\twocolwidtha{7cm}
76\begin{twocollist}\itemsep=0pt
77\twocolitem{{\bf wxPROTO\_NOERR}}{No error.}
f6bcfd97
BP
78\twocolitem{{\bf wxPROTO\_NETERR}}{A generic network error occurred.}
79\twocolitem{{\bf wxPROTO\_PROTERR}}{An error occurred during negotiation.}
7da42094
GL
80\twocolitem{{\bf wxPROTO\_CONNERR}}{The client failed to connect the server.}
81\twocolitem{{\bf wxPROTO\_INVVAL}}{Invalid value.}
82\twocolitem{{\bf wxPROTO\_NOHNDLR}}{.}
83\twocolitem{{\bf wxPROTO\_NOFILE}}{The remote file doesn't exist.}
84\twocolitem{{\bf wxPROTO\_ABRT}}{Last action aborted.}
f6bcfd97 85\twocolitem{{\bf wxPROTO\_RCNCT}}{An error occurred during reconnection.}
7da42094 86\twocolitem{{\bf wxPROTO\_STREAM}}{Someone tried to send a command during a transfer.}
b82827dd 87\end{twocollist}
7da42094 88
7d2946d2 89% ----------------------------------------------------------------------------
3e79fa75 90\membersection{wxProtocol::GetContentType}\label{wxprotocolgetcontenttype}
7d2946d2 91
6be663cf 92\func{wxString}{GetContentType}{\void}
7d2946d2
GL
93
94Returns the type of the content of the last opened stream. It is a mime-type.
95
96% ----------------------------------------------------------------------------
3e79fa75 97\membersection{wxProtocol::SetUser}\label{wxprotocolsetuser}
7d2946d2
GL
98
99\func{void }{SetUser}{\param{const wxString\&}{ user}}
100
101Sets the authentication user. It is mainly useful when FTP is used.
102
3e79fa75 103\membersection{wxProtocol::SetPassword}\label{wxprotocolsetpassword}
7d2946d2 104
6be663cf 105\func{void}{SetPassword}{\param{const wxString\&}{ user}}
7d2946d2
GL
106
107Sets the authentication password. It is mainly useful when FTP is used.
cba2db0c 108