|
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: ECom search interface definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_CMULTIMEDIASEARCHPLUGIN_H |
|
21 #define C_CMULTIMEDIASEARCHPLUGIN_H |
|
22 |
|
23 //SYSTEM INCLUDES |
|
24 #include <searchplugin.h> |
|
25 #include <searchcontentsearcher.h> |
|
26 #include <searchcontent.h> |
|
27 |
|
28 //USER INCLUDES |
|
29 #include "multimediasearcher.h" |
|
30 |
|
31 |
|
32 /** |
|
33 * This class is the plugin interface class for the multimedia pluging |
|
34 * |
|
35 * This class searches the multimedia items using |
|
36 * the Content listing framework of the mediagallery2 |
|
37 * |
|
38 * @lib multimediasearchplugin.lib |
|
39 */ |
|
40 class CMutimediaSearchPlugin:public CSearchPlugin |
|
41 { |
|
42 public: |
|
43 |
|
44 /** |
|
45 * Ecom interface static factory method implementation. |
|
46 * |
|
47 * @return A pointer to the created instance of CContactSearchPlugin |
|
48 */ |
|
49 static CMutimediaSearchPlugin* NewL(); |
|
50 |
|
51 |
|
52 /** |
|
53 * Destructor |
|
54 */ |
|
55 virtual ~CMutimediaSearchPlugin(); |
|
56 |
|
57 public: //from base class CSearchPlugin |
|
58 /** |
|
59 * From CSearchPlugin |
|
60 * Returns the reference of 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 * From CSearchPlugin |
|
72 * Returns the supported content of this plugin. |
|
73 * |
|
74 * @param aContent The content that this plugin can search. |
|
75 */ |
|
76 void GetSupportedContentL( RPointerArray<CSearchContent>& aContent ); |
|
77 |
|
78 /** |
|
79 * From CSearchPlugin |
|
80 * Indicates if this plugin supports the searching of the given content. |
|
81 * |
|
82 * @param aContentId The ID of the search content. |
|
83 * @return ETrue if search is supported, EFalse otherwise. |
|
84 */ |
|
85 TBool IsSupportedContent( TUid aContentId ); |
|
86 |
|
87 |
|
88 /** |
|
89 * From CSearchPlugin |
|
90 * Launches a viewer/editor application for the given document id. |
|
91 * |
|
92 * @param aDocumentId Id of the document. |
|
93 */ |
|
94 void LaunchApplicationL( const TDesC8& aLaunchInfo ); |
|
95 |
|
96 |
|
97 private: |
|
98 |
|
99 /** |
|
100 * Constructor |
|
101 * |
|
102 * |
|
103 */ |
|
104 CMutimediaSearchPlugin(); |
|
105 |
|
106 /** |
|
107 * 2nd phase constructor |
|
108 * |
|
109 * |
|
110 */ |
|
111 void ConstructL(); |
|
112 |
|
113 /** |
|
114 * Adds Music, Images,Video Content Classes |
|
115 * |
|
116 * @param aSearchClassUid - Id of the the search class. |
|
117 * @param aContent - Result array |
|
118 */ |
|
119 void AddSearchContentClassL(const TUid aSearchClassUid, |
|
120 RPointerArray<CSearchContent>& aContent ); |
|
121 |
|
122 |
|
123 private: // Data members |
|
124 |
|
125 /** |
|
126 * The Music searcher for searching music items |
|
127 * Not Own. |
|
128 */ |
|
129 CMultimediaSearcher* iMusicSearcher; |
|
130 |
|
131 /** |
|
132 * The Image searcher for searching Images |
|
133 * Not Own. |
|
134 */ |
|
135 CMultimediaSearcher* iImagesSearcher; |
|
136 |
|
137 /** |
|
138 * The Video searcher for searching videos |
|
139 * Not Own. |
|
140 */ |
|
141 CMultimediaSearcher* iVideoSearcher; |
|
142 |
|
143 /** |
|
144 * The caption for "Images", read from the resource file |
|
145 * Own |
|
146 */ |
|
147 HBufC* iImagesCaption; |
|
148 |
|
149 /** |
|
150 * The caption for "Music", read from the resource file |
|
151 * Own |
|
152 */ |
|
153 HBufC* iMusicCaption; |
|
154 |
|
155 /** |
|
156 * The caption for "Videos", read from the resource file |
|
157 * Own |
|
158 */ |
|
159 HBufC* iVideosCaption; |
|
160 |
|
161 }; |
|
162 |
|
163 |
|
164 #endif //C_CMULTIMEDIASEARCHPLUGIN_H |