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

#ifndef SUPROCESS_H
#define SUPROCESS_H

#include <Foundation/NSObject.h>
#include <Foundation/NSString.h>
#include <kdeobjc/StubProcess.h>

/**

 Executes a command under elevated privileges, using su.
 
 @short 
 Executes a command under elevated privileges, using su.
*/
@interface SuProcess : StubProcess 
- initWithText: (NSString *)user command: (NSString *)command;
- init;
- (void) dealloc;

/**  Executes the command. This will wait for the command to finish. 
*/
- (int) exec: (NSString *)password check: (int)check;
- (int) exec: (NSString *)password ;

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

*/
- (int) checkInstall: (NSString *)password;

/** 
 Checks if a password is needed.
     
*/
- (int) checkNeedPassword;
+ (int) SuNotFound;
+ (int) SuNotAllowed;
+ (int) SuIncorrectPassword;
@end

#endif
