Adding wire support?

Never tried to do this before, how do I add wire support for an entity? Is there a library of functions or what? Could someone give a few examples of its usage?