File: deb-file.h

package info (click to toggle)
packagekit 1.3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,704 kB
  • sloc: ansic: 56,209; cpp: 13,919; python: 4,970; xml: 4,945; sh: 313; perl: 60; makefile: 57
file content (58 lines) | stat: -rw-r--r-- 1,687 bytes parent folder | download | duplicates (3)
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
/* deb-file.h
 *
 * Copyright (c) 2011-2016 Daniel Nicoletti <dantti12@gmail.com>
 *               2012 Matthias Klumpp <matthias@tenstral.net>
 *
 * Licensed under the GNU General Public License Version 2
 *
 * 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.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifndef DEB_FILE_H
#define DEB_FILE_H

#include <apt-pkg/debfile.h>

using std::string;

class DebFile
{
public:
    DebFile(const string &filename);
    virtual ~DebFile();
    bool isValid() const;

    string packageName() const;
    string sourcePackage() const;
    string version() const;
    string architecture() const;
    string summary() const;
    string description() const;
    string conflicts() const;
    std::vector<std::string> files() const;

    // FIXME: THIS should be moved to the AptJob class
    bool check();
    string errorMsg() const;

private:
    debDebFile::MemControlExtract *m_extractor;
    pkgTagSection m_controlData;
    string m_errorMsg;
    std::vector<std::string> m_files;
    bool m_isValid = false;
};

#endif