Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=cfpm.git;a=commitdiff;h=366c66d8657dd06dfdd22be53f8cd2ad34c21114
commit 366c66d8657dd06dfdd22be53f8cd2ad34c21114 Author: Priyank <priy...@frugalware.org> Date: Mon Jun 8 14:19:17 2009 +0530 updates in class Group * new method: getPackageNames() returns a List* of packages belonging to the specified group. data from this list should be read as char* diff --git a/pm.cc b/pm.cc index acc8c5f..0c4833f 100644 --- a/pm.cc +++ b/pm.cc @@ -402,6 +402,19 @@ string Group::getName() return ret; } +List* Group::getPackageNames() +{ + List *lst = NULL; + PM_LIST *l = NULL; + + l = (PM_LIST*) getInfo(PM_GRP_PKGNAMES); + if ( l ) + { + lst = new List(l); + } + return lst; +} + List::List() { list = NULL; diff --git a/pm.hh b/pm.hh index 5fd3506..946caf7 100644 --- a/pm.hh +++ b/pm.hh @@ -92,6 +92,7 @@ namespace PM ~Group(); void* getInfo(unsigned char param); std::string getName(); + List* getPackageNames(); }; /* generic pacman list */ _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git