I want the location of unsubscribe and subscribe functions.

I want the location of unsubscribe and subscribe functions, So that I can call this functions on another action of my site. Could anyone help me with this?