# IRfLibraryItemActions Interface Reference

Inherits IUnknown.

List of all members.

## Public Member Functions
HRESULT | Rename ([in] IRsLibraryItem *pItem,[in] BSTR szNewName)
HRESULT | Delete ([in] IRsLibraryItem *pItem)
HRESULT | AddToOtherLibrary ([in] IRsLibraryItem *pItem,[in] IRsLibrary *pDestinationLibrary,[in] RtDWORD dwNewIndex,[in] RtBOOL bMoveFile)
HRESULT | CopyFileToLibrary ([in] BSTR bstrSourceItemFilePath,[in] IRsLibrary *pDestinationLibrary,[in] RtDWORD dwNewIndex)
HRESULT | LoadHeader ([in] IRsLibraryItem *pItem)
HRESULT | SaveHeader ([in] IRsLibraryItem *pItem)
HRESULT | LoadThumbnails ([in] IRsLibraryItem *pItem)
HRESULT | SaveThumbnails ([in] IRsLibraryItem *pItem)
HRESULT | LoadTags ([in] IRsLibraryItem *pItem)
HRESULT | SaveTags ([in] IRsLibraryItem *pItem)
HRESULT | Load ([in] IRsLibraryItem *pItem,[out, retval] IRsObject **ppRetObject)
HRESULT | Apply ([in] IRsLibraryItem *pItem,[in] RtDadApplyMode dwApplyEvent,[out, retval] IRsObject **ppRetObject)

## Detailed Description

Function set provides operations over a library item.

## Member Function Documentation

HRESULT IRfLibraryItemActions::Rename | ( | [in] IRsLibraryItem * | pItem,
|  | [in] BSTR | szNewName |
| ) |  |  |

Rename library item

Parameters:

  | pItem | [in] Specify library item you want to rename.
  | szNewName | [in] Specify the new name. The name should be unique.

Remarks:
  The change is done asynchronously in Library view so you will see the result not immediately after this operation.

HRESULT IRfLibraryItemActions::Delete | ( | [in] IRsLibraryItem * | pItem | ) |

Delete specified library item. The item will be moved to Recycle Bin.

Parameters:

  | pItem | [in] Library item which you want to delete.

Remarks:
  The change is done asynchronously in Library view so you will see the result not immediately after this operation.

HRESULT IRfLibraryItemActions::AddToOtherLibrary | ( | [in] IRsLibraryItem * | pItem,
|  | [in] IRsLibrary * | pDestinationLibrary,
|  | [in] RtDWORD | dwNewIndex,
|  | [in] RtBOOL | bMoveFile |
| ) |  |  |

AddToOtherLibrary. Moves or copy the library item to the same or another library.

Parameters:

  | pItem | [in] Item you want to copy or move.
  | pDestinationLibrary | [in] The destination library.
  | dwNewIndex | [in] Desired item index in destination library.
  | bMoveFile | [in] TRUE for move and FALSE for copy of the item.

HRESULT IRfLibraryItemActions::CopyFileToLibrary | ( | [in] BSTR | bstrSourceItemFilePath,
|  | [in] IRsLibrary * | pDestinationLibrary,
|  | [in] RtDWORD | dwNewIndex |
| ) |  |  |

CopyFileToLibrary. Copy the specified file into destination library.

Parameters:

  | bstrSourceItemFilePath | [in] Full file path of the source file.
  | pDestinationLibrary | [in] The destination library.
  | dwNewIndex | [in] Desired library item index.

Remarks:
  The item object will be automatically created for the file new file in an asynchronous process thus you will not see the change immediately.

HRESULT IRfLibraryItemActions::LoadHeader | ( | [in] IRsLibraryItem * | pItem | ) |

LoadHeader. Load/refresh the header info for specified library item.

Parameters:

  | pItem | [in] Library item for which you want refresh or load header info.

HRESULT IRfLibraryItemActions::SaveHeader | ( | [in] IRsLibraryItem * | pItem | ) |

SaveHeader. Save header information for specified library item.

- Call this method after you modify the header information in the IRsLibraryItem object.

Parameters:

  | pItem | [in] Library item for which you want refresh or load header info.

HRESULT IRfLibraryItemActions::LoadThumbnails | ( | [in] IRsLibraryItem * | pItem | ) |

LoadThumbnails. Load/refresh thumbnails for specified library item.

Parameters:

  | pItem | [in] Library item for which you want refresh/load the thumbnails.

HRESULT IRfLibraryItemActions::SaveThumbnails | ( | [in] IRsLibraryItem * | pItem | ) |

SaveThumbnails. Save thumbnails for specified library item.

- Call this method when you modify the thumbnails in IRsLibraryItem object.

Parameters:

  | pItem | [in] Library item for which you want save the thumbnails.

HRESULT IRfLibraryItemActions::LoadTags | ( | [in] IRsLibraryItem * | pItem | ) |

LoadTags. Load or refresh tags for library item.

Parameters:

  | pItem | [in] Library item for which you want refresh/load the tags.

HRESULT IRfLibraryItemActions::SaveTags | ( | [in] IRsLibraryItem * | pItem | ) |

SaveTags. Save tags for library item.

- Call this method when you modify the tags in the IRsLibraryItem object.

Parameters:

  | pItem | [in] Library item for which you want save the tags.

HRESULT IRfLibraryItemActions::Load | ( | [in] IRsLibraryItem * | pItem,
|  | [out, retval] IRsObject ** | ppRetObject |
| ) |  |  |

Load the library item.

Parameters:

  | pItem | [in] Specify library item you want to load.

Returns:
  ppRetObject [out, retval] Returns the loaded object if possible and if the load was processed synchronously.

Remarks:
  The item could be loaded synchronously or asynchronously. It depends on the item file type.

HRESULT IRfLibraryItemActions::Apply | ( | [in] IRsLibraryItem * | pItem,
|  | [in] RtDadApplyMode | dwApplyEvent,
|  | [out, retval] IRsObject ** | ppRetObject |
| ) |  |  |

Apply. Apply the item to current selection.

- The Load method is applying the item on selection as well, but through this method you can choose the apply mode.

Parameters:

  | pItem | [in] Specify library item you want to load/apply.

Returns:
  ppRetObject [out, retval] Returns the loaded object if possible and if the load was processed synchronously.

Parameters:

  | dwApplyEvent | [in] The apply event. DAM_DEFAULT = 0 - No additional info present, handler should perform default action (the same as for Load method) DAM_APPLY_DROP = 1 - Apply as a result of dropping obj to another obj DAM_LDBL_CLICK = 2 - Apply was called as a response to left dbl click