File: ipackagedb.h

package info (click to toggle)
packagesearch 2.10.1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,704 kB
  • sloc: cpp: 9,176; perl: 248; makefile: 15; sh: 11
file content (68 lines) | stat: -rw-r--r-- 2,183 bytes parent folder | download
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
59
60
61
62
63
64
65
66
67
68
#ifndef __IPACKAGEDB_H_2004_02_19
#define __IPACKAGEDB_H_2004_02_19

#include "ipackage.h"
#include "packagedetails.h"

namespace NUtil
{
	class IProgressObserver;
}

namespace NApt
{


/**
@brief This is the interface for all implementations of a package database.


@author Benjamin Mesing
*/
class IPackageDB
{
public:
	IPackageDB();
	virtual ~IPackageDB();
	 
 	/** @brief This gets the information about the given package from the database.
	  *
	  * @param pkg the name of the package the information should be retrieved
	  * @throws PackageNotFoundException if no package with such name was in the database
	  */
    virtual const IPackage& getPackageRecord(const QString& pkg) const = 0;
 	/** @brief This gets the information about the given package from the database.
	  *
	  * @throws PackageNotFoundException if no package with such name was in the database
	  */
    virtual const IPackage& getPackageRecord(const string& package) const = 0;


    /** @brief Returns the package details for the package with the given name
      *
      * @throws PackageNotFoundException if no package with such name was in the database
      */
    virtual PackageDetails getPackageDetails(const string& name) const = 0;

	/** @brief This gets the short description for the requested package.
	  *
	  * @param packageHandle the handle for the package the information should be retrieved for
	  * @throws PackageNotFoundException if no package with this handle was in the database
	  */
	virtual const QString getShortDescription(const string& package) const = 0;

    /** @brief Returns the installed state for the package referenced.
	  *
	  * @param package the package the information should be retrieved for
	  * @throws PackageNotFoundException if no package with this handle was in the database
	  */
    virtual IPackage::InstalledState getState(const string& package) const = 0;
	/** @brief This reloads the package information. 
	  * @param pLoader the observer where to report the reload progress, 0 if no progress should be reported  
	  */
	virtual void reloadPackageInformation(NUtil::IProgressObserver* pObserver) = 0;
};

} // NApt

#endif	//  __IPACKAGEDB_H_2004_02_19