[280] | 1 | /* rconfiguration.h |
---|
| 2 | * |
---|
| 3 | * Copyright (c) 2000, 2001 Conectiva S/A |
---|
| 4 | * 2002 Michael Vogt <mvo@debian.org> |
---|
| 5 | * |
---|
| 6 | * Author: Alfredo K. Kojima <kojima@conectiva.com.br> |
---|
| 7 | * Michael Vogt <mvo@debian.org> |
---|
| 8 | * |
---|
| 9 | * This program is free software; you can redistribute it and/or |
---|
| 10 | * modify it under the terms of the GNU General Public License as |
---|
| 11 | * published by the Free Software Foundation; either version 2 of the |
---|
| 12 | * License, or (at your option) any later version. |
---|
| 13 | * |
---|
| 14 | * This program is distributed in the hope that it will be useful, |
---|
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 17 | * GNU General Public License for more details. |
---|
| 18 | * |
---|
| 19 | * You should have received a copy of the GNU General Public License |
---|
| 20 | * along with this program; if not, write to the Free Software |
---|
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
---|
| 22 | * USA |
---|
| 23 | */ |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | #ifndef _RCONFIGURATION_H_ |
---|
| 27 | #define _RCONFIGURATION_H_ |
---|
| 28 | |
---|
| 29 | #include <string> |
---|
| 30 | #include <fstream> |
---|
| 31 | |
---|
| 32 | using namespace std; |
---|
| 33 | |
---|
| 34 | class Configuration; |
---|
| 35 | |
---|
| 36 | bool RWriteConfigFile(Configuration &Conf); |
---|
| 37 | |
---|
| 38 | bool RInitConfiguration(string confFileName); |
---|
| 39 | |
---|
| 40 | bool RReadFilterData(Configuration &config); |
---|
| 41 | bool RFilterDataOutFile(ofstream &out); |
---|
| 42 | |
---|
| 43 | bool RPackageOptionsFile(ofstream &out); |
---|
| 44 | bool RPackageOptionsFile(ifstream &in); |
---|
| 45 | |
---|
| 46 | |
---|
| 47 | // get the default conf dir |
---|
| 48 | string RConfDir(); |
---|
| 49 | |
---|
| 50 | // this needs to be a safe tmp dir (like /root/.synaptic/tmp) to store |
---|
| 51 | // small files like changelogs or pinfiles (preferences) |
---|
| 52 | string RTmpDir(); |
---|
| 53 | |
---|
| 54 | // state dir - we store the locked packages (preferences file) here |
---|
| 55 | // possible other stuff in the future |
---|
| 56 | string RStateDir(); |
---|
| 57 | |
---|
| 58 | // we store the commit history here |
---|
| 59 | string RLogDir(); |
---|
| 60 | |
---|
| 61 | #endif |
---|