[packagekit] GetMimeTypes API addition?
Richard Hughes
hughsient at gmail.com
Sun Oct 5 14:53:09 PDT 2008
On Fri, 2008-10-03 at 14:07 +0200, Tim Lauridsen wrote:
> Thanks, i will wait.
Cool, some comments:
* Tons of trailing whitespace - pet hate of mine
* We're already using collection for a meta-group -- can you use
Categories and SubCategories? as method names?
* I'm still not convinced you need two methods and signals to populate a
tree. What if the tree is four layers deep, or one layer deep?
Couldn't you do something like this:
GetCategoryTree()
CategoryNode(s=parent, s=id, s=icon, s=name)
So you can do something like this:
C:GetCategoryTree()
S:CategoryNode("", "apps", "cat-apps", "Applications")
S:CategoryNode("", "games", "accessories-games", "Games")
S:CategoryNode("games", "games;board", "board-games", "Board Games")
S:CategoryNode("games", "games;action", "action-games", "Action Games")
S:CategoryNode("games;action", "games;action;quake", "quake", "Quake games")
S:CategoryNode("", "system-tools", "media-system", "System tools")
S:Finished ()
Then you only need to send one request to the server, and you get one
set of requests back, and you get an n-deep tree without hardcoding lots
of policy in the API.
It would be trivial to handle in python, and slightly trickier to do in
C.
What do you think?
Richard.
More information about the PackageKit
mailing list