2011-09-24 17:25:15 -04:00
|
|
|
#include "GetCookies.h"
|
|
|
|
#include "WebPage.h"
|
2012-04-04 18:18:17 -04:00
|
|
|
#include "WebPageManager.h"
|
2011-09-24 17:25:15 -04:00
|
|
|
#include "NetworkCookieJar.h"
|
|
|
|
|
2012-07-08 15:04:30 -04:00
|
|
|
GetCookies::GetCookies(WebPageManager *manager, QStringList &arguments, QObject *parent) : SocketCommand(manager, arguments, parent)
|
2011-09-24 17:25:15 -04:00
|
|
|
{
|
|
|
|
m_buffer = "";
|
|
|
|
}
|
|
|
|
|
2012-03-16 19:58:58 -04:00
|
|
|
void GetCookies::start()
|
2011-09-24 17:25:15 -04:00
|
|
|
{
|
2012-06-21 23:34:51 -04:00
|
|
|
NetworkCookieJar *jar = manager()->cookieJar();
|
2011-09-24 17:25:15 -04:00
|
|
|
foreach (QNetworkCookie cookie, jar->getAllCookies()) {
|
|
|
|
m_buffer.append(cookie.toRawForm());
|
|
|
|
m_buffer.append("\n");
|
|
|
|
}
|
2013-02-11 18:31:41 -05:00
|
|
|
finish(true, m_buffer);
|
2011-09-24 17:25:15 -04:00
|
|
|
}
|