]> git.saurik.com Git - wxWidgets.git/blob - interface/protocol/protocol.h
removed @NULL,@true,@false tags from the function prototypes; fixed * and & displacin...
[wxWidgets.git] / interface / protocol / protocol.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: protocol/protocol.h
3 // Purpose: documentation for wxProtocol class
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxProtocol
11 @headerfile protocol.h wx/protocol/protocol.h
12
13
14 @library{wxnet}
15 @category{FIXME}
16
17 @seealso
18 wxSocketBase, wxURL
19 */
20 class wxProtocol : public wxSocketClient
21 {
22 public:
23 /**
24 Abort the current stream.
25
26 @returns Returns @true, if successful, else @false.
27 */
28 bool Abort();
29
30 /**
31 Returns the type of the content of the last opened stream. It is a mime-type.
32 */
33 wxString GetContentType();
34
35 /**
36 Returns the last occurred error.
37
38 @b wxPROTO_NOERR
39
40 No error.
41
42 @b wxPROTO_NETERR
43
44 A generic network error occurred.
45
46 @b wxPROTO_PROTERR
47
48 An error occurred during negotiation.
49
50 @b wxPROTO_CONNERR
51
52 The client failed to connect the server.
53
54 @b wxPROTO_INVVAL
55
56 Invalid value.
57
58 @b wxPROTO_NOHNDLR
59
60 .
61
62 @b wxPROTO_NOFILE
63
64 The remote file doesn't exist.
65
66 @b wxPROTO_ABRT
67
68 Last action aborted.
69
70 @b wxPROTO_RCNCT
71
72 An error occurred during reconnection.
73
74 @b wxPROTO_STREAM
75
76 Someone tried to send a command during a transfer.
77 */
78 wxProtocolError GetError();
79
80 /**
81 Creates a new input stream on the specified path. You can use all but seek
82 functionality of wxStream. Seek isn't available on all streams. For example,
83 HTTP or FTP streams don't deal with it. Other functions like StreamSize and
84 Tell aren't available for the moment for this sort of stream.
85 You will be notified when the EOF is reached by an error.
86
87 @returns Returns the initialized stream. You will have to delete it
88 yourself once you don't use it anymore. The destructor
89 closes the network connection.
90
91 @see wxInputStream
92 */
93 wxInputStream* GetInputStream(const wxString& path);
94
95 /**
96 Tries to reestablish a previous opened connection (close and renegotiate
97 connection).
98
99 @returns @true, if the connection is established, else @false.
100 */
101 bool Reconnect();
102
103 /**
104 Sets the authentication password. It is mainly useful when FTP is used.
105 */
106 void SetPassword(const wxString& user);
107
108 /**
109 Sets the authentication user. It is mainly useful when FTP is used.
110 */
111 void SetUser(const wxString& user);
112 };