Generalized convexity and integral inequalities