/***************************************************************************
                            KMidSimpleAPI.m -  description
                             -------------------
    begin                : Fri Mar  8 13:55:08 2002
    copyright            : (C) 2000-2002 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Fri Mar  8 13:55:08 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.                       *
 *                                                                         *
 ***************************************************************************/

#include <qtc/qt_QString.h>
#include <qtc/qt_QCString.h>
#include <kdec/kde_KMidSimpleAPI.h>
#include <kdeobjc/KDESupport.h>
#include <kdeobjc/KMidSimpleAPI.h>

@implementation  KMidSimpleAPI

- (void *) qt
{
	return _qt;
}

- setQt: (void *) qt
{
	_qt = qt;
	return self;
}

- (BOOL) allocatedInObjcWorld
{
	return _allocatedInObjcWorld;
}

- setAllocatedInObjcWorld: (BOOL) yn
{
	_allocatedInObjcWorld = yn;
	return self;
}


+ (int) kMidInit
{
	return (int) kde_KMidSimpleAPI_kMidInit();
}

+ (int) kMidLoad: (NSString *)filename
{
	return (int) kde_KMidSimpleAPI_kMidLoad((char*) [filename cString]);
}

+ (int) kMidPlay: (int)loop
{
	return (int) kde_KMidSimpleAPI_kMidPlay((int)loop);
}

+ (int) kMidPlay
{
	return (int) kde_KMidSimpleAPI_kMidPlay(0);
}

+ (int) kMidStop
{
	return (int) kde_KMidSimpleAPI_kMidStop();
}

+ kMidDestruct
{
	kde_KMidSimpleAPI_kMidDestruct();
	return self;
}

+ (int) kMidIsPlaying
{
	return (int) kde_KMidSimpleAPI_kMidIsPlaying();
}

+ (int) kMidDevices
{
	return (int) kde_KMidSimpleAPI_kMidDevices();
}

+ (NSString *) kMidName: (int)i
{
	return (NSString *) [NSString stringWithCString: kde_KMidSimpleAPI_kMidName((int)i)];
}

+ (NSString *) kMidType: (int)i
{
	return (NSString *) [NSString stringWithCString: kde_KMidSimpleAPI_kMidType((int)i)];
}

+ kMidSetDevice: (int)i
{
	kde_KMidSimpleAPI_kMidSetDevice((int)i);
	return self;
}

+ kMidSetMidiMapper: (NSString *)mapfilename
{
	kde_KMidSimpleAPI_kMidSetMidiMapper((char*) [mapfilename cString]);
	return self;
}

+ (NSString *) kMidVersion
{
	return (NSString *) [NSString stringWithCString: kde_KMidSimpleAPI_kMidVersion()];
}

+ (NSString *) kMidCopyright
{
	return (NSString *) [NSString stringWithCString: kde_KMidSimpleAPI_kMidCopyright()];
}

@end
