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