example/AuthApp/inc/loginDialog.h
changeset 14 a469c0e6e7fb
child 17 106a4bfcb866
equal deleted inserted replaced
13:b5d63d5fc252 14:a469c0e6e7fb
       
     1 /**
       
     2 * Copyright (c) 2010 Sasken Communication Technologies Ltd.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the "{License}"
       
     6 * which accompanies  this distribution, and is available
       
     7 * at the URL "{LicenseUrl}".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Narasimhulu Kavadapu, Sasken Communication Technologies Ltd - Initial contribution
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Login Dialog class of Authentication Application
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef FB_LOGIN_DIALOG_H_
       
    20 #define FB_LOGIN_DIALOG_H_
       
    21 
       
    22 #include "baseDialog.h"
       
    23 #include "requestSP.h"
       
    24 #include <QNetworkReply>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class FBRequest;
       
    28 
       
    29 class FBLoginDialog : public FBDialog
       
    30 {
       
    31     Q_OBJECT
       
    32 
       
    33 private:
       
    34     FBRequest* iGetSessionRequest;
       
    35 	
       
    36 private slots:
       
    37     /* slots for handling signals from FBRequest iGetSessionRequest */
       
    38     void requestDidLoad (const QVariant& aResult);
       
    39 
       
    40     void requestFailedWithFacebookError ( const FBError& aError );
       
    41     void requestFailedWithNetworkError( QNetworkReply::NetworkError code );
       
    42 
       
    43 public:
       
    44     FBLoginDialog(FBSession* aSession);
       
    45     FBLoginDialog();
       
    46 
       
    47     void load();
       
    48 
       
    49 protected:
       
    50     virtual void dialogWillDisappear();
       
    51     void GetSessionKey(const QUrl& aUrl);
       
    52 
       
    53 private:
       
    54     void connectToGetSession(const QString& aToken);
       
    55     void loadLoginPage();
       
    56 	
       
    57  };
       
    58 #endif