Diquark-antidiquark states with hidden or open charm