[mythtv-commits] Ticket #5530: Canal Satellite Caraibes proprietary EIT support
MythTV
mythtv at cvs.mythtv.org
Thu Jul 17 15:29:26 UTC 2008
#5530: Canal Satellite Caraibes proprietary EIT support
------------------------------+---------------------------------------------
Reporter: eallaud at yahoo.fr | Owner: stuarta
Type: enhancement | Status: new
Priority: minor | Milestone: unknown
Component: eit | Version: 0.21-fixes
Severity: medium | Resolution:
Mlocked: 0 |
------------------------------+---------------------------------------------
Comment(by danielk):
Manu, I think you missed the concept of the table classes. Parse() should
not be doing string substitutions and the like, at most it should collect
some offsets.
code like this is no good:
{{{
j = (*p & 0x70) >> 4;
schedule.duration = ( (p[0] & 0x0F)*256 + p[1] ) * 60;
schedule.theme = (p[2] >> 4) & 0x0F;
}}}
You need accessors in the class so you call a methods like "GetDuration()"
or "GetTheme()".
Methods like "GetSchedules(...)" do not belong in these classes. The table
classes are supposed to be as thin as humanly possible wrappers around the
raw data.
Also, please have a look at
http://www.mythtv.org/wiki/index.php/Coding_Standards
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/5530#comment:6>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list