Can I get acces to some additional API and docs what not included in symbian SDK? What should I do?
Can I get acces to some additional API and docs what not included in symbian SDK? What should I do?
Old symbian sources: project symbiandump:
http://www.developer.nokia.com/Commu...n-music-player
post #4 and #7
PDK docs:
http://www.symlab.org/main/documenta...erence/s3/pdk/
regards
pg
Plug-in packs: http://www.developer.nokia.com/Commu...DK_API_Plug-in and https://www.developer.nokia.com/Deve...ian_C++/Tools/ (see lower part of the page)
Anyway, if you are interested about some specific feature, it may be worth simply asking about it.
I need to switch from my app memory used for messages betweem phone memory and memory card. And I need answer from USB-server when phone was disconnected from pc or memory card was inserted. Here is state diagram :![]()
CMsvSession can give you a StoreManager, I would check that one.Check the various articles referred in http://www.developer.nokia.com/Commu...Card-InsertionAnd I need answer from USB-server when phone was disconnected from pc or memory card was inserted.
http://www.developer.nokia.com/Commu...ous_indicators may help with USB (the indicators can be read too, not only set). The main USB API is RUsb, but it will probably require some digging, it is not necessarily present in the SDK (I can not check now, it also applies to the MMsvStoreManager).
I find static functions Driveinfo::GetDriveStatus( RFs& aFs, TInt aDrive, TUint& aStatus ) where param aStatus Stores the drive status bit mask specified by TStatus. I don't understand how use this bitmask in switch-case operator. In this code only works default operator :
switch (status)
{
case 0x8 : //EDrivePresent
console->Write(_L("OK!\n"));
break;
default :
console->Write(_L("Default Error\n"));
break;
But there works fine :
if (status == 0x8)
{
console->Write(_L("Good!\n"));
}
What's wrong I do?
Probably one example can be
Hope thats what you are looking for?Code:TUint driveStatus; if (DriveInfo::GetDriveStatus(iFs, i, driveStatus) == KErrNone) { if (!(driveStatus & DriveInfo::EDriveRemovable)) { driveList[i] = KDriveAbsent; continue; } TDriveInfo driveInfo; if (iFs.Drive(driveInfo, i) == KErrNone) { if (driveInfo.iType == EMediaNotPresent) { driveList[i] = KDriveAbsent; } } }
Last edited by Symbian_Neil; 2013-03-29 at 17:20. Reason: typo
- Neil R.Bhasme -
Twitter: @Symbian_Neil
No. I want use in switch-case operator bitmask from driveStatus but I don't understand how use enums from TStatus instead bitmask numbers.
When I reject memory card bitmask in driveStatus was 3586 but driveStatus!=KDriveDismounted. I think what 3586 was created by bitwise operator AND...
Code:const TUint KDriveDismounted = (DriveInfo::EDriveRemovable|DriveInfo::EDriveRemote| DriveInfo::EDriveReadOnly|DriveInfo::EDriveSubsted| DriveInfo::EDriveExternallyMountable|DriveInfo::EDefaultRom|DriveInfo::EDefaultRam);
Last edited by SuperZANAC; 2013-03-30 at 16:02.
That is a bitwise OR operation (the "|"), and yes, it is often used for setting bits in a bitfield. Then you can test them with the binary AND ("&") as appears in Neil's post (#7). Checking bits in a bitfield can not be sanely wrapped into a switch-case construct, especially since there are usually more than one bits are going to be set. That is the point of having a bitfield.
This KDriveDismounted=... in #8 looks a bit suspicious. Did you find it in some header file?
KDriveDismounted is mine work. I wish use it instead ugly numbers but this const doesn't work. I saw how Driveinfo::GetDriveStatus() realize in driveinfo.cpp in S^3 source.
Enums for bitmask defined in "epoc32/include/driveinfo.h". Also in this header was defined static class DriveInfo with some examples which not present S60_5th_Edition_Cpp_Developers_Library_v2_1_en.zip.
I got bitmask values in decimal numbers by this code :
Bitmask value vas for :Code:_LIT(KStatusDriveDec,"\nDec Bitmask Status is : %d"); console->Printf( KStatusDriveDec, status);
USB : 101962
Memcard phisically removed : 3586
In normal mode : 118282
This code vorks fine :
Code:switch (status) { case 3586 : //Card rejected 3586// console->Write(_L("\nDisk Dismounted!\n")); break; case 101962 :// USB console->Write(_L("\nYup! USB!\n")); break; case 118282 : //Memory card is present // 118282 - %d console->Write(_L("\nOK!\n")); break; default : console->Write(_L("\nDefault Error\n")); break; }
Last edited by SuperZANAC; 2013-03-31 at 20:34.