syncmlfw/dm/dmnetworkmon/src/DMNetworkMon.cpp
branchRCL_3
changeset 26 19bba8228ff0
parent 25 b183ec05bd8c
equal deleted inserted replaced
25:b183ec05bd8c 26:19bba8228ff0
    15  *
    15  *
    16  */
    16  */
    17 
    17 
    18 // USER INCLUDES
    18 // USER INCLUDES
    19 #include "DMNetworkMon.h"
    19 #include "DMNetworkMon.h"
    20 
    20 #include <e32property.h>
       
    21 #include <nsmldmconst.h>
    21 #include <SyncMLClient.h>
    22 #include <SyncMLClient.h>
    22 #include <SyncMLClientDM.h>
    23 #include <SyncMLClientDM.h>
    23 #include <nsmldmauthinfo.h>
    24 #include <nsmldmauthinfo.h>
    24 #include <nsmlconstants.h>
    25 #include <nsmlconstants.h>
    25 #include <AknGlobalNote.h>
    26 #include <AknGlobalNote.h>
   478     if(ret == 1)
   479     if(ret == 1)
   479         {
   480         {
   480 
   481 
   481         RSyncMLDevManJob dmJob;
   482         RSyncMLDevManJob dmJob;
   482 
   483 
   483         TInt IAPID = -2;
   484         TInt IAPID = -1;
   484         TBuf<10> genalertap,temp;
   485         TBuf<10> genalertap,temp;
   485         genalertap.Zero();
   486         genalertap.Zero();
   486         temp.Zero();	  
   487         temp.Zero();	  
   487         genalertap.Append(KNSmlDMJobIapPrefix);
   488         genalertap.Append(KNSmlDMJobIapPrefix);
   488         temp.Num(iapid);//Decimal Iap
   489         temp.Num(iapid);//Decimal Iap
   489         if( temp.Length() <= KNSmlHalfTransportIdLength && 
   490         if( temp.Length() <= KNSmlHalfTransportIdLength && 
   490                 iapid >= -2)
   491                 iapid > KErrNotFound)
   491             {
   492             {
   492             genalertap.AppendFill('0',KNSmlHalfTransportIdLength-temp.Length());
   493             genalertap.AppendFill('0',KNSmlHalfTransportIdLength-temp.Length());
   493             genalertap.Append(temp);
   494             genalertap.Append(temp);
   494             TLex gavalue(genalertap);
   495             TLex gavalue(genalertap);
   495             gavalue.Val(IAPID);
   496             gavalue.Val(IAPID);
   496             LOGSTRING("DM JOB CREATED");
   497             LOGSTRING("DM JOB CREATED");
       
   498             static _LIT_SECURITY_POLICY_PASS(KAllowAllPolicy);
       
   499             static _LIT_SECURITY_POLICY_C1(KAllowWriteDeviceDataPolicy, ECapabilityWriteDeviceData);
       
   500             RProperty::Define(KPSUidNSmlSOSServerKey,KNSmlDMSilentJob,RProperty::EInt,KAllowAllPolicy,KAllowWriteDeviceDataPolicy);
       
   501            TInt r2=RProperty::Set(KPSUidNSmlSOSServerKey,KNSmlDMSilentJob,ESilent);           
       
   502 		    LOGSTRING2( "CDMNetworkMon::RunError() KNSmlDMSilentJob get error code = %i", r2);
   497             TRAPD(err, dmJob.CreateL( iSyncSession, ProfileId, IAPID));
   503             TRAPD(err, dmJob.CreateL( iSyncSession, ProfileId, IAPID));
   498             LOGSTRING("DM JOB CREATED END");
   504             LOGSTRING("DM JOB CREATED END");
   499             if(err!=KErrNone)
   505             if(err!=KErrNone)
   500                 {
   506                 {
   501                 LOGSTRING2( "error dmJob.CreateL = %i", err);
   507                 LOGSTRING2( "error dmJob.CreateL = %i", err);