~larryprice/libertine-scope/filter-state

« back to all changes in this revision

Viewing changes to libertine-scope/blacklist.h

  • Committer: Tarmac
  • Author(s): Larry Price
  • Date: 2016-06-14 14:07:43 UTC
  • mfrom: (45.2.9 minor-cmake-updates)
  • Revision ID: tarmac-20160614140743-z3gy1pl2mqk4k3p8
Refactor Query class for consistent style and extract some functionality to helper classes.

Approved by Christopher Townsend, Libertine CI Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2016 Canonical Ltd.
 
3
 *
 
4
 * This program is free software: you can redistribute it and/or modify it under
 
5
 * the terms of the GNU General Public License, version 3, as published by the
 
6
 * Free Software Foundation.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 */
 
16
#ifndef BLACKLIST_H
 
17
#define BLACKLIST_H
 
18
 
 
19
#include <QStringList>
 
20
 
 
21
class Blacklist
 
22
{
 
23
public:
 
24
  explicit Blacklist(std::string const& data_directory);
 
25
  virtual ~Blacklist() = default;
 
26
 
 
27
  virtual bool app_is_blacklisted(QString const& app_id, std::string const& container_id) const;
 
28
 
 
29
private:
 
30
  void parse_blacklist(QString const& blacklist_file_name);
 
31
 
 
32
  QStringList blacklist_;
 
33
  QStringList whitelist_;
 
34
};
 
35
 
 
36
#endif // BLACKLIST_H