Frottage—also known as "dry humping" or body-to-body rubbing is not a risk for HIV.
Hepatitis B & C can be spread by contact with infected body fluids such as blood, semen and vaginal fluid.
Hepatitis can spread through sexual intercourse and through other types of sexual contact that involve exposure to infected body fluids.
You can also contract other STDs, like herpes and HPV if you have bare skin-to-skin contact with your partner. (I am assuming you were both naked, but you didn't say)
You had no risk for HIV, but I would recommend you be tested for other STD's.