/* Web Polygraph       http://www.web-polygraph.org/
 * (C) 2003-2006 The Measurement Factory
 * Licensed under the Apache License, Version 2.0 */

#ifndef POLYGRAPH__RUNTIME_HTTPCOOKIES_H
#define POLYGRAPH__RUNTIME_HTTPCOOKIES_H

#include "xstd/Ring.h"
#include "xstd/String.h"

typedef String HttpCookie;

// server cookies storage
class HttpCookies {
	public:
		HttpCookies(int keepLimit);
		~HttpCookies();

		void keepLimit(int limit);

		void add(HttpCookie *cookie);

		int count() const;
		const HttpCookie &get(int idx) const;

	private:
		Ring<String*> theRing;
};

extern HttpCookie *HttpCookieParse(const char *content, int size);

#endif


syntax highlighted by Code2HTML, v. 0.9.1