When you connect the flash through shoe - it works with some kind of serial protocol. iISO and ISO hot shoes have four contacts:
1. Ground
2. Fire (the camera connects this with ground at main flash, only at main it seems)
3. Serial clock
4. Data
Most of data comes from camera but flash sends some in backward direction somehow (perhaps data signal is bidirectional?).
For pre-flash on digital cameras - the camera sends pulse on clock and sets data to logigal zero level for long duration. After it sends 11 bytes to flash, with focal length, apperture, shutter speed and exposure correction. Then sets Fire signal to ground.
I wasn't play with serial protocol too much, so don't have more info about hot shoe/cable signals.