File: showinfo.h

package info (click to toggle)
apt-cacher-ng 0.7.27-1~bpo70+1
  • links: PTS
  • area: main
  • in suites: wheezy-backports
  • size: 1,740 kB
  • sloc: cpp: 13,987; sh: 519; perl: 442; ansic: 414; makefile: 77
file content (32 lines) | stat: -rw-r--r-- 760 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef SHOWINFO_H_
#define SHOWINFO_H_

#include "maintenance.h"

class tStaticFileSend : public tWUIPage
{
public:
	tStaticFileSend(int, const char * filename,
			const char *mimetype,
			const char *httpcode);
	virtual ~tStaticFileSend();
	void Run(const mstring &cmd);
	virtual void ModContents(mstring & contents, cmstring &cmd);
protected:
	const char *m_sFileName, *m_sMimeType, *m_sHttpCode;
	tStaticFileSend();
private:
	tStaticFileSend(const tStaticFileSend&);
	tStaticFileSend operator=(const tStaticFileSend&);
};


class tDeleter : public tStaticFileSend
{
public:
	inline tDeleter(int fd) : tStaticFileSend(fd, "delconfirm.html", "text/html", "200 OK") {}
	virtual void ModContents(mstring & contents, cmstring &cmd);
};


#endif /*SHOWINFO_H_*/