struct CCL::Web::IWebClient
Overview
Client interface for protocols like HTTP. More…
#include <iwebclient.h> struct IWebClient: public CCL::IUnknown { // methods virtual void CCL_API setCredentials (IWebCredentials* credentials) = 0; virtual tresult CCL_API connect (StringRef hostname) = 0; virtual tresult CCL_API disconnect () = 0; virtual tbool CCL_API isConnected () = 0; virtual int CCL_API getLastStatus () = 0; virtual tresult CCL_API downloadData ( StringRef remotePath, IStream& localStream, IWebHeaderCollection* headers = nullptr, IProgressNotify* progress = nullptr ) = 0; virtual tresult CCL_API uploadData ( IWebHeaderCollection* headers, IStream& localStream, StringRef remotePath, IStream& responseStream, StringID method = nullptr, IProgressNotify* progress = nullptr ) = 0; virtual tresult CCL_API setOption (StringID optionId, VariantRef value) = 0; DECLARE_STRINGID_MEMBER (kUncached); };
Inherited Members
public: // methods virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0; virtual unsigned int CCL_API retain () = 0; virtual unsigned int CCL_API release () = 0;
Detailed Documentation
Client interface for protocols like HTTP.
Methods
virtual void CCL_API setCredentials (IWebCredentials* credentials) = 0
Supply credentials.
virtual tresult CCL_API connect (StringRef hostname) = 0
Connect to given host.
virtual tresult CCL_API disconnect () = 0
Disconnect from host.
virtual tbool CCL_API isConnected () = 0
Check if client is currently connected.
virtual int CCL_API getLastStatus () = 0
Get most recent status code of underlying protocol.
virtual tresult CCL_API downloadData ( StringRef remotePath, IStream& localStream, IWebHeaderCollection* headers = nullptr, IProgressNotify* progress = nullptr ) = 0
Download data from remote to local storage.
virtual tresult CCL_API uploadData ( IWebHeaderCollection* headers, IStream& localStream, StringRef remotePath, IStream& responseStream, StringID method = nullptr, IProgressNotify* progress = nullptr ) = 0
Upload data from local to remote storage.
Headers must include content type.
virtual tresult CCL_API setOption (StringID optionId, VariantRef value) = 0
Set option for the web client operation.
DECLARE_STRINGID_MEMBER (kUncached)
Client options.