The IDownloadRsp interface is used to interact with specific Download response parameters contained in the in-process COM Server Download response component, which is returned when the Download command is invoked. This interface provides methods which enable the client application to obtain the filename, path location, MIME type, and size (number of bytes) of the downloaded object store item.
Client applications may also interact with the Download response component via the IAppIntRsp interface. For more information about working with command and response components and their COM interfaces, see Command and Response components.
coclass DownloadRsp {
[default] interface IDownloadRsp;
interface IAppIntRsp;
};
DLL | FnAppIntDownloadCmd.dll |
See Also | IDownloadCmd Interface |
The IDownloadRsp interface defines the following methods:
Method | Description |
---|---|
GetContentSize |
Returns the size (number of bytes) of the downloaded object store item. |
GetFilePathName |
Returns the filename and path location on the local machine, of the downloaded object store item. |
GetMimeType |
Returns the MIME type of the downloaded object store item. |
The following is a fragment from the complete example for the Download command.
...
// Obtain the specific response information contained in the custom DownloadRsp component
IDownloadRspPtr spIDownloadRsp(spIAppIntRsp);
_ASSERTE(spIDownloadRsp != 0);
std::cout << "PathName=" << (LPCSTR) spIDownloadRsp->GetFilePathName() << std::endl;
std::cout << "MimeType=" << (LPCSTR) spIDownloadRsp->GetMimeType() << std::endl;
std::cout << "FileSize=" << spIDownloadRsp->GetContentSize() << " bytes" << std::endl;
...