80 // |
80 // |
81 void CNSmlHTTP::ConstructL() |
81 void CNSmlHTTP::ConstructL() |
82 { |
82 { |
83 // construct shutdown timer |
83 // construct shutdown timer |
84 DBG_FILE(_S8("CNSmlHTTP::ConstructL BEGIN")); |
84 DBG_FILE(_S8("CNSmlHTTP::ConstructL BEGIN")); |
|
85 TBool dmjob = EFalse; |
85 FeatureManager::InitializeLibL(); |
86 FeatureManager::InitializeLibL(); |
86 iShutdown = new (ELeave) CNSmlXptShutdownTimer( this ); |
87 iShutdown = new (ELeave) CNSmlXptShutdownTimer( this ); |
87 iShutdown->ConstructL(); |
88 iShutdown->ConstructL(); |
88 iNetworkStatusEngine = NULL; |
89 iNetworkStatusEngine = NULL; |
89 // do this only if session is DM |
90 // do this only if session is DM |
90 TInt session=0; |
91 TInt session=0; |
91 TInt r=RProperty::Get( KPSUidNSmlSOSServerKey, KNSmlSyncJobOngoing, session); |
92 TInt r=RProperty::Get( KPSUidNSmlSOSServerKey, KNSmlSyncJobOngoing, session); |
92 DBG_FILE_CODE(session, _S8("CNSmlHTTP::ConstructL Current Session is (DM = 2, DS = 1) ")); |
93 DBG_FILE_CODE(session, _S8("CNSmlHTTP::ConstructL Current Session is (DM = 2, DS = 1) ")); |
93 if( session == ESyncMLDMSession )//for dm session |
94 if( session == ESyncMLDMSession )//for dm session |
94 { |
95 { |
|
96 dmjob = ETrue; |
95 TInt dmsessionTimeout = -1; |
97 TInt dmsessionTimeout = -1; |
96 CRepository *rep = NULL; |
98 CRepository *rep = NULL; |
97 TRAPD( err1, rep = CRepository::NewL( KCRUidDeviceManagementInternalKeys )) |
99 TRAPD( err1, rep = CRepository::NewL( KCRUidDeviceManagementInternalKeys )) |
98 DBG_FILE_CODE(err1, _S8("CNSmlHTTP::ConstructL cenrep read error code ")); |
100 DBG_FILE_CODE(err1, _S8("CNSmlHTTP::ConstructL cenrep read error code ")); |
99 if(err1 == KErrNone) |
101 if(err1 == KErrNone) |
121 iServerAcceptEncoding = ExptNone; |
123 iServerAcceptEncoding = ExptNone; |
122 iSession = ESyncMLSessionUnknown; |
124 iSession = ESyncMLSessionUnknown; |
123 RProperty::Get( KPSUidNSmlSOSServerKey, KNSmlSyncJobOngoing, iSession); |
125 RProperty::Get( KPSUidNSmlSOSServerKey, KNSmlSyncJobOngoing, iSession); |
124 // construct dialup agent |
126 // construct dialup agent |
125 iDialUpAgent = new (ELeave) CNSmlDialUpAgent(); |
127 iDialUpAgent = new (ELeave) CNSmlDialUpAgent(); |
126 iDialUpAgent->ConstructL(); |
128 iDialUpAgent->ConstructL(dmjob); |
127 |
129 |
128 iEngineState = ExptIdle; |
130 iEngineState = ExptIdle; |
129 iTimeOut = EFalse; |
131 iTimeOut = EFalse; |
130 iLastPart = EFalse; |
132 iLastPart = EFalse; |
131 iAuthRetryCount=0; |
133 iAuthRetryCount=0; |