The IOpenRsp interface is used to interact with specific Open response parameters contained in the in-process COM Server Open response component, which is returned when the Open command is invoked. This interface enables the client application to obtain the filename, contentID, item type, version ID and version series ID of the item that was selected for opening, in addition to the type of Open operation to perform: download or download and checkout.
The IOpenRsp2 response component interface enables customers to obtain the MIME type of the selected item. Customers may use both the IOpenRsp and IOpenRsp2 interfaces in new development, as well as in existing implementations.
Client applications may also interact with the Open 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 OpenRsp {
[default] interface IOpenRsp; interface IOpenRsp2;
interface IAppIntRsp;
};
DLL | FnAppIntOpenCmd.dll |
See Also | IOpenRsp2 and IOpenCmd Interfaces |
The IOpenRsp interface defines the following methods:
Method | Description |
---|---|
GetCmdAction |
Returns the type of open command that was selected by the user. |
GetSelectedObjectID |
Returns the content ID (GUID) of the object store item to be opened, which contains the content for the selected item. |
GetFileName |
Returns the filename of the object store item to be opened. |
GetObjectStoreItem |
Provides access to the item type, version ID and version series ID of the item that was selected by the user when the Open command was executed. |
The following is a fragment from the complete example for the Open command.
... // Obtain the information contained in the custom OpenRsp component IOpenRspPtr spIOpenRsp(spIAppIntRsp);
_ASSERTE(spIOpenRsp != 0); std::cout << "Details for the item selected by the user:<< std::endl; std::cout << "FileName=" << (LPCSTR) spIOpenRsp->GetFileName() << std::endl; std::cout << "ContentID=" << (LPCSTR) spIOpenRsp->GetSelectedObjectID() << std::endl; std::cout << "Operation=" << (LPCSTR) CItemTypeConverter::EnumToBSTR(spIOpenRsp->GetCmdAction()) << std::endl; // Obtain the information contained in the custom OpenRsp2 component IOpenRsp2Ptr spIOpenRsp2(spIAppIntRsp); _ASSERTE(spISOpenRsp2 != 0); std::cout << "MIMEType=" << (LPCSTR) spIOpenRsp2->GetMimeType() << std::endl; // Display the information about the selected ObjectStoreItem IObjectStoreItemPtr spIObjectStoreItemSelected = spIOpenRsp->GetObjectStoreItem(); _ASSERTE(spIObjectStoreItemSelected != 0); std::cout << "ObjectStoreName=" << (LPCSTR) spIObjectStoreItemSelected->GetObjectStoreName() << std::endl; std::cout << "ItemType=" << (LPCSTR) CItemTypeConverter::EnumToBSTR(spIObjectStoreItemSelected->GetItemType()) << std::endl; std::cout << "VersionSeriesID=" << (LPCSTR) spIObjectStoreItemSelected->GetVersionSeriesID() << std::endl; std::cout << "VersionID=" << (LPCSTR) spIObjectStoreItemSelected->GetVersionID() << std::endl;...