/***************************************************************************
                            kde_SuProcess.h -  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.                       *
 *                                                                         *
 ***************************************************************************/

#ifndef KDE_SUPROCESS
#define KDE_SUPROCESS

#include <qtc/qtc_types.h>

#include <kdec/kde_types.h>

/**

 Executes a command under elevated privileges, using su.
 
 @short 
 Executes a command under elevated privileges, using su.
*/
#define SUPROCESS_SuNotFound	1
#define SUPROCESS_SuNotAllowed	0
#define SUPROCESS_SuIncorrectPassword	1
kde_SuProcess * kde_new_SuProcess(qt_QCString* user, qt_QCString* command);
void kde_del_SuProcess( kde_SuProcess* p );

/**  Executes the command. This will wait for the command to finish. 
*/
int kde_SuProcess_exec(kde_SuProcess* instPointer,char* password, int check);

/**  
 Checks if the stub is installed and the password is correct.

*/
int kde_SuProcess_checkInstall(kde_SuProcess* instPointer,char* password);

/** 
 Checks if a password is needed.
     
*/
int kde_SuProcess_checkNeedPassword(kde_SuProcess* instPointer);

#endif
