javamanager/javaregistry/legacy/installedappsregistry/src/propertyvaluepair.cpp
branchRCL_3
changeset 14 04becd199f91
equal deleted inserted replaced
13:f5050f1da672 14:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Implementation of CPropertyValuePair class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "PropertyValuePair.h"
       
    20 
       
    21 // ======== MEMBER FUNCTIONS ========
       
    22 
       
    23 // ---------------------------------------------------------------------------
       
    24 // CPropertyValuePair::NewLC
       
    25 // ---------------------------------------------------------------------------
       
    26 //
       
    27 CPropertyValuePair* CPropertyValuePair::NewLC(TUid aPropertyId,
       
    28         const TDesC8& aValue)
       
    29 {
       
    30     CPropertyValuePair* self = new(ELeave) CPropertyValuePair(aPropertyId);
       
    31     CleanupStack::PushL(self);
       
    32     self->ConstructL(aValue);
       
    33     return self;
       
    34 }
       
    35 
       
    36 // ---------------------------------------------------------------------------
       
    37 // CPropertyValuePair::ConstructL
       
    38 // ---------------------------------------------------------------------------
       
    39 //
       
    40 void CPropertyValuePair::ConstructL(const TDesC8& /*aValue*/)
       
    41 {
       
    42     User::Leave(KErrNotSupported);
       
    43 }
       
    44 
       
    45 // ---------------------------------------------------------------------------
       
    46 // CPropertyValuePair::NewLC
       
    47 // ---------------------------------------------------------------------------
       
    48 //
       
    49 CPropertyValuePair* CPropertyValuePair::NewLC(RReadStream& aStream)
       
    50 {
       
    51     CPropertyValuePair* self = new(ELeave) CPropertyValuePair;
       
    52     CleanupStack::PushL(self);
       
    53     self->ConstructL(aStream);
       
    54     return self;
       
    55 }
       
    56 
       
    57 // ---------------------------------------------------------------------------
       
    58 // CPropertyValuePair::ConstructL
       
    59 // ---------------------------------------------------------------------------
       
    60 //
       
    61 void CPropertyValuePair::ConstructL(RReadStream& /*aStream*/)
       
    62 {
       
    63     User::Leave(KErrNotSupported);
       
    64 }
       
    65 
       
    66 // ---------------------------------------------------------------------------
       
    67 // CPropertyValuePair::NewLC
       
    68 // ---------------------------------------------------------------------------
       
    69 //
       
    70 CPropertyValuePair* CPropertyValuePair::NewLC
       
    71 (const CPropertyValuePair& aOther)
       
    72 {
       
    73     CPropertyValuePair* self =
       
    74         new(ELeave) CPropertyValuePair(aOther.iPropertyId);
       
    75     CleanupStack::PushL(self);
       
    76     self->ConstructL(*aOther.iValue);
       
    77     return self;
       
    78 }
       
    79 
       
    80 // ---------------------------------------------------------------------------
       
    81 // CPropertyValuePair::CPropertyValuePair
       
    82 // ---------------------------------------------------------------------------
       
    83 //
       
    84 CPropertyValuePair::CPropertyValuePair(TUid aPropertyId)
       
    85         : iPropertyId(aPropertyId)
       
    86 {
       
    87 }
       
    88 
       
    89 // ---------------------------------------------------------------------------
       
    90 // CPropertyValuePair::~CPropertyValuePair
       
    91 // ---------------------------------------------------------------------------
       
    92 //
       
    93 CPropertyValuePair::~CPropertyValuePair()
       
    94 {
       
    95 }
       
    96 
       
    97 // ---------------------------------------------------------------------------
       
    98 // CPropertyValuePair::PropertyId
       
    99 // ---------------------------------------------------------------------------
       
   100 //
       
   101 TUid CPropertyValuePair::PropertyId() const
       
   102 {
       
   103     return TUid::Null();
       
   104 }
       
   105 
       
   106 // ---------------------------------------------------------------------------
       
   107 // CPropertyValuePair::Value
       
   108 // ---------------------------------------------------------------------------
       
   109 //
       
   110 const TDesC8& CPropertyValuePair::Value() const
       
   111 {
       
   112     return KNullDesC8;
       
   113 }
       
   114 
       
   115 // ---------------------------------------------------------------------------
       
   116 // CPropertyValuePair::SetValueL
       
   117 // ---------------------------------------------------------------------------
       
   118 //
       
   119 void CPropertyValuePair::SetValueL(const TDesC8& /*aValue*/)
       
   120 {
       
   121     User::Leave(KErrNotSupported);
       
   122 }
       
   123 
       
   124 // ---------------------------------------------------------------------------
       
   125 // CPropertyValuePair::ExternalizeL
       
   126 // ---------------------------------------------------------------------------
       
   127 //
       
   128 void CPropertyValuePair::ExternalizeL(RWriteStream& /*aStream*/) const
       
   129 {
       
   130     User::Leave(KErrNotSupported);
       
   131 }
       
   132 
       
   133 // ---------------------------------------------------------------------------
       
   134 // CPropertyValuePair::SizeForStreamingL
       
   135 // ---------------------------------------------------------------------------
       
   136 //
       
   137 TInt CPropertyValuePair::SizeForStreamingL() const
       
   138 {
       
   139     User::Leave(KErrNotSupported);
       
   140     return 0;
       
   141 }