williamr@4
|
1 |
/*
|
williamr@4
|
2 |
* Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@4
|
3 |
* All rights reserved.
|
williamr@4
|
4 |
* This component and the accompanying materials are made available
|
williamr@4
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
williamr@4
|
6 |
* which accompanies this distribution, and is available
|
williamr@4
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@4
|
8 |
*
|
williamr@4
|
9 |
* Initial Contributors:
|
williamr@4
|
10 |
* Nokia Corporation - initial contribution.
|
williamr@4
|
11 |
*
|
williamr@4
|
12 |
* Contributors:
|
williamr@4
|
13 |
*
|
williamr@4
|
14 |
* Description: Virtual Phonebook factory interface for asynchronous
|
williamr@4
|
15 |
* contact operations.
|
williamr@4
|
16 |
*
|
williamr@4
|
17 |
*/
|
williamr@4
|
18 |
|
williamr@4
|
19 |
//
|
williamr@4
|
20 |
|
williamr@4
|
21 |
#ifndef MVPBKCONTACTOPERATIONFACTORY_H
|
williamr@4
|
22 |
#define MVPBKCONTACTOPERATIONFACTORY_H
|
williamr@4
|
23 |
|
williamr@4
|
24 |
// INCLUDES
|
williamr@4
|
25 |
#include <e32cmn.h>
|
williamr@4
|
26 |
#include <bamdesca.h>
|
williamr@4
|
27 |
|
williamr@4
|
28 |
// FORWARD DECLARATIONS
|
williamr@4
|
29 |
class MVPbkContactOperation;
|
williamr@4
|
30 |
class MVPbkContactLink;
|
williamr@4
|
31 |
class MVPbkContactLinkArray;
|
williamr@4
|
32 |
class MVPbkStoreContact;
|
williamr@4
|
33 |
class MVPbkSingleContactOperationObserver;
|
williamr@4
|
34 |
class MVPbkBatchOperationObserver;
|
williamr@4
|
35 |
class MVPbkContactFindObserver;
|
williamr@4
|
36 |
class MVPbkFieldTypeList;
|
williamr@4
|
37 |
class MVPbkContactFindFromStoresObserver;
|
williamr@4
|
38 |
|
williamr@4
|
39 |
// CLASS DECLARATIONS
|
williamr@4
|
40 |
|
williamr@4
|
41 |
/**
|
williamr@4
|
42 |
* A factory interface for asynchronous contact operations.
|
williamr@4
|
43 |
* This interface is used to create contact operations.
|
williamr@4
|
44 |
*/
|
williamr@4
|
45 |
class MVPbkContactOperationFactory
|
williamr@4
|
46 |
{
|
williamr@4
|
47 |
public: // Factories
|
williamr@4
|
48 |
/**
|
williamr@4
|
49 |
* Creates an operation for contact retrieval.
|
williamr@4
|
50 |
*
|
williamr@4
|
51 |
* @param aLink A link to the contact
|
williamr@4
|
52 |
* @param aObserver An observer for the operation.
|
williamr@4
|
53 |
* @return A handle to the operation or NULL if the factory
|
williamr@4
|
54 |
* doesn't have reference to the store of the link.
|
williamr@4
|
55 |
*/
|
williamr@4
|
56 |
virtual MVPbkContactOperation* CreateContactRetrieverL(
|
williamr@4
|
57 |
const MVPbkContactLink& aLink,
|
williamr@4
|
58 |
MVPbkSingleContactOperationObserver& aObserver) =0;
|
williamr@4
|
59 |
|
williamr@4
|
60 |
/**
|
williamr@4
|
61 |
* Creates an operation for deleting multiple contacts.
|
williamr@4
|
62 |
*
|
williamr@4
|
63 |
* @param aContactLinks An array of contact links that specify
|
williamr@4
|
64 |
* the contacts.
|
williamr@4
|
65 |
* @param aObserver An observer for the operation.
|
williamr@4
|
66 |
* @return A handle to the operation or NULL
|
williamr@4
|
67 |
*/
|
williamr@4
|
68 |
virtual MVPbkContactOperation* CreateDeleteContactsOperationL(
|
williamr@4
|
69 |
const MVPbkContactLinkArray& aContactLinks,
|
williamr@4
|
70 |
MVPbkBatchOperationObserver& aObserver ) =0;
|
williamr@4
|
71 |
|
williamr@4
|
72 |
/**
|
williamr@4
|
73 |
* Creates an operation for committing multiple contacts.
|
williamr@4
|
74 |
*
|
williamr@4
|
75 |
* @param aContacts An array of contact links that specify
|
williamr@4
|
76 |
* the contacts
|
williamr@4
|
77 |
* @param aObserver An observer for the operation.
|
williamr@4
|
78 |
* @return A handle to the operation or NULL
|
williamr@4
|
79 |
*/
|
williamr@4
|
80 |
virtual MVPbkContactOperation* CreateCommitContactsOperationL(
|
williamr@4
|
81 |
const TArray<MVPbkStoreContact*>& aContacts,
|
williamr@4
|
82 |
MVPbkBatchOperationObserver& aObserver) =0;
|
williamr@4
|
83 |
|
williamr@4
|
84 |
/**
|
williamr@4
|
85 |
* Creates an operation for asynchronous phone number matching.
|
williamr@4
|
86 |
*
|
williamr@4
|
87 |
* @param aPhoneNumber A phone number to search for.
|
williamr@4
|
88 |
* @param aMaxMatchDigits Maximum number of digits to match from
|
williamr@4
|
89 |
* the end of the number.
|
williamr@4
|
90 |
* @param aObserver Observer for the find process.
|
williamr@4
|
91 |
* @return A handle to the operation or NULL
|
williamr@4
|
92 |
*/
|
williamr@4
|
93 |
virtual MVPbkContactOperation* CreateMatchPhoneNumberOperationL(
|
williamr@4
|
94 |
const TDesC& aPhoneNumber,
|
williamr@4
|
95 |
TInt aMaxMatchDigits,
|
williamr@4
|
96 |
MVPbkContactFindObserver& aObserver) =0;
|
williamr@4
|
97 |
|
williamr@4
|
98 |
/**
|
williamr@4
|
99 |
* Creates an operation for asynchronous contact finding.
|
williamr@4
|
100 |
*
|
williamr@4
|
101 |
* @param aSearchString String to search for.
|
williamr@4
|
102 |
* @param aFieldTypes List of field types that the search will include.
|
williamr@4
|
103 |
* @param aObserver Observer for the find process.
|
williamr@4
|
104 |
* @return A handle to the operation or NULL
|
williamr@4
|
105 |
*/
|
williamr@4
|
106 |
virtual MVPbkContactOperation* CreateFindOperationL(
|
williamr@4
|
107 |
const TDesC& aSearchString,
|
williamr@4
|
108 |
const MVPbkFieldTypeList& aFieldTypes,
|
williamr@4
|
109 |
MVPbkContactFindObserver& aObserver) =0;
|
williamr@4
|
110 |
|
williamr@4
|
111 |
/**
|
williamr@4
|
112 |
* Creates an operation for asynchronous contact finding.
|
williamr@4
|
113 |
* Finds a string containing text that is stored in one or more fields.
|
williamr@4
|
114 |
* Client can give multiple find words. All the words must match to separated
|
williamr@4
|
115 |
* data. E.g if there are two find words: "Jo" and "Jo" then field data
|
williamr@4
|
116 |
* "John Johnson" matches but "John Doe" doesn't if the word parser uses
|
williamr@4
|
117 |
* white space as a word separator.
|
williamr@4
|
118 |
*
|
williamr@4
|
119 |
* NOTE: The accuracy of the results depends on the ability of the store
|
williamr@4
|
120 |
* implementation to implement the find. The performance can vary
|
williamr@4
|
121 |
* too depending on the store.
|
williamr@4
|
122 |
*
|
williamr@4
|
123 |
* @param aSearchStrings Words that are compared to field data.
|
williamr@4
|
124 |
* @param aFieldTypes Types of the fields that are used.
|
williamr@4
|
125 |
* @param aObserver An observer for asynchronous operation.
|
williamr@4
|
126 |
* @param aWordParserCallBack a client implementation of word parser
|
williamr@4
|
127 |
* function that separates the field data
|
williamr@4
|
128 |
* into words. Parameter to function is
|
williamr@4
|
129 |
* TVPbkWordParserParam.
|
williamr@4
|
130 |
* @return A handle to the operation or NULL
|
williamr@4
|
131 |
*/
|
williamr@4
|
132 |
virtual MVPbkContactOperation* CreateFindOperationL(
|
williamr@4
|
133 |
const MDesC16Array& aSearchStrings,
|
williamr@4
|
134 |
const MVPbkFieldTypeList& aFieldTypes,
|
williamr@4
|
135 |
MVPbkContactFindFromStoresObserver& aObserver,
|
williamr@4
|
136 |
const TCallBack& aWordParserCallBack ) =0;
|
williamr@4
|
137 |
|
williamr@4
|
138 |
/**
|
williamr@4
|
139 |
* Creates an operation for compressing the store.
|
williamr@4
|
140 |
*
|
williamr@4
|
141 |
* @param aObserver An observer for the compress operation.
|
williamr@4
|
142 |
* @return A handle to the operation or NULL
|
williamr@4
|
143 |
*/
|
williamr@4
|
144 |
virtual MVPbkContactOperation* CreateCompressStoresOperationL(
|
williamr@4
|
145 |
MVPbkBatchOperationObserver& aObserver) = 0;
|
williamr@4
|
146 |
|
williamr@4
|
147 |
/**
|
williamr@4
|
148 |
* Returns an extension point for this interface or NULL.
|
williamr@4
|
149 |
* @param aExtensionUid Uid of extension.
|
williamr@4
|
150 |
* @return Extension point or NULL.
|
williamr@4
|
151 |
*/
|
williamr@4
|
152 |
virtual TAny* ContactOperationFactoryExtension(
|
williamr@4
|
153 |
TUid /*aExtensionUid*/) { return NULL; }
|
williamr@4
|
154 |
};
|
williamr@4
|
155 |
|
williamr@4
|
156 |
#endif // MVPBKCONTACTOPERATIONFACTORY_H
|
williamr@4
|
157 |
|
williamr@4
|
158 |
// End of File
|