/***************************************************************************
                            KNotifyClient.cpp -  description
                             -------------------
    begin                : Sun Jan 27 16:22:17 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd.
    email                : Richard_Dale@tipitina.demon.co.uk
    generated by         : duke@tipitina on Sun Jan 27 16:22:17 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program 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.                                   *
 *                                                                         *
***************************************************************************/

#define _BOOL_H_
#include <knotifyclient.h>
#include <qstring.h>
#include <qcstring.h>

#include <qtjava/QtSupport.h>
#include <kdejava/KDESupport.h>
#include <kdejava/KNotifyClient.h>

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KNotifyClient_startDaemon(JNIEnv *env, jobject obj)
{
	return (jboolean) KNotifyClient::startDaemon();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KNotifyClient_event__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring message, jstring text)
{
static QString * _qstring_text = 0;
static QString * _qstring_message = 0;
	return (jboolean) KNotifyClient::event((QString&) * (QString *) QtSupport::toQString(env, message, &_qstring_message), (QString&) * (QString *) QtSupport::toQString(env, text, &_qstring_text));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KNotifyClient_event__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring message)
{
static QString * _qstring_message = 0;
	return (jboolean) KNotifyClient::event((QString&) * (QString *) QtSupport::toQString(env, message, &_qstring_message), QString::null);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KNotifyClient_event__ILjava_lang_String_2(JNIEnv *env, jobject obj, jint event, jstring text)
{
static QString * _qstring_text = 0;
	return (jboolean) KNotifyClient::event((KNotifyClient::StandardEvent) event, (QString&) * (QString *) QtSupport::toQString(env, text, &_qstring_text));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KNotifyClient_event__I(JNIEnv *env, jobject obj, jint event)
{
	return (jboolean) KNotifyClient::event((KNotifyClient::StandardEvent) event, QString::null);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KNotifyClient_userEvent__Ljava_lang_String_2IILjava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring text, jint present, jint level, jstring sound, jstring file)
{
static QString * _qstring_file = 0;
static QString * _qstring_sound = 0;
static QString * _qstring_text = 0;
	return (jboolean) KNotifyClient::userEvent((QString&) * (QString *) QtSupport::toQString(env, text, &_qstring_text), (int) present, (int) level, (QString&) * (QString *) QtSupport::toQString(env, sound, &_qstring_sound), (QString&) * (QString *) QtSupport::toQString(env, file, &_qstring_file));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KNotifyClient_userEvent__(JNIEnv *env, jobject obj)
{
	return (jboolean) KNotifyClient::userEvent(QString::null, KNotifyClient::Default, KNotifyClient::Default, QString::null, QString::null);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KNotifyClient_beep__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring reason)
{
static QString * _qstring_reason = 0;
	KNotifyClient::beep((QString&) * (QString *) QtSupport::toQString(env, reason, &_qstring_reason));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KNotifyClient_beep__(JNIEnv *env, jobject obj)
{
	KNotifyClient::beep(QString::null);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KNotifyClient_getPresentation(JNIEnv *env, jobject obj, jstring eventname)
{
static QString * _qstring_eventname = 0;
	return (jint) KNotifyClient::getPresentation((QString&) * (QString *) QtSupport::toQString(env, eventname, &_qstring_eventname));
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KNotifyClient_getFile(JNIEnv *env, jobject obj, jstring eventname, jint present)
{
	QString  _qstring;
static QString * _qstring_eventname = 0;
	_qstring = KNotifyClient::getFile((QString&) * (QString *) QtSupport::toQString(env, eventname, &_qstring_eventname), (int) present);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KNotifyClient_getDefaultPresentation(JNIEnv *env, jobject obj, jstring eventname)
{
static QString * _qstring_eventname = 0;
	return (jint) KNotifyClient::getDefaultPresentation((QString&) * (QString *) QtSupport::toQString(env, eventname, &_qstring_eventname));
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KNotifyClient_getDefaultFile(JNIEnv *env, jobject obj, jstring eventname, jint present)
{
	QString  _qstring;
static QString * _qstring_eventname = 0;
	_qstring = KNotifyClient::getDefaultFile((QString&) * (QString *) QtSupport::toQString(env, eventname, &_qstring_eventname), (int) present);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KNotifyClient_instance(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)KNotifyClient::instance(), "org.kde.koala.KInstanceInterface");
}

