00001 /*---------------------------------------------------------------------\ 00002 | | 00003 | __ __ ____ _____ ____ | 00004 | \ \ / /_ _/ ___|_ _|___ \ | 00005 | \ V / _` \___ \ | | __) | | 00006 | | | (_| |___) || | / __/ | 00007 | |_|\__,_|____/ |_| |_____| | 00008 | | 00009 | core system | 00010 | (C) SuSE GmbH | 00011 \----------------------------------------------------------------------/ 00012 00013 File: RemoteProtocol.h 00014 00015 Author: Mathias Kettner <kettner@suse.de> 00016 Maintainer: Thomas Roelz <tom@suse.de> 00017 00018 /-*/ 00019 // -*- c++ -*- 00020 00021 #ifndef RemoteProtocol_h 00022 #define RemoteProtocol_h 00023 00024 #include <y2util/ExternalProgram.h> 00025 00026 class RemoteProtocol : public ExternalProgram 00027 { 00028 public: 00036 RemoteProtocol (std::string commandline, bool use_pty = false); 00037 00041 enum callStatus { RP_OK, RP_PASSWD, RP_ERROR }; 00042 00054 virtual callStatus callComponent (std::string password = "", 00055 bool passwd_supplied = false) = 0; 00056 00061 virtual bool doesEcho () const = 0; 00062 00063 protected: 00076 int expectOneOf (const std::string *strings, int number_strings, int maxread); 00077 }; 00078 00079 #endif // RemoteProtocol_h
1.4.4