File: mirror.h

package info (click to toggle)
apt-cacher-ng 0.7.27-1~bpo70%2B1
  • 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 (39 lines) | stat: -rw-r--r-- 875 bytes parent folder | download
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
33
34
35
36
37
38
39
/*
 * mirror.h
 *
 *  Created on: 25.11.2010
 *      Author: ed
 */

#ifndef MIRROR_H_
#define MIRROR_H_

#include "cacheman.h"

class pkgmirror: public tCacheMan, ifileprocessor
{
public:
	pkgmirror(int);
	virtual ~pkgmirror();

	void Action(const mstring & src);

protected:
	// FileHandler
	bool ProcessRegular(const mstring &sPath, const struct stat &);
	virtual void HandlePkgEntry(const tRemoteFileInfo &entry, bool bUnpackForCsumming);
	void _LoadKeyCache(const mstring & sFileName);

	virtual void UpdateFingerprint(const mstring &sPathRel, off_t nOverrideSize,
				uint8_t *pOverrideSha1, uint8_t *pOverrideMd5);

	bool m_bCalcSize, m_bSkipIxUpdate, m_bDoDownload, m_bAsNeeded, m_bUseDelta;
	off_t m_totalSize, m_totalHave;
	tStrSet m_pathFilter;

	const tHttpUrl *m_pDeltaSrc;
	tStrPos m_repCutLen;

	bool ConfigDelta(cmstring &sPathRel);
};
#endif /* MIRROR_H_ */