|
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: MDE media monitor utility |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MDSAUDIOMONITOR_H_ |
|
20 #define MDSAUDIOMONITOR_H_ |
|
21 |
|
22 #include <e32def.h> |
|
23 #include <mdesession.h> |
|
24 |
|
25 //Forward declaration |
|
26 class CMdeObjectQueueManager; //Queue all Audio objects for Indexing |
|
27 class CMdESession; |
|
28 |
|
29 class CMdsMediaMonitor : public CBase, |
|
30 public MMdEObjectObserver, |
|
31 public MMdEObjectPresentObserver |
|
32 { |
|
33 public: |
|
34 /* |
|
35 * NewL construction |
|
36 * @param CMdESession* valid mde session donot own |
|
37 * @param CMdeObjectQueueManager* object queue manager do not own |
|
38 * @return instance of media monitor |
|
39 */ |
|
40 static CMdsMediaMonitor* NewL(CMdESession* ,CMdeObjectQueueManager* ); |
|
41 /* |
|
42 * NewLC construction |
|
43 * @param CMdESession* valid mde session do not own |
|
44 * @param CMdeObjectQueueManager* object queue manager do not own |
|
45 * @return instance of media monitor |
|
46 */ |
|
47 static CMdsMediaMonitor* NewLC(CMdESession* ,CMdeObjectQueueManager* ); |
|
48 /* |
|
49 * Destructor |
|
50 */ |
|
51 virtual ~CMdsMediaMonitor(); |
|
52 private: |
|
53 /* |
|
54 * parameterized constructor |
|
55 * @param CMdESession* valid mde session do not own |
|
56 * @param CMdeObjectQueueManager* mde object queue manager donot own |
|
57 */ |
|
58 CMdsMediaMonitor(CMdESession* ,CMdeObjectQueueManager* ); //default constructor |
|
59 /* |
|
60 * Second phase constructor |
|
61 */ |
|
62 void ConstructL(); //Second phase constructor |
|
63 public: |
|
64 /* |
|
65 * StartMonitoring |
|
66 * @param TDesC& aNameSpaceDef name space |
|
67 */ |
|
68 void StartMonitoringL(const TDesC& aNameSpaceDef); //Controlled by owner |
|
69 /* |
|
70 * StopMonitoring stops sending events |
|
71 */ |
|
72 void StopMonitoringL(); |
|
73 //From MMdEObjectObserver |
|
74 void HandleObjectNotification(CMdESession& aSession, |
|
75 TObserverNotificationType aType, |
|
76 const RArray<TItemId>& aObjectIdArray); |
|
77 void HandleObjectPresentNotification(CMdESession& aSession, |
|
78 TBool aPresent, const RArray<TItemId>& aObjectIdArray); |
|
79 private: |
|
80 CMdESession* iMdsSession; //do not own |
|
81 //Maintain queue of object array with actions for indexing |
|
82 CMdeObjectQueueManager* iMdeObjectQueueManager; |
|
83 }; |
|
84 |
|
85 #endif /* MDSAUDIOMONITOR_H_ */ |