IOpenRsp::GetObjectStoreItem

The GetObjectStoreItem method enables the client application to obtain the item type, version ID and version series ID of the item that was selected by the user when the Open command was executed. This method provides access to the information specified through the IObjectStoreItem interface.

IObjectStoreItemPtr spIObjectStoreItemSelected = spIOpenRsp->GetObjectStoreItem();
Parameters
None.
Results
Returns a pointer to an IObjectStoreItem interface containing the item type, version ID and version series ID of the item that was selected for opening by the user. The version ID for the item can be set to one of the following:
- a GUID of a specific version series ID for the object store item to open.
- the special name string "release", to open the latest released version of the object store item.
- the special name string "current", to open the latest version of the object store item.
- the special name string "reservation", representing the reservation object for the object store item, if the item is currently checked-out.

Sample
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;
...