How can I get a list of databases and collections on a MongoDB server?
I'm writing a GUI client for MongoDB in C. I use the [C driver for MongoDB](http://www.mongodb.org/display/DOCS/C+Language+Center). I want to get a list of databases and their collections, but I can't find any functions in the [documentation](http://api.mongodb.org/c/0.4/api/mongo_8h.html) to do that.

How can I get a list of databases and collections using the C driver?
How can I get a list of databases and collections on a MongoDB server?
===

I'm writing a GUI client for MongoDB in C. I use the [C driver for MongoDB](http://www.mongodb.org/display/DOCS/C+Language+Center). I want to get a list of databases and their collections, but I can't find any functions in the [documentation](http://api.mongodb.org/c/0.4/api/mongo_8h.html) to do that.

How can I get a list of databases and collections using the C driver?