imstutils/imconversationview/tsrc/imcvuiengine_test/src/s_spproperty.cpp
changeset 15 81eeb8c83ce5
parent 0 5e5d6b214f4f
equal deleted inserted replaced
0:5e5d6b214f4f 15:81eeb8c83ce5
     1 /*
       
     2 * Copyright (c) 2009 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: s_spproperty.cpp
       
    15 *
       
    16 */
       
    17 #include <spproperty.h>
       
    18 
       
    19 const TInt KMaxIntLen = 15;
       
    20 CSPProperty* CSPProperty::NewL()
       
    21     {
       
    22     return new ( ELeave ) CSPProperty;
       
    23     }
       
    24 CSPProperty* CSPProperty::NewLC()
       
    25     {
       
    26     CSPProperty* self = new ( ELeave ) CSPProperty;
       
    27     CleanupStack::PushL( self );
       
    28     return self;
       
    29     }
       
    30 CSPProperty::~CSPProperty(){}
       
    31 TServicePropertyName CSPProperty::GetName() const
       
    32     {
       
    33     return iPropertyName;
       
    34     }
       
    35 TInt CSPProperty::SetName( TServicePropertyName aPropertyname )
       
    36     {
       
    37     iPropertyName = aPropertyname;
       
    38     return KErrNone;
       
    39     }
       
    40 TSPItemType CSPProperty::GetPropertyType() const
       
    41     {
       
    42     TSPItemType type = EItemTypeNotDefined;
       
    43     return type;
       
    44     }
       
    45 TInt CSPProperty::SetPropertyType( TSPItemType /*aPropertyType*/ ){ return KErrNone; }
       
    46 TPropertyDataType CSPProperty::GetDataType() const
       
    47     {
       
    48     TPropertyDataType type = EDataTypeNotSet;
       
    49     return type;
       
    50     }
       
    51 void CSPProperty::SetDataType( TPropertyDataType /*aDataType*/ ){}
       
    52 TInt CSPProperty::GetValue( TInt& aValue ) const
       
    53     {
       
    54     TInt protocolUidValue = 0x20007B6D;  ////// dummy adaptation UID
       
    55     aValue = protocolUidValue;
       
    56     return KErrNone;
       
    57     }
       
    58 TInt CSPProperty::SetValue( TInt aValue )
       
    59     { 
       
    60     return KErrNone;
       
    61     }
       
    62 
       
    63 TInt CSPProperty::GetValue( TDes& aValue ) const
       
    64 {
       
    65 aValue.Zero();
       
    66 
       
    67 if ( aValue.MaxLength() >= iPropertyValue.Length() )
       
    68     {
       
    69     aValue.Copy( iPropertyValue );
       
    70     return KErrNone;
       
    71     }
       
    72 
       
    73 }
       
    74 
       
    75 TInt CSPProperty::SetValue( const TDesC& aValue )
       
    76     {
       
    77     TInt ret( 0 );
       
    78     iPropertyValue.Close();
       
    79     ret = iPropertyValue.Create( aValue );
       
    80     return ret;
       
    81     }
       
    82 
       
    83 TInt CSPProperty::GetValue( TOnOff& aValue ) const
       
    84 	{
       
    85 	return KErrNone;
       
    86 	}
       
    87 TInt CSPProperty::SetValue( TOnOff aValue )
       
    88 	{
       
    89 	return KErrNone;
       
    90 	}
       
    91 TInt CSPProperty::SetValueNoDataTypeCheck( const TDesC& /*aValue*/ ){ return KErrNone; }
       
    92 TPropertyDataType CSPProperty::DataType( TServicePropertyName /*aProperty*/ )
       
    93     {
       
    94     TPropertyDataType type = EDataTypeNotSet;
       
    95     return type;
       
    96     }
       
    97 TSPItemType CSPProperty::PropertyType( TServicePropertyName /*aProperty*/ )
       
    98     {
       
    99     TSPItemType type = EItemTypeNotDefined;
       
   100     return type;
       
   101     }
       
   102 void CSPProperty::CopyL( const CSPProperty& aSource )
       
   103     {
       
   104     }
       
   105 TBool CSPProperty::CSPProperty::operator==( 
       
   106             const CSPProperty& /*aProperty*/ ) const{ return ETrue; }
       
   107 CSPProperty::CSPProperty(){}
       
   108 void CSPProperty::ConstructL(){}
       
   109 TInt SetDefaultValue( TServicePropertyName /*aProperty*/ ){ return KErrNone; }
       
   110