|
1 /* |
|
2 * Copyright (c) 2006-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: Plugin for file names search |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 #ifndef C_FILESSEARCHPLUGIN_H |
|
23 #define C_FILESSEARCHPLUGIN_H |
|
24 |
|
25 #include <searchplugin.h> |
|
26 #include <searchcontentsearcher.h> |
|
27 #include <searchcontent.h> |
|
28 |
|
29 #include "filessearcher.h" |
|
30 |
|
31 /** |
|
32 * This class is the file search plugin class |
|
33 * |
|
34 * Provides functionalities such as getting the supported |
|
35 * content classes, launching a file etc., |
|
36 * |
|
37 */ |
|
38 class CFilesSearchPlugin : public CSearchPlugin |
|
39 { |
|
40 |
|
41 public: |
|
42 |
|
43 /** |
|
44 * Ecom interface static factory method implementation. |
|
45 * |
|
46 * @return A pointer to the created instance of CFilesSearchPlugin |
|
47 */ |
|
48 static CFilesSearchPlugin* NewL(); |
|
49 |
|
50 |
|
51 /** |
|
52 * Destructor |
|
53 */ |
|
54 virtual ~CFilesSearchPlugin(); |
|
55 |
|
56 //From base class CSearchPlugin |
|
57 |
|
58 /** |
|
59 * From CSearchPlugin |
|
60 * Returns the pointer to ContentSearcher. |
|
61 * |
|
62 * @param aContentIdArray Array of Content Ids to be searhed. |
|
63 * @param aCondition condition for Search. |
|
64 * @return MSearchContentSearcher pointer for Search. |
|
65 */ |
|
66 MSearchContentSearcher* ContentSearcherL( const RArray<TUid>& aContentIdArray, |
|
67 const CSearchCondition& aCondition, |
|
68 MSearchPluginObserver& aObserver); |
|
69 |
|
70 |
|
71 /** |
|
72 * From CSearchPlugin |
|
73 * Returns the supported content of this plugin. |
|
74 * |
|
75 * @param aContent The content that this plugin can search. |
|
76 */ |
|
77 void GetSupportedContentL( RPointerArray<CSearchContent>& aContent ); |
|
78 |
|
79 /** |
|
80 * From CSearchPlugin |
|
81 * Indicates if this plugin supports the searching of the given content. |
|
82 * |
|
83 * @param aContentId The ID of the search content. |
|
84 * @return ETrue if search is supported, EFalse otherwise. |
|
85 */ |
|
86 TBool IsSupportedContent( TUid aContentId ); |
|
87 |
|
88 |
|
89 /** |
|
90 * From CSearchPlugin |
|
91 * Launches a viewer/editor application for the given document id. |
|
92 * |
|
93 * @param aDocumentId Id of the document. |
|
94 */ |
|
95 void LaunchApplicationL(const TDesC8& aLaunchInfo); |
|
96 |
|
97 private: |
|
98 |
|
99 /** |
|
100 * Constructor |
|
101 */ |
|
102 CFilesSearchPlugin(); |
|
103 |
|
104 /** |
|
105 * 2nd phase constructor |
|
106 */ |
|
107 void ConstructL(); |
|
108 |
|
109 private: |
|
110 /** |
|
111 * Caption |
|
112 */ |
|
113 HBufC* iCaption; |
|
114 |
|
115 /** |
|
116 * The Image searcher for searching Images |
|
117 * Not Own. |
|
118 */ |
|
119 /** |
|
120 * The Image searcher for searching Images |
|
121 * Not Own. |
|
122 */ |
|
123 CFilesSearcher* iFileSearcher; |
|
124 |
|
125 |
|
126 |
|
127 }; |
|
128 |
|
129 |
|
130 #endif //C_FILESSEARCHPLUGIN_H |