*not part of the build*

scriptable wrappers for plugin API
a=sep@sparc.spb.su


git-svn-id: svn://10.0.0.236/trunk@98793 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
idk%eng.sun.com
2001-07-06 06:45:11 +00:00
parent 06d7c27a90
commit 544599af51
50 changed files with 3065 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
#!gmake
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# 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 mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Serge Pikalev <sep@sparc.spb.su>
#
DEPTH = ../../../..
topsrcdir = ../../../..
srcdir = .
VPATH = .
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/config.mk
XPIDL_MODULE = bcPluginWrappers
XPIDLSRCS = \
nsIXPIDLPlugin.idl \
nsIXPIDLPluginInstance.idl \
nsIXPIDLPluginStreamListener.idl \
nsIXPIDLPluginManager.idl \
nsIXPIDLPluginManager2.idl \
nsIXPIDLPluginInstancePeer.idl \
nsIXPIDLPluginTagInfo.idl \
nsIXPIDLPluginTagInfo2.idl \
nsIXPIDLPluginStreamInfo.idl \
nsIXPIDLInputStream.idl \
nsIXPIDLOutputStream.idl \
$(NULL)
DSO_LDOPTS += \
$(XPCOM_LIBS) \
$(NSPR_LIBS) \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,54 @@
#!gmake
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# 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 mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# Serge Pikalev <sep@sparc.spb.su>
#
DEPTH = ../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/config.mk
XPIDL_MODULE = bcPluginWrappers
XPIDLSRCS = \
nsIXPIDLPlugin.idl \
nsIXPIDLPluginInstance.idl \
nsIXPIDLPluginStreamListener.idl \
nsIXPIDLPluginManager.idl \
nsIXPIDLPluginManager2.idl \
nsIXPIDLPluginInstancePeer.idl \
nsIXPIDLPluginTagInfo.idl \
nsIXPIDLPluginTagInfo2.idl \
nsIXPIDLPluginStreamInfo.idl \
nsIXPIDLInputStream.idl \
nsIXPIDLOutputStream.idl \
$(NULL)
DSO_LDOPTS += \
$(XPCOM_LIBS) \
$(NSPR_LIBS) \
$(NULL)
include $(topsrcdir)/config/rules.mk

View File

@@ -0,0 +1,34 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Sun Microsystems,
* Inc. Portions created by Sun are
* Copyright (C) 1999 Sun Microsystems, Inc. All
* Rights Reserved.
*
* Contributor(s):
* Serge Pikalev <sep@sparc.spb.su>
*/
#include "nsISupports.idl"
#pragma prefix
[scriptable, uuid(b3199ec2-37c6-4c41-9e18-2a655bc4400e)]
interface nsIXPIDLInputStream : nsISupports
{
void close();
unsigned long available();
unsigned long read( in unsigned long count,
[array, size_is(count)] in octet buf );
};

View File

@@ -0,0 +1,34 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Sun Microsystems,
* Inc. Portions created by Sun are
* Copyright (C) 1999 Sun Microsystems, Inc. All
* Rights Reserved.
*
* Contributor(s):
* Serge Pikalev <sep@sparc.spb.su>
*/
#include "nsISupports.idl"
#pragma prefix
[scriptable, uuid(5be17648-6b93-4a17-9d2e-e2fdcff738ee)]
interface nsIXPIDLOutputStream : nsISupports
{
void close();
void flush();
unsigned long write( in unsigned long count,
[array, size_is(count)] in octet buf );
};

View File

@@ -0,0 +1,36 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Sun Microsystems,
* Inc. Portions created by Sun are
* Copyright (C) 1999 Sun Microsystems, Inc. All
* Rights Reserved.
*
* Contributor(s):
* Serge Pikalev <sep@sparc.spb.su>
*/
#include "nsIFactory.idl"
#pragma prefix
[scriptable, uuid(41019dc6-8d53-41fb-b70a-feaa72cfd48b)]
interface nsIXPIDLPlugin : nsIFactory
{
void createPluginInstance(in nsISupports aOuter,
in nsIIDRef iid,
in string pluginMIMEType,
[retval, iid_is(iid)] out nsQIResult result);
void initialize();
void shutdown();
};

