~ubuntu-branches/ubuntu/lucid/mythtv/lucid

« back to all changes in this revision

Viewing changes to libs/libmythtv/channelutil.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Mario Limonciello
  • Date: 2009-09-08 23:08:37 UTC
  • mfrom: (1.1.32 upstream)
  • Revision ID: james.westby@ubuntu.com-20090908230837-zrm2j6wutp76hwso
Tags: 0.22.0~trunk21742-0ubuntu1
* New upstream checkout (21742)
  - Fixes FTBFS on PPC. See changeset 21571 for more details.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1550
1550
    return true;
1551
1551
}
1552
1552
 
 
1553
bool ChannelUtil::DeleteChannel(uint channel_id)
 
1554
{
 
1555
    MSqlQuery query(MSqlQuery::InitCon());
 
1556
    query.prepare(
 
1557
        "DELETE FROM channel "
 
1558
        "WHERE chanid = :ID");
 
1559
    query.bindValue(":ID", channel_id);
 
1560
 
 
1561
    if (!query.exec())
 
1562
    {
 
1563
        MythDB::DBError("Delete Channel", query);
 
1564
        return false;
 
1565
    }
 
1566
 
 
1567
    return true;
 
1568
}
 
1569
 
 
1570
bool ChannelUtil::SetVisible(uint channel_id, bool visible)
 
1571
{
 
1572
    MSqlQuery query(MSqlQuery::InitCon());
 
1573
    query.prepare(
 
1574
        "UPDATE channel "
 
1575
        "SET   visible = :VISIBLE "
 
1576
        "WHERE chanid  = :ID");
 
1577
    query.bindValue(":ID", channel_id);
 
1578
    query.bindValue(":VISIBLE", visible);
 
1579
 
 
1580
    if (!query.exec())
 
1581
    {
 
1582
        MythDB::DBError("ChannelUtil::SetVisible", query);
 
1583
        return false;
 
1584
    }
 
1585
 
 
1586
    return true;
 
1587
}
 
1588
 
1553
1589
bool ChannelUtil::SetServiceVersion(int mplexid, int version)
1554
1590
{
1555
1591
    MSqlQuery query(MSqlQuery::InitCon());