diff -r a180113055cb -r 83d6a149c755 example/LinkedInAuthApp/inc/loginDialog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/example/LinkedInAuthApp/inc/loginDialog.h Mon Oct 11 21:59:54 2010 +0530 @@ -0,0 +1,65 @@ +/** +* Copyright (c) 2010 Sasken Communication Technologies Ltd. +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the "{License}" +* which accompanies this distribution, and is available +* at the URL "{LicenseUrl}". +* +* Initial Contributors: +* Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution +* +* Contributors: +* Siddhartha Chandra, Satish Kanteti Sasken Communication Technologies Ltd +* Description: +* Login Dialog class of Authentication Application +*/ + + +#ifndef FB_LOGIN_DIALOG_H_ +#define FB_LOGIN_DIALOG_H_ + +#include "baseDialog.h" +#include "requestSP.h" +#include + +// FORWARD DECLARATIONS +class FBRequest; + +class FBLoginDialog : public FBDialog +{ + Q_OBJECT + +private: + FBRequest* iGetSessionRequest; + +private slots: + /* slots for handling signals from FBRequest iGetSessionRequest */ + void requestDidLoad (const QVariant& aResult); + void LoadLoginPage(); + + void requestFailedWithFacebookError ( const FBError& aError ); + void requestFailedWithNetworkError( QNetworkReply::NetworkError code ); + +public: + FBLoginDialog(FBSession* aSession); + FBLoginDialog(); + + void load(); + +protected: + virtual void dialogWillDisappear(); + void GetSessionKey(const QUrl& aUrl); + void FetchKeyFromUrl(const QUrl& aUrl); + void GetAccessToken(); +private: + void connectToGetSession(const QString& aToken); + void loadLoginPage(); + QString generateNONCE(const qint64 Length); + //int generateTimeStamp(); + QByteArray generateTimeStamp(); +public: + void connectToGetToken(); + void LaunchBrowserL(const TDesC& aUrl); + }; +#endif