supl/locationomasuplprotocolhandler/syncmlprovhandler/src/epos_tomasuplsettingsmap.cpp
branchRCL_3
changeset 44 2b4ea9893b66
parent 0 667063e416a2
child 45 6b6920c56e2f
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 
    19 
    20 
    20 #include <e32std.h>
    21 #include <e32def.h>
    21 #include <e32def.h>
    22 #include "epos_tomasuplsettingsmap.h"
    22 #include "epos_tomasuplsettingsmap.h"
    23 
    23 
    24 
    24 
    25 TInt TOMASuplSettingsMap::Map(const TDesC8& aSettingName, TSuplSettingType& suplSettingType )
    25 TInt TOMASuplSettingsMap::Map(const TDesC8& aSettingName, TSuplSettingType& suplSettingType )
    58         return KErrNotFound;	
    58         return KErrNotFound;	
    59         }
    59         }
    60     return KErrNone;
    60     return KErrNone;
    61     }
    61     }
    62 
    62 
    63 
       
    64 TInt TOMASuplSettingsMap::Get( const TDesC8& aUri, RChildList& aList, 
    63 TInt TOMASuplSettingsMap::Get( const TDesC8& aUri, RChildList& aList, 
    65                                     RArray<TPtrC8>& aChildren )
    64                                     RArray<TPtrC8>& aChildren )
    66     {
    65     {
    67     TInt rc = KErrNone;
    66     TRAPD( error,GetL( aUri,aList,aChildren ) );
       
    67     return error;
       
    68     }
    68 
    69 
       
    70 void TOMASuplSettingsMap::GetL( const TDesC8& aUri, RChildList& aList, 
       
    71                                     RArray<TPtrC8>& aChildren )
       
    72     {
    69     if( aUri == KRootFull )
    73     if( aUri == KRootFull )
    70         {
    74         {
    71         TSettingMap settingName;       
    75         TSettingMap settingName;       
    72         settingName.iSettingName.Set( KNameFull );
    76         settingName.iSettingName.Set( KNameFull );
    73         aList.Append(settingName);
    77         aList.AppendL(settingName);
    74         aChildren.Append( TPtrC8( KName.iBuf, KName.iTypeLength ) );
    78         aChildren.AppendL( TPtrC8( KName.iBuf, KName.iTypeLength ) );
    75         
    79         
    76         TSettingMap settingIapId;		
    80         TSettingMap settingIapId;		
    77         settingIapId.iSettingName.Set( KIapIdFull );
    81         settingIapId.iSettingName.Set( KIapIdFull );
    78         aList.Append(settingIapId);
    82         aList.AppendL(settingIapId);
    79         aChildren.Append( TPtrC8( KIapIdName.iBuf, KIapIdName.iTypeLength ) );
    83         aChildren.AppendL( TPtrC8( KIapIdName.iBuf, KIapIdName.iTypeLength ) );
    80         
    84         
    81         TSettingMap settingProviderId;       
    85         TSettingMap settingProviderId;       
    82         settingProviderId.iSettingName.Set( KProviderIdFull );
    86         settingProviderId.iSettingName.Set( KProviderIdFull );
    83         aList.Append(settingProviderId);
    87         aList.AppendL(settingProviderId);
    84         aChildren.Append( TPtrC8( KProviderId.iBuf, KProviderId.iTypeLength ) );
    88         aChildren.AppendL( TPtrC8( KProviderId.iBuf, KProviderId.iTypeLength ) );
    85 
    89 
    86         TSettingMap settingSlp;     
    90         TSettingMap settingSlp;     
    87         settingSlp.iSettingName.Set( KSlpAddrFull );
    91         settingSlp.iSettingName.Set( KSlpAddrFull );
    88         aList.Append( settingSlp );
    92         aList.AppendL( settingSlp );
    89         aChildren.Append( TPtrC8( KSlpAddr.iBuf, KSlpAddr.iTypeLength ) );
    93         aChildren.AppendL( TPtrC8( KSlpAddr.iBuf, KSlpAddr.iTypeLength ) );
    90         
    94         
    91         TSettingMap settingToConRef;       
    95         TSettingMap settingToConRef;       
    92         settingToConRef.iSettingName.Set( KToConRefFull );
    96         settingToConRef.iSettingName.Set( KToConRefFull );
    93         aList.Append(settingToConRef);
    97         aList.AppendL(settingToConRef);
    94         aChildren.Append( TPtrC8( KToConRef.iBuf, KToConRef.iTypeLength ) );
    98         aChildren.AppendL( TPtrC8( KToConRef.iBuf, KToConRef.iTypeLength ) );
    95         
    99         
    96         TSettingMap settingConRef;       
   100         TSettingMap settingConRef;       
    97         settingConRef.iSettingName.Set( KConRefFull );
   101         settingConRef.iSettingName.Set( KConRefFull );
    98         aList.Append(settingConRef);
   102         aList.AppendL(settingConRef);
    99         aChildren.Append( TPtrC8( KConRef.iBuf, KConRef.iTypeLength ) );
   103         aChildren.AppendL( TPtrC8( KConRef.iBuf, KConRef.iTypeLength ) );
   100         
   104         
   101         TSettingMap settingAddrType;       
   105         TSettingMap settingAddrType;       
   102         settingAddrType.iSettingName.Set( KAddrTypeFull );
   106         settingAddrType.iSettingName.Set( KAddrTypeFull );
   103         aList.Append(settingAddrType);
   107         aList.AppendL(settingAddrType);
   104         aChildren.Append( TPtrC8( KAddrType.iBuf, KAddrType.iTypeLength ) );        
   108         aChildren.AppendL( TPtrC8( KAddrType.iBuf, KAddrType.iTypeLength ) );        
   105         }
   109         }
   106     else
   110     else
   107         {
   111         {
   108         rc = KErrNotFound;	
   112         User::Leave( KErrNotFound );	
   109         }
   113         }
   110 
       
   111     return rc;		
       
   112     }
   114     }
   113 
   115 
   114 
   116 
   115 TInt TOMASuplSettingsMap::FileName( const TDesC8& aUri, const TDesC*& aFileName )
   117 TInt TOMASuplSettingsMap::FileName( const TDesC8& aUri, const TDesC*& aFileName )
   116     {
   118     {