John McCain, who has been battling an aggressive form of brain cancer for more than a year, doesn’t want President Trump to attend his funeral and prefers Vice President Pence to be there, according to a New York Times report.

In addition, former Presidents George W. Bush and Barack Obama have been asked to deliver eulogies at McCain's funeral, sources close to both former presidents and McCain told CNN.

The 81-year-old Arizona senator underwent surgery for an intestinal infection recently and was joined at his ranch by his daughter Meghan over the weekend. Last July, McCain was diagnosed with glioblastoma, the same rare and aggressive brain cancer that killed Democratic Sen. Edward Kennedy and former Vice President Joe Biden’s son, Beau.

“I don’t know how much longer I’ll be here,” McCain said in an audio excerpt of his forthcoming memoir, The Restless Wave, as NPR reports. The senator is also the subject of a nearly two-hour HBO documentary.

Biden spent 90 minutes at the ailing senator’s Arizona ranch last Sunday.

“Here John knows he’s in a very, very, very precarious situation, and yet he’s still concerned about the state of the country,” Biden told the Times. “We talked about how our international reputation is being damaged and we talked about the need for people to stand up and speak out.”

According to the Times, McCain’s closest family members have informed the White House that the current plan for his funeral is for Pence to attend the service to be held in Washington’s National Cathedral, but not Trump — with whom McCain has not had the greatest relationship.

The Arizona senator, who was elected to the U.S. Senate in 1986, cast a crucial vote against the repeal of ObamaCare in July, singlehandedly scuttling one of the Trump administration's major policy goals, a move that provoked the ire of Trump but earned him a thank you call from Obama.

Back in July of 2015, Trump attacked McCain for the five and a half years spent in a notorious Vietnamese prison where he was tortured, telling voters in Iowa:

“He’s not a war hero. He was a war hero because he was captured. I like people who weren’t captured.”

In his book, McCain doesn’t pull any punches about Trump.

“He seems uninterested in the moral character of world leaders and their regimes,” he writes of the president, according to the Times, which obtained a copy of the book. “The appearance of toughness or a reality show facsimile of toughness seems to matter more than any of our values. Flattery secures his friendship, criticism his enmity.”

Among other things, McCain reportedly uses his new book to express regret for not choosing former Connecticut Sen. Joe Lieberman, who recently visited McCain at his ranch, as his vice presidential running mate in 2008.

His advisers apparently told him that Lieberman’s pro-choice views could divide GOP voters. McCain ended up picking then-Alaska Gov. Sarah Palin, who was mocked for a number of unforced errors and gaffes during the campaign.

Former Sen. Robert Dole, who wore McCain’s POW bracelet while his future colleague was in the camp known as “Hanoi Hilton,” told the Times he planned to tell McCain in a coming phone call, “You’re a tough guy and you can overcome this.”

“I’d like to see us recover our sense that we’re more alike than different,” McCain says in audio excerpts from the book reported by NPR.