summaryrefslogtreecommitdiff
path: root/apt-pkg/edsp/edspwriter.h
blob: c5eed788fe0ac6aaa77a944af17da8885681922b (plain)
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
// -*- mode: cpp; mode: fold -*-
// Description								/*{{{*/
/* ######################################################################
   Set of methods to help writing and reading everything needed for EDSP
   ##################################################################### */
									/*}}}*/
#ifndef PKGLIB_EDSPWRITER_H
#define PKGLIB_EDSPWRITER_H

#include <apt-pkg/depcache.h>

#include <string>

class edspWriter								/*{{{*/
{
public:
	bool static WriteRequest(pkgDepCache &Cache, FILE* output);
	bool static WriteScenario(pkgDepCache &Cache, FILE* output);
	bool static ReadResponse(FILE* input, pkgDepCache &Cache);

	// ReadScenario is provided by the listparser infrastructure
	bool static ReadRequest(FILE* input, std::list<std::string> &install,
				std::list<std::string> &remove);
	bool static ApplyRequest(std::list<std::string> const &install,
				 std::list<std::string> const &remove,
				 pkgDepCache &Cache);
	bool static WriteSolution(pkgDepCache &Cache, FILE* output);
	bool static WriteError(std::string const &message, FILE* output);

};
									/*}}}*/
#endif