/* * Copyright (C) 2006-2009 Alex Lasnier * * This file is part of Radio Info * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef __RADIO_INFO_CACHE_H #define __RADIO_INFO_CACHE_H #include #include #include /////////////////////////////////////////////////////////////////////////////// class PidCache { public: PidCache(void); ~PidCache(); int Pid(uint16_t nid, uint16_t tid, uint16_t sid); void SetPid(uint16_t nid, uint16_t tid, uint16_t sid, uint16_t pid); void Load(void); void Save(void); private: bool ReadFile(void); bool Parse(const char* line); char* fileName; std::map pids; }; /////////////////////////////////////////////////////////////////////////////// #endif // __RADIO_INFO_CACHE_H