summaryrefslogtreecommitdiff
path: root/portato/db/database.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-01-28 12:52:56 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-01-28 12:52:56 +0100
commitabbc143c81d9c5b808d5c8ee14acc33835871fd5 (patch)
tree9189f67ef7304283b7a08034704f36e98d29a25a /portato/db/database.py
parent804606b721296a3dc6b4d386eaa3336ae772c9a2 (diff)
downloadportato-abbc143c81d9c5b808d5c8ee14acc33835871fd5.tar.gz
portato-abbc143c81d9c5b808d5c8ee14acc33835871fd5.tar.bz2
portato-abbc143c81d9c5b808d5c8ee14acc33835871fd5.zip
Moved DictDatabase
Diffstat (limited to '')
-rw-r--r--portato/db/database.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/portato/db/database.py b/portato/db/database.py
index 7c51667..0ff71a7 100644
--- a/portato/db/database.py
+++ b/portato/db/database.py
@@ -29,14 +29,42 @@ class PkgData (object):
class Database (object):
+ ALL = _("ALL")
+
def populate (self, category = None):
+ """Populates the database.
+
+ @param category: An optional category - so only packages of this category are inserted.
+ @type category: string
+ """
raise NotImplentedError
def get_cat (self, cat = None, byName = True):
+ """Returns the packages in the category.
+
+ @param cat: category to return the packages from; if None it defaults to C{ALL}
+ @type cat: string
+ @param byName: selects whether to return the list sorted by name or by installation
+ @type byName: boolean
+ @return: an iterator over the packages
+ @rtype: L{PkgData}<iterator>
+ """
raise NotImplentedError
def get_categories (self, installed = False):
+ """Returns all categories.
+
+ @param installed: Only return these with at least one installed package.
+ @type installed: boolean
+ @returns: the list of categories
+ @rtype: string<iterator>
+ """
raise NotImplentedError
def reload (self, cat = None):
+ """Reloads the given category.
+
+ @param cat: category
+ @type cat: string
+ """
raise NotImplentedError