|
1 /* |
|
2 * Copyright (c) 2008 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: Header file for WMDRM PK Client Wrapper |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CWMDRMPKCLIENTWRAPPER_H |
|
20 #define CWMDRMPKCLIENTWRAPPER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 _LIT( KWmdrmPkClientWrapperName, "\\system\\libs\\wmdrmpkclientwrapper.dll" ); |
|
25 const TInt KWmdrmPkClientNewL = 1; |
|
26 |
|
27 class RWmDrmPkClient; |
|
28 |
|
29 class MWmDrmPkClientWrapper |
|
30 { |
|
31 |
|
32 public: |
|
33 |
|
34 virtual TInt Connect() = 0; |
|
35 |
|
36 virtual void Close() = 0; |
|
37 |
|
38 virtual TInt DeleteRights() = 0; |
|
39 |
|
40 }; |
|
41 |
|
42 NONSHARABLE_CLASS( CWmDrmPkClientWrapper ): public CBase, |
|
43 public MWmDrmPkClientWrapper |
|
44 { |
|
45 |
|
46 public: |
|
47 |
|
48 IMPORT_C static CWmDrmPkClientWrapper* NewL(); |
|
49 |
|
50 virtual ~CWmDrmPkClientWrapper(); |
|
51 |
|
52 TInt Connect(); |
|
53 |
|
54 void Close(); |
|
55 |
|
56 TInt DeleteRights(); |
|
57 |
|
58 private: |
|
59 |
|
60 CWmDrmPkClientWrapper(); |
|
61 void ConstructL(); |
|
62 |
|
63 private: // data |
|
64 |
|
65 RWmDrmPkClient* iClient; |
|
66 |
|
67 TInt GenerateSyncChallengeL(TUint32 aMaxCount, |
|
68 TUint32 aMaxHours, |
|
69 TUint32 aStart, |
|
70 TUint32 aItemsToProcess, |
|
71 TUint32 &aNextStart, |
|
72 TUint32 &aProcessed, |
|
73 HBufC8*& aChallenge); |
|
74 |
|
75 HBufC8* GetDeviceCertificateL(); |
|
76 |
|
77 |
|
78 }; |
|
79 |
|
80 #endif // CWMDRMPKCLIENTWRAPPER_H |