In the precedent paper of the authors (hep-ph/0510410), the bb states were treated in the framework of the spectral integral equation, together with simultaneous calculations of radiative decays of the considered bottomonia. In the present paper, such a study is carried out for the charmonium (cc) states. We reconstruct the interaction in the ccsector on the basis of data for the charmonium levels with J P C = 0 −+ , 1 −− , 0 ++ , 1 ++ , 2 ++ , 1 +− and radiative transitions ψ(2S) → γχ c0 (1P ), γχ c1 (1P ), γχ c2 (1P ), γη c (1S) and χ c0 (1P ), χ c1 (1P ), χ c2 (1P ) → γJ/ψ. The cc levels and their wave functions are calculated for the radial excitations with n ≤ 6. Also, we determine the cc component of the photon wave function using the e + e − annihilation data: e + e − → J/ψ(3097), ψ(3686), ψ(3770), ψ(4040), ψ(4160), ψ(4415) and perform the calculations of the partial widths of the twophoton decays for the n = 1 states: η c0 (1S), χ c0 (1P ), χ c2 (1P ) → γγ, and n = 2 states: η c0 (2S) → γγ, χ c0 (2P ), χ c2 (2P ) → γγ. We discuss the status of the recently observed cc states X(3872) and Y (3941): according to our results, the X(3872) can be either χ c1 (2P ) or η c2 (1D), while Y (3941) is χ c2 (2P ).