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