View File

@@ -0,0 +1,40 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Sun Microsystems,
* Inc. Portions created by Sun are
* Copyright (C) 1999 Sun Microsystems, Inc. All
* Rights Reserved.
*
* Contributor(s):
* Serge Pikalev <sep@sparc.spb.su>
*/
#include "nsISupports.idl"
#include "nsIXPIDLPluginInstancePeer.idl"
#include "nsIXPIDLPluginStreamListener.idl"
#pragma prefix
[scriptable, uuid(31e78e3a-dcd1-425e-a938-e04260771738)]
interface nsIXPIDLPluginInstance : nsISupports
{
void destroy();
void initialize( in nsIXPIDLPluginInstancePeer peer );
nsIXPIDLPluginStreamListener newStream();
// void print( ... );
// void setWindow( ... );
void start();
void stop();
};

View File

@@ -0,0 +1,41 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Sun Microsystems,
* Inc. Portions created by Sun are
* Copyright (C) 1999 Sun Microsystems, Inc. All
* Rights Reserved.
*
* Contributor(s):
* Serge Pikalev <sep@sparc.spb.su>
*/
#include "nsISupports.idl"
#include "nsIXPIDLPluginTagInfo2.idl"
#include "nsIXPIDLOutputStream.idl"
#pragma prefix
[scriptable, uuid(20cb8d75-b224-46a5-a30f-73a65445e9b3)]
interface nsIXPIDLPluginInstancePeer : nsISupports
{
readonly attribute string MIMEType;
readonly attribute unsigned long mode;
readonly attribute nsIXPIDLPluginTagInfo2 tagInfo;
string getValue( in long variable );
nsIXPIDLOutputStream newStream( in string type, in string target );
void setWindowSize( in unsigned long width,
in unsigned long height );
void showStatus( in string message );
};

View File

@@ -0,0 +1,53 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Sun Microsystems,
* Inc. Portions created by Sun are
* Copyright (C) 1999 Sun Microsystems, Inc. All
* Rights Reserved.
*
* Contributor(s):
* Serge Pikalev <sep@sparc.spb.su>
*/
#include "nsISupports.idl"
#include "nsIXPIDLPluginStreamListener.idl"
#pragma prefix
[scriptable, uuid(f17f6008-e31f-4410-b59b-0bd7df4e4f9b)]
interface nsIXPIDLPluginManager : nsISupports
{
void getURL( in nsISupports pliginInstance,
in string url,
in string target,
in nsIXPIDLPluginStreamListener streamListener,
in string altHost,
in string referrer,
in boolean forceJSEnabled );
void postURL( in nsISupports pliginInstance,
in string url,
in unsigned long postDataLength,
[array, size_is(postDataLength)] in octet postData,
in unsigned long postHeadersLength,
in string postHeaders,
in boolean isFile,
in string target,
in nsIXPIDLPluginStreamListener streamListener,
in string altHost,
in string referrer,
in boolean forceJSEnabled );
void reloadPlugins( in boolean reloadPages );
string userAgent();
};

View File

@@ -0,0 +1,34 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Sun Microsystems,
* Inc. Portions created by Sun are
* Copyright (C) 1999 Sun Microsystems, Inc. All
* Rights Reserved.
*
* Contributor(s):
* Serge Pikalev <sep@sparc.spb.su>
*/
#include "nsIXPIDLPluginManager.idl"
#pragma prefix
[scriptable, uuid(33731e21-dfe3-4abc-b921-8cd6ccfb0e32)]
interface nsIXPIDLPluginManager2 : nsIXPIDLPluginManager
{
void beginWaitCursor();
void endWaitCursor();
string findProxyForURL( in string url );
boolean supportsURLProtocol( in string protocol );
};

View File

