CARDS 2.4.87
Package manager for the NuTyX GNU/Linux distribution
pkg.h
1 /*
2  * pkg.h
3  *
4  * Copyright 2017 NuTyX <tnut@nutyx.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19  * MA 02110-1301, USA.
20  *
21  *
22  */
23 
24 #ifndef PKG_H
25 #define PKG_H
26 
27 #include <string>
28 
29 enum CPSTATUS
30 {
31  INSTALLED = 0x01,
32  TO_INSTALL = 0x02,
33  TO_REMOVE = 0x04,
34  TO_UPGRADE = 0x08
35 };
36 
37 class Pkg
38 {
39 public:
40  Pkg();
41  ~Pkg();
42  std::string getCollection();
43  std::string getName();
44  std::string getVersion();
45  std::string getPackager();
46  std::string getDescription();
47  void setName(std::string& name);
48  void setDescription(std::string& description);
49  void setVersion(std::string& version);
50  void setCollection(std::string& collection);
51  void setPackager(std::string& packager);
52  bool isInstalled();
53  bool isToBeInstalled();
54  bool isToBeRemoved();
55  void setStatus(CPSTATUS pstatus);
56  void unSetStatus(CPSTATUS pstatus);
57  CPSTATUS getStatus();
58 
59 protected:
60  std::string _collection;
61  std::string _name;
62  std::string _version;
63  std::string _packager;
64  std::string _description;
65  CPSTATUS _status;
66 };
67 
68 #endif /* PKG_H */
69 // vim:set ts=2 :
Definition: libcards.h:845
std::string getCollection()
Return.
Definition: pkg.cxx:61
Pkg()
Constructor.
Definition: pkg.cxx:29
~Pkg()
Destructor.
Definition: pkg.cxx:35