2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsXBLProtoImplField_h__
|
|
|
|
#define nsXBLProtoImplField_h__
|
|
|
|
|
|
|
|
#include "nsIAtom.h"
|
|
|
|
#include "nsString.h"
|
|
|
|
#include "jsapi.h"
|
|
|
|
#include "nsIContent.h"
|
|
|
|
#include "nsString.h"
|
|
|
|
#include "nsXBLProtoImplMember.h"
|
|
|
|
|
2007-09-28 06:45:01 -07:00
|
|
|
class nsIURI;
|
|
|
|
|
|
|
|
class nsXBLProtoImplField
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsXBLProtoImplField(const PRUnichar* aName, const PRUnichar* aReadOnly);
|
2011-11-03 13:39:08 -07:00
|
|
|
nsXBLProtoImplField(const bool aIsReadOnly);
|
2007-09-28 06:45:01 -07:00
|
|
|
~nsXBLProtoImplField();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
void AppendFieldText(const nsAString& aText);
|
|
|
|
void SetLineNumber(PRUint32 aLineNumber) {
|
|
|
|
mLineNumber = aLineNumber;
|
|
|
|
}
|
|
|
|
|
2007-09-28 06:45:01 -07:00
|
|
|
nsXBLProtoImplField* GetNext() const { return mNext; }
|
|
|
|
void SetNext(nsXBLProtoImplField* aNext) { mNext = aNext; }
|
|
|
|
|
|
|
|
nsresult InstallField(nsIScriptContext* aContext,
|
2007-10-02 07:38:35 -07:00
|
|
|
JSObject* aBoundNode,
|
2008-11-28 18:16:17 -08:00
|
|
|
nsIPrincipal* aPrincipal,
|
2007-10-02 07:38:35 -07:00
|
|
|
nsIURI* aBindingDocURI,
|
2011-09-28 23:19:26 -07:00
|
|
|
bool* aDidInstall) const;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2011-11-03 13:39:08 -07:00
|
|
|
nsresult Read(nsIScriptContext* aContext, nsIObjectInputStream* aStream);
|
|
|
|
nsresult Write(nsIScriptContext* aContext, nsIObjectOutputStream* aStream);
|
|
|
|
|
2007-09-28 06:45:01 -07:00
|
|
|
const PRUnichar* GetName() const { return mName; }
|
2007-05-24 07:10:02 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
protected:
|
2007-09-28 06:45:01 -07:00
|
|
|
nsXBLProtoImplField* mNext;
|
|
|
|
PRUnichar* mName;
|
2007-03-22 10:30:00 -07:00
|
|
|
PRUnichar* mFieldText;
|
|
|
|
PRUint32 mFieldTextLength;
|
|
|
|
PRUint32 mLineNumber;
|
2012-02-28 15:11:11 -08:00
|
|
|
unsigned mJSAttributes;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsXBLProtoImplField_h__
|