dependencies/DRMEvent.h
author MattD <mattd@symbian.org>
Thu, 01 Apr 2010 14:50:19 +0100
changeset 48 0d4ac38889fc
parent 31 a3e98f9c292b
permissions -rw-r--r--
Merged in kashif's, fdim's and my removal of abld.bat and .cproject files onto the fixed up version of Christian's head.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     1
/*
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     2
* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     3
* All rights reserved.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     4
* This component and the accompanying materials are made available
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     6
* which accompanies this distribution, and is available
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     8
*
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     9
* Initial Contributors:
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    11
*
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    12
* Contributors:
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    13
*
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    14
* Description:  Notification Event object base class
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    15
*
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    16
*/
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    17
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    18
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    19
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    20
#ifndef MDRMEVENT_H
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    21
#define MDRMEVENT_H
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    22
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    23
//  INCLUDES
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    24
#include <e32base.h>
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    25
#include <s32strm.h> 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    26
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    27
// CONSTANTS
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    28
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    29
// MACROS
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    30
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    31
// DATA TYPES
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    32
typedef TUint32 TDRMEventType;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    33
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    34
const TDRMEventType KEventNone      = 0;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    35
const TDRMEventType KEventAddRemove = 1;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    36
const TDRMEventType KEventModify    = 2;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    37
const TDRMEventType KEventTimeChange = 3;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    38
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    39
// FUNCTION PROTOTYPES
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    40
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    41
// FORWARD DECLARATIONS
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    42
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    43
// CLASS DECLARATION
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    44
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    45
/**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    46
*  This class offers the base class for all DRM Notification events
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    47
*  It can be used as it is, but it is meant that Other specific to an event
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    48
*  classes are derived from it
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    49
*
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    50
*  @lib DRMCommon.dll    
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    51
*  @since S60Rel2.6
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    52
*/
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    53
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    54
class MDRMEvent
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    55
{
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    56
public: // Constructors and destructor
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    57
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    58
    * Constructor
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    59
    *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    60
    * @param aEvent The event type of the object to be created
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    61
    */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    62
    IMPORT_C MDRMEvent(const TDRMEventType& aEvent); 
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    63
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    64
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    65
    * Destructor
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    66
    */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    67
    IMPORT_C virtual ~MDRMEvent();
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    68
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    69
public: // new functions
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    70
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    71
    * ExternalizeL
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    72
    *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    73
    * Writes the objects data into a stream
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    74
    *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    75
    * @param aOutput : an output stream where to write
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    76
    * @since S60Rel2.6
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    77
    */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    78
    IMPORT_C virtual void ExternalizeL(RWriteStream& aOutput);
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    79
    
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    80
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    81
    * InternalizeL
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    82
    *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    83
    * Reads the objects data from a stream
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    84
    *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    85
    * @param aInput : an input stream where to read from
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    86
    * @since S60Rel2.6
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    87
    */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    88
    IMPORT_C virtual void InternalizeL(RReadStream& aInput);
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    89
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    90
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    91
    * GetEventType
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    92
    *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    93
    * Returns the event type of the Event in aEventType
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    94
    *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    95
    * @param aEventType : Out parameter for the event type
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    96
    * @since S60Rel2.6
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    97
    */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    98
    IMPORT_C void GetEventType(TDRMEventType& aEventType) const;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    99
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   100
protected:  // Data
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   101
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   102
    TDRMEventType iType;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   103
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   104
private:   
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   105
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   106
    * Default constructor - prevented
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   107
    */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   108
    MDRMEvent( void );
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   109
    
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   110
    // Prohibit copy constructor
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   111
    MDRMEvent( const MDRMEvent& );
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   112
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   113
    // Prohibit assigment operator
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   114
    MDRMEvent& operator=( const MDRMEvent& );    
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   115
};
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   116
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   117
#endif      // MDRMEVENT_H
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   118
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   119
// End of File