Beispiel #1
0
void
GrooveClient::Private::processPHPSessionId ()
{
  LDEBUG << "processing";
  QList<QNetworkCookie> cookieList = networkManager ().cookieJar ()->cookiesForUrl (QUrl (GroovePrivRequest::LOGIN_URL));

  foreach (QNetworkCookie const &cookie, cookieList)
    if (cookie.name () == "PHPSESSID")
      {
        m_phpCookie = cookie.value ();
        LDEBUG << "Got PHP cookie: " << qPrintable (m_phpCookie);
        fetchSessionToken ();
        return;
      }

  /* FIXME */
  GROOVE_VERIFY_OR_DIE (m_phpCookie.length (), "PHP cookie couldn't be set");
}
Beispiel #2
0
void Grooveshark::Connection::initiateSession()
{
    processPHPCookie();
    fetchSessionToken();
}