1 /* |
|
2 * Copyright (c) 2002 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: Declaration of TSortSnapUtils |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __SORTSNAPUTILS_H__ |
|
21 #define __SORTSNAPUTILS_H__ |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <cmmanagerext.h> |
|
27 #include <rmpm.h> |
|
28 |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * TSortSnapUtils class, |
|
34 * utility class to use P&S mechanism to |
|
35 * avoid circular reference with MPM |
|
36 */ |
|
37 class TSortSnapUtils |
|
38 { |
|
39 public: |
|
40 enum TSortSnapUtilsState |
|
41 { |
|
42 EUninitialised = 0, |
|
43 EUseMPM, |
|
44 EUsePubSub |
|
45 } ; |
|
46 |
|
47 /** |
|
48 * Constructor |
|
49 */ |
|
50 TSortSnapUtils( RMPM& aMPM ); |
|
51 |
|
52 /** |
|
53 * Destructor |
|
54 */ |
|
55 ~TSortSnapUtils(); |
|
56 |
|
57 void GetDestIdArrayL( RCmManagerExt& aCmManagerExt, RArray<TUint32>& aDestArray ); |
|
58 |
|
59 /** |
|
60 * GetSortSNAPDataL |
|
61 * Gets snap data |
|
62 * Reads P&S values first, then uses MPM if |
|
63 * unsuccessful. This is needed to avoid a deadlock situation |
|
64 * with MPM. |
|
65 * @param aSnapData - iSnap attribute of TMpmSnapPubSubFormat is the |
|
66 * input parameter, iSortedIaps attribute holds the iap ids if |
|
67 * returned with KErrNone |
|
68 */ |
|
69 TInt GetSortSnapData( TUint32 aSnapId, TMpmSnapBuffer& aSnapBuffer ); |
|
70 |
|
71 private: |
|
72 void InitDestIdArray(); |
|
73 |
|
74 private: |
|
75 TUint32 iSnapIdArray[KMPMSortSnapMaxKey]; |
|
76 TInt iSnapCount; |
|
77 TSortSnapUtilsState iSSUState; |
|
78 RMPM& iMPM; |
|
79 }; |
|
80 |
|
81 |
|
82 #endif |
|
83 |
|
84 // End of File |
|