#ifndef _DIGI__H
#define _DIGI__H

/*
 * digicam.h: A plugin for the Video Disk Recorder
 *
 * See the README file for copyright information and how to reach the author.
 *
 *
 * based on image plugin
 *   
 * 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
 * $Id: digicam.h,v 1.7 2005/02/01 08:42:15 peter Exp $
 */

 
/*

File	: digicam.h
Autor	: Peter Juszack

Description
-----------------------------------------------------------------
Main header file of the digicam plugin.

Contains global variables and som wrappers for
OSD messages
*/

// controls the debug levels
//#define DEBUG
//#define DEBUG9
//#define DEBUG8

// enables sample listing ( directory scanning always returns 2 dirs and 2 files )
//#define SAMPLE_DIRS

#include "digitalcamera.h"
#include "data.h"
#include "i18n.h" 
#include "directory-loader.h"

#include <vdr/config.h>
#include <vdr/menu.h>

#if VDRVERSNUM < 10307
#include <vdr/osd.h>
#else
#include <vdr/osdbase.h>
#include <vdr/skins.h>
#endif

// instance to handle camera source file
extern cFileSources CameraSources;

// instance to handle copy destination sources
extern cFileSources CopyDestinations;

// DigitalCamera instance to access gphoto2 functions
extern DigitalCamera digitalCamera;

// Thread to copy directories from camera to disc
extern cDirectoryLoader *directoryLoader;

// Some wrappers for VDR version handling
inline void OSD_InfoMsg(const char* sz) {
#if VDRVERSNUM < 10307
    Interface->Info(sz);
    Interface->Flush();
#else
    Skins.Message(mtInfo,sz);
    Skins.Flush();
#endif
}

inline void OSD_ErrorMsg(const char* sz) {
#if VDRVERSNUM < 10307
    Interface->Error(sz);
    Interface->Flush();
#else
    Skins.Message(mtError,sz);
    Skins.Flush();
#endif
}

inline void OSD_StatusMsg(const char* sz) {
#if VDRVERSNUM < 10307
    Interface->Status(sz);
    Interface->Flush();
#else
    Skins.Message(mtStatus,sz);
    Skins.Flush();
#endif
}

#endif
