CARDS 2.4.87
Package manager for the NuTyX GNU/Linux distribution
webcards.h
1
// webcards.h
2
//
3
// Copyright (c) 2016 by NuTyX team (http://nutyx.org)
4
//
5
// This program is free software; you can redistribute it and/or modify
6
// it under the terms of the GNU General Public License as published by
7
// the Free Software Foundation; either version 2 of the License, or
8
// (at your option) any later version.
9
//
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
14
//
15
// You should have received a copy of the GNU General Public License
16
// along with this program; if not, write to the Free Software
17
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18
// USA.
19
//
20
21
#ifndef WEBCARDS_H
22
#define WEBCARD_H
23
24
#include "pkgrepo.h"
25
#include "mysql.h"
26
27
#define INSERTPACKAGE(basename, name) listOfPackages.insert("<td>" \
28
+ i.arch + "</td>" \
29
+ "<td>" + i.branch + "</td>" \
30
+ "<td>" + i.collection + "</td>" \
31
+ "<td> <a href=\"http://downloads.nutyx.org/" \
32
+ i.arch + "/" + i.branch + "/" \
33
+ i.collection + "/" + basename + "/Pkgfile\">" \
34
+ name + "</a></td>" \
35
+ "<td>" + j.version + "-" + itos(j.release) + "</td>" \
36
+ "<td>" + j.description + "</td>" \
37
+ "<td>" + getDateFromEpoch(j.buildDate) + "</td>")
38
39
struct
contentInfo_t
{
40
std::string date;
41
std::vector<std::string> text;
42
};
43
struct
arguments_t
{
44
std::string packageArch;
/* The arch of the package to search */
45
std::string packageBranch;
/* The branch of the package to search */
46
std::string docName;
/* The page to show */
47
std::string stringSearch;
/* The string to search */
48
std::string packageSearch;
/* The package to search */
49
std::string type;
/* Type of search collection, package, etc */
50
};
51
typedef
std::map<std::string, contentInfo_t> content_t;
52
53
/* populate a vector of string with delimed string from an html formated text */
54
std::vector<std::string> parseHTMLDelimitedList
55
(
const
std::vector<std::string>& text,
56
const
std::string delimiter,
const
std::string contentTitle);
57
58
59
void
searchpkg(
contentInfo_t
&contentInfo,
arguments_t
&arguments);
60
void
visitOfPage(
char
* Argument);
61
62
#endif
/* WEBCARDS_H */
63
// vim:set ts=2 :
contentInfo_t
Definition:
webcards.h:39
arguments_t
Definition:
webcards.h:43
src
webcards.h
Generated on Wed Jan 2 2019 22:30:35 for CARDS 2.4.87 by
1.8.14