/*
 *  Copyright (C) 2007-2008 CMM Sigma Andrzej Chmielowiec <cmmsigma@cmmsigma.eu>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License version 3
 *  as published by the Free Software Foundation.
 *
 *  This program 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.
 */

#ifndef VPN_EDIT_WINDOW_H
#define VPN_EDIT_WINDOW_H

#include <QDialog>

class QGroupBox;
class QPushButton;
class QLineEdit;
class QListWidget;
class VpnItem;

class VpnEditWindow: public QDialog
{
	Q_OBJECT;
	
public:
	VpnEditWindow(VpnItem *item, QWidget *parent = 0);
	
private slots:
	void caCertBrowseSlot();
	void userCertBrowseSlot();
	void sTokenKeyBrowseSlot();
	void saveSlot();
#ifndef STOKEN_SOFT
	void caCertImportSlot();
	void userCertImportSlot();
#endif
	
private:
	QWidget *createBaseTab();
	QGroupBox *createNameBox();
	QGroupBox *createNetDetailsBox();
	QGroupBox *createCertsKeyBox();
	QGroupBox *createRouteBox();
	
	VpnItem *mVpnItem;
	
	QLineEdit *mSTokenVpnName;
	
	QLineEdit *mRemoteVpnServer;
	
	QLineEdit *mCaCert;
	QString mCaCertFileName;
	QByteArray mCaCertData;
	QPushButton *mCaCertBrowse;
	QLineEdit *mUserCert;
	QString mUserCertFileName;
	QByteArray mUserCertData;
	QPushButton *mUserCertBrowse;
#ifndef STOKEN_SOFT
	QPushButton *mCaCertImport;
	QPushButton *mUserCertImport;
#endif
	QLineEdit *mKey;
	QPushButton *mKeyBrowse;
	
	QPushButton *mCancel;
	QPushButton *mSave;
	
};

#endif
