/***************************************************************************
                            kde_DeviceManager.cpp -  description
                             -------------------
    begin                : Wed Feb  6 15:12:26 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Feb  6 15:12:26 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

extern "C" {
#include "kde_DeviceManager.h"
}

#include <libkmid/deviceman.h>

class DeviceManagerBridge : public DeviceManager
{
public:
	DeviceManagerBridge(int def) : DeviceManager(def) {}
	~DeviceManagerBridge() {}
	void protected_seqbuf_dump() {
		DeviceManager::seqbuf_dump();
		return;
	}
	void protected_seqbuf_clean() {
		DeviceManager::seqbuf_clean();
		return;
	}
	void protected_checkAlsa() {
		DeviceManager::checkAlsa();
		return;
	}
};

kde_DeviceManager * kde_new_DeviceManager(int def){
	return (kde_DeviceManager *) new DeviceManagerBridge((int)def);
}
void kde_del_DeviceManager( kde_DeviceManager* p ){
	delete (DeviceManagerBridge*) p;
}
int kde_DeviceManager_initManager( kde_DeviceManager* instPointer){
	return (int) ((DeviceManagerBridge*)instPointer)->initManager();
}
int kde_DeviceManager_checkInit( kde_DeviceManager* instPointer){
	return (int) ((DeviceManagerBridge*)instPointer)->checkInit();
}
kde_MidiOut* kde_DeviceManager_chntodev( kde_DeviceManager* instPointer,int chn){
	return (kde_MidiOut*) ((DeviceManagerBridge*)instPointer)->chntodev((int)chn);
}
kde_MidiOut* kde_DeviceManager_deviceForChannel( kde_DeviceManager* instPointer,int chn){
	return (kde_MidiOut*) ((DeviceManagerBridge*)instPointer)->deviceForChannel((int)chn);
}
int kde_DeviceManager_deviceNumberForChannel( kde_DeviceManager* instPointer,int chn){
	return (int) ((DeviceManagerBridge*)instPointer)->deviceNumberForChannel((int)chn);
}
void kde_DeviceManager_setDeviceNumberForChannel( kde_DeviceManager* instPointer,int chn, int dev){
	((DeviceManagerBridge*)instPointer)->setDeviceNumberForChannel((int)chn, (int)dev);
	return;
}
int kde_DeviceManager_ok( kde_DeviceManager* instPointer){
	return (int) ((DeviceManagerBridge*)instPointer)->ok();
}
int kde_DeviceManager_usingAlsa( kde_DeviceManager* instPointer){
	return (int) ((DeviceManagerBridge*)instPointer)->usingAlsa();
}
void kde_DeviceManager_openDev( kde_DeviceManager* instPointer){
	((DeviceManagerBridge*)instPointer)->openDev();
	return;
}
void kde_DeviceManager_closeDev( kde_DeviceManager* instPointer){
	((DeviceManagerBridge*)instPointer)->closeDev();
	return;
}
void kde_DeviceManager_initDev( kde_DeviceManager* instPointer){
	((DeviceManagerBridge*)instPointer)->initDev();
	return;
}
void kde_DeviceManager_noteOn( kde_DeviceManager* instPointer,unsigned char chn, unsigned char note, unsigned char vel){
	((DeviceManagerBridge*)instPointer)->noteOn((uchar)chn, (uchar)note, (uchar)vel);
	return;
}
void kde_DeviceManager_noteOff( kde_DeviceManager* instPointer,unsigned char chn, unsigned char note, unsigned char vel){
	((DeviceManagerBridge*)instPointer)->noteOff((uchar)chn, (uchar)note, (uchar)vel);
	return;
}
void kde_DeviceManager_keyPressure( kde_DeviceManager* instPointer,unsigned char chn, unsigned char note, unsigned char vel){
	((DeviceManagerBridge*)instPointer)->keyPressure((uchar)chn, (uchar)note, (uchar)vel);
	return;
}
void kde_DeviceManager_chnPatchChange( kde_DeviceManager* instPointer,unsigned char chn, unsigned char patch){
	((DeviceManagerBridge*)instPointer)->chnPatchChange((uchar)chn, (uchar)patch);
	return;
}
void kde_DeviceManager_chnPressure( kde_DeviceManager* instPointer,unsigned char chn, unsigned char vel){
	((DeviceManagerBridge*)instPointer)->chnPressure((uchar)chn, (uchar)vel);
	return;
}
void kde_DeviceManager_chnPitchBender( kde_DeviceManager* instPointer,unsigned char chn, unsigned char lsb, unsigned char msb){
	((DeviceManagerBridge*)instPointer)->chnPitchBender((uchar)chn, (uchar)lsb, (uchar)msb);
	return;
}
void kde_DeviceManager_chnController( kde_DeviceManager* instPointer,unsigned char chn, unsigned char ctl, unsigned char v){
	((DeviceManagerBridge*)instPointer)->chnController((uchar)chn, (uchar)ctl, (uchar)v);
	return;
}
void kde_DeviceManager_sysEx( kde_DeviceManager* instPointer,unsigned char* data, unsigned long size){
	((DeviceManagerBridge*)instPointer)->sysEx((uchar*)data, (ulong)size);
	return;
}
void kde_DeviceManager_wait( kde_DeviceManager* instPointer,double ms){
	((DeviceManagerBridge*)instPointer)->wait((double)ms);
	return;
}
void kde_DeviceManager_tmrSetTempo( kde_DeviceManager* instPointer,int v){
	((DeviceManagerBridge*)instPointer)->tmrSetTempo((int)v);
	return;
}
void kde_DeviceManager_tmrStart( kde_DeviceManager* instPointer,long tpcn){
	((DeviceManagerBridge*)instPointer)->tmrStart((long int)tpcn);
	return;
}
void kde_DeviceManager_tmrStop( kde_DeviceManager* instPointer){
	((DeviceManagerBridge*)instPointer)->tmrStop();
	return;
}
void kde_DeviceManager_tmrContinue( kde_DeviceManager* instPointer){
	((DeviceManagerBridge*)instPointer)->tmrContinue();
	return;
}
void kde_DeviceManager_allNotesOff( kde_DeviceManager* instPointer){
	((DeviceManagerBridge*)instPointer)->allNotesOff();
	return;
}
void kde_DeviceManager_sync( kde_DeviceManager* instPointer,int f){
	((DeviceManagerBridge*)instPointer)->sync((bool)f);
	return;
}
void kde_DeviceManager_setVolumePercentage( kde_DeviceManager* instPointer,int i){
	((DeviceManagerBridge*)instPointer)->setVolumePercentage((int)i);
	return;
}
int kde_DeviceManager_defaultDevice( kde_DeviceManager* instPointer){
	return (int) ((DeviceManagerBridge*)instPointer)->defaultDevice();
}
void kde_DeviceManager_setDefaultDevice( kde_DeviceManager* instPointer,int i){
	((DeviceManagerBridge*)instPointer)->setDefaultDevice((int)i);
	return;
}
int kde_DeviceManager_setPatchesToUse( kde_DeviceManager* instPointer,int* patchesused){
	return (int) ((DeviceManagerBridge*)instPointer)->setPatchesToUse((int*)patchesused);
}
char* kde_DeviceManager_midiMapFilename( kde_DeviceManager* instPointer){
	return (char*) ((DeviceManagerBridge*)instPointer)->midiMapFilename();
}
void kde_DeviceManager_setMidiMap( kde_DeviceManager* instPointer,kde_MidiMapper* map){
	((DeviceManagerBridge*)instPointer)->setMidiMap((MidiMapper*)map);
	return;
}
int kde_DeviceManager_rate( kde_DeviceManager* instPointer){
	return (int) ((DeviceManagerBridge*)instPointer)->rate();
}
int kde_DeviceManager_midiPorts( kde_DeviceManager* instPointer){
	return (int) ((DeviceManagerBridge*)instPointer)->midiPorts();
}
int kde_DeviceManager_synthDevices( kde_DeviceManager* instPointer){
	return (int) ((DeviceManagerBridge*)instPointer)->synthDevices();
}
char* kde_DeviceManager_name( kde_DeviceManager* instPointer,int i){
	return (char*) ((DeviceManagerBridge*)instPointer)->name((int)i);
}
char* kde_DeviceManager_type( kde_DeviceManager* instPointer,int i){
	return (char*) ((DeviceManagerBridge*)instPointer)->type((int)i);
}
void kde_DeviceManager_seqbuf_dump( kde_DeviceManager* instPointer){
	((DeviceManagerBridge*)instPointer)->protected_seqbuf_dump();
	return;
}
void kde_DeviceManager_seqbuf_clean( kde_DeviceManager* instPointer){
	((DeviceManagerBridge*)instPointer)->protected_seqbuf_clean();
	return;
}
void kde_DeviceManager_checkAlsa( kde_DeviceManager* instPointer){
	((DeviceManagerBridge*)instPointer)->protected_checkAlsa();
	return;
}
