diff -r 352850cbed81 -r 9f4e37332ce5 vpnui/vpnmanagementui/inc/vpnapiwrapper.h --- a/vpnui/vpnmanagementui/inc/vpnapiwrapper.h Mon Jun 21 16:49:56 2010 +0300 +++ b/vpnui/vpnmanagementui/inc/vpnapiwrapper.h Thu Aug 19 10:54:34 2010 +0300 @@ -19,13 +19,15 @@ #define __VPNAPIWRAPPER_H__ #include -#include "vpnapi.h" + +#include "vpnextapi.h" class MVpnApiWrapperCaller { public: - virtual void NotifyPolicyImportComplete(TInt aResult) = 0; + + virtual void NotifySynchroniseServerCompleteL(TInt aResult) = 0; }; /** @@ -65,23 +67,18 @@ TInt aPolicyIndex, TVpnPolicyDetails& aPolicyDetails); /** - * Imports a new VPN policy to the policy store. + * Cretes the specified server definition. * - * @param aImportDir An absolute path to the VPN policy files directory - * - * @param aCaller - */ - void ImportPolicyL( - const TDesC& aImportDir, MVpnApiWrapperCaller* aCaller); - - /** - * Gets the last update time of the specified policy. - * @param aPolicyIndex Index of the listbox in the policy view. - * @param aTime Last update time to be returned. - * @return Returns KErrNone if succeed. - * Otherwise it returns KErrNotFound. - */ - TInt GetLastUpdateTime(TInt aPolicyIndex, TTime& aTime); + * @param aServerDetails [in] Server details structure + */ + TInt CreateServer( const TAgileProvisionApiServerSettings& aServerDetails ); + + TAgileProvisionApiServerListElem& ServerListL(); + + void GetServerDetailsL( TAgileProvisionApiServerSettings& aServerDetails ); + TInt DeleteServer(); + void SynchroniseServerL( MVpnApiWrapperCaller* aCaller ); + void CancelSynchronise( ); protected: // From CActive void DoCancel(); @@ -103,16 +100,27 @@ */ void BuildPolicyListL(); + /** + * Deletes all VPN AP that referes to policy aPolicyId. + * Ignores possible errors --> In case of an error the remaining + * APs are not deleted. + */ + void DeleteReferringVpnAps(const TVpnPolicyId& aPolicyId) const; + void DeleteReferringVpnApsL(const TVpnPolicyId& aPolicyId) const; + private: enum TTask { ETaskNone = 1, - ETaskImportPolicies + ETaskSynchroniseServer, + }; - RVpnApi iVpnApi; + RVpnExtApi iVpnExtApi; + TAgileProvisionApiServerSettings iPolicyServer; + TAgileProvisionApiServerListElem iVpnPolicyServerList; CArrayFixFlat* iPolicyList; TFileName iImportDir;