next up previous contents
Next: Vtree Up: Definizioni delle classi Previous: PkgDebian   Indice

PKGFSCache

/*
 * pkgfscache.h
 * Copyright (C) 2004 Luca Ferroni <fferroni@cs.unibo.it>
 *
 * Cache management;
 * 
 * This file is released under the GPL v2.
 * This file may be redistributed under the terms of the GNU Public
 * License.
 */
#ifndef PKGFSCACHE_H
#define PKGFSCACHE_H

#define PCACHEDIR  "/var/cache/pkgfs"
#define PCACHEFILE PCACHEDIR"/cache.bin"

class Vtree;

class PKGFSCache {

    public:
	    
        PKGFSCache();
        ~PKGFSCache();

        //! Check for apt cache modification after the last umount
        int check(const char *pkgmgr_cache,int,int);
	
        //! Save pkgfs data to disk
        int write(Vtree* &,int, int) const;
	
        //! Get pkgfs data from disk
        int read(Vtree *&) const;

    protected:

        //! Sanity check for old and new values
        //! of section and priority options
        int checkValues(int oldSVal, int oldPVal, int SVal, int PVal);
	
};

#endif


2004-11-19