epoc32/include/mw/epos_cposlmcategorycriteria.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/mw/epos_cposlmcategorycriteria.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mw/epos_cposlmcategorycriteria.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,157 @@
     1.4 -epos_cposlmcategorycriteria.h
     1.5 +/*
     1.6 +* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). 
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description:  CPosLmCategoryCriteria class
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#ifndef CPOSLMCATEGORYCRITERIA_H
    1.24 +#define CPOSLMCATEGORYCRITERIA_H
    1.25 +
    1.26 +#include <e32base.h>
    1.27 +#include <EPos_Landmarks.h>
    1.28 +
    1.29 +#include "EPos_CPosLmSearchCriteria.h"
    1.30 +
    1.31 +/**
    1.32 +*  Criterion used for searching for landmarks which belong to a certain
    1.33 +*  category.
    1.34 +*
    1.35 +*  A category has an ID in the database and it has also a unique name. There
    1.36 +*  are also some global categories which are known by all databases. It is
    1.37 +*  possible to specify either a local category in a specific landmark
    1.38 +*  database, a global category or the name of the category. If one is set,
    1.39 +*  the others are reset and not used.
    1.40 +*
    1.41 +*  It is also possible to search for uncategorized landmarks, i.e. landmarks
    1.42 +*  which do not contain any categories. If neither item ID, global ID nor name
    1.43 +*  are set, then @ref CPosLandmarkSearch::StartLandmarkSearchL will search for
    1.44 +*  uncategorized landmarks.
    1.45 +*
    1.46 +*  This criterion is only valid when searching for landmarks, i.e. if it
    1.47 +*  is passed to @p CPosLandmarkSearch::StartCategorySearchL, the function
    1.48 +*  will fail with error code @p KErrArgument.
    1.49 +*
    1.50 +*  @lib eposlmsearchlib.lib
    1.51 +*  @since S60 3.0
    1.52 +*/
    1.53 +class CPosLmCategoryCriteria : public CPosLmSearchCriteria
    1.54 +    {
    1.55 +    public:
    1.56 +
    1.57 +        /**
    1.58 +        * Two-phased constructor.
    1.59 +        *
    1.60 +        * @returns A new instance of this class.
    1.61 +        */
    1.62 +        IMPORT_C static CPosLmCategoryCriteria* NewLC();
    1.63 +
    1.64 +        /**
    1.65 +        * Destructor.
    1.66 +        */
    1.67 +        virtual ~CPosLmCategoryCriteria();
    1.68 +
    1.69 +    public:
    1.70 +
    1.71 +        /**
    1.72 +        * Returns the item ID of the category which should be used as
    1.73 +        * landmark search criterion.
    1.74 +        *
    1.75 +        * @return The item ID of the category or @p KPosLmNullItemId
    1.76 +        *   if not set.
    1.77 +        */
    1.78 +        IMPORT_C TPosLmItemId CategoryItemId() const;
    1.79 +
    1.80 +        /**
    1.81 +        * Returns the global category which should be used as landmark search
    1.82 +        * criterion.
    1.83 +        *
    1.84 +        * @return The global category or @p KPosLmNullGlobalCategory if not
    1.85 +        *   set.
    1.86 +        */
    1.87 +        IMPORT_C TPosLmGlobalCategory GlobalCategory() const;
    1.88 +
    1.89 +        /**
    1.90 +        * Returns the name of the category which should be used as landmark
    1.91 +        * search criterion.
    1.92 +        *
    1.93 +        * @return The category name or empty descriptor if not
    1.94 +        *   set.
    1.95 +        */
    1.96 +        IMPORT_C TPtrC CategoryName() const;
    1.97 +
    1.98 +        /**
    1.99 +        * Sets the item ID of the category which should be used as landmark
   1.100 +        * search criterion.
   1.101 +        *
   1.102 +        * Passing @p KPosLmNullItemId means uncategorized landmarks search.
   1.103 +        *
   1.104 +        * @param aItemId The item ID of the category.
   1.105 +        */
   1.106 +        IMPORT_C void SetCategoryItemId( TPosLmItemId aItemId );
   1.107 +
   1.108 +        /**
   1.109 +        * Sets the global category which should be used as landmark search
   1.110 +        * criterion.
   1.111 +        *
   1.112 +        * Passing @p KPosLmNullGlobalCategory means uncategorized landmarks
   1.113 +        * search.
   1.114 +        *
   1.115 +        * @param aGlobalCategory The global category.
   1.116 +        */
   1.117 +        IMPORT_C void SetGlobalCategory( TPosLmGlobalCategory aGlobalCategory );
   1.118 +
   1.119 +        /**
   1.120 +        * Sets the name of the category which should be used as landmark
   1.121 +        * search criterion.
   1.122 +        *
   1.123 +        * The exact category name must be specified. Wild-card characters are
   1.124 +        * not used as such, they will be considered as ordinary characters.
   1.125 +        * It is possible to use @ref CPosLmCatNameCriteria to
   1.126 +        * list categories which match a category name pattern containing
   1.127 +        * wild-card characters.
   1.128 +        *
   1.129 +        * The matching is case sensitive.
   1.130 +        *
   1.131 +        * An empty descriptor means uncategorized landmarks search.
   1.132 +        *
   1.133 +        * @param aCategoryName The category name.
   1.134 +        *
   1.135 +        * @leave KErrArgument The category name is longer than @p KPosLmMaxCategoryNameLength.
   1.136 +        */
   1.137 +        IMPORT_C void SetCategoryNameL( const TDesC&  aCategoryName );
   1.138 +
   1.139 +    private:
   1.140 +
   1.141 +        // C++ constructor
   1.142 +        CPosLmCategoryCriteria();
   1.143 +
   1.144 +        void ConstructL();
   1.145 +
   1.146 +        // Prohibit copy constructor
   1.147 +        CPosLmCategoryCriteria( const CPosLmCategoryCriteria& );
   1.148 +        // Prohibit assigment operator
   1.149 +        CPosLmCategoryCriteria& operator= ( const CPosLmCategoryCriteria& );
   1.150 +
   1.151 +    private:
   1.152 +
   1.153 +        TPosLmItemId            iItemId;
   1.154 +        TPosLmGlobalCategory    iGlobalCategory;
   1.155 +        HBufC*                  iCategoryName;
   1.156 +
   1.157 +    };
   1.158 +
   1.159 +#endif      // CPOSLMCATEGORYCRITERIA_H
   1.160 +
   1.161 +