×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    413

    Undefined Identifier-RBasicGsmPhone and MBasicGsmPhoneNetwork.

    hi all,

    i m developing an application for series 60 devices to get Cell ID.I took reference of following thread and specifically code snippet given by yucca.The post no 6.

    http://discussion.forum.nokia.com/fo...=19693&page=21

    But i am getting Undefined Identifier for RBasicGsmPhone and MBasicGsmPhoneNetwork. I tried on google,forum,newLC for the header files and lib files.All i got is header file required is etelbgsm.h.

    But i was unable to find this header file in all above 3 sites.Pls give me this header file and corresponding lib file.

    Thanks in Advance.

    Rohanwaugh.

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: Undefined Identifier-RBasicGsmPhone and MBasicGsmPhoneNetwork.

    You propably should have checked the date when it was written, it is really old thread, and those APIs are for Symbian OS 6.x, i.e. 1st edition.. With 3rd edition you should use CTelephony API instead.

  3. #3
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: Undefined Identifier-RBasicGsmPhone and MBasicGsmPhoneNetwork.

    rohanwaugh, see these articles in Wiki for getting examples how to get Cell ID information using CTelephony:
    - Cell ID with CTelephony
    - Find Out Cell ID in 3rd Edition

  4. #4
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    413

    Re: Undefined Identifier-RBasicGsmPhone and MBasicGsmPhoneNetwork.

    hi symbianyucca,


    u are right.But i also use the code which uses CTelephony API's.i got that code from some link.It has been implemented using Active object.i build my application for Navigator.But i didn't get Cell ID.I am giving the .cpp and .h files for your reference.


    NetworkApp.h

    #ifndef NETWORKAPP_H_
    #define NETWORKAPP_H_

    #include <e32base.h>
    #include <Etel3rdParty.h>

    class CNetworkApp : public CActive
    {

    private:
    void ConstructL();
    CTelephony* iTelephony;
    CTelephony::TNetworkInfoV1 iNetworkInfoV1;
    public:
    CNetworkApp(TUint& CellId,TDes& NetworkId,TDes& CountryId,TDes& LongName);
    static void GetNetworkParameters(TUint& CellId,TDes& NetworkId,TDes& CountryId,TDes& LongName);
    TUint& iCellID;
    TDes& iNetworkID;
    TDes& iCountryCODE;
    TDes& iLongNAME;
    private:
    /*
    These are the pure virtual methods from CActive that
    MUST be implemented by all active objects
    */
    void RunL();
    void DoCancel();
    };

    NetworkApp.cpp
    #include "NetworkApp.h"
    #include "LogFile.h"

    void CNetworkApp::GetNetworkParameters(TUint& aCellID, TDes& aNetworkID, TDes& aCountryCODE, TDes& aLongName)
    {
    CNetworkApp* self= new(ELeave) CNetworkApp(aCellID,aNetworkID,aCountryCODE,aLongName);
    CleanupStack::PushL(self);
    self->ConstructL();
    CleanupStack::PopAndDestroy(self);
    }

    void CNetworkApp::ConstructL()
    {
    iTelephony = CTelephony::NewL();
    CActiveScheduler::Add(this);
    CTelephony::TNetworkInfoV1Pckg iNetworkInfoV1Pckg(iNetworkInfoV1);

    iTelephony->GetCurrentNetworkInfo(iStatus, iNetworkInfoV1Pckg);
    SetActive();
    CActiveScheduler::Start();

    }
    CNetworkApp:: CNetworkApp(TUint& aCellID,TDes& aNetworkID,TDes& aCountryCODE,TDes& aLongName): CActive(EPriorityStandard),
    iCellID(aCellID),iNetworkID(aNetworkID),iCountryCODE(aCountryCODE),iLongNAME(aLongName)
    {
    //default constructor
    }

    void CNetworkApp::RunL()
    {
    const TDesC& aPath(_L("C:\\Data\\CellID.txt"));
    LogFile* myLogFile= LogFile::NewL(aPath);

    if(iStatus==KErrNone)
    {
    iCellID = iNetworkInfoV1.iCellId;
    iNetworkID = iNetworkInfoV1.iNetworkId;
    iCountryCODE = iNetworkInfoV1.iCountryCode;
    iLongNAME= iNetworkInfoV1.iLongName;
    TBuf8<15> temp;
    temp.Append(iCellID);
    myLogFile->WriteLog(temp);
    CActiveScheduler::Stop();



    }
    }

    void CNetworkApp:oCancel()
    {
    iTelephony->CancelAsync(CTelephony::EGetCurrentNetworkInfoCancel);
    }


    And m invoking this class in AppUi's HandleCommandL() as below-

    CNetworkApp::GetNetworkParameters(CellId,NetworkId,CountryId,OperatorLongName);

    i use log file to write Cell Id got.But m not geting CellId..
    Pls correct me if there is anything wrong.

    Rohanwaugh

  5. #5
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: Undefined Identifier-RBasicGsmPhone and MBasicGsmPhoneNetwork.

    I would look for the version that does not use the ActiveScheduler::Startm, it might work better, also what capabilities you have given to your process, and if it does not work, then you should debug it and see what does get executed, and what does not.

Posting Permissions

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