|
1 /* |
|
2 * Copyright (c) 2004-2006 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: Rights object notification event |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CDRMEVENTMODIFY_H |
|
21 #define CDRMEVENTMODIFY_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <DRMEvent.h> |
|
26 |
|
27 // CONSTANTS |
|
28 |
|
29 // MACROS |
|
30 |
|
31 // DATA TYPES |
|
32 |
|
33 // FUNCTION PROTOTYPES |
|
34 |
|
35 // FORWARD DECLARATIONS |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * DRM Rights Object notication event class |
|
41 * Used as data structure in the notification service |
|
42 * |
|
43 * @lib DRM Common |
|
44 * @since S60Rel2.6 |
|
45 */ |
|
46 |
|
47 class CDRMEventModify : public MDRMEvent, public CBase |
|
48 { |
|
49 public: // Constructors and destructor |
|
50 |
|
51 |
|
52 /** |
|
53 * NewLC |
|
54 * |
|
55 * Creates and instance of the CDRMEventModify class and |
|
56 * returns a pointer to it Leaves the object in the cleanup |
|
57 * stack |
|
58 * |
|
59 * @return A functional CDRMEventModify -object |
|
60 * @since S60Rel3.0 |
|
61 */ |
|
62 IMPORT_C static CDRMEventModify* NewLC(); |
|
63 |
|
64 /** |
|
65 * NewL |
|
66 * |
|
67 * Creates and instance of the CDRMEventModify class and |
|
68 * returns a pointer to it |
|
69 * |
|
70 * @return A functional CDRMEventModify -object |
|
71 * @since S60Rel3.0 |
|
72 */ |
|
73 IMPORT_C static CDRMEventModify* NewL(); |
|
74 |
|
75 |
|
76 /** |
|
77 * Destructor |
|
78 */ |
|
79 IMPORT_C virtual ~CDRMEventModify(); |
|
80 |
|
81 public: // new functions |
|
82 |
|
83 |
|
84 /** |
|
85 * SetContentIDL |
|
86 * |
|
87 * Sets the content id of the object and leaves if an error occurs |
|
88 * |
|
89 * @param aContentID : Descriptor containing the content id |
|
90 * @since S60Rel2.6 |
|
91 */ |
|
92 IMPORT_C void SetContentIDL( const TDesC8& aContentID ); |
|
93 |
|
94 /** |
|
95 * SetUniqueID |
|
96 * |
|
97 * Sets the content id of the related rights object |
|
98 * |
|
99 * @param aUniqueID : unique id of the rights object in question |
|
100 * @since S60Rel2.6 |
|
101 */ |
|
102 IMPORT_C void SetUniqueID( const TUint32 aUniqueID ); |
|
103 |
|
104 /** |
|
105 * UniqueID |
|
106 * |
|
107 * Returns the unique id of the rights object modified |
|
108 * |
|
109 * @since S60Rel2.6 |
|
110 */ |
|
111 IMPORT_C TUint32 UniqueID() const; |
|
112 |
|
113 /** |
|
114 * GetContentIDL |
|
115 * |
|
116 * Returns a pointer to newly reserved buffer that containts the |
|
117 * content id. The caller must free the memory. |
|
118 * |
|
119 * @since S60Rel2.6 |
|
120 */ |
|
121 IMPORT_C virtual HBufC8* GetContentIDL() const; |
|
122 |
|
123 |
|
124 public: // Functions from base classes |
|
125 /** |
|
126 * ExternalizeL |
|
127 * |
|
128 * Writes the objects data into a stream |
|
129 * |
|
130 * @param aOutput : an output stream where to write |
|
131 * @since S60Rel2.6 |
|
132 */ |
|
133 IMPORT_C virtual void ExternalizeL(RWriteStream& aOutput); |
|
134 |
|
135 /** |
|
136 * InternalizeL |
|
137 * |
|
138 * Reads the objects data from a stream |
|
139 * |
|
140 * @param aInput : an input stream where to read from |
|
141 * @since S60Rel2.6 |
|
142 */ |
|
143 IMPORT_C virtual void InternalizeL(RReadStream& aInput); |
|
144 |
|
145 private: |
|
146 /** |
|
147 * Constructor |
|
148 */ |
|
149 CDRMEventModify(TUint32 aUniqueID); |
|
150 |
|
151 /** |
|
152 * C++ default constructor. |
|
153 */ |
|
154 CDRMEventModify( void ); |
|
155 |
|
156 /** |
|
157 * First Phase constructor |
|
158 */ |
|
159 void ConstructL(); |
|
160 |
|
161 // Prohibit copy constructor |
|
162 CDRMEventModify( const CDRMEventModify& ); |
|
163 |
|
164 // Prohibit assigment operator |
|
165 CDRMEventModify& operator=( const CDRMEventModify& ); |
|
166 |
|
167 // The content identifier |
|
168 HBufC8* iContentID; |
|
169 |
|
170 // the unique id of the rights object in question |
|
171 TUint32 iUniqueID; |
|
172 }; |
|
173 |
|
174 #endif // CDRMEVENTADDREMOVE_H |
|
175 |
|
176 // End of File |