Ejemplo n.º 1
0
TBool CMMCMonitorAO::StartMonitoring( MMMCMonitorObserver& aObserver, RArray<TMdEMediaInfo>& aMedias )
	{
	WRITELOG( "CMMCMonitorAO::StartMonitoring" ); // DEBUG INFO

	iObserver = &aObserver;
	
    BuildDriveList();
    
    const TInt count( aMedias.Count() );
    for ( TInt i = 0; i < count; i++ )
    	{
    	TInt drive(0);
    	const TInt err = iFs.CharToDrive( aMedias[i].iDrive, drive );
    	if ( err == KErrNone )
    		{
    		WRITELOG2( "CMMCMonitorAO::StartMonitoring - set drive %d mediaid to %d ", drive, aMedias[i].iMediaId );
    		iDriveList[drive] = 1; // fake value for startup (not KDriveAbsent)
        	iMediaIdList[drive] = aMedias[i].iMediaId;
    		}
    	}
    
	iPreviousDriveList.Zero();
	iPreviousDriveList.Copy( iDriveList );

#ifdef _DEBUG
	PrintAllLists();
#endif

	CompareDriveLists();

	StartNotify();
	
	return ETrue;
	}
Ejemplo n.º 2
0
void CMMCMonitorAO::RunL()
	{
#ifdef _DEBUG
	WRITELOG1( "CMMCMonitorAO::RunL iStatus: %d", iStatus.Int() ); // DEBUG INFO
#endif

	if ( iStatus.Int() != KErrNone )
		{
		StartNotify();
		return;
		}

	StartNotify();
	
	iPreviousDriveList.Zero();
	iPreviousDriveList.Copy( iDriveList );

	BuildDriveList();

#ifdef _DEBUG
	PrintAllLists();
#endif

	CompareDriveLists();

#ifdef _DEBUG
	PrintAllLists();
#endif
	}
Ejemplo n.º 3
0
/*
 *  Initialize the dialog box
 */
static void InitDlgBox(WINDOW wnd)
{
    if (*FileSpec)
        PutItemText(wnd, ID_FILENAME, FileSpec);
	if (BuildFileList(wnd, SrchSpec))
		BuildDirectoryList(wnd);
	BuildDriveList(wnd);
	BuildPathDisplay(wnd);
}