|
1 /* |
|
2 * Copyright (c) 2007 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: Dynamically loadable wrapper for Download manager |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "WmDrmClientWrapper.h" |
|
20 |
|
21 // CONSTANTS |
|
22 |
|
23 // ======== LOCAL FUNCTIONS ======== |
|
24 |
|
25 |
|
26 // ======== MEMBER FUNCTIONS ======== |
|
27 |
|
28 // --------------------------------------------------------------------------- |
|
29 // --------------------------------------------------------------------------- |
|
30 // |
|
31 CWmDrmClientWrapper::CWmDrmClientWrapper() |
|
32 { |
|
33 } |
|
34 |
|
35 // --------------------------------------------------------------------------- |
|
36 // --------------------------------------------------------------------------- |
|
37 // |
|
38 void CWmDrmClientWrapper::ConstructL() |
|
39 { |
|
40 } |
|
41 |
|
42 |
|
43 |
|
44 // --------------------------------------------------------------------------- |
|
45 // --------------------------------------------------------------------------- |
|
46 // |
|
47 CWmDrmClientWrapper* CWmDrmClientWrapper::NewL() |
|
48 { |
|
49 CWmDrmClientWrapper* self = CWmDrmClientWrapper::NewLC(); |
|
50 CleanupStack::Pop( self ); |
|
51 return self; |
|
52 } |
|
53 |
|
54 |
|
55 // --------------------------------------------------------------------------- |
|
56 // --------------------------------------------------------------------------- |
|
57 // |
|
58 CWmDrmClientWrapper* CWmDrmClientWrapper::NewLC() |
|
59 { |
|
60 CWmDrmClientWrapper* self = new( ELeave ) CWmDrmClientWrapper(); |
|
61 CleanupStack::PushL( self ); |
|
62 self->ConstructL(); |
|
63 return self; |
|
64 } |
|
65 |
|
66 |
|
67 // --------------------------------------------------------------------------- |
|
68 // --------------------------------------------------------------------------- |
|
69 // |
|
70 CWmDrmClientWrapper::~CWmDrmClientWrapper() |
|
71 { |
|
72 iClient.Close(); |
|
73 } |
|
74 |
|
75 |
|
76 // --------------------------------------------------------------------------- |
|
77 // --------------------------------------------------------------------------- |
|
78 // |
|
79 TInt CWmDrmClientWrapper::Connect() |
|
80 { |
|
81 return iClient.Connect(); |
|
82 } |
|
83 |
|
84 |
|
85 |
|
86 // ======== GLOBAL FUNCTIONS ======== |
|
87 |
|
88 //------------------------------------------------------------------------------ |
|
89 // GateFunctionDRM |
|
90 // DRM gate function |
|
91 //------------------------------------------------------------------------------ |
|
92 EXPORT_C TAny* GateFunctionWmDrmClientWrapper() |
|
93 { |
|
94 CWmDrmClientWrapper* launcher = NULL; |
|
95 TRAPD( err, launcher = CWmDrmClientWrapper::NewL() ); |
|
96 if( err != KErrNone ) |
|
97 { |
|
98 return NULL; |
|
99 } |
|
100 |
|
101 return launcher; |
|
102 } |
|
103 |