36
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 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: mpx collection utility stub for unit testing
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
// Version : %version: 1 %
|
|
19 |
|
|
20 |
#ifndef MPXCOLLECTIONUTILITYIMP_STUB_H_
|
|
21 |
#define MPXCOLLECTIONUTILITYIMP_STUB_H_
|
|
22 |
|
|
23 |
#include <mpxcollectionutility.h>
|
|
24 |
#include <mpxcollectionobserver.h>
|
|
25 |
#include <mpxmessageobserver.h>
|
|
26 |
|
|
27 |
NONSHARABLE_CLASS( CMPXCollectionUtility ) : public MMPXCollectionUtility,
|
|
28 |
public MMPXMessageObserver,
|
|
29 |
public MMPXCollection
|
|
30 |
|
|
31 |
{
|
|
32 |
public:
|
|
33 |
/**
|
|
34 |
* Two-phased constructor
|
|
35 |
*
|
|
36 |
* @param aObs observer
|
|
37 |
* @param aModeId collection mode id
|
|
38 |
* @return object of constructed
|
|
39 |
*/
|
|
40 |
static CMPXCollectionUtility* NewL( const TUid& aModeId, MMPXCollectionObserver* aObs );
|
|
41 |
|
|
42 |
/**
|
|
43 |
* Destructor
|
|
44 |
*/
|
|
45 |
~CMPXCollectionUtility();
|
|
46 |
|
|
47 |
void AddRefCount();
|
|
48 |
|
|
49 |
//void AddTestObserverL( MAppUiEngineUnitTestObserver* aObserver );
|
|
50 |
//void RemoveTestObserverL();
|
|
51 |
|
|
52 |
private:
|
|
53 |
/**
|
|
54 |
* C++ constructor
|
|
55 |
*/
|
|
56 |
CMPXCollectionUtility( MMPXCollectionObserver* aObs );
|
|
57 |
|
|
58 |
/**
|
|
59 |
* Second phase constructor
|
|
60 |
*
|
|
61 |
* @param aModeId collection mode id
|
|
62 |
*/
|
|
63 |
void ConstructL( const TUid& aModeId );
|
|
64 |
|
|
65 |
public:
|
|
66 |
|
|
67 |
//------------------------------------------------------------------------------------------
|
|
68 |
// MMPXCollectionUtility Implementation
|
|
69 |
//------------------------------------------------------------------------------------------
|
|
70 |
MMPXCollection& Collection();
|
|
71 |
TUid CollectionIDL( const TArray<TUid>& aUids );
|
|
72 |
void Close();
|
|
73 |
|
|
74 |
//------------------------------------------------------------------------------------------
|
|
75 |
// MMPXCollection Implementation
|
|
76 |
//------------------------------------------------------------------------------------------
|
|
77 |
void OpenL( TMPXOpenMode aMode = EMPXOpenDefault );
|
|
78 |
void OpenL( TInt aIndex, TMPXOpenMode aMode = EMPXOpenDefault );
|
|
79 |
void OpenL( const CMPXCollectionPath& aPath, TMPXOpenMode aMode = EMPXOpenDefault );
|
|
80 |
void OpenL( TInt aIndex,
|
|
81 |
const TArray<TMPXAttribute>& aAttrs,
|
|
82 |
TMPXOpenMode aMode = EMPXOpenDefault );
|
|
83 |
void OpenL( const CMPXCollectionPath& aPath,
|
|
84 |
const TArray<TMPXAttribute>& aAttrs,
|
|
85 |
TMPXOpenMode aMode = EMPXOpenDefault );
|
|
86 |
void OpenL( const TArray<TUid>& aUids, TMPXOpenMode aMode = EMPXOpenDefault );
|
|
87 |
void OpenL( const TUid& aUid, TMPXOpenMode aMode = EMPXOpenDefault );
|
|
88 |
void SetFilterL( CMPXFilter* aFilter );
|
|
89 |
CMPXFilter* FilterL();
|
|
90 |
TUid UidL() const;
|
|
91 |
CMPXCollectionPath* PathL();
|
|
92 |
void BackL();
|
|
93 |
TBool IsRemote( const CMPXCollectionPath& aPath );
|
|
94 |
void CancelRequest();
|
|
95 |
void AddL( const CMPXMedia& aNewProperties );
|
|
96 |
void RemoveL( const CMPXCollectionPath& aPath, MMPXCollectionRemoveObserver* aObs = NULL );
|
|
97 |
void RemoveL( const CMPXMedia& aProperties );
|
|
98 |
void SetSyncL( const CMPXMedia& aMedia );
|
|
99 |
void SetL( const CMPXMedia& aMedia );
|
|
100 |
void FindAllL( const CMPXMedia& aMedia,
|
|
101 |
const TArray<TMPXAttribute>& aAttrs,
|
|
102 |
MMPXCollectionFindObserver& aObs );
|
|
103 |
CMPXMedia* FindAllL( const CMPXMedia& aMedia, const TArray<TMPXAttribute>& aAttrs );
|
|
104 |
void MediaL( const CMPXCollectionPath& aPath,
|
|
105 |
const TArray<TMPXAttribute>& aAttrs,
|
|
106 |
CMPXAttributeSpecs* aSpecs = NULL,
|
|
107 |
CMPXFilter* aFilter = NULL );
|
|
108 |
void NotifyL( TMPXCollectionBroadCastMsg aMsg, TInt aData );
|
|
109 |
void CommandL( TMPXCollectionCommand aCmd, TInt aData = 0 );
|
|
110 |
void CommandL( CMPXCommand& aCmd );
|
|
111 |
void GetSupportedTypesL( RPointerArray<CMPXCollectionType>& aArray );
|
|
112 |
void GetSupportedCapabilitiesL( TCollectionCapability& aCapability );
|
|
113 |
TUid CollectionIDL( TUid& aCollection );
|
|
114 |
void AddSubscriptionL( const CMPXSubscription& aSubscription );
|
|
115 |
void RemoveSubscriptionL( const CMPXSubscription& aSubscription );
|
|
116 |
void ClearSubscriptionsL();
|
|
117 |
|
|
118 |
//------------------------------------------------------------------------------------------
|
|
119 |
// MMPXMessageObserver Implementation
|
|
120 |
//------------------------------------------------------------------------------------------
|
|
121 |
void MessageReceived( TInt aMsgData, TInt aError );
|
|
122 |
|
|
123 |
private:
|
|
124 |
MMPXCollectionObserver* iObserver;
|
|
125 |
CMPXCollectionPath* iCollectionPath;
|
|
126 |
//MAppUiEngineUnitTestObserver* iTestObserver;
|
|
127 |
|
|
128 |
TInt iRefCount;
|
|
129 |
};
|
|
130 |
|
|
131 |
#endif /*MPXCOLLECTIONUTILITYIMP_STUB_H_*/
|