epoc32/include/cntviewfindconfig.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
     1.1 --- a/epoc32/include/cntviewfindconfig.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,94 +0,0 @@
     1.4 -// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 -// All rights reserved.
     1.6 -// This component and the accompanying materials are made available
     1.7 -// 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.8 -// which accompanies this distribution, and is available
     1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 -//
    1.11 -// Initial Contributors:
    1.12 -// Nokia Corporation - initial contribution.
    1.13 -//
    1.14 -// Contributors:
    1.15 -//
    1.16 -// Description:
    1.17 -//
    1.18 -
    1.19 -#ifndef __CNTVIEWFINDCONFIG_H__
    1.20 -#define __CNTVIEWFINDCONFIG_H__
    1.21 -
    1.22 -#include <e32base.h>
    1.23 -#include "ecom/ecom.h"		// For REComSession
    1.24 -
    1.25 -class CContactViewFindConfigInterface : public CBase
    1.26 -/** An interface class that enables implementers to configure the way in which 
    1.27 -words are matched in CContactViewBase::ContactsMatchingCriteriaL() and CContactViewBase::ContactsMatchingPrefixL().
    1.28 -
    1.29 -By default these two functions use TDesC16::MatchC() to do the matching, but 
    1.30 -where this is not appropriate, for instance in Chinese locales, a plug-in 
    1.31 -that implements this interface should be supplied. The plug-in's UID should 
    1.32 -be passed to CContactViewBase::SetViewFindConfigPlugin(), then the plug-in 
    1.33 -will be loaded when ContactsMatchingCriteriaL() or ContactsMatchingPrefixL() 
    1.34 -is called. Note that the plug-in is only loaded once per view, not each time 
    1.35 -a find is requested. Note also that the plug-in is optional. If no plug-in 
    1.36 -is supplied, TDesC16::MatchC() is used instead. 
    1.37 -@publishedPartner
    1.38 -@released
    1.39 -*/
    1.40 -	{
    1.41 -	public:
    1.42 -	static CContactViewFindConfigInterface* NewL(TUid aImplementationUid);
    1.43 -	inline virtual ~CContactViewFindConfigInterface();
    1.44 -	//pure virtual methods to be implemented by the plugin.
    1.45 -	/** May be used by the implementor of the interface to provide construction-like 
    1.46 -	behaviour.
    1.47 -	
    1.48 -	For example, it might be used to open a connection to a predictive text input 
    1.49 -	database, or might be used for reference counting of shared objects (using 
    1.50 -	TLS to store the data). */
    1.51 -	virtual void OpenL() = 0;
    1.52 -	/** May be used by the implementor of the interface to provide destruction-like 
    1.53 -	behaviour.
    1.54 -	
    1.55 -	For example, it might be used to close a connection to a predictive text input 
    1.56 -	database, or might be used for reference counting of shared objects (using 
    1.57 -	TLS to store the data). */
    1.58 -	virtual void Close() = 0;
    1.59 -	/** Searches for a string with wildcards in a single field in a contact item.
    1.60 -	
    1.61 -	@param aContactsField The contents of the contact item field to search.
    1.62 -	@param aWord The string to search for in aContactsField. Note that it contains 
    1.63 -	a '*' wildcard character at the end and optionally one at the beginning, depending 
    1.64 -	on whether ContactsMatchingCriteriaL() or ContactsMatchingPrefixL() was called.
    1.65 -	@return ETrue if aWord is found in aContactsField. EFalse if not. */
    1.66 -	virtual TBool Match(const TDesC& aContactsField, const TDesC& aWord) = 0;
    1.67 -	/** Tests whether a specified word is valid to be matched by the plug-in's implementation 
    1.68 -	of Match().
    1.69 -	
    1.70 -	For instance, in an implementation for a Chinese locale, this function would 
    1.71 -	return EFalse for non-Chinese words.
    1.72 -	
    1.73 -	Any words that are not valid to be matched by the plug-in will be matched 
    1.74 -	using TDesC16::MatchC() instead.
    1.75 -	
    1.76 -	@param aWord The word to be checked. Note that it contains a '*' wildcard 
    1.77 -	character at the end and optionally one at the beginning, depending on whether 
    1.78 -	ContactsMatchingCriteriaL() or ContactsMatchingPrefixL() was called.
    1.79 -	@return ETrue if the word is valid for matching by the plug-in, EFalse if not. */
    1.80 -	virtual TBool IsWordValidForMatching(const TDesC& aWord) = 0;
    1.81 -	/** An optimisation function that may be used to implement incremental find, i.e. 
    1.82 -	involving only the results of a previous search, rather than the entire view.
    1.83 -	
    1.84 -	This function is not called in v7.0s, but is provided for possible future use.
    1.85 -	
    1.86 -	@param aItemString The string that is being searched.
    1.87 -	@param aSearchText The string to search for.
    1.88 -	@return ETrue if aSearchText is found in aItemString. EFalse if not. */
    1.89 -	virtual TBool MatchRefineL( const TDesC& aItemString, const TDesC &aSearchText) = 0;
    1.90 -	private:
    1.91 -	//The uid is stored here,so that it can be used during destruction of the instance.
    1.92 -	TUid iDtor_ID_Key;
    1.93 -	};
    1.94 -
    1.95 -#include <cntviewfindconfig.inl>
    1.96 -
    1.97 -#endif