LibPkg
binary_control.h
Go to the documentation of this file.
1 // This file is part of the LibPkg.
2 //
3 // Copyright 2003-2020 Graham Shaw
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 
17 #ifndef LIBPKG_BINARY_CONTROL
18 #define LIBPKG_BINARY_CONTROL
19 
20 #include "libpkg/control.h"
21 
22 namespace pkg {
23 
24 class pkg_env;
25 
36  public control
37 {
38 public:
41 
43  virtual ~binary_control();
44 
45  std::string environment_id() const;
46  const pkg_env *package_env() const;
47 
51  int install_priority() const;
52 
53 protected:
54  virtual int priority(const string& value) const;
56  mutable int _install_priority;
57 };
58 
59 }; /* namespace pkg */
60 
61 #endif
A class to represent the enviroment a package is designed for.
Definition: env_checker.h:103
The namespace used to hold the package management library.
Definition: auto_dir.cc:23
virtual int priority(const string &value) const
Get priority.
Definition: binary_control.cc:60
pkg_env * _environment
Definition: binary_control.h:55
binary_control()
Construct binary control file.
Definition: binary_control.cc:52
A class to represent the content of a RiscPkg control file.
Definition: control.h:35
virtual ~binary_control()
Destroy binary control file.
Definition: binary_control.cc:57
std::string environment_id() const
Definition: binary_control.cc:67
int _install_priority
Definition: binary_control.h:56
int install_priority() const
Get package install priority or use environment default install priority if 0 or unset.
Definition: binary_control.cc:81
A class to represent the content of a RiscPkg binary control file.
Definition: binary_control.h:35
const pkg_env * package_env() const
Definition: binary_control.cc:72

Reference Manual LibPkg Version 0.9.0 (4 Sep 2020)