compat.h
author nathan
Sun, 12 Dec 2010 11:31:54 +0100
branchtrunk
changeset 38 79b272a68eb4
parent 25 887faebaba0a
permissions -rw-r--r--
fix compile without OGG library
nathan@25
     1
/*
nathan@25
     2
 * MP3/MPlayer plugin to VDR (C++)
nathan@25
     3
 *
nathan@25
     4
 * (C) 2001-2009 Stefan Huelswitt <s.huelswitt@gmx.de>
nathan@25
     5
 *
nathan@25
     6
 * This code is free software; you can redistribute it and/or
nathan@25
     7
 * modify it under the terms of the GNU General Public License
nathan@25
     8
 * as published by the Free Software Foundation; either version 2
nathan@25
     9
 * of the License, or (at your option) any later version.
nathan@25
    10
 *
nathan@25
    11
 * This code is distributed in the hope that it will be useful,
nathan@25
    12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
nathan@25
    13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
nathan@25
    14
 * GNU General Public License for more details.
nathan@25
    15
 *
nathan@25
    16
 * You should have received a copy of the GNU General Public License
nathan@25
    17
 * along with this program; if not, write to the Free Software
nathan@25
    18
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
nathan@25
    19
 * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
nathan@25
    20
 */
nathan@25
    21
nathan@25
    22
#ifndef ___COMPAT_H
nathan@25
    23
#define ___COMPAT_H
nathan@25
    24
nathan@25
    25
#ifndef APIVERSNUM
nathan@25
    26
#include <vdr/config.h>
nathan@25
    27
#endif
nathan@25
    28
nathan@25
    29
#if APIVERSNUM < 10503
nathan@25
    30
#include <iconv.h>
nathan@25
    31
nathan@25
    32
class cCharSetConv {
nathan@25
    33
private:
nathan@25
    34
  iconv_t cd;
nathan@25
    35
  char *result;
nathan@25
    36
  size_t length;
nathan@25
    37
  static char *systemCharacterTable;
nathan@25
    38
public:
nathan@25
    39
  cCharSetConv(const char *FromCode = NULL, const char *ToCode = NULL);
nathan@25
    40
  ~cCharSetConv();
nathan@25
    41
  const char *Convert(const char *From, char *To = NULL, size_t ToLength = 0);
nathan@25
    42
  static const char *SystemCharacterTable(void) { return systemCharacterTable; }
nathan@25
    43
  static void SetSystemCharacterTableX(const char *CharacterTable);
nathan@25
    44
  };
nathan@25
    45
nathan@25
    46
#endif
nathan@25
    47
nathan@25
    48
#endif //___COMPAT_H