diff -r abbed5a4b42a -r 8d540f55e491 networksecurity/ipsec/ipsecpolapi/src/ipsecpolapi.cpp --- a/networksecurity/ipsec/ipsecpolapi/src/ipsecpolapi.cpp Tue Aug 31 16:45:15 2010 +0300 +++ b/networksecurity/ipsec/ipsecpolapi/src/ipsecpolapi.cpp Wed Sep 01 12:33:58 2010 +0100 @@ -16,7 +16,6 @@ // #include - #include "ipsecpol.h" #include "ipsecpolapi.h" #include "clistatic.h" @@ -39,7 +38,7 @@ // // Connect to the server attempting to start it if necessary // - { + { TInt retry=2; for (;;) { @@ -156,3 +155,20 @@ SendReceive(EIpsecPolicyEnumerateSelectors, TIpcArgs(&aGateway, &selectorCount)); } + /** + *Sets an option. + *RIpsecPolicyServ implementations may provide options that can be set with this method. + *Eg:- Seting SID of an appliction that is going to load policy file. Then that application + *Can call this api with option name - and option level - and provide the SID value. + * + *@param aOptionName : An integer constant which identifies an option + *@param aOptionLevel : An integer constant which identifies level of an option + *@param aOption : An option value + *@return TInt: KErrNone if succsess + */ +EXPORT_C TInt RIpsecPolicyServ::SetOpt(TUint aOptionName, TUint aOptionLevel, const TDesC8 &aOption) + { + TPckg optionNamePkg(aOptionName); + TPckg pkgOptionLevel(aOptionLevel); + return SendReceive(EIpsecPolicySetOption, TIpcArgs( &optionNamePkg, &pkgOptionLevel, &aOption)); + }