javaextensions/location/landmarks/inc/tlapisearchcriteria.inl
branchRCL_3
changeset 14 04becd199f91
equal deleted inserted replaced
13:f5050f1da672 14:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Defines a landmark search criteria
       
    15 *
       
    16 */
       
    17 
       
    18 // ---------------------------------------------------------------------------
       
    19 // TLAPISearchCriteria::TLAPISearchCriteria
       
    20 // ---------------------------------------------------------------------------
       
    21 //
       
    22 inline TLAPISearchCriteria::TLAPISearchCriteria() :
       
    23         iText(NULL),
       
    24         iCategoryName(NULL),
       
    25         iSouthLatitude(KErrNotFound),
       
    26         iNorthLatitude(KErrNotFound),
       
    27         iWestLongitude(KErrNotFound),
       
    28         iEastLongitude(KErrNotFound)
       
    29 {
       
    30 }
       
    31 
       
    32 // ---------------------------------------------------------------------------
       
    33 // TLAPISearchCriteria::SetTextAttributes
       
    34 // ---------------------------------------------------------------------------
       
    35 //
       
    36 inline void TLAPISearchCriteria::SetTextAttributes(TUint aTextAttributes)
       
    37 {
       
    38     iTextAttributes = aTextAttributes;
       
    39 }
       
    40 
       
    41 // ---------------------------------------------------------------------------
       
    42 // TLAPISearchCriteria::SetText
       
    43 // ---------------------------------------------------------------------------
       
    44 //
       
    45 inline void TLAPISearchCriteria::SetText(const TDesC* aText)
       
    46 {
       
    47     iText = aText;
       
    48 }
       
    49 
       
    50 // ---------------------------------------------------------------------------
       
    51 // TLAPISearchCriteria::SetCategoryName
       
    52 // ---------------------------------------------------------------------------
       
    53 //
       
    54 inline void TLAPISearchCriteria::SetCategoryName(const TDesC* aCategoryName)
       
    55 {
       
    56     iCategoryName = aCategoryName;
       
    57 }
       
    58 
       
    59 // ---------------------------------------------------------------------------
       
    60 // TLAPISearchCriteria::SetArea
       
    61 // ---------------------------------------------------------------------------
       
    62 //
       
    63 inline void TLAPISearchCriteria::SetArea(
       
    64     const TReal64& aSouthLatitude,
       
    65     const TReal64& aNorthLatitude,
       
    66     const TReal64& aWestLongitude,
       
    67     const TReal64& aEastLongitude)
       
    68 {
       
    69     iSouthLatitude = aSouthLatitude;
       
    70     iNorthLatitude = aNorthLatitude;
       
    71     iWestLongitude = aWestLongitude;
       
    72     iEastLongitude = aEastLongitude;
       
    73 }
       
    74 
       
    75 // ---------------------------------------------------------------------------
       
    76 // TLAPISearchCriteria::TextAttributes
       
    77 // ---------------------------------------------------------------------------
       
    78 //
       
    79 inline TUint TLAPISearchCriteria::TextAttributes() const
       
    80 {
       
    81     return iTextAttributes;
       
    82 }
       
    83 
       
    84 // ---------------------------------------------------------------------------
       
    85 // TLAPISearchCriteria::Text
       
    86 // ---------------------------------------------------------------------------
       
    87 //
       
    88 inline const TDesC* TLAPISearchCriteria::Text() const
       
    89 {
       
    90     return iText;
       
    91 }
       
    92 
       
    93 // ---------------------------------------------------------------------------
       
    94 // TLAPISearchCriteria::CategoryName
       
    95 // ---------------------------------------------------------------------------
       
    96 //
       
    97 inline const TDesC* TLAPISearchCriteria::CategoryName() const
       
    98 {
       
    99     return iCategoryName;
       
   100 }
       
   101 
       
   102 // ---------------------------------------------------------------------------
       
   103 // TLAPISearchCriteria::HasValidCoordinates
       
   104 // ---------------------------------------------------------------------------
       
   105 //
       
   106 inline TBool TLAPISearchCriteria::HasValidCoordinates() const
       
   107 {
       
   108     if (iSouthLatitude != KErrNotFound &&
       
   109             iNorthLatitude != KErrNotFound &&
       
   110             iWestLongitude != KErrNotFound &&
       
   111             iEastLongitude != KErrNotFound)
       
   112     {
       
   113         return ETrue;
       
   114     }
       
   115 
       
   116     return EFalse;
       
   117 }
       
   118 
       
   119 // ---------------------------------------------------------------------------
       
   120 // TLAPISearchCriteria::GetArea
       
   121 // ---------------------------------------------------------------------------
       
   122 //
       
   123 inline void TLAPISearchCriteria::GetArea(
       
   124     TReal64& aSouthLatitude,
       
   125     TReal64& aNorthLatitude,
       
   126     TReal64& aWestLongitude,
       
   127     TReal64& aEastLongitude) const
       
   128 {
       
   129     aSouthLatitude = iSouthLatitude;
       
   130     aNorthLatitude = iNorthLatitude;
       
   131     aWestLongitude = iWestLongitude;
       
   132     aEastLongitude = iEastLongitude;
       
   133 }
       
   134 
       
   135 // End of file