imstutils/imconversationview/tsrc/imcvuiengine_test/src/s_spentry.cpp
branchRCL_3
changeset 28 3104fc151679
parent 27 2b7283837edb
child 29 9a48e301e94b
equal deleted inserted replaced
27:2b7283837edb 28:3104fc151679
     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_spentry.cpp
       
    15 *
       
    16 */
       
    17 
       
    18 #include <spentry.h>
       
    19 #include <spsettings.h>
       
    20 #include <spproperty.h>
       
    21 #include "s_cch.h"
       
    22 CSPEntry* mycspentry = NULL;
       
    23 extern CSPSettings* mycspsettings;
       
    24 CSPEntry* CSPEntry::NewL()
       
    25     {
       
    26     CSPEntry* self = CSPEntry::NewLC( );
       
    27     CleanupStack::Pop( self );
       
    28     return self;
       
    29     }
       
    30 CSPEntry* CSPEntry::NewLC()
       
    31     {
       
    32     CSPEntry* self = new (ELeave) CSPEntry( );
       
    33     CleanupStack::PushL( self );
       
    34     self->ConstructL();
       
    35     return self;
       
    36     }
       
    37 
       
    38 CSPEntry::~CSPEntry()
       
    39     {
       
    40     iServiceName.Close();
       
    41     iPropertyArray.ResetAndDestroy();
       
    42     iPropertyArray.Close();
       
    43     }
       
    44 
       
    45 TServiceId CSPEntry::GetServiceId() const
       
    46     {
       
    47     return iServiceId;
       
    48     }
       
    49 
       
    50 void CSPEntry::SetServiceId( TServiceId aServiceId ) 
       
    51     {
       
    52     iServiceId = aServiceId;
       
    53     }
       
    54 
       
    55 const TDesC16& CSPEntry::GetServiceName() const
       
    56     {
       
    57     return KTestServiceName;
       
    58     }
       
    59 
       
    60 TInt CSPEntry::SetServiceName( const TDesC16& aServiceName )
       
    61     {
       
    62     iServiceName.Copy(aServiceName);
       
    63     return KErrNone;
       
    64     }
       
    65 
       
    66 TInt CSPEntry::AddPropertyL( const CSPProperty& aProperty )
       
    67 
       
    68     {
       
    69     return KErrNone;
       
    70     }
       
    71 
       
    72 
       
    73 TInt CSPEntry::UpdateProperty( TServicePropertyName /*aPropertyName*/, TInt /*aValue*/ )
       
    74     {
       
    75     return KErrNone;
       
    76     }
       
    77 
       
    78 
       
    79 TInt CSPEntry::UpdateProperty( TServicePropertyName /*aPropertyName*/, const TDesC& /*aValue*/ )
       
    80     {
       
    81     return KErrNone;
       
    82     }
       
    83 
       
    84 TInt CSPEntry::UpdateProperty( TServicePropertyName /*aPropertyName*/, TOnOff /*aValue*/ )
       
    85     {
       
    86     return KErrNone;
       
    87     }
       
    88 
       
    89 TInt CSPEntry::GetProperty( const CSPProperty*& aProperty, 
       
    90     					    TServicePropertyName aPropertyName ) const
       
    91     {
       
    92   
       
    93     return KErrNotFound;
       
    94     }
       
    95 
       
    96 TInt CSPEntry::GetProperty( const CSPProperty*& /*aProperty*/, 
       
    97     								TInt /*aIndex*/ ) const
       
    98     {
       
    99     return KErrNone;
       
   100     }
       
   101 
       
   102 TInt CSPEntry::DeleteProperty( TInt /*aIndex*/ )
       
   103     {
       
   104     return KErrNone;
       
   105     }
       
   106 
       
   107 TInt CSPEntry::DeleteProperty( TServicePropertyName /*aProperty*/ )
       
   108     {
       
   109     return KErrNone;
       
   110     }
       
   111 
       
   112 const RPropertyArray& CSPEntry::GetAllProperties() const
       
   113     {
       
   114     return iPropertyArray;
       
   115     }
       
   116 
       
   117 TInt CSPEntry::PropertyCount() const
       
   118     {
       
   119     return KErrNone;
       
   120     }
       
   121 
       
   122 CSPEntry::CSPEntry()
       
   123     {
       
   124     }
       
   125 
       
   126 void CSPEntry::ConstructL()
       
   127     {
       
   128     iServiceName.CreateL(100);
       
   129     iServiceName.Copy(KTestServiceName);
       
   130     iServiceId = KTestServiceId;
       
   131     }
       
   132 
       
   133 TInt CSPEntry::SearchProperty( TServicePropertyName /*aProperty*/ ) const
       
   134     {
       
   135     return KErrNone;
       
   136     }
       
   137 
       
   138