common.h
author nathan
Sat, 29 Dec 2007 14:49:09 +0100
branchtrunk
changeset 2 4c1f7b705009
parent 0 474a1293c3c0
child 22 93aaf15c145a
permissions -rw-r--r--
release 0.10.1
     1 /*
     2  * MP3/MPlayer plugin to VDR (C++)
     3  *
     4  * (C) 2001-2007 Stefan Huelswitt <s.huelswitt@gmx.de>
     5  *
     6  * This code is free software; you can redistribute it and/or
     7  * modify it under the terms of the GNU General Public License
     8  * as published by the Free Software Foundation; either version 2
     9  * of the License, or (at your option) any later version.
    10  *
    11  * This code is distributed in the hope that it will be useful,
    12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14  * GNU General Public License for more details.
    15  *
    16  * You should have received a copy of the GNU General Public License
    17  * along with this program; if not, write to the Free Software
    18  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    19  * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
    20  */
    21 
    22 #ifndef ___COMMON_H
    23 #define ___COMMON_H
    24 
    25 #ifndef PLUGIN_NAME_I18N
    26 #define PLUGIN_NAME_I18N "dummy"
    27 #endif
    28 
    29 #ifndef APIVERSNUM
    30 #include <vdr/config.h>
    31 #endif
    32 #include "config.h"
    33 
    34 #if APIVERSNUM >= 10313
    35 #define SLEEP(x) cCondWait::SleepMs(x)
    36 #else
    37 #define SLEEP(x) usleep((x)*1000)
    38 #endif
    39 
    40 #if APIVERSNUM >= 10318
    41 #include <vdr/tools.h>
    42 static cTimeMs __time;
    43 #define time_ms() ((int)__time.Elapsed())
    44 #endif
    45 
    46 #if APIVERSNUM >= 10338
    47 #define BUTTON "Button$"
    48 #else
    49 #define BUTTON
    50 #endif
    51 
    52 #if !defined(NO_DEBUG) && defined(DEBUG)
    53 #define d(x) { (x); }
    54 #else
    55 #define d(x) ; 
    56 #endif
    57 
    58 #endif //___COMMON_H