kerneltest/f32test/shostmassstorage/msman/app/cdisplay.cpp
changeset 33 0173bcd7697c
parent 0 a41df078684a
child 62 4a8fed1c0ef6
equal deleted inserted replaced
31:56f325a607ea 33:0173bcd7697c
   408 
   408 
   409 void CDisplay::FormatDriveInfoL(const TDriveInfo& aDriveInfo)
   409 void CDisplay::FormatDriveInfoL(const TDriveInfo& aDriveInfo)
   410     {
   410     {
   411     // Append battery, media and drive information to aBuffer
   411     // Append battery, media and drive information to aBuffer
   412     // Define descriptor constants using the _LIT macro
   412     // Define descriptor constants using the _LIT macro
   413     _LIT(KDriveInfo1, "iType=%02x    iDriveAtt=%02x");
   413     _LIT(KDriveInfo1, "iType=%02x %02x iDriveAtt=%04x");
   414     _LIT(KDriveInfo2, "iBattery=%02x iMediaAtt=%02x");
   414     _LIT(KDriveInfo2, "iMediaAtt=%02x");
   415     _LIT(KBatLow,"Battery low");
   415     _LIT(KConnectionBusInternal,"Connection Bus Internal");
   416     _LIT(KBatGood,"Battery good");
   416     _LIT(KConnectionBusUsb,"Connection Bus USB");
   417     _LIT(KBatNotSupported,"Battery not supported");
   417     _LIT(KConnectionBusUnknown,"Connection Bus Unknown");
   418     _LIT(KNotPresent,"No media present");
   418     _LIT(KNotPresent,"No media present");
   419     _LIT(KFloppy,"Media is floppy disk");
   419     _LIT(KFloppy,"Media is floppy disk");
   420     _LIT(KHard,"Media is hard disk");
   420     _LIT(KHard,"Media is hard disk");
   421     _LIT(KCDROM,"Media is CD-ROM");
   421     _LIT(KCDROM,"Media is CD-ROM");
   422     _LIT(KRam,"Media is RAM");
   422     _LIT(KRam,"Media is RAM");
   423     _LIT(KFlash,"Media is flash");
   423     _LIT(KFlash,"Media is flash");
   424     _LIT(KRom,"Media is ROM");
   424     _LIT(KRom,"Media is ROM");
   425     _LIT(KRemote,"Media is remote");
   425     _LIT(KRemote,"Media is remote");
       
   426     _LIT(KExternal,"Media is external");
   426     _LIT(KNANDFlash,"Media is NAND flash");
   427     _LIT(KNANDFlash,"Media is NAND flash");
   427     _LIT(KUnknown,"Media unknownl");
   428     _LIT(KUnknown,"Media unknown");
   428     _LIT(KDriveAtts,"Drive attributes:");
   429     _LIT(KDriveAtts,"Drive attributes:");
   429     _LIT(KLocal," local");
   430     _LIT(KLocal," local");
   430     _LIT(KROMDrive," ROM");
   431     _LIT(KROMDrive," ROM");
   431     _LIT(KRedirected," redirected");
   432     _LIT(KRedirected," redirected");
   432     _LIT(KSubstituted," substituted");
   433     _LIT(KSubstituted," substituted");
   441     _LIT(KHasPassword," has password");
   442     _LIT(KHasPassword," has password");
   442     _LIT(KWriteProtected," write-protected");
   443     _LIT(KWriteProtected," write-protected");
   443 
   444 
   444     TLine* line;
   445     TLine* line;
   445     line = iScrollWindow->NewLineL();
   446     line = iScrollWindow->NewLineL();
   446     line->Format(KDriveInfo1, TInt(aDriveInfo.iType), TInt(aDriveInfo.iDriveAtt));
   447     line->Format(KDriveInfo1, TInt(aDriveInfo.iType), TInt(aDriveInfo.iConnectionBusType), TInt(aDriveInfo.iDriveAtt));
   447 
   448 
   448     line = iScrollWindow->NewLineL();
   449     line = iScrollWindow->NewLineL();
   449     line->Format(KDriveInfo2, TInt(aDriveInfo.iBattery), TInt(aDriveInfo.iMediaAtt));
   450     line->Format(KDriveInfo2, TInt(aDriveInfo.iMediaAtt));
   450 
   451 
   451     line = iScrollWindow->NewLineL();
   452     line = iScrollWindow->NewLineL();
   452     switch (aDriveInfo.iBattery)
   453     switch (aDriveInfo.iConnectionBusType)
   453         {
   454         {
   454         case EBatLow:
   455         case EConnectionBusInternal:
   455             line->Append(KBatLow);
   456             line->Append(KConnectionBusInternal);
   456             break;
   457             break;
   457         case EBatGood:
   458         case EConnectionBusUsb:
   458             line->Append(KBatGood);
   459             line->Append(KConnectionBusUsb);
   459             break;
   460             break;
   460         default:
   461         default:
   461             line->Append(KBatNotSupported);
   462             line->Append(KConnectionBusUnknown);
   462         }
   463         }
   463 
   464 
   464     line = iScrollWindow->NewLineL();
   465     line = iScrollWindow->NewLineL();
   465     switch (aDriveInfo.iType)
   466     switch (aDriveInfo.iType)
   466             {
   467             {
   491         case EMediaNANDFlash:
   492         case EMediaNANDFlash:
   492             line->Append(KNANDFlash);
   493             line->Append(KNANDFlash);
   493             break;
   494             break;
   494         default:
   495         default:
   495             line->Append(KUnknown);
   496             line->Append(KUnknown);
   496 
       
   497         }
   497         }
   498 
   498 
   499         // Drive Attributes
   499         // Drive Attributes
   500         line = iScrollWindow->NewLineL();
   500         line = iScrollWindow->NewLineL();
   501         line->Append(KDriveAtts);
   501         line->Append(KDriveAtts);
   526             }
   526             }
   527         if (aDriveInfo.iDriveAtt & KDriveAttRemovable)
   527         if (aDriveInfo.iDriveAtt & KDriveAttRemovable)
   528             {
   528             {
   529             line = iScrollWindow->NewLineL();
   529             line = iScrollWindow->NewLineL();
   530             line->Append(KRemovable);
   530             line->Append(KRemovable);
       
   531             }
       
   532         if (aDriveInfo.iDriveAtt & KDriveAttExternal)
       
   533             {
       
   534             line = iScrollWindow->NewLineL();
       
   535             line->Append(KExternal);
   531             }
   536             }
   532 
   537 
   533         // Media Attributes
   538         // Media Attributes
   534         line = iScrollWindow->NewLineL();
   539         line = iScrollWindow->NewLineL();
   535         line->Append(KMediaAtts);
   540         line->Append(KMediaAtts);