×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Dec 2004
    Posts
    101

    CSearchLocation class declaration

    regarding the Example in

    http://wiki.forum.nokia.com/index.ph...g_GPS_location

    the example is missing the class CSearchLocation can someone Please Help

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,568

    Re: CSearchLocation class declaration

    That is a typo, you should write CLocation, the entire page is about that class.

  3. #3
    Regular Contributor
    Join Date
    Dec 2004
    Posts
    101

    Re: CSearchLocation class declaration

    sorry ???

    can you explain more

  4. #4
    Registered User
    Join Date
    Feb 2007
    Location
    India
    Posts
    1,128

    Re: CSearchLocation class declaration

    Hi Moja_a,

    Want to know, what's your requirement? That's class are used for getting GPS location (coordinate Latitude & longitude)....For more information go through SDK's help

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,568

    Re: CSearchLocation class declaration

    OMG, is it really so hard???

    That entire page shows a class called CLocation. The text also says "The CLocation class searches for the GPS location. If it does not get the location, it sleeps for 10 seconds and tries again."

    Now after that there are two lines, which supposed to show how to use this class. But unfortunately they write CSearchLocation in that small example.
    It should be
    Code:
    // Class that use CSearchLocation have to implement 
    // MPositionObserver interface. Via MPositionObserver are position
    // and error messages send.
    iSearchLocation = CLocation::NewL(1000000*10,*this); // it was CSearchLocation::NewL(1000000*10,*this);
     
    // Get current position
    TPositionInfoBase* pos = iSearchLocation->CurrentPosition();
    it may be better to rename that variable too
    Code:
    // Class that use CSearchLocation have to implement 
    // MPositionObserver interface. Via MPositionObserver are position
    // and error messages send.
    iLocation = CLocation::NewL(1000000*10,*this); // it was CSearchLocation::NewL(1000000*10,*this);
     
    // Get current position
    TPositionInfoBase* pos = iLocation->CurrentPosition();
    and note the remark: your object (what you pass as 'this') has to implement MPositionObserver. And iLocation has to be a member variable, "CLocation *iLocation;".

  6. #6
    Regular Contributor
    Join Date
    Dec 2004
    Posts
    101

    Re: CSearchLocation class declaration

    header file
    Code:
    class CGpsLocationEngine : public CBase, public MPositionObserver
    {
    
    public:
    
    static CGpsLocationEngine* NewL();
    
    CGpsLocationEngine();
    
    void ConstructL();
    
    virtual ~CGpsLocationEngine();
    
    void PositionUpdatedL(TPositionInfoBase& aPosInfo);
    void ErrorL(TInt aError);
    TPositionInfoBase* GetPositionInfoBase();
    void  GetDegreesString( const TReal64& aDegrees,TBuf<KDegreeLength>& aDegreesString) const;
    TDesC& LAT_LONG_String();
    
    private: //methods
    
    CLocation* iLocation;

    cpp file
    Code:
    /// Creation of the class with cleanup stack handling
    CGpsLocationEngine* CGpsLocationEngine::NewL()
    {
    CGpsLocationEngine* self = new (ELeave) CGpsLocationEngine();
    CleanupStack::PushL(self);
    self->ConstructL();
    CleanupStack::Pop(); // self
    return self;
    }
    
    CGpsLocationEngine::CGpsLocationEngine()
    {
    
    }
    void CGpsLocationEngine::ConstructL()
    {
    	if(!iLocation)
    		{
    		iLocation = CLocation::NewL(10000000, *this);
    		} else 
    			{
    			delete iLocation;
    			iLocation = CLocation::NewL(10000000, *this);
    			}
    }

    thanks for help
    is anything else I can do to make it better.

  7. #7
    Regular Contributor
    Join Date
    Dec 2004
    Posts
    101

    Re: CSearchLocation class declaration

    Now When I build the app
    Code:
    
    \S60\devices\Nokia_N97_SDK_v1.0\EPOC32\BUILD\Symbian\Carbide\workspace\GPS\group\GPS\GCCE\urel\ClientEngine.o: In function `CClientEngine::CClientEngine(MClientObserver&)':
    clientengine.cpp:(.text+0x54): undefined reference to `RSocketServ::RSocketServ()'
    clientengine.cpp:(.text+0x5c): undefined reference to `RConnection::RConnection()'
    \S60\devices\Nokia_N97_SDK_v1.0\EPOC32\BUILD\Symbian\Carbide\workspace\GPS\group\GPS\GCCE\urel\ClientEngine.o: In function `CClientEngine::CClientEngine(MClientObserver&)':
    clientengine.cpp:(.text+0xa8): undefined reference to `RSocketServ::RSocketServ()'
    clientengine.cpp:(.text+0xb0): undefined reference to `RConnection::RConnection()'
    \S60\devices\Nokia_N97_SDK_v1.0\EPOC32\BUILD\Symbian\Carbide\workspace\GPS\group\GPS\GCCE\urel\ClientEngine.o: In function `CClientEngine::~CClientEngine()':
    clientengine.cpp:(.text+0x10e): undefined reference to `RHTTPSession::Close()'
    clientengine.cpp:(.text+0x114): undefined reference to `RConnection::Close()'
    clientengine.cpp:(.text+0x128): undefined reference to `RConnection::~RConnection()'
    clientengine.cpp:(.text+0x13a): undefined reference to `RConnection::~RConnection()'
    \S60\devices\Nokia_N97_SDK_v1.0\EPOC32\BUILD\Symbian\Carbide\workspace\GPS\group\GPS\GCCE\urel\ClientEngine.o: In function `CClientEngine::~CClientEngine()':
    clientengine.cpp:(.text+0x182): undefined reference to `RHTTPSession::Close()'
    clientengine.cpp:(.text+0x188): undefined reference to `RConnection::Close()'
    clientengine.cpp:(.text+0x19c): undefined reference to `RConnection::~RConnection()'
    clientengine.cpp:(.text+0x1ae): undefined reference to `RConnection::~RConnection()'
    \S60\devices\Nokia_N97_SDK_v1.0\EPOC32\BUILD\Symbian\Carbide\workspace\GPS\group\GPS\GCCE\urel\ClientEngine.o: In function `CClientEngine::~CClientEngine()':
    clientengine.cpp:(.text+0x1f6): undefined reference to `RHTTPSession::Close()'
    clientengine.cpp:(.text+0x1fc): undefined reference to `RConnection::Close()'
    clientengine.cpp:(.text+0x210): undefined reference to `RConnection::~RConnection()'
    clientengine.cpp:(.text+0x228): undefined reference to `RConnection::~RConnection()'
    \S60\devices\Nokia_N97_SDK_v1.0\EPOC32\BUILD\Symbian\Carbide\workspace\GPS\group\GPS\GCCE\urel\ClientEngine.o: In function `CClientEngine::ConstructL()':
    clientengine.cpp:(.text+0x248): undefined reference to `CRepository::NewL(TUid)'
    \S60\devices\Nokia_N97_SDK_v1.0\EPOC32\BUILD\Symbian\Carbide\workspace\GPS\group\GPS\GCCE\urel\ClientEngine.o: In function `CClientEngine::SetupConnectionL()':
    clientengine.cpp:(.text+0x26a): undefined reference to `CRepository::Get(unsigned long, int&)'
    clientengine.cpp:(.text+0x29a): undefined reference to `RHTTPSession::OpenL()'
    clientengine.cpp:(.text+0x2b2): undefined reference to `REComSession::CreateImplementationL(TUid, long, void*)'
    clientengine.cpp:(.text+0x2c0): undefined reference to `CActiveApDb::NewL(TCommDbDatabaseType)'
    clientengine.cpp:(.text+0x2e8): undefined reference to `CApSettingsHandler::NewLC(CActiveApDb&, int, TSelectionListType, TSelectionMenuType, int, int, int, int, TVpnFilterType, int)'
    clientengine.cpp:(.text+0x2f2): undefined reference to `CApSettingsHandler::RunSettingsL(unsigned long, unsigned long&)'
    clientengine.cpp:(.text+0x324): undefined reference to `RHTTPSession::Close()'
    clientengine.cpp:(.text+0x32c): undefined reference to `RConnection::Close()'
    clientengine.cpp:(.text+0x360): undefined reference to `RSocketServ::Connect(unsigned int)'
    clientengine.cpp:(.text+0x378): undefined reference to `RConnection::Open(RSocketServ&, unsigned int)'
    clientengine.cpp:(.text+0x382): undefined reference to `TCommDbConnPref::TCommDbConnPref()'
    clientengine.cpp:(.text+0x38a): undefined reference to `TCommDbConnPref::SetDialogPreference(TCommDbDialogPref)'
    clientengine.cpp:(.text+0x392): undefined reference to `TCommDbConnPref::SetIapId(unsigned long)'
    clientengine.cpp:(.text+0x39a): undefined reference to `RConnection::Start(TConnPref&)'
    clientengine.cpp:(.text+0x3a4): undefined reference to `RHTTPSession::StringPool() const'
    clientengine.cpp:(.text+0x3ac): undefined reference to `RHTTPSession::ConnectionInfo() const'
    clientengine.cpp:(.text+0x3b2): undefined reference to `RHTTPSession::GetTable()'
    clientengine.cpp:(.text+0x3c8): undefined reference to `RStringPool::StringF(int, TStringTable const&) const'
    clientengine.cpp:(.text+0x3d2): undefined reference to `THTTPHdrVal::THTTPHdrVal(int)'
    clientengine.cpp:(.text+0x3e8): undefined reference to `RHTTPPropertySet::SetPropertyL(RStringF, THTTPHdrVal)'
    clientengine.cpp:(.text+0x3ec): undefined reference to `RHTTPSession::GetTable()'
    clientengine.cpp:(.text+0x3f8): undefined reference to `RStringPool::StringF(int, TStringTable const&) const'
    



    I checked the capability and library , they are all ok.

  8. #8
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,568

    Re: CSearchLocation class declaration

    The libraries can not be ok, these messages are exactly about missing libraries.

Similar Threads

  1. TAknsColorTableEntry declaration
    By william_j in forum Symbian User Interface
    Replies: 6
    Last Post: 2010-11-03, 12:25
  2. Gps Declaration?
    By mismael in forum Nokia N9
    Replies: 8
    Last Post: 2010-03-03, 19:43
  3. RMMFDataPath class declaration
    By mahantesh19 in forum Symbian C++
    Replies: 0
    Last Post: 2008-09-12, 05:57
  4. Should the class be an R class or a T class?
    By AshramArzephucque in forum Symbian C++
    Replies: 3
    Last Post: 2007-11-26, 19:37
  5. Replies: 8
    Last Post: 2007-03-23, 13:32

Posting Permissions

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