webservices/wsdescription/src/servicepolicy.cpp
branchRCL_3
changeset 37 1adb97a15c2f
parent 36 c5fabff9b552
equal deleted inserted replaced
36:c5fabff9b552 37:1adb97a15c2f
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:           
    14 * Description:           
    15 *
    15 *
    16 */
    16 */
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
    17 
    25 // INCLUDE FILES
    18 // INCLUDE FILES
    26 #include <e32std.h>
    19 #include <e32std.h>
    27 #include <s32strm.h>
    20 #include <s32strm.h>
    28 #include "sendebug.h"                 // internal Utils\inc - logging MACROs
    21 #include "sendebug.h"                 // internal Utils\inc - logging MACROs
   376                     SenXmlUtils::AddAttributeL(added, pBaseAttribute->Name(), pBaseAttribute->Value());
   369                     SenXmlUtils::AddAttributeL(added, pBaseAttribute->Name(), pBaseAttribute->Value());
   377                     }
   370                     }
   378                 }
   371                 }
   379                 
   372                 
   380             } 
   373             } 
   381              
       
   382         }
   374         }
   383 
   375 
   384      }
   376      }
       
   377 	 
   385 void CServicePolicy::AddUserAgentElementsL(CSenElement* aUserAgentElement)
   378 void CServicePolicy::AddUserAgentElementsL(CSenElement* aUserAgentElement)
   386     {
   379     {
   387     CSenElement* pClientPolicyElement = AsElement().Element(KClientServicePolicyLocalName);
   380     CSenElement* pClientPolicyElement = AsElement().Element(KClientServicePolicyLocalName);
   388     CSenElement* pAppPolicyElement = pClientPolicyElement->Element(KAppInfoLocalName);
   381     CSenElement* pAppPolicyElement = pClientPolicyElement->Element(KAppInfoLocalName);
   389     CSenElement* pDevicePolicyElement = pAppPolicyElement->Element(KDeviceOptionsLocalName);
   382     CSenElement* pDevicePolicyElement = pAppPolicyElement->Element(KDeviceOptionsLocalName);
   585 
   578 
   586             }
   579             }
   587         }
   580         }
   588     else //Just add this policy in the <PolicyArray>
   581     else //Just add this policy in the <PolicyArray>
   589         {
   582         {
   590         
       
   591         CSenElement& apol= pPolicyArray->AddElementL(KPolicyLocalName);
   583         CSenElement& apol= pPolicyArray->AddElementL(KPolicyLocalName);
   592         apol.CopyFromL(*aPolicy);                                
   584         apol.CopyFromL(*aPolicy);                                
   593         PolicyIdL(&apol);	//codescannerwarnings
   585         PolicyIdL(&apol);	//codescannerwarnings
   594         retVal = KErrNone;
   586         retVal = KErrNone;
   595         }
   587         }
   785             return ETrue;
   777             return ETrue;
   786         else
   778         else
   787             return EFalse;
   779             return EFalse;
   788     }                    
   780     }                    
   789 
   781 
       
   782     return EFalse;
       
   783     
   790 }
   784 }
   791 HBufC8* CServicePolicy::ClientPolicyValue(const TDesC8& aKey)
   785 HBufC8* CServicePolicy::ClientPolicyValue(const TDesC8& aKey)
   792     {
   786     {
   793     HBufC8* retVal = NULL;        
   787     HBufC8* retVal = NULL;        
   794     TInt err(KErrNone);
   788     TInt err(KErrNone);