/// @todo minor: Rowland Cook 12/06/2007 Add method decription.
// -----------------------------------------------------------------------------
// TGlxCommandFactory::AddToContainerCommandLC
// -----------------------------------------------------------------------------
//	
EXPORT_C CMPXCommand* TGlxCommandFactory::AddToContainerCommandLC(
        const TDesC& aUri, 
        const CMPXCollectionPath& aTargetContainers)
    {
    
    CMPXCommand* command = CMPXCommand::NewL();
    CleanupStack::PushL(command);
    
    // Set command id
    command->SetTObjectValueL<TInt>(KMPXCommandGeneralId, KGlxCommandIdAdd);  
    
    // Set URI
    command->SetTextValueL(KMPXCommandGeneralSourceUri, aUri); 
    
    // Add path of selected items
    command->SetCObjectValueL<CMPXCollectionPath>(KMPXMediaGeneralContainerId, &const_cast<CMPXCollectionPath&>(aTargetContainers));    

    // Add collection plugin id to command object
/// @todo minor: Add comment as to the meaning of the value zero in Comparison and aTargetContainers.Id(0)
    if (aTargetContainers.Levels() > 0) 
        {
        command->SetTObjectValueL<TUid>(KMPXCommandGeneralCollectionId, TUid::Uid(aTargetContainers.Id(0)));        
        }
    
    return command;      
    }
/// @todo minor: Rowland Cook 12/06/2007 Add method decription.
// -----------------------------------------------------------------------------
// TGlxCommandFactory::RenameCommandLC
// -----------------------------------------------------------------------------
//	
EXPORT_C CMPXCommand* TGlxCommandFactory::RenameCommandLC(const TDesC& aNewTitle, 
    const CMPXCollectionPath& aSourcePath)
    {
    CMPXCommand* command = BasicCommandLC(KGlxCommandIdSet, aSourcePath);
    
    // Set title
    command->SetTextValueL(KMPXMediaGeneralTitle, aNewTitle);    
   
    return command;
    }
/// @todo minor: Rowland Cook 12/06/2007 Add method decription.
// -----------------------------------------------------------------------------
// TGlxCommandFactory::SetDescriptionCommandLC
// -----------------------------------------------------------------------------
//	
EXPORT_C CMPXCommand* TGlxCommandFactory::SetDescriptionCommandLC(const TDesC& aDescription, 
        const CMPXCollectionPath& aSourcePath) 
    {
    CMPXCommand* command = BasicCommandLC(KGlxCommandIdSet, aSourcePath);
    
    // Set description
    command->SetTextValueL(KMPXMediaGeneralComment, aDescription);    
    
    return command;
    }
/// @todo minor: Rowland Cook 12/06/2007 Add method decription.
// -----------------------------------------------------------------------------
// TGlxCommandFactory::CopyCommandLC
// -----------------------------------------------------------------------------
//	
EXPORT_C CMPXCommand* TGlxCommandFactory::CopyCommandLC(const TDesC& aTargetDrive, 
    const CMPXCollectionPath& aSourcePath)
    {
    CMPXCommand* command = BasicCommandLC(KGlxCommandIdAdd, aSourcePath);
    
    // Set target drive
    command->SetTextValueL(KMPXMediaGeneralDrive, aTargetDrive);    
    
    return command;
    }
/// @todo minor: Rowland Cook 12/06/2007 Add method decription.
// -----------------------------------------------------------------------------
// TGlxCommandFactory::AddContainerCommandLC
// -----------------------------------------------------------------------------
//	
EXPORT_C CMPXCommand* TGlxCommandFactory::AddContainerCommandLC(const TDesC& aTitle, 
        TInt aCollectionUid)
    {
    CMPXCommand* command = CMPXCommand::NewL();
    CleanupStack::PushL(command);
    
    // Add collection plugin id to command object
    command->SetTObjectValueL<TUid>(KMPXCommandGeneralCollectionId, TUid::Uid(aCollectionUid));        
    
    // Set command id
    command->SetTObjectValueL<TInt>(KMPXCommandGeneralId, KGlxCommandIdAdd);    

    // Set title of new object
    command->SetTextValueL(KMPXMediaGeneralTitle, aTitle);        
    
    return command;
    }