omadrm/drmengine/server/src/drmpermissionitem.cpp
changeset 0 95b198f216e5
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "drmpermissionitem.h"
       
    22 
       
    23 // EXTERNAL DATA STRUCTURES
       
    24 
       
    25 // EXTERNAL FUNCTION PROTOTYPES  
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // MACROS
       
    30 
       
    31 // LOCAL CONSTANTS AND MACROS
       
    32 
       
    33 // MODULE DATA STRUCTURES
       
    34 
       
    35 // LOCAL FUNCTION PROTOTYPES
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 
       
    39 // ============================= LOCAL FUNCTIONS ===============================
       
    40 // ============================ MEMBER FUNCTIONS ===============================
       
    41 
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // CDRMCommonData::NewLC
       
    45 // Two-phased constructor.
       
    46 // -----------------------------------------------------------------------------
       
    47 //
       
    48 CDRMPermissionItem* CDRMPermissionItem::NewLC()
       
    49     {
       
    50     CDRMPermissionItem* self = new( ELeave ) CDRMPermissionItem();
       
    51     CleanupStack::PushL( self );
       
    52     self->ConstructL();    
       
    53 
       
    54     return self;
       
    55     };
       
    56 
       
    57 // -----------------------------------------------------------------------------
       
    58 // CDRMCommonData::NewL
       
    59 // Two-phased constructor.
       
    60 // -----------------------------------------------------------------------------
       
    61 //
       
    62 CDRMPermissionItem* CDRMPermissionItem::NewL()
       
    63     {
       
    64     CDRMPermissionItem* self = NewLC();
       
    65     CleanupStack::Pop( self );
       
    66 
       
    67     return self;
       
    68     };
       
    69 
       
    70 // -----------------------------------------------------------------------------
       
    71 // CDRMCommonData::NewLC
       
    72 // Two-phased constructor.
       
    73 // -----------------------------------------------------------------------------
       
    74 // 
       
    75 CDRMPermissionItem* CDRMPermissionItem::NewLC( const CDRMConstraint& aNormalized,
       
    76                                                TInt aIndex,
       
    77                                                TInt aParentIndex )
       
    78     {
       
    79     CDRMPermissionItem* self = new( ELeave ) CDRMPermissionItem( aIndex, aParentIndex);
       
    80     CleanupStack::PushL( self );
       
    81     self->ConstructL( aNormalized );    
       
    82 
       
    83     return self;    
       
    84     };
       
    85                                       
       
    86 // -----------------------------------------------------------------------------
       
    87 // CDRMCommonData::NewL
       
    88 // Two-phased constructor.
       
    89 // -----------------------------------------------------------------------------
       
    90 //                                      
       
    91 CDRMPermissionItem* CDRMPermissionItem::NewL( const CDRMConstraint& aNormalized,
       
    92                                      TInt aIndex,
       
    93                                      TInt aParentIndex )
       
    94     {
       
    95     CDRMPermissionItem* self = NewLC( aNormalized, aIndex, aParentIndex );
       
    96     CleanupStack::Pop( self );   
       
    97 
       
    98     return self;    
       
    99     };                                      
       
   100 
       
   101 // -----------------------------------------------------------------------------
       
   102 // Constructor
       
   103 // -----------------------------------------------------------------------------
       
   104 // 
       
   105 CDRMPermissionItem::CDRMPermissionItem( TInt aIndex,
       
   106                                         TInt aParentIndex ) :
       
   107     CDRMConstraint(), 
       
   108     iIndex( aIndex ),
       
   109     iParent( aParentIndex )
       
   110     {
       
   111     
       
   112     };
       
   113 
       
   114 // -----------------------------------------------------------------------------
       
   115 // Constructor
       
   116 // -----------------------------------------------------------------------------
       
   117 // 
       
   118 CDRMPermissionItem::CDRMPermissionItem() :
       
   119     CDRMConstraint(), 
       
   120     iIndex( -1 ),
       
   121     iParent( -1 )
       
   122     {
       
   123     
       
   124     };
       
   125     
       
   126 
       
   127 // -----------------------------------------------------------------------------
       
   128 // Destructor
       
   129 // -----------------------------------------------------------------------------
       
   130 // 
       
   131 CDRMPermissionItem::~CDRMPermissionItem()
       
   132     {
       
   133     // Nothing
       
   134     };    
       
   135     
       
   136 // -----------------------------------------------------------------------------
       
   137 // CDRMPermissionItem::ConstructL
       
   138 // Symbian 2nd phase constructor can leave.
       
   139 // -----------------------------------------------------------------------------
       
   140 // 
       
   141 void CDRMPermissionItem::ConstructL( const CDRMConstraint& aNormalized )
       
   142     {
       
   143     (const_cast<CDRMPermissionItem*>(this))->DuplicateL( aNormalized );
       
   144     };
       
   145 
       
   146 // -----------------------------------------------------------------------------
       
   147 // CDRMPermissionItem::ConstructL
       
   148 // Symbian 2nd phase constructor can leave.
       
   149 // -----------------------------------------------------------------------------
       
   150 //  
       
   151 void CDRMPermissionItem::ConstructL()
       
   152     {
       
   153     };