@@ -0,0 +1,38 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Sun Microsystems,
* Inc. Portions created by Sun are
* Copyright (C) 1999 Sun Microsystems, Inc. All
* Rights Reserved.
*
* Contributor(s):
* Serge Pikalev <sep@sparc.spb.su>
*/
#include "nsISupports.idl"
#pragma prefix
[scriptable, uuid(1bd1e109-7b4c-4820-a80d-2e04b709e74a)]
interface nsIXPIDLPluginStreamInfo : nsISupports
{
readonly attribute string contentType;
readonly attribute unsigned long lastModified;
readonly attribute unsigned long length;
readonly attribute wstring URL;
boolean isSeekable();
void requestRead( in unsigned long count,
[array, size_is(count)] in long offsets,
[array, size_is(count)] in unsigned long lengths );
};

View File

@@ -0,0 +1,48 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Sun Microsystems,
* Inc. Portions created by Sun are
* Copyright (C) 1999 Sun Microsystems, Inc. All
* Rights Reserved.
*
* Contributor(s):
* Serge Pikalev <sep@sparc.spb.su>
*/
#include "nsISupports.idl"
#include "nsIXPIDLPluginStreamInfo.idl"
#include "nsIXPIDLInputStream.idl"
#pragma prefix
[scriptable, uuid(c26d873a-9a7d-48D2-8a52-e6d67eafd9c9)]
interface nsIXPIDLPluginStreamListener : nsISupports
{
const unsigned long STREAM_TYPE_NORMAL = 1;
const unsigned long STREAM_TYPE_SEEK = 2;
const unsigned long STREAM_TYPE_AS_FILE = 3;
const unsigned long STREAM_TYPE_AS_FILE_ONLY = 4;
readonly attribute unsigned long streamType;
void onDataAvailable( in nsIXPIDLPluginStreamInfo streamInfo,
in nsIXPIDLInputStream input,
in unsigned long length );
void onFileAvailable( in nsIXPIDLPluginStreamInfo streamInfo,
in wstring fileName );
void onStartBinding( in nsIXPIDLPluginStreamInfo streamInfo );
void onStopBinding( in nsIXPIDLPluginStreamInfo streamInfo,
in long status );
};

View File

@@ -0,0 +1,34 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Sun Microsystems,
* Inc. Portions created by Sun are
* Copyright (C) 1999 Sun Microsystems, Inc. All
* Rights Reserved.
*
* Contributor(s):
* Serge Pikalev <sep@sparc.spb.su>
*/
#include "nsISupports.idl"
#pragma prefix
[scriptable, uuid(b6506c8a-aaa7-4dd7-a3aa-cb3632f40a48)]
interface nsIXPIDLPluginTagInfo : nsISupports
{
string getAttribute( in string name );
void getAttributes( out unsigned long count,
[array, size_is(count)] out string names,
[array, size_is(count)] out string values );
};

View File

@@ -0,0 +1,44 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Sun Microsystems,
* Inc. Portions created by Sun are
* Copyright (C) 1999 Sun Microsystems, Inc. All
* Rights Reserved.
*
* Contributor(s):
* Serge Pikalev <sep@sparc.spb.su>
*/
#include "nsIXPIDLPluginTagInfo.idl"
#pragma prefix
[scriptable, uuid(144542ea-52a5-466f-ac65-a34ecbd9966e)]
interface nsIXPIDLPluginTagInfo2 : nsIXPIDLPluginTagInfo
{
readonly attribute string alignment;
string getParameter( in string name );
void getParameters( out unsigned long count,
[array, size_is(count)] out string names,
[array, size_is(count)] out string values );
readonly attribute unsigned long borderHorizSpace;
readonly attribute unsigned long borderVertSpace;
readonly attribute string documentBase;
readonly attribute string documentEncoding;
readonly attribute unsigned long height;
readonly attribute unsigned long width;
readonly attribute string tagText;
readonly attribute string tagType;
readonly attribute unsigned long uniqueID;
};