Skip to content

Commit

Permalink
[epg] adds new method SetEpg() to CEpgInfoTag to drop the use of frie…
Browse files Browse the repository at this point in the history
…nd class in CEpg
  • Loading branch information
xhaggi committed Mar 1, 2015
1 parent 841204b commit dc1aacf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions xbmc/epg/Epg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ void CEpg::AddEntry(const CEpgInfoTag &tag)
{
newTag->Update(tag);
newTag->SetPVRChannel(m_pvrChannel);
newTag->m_epg = this;
newTag->SetEpg(this);
UpdateRecording(newTag);
}
}
Expand All @@ -327,7 +327,7 @@ bool CEpg::UpdateEntry(const CEpgInfoTag &tag, bool bUpdateDatabase /* = false *
}

infoTag->Update(tag, bNewTag);
infoTag->m_epg = this;
infoTag->SetEpg(this);
infoTag->SetPVRChannel(m_pvrChannel);
UpdateRecording(infoTag);

Expand Down
1 change: 0 additions & 1 deletion xbmc/epg/Epg.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ namespace EPG
class CEpg : public Observable
{
friend class CEpgDatabase;
friend class CEpgInfoTag;

public:
/*!
Expand Down
5 changes: 5 additions & 0 deletions xbmc/epg/EpgInfoTag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -739,3 +739,8 @@ CPVRRecordingPtr CEpgInfoTag::Recording(void) const
{
return m_recording;
}

void CEpgInfoTag::SetEpg(CEpg *epg)
{
m_epg = epg;
}
6 changes: 6 additions & 0 deletions xbmc/epg/EpgInfoTag.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ namespace EPG

const int EpgID(void) const;

/*!
* @brief Sets the epg reference of this event
* @param epg The epg item
*/
void SetEpg(CEpg *epg);

/*!
* @brief Change the unique broadcast ID of this event.
* @param iUniqueBroadcastId The new unique broadcast ID.
Expand Down

0 comments on commit dc1aacf

Please sign in to comment.