is there a possibility that a prpgram can be written to restrict file sharing(music) from phone to phone (bluetooth) or from laptop to CD (burning)

Yes, it's called CRM (Content Rights Management) and exists on many things including music, films and games.