We prove a Maschke type theorem for the category of Doi-Hopf modules. In fa
ct, we give necessary and sufficient conditions for the functor that forget
s the C-coaction to be separable. This leads to a generalized notion of int
egrals. Our results can be applied to obtain Maschke type theorems For Yett
er-Drinfel'd modules, Long dimodules, and modules graded by G-sets. Existin
g Maschke type theorems due to Doi and the authors are recovered as special
cases. (C) 1999 Academic Press.