I'm writing an application that runs as a system daemon (root session) for Mac OSX 10.6. As part of this application, I need to list all the active graphical login sessions.

There is an (undocumented, but public) function called `SessionGetInfo` which will give me more information about a session with a known session Id, but I need a function that tells me the active session Ids on the system. 

The ultimate goal here is for the daemon application to launch an agent in each graphical user session.