equal
deleted
inserted
replaced
29 #include "rxmlreader.h" |
29 #include "rxmlreader.h" |
30 #include "NSmlProfileContentHandler.h" |
30 #include "NSmlProfileContentHandler.h" |
31 #include "nsmldsagconstants.h" |
31 #include "nsmldsagconstants.h" |
32 #include <centralrepository.h> //CRepository |
32 #include <centralrepository.h> //CRepository |
33 #include <NsmlOperatorDataCRKeys.h> // KCRUidOperatorDatasyncInternalKeys |
33 #include <NsmlOperatorDataCRKeys.h> // KCRUidOperatorDatasyncInternalKeys |
34 #include <NsmlOperatorErrorCRKeys.h> // KCRUidOperatorDatasyncErrorKeys |
|
35 |
34 |
36 _LIT(Kinfile,"z:\\Private\\101F99FB\\VariantData.xml"); |
35 _LIT(Kinfile,"z:\\Private\\101F99FB\\VariantData.xml"); |
37 const TInt KUrlLength = 256; |
36 const TInt KUrlLength = 256; |
38 |
37 |
39 //============================================= |
38 //============================================= |
981 CleanupStack::PopAndDestroy( rep ); |
980 CleanupStack::PopAndDestroy( rep ); |
982 } |
981 } |
983 return buf; |
982 return buf; |
984 } |
983 } |
985 |
984 |
986 //----------------------------------------------------------------------------- |
|
987 // CNSmlDSSettings::StoreSyncType |
|
988 // Checks if received Alert Code is a sync type and tries to convert |
|
989 // it to Sync Type (TSmlSyncType). |
|
990 //----------------------------------------------------------------------------- |
|
991 // |
|
992 EXPORT_C void CNSmlDSSettings::StoreSyncType( const TDes8& aAlertCode ) |
|
993 { |
|
994 TInt syncType = KErrNotFound; |
|
995 |
|
996 if ( aAlertCode == KNSmlDSTwoWay ) |
|
997 { |
|
998 syncType = ESmlTwoWay; |
|
999 } |
|
1000 else if ( aAlertCode == KNSmlDSOneWayFromServer ) |
|
1001 { |
|
1002 syncType = ESmlOneWayFromServer; |
|
1003 } |
|
1004 else if ( aAlertCode == KNSmlDSOneWayFromClient ) |
|
1005 { |
|
1006 syncType = ESmlOneWayFromClient; |
|
1007 } |
|
1008 else if ( aAlertCode == KNSmlDSSlowSync ) |
|
1009 { |
|
1010 syncType = ESmlSlowSync; |
|
1011 } |
|
1012 else if ( aAlertCode == KNSmlDSRefreshFromServer ) |
|
1013 { |
|
1014 syncType = ESmlRefreshFromServer; |
|
1015 } |
|
1016 else if ( aAlertCode == KNSmlDSRefreshFromClient ) |
|
1017 { |
|
1018 syncType = ESmlRefreshFromClient; |
|
1019 } |
|
1020 |
|
1021 if ( syncType != KErrNotFound ) |
|
1022 { |
|
1023 CRepository* rep = NULL; |
|
1024 TRAPD ( err, rep = CRepository::NewL( KCRUidOperatorDatasyncErrorKeys ) ); |
|
1025 if ( err == KErrNone ) |
|
1026 { |
|
1027 rep->Set( KNsmlOpDsSyncType, syncType ); |
|
1028 delete rep; |
|
1029 } |
|
1030 } |
|
1031 } |
|
1032 |
|
1033 // End of File |
985 // End of File |