From f352e8eb50081cb9929d621add1ce329754f88d9 Mon Sep 17 00:00:00 2001 From: Janus Date: Mon, 20 Oct 2014 12:41:57 -0400 Subject: [PATCH 001/113] api4 : add bouquetID and make BQHeaderAttr optional --- src/zapit/include/zapit/bouquets.h | 9 ++++++++- src/zapit/include/zapit/types.h | 3 +++ src/zapit/src/bouquets.cpp | 10 ++++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/zapit/include/zapit/bouquets.h b/src/zapit/include/zapit/bouquets.h index f77181124..2017dc0dc 100644 --- a/src/zapit/include/zapit/bouquets.h +++ b/src/zapit/include/zapit/bouquets.h @@ -26,11 +26,18 @@ typedef tallchans::iterator tallchans_iterator; typedef vector ZapitChannelList; typedef ZapitChannelList::iterator zapit_list_it_t; +#define DEFAULT_BQ_ID 0 +#define DEFAULT_BQ_HIDDEN false +#define DEFAULT_BQ_LOCKED false +#define DEFAULT_BQ_OTHER false +#define DEFAULT_BQ_SCANEPG false + class CZapitBouquet { public: std::string Name; + bq_id_t BqID; bool bHidden; bool bLocked; bool bUser; @@ -42,7 +49,7 @@ class CZapitBouquet ZapitChannelList radioChannels; ZapitChannelList tvChannels; - inline CZapitBouquet(const std::string name) { Name = name; bHidden = false; bLocked = false; bUser = false; bOther = false; bScanEpg = false; } + inline CZapitBouquet(const std::string name) { Name = name; BqID=DEFAULT_BQ_ID; bHidden = DEFAULT_BQ_HIDDEN; bLocked = DEFAULT_BQ_LOCKED; bUser = false; bOther = DEFAULT_BQ_OTHER; bScanEpg = DEFAULT_BQ_SCANEPG; } void addService(CZapitChannel* newChannel); diff --git a/src/zapit/include/zapit/types.h b/src/zapit/include/zapit/types.h index 77977ce04..860d748bb 100644 --- a/src/zapit/include/zapit/types.h +++ b/src/zapit/include/zapit/types.h @@ -26,6 +26,9 @@ #include #include +typedef uint16_t bq_id_t; +#define SCANF_BOUQUET_ID_TYPE "%hx" + typedef uint16_t freq_id_t; typedef uint16_t t_service_id; #define SCANF_SERVICE_ID_TYPE "%hx" diff --git a/src/zapit/src/bouquets.cpp b/src/zapit/src/bouquets.cpp index c07eda586..eeecfdfec 100644 --- a/src/zapit/src/bouquets.cpp +++ b/src/zapit/src/bouquets.cpp @@ -225,8 +225,12 @@ CBouquetManager::~CBouquetManager() void CBouquetManager::writeBouquetHeader(FILE * bouq_fd, uint32_t i, const char * bouquetName) { //printf("[bouquets] writing bouquet header: %s\n", bouquetName); - fprintf(bouq_fd, "\t