]>
git.saurik.com Git - wxWidgets.git/blob - interface/protocol/protocol.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: protocol/protocol.h
3 // Purpose: documentation for wxProtocol class
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
11 @headerfile protocol.h wx/protocol/protocol.h
20 class wxProtocol
: public wxSocketClient
24 Abort the current stream.
26 @returns Returns @true, if successful, else @false.
31 Returns the type of the content of the last opened stream. It is a mime-type.
33 wxString
GetContentType();
36 Returns the last occurred error.
47 A generic network error occurred.
52 An error occurred during negotiation.
57 The client failed to connect the server.
72 The remote file doesn't exist.
82 An error occurred during reconnection.
87 Someone tried to send a command during a transfer.
89 wxProtocolError
GetError();
92 Creates a new input stream on the specified path. You can use all but seek
93 functionality of wxStream. Seek isn't available on all streams. For example,
94 HTTP or FTP streams don't deal with it. Other functions like StreamSize and
95 Tell aren't available for the moment for this sort of stream.
96 You will be notified when the EOF is reached by an error.
98 @returns Returns the initialized stream. You will have to delete it
99 yourself once you don't use it anymore. The
100 destructor closes the network connection.
104 wxInputStream
* GetInputStream(const wxString
& path
);
107 Tries to reestablish a previous opened connection (close and renegotiate
110 @returns @true, if the connection is established, else @false.
115 Sets the authentication password. It is mainly useful when FTP is used.
117 void SetPassword(const wxString
& user
);
120 Sets the authentication user. It is mainly useful when FTP is used.
122 void SetUser(const wxString
& user
);