How can I know the user presence from an anonymous session?

I have an anonymous user logged on a server (wildfire) using smack api.

I would like to “know” from this user session if another user registered on the server is logged or not (get his/her presence).

I know there is the user presence plugin that let you do that using http calls, but I need to archive it somehow using smack api calls only.

Can you please advise me if this is possible thing to do?