plugin/poi/geonames/provider/inc/Entry.h
changeset 0 c316ab048e9d
equal deleted inserted replaced
-1:000000000000 0:c316ab048e9d
       
     1 /*
       
     2  * Name        : Entry.h
       
     3  * Description : Encapsulates a findNearbyWikipedia entry
       
     4  * Project     : This file is part of OpenMAR, an Open Mobile Augmented Reality browser
       
     5  * Website     : http://OpenMAR.org
       
     6  *
       
     7  * Copyright (c) 2010 David Caabeiro
       
     8  *
       
     9  * All rights reserved. This program and the accompanying materials are made available 
       
    10  * under the terms of the Eclipse Public License v1.0 which accompanies this 
       
    11  * distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
       
    12  *
       
    13  */
       
    14 
       
    15 #ifndef ENTRY_H_
       
    16 #define ENTRY_H_
       
    17 
       
    18 #include <e32base.h>
       
    19 #include <EPos_CPosLandmark.h>
       
    20 
       
    21 class CEntry : public CBase
       
    22 {
       
    23 public:
       
    24     static CEntry* NewL();
       
    25     ~CEntry();
       
    26 
       
    27 protected:
       
    28     CEntry();
       
    29     void ConstructL();
       
    30 
       
    31 public:
       
    32     void Reset();
       
    33 
       
    34     void EnterState(const TDesC8& aTag);
       
    35     void ExitState();
       
    36     void FeedState(const TDesC8& aBytes);
       
    37 
       
    38 //    TBool IsValid() const;
       
    39 
       
    40 protected:
       
    41 
       
    42 private:
       
    43     enum TState {
       
    44         EUnknown,
       
    45         ETitle,
       
    46         ESummary,
       
    47 //        EFeature,
       
    48         EElevation,
       
    49         ELat,
       
    50         ELng,
       
    51         EWikipediaUrl
       
    52     } iState;
       
    53 
       
    54 //private:
       
    55 public:
       
    56     // Limits should be defined by provider (geonames.org)
       
    57     TBuf8<KPosLmMaxTextFieldLength> iTitle;
       
    58     TBuf8<KPosLmMaxDescriptionLength> iSummary;
       
    59 //    TBuf8<KPosLmMaxCategoryNameLength> iFeature;
       
    60     TBuf8<KDefaultRealWidth> iElevation;
       
    61     TBuf8<KDefaultRealWidth> iLat;
       
    62     TBuf8<KDefaultRealWidth> iLng;
       
    63     TBuf8<KPosLmMaxTextFieldLength> iWikipediaUrl;
       
    64 };
       
    65 
       
    66 #endif  // ENTRY_H_