mirror of
https://github.com/aria2/aria2.git
synced 2025-02-26 08:22:11 +00:00
Rewritten Cookie storage. * src/Cookie.cc * src/Cookie.h * src/CookieParser.cc * src/CookieStorage.cc * src/CookieStorage.h * src/a2functional.h * test/CookieParserTest.cc * test/CookieStorageTest.cc * test/CookieTest.cc * test/HttpResponseTest.cc * test/TestUtil.h * test/a2functionalTest.cc
26 lines
470 B
C++
26 lines
470 B
C++
#include "common.h"
|
|
|
|
#include <string>
|
|
|
|
#include "Cookie.h"
|
|
|
|
namespace aria2 {
|
|
|
|
void createFile(const std::string& filename, size_t length);
|
|
|
|
std::string readFile(const std::string& path);
|
|
|
|
class CookieSorter {
|
|
public:
|
|
bool operator()(const Cookie& lhs, const Cookie& rhs) const
|
|
{
|
|
if(lhs.getDomain() == rhs.getDomain()) {
|
|
return lhs.getName() < rhs.getName();
|
|
} else {
|
|
return lhs.getDomain() < rhs.getDomain();
|
|
}
|
|
}
|
|
};
|
|
|
|
} // namespace aria2
|