author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:33:34 +0100 | |
branch | Symbian3 |
changeset 4 | 837f303aceeb |
parent 2 | 2fe1408b6811 |
permissions | -rw-r--r-- |
williamr@2 | 1 |
/* |
williamr@2 | 2 |
* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 3 |
* All rights reserved. |
williamr@2 | 4 |
* This component and the accompanying materials are made available |
williamr@4 | 5 |
* under the terms of "Eclipse Public License v1.0" |
williamr@2 | 6 |
* which accompanies this distribution, and is available |
williamr@4 | 7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
williamr@2 | 8 |
* |
williamr@2 | 9 |
* Initial Contributors: |
williamr@2 | 10 |
* Nokia Corporation - initial contribution. |
williamr@2 | 11 |
* |
williamr@2 | 12 |
* Contributors: |
williamr@2 | 13 |
* |
williamr@2 | 14 |
* Description: CPosLmCatNameCriteria class |
williamr@2 | 15 |
* |
williamr@2 | 16 |
*/ |
williamr@2 | 17 |
|
williamr@2 | 18 |
|
williamr@2 | 19 |
#ifndef CPOSLMCATNAMECRITERIA_H |
williamr@2 | 20 |
#define CPOSLMCATNAMECRITERIA_H |
williamr@2 | 21 |
|
williamr@2 | 22 |
#include <e32base.h> |
williamr@2 | 23 |
#include "EPos_CPosLmSearchCriteria.h" |
williamr@2 | 24 |
|
williamr@2 | 25 |
/** |
williamr@2 | 26 |
* Criterion for searching landmark categories with a certain name. |
williamr@2 | 27 |
* |
williamr@2 | 28 |
* Wild-card characters are supported. |
williamr@2 | 29 |
* |
williamr@2 | 30 |
* The client specifies the search pattern and starts the search using |
williamr@2 | 31 |
* @ref CPosLandmarkSearch. The search returns all categories which |
williamr@2 | 32 |
* match the search pattern. |
williamr@2 | 33 |
* |
williamr@2 | 34 |
* This criterion is only valid when searching for landmark categories, i.e. if |
williamr@2 | 35 |
* it is passed to @p CPosLandmarkSearch::StartLandmarkSearchL, the function |
williamr@2 | 36 |
* will fail with error code @p KErrArgument. |
williamr@2 | 37 |
* |
williamr@2 | 38 |
* @lib eposlmsearchlib.lib |
williamr@2 | 39 |
* @since S60 3.0 |
williamr@2 | 40 |
*/ |
williamr@2 | 41 |
class CPosLmCatNameCriteria : public CPosLmSearchCriteria |
williamr@2 | 42 |
{ |
williamr@2 | 43 |
public: |
williamr@2 | 44 |
|
williamr@2 | 45 |
/** |
williamr@2 | 46 |
* Two-phased constructor. |
williamr@2 | 47 |
* @returns A new instance of this class. |
williamr@2 | 48 |
*/ |
williamr@2 | 49 |
IMPORT_C static CPosLmCatNameCriteria* NewLC(); |
williamr@2 | 50 |
|
williamr@2 | 51 |
/** |
williamr@2 | 52 |
* Destructor. |
williamr@2 | 53 |
*/ |
williamr@2 | 54 |
virtual ~CPosLmCatNameCriteria(); |
williamr@2 | 55 |
|
williamr@2 | 56 |
public: |
williamr@2 | 57 |
|
williamr@2 | 58 |
/** |
williamr@2 | 59 |
* Retrieves the search pattern. |
williamr@2 | 60 |
* |
williamr@2 | 61 |
* @return The category name search pattern. |
williamr@2 | 62 |
*/ |
williamr@2 | 63 |
IMPORT_C TPtrC SearchPattern() const; |
williamr@2 | 64 |
|
williamr@2 | 65 |
/** |
williamr@2 | 66 |
* Sets the search pattern. |
williamr@2 | 67 |
* |
williamr@2 | 68 |
* A non-empty search pattern must be set, otherwise |
williamr@2 | 69 |
* @ref CPosLandmarkSearch::StartCategorySearchL will leave with error |
williamr@2 | 70 |
* code @p KErrArgument. |
williamr@2 | 71 |
* |
williamr@2 | 72 |
* The search is case insensitive. |
williamr@2 | 73 |
* |
williamr@2 | 74 |
* Wild-card characters "?" and "*" are supported in the search string. |
williamr@2 | 75 |
* "?" matches a single occurrence of any character and "*" matches |
williamr@2 | 76 |
* zero or more consecutive occurrences of any characters. |
williamr@2 | 77 |
* |
williamr@2 | 78 |
* @param[in] aSearchPattern The pattern used to find categories. |
williamr@2 | 79 |
* |
williamr@2 | 80 |
* @leave KErrArgument The search pattern is longer than |
williamr@2 | 81 |
* @p KPosLmMaxCategoryNameLength. |
williamr@2 | 82 |
*/ |
williamr@2 | 83 |
IMPORT_C void SetSearchPatternL( const TDesC& aSearchPattern ); |
williamr@2 | 84 |
|
williamr@2 | 85 |
private: |
williamr@2 | 86 |
|
williamr@2 | 87 |
CPosLmCatNameCriteria(); |
williamr@2 | 88 |
|
williamr@2 | 89 |
void ConstructL(); |
williamr@2 | 90 |
|
williamr@2 | 91 |
// Prohibit copy constructor |
williamr@2 | 92 |
CPosLmCatNameCriteria( const CPosLmCatNameCriteria& ); |
williamr@2 | 93 |
// Prohibit assigment operator |
williamr@2 | 94 |
CPosLmCatNameCriteria& operator= ( const CPosLmCatNameCriteria& ); |
williamr@2 | 95 |
|
williamr@2 | 96 |
private: |
williamr@2 | 97 |
|
williamr@2 | 98 |
HBufC* iSearchPattern; |
williamr@2 | 99 |
|
williamr@2 | 100 |
}; |
williamr@2 | 101 |
|
williamr@2 | 102 |
#endif // CPOSLMCATNAMECRITERIA_H |
williamr@2 | 103 |
|
williamr@2 | 104 |