sl@0: // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0: // All rights reserved.
sl@0: // This component and the accompanying materials are made available
sl@0: // under the terms of the License "Eclipse Public License v1.0"
sl@0: // which accompanies this distribution, and is available
sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0: //
sl@0: // Initial Contributors:
sl@0: // Nokia Corporation - initial contribution.
sl@0: //
sl@0: // Contributors:
sl@0: //
sl@0: // Description:
sl@0: // \n
sl@0: // Files are managed by the ContentAccess::CManager
class in the content
sl@0: // access framework.
sl@0: //
ContentAccess::CManager::DeleteFileL()
allows a client to delete a specified file managed by a DRM agent.
sl@0: // The agent responsible for the content can display a dialog to confirm that
sl@0: // the user wants to delete the file. This is particularly important if the content still has valid rights.
sl@0: // The agent implementation must decide whether to delete the rights or only the content.
sl@0: // TFileName filename;
sl@0: // // create a manager object
sl@0: // CManager* manager = CManager::NewL();
sl@0: // // Use the manager to delete a file
sl@0: // // CAF will ask the agent who actually owns the file to delete it.
sl@0: // TInt result = manager->DeleteFile(filename);
sl@0: // ContentAccess::CManager::CopyFile()
allows a user to make a copy of the file. For example, the user may wish
sl@0: // to make a copy of the file on removable media. When copying content managed by a DRM agent, the agent will only copy the
sl@0: // content, it will not copy the rights.
sl@0: // TInt result = manager->CopyFile(source, destination);
sl@0: // ContentAccess::CManager::RenameFile()
allows a user to move or rename a file.
sl@0: // For example, the user may wish to move the file to removable media.
sl@0: // TInt result = manager->RenameFile(oldFilename, newFilename);
sl@0: // ContentAccess::CManager::MkDir()
allows a user to create a directory.
sl@0: // TInt result = manager->MkDir(fullpath);
sl@0: // ContentAccess::CManager::MkDirAll()
allows a user to create a directory.
sl@0: // If one or more of the sub-directories do not exist they will be created too.
sl@0: // TInt result = manager->MkDirAll(fullpath);
sl@0: // ContentAccess::CManager::RmDir()
allows a user to remove a directory.
sl@0: // TInt result = manager->RmDir(fullpath);
sl@0: // ContentAccess::CManager::GetDir()
function. They each allow a client
sl@0: // to list the contents of an agent's private directory.
sl@0: // As mentioned earlier it is optional for agents to provide this information.
sl@0: // CDir *aDir;
sl@0: // TInt result = manager->GetDir(aName, aEntryAttMask, aEntrySortKey, aDir);
sl@0: // ""
empty string UniqueId
allows an application to determine the MIME type of the file.
sl@0: // TBuf <256> aMimeType;
sl@0: // TInt result = manager->GetStringAttribute(EMimeType, aMimeType, TVirtualPathPtr(aURI,KNullDesC16()));
sl@0: // CManager
API allows applications to retrieve attributes or string attributes from a content object
sl@0: //