63
|
1 |
/*
|
|
2 |
* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
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".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: ECom search interface definition
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef CPCS_PLUGIN_H
|
|
20 |
#define CPCS_PLUGIN_H
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <e32base.h>
|
|
24 |
#include <s32mem.h>
|
|
25 |
#include <bamdesca.h>
|
|
26 |
#include <ecom/ecom.h>
|
|
27 |
#include <CPsData.h>
|
|
28 |
#include <CPsClientData.h>
|
|
29 |
#include <CPsQuery.h>
|
|
30 |
#include <CPsSettings.h>
|
|
31 |
#include <CPsPattern.h>
|
|
32 |
|
|
33 |
/**
|
|
34 |
* Search plug-ins (Ecom) interface definition.
|
|
35 |
*/
|
|
36 |
class CPcsPlugin: public CBase
|
|
37 |
{
|
|
38 |
|
|
39 |
public:
|
|
40 |
|
|
41 |
/**
|
|
42 |
* Ecom interface static factory method implementation.
|
|
43 |
* @param aImpUid Ecom's implementation uid
|
|
44 |
* @return A pointer to the created instance of CSearchPlugin
|
|
45 |
*/
|
|
46 |
static inline CPcsPlugin* NewL( TUid aImpUid );
|
|
47 |
|
|
48 |
/**
|
|
49 |
* Ecom interface static factory method implementation.
|
|
50 |
* @param aImpUid Ecom's implementation uid
|
|
51 |
* @return A pointer to the created instance of CSearchPlugin
|
|
52 |
*/
|
|
53 |
static inline CPcsPlugin* NewLC( TUid aImpUid );
|
|
54 |
|
|
55 |
/**
|
|
56 |
* Destructor
|
|
57 |
*/
|
|
58 |
virtual ~CPcsPlugin();
|
|
59 |
|
|
60 |
public:
|
|
61 |
|
|
62 |
/**
|
|
63 |
* Gets the plugin id.
|
|
64 |
* @return Id of the plugin.
|
|
65 |
*/
|
|
66 |
inline TUid PluginId() const;
|
|
67 |
|
|
68 |
/**
|
|
69 |
* Performs search
|
|
70 |
* Implementation needs to be provided by the algorithm classes.
|
|
71 |
* Search results are packed in the stream.
|
|
72 |
*/
|
|
73 |
virtual void PerformSearchL( const CPsSettings& aPcsSettings,
|
|
74 |
CPsQuery& aCondition,
|
|
75 |
RPointerArray<CPsClientData>& aData,
|
|
76 |
RPointerArray<CPsPattern>& aPattern) = 0;
|
|
77 |
|
|
78 |
/**
|
|
79 |
* Performs search on a input string
|
|
80 |
* Implementation needs to be provided by the algorithm classes
|
|
81 |
*/
|
|
82 |
virtual void SearchInputL( CPsQuery& aSearchQuery,
|
|
83 |
TDesC& aSearchData,
|
|
84 |
RPointerArray<TDesC>& aMatchSet,
|
|
85 |
RArray<TPsMatchLocation>& aMatchLocation ) = 0;
|
|
86 |
|
|
87 |
/**
|
|
88 |
* Performs search on a input string, and return result also as a string
|
|
89 |
* Implementation needs to be provided by the algorithm classes
|
|
90 |
*/
|
|
91 |
virtual void SearchMatchStringL( CPsQuery& aSearchQuery,
|
|
92 |
TDesC& aSearchData,
|
|
93 |
TDes& aMatch ) = 0;
|
|
94 |
|
|
95 |
/**
|
|
96 |
* Returns ETrue if the predictive search is supported for
|
|
97 |
* the local language
|
|
98 |
* Returns EFalse otherwise
|
|
99 |
*/
|
|
100 |
virtual TBool IsLanguageSupportedL(const TUint32 aLanguage) = 0;
|
|
101 |
|
|
102 |
/**
|
|
103 |
* Get the data order (mapped to VPbk ids) supported for a URI
|
|
104 |
*/
|
|
105 |
virtual void GetDataOrderL(TDesC& aURI, RArray<TInt>& aDataOrder) = 0;
|
|
106 |
|
|
107 |
/**
|
|
108 |
* Get the sort order (mapped to VPbk ids) supported for a URI
|
|
109 |
*/
|
|
110 |
virtual void GetSortOrderL(TDesC& aURI, RArray<TInt>& aDataOrder) = 0;
|
|
111 |
|
|
112 |
/**
|
|
113 |
* Set the sort order (mapped to VPbk ids) supported for a URI
|
|
114 |
*/
|
|
115 |
virtual void ChangeSortOrderL(TDesC& aURI, RArray<TInt>& aDataOrder) = 0;
|
|
116 |
|
|
117 |
/**
|
|
118 |
* Returns the Adaptive Grid for one or more URI
|
|
119 |
* Implementation needs to be provided by the algorithm classes
|
|
120 |
*/
|
|
121 |
virtual void GetAdaptiveGridL( const MDesCArray& aURIs,
|
|
122 |
const TBool aCompanyName,
|
|
123 |
TDes& aAdaptiveGrid ) = 0;
|
|
124 |
|
|
125 |
private:
|
|
126 |
|
|
127 |
TUid iPluginId;
|
|
128 |
TUid iDtor_ID_Key;
|
|
129 |
|
|
130 |
};
|
|
131 |
|
|
132 |
#include "CPcsPlugin.inl"
|
|
133 |
|
|
134 |
#endif // CPCS_PLUGIN_H
|
|
135 |
|
|
136 |
// End of File
|
|
137 |
|