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