/*
 * facts-base.h: A plugin for the Video Disk Recorder
 *
 * See the README file for copyright information and how to reach the author.
 *   
 *
 * 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: facts-base.h,v 1.4 2004/11/13 06:05:41 peter Exp $
 */

 
/*

File	: facts-base.h
Autor	: Peter Juszack

Description
-----------------------------------------------------------------
base class for file/ directory menu

- Defines Actions ( copy, delete, choose copy destination, back )
- does the key processing and calls abstract member functions
- defines functions to create descriptive tab seperated menu items for image data ( e.g. "Filename:\tDSC0001.JPG" )
- static member and setter for the copy destination path ( is set from cMenuDestinationBrowse )

*/

#ifndef _FACTS_BASE__H
#define _FACTS_BASE__H

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

#include "data.h"

#define FACTSHEET_BUFLEN 1024

class cFactsheetBase : public cOsdMenu {
    private:
	
    public:
    	// Static String for copy destination path
    	static char copyDestination[FACTSHEET_BUFLEN];
    protected:	
	// Buffer for various text processings
	char buf[FACTSHEET_BUFLEN];
    	
	// File/Directory item to process
	cDirItem *fileItem;
	
	virtual void SetButtons(void);
	// copy image(s) to disc
	virtual eOSState SaveToDisc(void) = 0;
	// delete image(s) from camera
	virtual eOSState DeleteFromCamera(void) = 0;
	
	// functions to create tab seperated descriptive menu items
	void addAttribute(const char* name, const char* value);
	void addAttribute(const char* name, double value, const char* suffix = "");
	void addAttribute(const char* name, int value, const char* suffix = "");
    public:
	static const char* getCopyDestination(void);
    public:
	cFactsheetBase(const char* title, cDirItem *file);
	// key processing
	virtual eOSState ProcessKey(eKeys Key);
	
	// setter for the copy destination path
	static void setCopyDestination( const char* dest );
};

#endif
