31
|
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: Notification Event object base class
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef MDRMEVENT_H
|
|
21 |
#define MDRMEVENT_H
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include <e32base.h>
|
|
25 |
#include <s32strm.h>
|
|
26 |
|
|
27 |
// CONSTANTS
|
|
28 |
|
|
29 |
// MACROS
|
|
30 |
|
|
31 |
// DATA TYPES
|
|
32 |
typedef TUint32 TDRMEventType;
|
|
33 |
|
|
34 |
const TDRMEventType KEventNone = 0;
|
|
35 |
const TDRMEventType KEventAddRemove = 1;
|
|
36 |
const TDRMEventType KEventModify = 2;
|
|
37 |
const TDRMEventType KEventTimeChange = 3;
|
|
38 |
|
|
39 |
// FUNCTION PROTOTYPES
|
|
40 |
|
|
41 |
// FORWARD DECLARATIONS
|
|
42 |
|
|
43 |
// CLASS DECLARATION
|
|
44 |
|
|
45 |
/**
|
|
46 |
* This class offers the base class for all DRM Notification events
|
|
47 |
* It can be used as it is, but it is meant that Other specific to an event
|
|
48 |
* classes are derived from it
|
|
49 |
*
|
|
50 |
* @lib DRMCommon.dll
|
|
51 |
* @since S60Rel2.6
|
|
52 |
*/
|
|
53 |
|
|
54 |
class MDRMEvent
|
|
55 |
{
|
|
56 |
public: // Constructors and destructor
|
|
57 |
/**
|
|
58 |
* Constructor
|
|
59 |
*
|
|
60 |
* @param aEvent The event type of the object to be created
|
|
61 |
*/
|
|
62 |
IMPORT_C MDRMEvent(const TDRMEventType& aEvent);
|
|
63 |
|
|
64 |
/**
|
|
65 |
* Destructor
|
|
66 |
*/
|
|
67 |
IMPORT_C virtual ~MDRMEvent();
|
|
68 |
|
|
69 |
public: // new functions
|
|
70 |
/**
|
|
71 |
* ExternalizeL
|
|
72 |
*
|
|
73 |
* Writes the objects data into a stream
|
|
74 |
*
|
|
75 |
* @param aOutput : an output stream where to write
|
|
76 |
* @since S60Rel2.6
|
|
77 |
*/
|
|
78 |
IMPORT_C virtual void ExternalizeL(RWriteStream& aOutput);
|
|
79 |
|
|
80 |
/**
|
|
81 |
* InternalizeL
|
|
82 |
*
|
|
83 |
* Reads the objects data from a stream
|
|
84 |
*
|
|
85 |
* @param aInput : an input stream where to read from
|
|
86 |
* @since S60Rel2.6
|
|
87 |
*/
|
|
88 |
IMPORT_C virtual void InternalizeL(RReadStream& aInput);
|
|
89 |
|
|
90 |
/**
|
|
91 |
* GetEventType
|
|
92 |
*
|
|
93 |
* Returns the event type of the Event in aEventType
|
|
94 |
*
|
|
95 |
* @param aEventType : Out parameter for the event type
|
|
96 |
* @since S60Rel2.6
|
|
97 |
*/
|
|
98 |
IMPORT_C void GetEventType(TDRMEventType& aEventType) const;
|
|
99 |
|
|
100 |
protected: // Data
|
|
101 |
|
|
102 |
TDRMEventType iType;
|
|
103 |
|
|
104 |
private:
|
|
105 |
/**
|
|
106 |
* Default constructor - prevented
|
|
107 |
*/
|
|
108 |
MDRMEvent( void );
|
|
109 |
|
|
110 |
// Prohibit copy constructor
|
|
111 |
MDRMEvent( const MDRMEvent& );
|
|
112 |
|
|
113 |
// Prohibit assigment operator
|
|
114 |
MDRMEvent& operator=( const MDRMEvent& );
|
|
115 |
};
|
|
116 |
|
|
117 |
#endif // MDRMEVENT_H
|
|
118 |
|
|
119 |
// End of File
|