2
* The contents of this file are subject to the Mozilla Public
3
* License Version 1.1 (the "MPL"); you may not use this file
4
* except in compliance with the MPL. You may obtain a copy of
5
* the MPL at http://www.mozilla.org/MPL/
7
* Software distributed under the MPL is distributed on an "AS
8
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
9
* implied. See the MPL for the specific language governing
10
* rights and limitations under the MPL.
12
* The Original Code is XMLterm.
14
* The Initial Developer of the Original Code is Ramalingam Saravanan.
15
* Portions created by Ramalingam Saravanan <svn@xmlterm.org> are
16
* Copyright (C) 1999 Ramalingam Saravanan. All Rights Reserved.
21
// mozLineTerm.h: Declaration of mozLineTerm class
22
// which implements the LineTerm and LineTermAux interfaces.
23
// and provides an XPCOM/XPCONNECT wrapper to the LINETERM module
28
#include "nsIGenericFactory.h"
30
#include "nsIServiceManager.h"
32
#include "nsIDocument.h"
33
#include "nsIDOMHTMLDocument.h"
35
#include "mozILineTerm.h"
38
#include <glibconfig.h>
41
#define MAXCOL 4096 // Maximum columns in line buffer
43
class mozLineTerm : public mozILineTermAux
47
virtual ~mozLineTerm();
49
// nsISupports interface
52
NS_DECL_MOZILINETERMAUX
54
// Define a Create method to be used with a factory:
56
Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
60
/** GTK event callback function
62
static void Callback(gpointer data,
64
GdkInputCondition condition);
67
/** Checks if Mozilla preference settings are secure
68
* @param _retval (output) PR_TRUE if settings are secure
70
NS_IMETHOD ArePrefsSecure(PRBool *_retval);
72
/** Checks if document principal is secure and returns principal string
73
* @param domDOC DOM document object
74
* @param aPrincipalStr (output) document principal string
76
NS_IMETHOD GetSecurePrincipal(nsIDOMDocument *domDoc,
77
char** aPrincipalStr);
79
/** lineterm descriptor index returned by lterm_new (>= 0) */
82
/** current cursor row position */
85
/** current cursor column position */
88
/** flag controlling whether is LineTerm is suspended */
91
/** flag controlling input echo in LineTerm */
94
/** non-owning reference to Observer to be notified when data is available
95
* for reading from LineTerm
97
nsIObserver* mObserver;
99
/** cookie string used for authentication (stored in document.cookie) */
102
/** record of last time when timestamp was displayed in user input log */
105
/** Flag controlling logging of user input to STDERR */
106
static PRBool mLoggingEnabled;
108
static PRBool mLoggingInitialized;