|
1 /* |
|
2 * Copyright (c) 2004 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: the client side class for DRMHelperServer |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CONSUMEDATA_H |
|
20 #define CONSUMEDATA_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <caf/caf.h> |
|
25 #include <drmrightsclient.h> |
|
26 |
|
27 // DATA TYPES |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 |
|
34 /** |
|
35 * This class provides the client-side interface to the server session |
|
36 * |
|
37 * @since Series 60 2.6 |
|
38 */ |
|
39 |
|
40 NONSHARABLE_CLASS( CConsumeData ) : public CBase |
|
41 { |
|
42 public: // Constructors and destructor |
|
43 |
|
44 /** |
|
45 * NewLC |
|
46 * |
|
47 * Created a new instance of the CConsumeData class and leaves |
|
48 * it into the cleanup stack |
|
49 * |
|
50 * @param aUri: Content identifier of the content in question |
|
51 * @return Functional CConsumeData -object |
|
52 */ |
|
53 static CConsumeData* NewLC( const TDesC8& aUri ); |
|
54 |
|
55 |
|
56 /** |
|
57 * NewL |
|
58 * |
|
59 * Created a new instance of the CConsumeData class |
|
60 * |
|
61 * @param aUri: Content identifier of the content in question |
|
62 * @return Functional CConsumeData -object |
|
63 */ |
|
64 static CConsumeData* NewL( const TDesC8& aUri ); |
|
65 |
|
66 /** |
|
67 * Destructor |
|
68 */ |
|
69 ~CConsumeData(); |
|
70 |
|
71 public: // New functions |
|
72 |
|
73 /** |
|
74 * Consume |
|
75 * |
|
76 * Calls client consumption, if you call this with stop, the session |
|
77 * is deleted |
|
78 * |
|
79 * @param aIntent: Intent to be used for consumption |
|
80 * @return Symbian OS error code |
|
81 */ |
|
82 TInt Consume( const ContentAccess::TIntent& aIntent ); |
|
83 |
|
84 /** |
|
85 * CompateUri(); |
|
86 * |
|
87 * Compares the uri as if compared with string compare |
|
88 * |
|
89 * @param aIntent: Intent to be used for consumption |
|
90 * @return Symbian OS error code |
|
91 */ |
|
92 TInt CompareUri( const TDesC8& aUri ) const; |
|
93 |
|
94 private: |
|
95 /** |
|
96 * C++ default constructor. |
|
97 */ |
|
98 CConsumeData(); |
|
99 |
|
100 /** |
|
101 * Second phase constructor |
|
102 */ |
|
103 void ConstructL( const TDesC8& aUri ); |
|
104 |
|
105 // Content uri of the content being used |
|
106 HBufC8* iContentURI8; |
|
107 |
|
108 // Rights Client instance |
|
109 RDRMRightsClient iRdb; |
|
110 |
|
111 // Connection status |
|
112 TBool iConnectionStatus; |
|
113 }; |
|
114 |
|
115 |
|
116 |
|
117 #endif // CONSUMEDATA_H |
|
118 |
|
119 // End of File |