sbIMediaFileManager Interface Reference

import"sbIMediaFileManager.idl";

Inheritance diagram for sbIMediaFileManager:
[legend]
Collaboration diagram for sbIMediaFileManager:
[legend]

Public Member Functions

void init ([optional] in nsIPropertyBag2 aProperties)
 
boolean organizeItem (in sbIMediaItem aMediaItem, in unsigned short aManageType, [optional] in nsIFile aForceTargetFile)
 
nsIFile getManagedPath (in sbIMediaItem aItem, in unsigned short aManageType)
 

Public Attributes

const unsigned short MANAGE_RENAME = 1
 
const unsigned short MANAGE_DELETE = 2
 
const unsigned short MANAGE_COPY = 4
 
const unsigned short MANAGE_MOVE = 8
 

Detailed Description

Definition at line 35 of file sbIMediaFileManager.idl.

Member Function Documentation

nsIFile sbIMediaFileManager::getManagedPath ( in sbIMediaItem  aItem,
in unsigned short  aManageType 
)

Get the path the item would be organized to if we were to do it

Parameters
aMediaItem- the media item we will organize
aManageType- the actions to take (see flags above)
Returns
the resulting path
void sbIMediaFileManager::init ( [optional] in nsIPropertyBag2  aProperties)

Initialize the media file manager instance For all optional arguments, defaults are taken from the prefs

Parameters
[optional]aProperties properties to use in place of prefs known key/value pairs: "media-folder": (nsIFile) the folder to organize things into "file-format": (ACString) the formatting string to use for the leaf name "dir-format": (ACString) the formatting string to use for the path "manage-mode": (PRUint32) the MANAGE_* constants
boolean sbIMediaFileManager::organizeItem ( in sbIMediaItem  aMediaItem,
in unsigned short  aManageType,
[optional] in nsIFile  aForceTargetFile 
)

Organize an item in the media library folder

Parameters
aMediaItemthe item to organize
aManageTypethe actions to take (see flags above)
aForceTargetFileif given, force the target file to be based on this path, ignoring the properties on the item itself

Member Data Documentation

const unsigned short sbIMediaFileManager::MANAGE_COPY = 4

Definition at line 79 of file sbIMediaFileManager.idl.

const unsigned short sbIMediaFileManager::MANAGE_DELETE = 2

Definition at line 76 of file sbIMediaFileManager.idl.

const unsigned short sbIMediaFileManager::MANAGE_MOVE = 8

Definition at line 82 of file sbIMediaFileManager.idl.

const unsigned short sbIMediaFileManager::MANAGE_RENAME = 1

Organization Flags: MANAGE_RENAME - This renames a file so that it matches the metadata of the item, the rename will only happen if the item is located in or will be located in the Managed Folder. MANAGE_DELETE - This deletes an items file if it is located in the Managed Folder. MANAGE_COPY - This will copy an items file into the Managed Folder. MANAGE_MOVE - This will move a file into a sub folder in the Managed Folder based on the items metadata, the move will only happen if the item is located in or will be located in the Managed Folder.

Example modes: MANAGE_RENAME | MANAGE_MOVE - This will move and rename a file if it is located in the Managed Folder based on the items metadata. example: /ManagedFolder/Artist/Album/## - Title.ext MANAGE_COPY - This will only copy the file into the Managed Folder, it will not move or rename it based on the items metadata. MANAGE_RENAME | MANAGE_MOVE | MANAGE_COPY - This will copy, move and rename the items file into the Managed Folder based on the items metadata.

Definition at line 73 of file sbIMediaFileManager.idl.


The documentation for this interface was generated from the following file: