Theory of ferromagnetism in planar heterostructures of (Mn,III)-V semiconductors