2 * Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Virtual Phonebook factory interface for asynchronous
20 #ifndef MVPBKCONTACTOPERATIONFACTORY2_H
21 #define MVPBKCONTACTOPERATIONFACTORY2_H
27 // FORWARD DECLARATIONS
28 class MVPbkContactOperation;
29 class MVPbkContactLink;
30 class MVPbkContactLinkArray;
31 class MVPbkStoreContact;
32 class MVPbkSingleContactOperationObserver;
33 class MVPbkBatchOperationObserver;
34 class MVPbkContactFindObserver;
35 class MVPbkFieldTypeList;
36 class MVPbkContactFindFromStoresObserver;
37 const TUid KMVPbkContactOperationFactory2Uid = { 2 };
42 * A factory interface for asynchronous contact operations.
43 * This interface is used to create contact operations.
44 * This interface allows specific store operations.
46 class MVPbkContactOperationFactory2
50 * Creates an operation for asynchronous contact finding.
51 * Finds a string containing text that is stored in one or more fields.
52 * Client can give multiple find words. All the words must match to separated
53 * data. E.g if there are two find words: "Jo" and "Jo" then field data
54 * "John Johnson" matches but "John Doe" doesn't if the word parser uses
55 * white space as a word separator.
57 * NOTE: The accuracy of the results depends on the ability of the store
58 * implementation to implement the find. The performance can vary
59 * too depending on the store.
61 * @param aSearchStrings Words that are compared to field data.
62 * @param aFieldTypes Types of the fields that are used.
63 * @param aObserver An observer for asynchronous operation.
64 * @param aWordParserCallBack a client implementation of word parser
65 * function that separates the field data
66 * into words. Parameter to function is
67 * TVPbkWordParserParam.
68 * @param aStoreEntriesArray an array that lists the store entries.
69 * @return A handle to the operation or NULL
71 virtual MVPbkContactOperation* CreateFindOperationL(
72 const MDesC16Array& aSearchStrings,
73 const MVPbkFieldTypeList& aFieldTypes,
74 MVPbkContactFindFromStoresObserver& aObserver,
75 const TCallBack& aWordParserCallBack,
76 const CDesC16ArrayFlat& aStoreEntriesArray ) = 0;
78 #endif // MVPBKCONTACTOPERATIONFACTORY2_H