From aa1c0ba9f8787fc3b1a1190103e394b0c1c95922 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Mon, 20 Nov 2006 09:10:23 +0000 Subject: * repo-add script - to add entries to a db file directly from package data (no PKGBUILD) * libalpm api changes - move from a _getinfo(p, WHAT_WE_WANT) scheme to a typesafe _get_what_we_want(p) scheme [not 100% complete yet] * some const correctness changes * removal of PM_* types in alpm.h in favor of the pm*_t types used throughout libalpm --- lib/libalpm/group.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib/libalpm/group.c') diff --git a/lib/libalpm/group.c b/lib/libalpm/group.c index a578c777..ecc608d8 100644 --- a/lib/libalpm/group.c +++ b/lib/libalpm/group.c @@ -29,6 +29,7 @@ #include "error.h" #include "log.h" #include "group.h" +#include "list.h" #include "alpm.h" pmgrp_t *_alpm_grp_new() @@ -72,4 +73,19 @@ int _alpm_grp_cmp(const void *g1, const void *g2) return(strcmp(grp1->name, grp2->name)); } +const char *alpm_grp_get_name(pmgrp_t *grp) +{ + /* Sanity checks */ + ASSERT(grp != NULL, return(NULL)); + + return grp->name; +} + +pmlist_t *alpm_grp_get_packages(pmgrp_t *grp) +{ + /* Sanity checks */ + ASSERT(grp != NULL, return(NULL)); + + return grp->packages; +} /* vim: set ts=2 sw=2 noet: */ -- cgit v1.2.3-24-g4f1b