A federal judge ruled Tuesday that Apple CEO Steve Jobs must testify in an antitrust dispute with iPod consumers.

Apple has been involved in the complaint since 2005 over the company’s policy to limit the digital music sold on iTunes to the iPod player.

Bloomberg reported that the court ruled that Jobs may be questioned for no more than two hours by the lawyers of those who filed the complaint. The dispute stems from a software change Apple made to its iTunes software to make it impossible to play music files produced by RealNetworks, Inc. on the iPod.

U.S. Magistrate Judge Howard R. Lloyd denied requests from the plaintiffs to question Jobs on other matters related to the case.

Jobs has been on medical leave since January, when he handed his day-to-day duties over to Apple COO Tim Cook. He has battled cancer in the past. While he made a surprise appearance at the iPad 2 launch event earlier this month, he has not made many public appearances since his leave began.

Apple spokeswoman Kristin Huguet declined to comment on pending litigation.