diff -r 29c8f9bc68e1 -r 5960d2d03390 vpnengine/ikev1lib/inc/ikev1crack.h --- a/vpnengine/ikev1lib/inc/ikev1crack.h Wed Sep 15 13:20:54 2010 +0300 +++ b/vpnengine/ikev1lib/inc/ikev1crack.h Wed Oct 13 15:42:16 2010 +0300 @@ -50,7 +50,6 @@ *---------------------------------------------------------------------------*/ #define DIALOG_INFO_ID 0xfedcba98 #define XAUTH_DIALOG_ID 0x76543210 -#define ERROR_DIALOG_ID 0x87654321 class CIkev1Negotiation; class TNotificationISAKMP; @@ -59,46 +58,28 @@ class CIkev1PluginSession; class MIkeDebug; - -NONSHARABLE_CLASS(CAuthDialogInfo) : public CBase +class CAuthDialogInfo : public CBase { public: CAuthDialogInfo(CIkev1PluginSession* aPluginSession, TUint32 aObjId, TUint32 aSAId, TUint32 aMsgId) { iPluginSession = aPluginSession; iSAId = aSAId; iObjId = aObjId; iMsgId = aMsgId; } - ~CAuthDialogInfo(); + ~CAuthDialogInfo() {iObjId = 0;} inline CIkev1PluginSession* PluginSession() { return iPluginSession;} inline TUint32 SAId() { return iSAId;} inline TUint32 GetObjId() { return iObjId;} inline TUint32 GetMsgId() { return iMsgId;} - void SetUserName( HBufC8* aUserName ); - void SetSecret( HBufC8* aSecret ); - private: - TUint32 iObjId; // Object identifier + TUint32 iObjId; // Object identifier CIkev1PluginSession* iPluginSession; // Plugin session pointer - TUint32 iSAId; // SA id of CIkev1Negotiation - TUint32 iMsgId; // Transaction exchange message ID - + TUint32 iSAId; // SA id of CIkev1Negotiation + TUint32 iMsgId; // Transaction exchange message ID + public: - /** - * Username from UI dialog or cache. - * Own. - */ - HBufC8* iUsername; - - /** - * Secret from UI dialog or cache. - * Own. - */ - HBufC8* iSecret; - - /** - * Negotiation pointer - * Not own. - */ - CIkev1Negotiation* iNegotiation; - +// Credentials data get from user with asynchronous dialog + HBufC8 *iUsername; + HBufC8 *iSecret; + HBufC8 *iDomain; }; @@ -111,8 +92,9 @@ TInt ExecuteCRACKMsgL(const ThdrISAKMP &aHdr); TInt ProcessUserResponseL(CAuthDialogInfo *aUserInfo); TInt CrackAuthenticationFailedL(const TNotificationISAKMP *aNotifPayload); - - TInt DialogCompleteL(TAny* aUserInfo, HBufC8* aUsername, HBufC8* aSecret); + + TInt DialogCompleteL(CIkev1Dialog* /*aDialog*/, TAny* aUserInfo, HBufC8* aUsername, HBufC8* aSecret, HBufC8* aDomain); + private: TInt GetDataL(HBufC8* aChallenge); @@ -135,7 +117,7 @@ HBufC8 *iUserName; // Saved for User name caching HBufC8 *iDomain; // Fixed domain value for this CRACK negotiation - + MIkeDebug& iDebug; };