Add a contact from gtalk

I am coding my own SMACK client and i want to add a gtalk user to my client’s contact list.

I am trying to setup a transport to gtalk(using an im gateway),and then regester to the gateway(with a gtalk account).

After login in my openfire server,I want to add another gtalk user to my client’s contact list.

How can i do it?

thanks.