Problem to add buddy

Hi someone could help me please?

I have this problem:

I want to create an application that allows users to insert their gtalk account to receive some informations.

The problem is that I want that the accounting procedure should be sync, in the sense that,

The user start the

accounting procedure

insert his gtalk contact

the server recives the request and send the request to the client for add the contact to the buddy list

now I want that the server wait for the accept from the client (here there is my problem how I can catch the acceptance by the client?)

thanks for your attention