simpleengine/xdmrlspres/src/prescondvalidity.cpp
branchRCL_3
changeset 17 2669f8761a99
parent 11 52d91a16fec3
child 18 fbd2e7cec7ef
equal deleted inserted replaced
16:2580314736af 17:2669f8761a99
    59                                         RArray<TTimePeriod>& aValidTimes)
    59                                         RArray<TTimePeriod>& aValidTimes)
    60 	{
    60 	{
    61     OPENG_DP(D_OPENG_LIT( "TPresCondValidity::GetValidity()" ) );
    61     OPENG_DP(D_OPENG_LIT( "TPresCondValidity::GetValidity()" ) );
    62     OPENG_DP(D_OPENG_LIT( "     aRuleID = %S"),&aRuleID);
    62     OPENG_DP(D_OPENG_LIT( "     aRuleID = %S"),&aRuleID);
    63 
    63 
    64     CleanupClosePushL (aValidTimes);
       
    65     
       
    66 	CXdmDocumentNode* validityNode = GetValidityNodeL(aRuleID, EFalse);
    64 	CXdmDocumentNode* validityNode = GetValidityNodeL(aRuleID, EFalse);
    67 	if(validityNode==NULL)
    65 	if(validityNode==NULL)
    68 	    return KErrNotFound;
    66 	    return KErrNotFound;
    69 	
    67 	
    70 	TInt nodeCount = validityNode->NodeCount();
    68 	TInt nodeCount = validityNode->NodeCount();
    99     nodeCount = fromNodes.Count();
    97     nodeCount = fromNodes.Count();
   100     OPENG_DP(D_OPENG_LIT( "     nodesCount = %d" ),nodeCount);
    98     OPENG_DP(D_OPENG_LIT( "     nodesCount = %d" ),nodeCount);
   101 
    99 
   102 	for(TInt i=0; i<nodeCount; i++)
   100 	for(TInt i=0; i<nodeCount; i++)
   103 	    {
   101 	    {
   104         aValidTimes.AppendL(myTimePeriod);
   102         aValidTimes.Append(myTimePeriod);
   105 
   103 
   106 	    // processing from
   104 	    // processing from
   107 	    (fromNodes[i])->SetLeafNode(ETrue);
   105 	    (fromNodes[i])->SetLeafNode(ETrue);
   108 	    fromPtr = CnvUtfConverter::ConvertToUnicodeFromUtf8L((fromNodes[i])->LeafNodeContent());
   106 	    fromPtr = CnvUtfConverter::ConvertToUnicodeFromUtf8L((fromNodes[i])->LeafNodeContent());
   109 	    CleanupStack::PushL(fromPtr);
   107 	    CleanupStack::PushL(fromPtr);
   134 
   132 
   135 	    }
   133 	    }
   136 	    
   134 	    
   137     fromNodes.Close();
   135     fromNodes.Close();
   138     untilNodes.Close();
   136     untilNodes.Close();
   139     
       
   140     CleanupStack::Pop();
       
   141 	return KErrNone;
   137 	return KErrNone;
   142 	}
   138 	}
   143 
   139 
   144 // ---------------------------------------------------------------------------
   140 // ---------------------------------------------------------------------------
   145 // TPresCondValidity::DeleteAllValidity()
   141 // TPresCondValidity::DeleteAllValidity()