example/FlickrAuthApp/src/sessionSP.cpp
changeset 26 83d6a149c755
parent 17 106a4bfcb866
equal deleted inserted replaced
25:a180113055cb 26:83d6a149c755
    26 ///////////////////////////////////////////////////////////////////////////////////////////////////
    26 ///////////////////////////////////////////////////////////////////////////////////////////////////
    27 // global
    27 // global
    28 
    28 
    29 static const QString kAPIRestURL = "http://api.flickr.com/services/rest/";
    29 static const QString kAPIRestURL = "http://api.flickr.com/services/rest/";
    30 
    30 
    31 static const int kMaxBurstRequests = 3;
       
    32 static const int kBurstDuration = 2;
       
    33 
       
    34 static FBSession* sharedSession = NULL;
    31 static FBSession* sharedSession = NULL;
    35 
    32 
    36 ///////////////////////////////////////////////////////////////////////////////////////////////////
    33 ///////////////////////////////////////////////////////////////////////////////////////////////////
    37 // Static class functions
    34 // Static class functions
    38 FBSession* FBSession::session()
    35 FBSession* FBSession::session()
    57 FBSession::FBSession( const QString& aAppKey, const QString& aAppSecret, const QString& aGetSessionProxy ) :
    54 FBSession::FBSession( const QString& aAppKey, const QString& aAppSecret, const QString& aGetSessionProxy ) :
    58         iApiKey (aAppKey),
    55         iApiKey (aAppKey),
    59         iApiSecret ( aAppSecret ),
    56         iApiSecret ( aAppSecret ),
    60         m_Client(new SmfCredMgrClient(this))	
    57         m_Client(new SmfCredMgrClient(this))	
    61 {
    58 {
       
    59 	Q_UNUSED(aGetSessionProxy)
    62     if (!sharedSession)
    60     if (!sharedSession)
    63     {
    61     {
    64         sharedSession = this;
    62         sharedSession = this;
    65     }
    63     }
    66 }
    64 }
   182 
   180 
   183 }
   181 }
   184 bool FBSession::performRequest(FBRequest* aRequest, bool aEnqueue) {
   182 bool FBSession::performRequest(FBRequest* aRequest, bool aEnqueue) {
   185     // Stagger requests that happen in short bursts to prevent the server from rejecting
   183     // Stagger requests that happen in short bursts to prevent the server from rejecting
   186     // them for making too many requests in a short time
   184     // them for making too many requests in a short time
       
   185 	Q_UNUSED(aEnqueue)
   187 	qDebug()<<"Inside FBSession::performRequest";
   186 	qDebug()<<"Inside FBSession::performRequest";
   188         aRequest->connect();
   187         aRequest->connect();
   189         return true;
   188         return true;
   190 }
   189 }