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