-
Notifications
You must be signed in to change notification settings - Fork 0
/
getinfo.h
63 lines (52 loc) · 1.94 KB
/
getinfo.h
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/* Copyright (C) Johnny Saenz
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. */
#ifndef TRISTAN_GETINFO
# define TRISTAN_GETINFO
#include <boost/regex.hpp>
#include <stdlib.h>
#include <stdio.h>
#include "structs.h"
#include "utils.h"
#include "read.h"
#include "globals.h"
namespace JSApm
{
/**
* @brief Class GetInfo.
* Parse AV_CONF_FILE or LOCAL_CONF_FILE and return information like the version,
* description, operator, line number and other.
*/
class GetInfo
{
public:
GetInfo(int idconf);
~GetInfo();
bool ParsePkg(std::string package);
bool ParseTag(std::string package, int tag_name);
bool ParseTag(std::string package, int tag_name, taginfo &taginfo_o);
bool PkgExist(std::string package);
bool TagExist(std::string, int tag_name);
bool GetPkgTag(std::string package, int tag_name, std::string &results_o, int &nline_o);
bool GetPkgTag(std::string package, int tag_name, std::string &results_o);
void get_DependsMap(std::string package, std::vector<Programa> &vector_depends);
private:
Utils * objutils;
Read * objreadav;
Read * objreadlo;
std::string results; //Contenido de un tag.
bool found_tag_name; //Flag que se activa si se encuentra tag
_node * begin;
_node * index;
_node * temp;
int debug; //Flag que activa o desactiva el debug
};
extern const tags *tags_opts;
}
#endif