summaryrefslogtreecommitdiffstats
path: root/src/libs/xpcom18a4/python/test/test_component
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/libs/xpcom18a4/python/test/test_component/_xpidlgen/.done0
-rw-r--r--src/libs/xpcom18a4/python/test/test_component/_xpidlgen/py_test_component.h1411
-rw-r--r--src/libs/xpcom18a4/python/test/test_component/py_test_component.html182
-rw-r--r--src/libs/xpcom18a4/python/test/test_component/py_test_component.idl231
-rwxr-xr-xsrc/libs/xpcom18a4/python/test/test_component/py_test_component.py421
-rwxr-xr-xsrc/libs/xpcom18a4/python/test/test_components.py109
6 files changed, 2354 insertions, 0 deletions
diff --git a/src/libs/xpcom18a4/python/test/test_component/_xpidlgen/.done b/src/libs/xpcom18a4/python/test/test_component/_xpidlgen/.done
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/libs/xpcom18a4/python/test/test_component/_xpidlgen/.done
diff --git a/src/libs/xpcom18a4/python/test/test_component/_xpidlgen/py_test_component.h b/src/libs/xpcom18a4/python/test/test_component/_xpidlgen/py_test_component.h
new file mode 100644
index 00000000..7d0cd8c9
--- /dev/null
+++ b/src/libs/xpcom18a4/python/test/test_component/_xpidlgen/py_test_component.h
@@ -0,0 +1,1411 @@
+/*
+ * DO NOT EDIT. THIS FILE IS GENERATED FROM py_test_component.idl
+ */
+
+#ifndef __gen_py_test_component_h__
+#define __gen_py_test_component_h__
+
+
+#ifndef __gen_nsISupports_h__
+#include "nsISupports.h"
+#endif
+
+#ifndef __gen_nsIVariant_h__
+#include "nsIVariant.h"
+#endif
+
+/* For IDL files that don't want to include root IDL files. */
+#ifndef NS_NO_VTABLE
+#define NS_NO_VTABLE
+#endif
+
+/* starting interface: nsIPythonTestInterface */
+#define NS_IPYTHONTESTINTERFACE_IID_STR "1ecaed4f-e4d5-4ee7-abf0-7d72ae1441d7"
+
+#define NS_IPYTHONTESTINTERFACE_IID \
+ {0x1ecaed4f, 0xe4d5, 0x4ee7, \
+ { 0xab, 0xf0, 0x7d, 0x72, 0xae, 0x14, 0x41, 0xd7 }}
+
+class NS_NO_VTABLE nsIPythonTestInterface : public nsISupports {
+ public:
+
+ NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPYTHONTESTINTERFACE_IID)
+
+ enum { One = 1 };
+
+ enum { Two = 2 };
+
+ enum { MinusOne = -1 };
+
+ enum { BigLong = 2147483647 };
+
+ enum { BiggerLong = 4294967295 };
+
+ enum { BigULong = 4294967295U };
+
+ /* attribute boolean boolean_value; */
+ NS_IMETHOD GetBoolean_value(PRBool *aBoolean_value) = 0;
+ NS_IMETHOD SetBoolean_value(PRBool aBoolean_value) = 0;
+
+ /* attribute octet octet_value; */
+ NS_IMETHOD GetOctet_value(PRUint8 *aOctet_value) = 0;
+ NS_IMETHOD SetOctet_value(PRUint8 aOctet_value) = 0;
+
+ /* attribute short short_value; */
+ NS_IMETHOD GetShort_value(PRInt16 *aShort_value) = 0;
+ NS_IMETHOD SetShort_value(PRInt16 aShort_value) = 0;
+
+ /* attribute unsigned short ushort_value; */
+ NS_IMETHOD GetUshort_value(PRUint16 *aUshort_value) = 0;
+ NS_IMETHOD SetUshort_value(PRUint16 aUshort_value) = 0;
+
+ /* attribute long long_value; */
+ NS_IMETHOD GetLong_value(PRInt32 *aLong_value) = 0;
+ NS_IMETHOD SetLong_value(PRInt32 aLong_value) = 0;
+
+ /* attribute unsigned long ulong_value; */
+ NS_IMETHOD GetUlong_value(PRUint32 *aUlong_value) = 0;
+ NS_IMETHOD SetUlong_value(PRUint32 aUlong_value) = 0;
+
+ /* attribute long long long_long_value; */
+ NS_IMETHOD GetLong_long_value(PRInt64 *aLong_long_value) = 0;
+ NS_IMETHOD SetLong_long_value(PRInt64 aLong_long_value) = 0;
+
+ /* attribute unsigned long long ulong_long_value; */
+ NS_IMETHOD GetUlong_long_value(PRUint64 *aUlong_long_value) = 0;
+ NS_IMETHOD SetUlong_long_value(PRUint64 aUlong_long_value) = 0;
+
+ /* attribute float float_value; */
+ NS_IMETHOD GetFloat_value(float *aFloat_value) = 0;
+ NS_IMETHOD SetFloat_value(float aFloat_value) = 0;
+
+ /* attribute double double_value; */
+ NS_IMETHOD GetDouble_value(double *aDouble_value) = 0;
+ NS_IMETHOD SetDouble_value(double aDouble_value) = 0;
+
+ /* attribute char char_value; */
+ NS_IMETHOD GetChar_value(char *aChar_value) = 0;
+ NS_IMETHOD SetChar_value(char aChar_value) = 0;
+
+ /* attribute wchar wchar_value; */
+ NS_IMETHOD GetWchar_value(PRUnichar *aWchar_value) = 0;
+ NS_IMETHOD SetWchar_value(PRUnichar aWchar_value) = 0;
+
+ /* attribute string string_value; */
+ NS_IMETHOD GetString_value(char * *aString_value) = 0;
+ NS_IMETHOD SetString_value(const char * aString_value) = 0;
+
+ /* attribute wstring wstring_value; */
+ NS_IMETHOD GetWstring_value(PRUnichar * *aWstring_value) = 0;
+ NS_IMETHOD SetWstring_value(const PRUnichar * aWstring_value) = 0;
+
+ /* attribute AString astring_value; */
+ NS_IMETHOD GetAstring_value(nsAString & aAstring_value) = 0;
+ NS_IMETHOD SetAstring_value(const nsAString & aAstring_value) = 0;
+
+ /* attribute ACString acstring_value; */
+ NS_IMETHOD GetAcstring_value(nsACString & aAcstring_value) = 0;
+ NS_IMETHOD SetAcstring_value(const nsACString & aAcstring_value) = 0;
+
+ /* attribute AUTF8String utf8string_value; */
+ NS_IMETHOD GetUtf8string_value(nsACString & aUtf8string_value) = 0;
+ NS_IMETHOD SetUtf8string_value(const nsACString & aUtf8string_value) = 0;
+
+ /* attribute nsIIDRef iid_value; */
+ NS_IMETHOD GetIid_value(nsIID & *aIid_value) = 0;
+ NS_IMETHOD SetIid_value(const nsIID & aIid_value) = 0;
+
+ /* attribute nsIPythonTestInterface interface_value; */
+ NS_IMETHOD GetInterface_value(nsIPythonTestInterface * *aInterface_value) = 0;
+ NS_IMETHOD SetInterface_value(nsIPythonTestInterface * aInterface_value) = 0;
+
+ /* attribute nsISupports isupports_value; */
+ NS_IMETHOD GetIsupports_value(nsISupports * *aIsupports_value) = 0;
+ NS_IMETHOD SetIsupports_value(nsISupports * aIsupports_value) = 0;
+
+ /* boolean do_boolean (in boolean p1, inout boolean p2, out boolean p3); */
+ NS_IMETHOD Do_boolean(PRBool p1, PRBool *p2, PRBool *p3, PRBool *_retval) = 0;
+
+ /* octet do_octet (in octet p1, inout octet p2, out octet p3); */
+ NS_IMETHOD Do_octet(PRUint8 p1, PRUint8 *p2, PRUint8 *p3, PRUint8 *_retval) = 0;
+
+ /* short do_short (in short p1, inout short p2, out short p3); */
+ NS_IMETHOD Do_short(PRInt16 p1, PRInt16 *p2, PRInt16 *p3, PRInt16 *_retval) = 0;
+
+ /* unsigned short do_unsigned_short (in unsigned short p1, inout unsigned short p2, out unsigned short p3); */
+ NS_IMETHOD Do_unsigned_short(PRUint16 p1, PRUint16 *p2, PRUint16 *p3, PRUint16 *_retval) = 0;
+
+ /* long do_long (in long p1, inout long p2, out long p3); */
+ NS_IMETHOD Do_long(PRInt32 p1, PRInt32 *p2, PRInt32 *p3, PRInt32 *_retval) = 0;
+
+ /* unsigned long do_unsigned_long (in unsigned long p1, inout unsigned long p2, out unsigned long p3); */
+ NS_IMETHOD Do_unsigned_long(PRUint32 p1, PRUint32 *p2, PRUint32 *p3, PRUint32 *_retval) = 0;
+
+ /* long long do_long_long (in long long p1, inout long long p2, out long long p3); */
+ NS_IMETHOD Do_long_long(PRInt64 p1, PRInt64 *p2, PRInt64 *p3, PRInt64 *_retval) = 0;
+
+ /* unsigned long long do_unsigned_long_long (in unsigned long long p1, inout unsigned long long p2, out unsigned long long p3); */
+ NS_IMETHOD Do_unsigned_long_long(PRUint64 p1, PRUint64 *p2, PRUint64 *p3, PRUint64 *_retval) = 0;
+
+ /* float do_float (in float p1, inout float p2, out float p3); */
+ NS_IMETHOD Do_float(float p1, float *p2, float *p3, float *_retval) = 0;
+
+ /* double do_double (in double p1, inout double p2, out double p3); */
+ NS_IMETHOD Do_double(double p1, double *p2, double *p3, double *_retval) = 0;
+
+ /* char do_char (in char p1, inout char p2, out char p3); */
+ NS_IMETHOD Do_char(char p1, char *p2, char *p3, char *_retval) = 0;
+
+ /* wchar do_wchar (in wchar p1, inout wchar p2, out wchar p3); */
+ NS_IMETHOD Do_wchar(PRUnichar p1, PRUnichar *p2, PRUnichar *p3, PRUnichar *_retval) = 0;
+
+ /* string do_string (in string p1, inout string p2, out string p3); */
+ NS_IMETHOD Do_string(const char *p1, char **p2, char **p3, char **_retval) = 0;
+
+ /* wstring do_wstring (in wstring p1, inout wstring p2, out wstring p3); */
+ NS_IMETHOD Do_wstring(const PRUnichar *p1, PRUnichar **p2, PRUnichar **p3, PRUnichar **_retval) = 0;
+
+ /* nsIIDRef do_nsIIDRef (in nsIIDRef p1, inout nsIIDRef p2, out nsIIDRef p3); */
+ NS_IMETHOD Do_nsIIDRef(const nsIID & p1, nsIID & *p2, nsIID & *p3, nsIID & *_retval) = 0;
+
+ /* nsIPythonTestInterface do_nsIPythonTestInterface (in nsIPythonTestInterface p1, inout nsIPythonTestInterface p2, out nsIPythonTestInterface p3); */
+ NS_IMETHOD Do_nsIPythonTestInterface(nsIPythonTestInterface *p1, nsIPythonTestInterface **p2, nsIPythonTestInterface **p3, nsIPythonTestInterface **_retval) = 0;
+
+ /* nsISupports do_nsISupports (in nsISupports p1, inout nsISupports p2, out nsISupports p3); */
+ NS_IMETHOD Do_nsISupports(nsISupports *p1, nsISupports **p2, nsISupports **p3, nsISupports **_retval) = 0;
+
+ /* void do_nsISupportsIs (in nsIIDRef iid, [iid_is (iid), retval] out nsQIResult result); */
+ NS_IMETHOD Do_nsISupportsIs(const nsIID & iid, void * *result) = 0;
+
+};
+
+/* Use this macro when declaring classes that implement this interface. */
+#define NS_DECL_NSIPYTHONTESTINTERFACE \
+ NS_IMETHOD GetBoolean_value(PRBool *aBoolean_value); \
+ NS_IMETHOD SetBoolean_value(PRBool aBoolean_value); \
+ NS_IMETHOD GetOctet_value(PRUint8 *aOctet_value); \
+ NS_IMETHOD SetOctet_value(PRUint8 aOctet_value); \
+ NS_IMETHOD GetShort_value(PRInt16 *aShort_value); \
+ NS_IMETHOD SetShort_value(PRInt16 aShort_value); \
+ NS_IMETHOD GetUshort_value(PRUint16 *aUshort_value); \
+ NS_IMETHOD SetUshort_value(PRUint16 aUshort_value); \
+ NS_IMETHOD GetLong_value(PRInt32 *aLong_value); \
+ NS_IMETHOD SetLong_value(PRInt32 aLong_value); \
+ NS_IMETHOD GetUlong_value(PRUint32 *aUlong_value); \
+ NS_IMETHOD SetUlong_value(PRUint32 aUlong_value); \
+ NS_IMETHOD GetLong_long_value(PRInt64 *aLong_long_value); \
+ NS_IMETHOD SetLong_long_value(PRInt64 aLong_long_value); \
+ NS_IMETHOD GetUlong_long_value(PRUint64 *aUlong_long_value); \
+ NS_IMETHOD SetUlong_long_value(PRUint64 aUlong_long_value); \
+ NS_IMETHOD GetFloat_value(float *aFloat_value); \
+ NS_IMETHOD SetFloat_value(float aFloat_value); \
+ NS_IMETHOD GetDouble_value(double *aDouble_value); \
+ NS_IMETHOD SetDouble_value(double aDouble_value); \
+ NS_IMETHOD GetChar_value(char *aChar_value); \
+ NS_IMETHOD SetChar_value(char aChar_value); \
+ NS_IMETHOD GetWchar_value(PRUnichar *aWchar_value); \
+ NS_IMETHOD SetWchar_value(PRUnichar aWchar_value); \
+ NS_IMETHOD GetString_value(char * *aString_value); \
+ NS_IMETHOD SetString_value(const char * aString_value); \
+ NS_IMETHOD GetWstring_value(PRUnichar * *aWstring_value); \
+ NS_IMETHOD SetWstring_value(const PRUnichar * aWstring_value); \
+ NS_IMETHOD GetAstring_value(nsAString & aAstring_value); \
+ NS_IMETHOD SetAstring_value(const nsAString & aAstring_value); \
+ NS_IMETHOD GetAcstring_value(nsACString & aAcstring_value); \
+ NS_IMETHOD SetAcstring_value(const nsACString & aAcstring_value); \
+ NS_IMETHOD GetUtf8string_value(nsACString & aUtf8string_value); \
+ NS_IMETHOD SetUtf8string_value(const nsACString & aUtf8string_value); \
+ NS_IMETHOD GetIid_value(nsIID & *aIid_value); \
+ NS_IMETHOD SetIid_value(const nsIID & aIid_value); \
+ NS_IMETHOD GetInterface_value(nsIPythonTestInterface * *aInterface_value); \
+ NS_IMETHOD SetInterface_value(nsIPythonTestInterface * aInterface_value); \
+ NS_IMETHOD GetIsupports_value(nsISupports * *aIsupports_value); \
+ NS_IMETHOD SetIsupports_value(nsISupports * aIsupports_value); \
+ NS_IMETHOD Do_boolean(PRBool p1, PRBool *p2, PRBool *p3, PRBool *_retval); \
+ NS_IMETHOD Do_octet(PRUint8 p1, PRUint8 *p2, PRUint8 *p3, PRUint8 *_retval); \
+ NS_IMETHOD Do_short(PRInt16 p1, PRInt16 *p2, PRInt16 *p3, PRInt16 *_retval); \
+ NS_IMETHOD Do_unsigned_short(PRUint16 p1, PRUint16 *p2, PRUint16 *p3, PRUint16 *_retval); \
+ NS_IMETHOD Do_long(PRInt32 p1, PRInt32 *p2, PRInt32 *p3, PRInt32 *_retval); \
+ NS_IMETHOD Do_unsigned_long(PRUint32 p1, PRUint32 *p2, PRUint32 *p3, PRUint32 *_retval); \
+ NS_IMETHOD Do_long_long(PRInt64 p1, PRInt64 *p2, PRInt64 *p3, PRInt64 *_retval); \
+ NS_IMETHOD Do_unsigned_long_long(PRUint64 p1, PRUint64 *p2, PRUint64 *p3, PRUint64 *_retval); \
+ NS_IMETHOD Do_float(float p1, float *p2, float *p3, float *_retval); \
+ NS_IMETHOD Do_double(double p1, double *p2, double *p3, double *_retval); \
+ NS_IMETHOD Do_char(char p1, char *p2, char *p3, char *_retval); \
+ NS_IMETHOD Do_wchar(PRUnichar p1, PRUnichar *p2, PRUnichar *p3, PRUnichar *_retval); \
+ NS_IMETHOD Do_string(const char *p1, char **p2, char **p3, char **_retval); \
+ NS_IMETHOD Do_wstring(const PRUnichar *p1, PRUnichar **p2, PRUnichar **p3, PRUnichar **_retval); \
+ NS_IMETHOD Do_nsIIDRef(const nsIID & p1, nsIID & *p2, nsIID & *p3, nsIID & *_retval); \
+ NS_IMETHOD Do_nsIPythonTestInterface(nsIPythonTestInterface *p1, nsIPythonTestInterface **p2, nsIPythonTestInterface **p3, nsIPythonTestInterface **_retval); \
+ NS_IMETHOD Do_nsISupports(nsISupports *p1, nsISupports **p2, nsISupports **p3, nsISupports **_retval); \
+ NS_IMETHOD Do_nsISupportsIs(const nsIID & iid, void * *result);
+
+/* Use this macro to declare functions that forward the behavior of this interface to another object. */
+#define NS_FORWARD_NSIPYTHONTESTINTERFACE(_to) \
+ NS_IMETHOD GetBoolean_value(PRBool *aBoolean_value) { return _to GetBoolean_value(aBoolean_value); } \
+ NS_IMETHOD SetBoolean_value(PRBool aBoolean_value) { return _to SetBoolean_value(aBoolean_value); } \
+ NS_IMETHOD GetOctet_value(PRUint8 *aOctet_value) { return _to GetOctet_value(aOctet_value); } \
+ NS_IMETHOD SetOctet_value(PRUint8 aOctet_value) { return _to SetOctet_value(aOctet_value); } \
+ NS_IMETHOD GetShort_value(PRInt16 *aShort_value) { return _to GetShort_value(aShort_value); } \
+ NS_IMETHOD SetShort_value(PRInt16 aShort_value) { return _to SetShort_value(aShort_value); } \
+ NS_IMETHOD GetUshort_value(PRUint16 *aUshort_value) { return _to GetUshort_value(aUshort_value); } \
+ NS_IMETHOD SetUshort_value(PRUint16 aUshort_value) { return _to SetUshort_value(aUshort_value); } \
+ NS_IMETHOD GetLong_value(PRInt32 *aLong_value) { return _to GetLong_value(aLong_value); } \
+ NS_IMETHOD SetLong_value(PRInt32 aLong_value) { return _to SetLong_value(aLong_value); } \
+ NS_IMETHOD GetUlong_value(PRUint32 *aUlong_value) { return _to GetUlong_value(aUlong_value); } \
+ NS_IMETHOD SetUlong_value(PRUint32 aUlong_value) { return _to SetUlong_value(aUlong_value); } \
+ NS_IMETHOD GetLong_long_value(PRInt64 *aLong_long_value) { return _to GetLong_long_value(aLong_long_value); } \
+ NS_IMETHOD SetLong_long_value(PRInt64 aLong_long_value) { return _to SetLong_long_value(aLong_long_value); } \
+ NS_IMETHOD GetUlong_long_value(PRUint64 *aUlong_long_value) { return _to GetUlong_long_value(aUlong_long_value); } \
+ NS_IMETHOD SetUlong_long_value(PRUint64 aUlong_long_value) { return _to SetUlong_long_value(aUlong_long_value); } \
+ NS_IMETHOD GetFloat_value(float *aFloat_value) { return _to GetFloat_value(aFloat_value); } \
+ NS_IMETHOD SetFloat_value(float aFloat_value) { return _to SetFloat_value(aFloat_value); } \
+ NS_IMETHOD GetDouble_value(double *aDouble_value) { return _to GetDouble_value(aDouble_value); } \
+ NS_IMETHOD SetDouble_value(double aDouble_value) { return _to SetDouble_value(aDouble_value); } \
+ NS_IMETHOD GetChar_value(char *aChar_value) { return _to GetChar_value(aChar_value); } \
+ NS_IMETHOD SetChar_value(char aChar_value) { return _to SetChar_value(aChar_value); } \
+ NS_IMETHOD GetWchar_value(PRUnichar *aWchar_value) { return _to GetWchar_value(aWchar_value); } \
+ NS_IMETHOD SetWchar_value(PRUnichar aWchar_value) { return _to SetWchar_value(aWchar_value); } \
+ NS_IMETHOD GetString_value(char * *aString_value) { return _to GetString_value(aString_value); } \
+ NS_IMETHOD SetString_value(const char * aString_value) { return _to SetString_value(aString_value); } \
+ NS_IMETHOD GetWstring_value(PRUnichar * *aWstring_value) { return _to GetWstring_value(aWstring_value); } \
+ NS_IMETHOD SetWstring_value(const PRUnichar * aWstring_value) { return _to SetWstring_value(aWstring_value); } \
+ NS_IMETHOD GetAstring_value(nsAString & aAstring_value) { return _to GetAstring_value(aAstring_value); } \
+ NS_IMETHOD SetAstring_value(const nsAString & aAstring_value) { return _to SetAstring_value(aAstring_value); } \
+ NS_IMETHOD GetAcstring_value(nsACString & aAcstring_value) { return _to GetAcstring_value(aAcstring_value); } \
+ NS_IMETHOD SetAcstring_value(const nsACString & aAcstring_value) { return _to SetAcstring_value(aAcstring_value); } \
+ NS_IMETHOD GetUtf8string_value(nsACString & aUtf8string_value) { return _to GetUtf8string_value(aUtf8string_value); } \
+ NS_IMETHOD SetUtf8string_value(const nsACString & aUtf8string_value) { return _to SetUtf8string_value(aUtf8string_value); } \
+ NS_IMETHOD GetIid_value(nsIID & *aIid_value) { return _to GetIid_value(aIid_value); } \
+ NS_IMETHOD SetIid_value(const nsIID & aIid_value) { return _to SetIid_value(aIid_value); } \
+ NS_IMETHOD GetInterface_value(nsIPythonTestInterface * *aInterface_value) { return _to GetInterface_value(aInterface_value); } \
+ NS_IMETHOD SetInterface_value(nsIPythonTestInterface * aInterface_value) { return _to SetInterface_value(aInterface_value); } \
+ NS_IMETHOD GetIsupports_value(nsISupports * *aIsupports_value) { return _to GetIsupports_value(aIsupports_value); } \
+ NS_IMETHOD SetIsupports_value(nsISupports * aIsupports_value) { return _to SetIsupports_value(aIsupports_value); } \
+ NS_IMETHOD Do_boolean(PRBool p1, PRBool *p2, PRBool *p3, PRBool *_retval) { return _to Do_boolean(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_octet(PRUint8 p1, PRUint8 *p2, PRUint8 *p3, PRUint8 *_retval) { return _to Do_octet(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_short(PRInt16 p1, PRInt16 *p2, PRInt16 *p3, PRInt16 *_retval) { return _to Do_short(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_unsigned_short(PRUint16 p1, PRUint16 *p2, PRUint16 *p3, PRUint16 *_retval) { return _to Do_unsigned_short(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_long(PRInt32 p1, PRInt32 *p2, PRInt32 *p3, PRInt32 *_retval) { return _to Do_long(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_unsigned_long(PRUint32 p1, PRUint32 *p2, PRUint32 *p3, PRUint32 *_retval) { return _to Do_unsigned_long(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_long_long(PRInt64 p1, PRInt64 *p2, PRInt64 *p3, PRInt64 *_retval) { return _to Do_long_long(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_unsigned_long_long(PRUint64 p1, PRUint64 *p2, PRUint64 *p3, PRUint64 *_retval) { return _to Do_unsigned_long_long(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_float(float p1, float *p2, float *p3, float *_retval) { return _to Do_float(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_double(double p1, double *p2, double *p3, double *_retval) { return _to Do_double(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_char(char p1, char *p2, char *p3, char *_retval) { return _to Do_char(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_wchar(PRUnichar p1, PRUnichar *p2, PRUnichar *p3, PRUnichar *_retval) { return _to Do_wchar(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_string(const char *p1, char **p2, char **p3, char **_retval) { return _to Do_string(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_wstring(const PRUnichar *p1, PRUnichar **p2, PRUnichar **p3, PRUnichar **_retval) { return _to Do_wstring(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_nsIIDRef(const nsIID & p1, nsIID & *p2, nsIID & *p3, nsIID & *_retval) { return _to Do_nsIIDRef(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_nsIPythonTestInterface(nsIPythonTestInterface *p1, nsIPythonTestInterface **p2, nsIPythonTestInterface **p3, nsIPythonTestInterface **_retval) { return _to Do_nsIPythonTestInterface(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_nsISupports(nsISupports *p1, nsISupports **p2, nsISupports **p3, nsISupports **_retval) { return _to Do_nsISupports(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_nsISupportsIs(const nsIID & iid, void * *result) { return _to Do_nsISupportsIs(iid, result); }
+
+/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
+#define NS_FORWARD_SAFE_NSIPYTHONTESTINTERFACE(_to) \
+ NS_IMETHOD GetBoolean_value(PRBool *aBoolean_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBoolean_value(aBoolean_value); } \
+ NS_IMETHOD SetBoolean_value(PRBool aBoolean_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBoolean_value(aBoolean_value); } \
+ NS_IMETHOD GetOctet_value(PRUint8 *aOctet_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOctet_value(aOctet_value); } \
+ NS_IMETHOD SetOctet_value(PRUint8 aOctet_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetOctet_value(aOctet_value); } \
+ NS_IMETHOD GetShort_value(PRInt16 *aShort_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetShort_value(aShort_value); } \
+ NS_IMETHOD SetShort_value(PRInt16 aShort_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetShort_value(aShort_value); } \
+ NS_IMETHOD GetUshort_value(PRUint16 *aUshort_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUshort_value(aUshort_value); } \
+ NS_IMETHOD SetUshort_value(PRUint16 aUshort_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUshort_value(aUshort_value); } \
+ NS_IMETHOD GetLong_value(PRInt32 *aLong_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLong_value(aLong_value); } \
+ NS_IMETHOD SetLong_value(PRInt32 aLong_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLong_value(aLong_value); } \
+ NS_IMETHOD GetUlong_value(PRUint32 *aUlong_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUlong_value(aUlong_value); } \
+ NS_IMETHOD SetUlong_value(PRUint32 aUlong_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUlong_value(aUlong_value); } \
+ NS_IMETHOD GetLong_long_value(PRInt64 *aLong_long_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLong_long_value(aLong_long_value); } \
+ NS_IMETHOD SetLong_long_value(PRInt64 aLong_long_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLong_long_value(aLong_long_value); } \
+ NS_IMETHOD GetUlong_long_value(PRUint64 *aUlong_long_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUlong_long_value(aUlong_long_value); } \
+ NS_IMETHOD SetUlong_long_value(PRUint64 aUlong_long_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUlong_long_value(aUlong_long_value); } \
+ NS_IMETHOD GetFloat_value(float *aFloat_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFloat_value(aFloat_value); } \
+ NS_IMETHOD SetFloat_value(float aFloat_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFloat_value(aFloat_value); } \
+ NS_IMETHOD GetDouble_value(double *aDouble_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDouble_value(aDouble_value); } \
+ NS_IMETHOD SetDouble_value(double aDouble_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDouble_value(aDouble_value); } \
+ NS_IMETHOD GetChar_value(char *aChar_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChar_value(aChar_value); } \
+ NS_IMETHOD SetChar_value(char aChar_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChar_value(aChar_value); } \
+ NS_IMETHOD GetWchar_value(PRUnichar *aWchar_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWchar_value(aWchar_value); } \
+ NS_IMETHOD SetWchar_value(PRUnichar aWchar_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWchar_value(aWchar_value); } \
+ NS_IMETHOD GetString_value(char * *aString_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetString_value(aString_value); } \
+ NS_IMETHOD SetString_value(const char * aString_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetString_value(aString_value); } \
+ NS_IMETHOD GetWstring_value(PRUnichar * *aWstring_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWstring_value(aWstring_value); } \
+ NS_IMETHOD SetWstring_value(const PRUnichar * aWstring_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWstring_value(aWstring_value); } \
+ NS_IMETHOD GetAstring_value(nsAString & aAstring_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAstring_value(aAstring_value); } \
+ NS_IMETHOD SetAstring_value(const nsAString & aAstring_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAstring_value(aAstring_value); } \
+ NS_IMETHOD GetAcstring_value(nsACString & aAcstring_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAcstring_value(aAcstring_value); } \
+ NS_IMETHOD SetAcstring_value(const nsACString & aAcstring_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAcstring_value(aAcstring_value); } \
+ NS_IMETHOD GetUtf8string_value(nsACString & aUtf8string_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUtf8string_value(aUtf8string_value); } \
+ NS_IMETHOD SetUtf8string_value(const nsACString & aUtf8string_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUtf8string_value(aUtf8string_value); } \
+ NS_IMETHOD GetIid_value(nsIID & *aIid_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIid_value(aIid_value); } \
+ NS_IMETHOD SetIid_value(const nsIID & aIid_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIid_value(aIid_value); } \
+ NS_IMETHOD GetInterface_value(nsIPythonTestInterface * *aInterface_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInterface_value(aInterface_value); } \
+ NS_IMETHOD SetInterface_value(nsIPythonTestInterface * aInterface_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetInterface_value(aInterface_value); } \
+ NS_IMETHOD GetIsupports_value(nsISupports * *aIsupports_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsupports_value(aIsupports_value); } \
+ NS_IMETHOD SetIsupports_value(nsISupports * aIsupports_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIsupports_value(aIsupports_value); } \
+ NS_IMETHOD Do_boolean(PRBool p1, PRBool *p2, PRBool *p3, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Do_boolean(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_octet(PRUint8 p1, PRUint8 *p2, PRUint8 *p3, PRUint8 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Do_octet(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_short(PRInt16 p1, PRInt16 *p2, PRInt16 *p3, PRInt16 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Do_short(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_unsigned_short(PRUint16 p1, PRUint16 *p2, PRUint16 *p3, PRUint16 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Do_unsigned_short(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_long(PRInt32 p1, PRInt32 *p2, PRInt32 *p3, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Do_long(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_unsigned_long(PRUint32 p1, PRUint32 *p2, PRUint32 *p3, PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Do_unsigned_long(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_long_long(PRInt64 p1, PRInt64 *p2, PRInt64 *p3, PRInt64 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Do_long_long(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_unsigned_long_long(PRUint64 p1, PRUint64 *p2, PRUint64 *p3, PRUint64 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Do_unsigned_long_long(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_float(float p1, float *p2, float *p3, float *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Do_float(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_double(double p1, double *p2, double *p3, double *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Do_double(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_char(char p1, char *p2, char *p3, char *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Do_char(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_wchar(PRUnichar p1, PRUnichar *p2, PRUnichar *p3, PRUnichar *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Do_wchar(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_string(const char *p1, char **p2, char **p3, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Do_string(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_wstring(const PRUnichar *p1, PRUnichar **p2, PRUnichar **p3, PRUnichar **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Do_wstring(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_nsIIDRef(const nsIID & p1, nsIID & *p2, nsIID & *p3, nsIID & *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Do_nsIIDRef(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_nsIPythonTestInterface(nsIPythonTestInterface *p1, nsIPythonTestInterface **p2, nsIPythonTestInterface **p3, nsIPythonTestInterface **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Do_nsIPythonTestInterface(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_nsISupports(nsISupports *p1, nsISupports **p2, nsISupports **p3, nsISupports **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Do_nsISupports(p1, p2, p3, _retval); } \
+ NS_IMETHOD Do_nsISupportsIs(const nsIID & iid, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->Do_nsISupportsIs(iid, result); }
+
+#if 0
+/* Use the code below as a template for the implementation class for this interface. */
+
+/* Header file */
+class nsPythonTestInterface : public nsIPythonTestInterface
+{
+public:
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSIPYTHONTESTINTERFACE
+
+ nsPythonTestInterface();
+
+private:
+ ~nsPythonTestInterface();
+
+protected:
+ /* additional members */
+};
+
+/* Implementation file */
+NS_IMPL_ISUPPORTS1(nsPythonTestInterface, nsIPythonTestInterface)
+
+nsPythonTestInterface::nsPythonTestInterface()
+{
+ /* member initializers and constructor code */
+}
+
+nsPythonTestInterface::~nsPythonTestInterface()
+{
+ /* destructor code */
+}
+
+/* attribute boolean boolean_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetBoolean_value(PRBool *aBoolean_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetBoolean_value(PRBool aBoolean_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute octet octet_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetOctet_value(PRUint8 *aOctet_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetOctet_value(PRUint8 aOctet_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute short short_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetShort_value(PRInt16 *aShort_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetShort_value(PRInt16 aShort_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute unsigned short ushort_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetUshort_value(PRUint16 *aUshort_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetUshort_value(PRUint16 aUshort_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute long long_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetLong_value(PRInt32 *aLong_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetLong_value(PRInt32 aLong_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute unsigned long ulong_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetUlong_value(PRUint32 *aUlong_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetUlong_value(PRUint32 aUlong_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute long long long_long_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetLong_long_value(PRInt64 *aLong_long_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetLong_long_value(PRInt64 aLong_long_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute unsigned long long ulong_long_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetUlong_long_value(PRUint64 *aUlong_long_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetUlong_long_value(PRUint64 aUlong_long_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute float float_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetFloat_value(float *aFloat_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetFloat_value(float aFloat_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute double double_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetDouble_value(double *aDouble_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetDouble_value(double aDouble_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute char char_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetChar_value(char *aChar_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetChar_value(char aChar_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute wchar wchar_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetWchar_value(PRUnichar *aWchar_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetWchar_value(PRUnichar aWchar_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute string string_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetString_value(char * *aString_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetString_value(const char * aString_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute wstring wstring_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetWstring_value(PRUnichar * *aWstring_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetWstring_value(const PRUnichar * aWstring_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute AString astring_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetAstring_value(nsAString & aAstring_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetAstring_value(const nsAString & aAstring_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute ACString acstring_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetAcstring_value(nsACString & aAcstring_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetAcstring_value(const nsACString & aAcstring_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute AUTF8String utf8string_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetUtf8string_value(nsACString & aUtf8string_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetUtf8string_value(const nsACString & aUtf8string_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute nsIIDRef iid_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetIid_value(nsIID & *aIid_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetIid_value(const nsIID & aIid_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute nsIPythonTestInterface interface_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetInterface_value(nsIPythonTestInterface * *aInterface_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetInterface_value(nsIPythonTestInterface * aInterface_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute nsISupports isupports_value; */
+NS_IMETHODIMP nsPythonTestInterface::GetIsupports_value(nsISupports * *aIsupports_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterface::SetIsupports_value(nsISupports * aIsupports_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* boolean do_boolean (in boolean p1, inout boolean p2, out boolean p3); */
+NS_IMETHODIMP nsPythonTestInterface::Do_boolean(PRBool p1, PRBool *p2, PRBool *p3, PRBool *_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* octet do_octet (in octet p1, inout octet p2, out octet p3); */
+NS_IMETHODIMP nsPythonTestInterface::Do_octet(PRUint8 p1, PRUint8 *p2, PRUint8 *p3, PRUint8 *_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* short do_short (in short p1, inout short p2, out short p3); */
+NS_IMETHODIMP nsPythonTestInterface::Do_short(PRInt16 p1, PRInt16 *p2, PRInt16 *p3, PRInt16 *_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* unsigned short do_unsigned_short (in unsigned short p1, inout unsigned short p2, out unsigned short p3); */
+NS_IMETHODIMP nsPythonTestInterface::Do_unsigned_short(PRUint16 p1, PRUint16 *p2, PRUint16 *p3, PRUint16 *_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* long do_long (in long p1, inout long p2, out long p3); */
+NS_IMETHODIMP nsPythonTestInterface::Do_long(PRInt32 p1, PRInt32 *p2, PRInt32 *p3, PRInt32 *_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* unsigned long do_unsigned_long (in unsigned long p1, inout unsigned long p2, out unsigned long p3); */
+NS_IMETHODIMP nsPythonTestInterface::Do_unsigned_long(PRUint32 p1, PRUint32 *p2, PRUint32 *p3, PRUint32 *_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* long long do_long_long (in long long p1, inout long long p2, out long long p3); */
+NS_IMETHODIMP nsPythonTestInterface::Do_long_long(PRInt64 p1, PRInt64 *p2, PRInt64 *p3, PRInt64 *_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* unsigned long long do_unsigned_long_long (in unsigned long long p1, inout unsigned long long p2, out unsigned long long p3); */
+NS_IMETHODIMP nsPythonTestInterface::Do_unsigned_long_long(PRUint64 p1, PRUint64 *p2, PRUint64 *p3, PRUint64 *_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* float do_float (in float p1, inout float p2, out float p3); */
+NS_IMETHODIMP nsPythonTestInterface::Do_float(float p1, float *p2, float *p3, float *_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* double do_double (in double p1, inout double p2, out double p3); */
+NS_IMETHODIMP nsPythonTestInterface::Do_double(double p1, double *p2, double *p3, double *_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* char do_char (in char p1, inout char p2, out char p3); */
+NS_IMETHODIMP nsPythonTestInterface::Do_char(char p1, char *p2, char *p3, char *_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* wchar do_wchar (in wchar p1, inout wchar p2, out wchar p3); */
+NS_IMETHODIMP nsPythonTestInterface::Do_wchar(PRUnichar p1, PRUnichar *p2, PRUnichar *p3, PRUnichar *_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* string do_string (in string p1, inout string p2, out string p3); */
+NS_IMETHODIMP nsPythonTestInterface::Do_string(const char *p1, char **p2, char **p3, char **_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* wstring do_wstring (in wstring p1, inout wstring p2, out wstring p3); */
+NS_IMETHODIMP nsPythonTestInterface::Do_wstring(const PRUnichar *p1, PRUnichar **p2, PRUnichar **p3, PRUnichar **_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* nsIIDRef do_nsIIDRef (in nsIIDRef p1, inout nsIIDRef p2, out nsIIDRef p3); */
+NS_IMETHODIMP nsPythonTestInterface::Do_nsIIDRef(const nsIID & p1, nsIID & *p2, nsIID & *p3, nsIID & *_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* nsIPythonTestInterface do_nsIPythonTestInterface (in nsIPythonTestInterface p1, inout nsIPythonTestInterface p2, out nsIPythonTestInterface p3); */
+NS_IMETHODIMP nsPythonTestInterface::Do_nsIPythonTestInterface(nsIPythonTestInterface *p1, nsIPythonTestInterface **p2, nsIPythonTestInterface **p3, nsIPythonTestInterface **_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* nsISupports do_nsISupports (in nsISupports p1, inout nsISupports p2, out nsISupports p3); */
+NS_IMETHODIMP nsPythonTestInterface::Do_nsISupports(nsISupports *p1, nsISupports **p2, nsISupports **p3, nsISupports **_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void do_nsISupportsIs (in nsIIDRef iid, [iid_is (iid), retval] out nsQIResult result); */
+NS_IMETHODIMP nsPythonTestInterface::Do_nsISupportsIs(const nsIID & iid, void * *result)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* End of implementation class template. */
+#endif
+
+
+/* starting interface: nsIPythonTestInterfaceExtra */
+#define NS_IPYTHONTESTINTERFACEEXTRA_IID_STR "b38d1538-fe92-42c3-831f-285242edeea4"
+
+#define NS_IPYTHONTESTINTERFACEEXTRA_IID \
+ {0xb38d1538, 0xfe92, 0x42c3, \
+ { 0x83, 0x1f, 0x28, 0x52, 0x42, 0xed, 0xee, 0xa4 }}
+
+class NS_NO_VTABLE nsIPythonTestInterfaceExtra : public nsIPythonTestInterface {
+ public:
+
+ NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPYTHONTESTINTERFACEEXTRA_IID)
+
+ /* void MultiplyEachItemInIntegerArray (in PRInt32 val, in PRUint32 count, [array, size_is (count)] inout PRInt32 valueArray); */
+ NS_IMETHOD MultiplyEachItemInIntegerArray(PRInt32 val, PRUint32 count, PRInt32 **valueArray) = 0;
+
+ /* void MultiplyEachItemInIntegerArrayAndAppend (in PRInt32 val, inout PRUint32 count, [array, size_is (count)] inout PRInt32 valueArray); */
+ NS_IMETHOD MultiplyEachItemInIntegerArrayAndAppend(PRInt32 val, PRUint32 *count, PRInt32 **valueArray) = 0;
+
+ /* void CompareStringArrays ([array, size_is (count)] in string arr1, [array, size_is (count)] in string arr2, in unsigned long count, [retval] out short result); */
+ NS_IMETHOD CompareStringArrays(const char **arr1, const char **arr2, PRUint32 count, PRInt16 *result) = 0;
+
+ /* void DoubleStringArray (inout PRUint32 count, [array, size_is (count)] inout string valueArray); */
+ NS_IMETHOD DoubleStringArray(PRUint32 *count, char ***valueArray) = 0;
+
+ /* void ReverseStringArray (in PRUint32 count, [array, size_is (count)] inout string valueArray); */
+ NS_IMETHOD ReverseStringArray(PRUint32 count, char ***valueArray) = 0;
+
+ /* void DoubleString (inout PRUint32 count, [size_is (count)] inout string str); */
+ NS_IMETHOD DoubleString(PRUint32 *count, char **str) = 0;
+
+ /* void DoubleString2 (in PRUint32 in_count, [size_is (in_count)] in string in_str, out PRUint32 out_count, [size_is (out_count)] out string out_str); */
+ NS_IMETHOD DoubleString2(PRUint32 in_count, const char *in_str, PRUint32 *out_count, char **out_str) = 0;
+
+ /* void DoubleString3 (in PRUint32 in_count, [size_is (in_count)] in string in_str, out PRUint32 out_count, [size_is (out_count), retval] out string out_str); */
+ NS_IMETHOD DoubleString3(PRUint32 in_count, const char *in_str, PRUint32 *out_count, char **out_str) = 0;
+
+ /* void DoubleString4 ([size_is (count)] in string in_str, inout PRUint32 count, [size_is (count)] out string out_str); */
+ NS_IMETHOD DoubleString4(const char *in_str, PRUint32 *count, char **out_str) = 0;
+
+ /* void UpString (in PRUint32 count, [size_is (count)] inout string str); */
+ NS_IMETHOD UpString(PRUint32 count, char **str) = 0;
+
+ /* void UpString2 (in PRUint32 count, [size_is (count)] in string in_str, [size_is (count)] out string out_str); */
+ NS_IMETHOD UpString2(PRUint32 count, const char *in_str, char **out_str) = 0;
+
+ /* void CopyUTF8String (in AUTF8String in_str, out AUTF8String out_str); */
+ NS_IMETHOD CopyUTF8String(const nsACString & in_str, nsACString & out_str) = 0;
+
+ /* void CopyUTF8String2 (in AUTF8String in_str, out AUTF8String out_str); */
+ NS_IMETHOD CopyUTF8String2(const nsACString & in_str, nsACString & out_str) = 0;
+
+ /* void GetFixedString (in PRUint32 count, [size_is (count)] out string out_str); */
+ NS_IMETHOD GetFixedString(PRUint32 count, char **out_str) = 0;
+
+ /* void DoubleWideString (inout PRUint32 count, [size_is (count)] inout wstring str); */
+ NS_IMETHOD DoubleWideString(PRUint32 *count, PRUnichar **str) = 0;
+
+ /* void DoubleWideString2 (in PRUint32 in_count, [size_is (in_count)] in wstring in_str, out PRUint32 out_count, [size_is (out_count)] out wstring out_str); */
+ NS_IMETHOD DoubleWideString2(PRUint32 in_count, const PRUnichar *in_str, PRUint32 *out_count, PRUnichar **out_str) = 0;
+
+ /* void DoubleWideString3 (in PRUint32 in_count, [size_is (in_count)] in wstring in_str, out PRUint32 out_count, [size_is (out_count), retval] out wstring out_str); */
+ NS_IMETHOD DoubleWideString3(PRUint32 in_count, const PRUnichar *in_str, PRUint32 *out_count, PRUnichar **out_str) = 0;
+
+ /* void DoubleWideString4 ([size_is (count)] in wstring in_str, inout PRUint32 count, [size_is (count)] out wstring out_str); */
+ NS_IMETHOD DoubleWideString4(const PRUnichar *in_str, PRUint32 *count, PRUnichar **out_str) = 0;
+
+ /* void UpWideString (in PRUint32 count, [size_is (count)] inout wstring str); */
+ NS_IMETHOD UpWideString(PRUint32 count, PRUnichar **str) = 0;
+
+ /* void UpWideString2 (in PRUint32 count, [size_is (count)] in wstring in_str, [size_is (count)] out wstring out_str); */
+ NS_IMETHOD UpWideString2(PRUint32 count, const PRUnichar *in_str, PRUnichar **out_str) = 0;
+
+ /* void GetFixedWideString (in PRUint32 count, [size_is (count)] out string out_str); */
+ NS_IMETHOD GetFixedWideString(PRUint32 count, char **out_str) = 0;
+
+ /* void GetStrings (out PRUint32 count, [array, size_is (count), retval] out string str); */
+ NS_IMETHOD GetStrings(PRUint32 *count, char ***str) = 0;
+
+ /* void UpOctetArray (inout PRUint32 count, [array, size_is (count)] inout PRUint8 data); */
+ NS_IMETHOD UpOctetArray(PRUint32 *count, PRUint8 **data) = 0;
+
+ /* void UpOctetArray2 (inout PRUint32 count, [array, size_is (count)] inout PRUint8 data); */
+ NS_IMETHOD UpOctetArray2(PRUint32 *count, PRUint8 **data) = 0;
+
+ /* void CheckInterfaceArray (in PRUint32 count, [array, size_is (count)] in nsISupports data, [retval] out PRBool all_non_null); */
+ NS_IMETHOD CheckInterfaceArray(PRUint32 count, nsISupports **data, PRBool *all_non_null) = 0;
+
+ /* void CopyInterfaceArray (in PRUint32 count, [array, size_is (count)] in nsISupports data, [array, size_is (out_count)] out nsISupports out_data, out PRUint32 out_count); */
+ NS_IMETHOD CopyInterfaceArray(PRUint32 count, nsISupports **data, nsISupports ***out_data, PRUint32 *out_count) = 0;
+
+ /* void GetInterfaceArray (out PRUint32 count, [array, size_is (count)] out nsISupports data); */
+ NS_IMETHOD GetInterfaceArray(PRUint32 *count, nsISupports ***data) = 0;
+
+ /* void ExtendInterfaceArray (inout PRUint32 count, [array, size_is (count)] inout nsISupports data); */
+ NS_IMETHOD ExtendInterfaceArray(PRUint32 *count, nsISupports ***data) = 0;
+
+ /* void CheckIIDArray (in PRUint32 count, [array, size_is (count)] in nsIIDRef data, [retval] out PRBool all_mine); */
+ NS_IMETHOD CheckIIDArray(PRUint32 count, const nsIID & *data, PRBool *all_mine) = 0;
+
+ /* void GetIIDArray (out PRUint32 count, [array, size_is (count)] out nsIIDRef data); */
+ NS_IMETHOD GetIIDArray(PRUint32 *count, nsIID & **data) = 0;
+
+ /* void ExtendIIDArray (inout PRUint32 count, [array, size_is (count)] inout nsIIDRef data); */
+ NS_IMETHOD ExtendIIDArray(PRUint32 *count, nsIID & **data) = 0;
+
+ /* void SumArrays (in PRUint32 count, [array, size_is (count)] in PRInt32 array1, [array, size_is (count)] in PRInt32 array2, [retval] out PRInt32 result); */
+ NS_IMETHOD SumArrays(PRUint32 count, PRInt32 *array1, PRInt32 *array2, PRInt32 *result) = 0;
+
+ /* void GetArrays (out PRUint32 count, [array, size_is (count)] out PRInt32 array1, [array, size_is (count)] out PRInt32 array2); */
+ NS_IMETHOD GetArrays(PRUint32 *count, PRInt32 **array1, PRInt32 **array2) = 0;
+
+ /* void GetFixedArray (in PRUint32 count, [array, size_is (count)] out PRInt32 array1); */
+ NS_IMETHOD GetFixedArray(PRUint32 count, PRInt32 **array1) = 0;
+
+ /* void CopyArray (in PRUint32 count, [array, size_is (count)] in PRInt32 array1, [array, size_is (count)] out PRInt32 array2); */
+ NS_IMETHOD CopyArray(PRUint32 count, PRInt32 *array1, PRInt32 **array2) = 0;
+
+ /* void CopyAndDoubleArray (inout PRUint32 count, [array, size_is (count)] in PRInt32 array1, [array, size_is (count)] out PRInt32 array2); */
+ NS_IMETHOD CopyAndDoubleArray(PRUint32 *count, PRInt32 *array1, PRInt32 **array2) = 0;
+
+ /* void AppendArray (inout PRUint32 count, [array, size_is (count)] in PRInt32 array1, [array, size_is (count)] inout PRInt32 array2); */
+ NS_IMETHOD AppendArray(PRUint32 *count, PRInt32 *array1, PRInt32 **array2) = 0;
+
+ /* void AppendVariant (in nsIVariant variant, inout nsIVariant result); */
+ NS_IMETHOD AppendVariant(nsIVariant *variant, nsIVariant **result) = 0;
+
+ /* nsIVariant CopyVariant (in nsIVariant variant); */
+ NS_IMETHOD CopyVariant(nsIVariant *variant, nsIVariant **_retval) = 0;
+
+ /* nsIVariant SumVariants (in PRUint32 incount, [array, size_is (incount)] in nsIVariant variants); */
+ NS_IMETHOD SumVariants(PRUint32 incount, nsIVariant **variants, nsIVariant **_retval) = 0;
+
+};
+
+/* Use this macro when declaring classes that implement this interface. */
+#define NS_DECL_NSIPYTHONTESTINTERFACEEXTRA \
+ NS_IMETHOD MultiplyEachItemInIntegerArray(PRInt32 val, PRUint32 count, PRInt32 **valueArray); \
+ NS_IMETHOD MultiplyEachItemInIntegerArrayAndAppend(PRInt32 val, PRUint32 *count, PRInt32 **valueArray); \
+ NS_IMETHOD CompareStringArrays(const char **arr1, const char **arr2, PRUint32 count, PRInt16 *result); \
+ NS_IMETHOD DoubleStringArray(PRUint32 *count, char ***valueArray); \
+ NS_IMETHOD ReverseStringArray(PRUint32 count, char ***valueArray); \
+ NS_IMETHOD DoubleString(PRUint32 *count, char **str); \
+ NS_IMETHOD DoubleString2(PRUint32 in_count, const char *in_str, PRUint32 *out_count, char **out_str); \
+ NS_IMETHOD DoubleString3(PRUint32 in_count, const char *in_str, PRUint32 *out_count, char **out_str); \
+ NS_IMETHOD DoubleString4(const char *in_str, PRUint32 *count, char **out_str); \
+ NS_IMETHOD UpString(PRUint32 count, char **str); \
+ NS_IMETHOD UpString2(PRUint32 count, const char *in_str, char **out_str); \
+ NS_IMETHOD CopyUTF8String(const nsACString & in_str, nsACString & out_str); \
+ NS_IMETHOD CopyUTF8String2(const nsACString & in_str, nsACString & out_str); \
+ NS_IMETHOD GetFixedString(PRUint32 count, char **out_str); \
+ NS_IMETHOD DoubleWideString(PRUint32 *count, PRUnichar **str); \
+ NS_IMETHOD DoubleWideString2(PRUint32 in_count, const PRUnichar *in_str, PRUint32 *out_count, PRUnichar **out_str); \
+ NS_IMETHOD DoubleWideString3(PRUint32 in_count, const PRUnichar *in_str, PRUint32 *out_count, PRUnichar **out_str); \
+ NS_IMETHOD DoubleWideString4(const PRUnichar *in_str, PRUint32 *count, PRUnichar **out_str); \
+ NS_IMETHOD UpWideString(PRUint32 count, PRUnichar **str); \
+ NS_IMETHOD UpWideString2(PRUint32 count, const PRUnichar *in_str, PRUnichar **out_str); \
+ NS_IMETHOD GetFixedWideString(PRUint32 count, char **out_str); \
+ NS_IMETHOD GetStrings(PRUint32 *count, char ***str); \
+ NS_IMETHOD UpOctetArray(PRUint32 *count, PRUint8 **data); \
+ NS_IMETHOD UpOctetArray2(PRUint32 *count, PRUint8 **data); \
+ NS_IMETHOD CheckInterfaceArray(PRUint32 count, nsISupports **data, PRBool *all_non_null); \
+ NS_IMETHOD CopyInterfaceArray(PRUint32 count, nsISupports **data, nsISupports ***out_data, PRUint32 *out_count); \
+ NS_IMETHOD GetInterfaceArray(PRUint32 *count, nsISupports ***data); \
+ NS_IMETHOD ExtendInterfaceArray(PRUint32 *count, nsISupports ***data); \
+ NS_IMETHOD CheckIIDArray(PRUint32 count, const nsIID & *data, PRBool *all_mine); \
+ NS_IMETHOD GetIIDArray(PRUint32 *count, nsIID & **data); \
+ NS_IMETHOD ExtendIIDArray(PRUint32 *count, nsIID & **data); \
+ NS_IMETHOD SumArrays(PRUint32 count, PRInt32 *array1, PRInt32 *array2, PRInt32 *result); \
+ NS_IMETHOD GetArrays(PRUint32 *count, PRInt32 **array1, PRInt32 **array2); \
+ NS_IMETHOD GetFixedArray(PRUint32 count, PRInt32 **array1); \
+ NS_IMETHOD CopyArray(PRUint32 count, PRInt32 *array1, PRInt32 **array2); \
+ NS_IMETHOD CopyAndDoubleArray(PRUint32 *count, PRInt32 *array1, PRInt32 **array2); \
+ NS_IMETHOD AppendArray(PRUint32 *count, PRInt32 *array1, PRInt32 **array2); \
+ NS_IMETHOD AppendVariant(nsIVariant *variant, nsIVariant **result); \
+ NS_IMETHOD CopyVariant(nsIVariant *variant, nsIVariant **_retval); \
+ NS_IMETHOD SumVariants(PRUint32 incount, nsIVariant **variants, nsIVariant **_retval);
+
+/* Use this macro to declare functions that forward the behavior of this interface to another object. */
+#define NS_FORWARD_NSIPYTHONTESTINTERFACEEXTRA(_to) \
+ NS_IMETHOD MultiplyEachItemInIntegerArray(PRInt32 val, PRUint32 count, PRInt32 **valueArray) { return _to MultiplyEachItemInIntegerArray(val, count, valueArray); } \
+ NS_IMETHOD MultiplyEachItemInIntegerArrayAndAppend(PRInt32 val, PRUint32 *count, PRInt32 **valueArray) { return _to MultiplyEachItemInIntegerArrayAndAppend(val, count, valueArray); } \
+ NS_IMETHOD CompareStringArrays(const char **arr1, const char **arr2, PRUint32 count, PRInt16 *result) { return _to CompareStringArrays(arr1, arr2, count, result); } \
+ NS_IMETHOD DoubleStringArray(PRUint32 *count, char ***valueArray) { return _to DoubleStringArray(count, valueArray); } \
+ NS_IMETHOD ReverseStringArray(PRUint32 count, char ***valueArray) { return _to ReverseStringArray(count, valueArray); } \
+ NS_IMETHOD DoubleString(PRUint32 *count, char **str) { return _to DoubleString(count, str); } \
+ NS_IMETHOD DoubleString2(PRUint32 in_count, const char *in_str, PRUint32 *out_count, char **out_str) { return _to DoubleString2(in_count, in_str, out_count, out_str); } \
+ NS_IMETHOD DoubleString3(PRUint32 in_count, const char *in_str, PRUint32 *out_count, char **out_str) { return _to DoubleString3(in_count, in_str, out_count, out_str); } \
+ NS_IMETHOD DoubleString4(const char *in_str, PRUint32 *count, char **out_str) { return _to DoubleString4(in_str, count, out_str); } \
+ NS_IMETHOD UpString(PRUint32 count, char **str) { return _to UpString(count, str); } \
+ NS_IMETHOD UpString2(PRUint32 count, const char *in_str, char **out_str) { return _to UpString2(count, in_str, out_str); } \
+ NS_IMETHOD CopyUTF8String(const nsACString & in_str, nsACString & out_str) { return _to CopyUTF8String(in_str, out_str); } \
+ NS_IMETHOD CopyUTF8String2(const nsACString & in_str, nsACString & out_str) { return _to CopyUTF8String2(in_str, out_str); } \
+ NS_IMETHOD GetFixedString(PRUint32 count, char **out_str) { return _to GetFixedString(count, out_str); } \
+ NS_IMETHOD DoubleWideString(PRUint32 *count, PRUnichar **str) { return _to DoubleWideString(count, str); } \
+ NS_IMETHOD DoubleWideString2(PRUint32 in_count, const PRUnichar *in_str, PRUint32 *out_count, PRUnichar **out_str) { return _to DoubleWideString2(in_count, in_str, out_count, out_str); } \
+ NS_IMETHOD DoubleWideString3(PRUint32 in_count, const PRUnichar *in_str, PRUint32 *out_count, PRUnichar **out_str) { return _to DoubleWideString3(in_count, in_str, out_count, out_str); } \
+ NS_IMETHOD DoubleWideString4(const PRUnichar *in_str, PRUint32 *count, PRUnichar **out_str) { return _to DoubleWideString4(in_str, count, out_str); } \
+ NS_IMETHOD UpWideString(PRUint32 count, PRUnichar **str) { return _to UpWideString(count, str); } \
+ NS_IMETHOD UpWideString2(PRUint32 count, const PRUnichar *in_str, PRUnichar **out_str) { return _to UpWideString2(count, in_str, out_str); } \
+ NS_IMETHOD GetFixedWideString(PRUint32 count, char **out_str) { return _to GetFixedWideString(count, out_str); } \
+ NS_IMETHOD GetStrings(PRUint32 *count, char ***str) { return _to GetStrings(count, str); } \
+ NS_IMETHOD UpOctetArray(PRUint32 *count, PRUint8 **data) { return _to UpOctetArray(count, data); } \
+ NS_IMETHOD UpOctetArray2(PRUint32 *count, PRUint8 **data) { return _to UpOctetArray2(count, data); } \
+ NS_IMETHOD CheckInterfaceArray(PRUint32 count, nsISupports **data, PRBool *all_non_null) { return _to CheckInterfaceArray(count, data, all_non_null); } \
+ NS_IMETHOD CopyInterfaceArray(PRUint32 count, nsISupports **data, nsISupports ***out_data, PRUint32 *out_count) { return _to CopyInterfaceArray(count, data, out_data, out_count); } \
+ NS_IMETHOD GetInterfaceArray(PRUint32 *count, nsISupports ***data) { return _to GetInterfaceArray(count, data); } \
+ NS_IMETHOD ExtendInterfaceArray(PRUint32 *count, nsISupports ***data) { return _to ExtendInterfaceArray(count, data); } \
+ NS_IMETHOD CheckIIDArray(PRUint32 count, const nsIID & *data, PRBool *all_mine) { return _to CheckIIDArray(count, data, all_mine); } \
+ NS_IMETHOD GetIIDArray(PRUint32 *count, nsIID & **data) { return _to GetIIDArray(count, data); } \
+ NS_IMETHOD ExtendIIDArray(PRUint32 *count, nsIID & **data) { return _to ExtendIIDArray(count, data); } \
+ NS_IMETHOD SumArrays(PRUint32 count, PRInt32 *array1, PRInt32 *array2, PRInt32 *result) { return _to SumArrays(count, array1, array2, result); } \
+ NS_IMETHOD GetArrays(PRUint32 *count, PRInt32 **array1, PRInt32 **array2) { return _to GetArrays(count, array1, array2); } \
+ NS_IMETHOD GetFixedArray(PRUint32 count, PRInt32 **array1) { return _to GetFixedArray(count, array1); } \
+ NS_IMETHOD CopyArray(PRUint32 count, PRInt32 *array1, PRInt32 **array2) { return _to CopyArray(count, array1, array2); } \
+ NS_IMETHOD CopyAndDoubleArray(PRUint32 *count, PRInt32 *array1, PRInt32 **array2) { return _to CopyAndDoubleArray(count, array1, array2); } \
+ NS_IMETHOD AppendArray(PRUint32 *count, PRInt32 *array1, PRInt32 **array2) { return _to AppendArray(count, array1, array2); } \
+ NS_IMETHOD AppendVariant(nsIVariant *variant, nsIVariant **result) { return _to AppendVariant(variant, result); } \
+ NS_IMETHOD CopyVariant(nsIVariant *variant, nsIVariant **_retval) { return _to CopyVariant(variant, _retval); } \
+ NS_IMETHOD SumVariants(PRUint32 incount, nsIVariant **variants, nsIVariant **_retval) { return _to SumVariants(incount, variants, _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_NSIPYTHONTESTINTERFACEEXTRA(_to) \
+ NS_IMETHOD MultiplyEachItemInIntegerArray(PRInt32 val, PRUint32 count, PRInt32 **valueArray) { return !_to ? NS_ERROR_NULL_POINTER : _to->MultiplyEachItemInIntegerArray(val, count, valueArray); } \
+ NS_IMETHOD MultiplyEachItemInIntegerArrayAndAppend(PRInt32 val, PRUint32 *count, PRInt32 **valueArray) { return !_to ? NS_ERROR_NULL_POINTER : _to->MultiplyEachItemInIntegerArrayAndAppend(val, count, valueArray); } \
+ NS_IMETHOD CompareStringArrays(const char **arr1, const char **arr2, PRUint32 count, PRInt16 *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->CompareStringArrays(arr1, arr2, count, result); } \
+ NS_IMETHOD DoubleStringArray(PRUint32 *count, char ***valueArray) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoubleStringArray(count, valueArray); } \
+ NS_IMETHOD ReverseStringArray(PRUint32 count, char ***valueArray) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReverseStringArray(count, valueArray); } \
+ NS_IMETHOD DoubleString(PRUint32 *count, char **str) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoubleString(count, str); } \
+ NS_IMETHOD DoubleString2(PRUint32 in_count, const char *in_str, PRUint32 *out_count, char **out_str) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoubleString2(in_count, in_str, out_count, out_str); } \
+ NS_IMETHOD DoubleString3(PRUint32 in_count, const char *in_str, PRUint32 *out_count, char **out_str) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoubleString3(in_count, in_str, out_count, out_str); } \
+ NS_IMETHOD DoubleString4(const char *in_str, PRUint32 *count, char **out_str) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoubleString4(in_str, count, out_str); } \
+ NS_IMETHOD UpString(PRUint32 count, char **str) { return !_to ? NS_ERROR_NULL_POINTER : _to->UpString(count, str); } \
+ NS_IMETHOD UpString2(PRUint32 count, const char *in_str, char **out_str) { return !_to ? NS_ERROR_NULL_POINTER : _to->UpString2(count, in_str, out_str); } \
+ NS_IMETHOD CopyUTF8String(const nsACString & in_str, nsACString & out_str) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyUTF8String(in_str, out_str); } \
+ NS_IMETHOD CopyUTF8String2(const nsACString & in_str, nsACString & out_str) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyUTF8String2(in_str, out_str); } \
+ NS_IMETHOD GetFixedString(PRUint32 count, char **out_str) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFixedString(count, out_str); } \
+ NS_IMETHOD DoubleWideString(PRUint32 *count, PRUnichar **str) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoubleWideString(count, str); } \
+ NS_IMETHOD DoubleWideString2(PRUint32 in_count, const PRUnichar *in_str, PRUint32 *out_count, PRUnichar **out_str) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoubleWideString2(in_count, in_str, out_count, out_str); } \
+ NS_IMETHOD DoubleWideString3(PRUint32 in_count, const PRUnichar *in_str, PRUint32 *out_count, PRUnichar **out_str) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoubleWideString3(in_count, in_str, out_count, out_str); } \
+ NS_IMETHOD DoubleWideString4(const PRUnichar *in_str, PRUint32 *count, PRUnichar **out_str) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoubleWideString4(in_str, count, out_str); } \
+ NS_IMETHOD UpWideString(PRUint32 count, PRUnichar **str) { return !_to ? NS_ERROR_NULL_POINTER : _to->UpWideString(count, str); } \
+ NS_IMETHOD UpWideString2(PRUint32 count, const PRUnichar *in_str, PRUnichar **out_str) { return !_to ? NS_ERROR_NULL_POINTER : _to->UpWideString2(count, in_str, out_str); } \
+ NS_IMETHOD GetFixedWideString(PRUint32 count, char **out_str) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFixedWideString(count, out_str); } \
+ NS_IMETHOD GetStrings(PRUint32 *count, char ***str) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStrings(count, str); } \
+ NS_IMETHOD UpOctetArray(PRUint32 *count, PRUint8 **data) { return !_to ? NS_ERROR_NULL_POINTER : _to->UpOctetArray(count, data); } \
+ NS_IMETHOD UpOctetArray2(PRUint32 *count, PRUint8 **data) { return !_to ? NS_ERROR_NULL_POINTER : _to->UpOctetArray2(count, data); } \
+ NS_IMETHOD CheckInterfaceArray(PRUint32 count, nsISupports **data, PRBool *all_non_null) { return !_to ? NS_ERROR_NULL_POINTER : _to->CheckInterfaceArray(count, data, all_non_null); } \
+ NS_IMETHOD CopyInterfaceArray(PRUint32 count, nsISupports **data, nsISupports ***out_data, PRUint32 *out_count) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyInterfaceArray(count, data, out_data, out_count); } \
+ NS_IMETHOD GetInterfaceArray(PRUint32 *count, nsISupports ***data) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInterfaceArray(count, data); } \
+ NS_IMETHOD ExtendInterfaceArray(PRUint32 *count, nsISupports ***data) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExtendInterfaceArray(count, data); } \
+ NS_IMETHOD CheckIIDArray(PRUint32 count, const nsIID & *data, PRBool *all_mine) { return !_to ? NS_ERROR_NULL_POINTER : _to->CheckIIDArray(count, data, all_mine); } \
+ NS_IMETHOD GetIIDArray(PRUint32 *count, nsIID & **data) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIIDArray(count, data); } \
+ NS_IMETHOD ExtendIIDArray(PRUint32 *count, nsIID & **data) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExtendIIDArray(count, data); } \
+ NS_IMETHOD SumArrays(PRUint32 count, PRInt32 *array1, PRInt32 *array2, PRInt32 *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->SumArrays(count, array1, array2, result); } \
+ NS_IMETHOD GetArrays(PRUint32 *count, PRInt32 **array1, PRInt32 **array2) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetArrays(count, array1, array2); } \
+ NS_IMETHOD GetFixedArray(PRUint32 count, PRInt32 **array1) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFixedArray(count, array1); } \
+ NS_IMETHOD CopyArray(PRUint32 count, PRInt32 *array1, PRInt32 **array2) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyArray(count, array1, array2); } \
+ NS_IMETHOD CopyAndDoubleArray(PRUint32 *count, PRInt32 *array1, PRInt32 **array2) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyAndDoubleArray(count, array1, array2); } \
+ NS_IMETHOD AppendArray(PRUint32 *count, PRInt32 *array1, PRInt32 **array2) { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendArray(count, array1, array2); } \
+ NS_IMETHOD AppendVariant(nsIVariant *variant, nsIVariant **result) { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendVariant(variant, result); } \
+ NS_IMETHOD CopyVariant(nsIVariant *variant, nsIVariant **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyVariant(variant, _retval); } \
+ NS_IMETHOD SumVariants(PRUint32 incount, nsIVariant **variants, nsIVariant **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SumVariants(incount, variants, _retval); }
+
+#if 0
+/* Use the code below as a template for the implementation class for this interface. */
+
+/* Header file */
+class nsPythonTestInterfaceExtra : public nsIPythonTestInterfaceExtra
+{
+public:
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSIPYTHONTESTINTERFACEEXTRA
+
+ nsPythonTestInterfaceExtra();
+
+private:
+ ~nsPythonTestInterfaceExtra();
+
+protected:
+ /* additional members */
+};
+
+/* Implementation file */
+NS_IMPL_ISUPPORTS1(nsPythonTestInterfaceExtra, nsIPythonTestInterfaceExtra)
+
+nsPythonTestInterfaceExtra::nsPythonTestInterfaceExtra()
+{
+ /* member initializers and constructor code */
+}
+
+nsPythonTestInterfaceExtra::~nsPythonTestInterfaceExtra()
+{
+ /* destructor code */
+}
+
+/* void MultiplyEachItemInIntegerArray (in PRInt32 val, in PRUint32 count, [array, size_is (count)] inout PRInt32 valueArray); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::MultiplyEachItemInIntegerArray(PRInt32 val, PRUint32 count, PRInt32 **valueArray)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void MultiplyEachItemInIntegerArrayAndAppend (in PRInt32 val, inout PRUint32 count, [array, size_is (count)] inout PRInt32 valueArray); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::MultiplyEachItemInIntegerArrayAndAppend(PRInt32 val, PRUint32 *count, PRInt32 **valueArray)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void CompareStringArrays ([array, size_is (count)] in string arr1, [array, size_is (count)] in string arr2, in unsigned long count, [retval] out short result); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::CompareStringArrays(const char **arr1, const char **arr2, PRUint32 count, PRInt16 *result)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void DoubleStringArray (inout PRUint32 count, [array, size_is (count)] inout string valueArray); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::DoubleStringArray(PRUint32 *count, char ***valueArray)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void ReverseStringArray (in PRUint32 count, [array, size_is (count)] inout string valueArray); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::ReverseStringArray(PRUint32 count, char ***valueArray)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void DoubleString (inout PRUint32 count, [size_is (count)] inout string str); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::DoubleString(PRUint32 *count, char **str)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void DoubleString2 (in PRUint32 in_count, [size_is (in_count)] in string in_str, out PRUint32 out_count, [size_is (out_count)] out string out_str); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::DoubleString2(PRUint32 in_count, const char *in_str, PRUint32 *out_count, char **out_str)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void DoubleString3 (in PRUint32 in_count, [size_is (in_count)] in string in_str, out PRUint32 out_count, [size_is (out_count), retval] out string out_str); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::DoubleString3(PRUint32 in_count, const char *in_str, PRUint32 *out_count, char **out_str)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void DoubleString4 ([size_is (count)] in string in_str, inout PRUint32 count, [size_is (count)] out string out_str); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::DoubleString4(const char *in_str, PRUint32 *count, char **out_str)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void UpString (in PRUint32 count, [size_is (count)] inout string str); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::UpString(PRUint32 count, char **str)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void UpString2 (in PRUint32 count, [size_is (count)] in string in_str, [size_is (count)] out string out_str); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::UpString2(PRUint32 count, const char *in_str, char **out_str)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void CopyUTF8String (in AUTF8String in_str, out AUTF8String out_str); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::CopyUTF8String(const nsACString & in_str, nsACString & out_str)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void CopyUTF8String2 (in AUTF8String in_str, out AUTF8String out_str); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::CopyUTF8String2(const nsACString & in_str, nsACString & out_str)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void GetFixedString (in PRUint32 count, [size_is (count)] out string out_str); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::GetFixedString(PRUint32 count, char **out_str)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void DoubleWideString (inout PRUint32 count, [size_is (count)] inout wstring str); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::DoubleWideString(PRUint32 *count, PRUnichar **str)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void DoubleWideString2 (in PRUint32 in_count, [size_is (in_count)] in wstring in_str, out PRUint32 out_count, [size_is (out_count)] out wstring out_str); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::DoubleWideString2(PRUint32 in_count, const PRUnichar *in_str, PRUint32 *out_count, PRUnichar **out_str)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void DoubleWideString3 (in PRUint32 in_count, [size_is (in_count)] in wstring in_str, out PRUint32 out_count, [size_is (out_count), retval] out wstring out_str); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::DoubleWideString3(PRUint32 in_count, const PRUnichar *in_str, PRUint32 *out_count, PRUnichar **out_str)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void DoubleWideString4 ([size_is (count)] in wstring in_str, inout PRUint32 count, [size_is (count)] out wstring out_str); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::DoubleWideString4(const PRUnichar *in_str, PRUint32 *count, PRUnichar **out_str)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void UpWideString (in PRUint32 count, [size_is (count)] inout wstring str); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::UpWideString(PRUint32 count, PRUnichar **str)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void UpWideString2 (in PRUint32 count, [size_is (count)] in wstring in_str, [size_is (count)] out wstring out_str); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::UpWideString2(PRUint32 count, const PRUnichar *in_str, PRUnichar **out_str)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void GetFixedWideString (in PRUint32 count, [size_is (count)] out string out_str); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::GetFixedWideString(PRUint32 count, char **out_str)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void GetStrings (out PRUint32 count, [array, size_is (count), retval] out string str); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::GetStrings(PRUint32 *count, char ***str)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void UpOctetArray (inout PRUint32 count, [array, size_is (count)] inout PRUint8 data); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::UpOctetArray(PRUint32 *count, PRUint8 **data)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void UpOctetArray2 (inout PRUint32 count, [array, size_is (count)] inout PRUint8 data); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::UpOctetArray2(PRUint32 *count, PRUint8 **data)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void CheckInterfaceArray (in PRUint32 count, [array, size_is (count)] in nsISupports data, [retval] out PRBool all_non_null); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::CheckInterfaceArray(PRUint32 count, nsISupports **data, PRBool *all_non_null)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void CopyInterfaceArray (in PRUint32 count, [array, size_is (count)] in nsISupports data, [array, size_is (out_count)] out nsISupports out_data, out PRUint32 out_count); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::CopyInterfaceArray(PRUint32 count, nsISupports **data, nsISupports ***out_data, PRUint32 *out_count)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void GetInterfaceArray (out PRUint32 count, [array, size_is (count)] out nsISupports data); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::GetInterfaceArray(PRUint32 *count, nsISupports ***data)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void ExtendInterfaceArray (inout PRUint32 count, [array, size_is (count)] inout nsISupports data); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::ExtendInterfaceArray(PRUint32 *count, nsISupports ***data)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void CheckIIDArray (in PRUint32 count, [array, size_is (count)] in nsIIDRef data, [retval] out PRBool all_mine); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::CheckIIDArray(PRUint32 count, const nsIID & *data, PRBool *all_mine)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void GetIIDArray (out PRUint32 count, [array, size_is (count)] out nsIIDRef data); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::GetIIDArray(PRUint32 *count, nsIID & **data)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void ExtendIIDArray (inout PRUint32 count, [array, size_is (count)] inout nsIIDRef data); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::ExtendIIDArray(PRUint32 *count, nsIID & **data)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void SumArrays (in PRUint32 count, [array, size_is (count)] in PRInt32 array1, [array, size_is (count)] in PRInt32 array2, [retval] out PRInt32 result); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::SumArrays(PRUint32 count, PRInt32 *array1, PRInt32 *array2, PRInt32 *result)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void GetArrays (out PRUint32 count, [array, size_is (count)] out PRInt32 array1, [array, size_is (count)] out PRInt32 array2); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::GetArrays(PRUint32 *count, PRInt32 **array1, PRInt32 **array2)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void GetFixedArray (in PRUint32 count, [array, size_is (count)] out PRInt32 array1); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::GetFixedArray(PRUint32 count, PRInt32 **array1)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void CopyArray (in PRUint32 count, [array, size_is (count)] in PRInt32 array1, [array, size_is (count)] out PRInt32 array2); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::CopyArray(PRUint32 count, PRInt32 *array1, PRInt32 **array2)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void CopyAndDoubleArray (inout PRUint32 count, [array, size_is (count)] in PRInt32 array1, [array, size_is (count)] out PRInt32 array2); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::CopyAndDoubleArray(PRUint32 *count, PRInt32 *array1, PRInt32 **array2)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void AppendArray (inout PRUint32 count, [array, size_is (count)] in PRInt32 array1, [array, size_is (count)] inout PRInt32 array2); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::AppendArray(PRUint32 *count, PRInt32 *array1, PRInt32 **array2)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void AppendVariant (in nsIVariant variant, inout nsIVariant result); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::AppendVariant(nsIVariant *variant, nsIVariant **result)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* nsIVariant CopyVariant (in nsIVariant variant); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::CopyVariant(nsIVariant *variant, nsIVariant **_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* nsIVariant SumVariants (in PRUint32 incount, [array, size_is (incount)] in nsIVariant variants); */
+NS_IMETHODIMP nsPythonTestInterfaceExtra::SumVariants(PRUint32 incount, nsIVariant **variants, nsIVariant **_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* End of implementation class template. */
+#endif
+
+
+/* starting interface: nsIPythonTestInterfaceDOMStrings */
+#define NS_IPYTHONTESTINTERFACEDOMSTRINGS_IID_STR "657ae651-a973-4818-8c06-f4b948b3d758"
+
+#define NS_IPYTHONTESTINTERFACEDOMSTRINGS_IID \
+ {0x657ae651, 0xa973, 0x4818, \
+ { 0x8c, 0x06, 0xf4, 0xb9, 0x48, 0xb3, 0xd7, 0x58 }}
+
+class NS_NO_VTABLE nsIPythonTestInterfaceDOMStrings : public nsIPythonTestInterfaceExtra {
+ public:
+
+ NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPYTHONTESTINTERFACEDOMSTRINGS_IID)
+
+ /* DOMString GetDOMStringResult (in PRInt32 length); */
+ NS_IMETHOD GetDOMStringResult(PRInt32 length, nsAString & _retval) = 0;
+
+ /* void GetDOMStringOut (in PRInt32 length, [retval] out DOMString s); */
+ NS_IMETHOD GetDOMStringOut(PRInt32 length, nsAString & s) = 0;
+
+ /* PRUint32 GetDOMStringLength (in DOMString s); */
+ NS_IMETHOD GetDOMStringLength(const nsAString & s, PRUint32 *_retval) = 0;
+
+ /* PRUint32 GetDOMStringRefLength (in DOMStringRef s); */
+ NS_IMETHOD GetDOMStringRefLength(const nsAString & s, PRUint32 *_retval) = 0;
+
+ /* PRUint32 GetDOMStringPtrLength (in DOMStringPtr s); */
+ NS_IMETHOD GetDOMStringPtrLength(const nsAString * s, PRUint32 *_retval) = 0;
+
+ /* void ConcatDOMStrings (in DOMString s1, in DOMString s2, out DOMString ret); */
+ NS_IMETHOD ConcatDOMStrings(const nsAString & s1, const nsAString & s2, nsAString & ret) = 0;
+
+ /* attribute DOMString domstring_value; */
+ NS_IMETHOD GetDomstring_value(nsAString & aDomstring_value) = 0;
+ NS_IMETHOD SetDomstring_value(const nsAString & aDomstring_value) = 0;
+
+ /* readonly attribute DOMString domstring_value_ro; */
+ NS_IMETHOD GetDomstring_value_ro(nsAString & aDomstring_value_ro) = 0;
+
+};
+
+/* Use this macro when declaring classes that implement this interface. */
+#define NS_DECL_NSIPYTHONTESTINTERFACEDOMSTRINGS \
+ NS_IMETHOD GetDOMStringResult(PRInt32 length, nsAString & _retval); \
+ NS_IMETHOD GetDOMStringOut(PRInt32 length, nsAString & s); \
+ NS_IMETHOD GetDOMStringLength(const nsAString & s, PRUint32 *_retval); \
+ NS_IMETHOD GetDOMStringRefLength(const nsAString & s, PRUint32 *_retval); \
+ NS_IMETHOD GetDOMStringPtrLength(const nsAString * s, PRUint32 *_retval); \
+ NS_IMETHOD ConcatDOMStrings(const nsAString & s1, const nsAString & s2, nsAString & ret); \
+ NS_IMETHOD GetDomstring_value(nsAString & aDomstring_value); \
+ NS_IMETHOD SetDomstring_value(const nsAString & aDomstring_value); \
+ NS_IMETHOD GetDomstring_value_ro(nsAString & aDomstring_value_ro);
+
+/* Use this macro to declare functions that forward the behavior of this interface to another object. */
+#define NS_FORWARD_NSIPYTHONTESTINTERFACEDOMSTRINGS(_to) \
+ NS_IMETHOD GetDOMStringResult(PRInt32 length, nsAString & _retval) { return _to GetDOMStringResult(length, _retval); } \
+ NS_IMETHOD GetDOMStringOut(PRInt32 length, nsAString & s) { return _to GetDOMStringOut(length, s); } \
+ NS_IMETHOD GetDOMStringLength(const nsAString & s, PRUint32 *_retval) { return _to GetDOMStringLength(s, _retval); } \
+ NS_IMETHOD GetDOMStringRefLength(const nsAString & s, PRUint32 *_retval) { return _to GetDOMStringRefLength(s, _retval); } \
+ NS_IMETHOD GetDOMStringPtrLength(const nsAString * s, PRUint32 *_retval) { return _to GetDOMStringPtrLength(s, _retval); } \
+ NS_IMETHOD ConcatDOMStrings(const nsAString & s1, const nsAString & s2, nsAString & ret) { return _to ConcatDOMStrings(s1, s2, ret); } \
+ NS_IMETHOD GetDomstring_value(nsAString & aDomstring_value) { return _to GetDomstring_value(aDomstring_value); } \
+ NS_IMETHOD SetDomstring_value(const nsAString & aDomstring_value) { return _to SetDomstring_value(aDomstring_value); } \
+ NS_IMETHOD GetDomstring_value_ro(nsAString & aDomstring_value_ro) { return _to GetDomstring_value_ro(aDomstring_value_ro); }
+
+/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
+#define NS_FORWARD_SAFE_NSIPYTHONTESTINTERFACEDOMSTRINGS(_to) \
+ NS_IMETHOD GetDOMStringResult(PRInt32 length, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDOMStringResult(length, _retval); } \
+ NS_IMETHOD GetDOMStringOut(PRInt32 length, nsAString & s) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDOMStringOut(length, s); } \
+ NS_IMETHOD GetDOMStringLength(const nsAString & s, PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDOMStringLength(s, _retval); } \
+ NS_IMETHOD GetDOMStringRefLength(const nsAString & s, PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDOMStringRefLength(s, _retval); } \
+ NS_IMETHOD GetDOMStringPtrLength(const nsAString * s, PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDOMStringPtrLength(s, _retval); } \
+ NS_IMETHOD ConcatDOMStrings(const nsAString & s1, const nsAString & s2, nsAString & ret) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConcatDOMStrings(s1, s2, ret); } \
+ NS_IMETHOD GetDomstring_value(nsAString & aDomstring_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDomstring_value(aDomstring_value); } \
+ NS_IMETHOD SetDomstring_value(const nsAString & aDomstring_value) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDomstring_value(aDomstring_value); } \
+ NS_IMETHOD GetDomstring_value_ro(nsAString & aDomstring_value_ro) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDomstring_value_ro(aDomstring_value_ro); }
+
+#if 0
+/* Use the code below as a template for the implementation class for this interface. */
+
+/* Header file */
+class nsPythonTestInterfaceDOMStrings : public nsIPythonTestInterfaceDOMStrings
+{
+public:
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSIPYTHONTESTINTERFACEDOMSTRINGS
+
+ nsPythonTestInterfaceDOMStrings();
+
+private:
+ ~nsPythonTestInterfaceDOMStrings();
+
+protected:
+ /* additional members */
+};
+
+/* Implementation file */
+NS_IMPL_ISUPPORTS1(nsPythonTestInterfaceDOMStrings, nsIPythonTestInterfaceDOMStrings)
+
+nsPythonTestInterfaceDOMStrings::nsPythonTestInterfaceDOMStrings()
+{
+ /* member initializers and constructor code */
+}
+
+nsPythonTestInterfaceDOMStrings::~nsPythonTestInterfaceDOMStrings()
+{
+ /* destructor code */
+}
+
+/* DOMString GetDOMStringResult (in PRInt32 length); */
+NS_IMETHODIMP nsPythonTestInterfaceDOMStrings::GetDOMStringResult(PRInt32 length, nsAString & _retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void GetDOMStringOut (in PRInt32 length, [retval] out DOMString s); */
+NS_IMETHODIMP nsPythonTestInterfaceDOMStrings::GetDOMStringOut(PRInt32 length, nsAString & s)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* PRUint32 GetDOMStringLength (in DOMString s); */
+NS_IMETHODIMP nsPythonTestInterfaceDOMStrings::GetDOMStringLength(const nsAString & s, PRUint32 *_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* PRUint32 GetDOMStringRefLength (in DOMStringRef s); */
+NS_IMETHODIMP nsPythonTestInterfaceDOMStrings::GetDOMStringRefLength(const nsAString & s, PRUint32 *_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* PRUint32 GetDOMStringPtrLength (in DOMStringPtr s); */
+NS_IMETHODIMP nsPythonTestInterfaceDOMStrings::GetDOMStringPtrLength(const nsAString * s, PRUint32 *_retval)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* void ConcatDOMStrings (in DOMString s1, in DOMString s2, out DOMString ret); */
+NS_IMETHODIMP nsPythonTestInterfaceDOMStrings::ConcatDOMStrings(const nsAString & s1, const nsAString & s2, nsAString & ret)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* attribute DOMString domstring_value; */
+NS_IMETHODIMP nsPythonTestInterfaceDOMStrings::GetDomstring_value(nsAString & aDomstring_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+NS_IMETHODIMP nsPythonTestInterfaceDOMStrings::SetDomstring_value(const nsAString & aDomstring_value)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* readonly attribute DOMString domstring_value_ro; */
+NS_IMETHODIMP nsPythonTestInterfaceDOMStrings::GetDomstring_value_ro(nsAString & aDomstring_value_ro)
+{
+ return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+/* End of implementation class template. */
+#endif
+
+
+#endif /* __gen_py_test_component_h__ */
diff --git a/src/libs/xpcom18a4/python/test/test_component/py_test_component.html b/src/libs/xpcom18a4/python/test/test_component/py_test_component.html
new file mode 100644
index 00000000..1e17d24c
--- /dev/null
+++ b/src/libs/xpcom18a4/python/test/test_component/py_test_component.html
@@ -0,0 +1,182 @@
+<!-- ***** BEGIN LICENSE BLOCK *****
+ - Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ -
+ - The contents of this file are subject to the Mozilla Public License Version
+ - 1.1 (the "License"); you may not use this file except in compliance with
+ - the License. You may obtain a copy of the License at
+ - http://www.mozilla.org/MPL/
+ -
+ - Software distributed under the License is distributed on an "AS IS" basis,
+ - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ - for the specific language governing rights and limitations under the
+ - License.
+ -
+ - The Original Code is PyXPCOM.
+ -
+ - The Initial Developer of the Original Code is
+ - ActiveState Tool Corporation.
+ - Portions created by the Initial Developer are Copyright (C) 2000-2001
+ - the Initial Developer. All Rights Reserved.
+ -
+ - Contributor(s):
+ -
+ - Alternatively, the contents of this file may be used under the terms of
+ - either the GNU General Public License Version 2 or later (the "GPL"), or
+ - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ - in which case the provisions of the GPL or the LGPL are applicable instead
+ - of those above. If you wish to allow use of your version of this file only
+ - under the terms of either the GPL or the LGPL, and not to allow others to
+ - use your version of this file under the terms of the MPL, indicate your
+ - decision by deleting the provisions above and replace them with the notice
+ - and other provisions required by the LGPL or the GPL. If you do not delete
+ - the provisions above, a recipient may use your version of this file under
+ - the terms of any one of the MPL, the GPL or the LGPL.
+ -
+ - ***** END LICENSE BLOCK ***** -->
+
+<center><b><font size=+2>Python Component Sample</font></b>
+
+<p>
+<br>
+Last modified
+<script>
+document.write(document.lastModified);
+</script>
+</center>
+
+<p>XPConnect allows JavaScript
+to transparantly access and manipulate XPCOM objects;
+
+<p>Big Deal, I hear you say! But it also works for Python!!!
+
+<p>
+This sample demonstrates accessing a XPCOM object through XPConnect.
+The JavaScript executed when this page loads creates an instance
+of the Python object by
+using the <tt>Components</tt> object, then accesses it through
+the <a href="py_test_component.idl">nsISample</a> interface by calling <tt>QueryInterface</tt>:
+<br>
+<pre>
+netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+var sample = Components.classes["component://mozilla/sample/sample-world"].createInstance();
+sample = sample.QueryInterface(Components.interfaces.nsISample);
+</pre>
+
+<p>
+The buttons on the form are connected to JavaScript event handlers which
+call the methods defined in Python
+
+
+<p><b><a name="Compiling">Compiling the idl</b>
+
+<p>The XPIDL compiler (xpidl on Unix, xpidl.exe on Windows, and a CodeWarrior plugin on Mac)
+is compiled at build time (except on Mac) thus
+you will have to build mozilla in order to test this out. If you
+have already built mozilla then the compiler will be located at <tt>mozilla\dist\WIN32_D.OBJ\bin\xpidl.exe</tt>.
+
+<p>Once you have the XPIDL compiler enter the following command at your
+prompt:
+<br><tt>D:\whereever\xpcom\test\test_component>d:\mozilla\dist\WIN32_D.OBJ\bin\xpidl -I
+d:\mozilla\dist\idl -m typelib py_test_component.idl</tt>. You must then copy the generated .xpt file
+to the mozilla component directory.
+
+<p>The <tt>-I d:\mozilla\dist\idl</tt> points the compiler to the folder
+containing the other idl files, needed because nsISample.idl inherits from
+nsISupports.idl. The <tt>-m typelib</tt> instruction tells the compiler
+to build the .XPT typelib file.</tt>.
+
+<p>
+For more information on compilation see the <a href="http://www.mozilla.org/scriptable/xpidl/">xpidl
+compiler page</a>.
+
+<p><b>Running the sample</b>
+<p><b>NOTE: This doesnt work for me - I get an access denied error using XPConnect!</b>
+<p>Using Mozilla, load this file. Pay attention
+to the console when clicking "write".
+
+<!-- XXX keep in sync with stuff in pre tag below -->
+<script>
+netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+var sample = Components.classes["Python.TestComponent"].createInstance();
+sample = sample.QueryInterface(Components.interfaces.nsIPythonTestInterface);
+dump("sample = " + sample + "\n");
+
+function get()
+{
+ var field = document.getElementById('Value');
+ field.value = sample.str_value;
+}
+
+function set()
+{
+ var field = document.getElementById('Value');
+ sample.str_value = field.value;
+}
+
+function poke()
+{
+ var field = document.getElementById('Value');
+ sample.poke(field.value);
+}
+
+function write()
+{
+ sample.writeValue("here is what I'm writing: ");
+}
+</script>
+
+<p>
+<form name="form">
+<input type="button" value="Get" onclick="get();">
+<input type="button" value="Set" onclick="set();">
+<input type="button" value="Poke" onclick="poke();">
+<input type="text" id="Value">
+<input type="button" value="Write" onclick="write();">
+<form>
+
+<hr>
+
+<p>
+JavaScript and form source:
+
+<!-- XXX keep in sync with actual script -->
+<pre>
+&lt;script&gt;
+netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+var sample = Components.classes["component://Python.TestComponent"].createInstance();
+sample = sample.QueryInterface(Components.interfaces.nsIPythonTestInterface);
+dump("sample = " + sample + "\n");
+
+function get()
+{
+ var field = document.getElementById('Value');
+ field.value = sample.str_value;
+}
+
+function set()
+{
+ var field = document.getElementById('Value');
+ sample.str_value = field.value;
+}
+
+function poke()
+{
+ var field = document.getElementById('Value');
+ sample.poke(field.value);
+}
+
+function write()
+{
+ sample.writeValue("here is what I'm writing: ");
+}
+&lt;/script&gt;
+
+&lt;form name=&quot;form&quot;&gt;
+&lt;input type=&quot;button&quot; value=&quot;Get&quot; onclick=&quot;get();&quot;&gt;
+&lt;input type=&quot;button&quot; value=&quot;Set&quot; onclick=&quot;set();&quot;&gt;
+&lt;input type=&quot;button&quot; value=&quot;Poke&quot; onclick=&quot;poke();&quot;&gt;
+&lt;input type=&quot;text&quot; id=&quot;Value&quot;&gt;
+&lt;input type=&quot;button&quot; value=&quot;Write&quot; onclick=&quot;write();&quot;&gt;
+&lt;form>
+
+</pre>
diff --git a/src/libs/xpcom18a4/python/test/test_component/py_test_component.idl b/src/libs/xpcom18a4/python/test/test_component/py_test_component.idl
new file mode 100644
index 00000000..cd3e1c45
--- /dev/null
+++ b/src/libs/xpcom18a4/python/test/test_component/py_test_component.idl
@@ -0,0 +1,231 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Python XPCOM language bindings.
+ *
+ * The Initial Developer of the Original Code is
+ * ActiveState Tool Corp.
+ * Portions created by the Initial Developer are Copyright (C) 2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Mark Hammond <MarkH@ActiveState.com> (original author)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+// NOTE: This is a TEST interface, not a DEMO interface :-)
+// We try to get as many data-types etc exposed, meaning this
+// doesnt really make a good demo of a "simple component"
+#include "nsISupports.idl"
+#include "nsIVariant.idl"
+
+[scriptable, uuid(1ECAED4F-E4D5-4ee7-ABF0-7D72AE1441D7)]
+interface nsIPythonTestInterface : nsISupports
+{
+ // Some constants for us to test - one for every type supported by xpidl
+ const short One = 1;
+ const long Two = 2;
+ const long MinusOne = -1;
+ const long BigLong = 0x7FFFFFFF;
+ const long BiggerLong = 0xFFFFFFFF;
+ const unsigned long BigULong = 0xFFFFFFFF;
+
+ // Declare every type supported as an attribute.
+ attribute boolean boolean_value; // PRBool
+ attribute octet octet_value; // PRUint8
+ attribute short short_value; // PRInt16
+ attribute unsigned short ushort_value; // PRUint16
+ attribute long long_value; // PRInt32
+ attribute unsigned long ulong_value; // PRUint32
+ attribute long long long_long_value; // PRInt64
+ attribute unsigned long long ulong_long_value; // PRUint64
+ attribute float float_value; // float
+ attribute double double_value; // double
+ attribute char char_value; // char
+ attribute wchar wchar_value; // PRUnichar
+ attribute string string_value; // char *
+ attribute wstring wstring_value; // PRUnichar*
+ attribute AString astring_value; // nsAString &
+ attribute ACString acstring_value; // nsACString &
+ attribute AUTF8String utf8string_value; // nsAUTF8String &
+ attribute nsIIDRef iid_value; // an IID
+ attribute nsIPythonTestInterface interface_value; // A specific interface
+ attribute nsISupports isupports_value; // A generic interface
+
+ // Declare every type supported as a method with an "in", "in/out" and "out" params
+ boolean do_boolean(in boolean p1, inout boolean p2, out boolean p3);
+ octet do_octet(in octet p1, inout octet p2, out octet p3);
+ short do_short(in short p1, inout short p2, out short p3);
+ unsigned short do_unsigned_short(in unsigned short p1, inout unsigned short p2, out unsigned short p3);
+ long do_long(in long p1, inout long p2, out long p3);
+ unsigned long do_unsigned_long(in unsigned long p1, inout unsigned long p2, out unsigned long p3);
+ long long do_long_long(in long long p1, inout long long p2, out long long p3);
+ unsigned long long do_unsigned_long_long(in unsigned long long p1, inout unsigned long long p2, out unsigned long long p3);
+ float do_float(in float p1, inout float p2, out float p3);
+ double do_double(in double p1, inout double p2, out double p3);
+ char do_char(in char p1, inout char p2, out char p3);
+ wchar do_wchar(in wchar p1, inout wchar p2, out wchar p3);
+ string do_string(in string p1, inout string p2, out string p3);
+ wstring do_wstring(in wstring p1, inout wstring p2, out wstring p3);
+ nsIIDRef do_nsIIDRef(in nsIIDRef p1, inout nsIIDRef p2, out nsIIDRef p3);
+ nsIPythonTestInterface do_nsIPythonTestInterface(in nsIPythonTestInterface p1, inout nsIPythonTestInterface p2, out nsIPythonTestInterface p3);
+ nsISupports do_nsISupports(in nsISupports p1, inout nsISupports p2, out nsISupports p3);
+ void do_nsISupportsIs(in nsIIDRef iid, [iid_is(iid),retval] out nsQIResult result);
+// Do I really need these??
+// void do_nsISupportsIs2(inout nsIIDRef iid, [iid_is(iid)] inout nsQIResult result);
+// void do_nsISupportsIs3(out nsIIDRef iid, [iid_is(iid)] inout nsQIResult result);
+// void do_nsISupportsIs4(out nsIIDRef iid, [iid_is(iid)] out nsQIResult result);
+};
+
+// Another interface - we use another interface purely for testing purposes -
+// We ensure that the entire interface hierarcy is available correctly.
+[scriptable, uuid(B38D1538-FE92-42c3-831F-285242EDEEA4)]
+interface nsIPythonTestInterfaceExtra : nsIPythonTestInterface
+{
+ // These were copied from the XPCOM test 'xpctest.idl'
+ // (and a few extras added)
+ void MultiplyEachItemInIntegerArray(
+ in PRInt32 val,
+ in PRUint32 count,
+ [array, size_is(count)] inout PRInt32 valueArray);
+ void MultiplyEachItemInIntegerArrayAndAppend(
+ in PRInt32 val,
+ inout PRUint32 count,
+ [array, size_is(count)] inout PRInt32 valueArray);
+
+ // Note that this method shares a single "size_is" between 2 params!
+ void CompareStringArrays([array, size_is(count)] in string arr1,
+ [array, size_is(count)] in string arr2,
+ in unsigned long count,
+ [retval] out short result);
+
+ void DoubleStringArray(inout PRUint32 count,
+ [array, size_is(count)] inout string valueArray);
+ void ReverseStringArray(in PRUint32 count,
+ [array, size_is(count)] inout string valueArray);
+
+ // One count, one inout array.
+ void DoubleString(inout PRUint32 count,
+ [size_is(count)] inout string str);
+ // One in count and in array, plus out count and out array
+ void DoubleString2(in PRUint32 in_count, [size_is(in_count)] in string in_str,
+ out PRUint32 out_count, [size_is(out_count)] out string out_str);
+ // As per DoubleString2, but out string also marked retval
+ void DoubleString3(in PRUint32 in_count, [size_is(in_count)] in string in_str,
+ out PRUint32 out_count, [size_is(out_count), retval] out string out_str);
+ // One in array, one out array, one share inout count.
+ void DoubleString4([size_is(count)] in string in_str, inout PRUint32 count, [size_is(count)] out string out_str);
+ // UpString defines the count as only "in" - meaning the result must be the same size
+ void UpString(in PRUint32 count,
+ [size_is(count)] inout string str);
+ // UpString2 defines count as only "in", and a string as only "out"
+ void UpString2(in PRUint32 count,
+ [size_is(count)] in string in_str,
+ [size_is(count)]out string out_str);
+ void CopyUTF8String(in AUTF8String in_str, out AUTF8String out_str);
+ void CopyUTF8String2(in AUTF8String in_str, out AUTF8String out_str);
+ // Test we can get an "out" array with an "in" size (and the size is not used anywhere as a size for an in!)
+ void GetFixedString(in PRUint32 count, [size_is(count)]out string out_str);
+
+ void DoubleWideString(inout PRUint32 count,
+ [size_is(count)] inout wstring str);
+ void DoubleWideString2(in PRUint32 in_count, [size_is(in_count)] in wstring in_str,
+ out PRUint32 out_count, [size_is(out_count)] out wstring out_str);
+ void DoubleWideString3(in PRUint32 in_count, [size_is(in_count)] in wstring in_str,
+ out PRUint32 out_count, [size_is(out_count), retval] out wstring out_str);
+ void DoubleWideString4([size_is(count)] in wstring in_str, inout PRUint32 count, [size_is(count)] out wstring out_str);
+ // UpWideString defines the count as only "in" - meaning the result must be the same size
+ void UpWideString(in PRUint32 count,
+ [size_is(count)] inout wstring str);
+ // UpWideString2 defines count as only "in", and a string as only "out"
+ void UpWideString2(in PRUint32 count,
+ [size_is(count)] in wstring in_str,
+ [size_is(count)]out wstring out_str);
+ // Test we can get an "out" array with an "in" size (and the size is not used anywhere as a size for an in!)
+ void GetFixedWideString(in PRUint32 count, [size_is(count)]out string out_str);
+
+ void GetStrings(out PRUint32 count,
+ [retval, array, size_is(count)] out string str);
+
+ void UpOctetArray(inout PRUint32 count,
+ [array, size_is(count)] inout PRUint8 data);
+
+ void UpOctetArray2(inout PRUint32 count,
+ [array, size_is(count)] inout PRUint8 data);
+
+ // Arrays of interfaces
+ void CheckInterfaceArray(in PRUint32 count,
+ [array, size_is(count)] in nsISupports data,
+ [retval] out PRBool all_non_null);
+ void CopyInterfaceArray(in PRUint32 count,
+ [array, size_is(count)] in nsISupports data,
+ [array, size_is(out_count)] out nsISupports out_data,
+ out PRUint32 out_count);
+ void GetInterfaceArray(out PRUint32 count,
+ [array, size_is(count)] out nsISupports data);
+ void ExtendInterfaceArray(inout PRUint32 count,
+ [array, size_is(count)] inout nsISupports data);
+
+ // Arrays of IIDs
+ void CheckIIDArray(in PRUint32 count,
+ [array, size_is(count)] in nsIIDRef data,
+ [retval] out PRBool all_mine);
+ void GetIIDArray(out PRUint32 count,
+ [array, size_is(count)] out nsIIDRef data);
+ void ExtendIIDArray(inout PRUint32 count,
+ [array, size_is(count)] inout nsIIDRef data);
+
+ // More specific tests.
+ // Test our count param can be shared as an "in" param.
+ void SumArrays(in PRUint32 count, [array, size_is(count)]in PRInt32 array1, [array, size_is(count)]in PRInt32 array2, [retval]out PRInt32 result);
+ // Test our count param can be shared as an "out" param.
+ void GetArrays(out PRUint32 count, [array, size_is(count)]out PRInt32 array1, [array, size_is(count)]out PRInt32 array2);
+ // Test we can get an "out" array with an "in" size (and the size is not used anywhere as a size for an in!)
+ void GetFixedArray(in PRUint32 count, [array, size_is(count)]out PRInt32 array1);
+ // Test our "in" count param can be shared as one "in", plus one "out" param.
+ void CopyArray(in PRUint32 count, [array, size_is(count)]in PRInt32 array1, [array, size_is(count)]out PRInt32 array2);
+ // Test our "in-out" count param can be shared as one "in", plus one "out" param.
+ void CopyAndDoubleArray(inout PRUint32 count, [array, size_is(count)]in PRInt32 array1, [array, size_is(count)]out PRInt32 array2);
+ // Test our "in-out" count param can be shared as one "in", plus one "in-out" param.
+ void AppendArray(inout PRUint32 count, [array, size_is(count)]in PRInt32 array1, [array, size_is(count)]inout PRInt32 array2);
+ void AppendVariant(in nsIVariant variant, inout nsIVariant result);
+ nsIVariant CopyVariant(in nsIVariant variant);
+ nsIVariant SumVariants(in PRUint32 incount, [array, size_is(incount)]in nsIVariant variants);
+};
+
+// DOM String support is a "recent" (01/2001) addition to XPCOM. These test
+// have their own interface for no real good reason ;-)
+[scriptable, uuid(657ae651-a973-4818-8c06-f4b948b3d758)]
+interface nsIPythonTestInterfaceDOMStrings : nsIPythonTestInterfaceExtra
+{
+ DOMString GetDOMStringResult(in PRInt32 length);
+ void GetDOMStringOut(in PRInt32 length, [retval] out DOMString s);
+ PRUint32 GetDOMStringLength(in DOMString s);
+ PRUint32 GetDOMStringRefLength(in DOMStringRef s);
+ PRUint32 GetDOMStringPtrLength(in DOMStringPtr s);
+ void ConcatDOMStrings(in DOMString s1, in DOMString s2, out DOMString ret);
+ attribute DOMString domstring_value;
+ readonly attribute DOMString domstring_value_ro;
+};
diff --git a/src/libs/xpcom18a4/python/test/test_component/py_test_component.py b/src/libs/xpcom18a4/python/test/test_component/py_test_component.py
new file mode 100755
index 00000000..c0373de9
--- /dev/null
+++ b/src/libs/xpcom18a4/python/test/test_component/py_test_component.py
@@ -0,0 +1,421 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Python XPCOM language bindings.
+#
+# The Initial Developer of the Original Code is
+# ActiveState Tool Corp.
+# Portions created by the Initial Developer are Copyright (C) 2000, 2001
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Mark Hammond <MarkH@ActiveState.com> (original author)
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+# NOTE: This is a TEST interface, not a DEMO interface :-)
+# We try to get as many data-types etc exposed, meaning this
+# doesnt really make a good demo of a "simple component"
+
+
+from xpcom import components, verbose
+
+class PythonTestComponent:
+ # Note we only list the "child" interface, not our intermediate interfaces
+ # (which we must, by definition, also support)
+ _com_interfaces_ = components.interfaces.nsIPythonTestInterfaceDOMStrings
+ _reg_clsid_ = "{7EE4BDC6-CB53-42c1-A9E4-616B8E012ABA}"
+ _reg_contractid_ = "Python.TestComponent"
+ def __init__(self):
+ self.boolean_value = 1
+ self.octet_value = 2
+ self.short_value = 3
+ self.ushort_value = 4
+ self.long_value = 5
+ self.ulong_value = 6
+ self.long_long_value = 7
+ self.ulong_long_value = 8
+ self.float_value = 9.0
+ self.double_value = 10.0
+ self.char_value = "a"
+ self.wchar_value = "b"
+ self.string_value = "cee"
+ self.wstring_value = "dee"
+ self.astring_value = "astring"
+ self.acstring_value = "acstring"
+ self.utf8string_value = "utf8string"
+ self.iid_value = self._reg_clsid_
+ self.interface_value = None
+ self.isupports_value = None
+ self.domstring_value = "dom"
+
+ def __del__(self):
+ if verbose:
+ print "Python.TestComponent: __del__ method called - object is destructing"
+
+ def do_boolean(self, p1, p2):
+ # boolean do_boolean(in boolean p1, inout boolean p2, out boolean p3);
+ ret = p1 ^ p2
+ return ret, not ret, ret
+
+ def do_octet(self, p1, p2):
+ # octet do_octet(in octet p1, inout octet p2, out octet p3);
+ return p1+p2, p1-p2, p1*p2
+
+ def do_short(self, p1, p2):
+ # short do_short(in short p1, inout short p2, out short p3);
+ return p1+p2, p1-p2, p1*p2
+
+ def do_unsigned_short(self, p1, p2):
+ # unsigned short do_unsigned_short(in unsigned short p1, inout unsigned short p2, out unsigned short p3);
+ return p1+p2, p1-p2, p1*p2
+ def do_long(self, p1, p2):
+ # long do_long(in long p1, inout long p2, out long p3);
+ return p1+p2, p1-p2, p1*p2
+
+ def do_unsigned_long(self, p1, p2):
+ # unsigned long do_unsigned_long(in unsigned long p1, inout unsigned long p2, out unsigned long p3);
+ return p1+p2, p1-p2, p1*p2
+ def do_long_long(self, p1, p2):
+ # long long do_long_long(in long long p1, inout long long p2, out long long p3);
+ return p1+p2, p1-p2, p1*p2
+ def do_unsigned_long_long(self, p1, p2):
+ # unsigned long long do_unsigned_long_long(in unsigned long long p1, inout unsigned long long p2, out unsigned long long p3);
+ return p1+p2, p1-p2, p1*p2
+ def do_float(self, p1, p2):
+ # float do_float(in float p1, inout float p2, out float p3);
+ return p1+p2, p1-p2, p1*p2
+ def do_double(self, p1, p2):
+ # double do_double(in double p1, inout double p2, out double p3);
+ return p1+p2, p1-p2, p1*p2
+ def do_char(self, p1, p2):
+ # char do_char(in char p1, inout char p2, out char p3);
+ return chr(ord(p1)+ord(p2)), p2, p1
+ def do_wchar(self, p1, p2):
+ # wchar do_wchar(in wchar p1, inout wchar p2, out wchar p3);
+ return chr(ord(p1)+ord(p2)), p2, p1
+ def do_string(self, p1, p2):
+ # string do_string(in string p1, inout string p2, out string p3);
+ ret = ""
+ if p1 is not None: ret = ret + p1
+ if p2 is not None: ret = ret + p2
+ return ret, p1, p2
+ def do_wstring(self, p1, p2):
+ # wstring do_wstring(in wstring p1, inout wstring p2, out wstring p3);
+ ret = u""
+ if p1 is not None: ret = ret + p1
+ if p2 is not None: ret = ret + p2
+ return ret, p1, p2
+ def do_nsIIDRef(self, p1, p2):
+ # nsIIDRef do_nsIIDRef(in nsIIDRef p1, inout nsIIDRef p2, out nsIIDRef p3);
+ return p1, self._reg_clsid_, p2
+ def do_nsIPythonTestInterface(self, p1, p2):
+ # nsIPythonTestInterface do_nsIPythonTestInterface(in nsIPythonTestInterface p1, inout nsIPythonTestInterface p2, out nsIPythonTestInterface p3);
+ return p2, p1, self
+ def do_nsISupports(self, p1, p2):
+ # nsISupports do_nsISupports(in nsISupports p1, inout nsISupports p2, out nsISupports p3);
+ return self, p1, p2
+ def do_nsISupportsIs(self, iid):
+ # void do_nsISupportsIs(in nsIIDRef iid, [iid_is(iid),retval] out nsQIResult result)
+ # Note the framework does the QI etc on us, so there is no real point me doing it.
+ # (However, user code _should_ do the QI - otherwise any errors are deemed "internal" (as they
+ # are raised by the C++ framework), and therefore logged to the console, etc.
+ # A user QI allows the user to fail gracefully, whatever gracefully means for them!
+ return self
+# Do I really need these??
+## def do_nsISupportsIs2(self, iid, interface):
+## # void do_nsISupportsIs2(inout nsIIDRef iid, [iid_is(iid),retval] inout nsQIResult result);
+## return iid, interface
+## def do_nsISupportsIs3(self, interface):
+## # void do_nsISupportsIs3(out nsIIDRef iid, [iid_is(iid)] inout nsQIResult result);
+## return self._com_interfaces_, interface
+## def do_nsISupportsIs4(self):
+## # void do_nsISupportsIs4(out nsIIDRef iid, [iid_is(iid)] out nsQIResult result);
+## return self._com_interfaces_, self
+
+ # Methods from the nsIPythonTestInterfaceExtra interface
+ #
+ def MultiplyEachItemInIntegerArray(self, val, valueArray):
+ # void MultiplyEachItemInIntegerArray(
+ # in PRInt32 val,
+ # in PRUint32 count,
+ # [array, size_is(count)] inout PRInt32 valueArray);
+ # NOTE - the "sizeis" params are never passed to or returned from Python!
+ results = []
+ for item in valueArray:
+ results.append(item * val)
+ return results
+ def MultiplyEachItemInIntegerArrayAndAppend(self, val, valueArray):
+ #void MultiplyEachItemInIntegerArrayAndAppend(
+ # in PRInt32 val,
+ # inout PRUint32 count,
+ # [array, size_is(count)] inout PRInt32 valueArray);
+ results = valueArray[:]
+ for item in valueArray:
+ results.append(item * val)
+ return results
+ def DoubleStringArray(self, valueArray):
+ # void DoubleStringArray(inout PRUint32 count,
+ # [array, size_is(count)] inout string valueArray);
+ results = []
+ for item in valueArray:
+ results.append(item * 2)
+ return results
+
+ def ReverseStringArray(self, valueArray):
+ # void ReverseStringArray(in PRUint32 count,
+ # [array, size_is(count)] inout string valueArray);
+ valueArray.reverse()
+ return valueArray
+
+ # Note that this method shares a single "size_is" between 2 params!
+ def CompareStringArrays(self, ar1, ar2):
+ # void CompareStringArrays([array, size_is(count)] in string arr1,
+ # [array, size_is(count)] in string arr2,
+ # in unsigned long count,
+ # [retval] out short result);
+ return cmp(ar1, ar2)
+
+ def DoubleString(self, val):
+ # void DoubleString(inout PRUint32 count,
+ # [size_is(count)] inout string str);
+ return val * 2
+ def DoubleString2(self, val):
+ # void DoubleString2(in PRUint32 in_count, [size_is(in_count)] in string in_str,
+ # out PRUint32 out_count, [size_is(out_count)] out string out_str);
+ return val * 2
+ def DoubleString3(self, val):
+ # void DoubleString3(in PRUint32 in_count, [size_is(in_count)] in string in_str,
+ # out PRUint32 out_count, [size_is(out_count), retval] string out_str);
+ return val * 2
+ def DoubleString4(self, val):
+ # void DoubleString4([size_is(count)] in string in_str, inout PRUint32 count, [size_is(count)] out string out_str);
+ return val * 2
+ def UpString(self, val):
+ # // UpString defines the count as only "in" - meaning the result must be the same size
+ # void UpString(in PRUint32 count,
+ # [size_is(count)] inout string str);
+ return val.upper()
+ UpString2 = UpString
+ # // UpString2 defines count as only "in", and a string as only "out"
+ # void UpString2(in PRUint32 count,
+ # [size_is(count)] inout string in_str,
+ # [size_is(count)]out string out_str);
+
+ def GetFixedString(self, count):
+ # void GetFixedString(in PRUint32 count, [size_is(count)out string out_str);
+ return "A" * count
+
+ # DoubleWideString functions are identical to DoubleString, except use wide chars!
+ def DoubleWideString(self, val):
+ return val * 2
+ def DoubleWideString2(self, val):
+ return val * 2
+ def DoubleWideString3(self, val):
+ return val * 2
+ def DoubleWideString4(self, val):
+ return val * 2
+ def UpWideString(self, val):
+ return val.upper()
+ UpWideString2 = UpWideString
+ def CopyUTF8String(self, v):
+ return v
+ def CopyUTF8String2(self, v):
+ return v.encode("utf8")
+ # Test we can get an "out" array with an "in" size (and the size is not used anywhere as a size for an in!)
+ def GetFixedWideString(self, count):
+ # void GetFixedWideString(in PRUint32 count, [size_is(count)out string out_str);
+ return u"A" * count
+
+ def GetStrings(self):
+ # void GetStrings(out PRUint32 count,
+ # [retval, array, size_is(count)] out string str);
+ return "Hello from the Python test component".split()
+ # Some tests for our special "PRUint8" support.
+ def UpOctetArray( self, data ):
+ # void UpOctetArray(inout PRUint32 count,
+ # [array, size_is(count)] inout PRUint8 data);
+ return data.upper()
+
+ def UpOctetArray2( self, data ):
+ # void UpOctetArray2(inout PRUint32 count,
+ # [array, size_is(count)] inout PRUint8 data);
+ data = data.upper()
+ # This time we return a list of integers.
+ return map( ord, data )
+
+ # Arrays of interfaces
+ def CheckInterfaceArray(self, interfaces):
+ # void CheckInterfaceArray(in PRUint32 count,
+ # [array, size_is(count)] in nsISupports data,
+ # [retval] out PRBool all_non_null);
+ ret = 1
+ for i in interfaces:
+ if i is None:
+ ret = 0
+ break
+ return ret
+ def CopyInterfaceArray(self, a):
+ return a
+ def GetInterfaceArray(self):
+ # void GetInterfaceArray(out PRUint32 count,
+ # [array, size_is(count)] out nsISupports data);
+ return self, self, self, None
+ def ExtendInterfaceArray(self, data):
+ # void ExtendInterfaceArray(inout PRUint32 count,
+ # [array, size_is(count)] inout nsISupports data);
+ return data * 2
+
+ # Arrays of IIDs
+ def CheckIIDArray(self, data):
+ # void CheckIIDArray(in PRUint32 count,
+ # [array, size_is(count)] in nsIIDRef data,
+ # [retval] out PRBool all_mine);
+ ret = 1
+ for i in data:
+ if i!= self._com_interfaces_ and i != self._reg_clsid_:
+ ret = 0
+ break
+ return ret
+ def GetIIDArray(self):
+ # void GetIIDArray(out PRUint32 count,
+ # [array, size_is(count)] out nsIIDRef data);
+ return self._com_interfaces_, self._reg_clsid_
+ def ExtendIIDArray(self, data):
+ # void ExtendIIDArray(inout PRUint32 count,
+ # [array, size_is(count)] inout nsIIDRef data);
+ return data * 2
+
+ # Test our count param can be shared as an "in" param.
+ def SumArrays(self, array1, array2):
+ # void SumArrays(in PRUint32 count, [array, size_is(count)]in array1, [array, size_is(count)]in array2, [retval]result);
+ if len(array1)!=len(array2):
+ print "SumArrays - not expecting different lengths!"
+ result = 0
+ for i in array1:
+ result = result + i
+ for i in array2:
+ result = result+i
+ return result
+
+ # Test our count param can be shared as an "out" param.
+ def GetArrays(self):
+ # void GetArrays(out PRUint32 count, [array, size_is(count)]out array1, [array, size_is(count)]out array2);
+ return (1,2,3), (4,5,6)
+ # Test we can get an "out" array with an "in" size
+ def GetFixedArray(self, size):
+ # void GetFixedArray(in PRUint32 count, [array, size_is(count)]out PRInt32 array1]);
+ return 0 * size
+
+ # Test our "in" count param can be shared as one "in", plus one "out" param.
+ def CopyArray(self, array1):
+ # void CopyArray(in PRUint32 count, [array, size_is(count)]in array1, [array, size_is(count)]out array2);
+ return array1
+ # Test our "in-out" count param can be shared as one "in", plus one "out" param.
+ def CopyAndDoubleArray(self, array):
+ # void CopyAndDoubleArray(inout PRUint32 count, [array, size_is(count)]in array1, [array, size_is(count)]out array2);
+ return array + array
+ # Test our "in-out" count param can be shared as one "in", plus one "in-out" param.
+ def AppendArray(self, array1, array2):
+ # void AppendArray(inout PRUint32 count, [array, size_is(count)]in array1, [array, size_is(count)]inout array2);
+ rc = array1
+ if array2 is not None:
+ rc.extend(array2)
+ return rc
+ # Test nsIVariant support
+ def AppendVariant(self, invar, inresult):
+ if type(invar)==type([]):
+ invar_use = invar[0]
+ for v in invar[1:]:
+ invar_use += v
+ else:
+ invar_use = invar
+ if type(inresult)==type([]):
+ inresult_use = inresult[0]
+ for v in inresult[1:]:
+ inresult_use += v
+ else:
+ inresult_use = inresult
+ if inresult_use is None and invar_use is None:
+ return None
+ return inresult_use + invar_use
+
+ def CopyVariant(self, invar):
+ return invar
+
+ def SumVariants(self, variants):
+ if len(variants) == 0:
+ return None
+ result = variants[0]
+ for v in variants[1:]:
+ result += v
+ return result
+
+ # Some tests for the "new" (Feb-2001) DOMString type.
+ def GetDOMStringResult( self, length ):
+ # Result: DOMString &
+ if length == -1:
+ return None
+ return "P" * length
+ def GetDOMStringOut( self, length ):
+ # Result: DOMString &
+ if length == -1:
+ return None
+ return "y" * length
+ def GetDOMStringLength( self, param0 ):
+ # Result: uint32
+ # In: param0: DOMString &
+ if param0 is None: return -1
+ return len(param0)
+
+ def GetDOMStringRefLength( self, param0 ):
+ # Result: uint32
+ # In: param0: DOMString &
+ if param0 is None: return -1
+ return len(param0)
+
+ def GetDOMStringPtrLength( self, param0 ):
+ # Result: uint32
+ # In: param0: DOMString *
+ if param0 is None: return -1
+ return len(param0)
+
+ def ConcatDOMStrings( self, param0, param1 ):
+ # Result: void - None
+ # In: param0: DOMString &
+ # In: param1: DOMString &
+ # Out: DOMString &
+ return param0 + param1
+ def get_domstring_value( self ):
+ # Result: DOMString &
+ return self.domstring_value
+ def set_domstring_value( self, param0 ):
+ # Result: void - None
+ # In: param0: DOMString &
+ self.domstring_value = param0
+
+ def get_domstring_value_ro( self ):
+ # Result: DOMString &
+ return self.domstring_value
diff --git a/src/libs/xpcom18a4/python/test/test_components.py b/src/libs/xpcom18a4/python/test/test_components.py
new file mode 100755
index 00000000..80007722
--- /dev/null
+++ b/src/libs/xpcom18a4/python/test/test_components.py
@@ -0,0 +1,109 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Python XPCOM language bindings.
+#
+# The Initial Developer of the Original Code is
+# ActiveState Tool Corp.
+# Portions created by the Initial Developer are Copyright (C) 2000, 2001
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Mark Hammond <markh@activestate.com> (original author)
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+"""Tests the "xpcom.components" object.
+"""
+
+import xpcom.components
+from pyxpcom_test_tools import suite_from_functions, testmain
+
+if not __debug__:
+ raise RuntimeError, "This test uses assert, so must be run in debug mode"
+
+def test_interfaces():
+ "Test the xpcom.components.interfaces object"
+
+ iid = xpcom.components.interfaces.nsISupports
+ assert iid == xpcom._xpcom.IID_nsISupports, "Got the wrong IID!"
+ iid = xpcom.components.interfaces['nsISupports']
+ assert iid == xpcom._xpcom.IID_nsISupports, "Got the wrong IID!"
+
+ # Test dictionary semantics
+ num_fetched = num_nsisupports = 0
+ for name, iid in xpcom.components.interfaces.items():
+ num_fetched = num_fetched + 1
+ if name == "nsISupports":
+ num_nsisupports = num_nsisupports + 1
+ assert iid == xpcom._xpcom.IID_nsISupports, "Got the wrong IID!"
+ assert xpcom.components.interfaces[name] == iid
+ # Check all the lengths match.
+ assert len(xpcom.components.interfaces.keys()) == len(xpcom.components.interfaces.values()) == \
+ len(xpcom.components.interfaces.items()) == len(xpcom.components.interfaces) == \
+ num_fetched, "The collection lengths were wrong"
+ assert num_nsisupports == 1, "Didnt find exactly 1 nsiSupports!"
+
+def test_classes():
+ # Need a well-known contractID here?
+ prog_id = "@mozilla.org/supports-array;1"
+ clsid = xpcom.components.ID("{bda17d50-0d6b-11d3-9331-00104ba0fd40}")
+
+ # Check we can create the instance (dont check we can do anything with it tho!)
+ klass = xpcom.components.classes[prog_id]
+ instance = klass.createInstance()
+
+ # Test dictionary semantics
+ num_fetched = num_mine = 0
+ for name, klass in xpcom.components.classes.items():
+ num_fetched = num_fetched + 1
+ if name == prog_id:
+ assert klass.clsid == clsid, "Eeek - didn't get the correct IID - got %s" %klass.clsid
+ num_mine = num_mine + 1
+
+# xpcom appears to add charset info to the contractid!?
+# assert xpcom.components.classes[name].contractid == prog_id, "Expected '%s', got '%s'" % (prog_id, xpcom.components.classes[name].contractid)
+ # Check all the lengths match.
+ if len(xpcom.components.classes.keys()) == len(xpcom.components.classes.values()) == \
+ len(xpcom.components.classes.items()) == len(xpcom.components.classes) == \
+ num_fetched:
+ pass
+ else:
+ raise RuntimeError, "The collection lengths were wrong"
+ if num_fetched <= 0:
+ raise RuntimeError, "Didnt get any classes!!!"
+ if num_mine != 1:
+ raise RuntimeError, "Didnt find exactly 1 of my contractid! (%d)" % (num_mine,)
+
+def test_id():
+ id = xpcom.components.ID(str(xpcom._xpcom.IID_nsISupports))
+ assert id == xpcom._xpcom.IID_nsISupports
+
+# Make this test run under our std test suite
+def suite():
+ return suite_from_functions(test_interfaces, test_classes, test_id)
+
+if __name__=='__main__':
+ testmain()