We study the gravitational collapse of a generalized Vaidya spacetime in the context of the cosmic censorship hypothesis. We develop a general mathematical framework to study the conditions on the mass function so that future directed nonspacelike geodesics can terminate at the singularity in the past. Thus our result generalizes earlier works on gravitational collapse of the combinations of Type-I and Type-II matter fields. Our analysis shows transparently that there exist classes of generalized Vaidya mass functions for which the collapse terminates with a locally naked central singularity. We calculate the strength of these singularities to show that they are strong curvature singularities and there can be no extension of spacetime through them.