×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    32

    Question Symbian developer program

    Can I get acces to some additional API and docs what not included in symbian SDK? What should I do?

  2. #2
    Registered User
    Join Date
    Jan 2005
    Location
    Italy
    Posts
    639

    Re: Symbian developer program

    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

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: Symbian developer program

    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.

  4. #4
    Registered User
    Join Date
    Jul 2007
    Posts
    32

    Re: Symbian developer program

    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 :

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: Symbian developer program

    Quote Originally Posted by SuperZANAC View Post
    I need to switch from my app memory used for messages betweem phone memory and memory card.
    CMsvSession can give you a StoreManager, I would check that one.
    And I need answer from USB-server when phone was disconnected from pc or memory card was inserted.
    Check the various articles referred in http://www.developer.nokia.com/Commu...Card-Insertion
    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).

  6. #6
    Registered User
    Join Date
    Jul 2007
    Posts
    32

    Re: Symbian developer program

    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?

  7. #7
    Nokia Developer Moderator
    Join Date
    Oct 2006
    Location
    Finland
    Posts
    4,542

    Re: Symbian developer program

    Probably one example can be
    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;  
                     }  
                 }  
             }
    Hope thats what you are looking for?
    Last edited by Symbian_Neil; 2013-03-29 at 17:20. Reason: typo

  8. #8
    Registered User
    Join Date
    Jul 2007
    Posts
    32

    Re: Symbian developer program

    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.

  9. #9
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: Symbian developer program

    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?

  10. #10
    Registered User
    Join Date
    Jul 2007
    Posts
    32

    Re: Symbian developer program

    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 :

    Code:
    _LIT(KStatusDriveDec,"\nDec Bitmask Status is : %d");
    console->Printf( KStatusDriveDec, status);
    Bitmask value vas for :
    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.

Similar Threads

  1. developer certificate program
    By himsymbian in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 7
    Last Post: 2008-07-31, 12:15
  2. Can a Symbian C++ client program communicate with a program residing on a webserver ?
    By razas in forum Symbian Networking & Messaging (Closed)
    Replies: 21
    Last Post: 2007-11-19, 17:33
  3. JavaPhone developer program
    By Lorton in forum PersonalJava
    Replies: 0
    Last Post: 2003-10-08, 20:56

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×