/***************************************************************************
                            KEMailSettings.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_KEMailSettings.h>
#include <kdeobjc/KDESupport.h>
#include <kdeobjc/KEMailSettings.h>

@implementation  KEMailSettings

- (void *) qt
{
	return _qt;
}

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

- (BOOL) allocatedInObjcWorld
{
	return _allocatedInObjcWorld;
}

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


- init
{
	if ([self qt] == 0L) {
		[self setQt: kde_new_KEMailSettings()];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- (void) dealloc
{
	if ([self qt] != 0L) {
		if ([self allocatedInObjcWorld]) {
			kde_del_KEMailSettings((kde_KEMailSettings *)[self qt]);
		}
		[QtSupport removeQtKey: [self qt]];
		[self setQt: 0L];
	}
	[super dealloc];
}

- (NSArray *) profiles
{
static qt_QStringList * _qlist = 0L;
	_qlist = kde_KEMailSettings_profiles((kde_KEMailSettings *)[self qt]);
	return (NSArray *) [NSMutableArray arrayWithQStringList: _qlist];
}

- (NSString *) currentProfileName
{
static qt_QString * _qstring = 0L;
	_qstring = kde_KEMailSettings_currentProfileName((kde_KEMailSettings *)[self qt]);
	return [NSString fromQString: _qstring];
}

- setProfile: (NSString *)arg1
{
static qt_QString * _qstring_arg1 = 0L;
	kde_KEMailSettings_setProfile((kde_KEMailSettings *)[self qt], (qt_QString *) [arg1 toQString: &_qstring_arg1]);
	return self;
}

- (NSString *) defaultProfileName
{
static qt_QString * _qstring = 0L;
	_qstring = kde_KEMailSettings_defaultProfileName((kde_KEMailSettings *)[self qt]);
	return [NSString fromQString: _qstring];
}

- setDefault: (NSString *)arg1
{
static qt_QString * _qstring_arg1 = 0L;
	kde_KEMailSettings_setDefault((kde_KEMailSettings *)[self qt], (qt_QString *) [arg1 toQString: &_qstring_arg1]);
	return self;
}

- (NSString *) getSetting: (int)s
{
static qt_QString * _qstring = 0L;
	_qstring = kde_KEMailSettings_getSetting((kde_KEMailSettings *)[self qt], (int)s);
	return [NSString fromQString: _qstring];
}

- setSetting: (int)s v: (NSString *)v
{
static qt_QString * _qstring_v = 0L;
	kde_KEMailSettings_setSetting((kde_KEMailSettings *)[self qt], (int)s, (qt_QString *) [v toQString: &_qstring_v]);
	return self;
}

//- (NSString *) getExtendedSetting: (int)e s: (NSString *)s
//{
//static qt_QString * _qstring = 0L;
//static qt_QString * _qstring_s = 0L;
//	_qstring = kde_KEMailSettings_getExtendedSetting((kde_KEMailSettings *)[self qt], (int)e, (qt_QString *) [s toQString: &_qstring_s]);
//	return [NSString fromQString: _qstring];
//}

//- setExtendedSetting: (int)e s: (NSString *)s v: (NSString *)v
//{
//static qt_QString * _qstring_v = 0L;
//static qt_QString * _qstring_s = 0L;
//	kde_KEMailSettings_setExtendedSetting((kde_KEMailSettings *)[self qt], (int)e, (qt_QString *) [s toQString: &_qstring_s], (qt_QString *) [v toQString: &_qstring_v]);
//	return self;
//}

+ (int) ClientProgram
{
	return (int) KEMAILSETTINGS_ClientProgram;
}

+ (int) ClientTerminal
{
	return (int) KEMAILSETTINGS_ClientTerminal;
}

+ (int) RealName
{
	return (int) KEMAILSETTINGS_RealName;
}

+ (int) EmailAddress
{
	return (int) KEMAILSETTINGS_EmailAddress;
}

+ (int) ReplyToAddress
{
	return (int) KEMAILSETTINGS_ReplyToAddress;
}

+ (int) Organization
{
	return (int) KEMAILSETTINGS_Organization;
}

+ (int) OutServer
{
	return (int) KEMAILSETTINGS_OutServer;
}

+ (int) OutServerLogin
{
	return (int) KEMAILSETTINGS_OutServerLogin;
}

+ (int) OutServerPass
{
	return (int) KEMAILSETTINGS_OutServerPass;
}

+ (int) OutServerType
{
	return (int) KEMAILSETTINGS_OutServerType;
}

+ (int) OutServerCommand
{
	return (int) KEMAILSETTINGS_OutServerCommand;
}

+ (int) OutServerTLS
{
	return (int) KEMAILSETTINGS_OutServerTLS;
}

+ (int) InServer
{
	return (int) KEMAILSETTINGS_InServer;
}

+ (int) InServerLogin
{
	return (int) KEMAILSETTINGS_InServerLogin;
}

+ (int) InServerPass
{
	return (int) KEMAILSETTINGS_InServerPass;
}

+ (int) InServerType
{
	return (int) KEMAILSETTINGS_InServerType;
}

+ (int) InServerMBXType
{
	return (int) KEMAILSETTINGS_InServerMBXType;
}

+ (int) InServerTLS
{
	return (int) KEMAILSETTINGS_InServerTLS;
}

+ (int) POP3
{
	return (int) KEMAILSETTINGS_POP3;
}

+ (int) SMTP
{
	return (int) KEMAILSETTINGS_SMTP;
}

+ (int) OTHER
{
	return (int) KEMAILSETTINGS_OTHER;
}

@end
