|
1 /* |
|
2 * Copyright (c) 2010 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: Media Video harvester plugin header |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CVIDEOPLUGIN_H |
|
20 #define CVIDEOPLUGIN_H |
|
21 |
|
22 #include <cindexingplugin.h> |
|
23 #include <e32base.h> |
|
24 #include "common.h" |
|
25 #include "mediaobjecthandler.h" |
|
26 #include "mmceventobserver.h" |
|
27 |
|
28 //Forward declaration |
|
29 class CSearchDocument; |
|
30 class CCPixIndexer; |
|
31 class CMdeHarvester; |
|
32 class CMdeObjectQueueManager; |
|
33 class CMdsMediaMonitor; |
|
34 class CMdsSessionObjectUtils; |
|
35 class CCPIXMediaVideoDoc; |
|
36 class CCPixIndexerUtils; |
|
37 class CMMCMonitorUtil; |
|
38 class CCPIXMDEDbManager; |
|
39 class CMDSEntity; |
|
40 |
|
41 class CVideoPlugin : public CIndexingPlugin, public MdeMEdiaObserver, |
|
42 public MMediaObjectHandler, public MMMCEventObserver |
|
43 { |
|
44 public: |
|
45 // Constructor and Destructors. |
|
46 /* |
|
47 * NewL |
|
48 * @return instance of Media video plugin |
|
49 */ |
|
50 static CVideoPlugin* NewL(); |
|
51 /* |
|
52 * Destructor |
|
53 */ |
|
54 ~CVideoPlugin(); |
|
55 |
|
56 public: |
|
57 /* |
|
58 * Prepares the plugin for StartHarvesterL |
|
59 */ |
|
60 void StartPluginL(); |
|
61 |
|
62 /* |
|
63 * @description Start the harvester. |
|
64 * @param aQualifiedBaseAppClass the base app class. In this case |
|
65 * use MEDIA_QBASEAPPCLASS |
|
66 * @return void |
|
67 * Leaves in case of errors. |
|
68 */ |
|
69 void StartHarvestingL(const TDesC & aQualifiedBaseAppClass); |
|
70 /* |
|
71 * HandleMdeItemL callback from MMediaObjectHandler |
|
72 * @param TItemId aObjId object Id |
|
73 * @param TCPixActionType aActionType cpix action type |
|
74 */ |
|
75 void HandleMdeItemL( TItemId aObjId, TCPixActionType aActionType); |
|
76 #ifdef __PERFORMANCE_DATA |
|
77 void UpdateLogL(); |
|
78 #endif |
|
79 /* |
|
80 * HarvestingCompletedL callback from MdeEventHandler |
|
81 */ |
|
82 void HarvestingCompletedL(); |
|
83 |
|
84 /* |
|
85 * HandleMMCEventL callback from MMMCEventObserver |
|
86 * @param TDriveNumber aDrive drive number of MMC |
|
87 * @param TBool aMMCInsertRemoval ETrue if inserted else EFalse |
|
88 */ |
|
89 void HandleMMCEventL(const TDriveNumber aDrive,const TBool aMMCInsertRemoval); |
|
90 private: |
|
91 //private constructors. |
|
92 /* |
|
93 * Default constructor |
|
94 */ |
|
95 CVideoPlugin(); |
|
96 |
|
97 private: |
|
98 // data |
|
99 CCPixIndexer* iIndexer; //Indexer |
|
100 CMdeHarvester* iMdeHarvester; //Mde harvester owned |
|
101 CMdeObjectQueueManager* iObjectJobQueueManager; //Objectqueue manager owned |
|
102 CMdsMediaMonitor* iMdsMonitor;//MDS monitor owned |
|
103 CMdsSessionObjectUtils* iMdsUtils;//Mds utils owned |
|
104 CCPIXMediaVideoDoc* iVideoDocument;//MDS video doc owned |
|
105 CCPixIndexerUtils* iIndexerUtil;//Indexer util owned |
|
106 CMMCMonitorUtil* iMMcMonitor;//MMC monitor owned |
|
107 CCPIXMDEDbManager* iDBManager; |
|
108 CMDSEntity* iMdsItem; |
|
109 |
|
110 #ifdef __PERFORMANCE_DATA |
|
111 TTime iStartTime; |
|
112 TTime iCompleteTime; |
|
113 void UpdatePerformaceDataL(); |
|
114 TInt count; |
|
115 #endif |
|
116 }; |
|
117 |
|
118 #endif // CVIDEOPLUGIN_H |
|
119 |