/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM mozILineTerm.idl
 */

#ifndef __gen_mozILineTerm_h__
#define __gen_mozILineTerm_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

#ifndef __gen_domstubs_h__
#include "domstubs.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIDOMDocument;

/* starting interface:    mozILineTerm */
#define MOZILINETERM_IID_STR "0eb82b00-43a2-11d3-8e76-006008948af5"

#define MOZILINETERM_IID \
  {0x0eb82b00, 0x43a2, 0x11d3, \
    { 0x8e, 0x76, 0x00, 0x60, 0x08, 0x94, 0x8a, 0xf5 }}

class NS_NO_VTABLE mozILineTerm : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(MOZILINETERM_IID)

  /** Opens LineTerm, a line-oriented terminal interface (without graphics)
   * @param command name of command to be executed; usually a shell,
   *        e.g., "/bin/sh"; if set to null string, the command name is
   *        determined from the environment variable SHELL (ASCII only)
   * @param initInput initial input string to be transmitted to terminal;
   *        set to null string, if none. (ASCII only)
   * @param promptRegexp command prompt regular expression (for future use);
   *        at the moment, any string terminated by one of the characters
   *        "#$%>?", followed by a space, is assumed to be a prompt
   * @param options LineTerm option bits (usually 0; see lineterm.h)
   * @param processType command shell type; if set to -1, type is determined
   *        from the command name
   * @param domDoc DOM document object associated with the LineTerm
   *        (document.cookie will be defined for this document on return)
   */
  /* void Open (in wstring command, in wstring initInput, in wstring promptRegexp, in PRInt32 options, in PRInt32 processType, in nsIDOMDocument domDoc); */
  NS_IMETHOD Open(const PRUnichar *command, const PRUnichar *initInput, const PRUnichar *promptRegexp, PRInt32 options, PRInt32 processType, nsIDOMDocument *domDoc) = 0;

  /** Closes LineTerm
   * @param aCookie document.cookie string for authentication
   */
  /* void Close (in wstring aCookie); */
  NS_IMETHOD Close(const PRUnichar *aCookie) = 0;

  /** Writes string to LineTerm as if the user had typed it (command input)
   * @param buf string to be transmitted to LineTerm
   * @param aCookie document.cookie string for authentication
   */
  /* void Write (in wstring buf, in wstring aCookie); */
  NS_IMETHOD Write(const PRUnichar *buf, const PRUnichar *aCookie) = 0;

  /** Read output data string and parameters from LineTerm (command output)
   * @param opcodes (output) output data descriptor bits (see lineterm.h)
   * @param opvals (output) output data value(s)
   * @param buf_row (output) row number (>=-1)
   *               (-1 denotes line mode and 0 represents bottom row)
   * @param buf_col (output) column number (>=0)
   * @param aCookie document.cookie string for authentication
   * @return output data string from LineTerm
   */
  /* wstring Read (out PRInt32 opcodes, out PRInt32 opvals, out PRInt32 buf_row, out PRInt32 buf_col, in wstring aCookie); */
  NS_IMETHOD Read(PRInt32 *opcodes, PRInt32 *opvals, PRInt32 *buf_row, PRInt32 *buf_col, const PRUnichar *aCookie, PRUnichar **_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_MOZILINETERM \
  NS_IMETHOD Open(const PRUnichar *command, const PRUnichar *initInput, const PRUnichar *promptRegexp, PRInt32 options, PRInt32 processType, nsIDOMDocument *domDoc); \
  NS_IMETHOD Close(const PRUnichar *aCookie); \
  NS_IMETHOD Write(const PRUnichar *buf, const PRUnichar *aCookie); \
  NS_IMETHOD Read(PRInt32 *opcodes, PRInt32 *opvals, PRInt32 *buf_row, PRInt32 *buf_col, const PRUnichar *aCookie, PRUnichar **_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_MOZILINETERM(_to) \
  NS_IMETHOD Open(const PRUnichar *command, const PRUnichar *initInput, const PRUnichar *promptRegexp, PRInt32 options, PRInt32 processType, nsIDOMDocument *domDoc) { return _to ## Open(command, initInput, promptRegexp, options, processType, domDoc); } \
  NS_IMETHOD Close(const PRUnichar *aCookie) { return _to ## Close(aCookie); } \
  NS_IMETHOD Write(const PRUnichar *buf, const PRUnichar *aCookie) { return _to ## Write(buf, aCookie); } \
  NS_IMETHOD Read(PRInt32 *opcodes, PRInt32 *opvals, PRInt32 *buf_row, PRInt32 *buf_col, const PRUnichar *aCookie, PRUnichar **_retval) { return _to ## Read(opcodes, opvals, buf_row, buf_col, aCookie, _retval); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_MOZILINETERM(_to) \
  NS_IMETHOD Open(const PRUnichar *command, const PRUnichar *initInput, const PRUnichar *promptRegexp, PRInt32 options, PRInt32 processType, nsIDOMDocument *domDoc) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> Open(command, initInput, promptRegexp, options, processType, domDoc); } \
  NS_IMETHOD Close(const PRUnichar *aCookie) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> Close(aCookie); } \
  NS_IMETHOD Write(const PRUnichar *buf, const PRUnichar *aCookie) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> Write(buf, aCookie); } \
  NS_IMETHOD Read(PRInt32 *opcodes, PRInt32 *opvals, PRInt32 *buf_row, PRInt32 *buf_col, const PRUnichar *aCookie, PRUnichar **_retval) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##-> Read(opcodes, opvals, buf_row, buf_col, aCookie, _retval); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class _MYCLASS_ : public mozILineTerm
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_MOZILINETERM

  _MYCLASS_();
  virtual ~_MYCLASS_();
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, mozILineTerm)

_MYCLASS_::_MYCLASS_()
{
  NS_INIT_ISUPPORTS();
  /* member initializers and constructor code */
}

_MYCLASS_::~_MYCLASS_()
{
  /* destructor code */
}

/* void Open (in wstring command, in wstring initInput, in wstring promptRegexp, in PRInt32 options, in PRInt32 processType, in nsIDOMDocument domDoc); */
NS_IMETHODIMP _MYCLASS_::Open(const PRUnichar *command, const PRUnichar *initInput, const PRUnichar *promptRegexp, PRInt32 options, PRInt32 processType, nsIDOMDocument *domDoc)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void Close (in wstring aCookie); */
NS_IMETHODIMP _MYCLASS_::Close(const PRUnichar *aCookie)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void Write (in wstring buf, in wstring aCookie); */
NS_IMETHODIMP _MYCLASS_::Write(const PRUnichar *buf, const PRUnichar *aCookie)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* wstring Read (out PRInt32 opcodes, out PRInt32 opvals, out PRInt32 buf_row, out PRInt32 buf_col, in wstring aCookie); */
NS_IMETHODIMP _MYCLASS_::Read(PRInt32 *opcodes, PRInt32 *opvals, PRInt32 *buf_row, PRInt32 *buf_col, const PRUnichar *aCookie, PRUnichar **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif

#define MOZLINETERM_CID                      \
{ /* 0eb82b01-43a2-11d3-8e76-006008948af5 */ \
   0x0eb82b01, 0x43a2, 0x11d3,               \
{0x8e, 0x76, 0x00, 0x60, 0x08, 0x94, 0x8a, 0xf5} }
extern nsresult
NS_NewLineTerm(mozILineTerm** aLineTerm);

#endif /* __gen_mozILineTerm_h__ */
