Electronic structure of semimagnetic semiconductor heterostructures