2008-08-26 12:39:07 +00:00
|
|
|
#include "common.h"
|
2010-01-28 14:01:50 +00:00
|
|
|
|
2008-08-26 12:39:07 +00:00
|
|
|
#include <string>
|
|
|
|
|
2010-01-28 14:01:50 +00:00
|
|
|
#include "Cookie.h"
|
|
|
|
|
2008-08-26 12:39:07 +00:00
|
|
|
namespace aria2 {
|
|
|
|
|
|
|
|
void createFile(const std::string& filename, size_t length);
|
|
|
|
|
2009-05-15 05:20:11 +00:00
|
|
|
std::string readFile(const std::string& path);
|
|
|
|
|
2010-01-28 14:01:50 +00:00
|
|
|
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();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2010-10-09 14:22:49 +00:00
|
|
|
Cookie createCookie
|
|
|
|
(const std::string& name,
|
|
|
|
const std::string& value,
|
|
|
|
const std::string& domain,
|
|
|
|
bool hostOnly,
|
|
|
|
const std::string& path,
|
|
|
|
bool secure);
|
|
|
|
|
|
|
|
Cookie createCookie
|
|
|
|
(const std::string& name,
|
|
|
|
const std::string& value,
|
|
|
|
time_t expiryTime,
|
|
|
|
const std::string& domain,
|
|
|
|
bool hostOnly,
|
|
|
|
const std::string& path,
|
|
|
|
bool secure);
|
|
|
|
|
2008-08-26 12:39:07 +00:00
|
|
|
} // namespace aria2
|