]>
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.
44 A generic network error occurred.
48 An error occurred during negotiation.
52 The client failed to connect the server.
64 The remote file doesn't exist.
72 An error occurred during reconnection.
76 Someone tried to send a command during a transfer.
78 wxProtocolError
GetError();
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.
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.
93 wxInputStream
* GetInputStream(const wxString
& path
);
96 Tries to reestablish a previous opened connection (close and renegotiate
99 @returns @true, if the connection is established, else @false.
104 Sets the authentication password. It is mainly useful when FTP is used.
106 void SetPassword(const wxString
& user
);
109 Sets the authentication user. It is mainly useful when FTP is used.
111 void SetUser(const wxString
& user
);