/*
 * Softcam plugin to VDR (C++)
 *
 * This code 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 code 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, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
 */

#ifndef ___MISC_H
#define ___MISC_H
/*
#define DEV_DVB_DEMUX "demux"
#define DEV_DVB_CA    "ca"
int DvbOpen(const char *Name, int n, int Mode, bool ReportError=false);
*/
#define KeyStr(str,key) HexStr(str,key,8)
const char *HexStr(char *str, const unsigned char *mem, int len);
const char *HexStrSpaced(char *str, const unsigned char *mem, int len);
int GetHex(char * &line, unsigned char *store, int count, bool fixedLen=true);
int GetHexAsc(char * &line, unsigned char *store, int count);
int GetChar(char * &line, int *store, int count);
unsigned long long Bin2LongLong(unsigned char *mem, int len);
#define Bin2Int(mem,len) ((int)Bin2LongLong((mem),(len)))
/*
bveb: Modifications done
void LogDump(const unsigned char *buffer, int n, const char *format, ...);
void HexDump(const unsigned char *buffer, int n);

FILE *LogStart(const char *name=0);
void LogEnd(FILE *f);
*/
#endif //___MISC_H
