*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,59 @@
#!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
CPPSRCS = \
nsXPIDLPlugin.cpp \
nsXPIDLPluginInstance.cpp \
nsXPIDLPluginStreamListener.cpp \
nsXPIDLPluginManager.cpp \
nsXPIDLPluginManager2.cpp \
nsXPIDLPluginInstancePeer.cpp \
nsXPIDLPluginTagInfo.cpp \
nsXPIDLPluginTagInfo2.cpp \
nsXPIDLPluginStreamInfo.cpp \
nsXPIDLInputStream.cpp \
nsXPIDLOutputStream.cpp \
$(NULL)
DSO_LDOPTS += \
$(XPCOM_LIBS) \
$(NSPR_LIBS) \
$(NULL)
include $(topsrcdir)/config/rules.mk
TARGETS = $(OBJS)
export:: $(TARGETS)

View File

@@ -0,0 +1,59 @@
#!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
CPPSRCS = \
nsXPIDLPlugin.cpp \
nsXPIDLPluginInstance.cpp \
nsXPIDLPluginStreamListener.cpp \
nsXPIDLPluginManager.cpp \
nsXPIDLPluginManager2.cpp \
nsXPIDLPluginInstancePeer.cpp \
nsXPIDLPluginTagInfo.cpp \
nsXPIDLPluginTagInfo2.cpp \
nsXPIDLPluginStreamInfo.cpp \
nsXPIDLInputStream.cpp \
nsXPIDLOutputStream.cpp \
$(NULL)
DSO_LDOPTS += \
$(XPCOM_LIBS) \
$(NSPR_LIBS) \
$(NULL)
include $(topsrcdir)/config/rules.mk
TARGETS = $(OBJS)
export:: $(TARGETS)

View File

@@ -0,0 +1,63 @@
/* -*- Mode: C++; 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 "nsXPIDLInputStream.h"
#include "nsIInputStream.h"
NS_IMPL_ISUPPORTS1(nsXPIDLInputStream, nsIXPIDLInputStream)
nsXPIDLInputStream::nsXPIDLInputStream()
{
NS_INIT_ISUPPORTS();
}
nsXPIDLInputStream::nsXPIDLInputStream( nsIInputStream *inputStream )
{
NS_INIT_ISUPPORTS();
this->inputStream = inputStream;
NS_ADDREF( inputStream );
}
nsXPIDLInputStream::~nsXPIDLInputStream()
{
NS_RELEASE( inputStream );
}
NS_IMETHODIMP
nsXPIDLInputStream::Close()
{
return inputStream->Close();
}
NS_IMETHODIMP
nsXPIDLInputStream::Available( PRUint32 *_retval )
{
return inputStream->Available( _retval );
}
NS_IMETHODIMP
nsXPIDLInputStream::Read( PRUint32 count,
PRUint8 *buf,
PRUint32 *_retval )
{
return inputStream->Read( (char *)buf, count, _retval );
}

View File

@@ -0,0 +1,42 @@
/* -*- Mode: C++; 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>
*/
#ifndef _nsXPIDLInputStream_included_
#define _nsXPIDLInputStream_included_
#include "nsIXPIDLInputStream.h"
#include "nsIInputStream.h"
class nsXPIDLInputStream : public nsIXPIDLInputStream
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIXPIDLINPUTSTREAM
nsXPIDLInputStream();
nsXPIDLInputStream( nsIInputStream *inputStream );
virtual ~nsXPIDLInputStream();
nsIInputStream *inputStream;
};
#endif // _nsXPIDLInputStream_included_

View File

@@ -0,0 +1,62 @@
/* -*- Mode: C++; 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 "nsXPIDLOutputStream.h"
NS_IMPL_ISUPPORTS1(nsXPIDLOutputStream, nsIXPIDLOutputStream)
nsXPIDLOutputStream::nsXPIDLOutputStream()
{
NS_INIT_ISUPPORTS();
}
nsXPIDLOutputStream::nsXPIDLOutputStream( nsIOutputStream *outputStream )
{
NS_INIT_ISUPPORTS();
this->outputStream = outputStream;
NS_ADDREF( outputStream );
}
nsXPIDLOutputStream::~nsXPIDLOutputStream()
{
NS_RELEASE( outputStream );
}
NS_IMETHODIMP
nsXPIDLOutputStream::Close()
{
return outputStream->Close();
}
NS_IMETHODIMP
nsXPIDLOutputStream::Flush()
{
return outputStream->Flush();
}
NS_IMETHODIMP
nsXPIDLOutputStream::Write( PRUint32 count,
PRUint8 *buf,
PRUint32 *_retval )
{
return outputStream->Write( (char *)buf, count, _retval );
}

View File

@@ -0,0 +1,42 @@
/* -*- Mode: C++; 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>
*/
#ifndef _nsXPIDLOutputStream_included_
#define _nsXPIDLOutputStream_included_
#include "nsIXPIDLOutputStream.h"
#include "nsIOutputStream.h"
class nsXPIDLOutputStream : public nsIXPIDLOutputStream
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIXPIDLOUTPUTSTREAM
nsXPIDLOutputStream();
nsXPIDLOutputStream( nsIOutputStream *outputStream );
virtual ~nsXPIDLOutputStream();
nsIOutputStream *outputStream;
};
#endif // _nsXPIDLOutputStream_included_

View File

@@ -0,0 +1,64 @@
/* -*- Mode: C++; 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 "nsIPlugin.h"
#include "nsXPIDLPlugin.h"
NS_IMPL_ISUPPORTS1(nsXPIDLPlugin, nsIPlugin)
nsXPIDLPlugin::nsXPIDLPlugin()
{
NS_INIT_ISUPPORTS();
}
nsXPIDLPlugin::nsXPIDLPlugin( nsIXPIDLPlugin *plugin )
{
NS_INIT_ISUPPORTS();
this->plugin = plugin;
NS_ADDREF( plugin );
}
nsXPIDLPlugin::~nsXPIDLPlugin()
{
NS_RELEASE( plugin );
}
NS_IMETHODIMP
nsXPIDLPlugin::CreatePluginInstance( nsISupports *aOuter,
REFNSIID aIID,
const char* aPluginMIMEType,
void **aResult )
{
return plugin->CreatePluginInstance( aOuter, aIID, aPluginMIMEType, aResult );
}
NS_IMETHODIMP
nsXPIDLPlugin::Initialize()
{
return plugin->Initialize();
}
NS_IMETHODIMP
nsXPIDLPlugin::Shutdown()
{
return plugin->Shutdown();
}

View File

@@ -0,0 +1,51 @@
/* -*- Mode: C++; 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>
*/
#ifndef _nsXPIDLPlugin_included_
#define _nsXPIDLPlugin_included_
#include "nsIPlugin.h"
#include "nsIXPIDLPlugin.h"
class nsXPIDLPlugin : public nsIPlugin
{
public:
NS_DECL_ISUPPORTS
// NS_DECL_NSIXPIDLPLUGIN
nsXPIDLPlugin();
nsXPIDLPlugin( nsIXPIDLPlugin *plugin );
virtual ~nsXPIDLPlugin();
nsIXPIDLPlugin *plugin;
// from nsIPlugin
NS_IMETHODIMP CreatePluginInstance( nsISupports *aOuter,
REFNSIID aIID,
const char* aPluginMIMEType,
void **aResult );
NS_IMETHODIMP Initialize();
NS_IMETHODIMP Shutdown();
};
#endif // _nsIXPIDLPlugin_included_

View File

@@ -0,0 +1,77 @@
/* -*- Mode: C++; 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 "nsIPluginInstance.h"
#include "nsXPIDLPluginInstance.h"
NS_IMPL_ISUPPORTS1(nsXPIDLPluginInstance, nsIPluginInstance)
nsXPIDLPluginInstance::nsXPIDLPluginInstance()
{
NS_INIT_ISUPPORTS();
}
nsXPIDLPluginInstance::nsXPIDLPluginInstance( nsIXPIDLPluginInstance *pluginInstance )
{
NS_INIT_ISUPPORTS();
this->pluginInstance = pluginInstance;
NS_ADDREF( pluginInstance );
}
nsXPIDLPluginInstance::~nsXPIDLPluginInstance()
{
NS_RELEASE( pluginInstance );
}
NS_IMETHODIMP
nsXPIDLPluginInstance::Destroy()
{
return pluginInstance->Destroy();
}
NS_IMETHODIMP
nsXPIDLPluginInstance::Initialize( nsIPluginInstancePeer *peer )
{
nsIXPIDLPluginInstancePeer *instPeer = new nsXPIDLPluginInstancePeer( peer );
return pluginInstance->Initialize( instPeer );
}
NS_IMETHODIMP
nsXPIDLPluginInstance::NewStream( nsIPluginStreamListener **_retval )
{
nsIXPIDLPluginStreamListener **sListener;
nsresult res = pluginInstance->NewStream( sListener );
*_retval = new nsXPIDLPluginStreamListener( *sListener );
return res;
}
NS_IMETHODIMP
nsXPIDLPluginInstance::Start()
{
return pluginInstance->Start();
}
NS_IMETHODIMP
nsXPIDLPluginInstance::Stop()
{
return pluginInstance->Stop();
}

View File

@@ -0,0 +1,54 @@
/* -*- Mode: C++; 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>
*/
#ifndef _nsXPIDLPluginInstance_included_
#define _nsXPIDLPluginInstance_included_
#include "nsIPluginInstance.h"
#include "nsIXPIDLPluginInstance.h"
#include "nsIPluginInstancePeer.h"
#include "nsXPIDLPluginInstancePeer.h"
#include "nsIPluginStreamListener.h"
#include "nsXPIDLPluginStreamListener.h"
class nsXPIDLPluginInstance : public nsIPluginInstance
{
public:
NS_DECL_ISUPPORTS
// NS_DECL_NSIXPIDLPLUGININSTANCE
nsXPIDLPluginInstance();
nsXPIDLPluginInstance( nsIXPIDLPluginInstance *pluginInstance );
virtual ~nsXPIDLPluginInstance();
nsIXPIDLPluginInstance *pluginInstance;
// from nsIPluginInstance
NS_IMETHODIMP Destroy();
NS_IMETHODIMP Initialize( nsIPluginInstancePeer *peer );
NS_IMETHODIMP NewStream( nsIPluginStreamListener **_retval );
NS_IMETHODIMP Start();
NS_IMETHODIMP Stop();
};
#endif // _nsXPIDLPluginInstance_included_

View File

@@ -0,0 +1,105 @@
/* -*- Mode: C++; 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 "nsIPluginInstancePeer.h"
#include "nsXPIDLPluginInstancePeer.h"
#include "nsIOutputStream.h"
#include "nsXPIDLOutputStream.h"
#include "nsIPluginTagInfo2.h"
#include "nsXPIDLPluginTagInfo2.h"
NS_IMPL_ISUPPORTS1(nsXPIDLPluginInstancePeer, nsIXPIDLPluginInstancePeer)
nsXPIDLPluginInstancePeer::nsXPIDLPluginInstancePeer()
{
NS_INIT_ISUPPORTS();
}
nsXPIDLPluginInstancePeer::nsXPIDLPluginInstancePeer( nsIPluginInstancePeer *pluginInstancePeer )
{
NS_INIT_ISUPPORTS();
this->pluginInstancePeer = pluginInstancePeer;
NS_ADDREF( pluginInstancePeer );
}
nsXPIDLPluginInstancePeer::~nsXPIDLPluginInstancePeer()
{
NS_RELEASE( pluginInstancePeer );
}
NS_IMETHODIMP
nsXPIDLPluginInstancePeer::GetMIMEType( char * *aMIMEType )
{
nsMIMEType *mimeType = (nsMIMEType *)aMIMEType;
return pluginInstancePeer->GetMIMEType( mimeType );
}
NS_IMETHODIMP
nsXPIDLPluginInstancePeer::GetMode( PRUint32 *aMode )
{
nsPluginMode *mode = (nsPluginMode *)aMode;
return pluginInstancePeer->GetMode( mode );
}
NS_IMETHODIMP
nsXPIDLPluginInstancePeer::GetTagInfo( nsIXPIDLPluginTagInfo2 * *aTagInfo )
{
nsIPluginTagInfo2 *tagInfo;
nsresult res = pluginInstancePeer->QueryInterface( NS_GET_IID(nsIPluginTagInfo2), (void **)&tagInfo );
if( NS_FAILED(res) ) {
*aTagInfo = NULL;
return res;
}
*aTagInfo = new nsXPIDLPluginTagInfo2( tagInfo );
return res;
}
NS_IMETHODIMP
nsXPIDLPluginInstancePeer::GetValue( PRInt32 variable, char **_retval )
{
nsPluginInstancePeerVariable var = (nsPluginInstancePeerVariable)variable;
return pluginInstancePeer->GetValue( var, (void *)*_retval );
}
NS_IMETHODIMP
nsXPIDLPluginInstancePeer::NewStream( const char *type,
const char *target,
nsIXPIDLOutputStream **_retval )
{
nsIOutputStream **oStream;
nsresult nsRes = pluginInstancePeer->NewStream( type, target, oStream );
*_retval = new nsXPIDLOutputStream( *oStream );
return nsRes;
}
NS_IMETHODIMP
nsXPIDLPluginInstancePeer::SetWindowSize( PRUint32 width, PRUint32 height )
{
return pluginInstancePeer->SetWindowSize( width, height );
}
NS_IMETHODIMP
nsXPIDLPluginInstancePeer::ShowStatus( const char *message )
{
return pluginInstancePeer->ShowStatus( message );
}

View File

@@ -0,0 +1,42 @@
/* -*- Mode: C++; 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>
*/
#ifndef _nsXPIDLPluginInstancePeer_included_
#define _nsXPIDLPluginInstancePeer_included_
#include "nsIXPIDLPluginInstancePeer.h"
#include "nsIPluginInstancePeer.h"
class nsXPIDLPluginInstancePeer : public nsIXPIDLPluginInstancePeer
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIXPIDLPLUGININSTANCEPEER
nsXPIDLPluginInstancePeer();
nsXPIDLPluginInstancePeer( nsIPluginInstancePeer *pluginInstancePeer );
virtual ~nsXPIDLPluginInstancePeer();
nsIPluginInstancePeer *pluginInstancePeer;
};
#endif // _nsXPIDLPluginInstancePeer_included_

View File

@@ -0,0 +1,106 @@
/* -*- Mode: C++; 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 "nsIPluginManager.h"
#include "nsXPIDLPluginManager.h"
#include "nsXPIDLPluginManager2.h"
#include "nsXPIDLPluginStreamListener.h"
NS_IMPL_ISUPPORTS1(nsXPIDLPluginManager, nsIXPIDLPluginManager)
nsXPIDLPluginManager::nsXPIDLPluginManager()
{
NS_INIT_ISUPPORTS();
}
nsXPIDLPluginManager::nsXPIDLPluginManager( nsIPluginManager *pluginManager )
{
NS_INIT_ISUPPORTS();
this->pluginManager = pluginManager;
NS_ADDREF( pluginManager );
}
nsXPIDLPluginManager::~nsXPIDLPluginManager()
{
NS_RELEASE( pluginManager );
}
NS_IMETHODIMP
nsXPIDLPluginManager::GetURL( nsISupports *pliginInstance,
const char *url,
const char *target,
nsIXPIDLPluginStreamListener *streamListener,
const char *altHost,
const char *referrer,
PRBool forceJSEnabled )
{
nsIPluginStreamListener *sListener = new nsXPIDLPluginStreamListener( streamListener );
return pluginManager->GetURL( pliginInstance,
(char *)url,
(char *)target,
sListener,
(char *)altHost,
(char *)referrer,
forceJSEnabled );
}
NS_IMETHODIMP
nsXPIDLPluginManager::PostURL( nsISupports *pliginInstance,
const char *url,
PRUint32 postDataLength,
PRUint8 *postData,
PRUint32 postHeadersLength,
const char *postHeaders,
PRBool isFile,
const char *target,
nsIXPIDLPluginStreamListener *streamListener,
const char *altHost,
const char *referrer,
PRBool forceJSEnabled )
{
nsIPluginStreamListener *sListener = new nsXPIDLPluginStreamListener( streamListener );
return pluginManager->PostURL( pliginInstance,
(char *)url,
postDataLength,
(char *)postData,
isFile,
(char *)target,
sListener,
(char *)altHost,
(char *)referrer,
forceJSEnabled,
postHeadersLength,
postHeaders );
}
NS_IMETHODIMP
nsXPIDLPluginManager::ReloadPlugins( PRBool reloadPages )
{
return pluginManager->ReloadPlugins( reloadPages );
}
NS_IMETHODIMP
nsXPIDLPluginManager::UserAgent( char **_retval )
{
return pluginManager->UserAgent( (const char **)_retval );
}

View File

@@ -0,0 +1,42 @@
/* -*- Mode: C++; 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>
*/
#ifndef _nsXPIDLPluginManager_included_
#define _nsXPIDLPluginManager_included_
#include "nsIXPIDLPluginManager.h"
#include "nsIPluginManager.h"
class nsXPIDLPluginManager : public nsIXPIDLPluginManager
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIXPIDLPLUGINMANAGER
nsXPIDLPluginManager();
nsXPIDLPluginManager( nsIPluginManager *pluginManager );
virtual ~nsXPIDLPluginManager();
nsIPluginManager *pluginManager;
};
#endif // _nsXPIDLPluginManager_included_

View File

@@ -0,0 +1,127 @@
/* -*- Mode: C++; 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 "nsXPIDLPluginManager2.h"
NS_IMPL_ISUPPORTS1(nsXPIDLPluginManager2, nsIXPIDLPluginManager2)
nsXPIDLPluginManager2::nsXPIDLPluginManager2()
{
NS_INIT_ISUPPORTS();
}
nsXPIDLPluginManager2::nsXPIDLPluginManager2( nsIPluginManager2 *pluginManager )
{
NS_INIT_ISUPPORTS();
this->pluginManager = pluginManager;
NS_ADDREF( pluginManager );
}
nsXPIDLPluginManager2::~nsXPIDLPluginManager2()
{
NS_RELEASE( pluginManager );
}
NS_IMETHODIMP
nsXPIDLPluginManager2::BeginWaitCursor()
{
return pluginManager->BeginWaitCursor();
}
NS_IMETHODIMP
nsXPIDLPluginManager2::EndWaitCursor()
{
return pluginManager->EndWaitCursor();
}
NS_IMETHODIMP
nsXPIDLPluginManager2::FindProxyForURL( const char *url, char **_retval )
{
return pluginManager->FindProxyForURL( url, _retval );
}
NS_IMETHODIMP
nsXPIDLPluginManager2::SupportsURLProtocol( const char *protocol,
PRBool *_retval )
{
return pluginManager->SupportsURLProtocol( protocol, _retval );
}
// from nsXPIDLPluginManager
NS_IMETHODIMP
nsXPIDLPluginManager2::GetURL( nsISupports *pliginInstance,
const char *url,
const char *target,
nsIXPIDLPluginStreamListener *streamListener,
const char *altHost,
const char *referrer,
PRBool forceJSEnabled )
{
return nsXPIDLPluginManager::GetURL( pliginInstance,
url,
target,
streamListener,
altHost,
referrer,
forceJSEnabled );
}
NS_IMETHODIMP
nsXPIDLPluginManager2::PostURL( nsISupports *pliginInstance,
const char *url,
PRUint32 postDataLength,
PRUint8 *postData,
PRUint32 postHeadersLength,
const char *postHeaders,
PRBool isFile,
const char *target,
nsIXPIDLPluginStreamListener *streamListener,
const char *altHost,
const char *referrer,
PRBool forceJSEnabled )
{
return nsXPIDLPluginManager::PostURL( pliginInstance,
url,
postDataLength,
postData,
postHeadersLength,
postHeaders,
isFile,
target,
streamListener,
altHost,
referrer,
forceJSEnabled );
}
NS_IMETHODIMP
nsXPIDLPluginManager2::ReloadPlugins( PRBool reloadPages )
{
return nsXPIDLPluginManager::ReloadPlugins( reloadPages );
}
NS_IMETHODIMP
nsXPIDLPluginManager2::UserAgent( char **_retval )
{
return nsXPIDLPluginManager::UserAgent( _retval );
}

View File

@@ -0,0 +1,45 @@
/* -*- Mode: C++; 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>
*/
#ifndef _nsXPIDLPluginManager2_included_
#define _nsXPIDLPluginManager2_included_
#include "nsIXPIDLPluginManager2.h"
#include "nsIPluginManager2.h"
#include "nsXPIDLPluginManager.h"
class nsXPIDLPluginManager2 : public nsXPIDLPluginManager, public nsIXPIDLPluginManager2
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIXPIDLPLUGINMANAGER2
NS_DECL_NSIXPIDLPLUGINMANAGER
nsXPIDLPluginManager2();
nsXPIDLPluginManager2( nsIPluginManager2 *pluginManager );
virtual ~nsXPIDLPluginManager2();
nsIPluginManager2 *pluginManager;
};
#endif // _nsXPIDLPluginManager2_included_

View File

@@ -0,0 +1,96 @@
/* -*- Mode: C++; 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 "nsXPIDLPluginStreamInfo.h"
NS_IMPL_ISUPPORTS1(nsXPIDLPluginStreamInfo, nsIXPIDLPluginStreamInfo)
nsXPIDLPluginStreamInfo::nsXPIDLPluginStreamInfo()
{
NS_INIT_ISUPPORTS();
}
nsXPIDLPluginStreamInfo::nsXPIDLPluginStreamInfo( nsIPluginStreamInfo *pluginStreamInfo )
{
NS_INIT_ISUPPORTS();
this->pluginStreamInfo = pluginStreamInfo;
NS_ADDREF( pluginStreamInfo );
}
nsXPIDLPluginStreamInfo::~nsXPIDLPluginStreamInfo()
{
NS_RELEASE( pluginStreamInfo );
}
NS_IMETHODIMP
nsXPIDLPluginStreamInfo::GetContentType( char * *aContentType )
{
return pluginStreamInfo->GetContentType( (nsMIMEType *)aContentType );
}
NS_IMETHODIMP
nsXPIDLPluginStreamInfo::GetLastModified( PRUint32 *aLastModified )
{
return pluginStreamInfo->GetLastModified( aLastModified );
}
NS_IMETHODIMP
nsXPIDLPluginStreamInfo::GetLength( PRUint32 *aLength )
{
return pluginStreamInfo->GetLength( aLength );
}
NS_IMETHODIMP
nsXPIDLPluginStreamInfo::GetURL( PRUnichar * *aURL )
{
return pluginStreamInfo->GetURL( (const char **)aURL );
}
NS_IMETHODIMP
nsXPIDLPluginStreamInfo::IsSeekable( PRBool *_retval )
{
return pluginStreamInfo->IsSeekable( _retval );
}
NS_IMETHODIMP
nsXPIDLPluginStreamInfo::RequestRead( PRUint32 count,
PRInt32 *offsets,
PRUint32 *lengths )
{
nsByteRange *rangeList, *last;
// rekolbasing data to nsByteRange structure
for( int i=0; i<count; i++ ) {
nsByteRange *newRange = new nsByteRange();
newRange->offset = offsets[i];
newRange->length = lengths[i];
newRange->next = NULL;
if( i == 0 ) rangeList = last = newRange;
else {
last->next = newRange;
last = last->next;
}
}
// make a call
return pluginStreamInfo->RequestRead( rangeList );
}

View File

@@ -0,0 +1,42 @@
/* -*- Mode: C++; 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>
*/
#ifndef _nsXPIDLPluginStreamInfo_included_
#define _nsXPIDLPluginStreamInfo_included_
#include "nsIXPIDLPluginStreamInfo.h"
#include "nsIPluginStreamInfo.h"
class nsXPIDLPluginStreamInfo : public nsIXPIDLPluginStreamInfo
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIXPIDLPLUGINSTREAMINFO
nsXPIDLPluginStreamInfo();
nsXPIDLPluginStreamInfo( nsIPluginStreamInfo *pluginStreamInfo );
virtual ~nsXPIDLPluginStreamInfo();
nsIPluginStreamInfo *pluginStreamInfo;
};
#endif // _nsXPIDLPluginStreamInfo_included_

View File

@@ -0,0 +1,82 @@
/* -*- Mode: C++; 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 "nsIPluginStreamListener.h"
#include "nsXPIDLPluginStreamListener.h"
NS_IMPL_ISUPPORTS1(nsXPIDLPluginStreamListener, nsIPluginStreamListener)
nsXPIDLPluginStreamListener::nsXPIDLPluginStreamListener()
{
NS_INIT_ISUPPORTS();
}
nsXPIDLPluginStreamListener::nsXPIDLPluginStreamListener( nsIXPIDLPluginStreamListener *pluginStreamListener )
{
NS_INIT_ISUPPORTS();
this->pluginStreamListener = pluginStreamListener;
NS_ADDREF( pluginStreamListener );
}
nsXPIDLPluginStreamListener::~nsXPIDLPluginStreamListener()
{
NS_RELEASE( pluginStreamListener );
}
NS_IMETHODIMP
nsXPIDLPluginStreamListener::GetStreamType( nsPluginStreamType *result )
{
return pluginStreamListener->GetStreamType( (PRUint32 *)result );
}
NS_IMETHODIMP
nsXPIDLPluginStreamListener::OnDataAvailable( nsIPluginStreamInfo *streamInfo,
nsIInputStream *input,
PRUint32 length )
{
nsIXPIDLPluginStreamInfo *sInfo = new nsXPIDLPluginStreamInfo( streamInfo );
nsIXPIDLInputStream *iStream = new nsXPIDLInputStream( input );
return pluginStreamListener->OnDataAvailable( sInfo, iStream, length );
}
NS_IMETHODIMP
nsXPIDLPluginStreamListener::OnFileAvailable( nsIPluginStreamInfo *streamInfo,
const char *fileName )
{
nsIXPIDLPluginStreamInfo *sInfo = new nsXPIDLPluginStreamInfo( streamInfo );
return pluginStreamListener->OnFileAvailable( sInfo, (PRUnichar *)fileName );
}
NS_IMETHODIMP
nsXPIDLPluginStreamListener::OnStartBinding( nsIPluginStreamInfo *streamInfo )
{
nsIXPIDLPluginStreamInfo *sInfo = new nsXPIDLPluginStreamInfo( streamInfo );
return pluginStreamListener->OnStartBinding( sInfo );
}
NS_IMETHODIMP
nsXPIDLPluginStreamListener::OnStopBinding( nsIPluginStreamInfo *streamInfo,
nsresult status )
{
nsIXPIDLPluginStreamInfo *sInfo = new nsXPIDLPluginStreamInfo( streamInfo );
return pluginStreamListener->OnStopBinding( sInfo, (PRInt32)status );
}

View File

@@ -0,0 +1,57 @@
/* -*- Mode: C++; 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>
*/
#ifndef _nsXPIDLPluginStreamListener_included_
#define _nsXPIDLPluginStreamListener_included_
#include "nsIPluginStreamListener.h"
#include "nsIXPIDLPluginStreamListener.h"
#include "nsIPluginStreamInfo.h"
#include "nsXPIDLPluginStreamInfo.h"
#include "nsIInputStream.h"
#include "nsXPIDLInputStream.h"
class nsXPIDLPluginStreamListener : public nsIPluginStreamListener
{
public:
NS_DECL_ISUPPORTS
// NS_DECL_NSIXPIDLPLUGINSTREAMLISTENER
nsXPIDLPluginStreamListener();
nsXPIDLPluginStreamListener( nsIXPIDLPluginStreamListener * pluginStreamListener );
virtual ~nsXPIDLPluginStreamListener();
nsIXPIDLPluginStreamListener * pluginStreamListener;
// from nsIPluginStreamListener
NS_IMETHODIMP GetStreamType( nsPluginStreamType *result );
NS_IMETHODIMP OnDataAvailable( nsIPluginStreamInfo *streamInfo,
nsIInputStream *input,
PRUint32 length );
NS_IMETHODIMP OnFileAvailable( nsIPluginStreamInfo *streamInfo,
const char *fileName );
NS_IMETHODIMP OnStartBinding( nsIPluginStreamInfo *streamInfo );
NS_IMETHODIMP OnStopBinding( nsIPluginStreamInfo *streamInfo, nsresult status );
};
#endif // _nsXPIDLPluginStreamListener_included_

View File

@@ -0,0 +1,56 @@
/* -*- Mode: C++; 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 "nsXPIDLPluginTagInfo.h"
NS_IMPL_ISUPPORTS1(nsXPIDLPluginTagInfo, nsIXPIDLPluginTagInfo)
nsXPIDLPluginTagInfo::nsXPIDLPluginTagInfo()
{
NS_INIT_ISUPPORTS();
}
nsXPIDLPluginTagInfo::nsXPIDLPluginTagInfo( nsIPluginTagInfo *tagInfo )
{
NS_INIT_ISUPPORTS();
this->tagInfo = tagInfo;
NS_ADDREF( tagInfo );
}
nsXPIDLPluginTagInfo::~nsXPIDLPluginTagInfo()
{
NS_RELEASE( tagInfo );
}
NS_IMETHODIMP
nsXPIDLPluginTagInfo::GetAttribute( const char *name, char **_retval )
{
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
nsXPIDLPluginTagInfo::GetAttributes( PRUint32 *count,
char ***names,
char ***values )
{
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@@ -0,0 +1,42 @@
/* -*- Mode: C++; 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>
*/
#ifndef _nsXPIDLPluginTagInfo_included_
#define _nsXPIDLPluginTagInfo_included_
#include "nsIXPIDLPluginTagInfo.h"
#include "nsIPluginTagInfo.h"
class nsXPIDLPluginTagInfo : public nsIXPIDLPluginTagInfo
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIXPIDLPLUGINTAGINFO
nsXPIDLPluginTagInfo();
nsXPIDLPluginTagInfo( nsIPluginTagInfo *tagInfo );
virtual ~nsXPIDLPluginTagInfo();
nsIPluginTagInfo *tagInfo;
};
#endif // _nsXPIDLPluginTagInfo_included_

View File

@@ -0,0 +1,133 @@
/* -*- Mode: C++; 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 "nsXPIDLPluginTagInfo2.h"
NS_IMPL_ISUPPORTS1(nsXPIDLPluginTagInfo2, nsIXPIDLPluginTagInfo2)
nsXPIDLPluginTagInfo2::nsXPIDLPluginTagInfo2()
{
NS_INIT_ISUPPORTS();
}
nsXPIDLPluginTagInfo2::nsXPIDLPluginTagInfo2( nsIPluginTagInfo2 *tagInfo )
{
NS_INIT_ISUPPORTS();
this->tagInfo = tagInfo;
NS_ADDREF( tagInfo );
}
nsXPIDLPluginTagInfo2::~nsXPIDLPluginTagInfo2()
{
NS_RELEASE( tagInfo );
}
NS_IMETHODIMP
nsXPIDLPluginTagInfo2::GetAlignment( char * *aAlignment )
{
return tagInfo->GetAlignment( (const char **)aAlignment );
}
NS_IMETHODIMP
nsXPIDLPluginTagInfo2::GetParameter( const char *name, char **_retval )
{
return tagInfo->GetParameter( name, (const char **)_retval );
}
NS_IMETHODIMP
nsXPIDLPluginTagInfo2::GetParameters( PRUint32 *count,
char ***names,
char ***values )
{
return tagInfo->GetParameters( (PRUint16)*count,
(const char*const*)*names,
(const char*const*)*values );
}
NS_IMETHODIMP
nsXPIDLPluginTagInfo2::GetBorderHorizSpace( PRUint32 *aBorderHorizSpace )
{
return tagInfo->GetBorderHorizSpace( aBorderHorizSpace );
}
NS_IMETHODIMP
nsXPIDLPluginTagInfo2::GetBorderVertSpace( PRUint32 *aBorderVertSpace )
{
return tagInfo->GetBorderVertSpace( aBorderVertSpace );
}
NS_IMETHODIMP
nsXPIDLPluginTagInfo2::GetDocumentBase( char * *aDocumentBase )
{
return tagInfo->GetDocumentBase( (const char **)aDocumentBase );
}
NS_IMETHODIMP
nsXPIDLPluginTagInfo2::GetDocumentEncoding( char * *aDocumentEncoding )
{
return tagInfo->GetDocumentEncoding( (const char**)aDocumentEncoding );
}
NS_IMETHODIMP
nsXPIDLPluginTagInfo2::GetHeight( PRUint32 *aHeight )
{
return tagInfo->GetHeight( aHeight );
}
NS_IMETHODIMP
nsXPIDLPluginTagInfo2::GetWidth( PRUint32 *aWidth )
{
return tagInfo->GetWidth( aWidth );
}
NS_IMETHODIMP
nsXPIDLPluginTagInfo2::GetTagText( char * *aTagText )
{
return tagInfo->GetTagText( (const char **)aTagText );
}
NS_IMETHODIMP
nsXPIDLPluginTagInfo2::GetTagType( char * *aTagType )
{
return tagInfo->GetTagType( (nsPluginTagType *)aTagType );
}
NS_IMETHODIMP
nsXPIDLPluginTagInfo2::GetUniqueID( PRUint32 *aUniqueID )
{
return tagInfo->GetUniqueID( aUniqueID );
}
// from TagInfo
NS_IMETHODIMP
nsXPIDLPluginTagInfo2::GetAttribute( const char *name, char **_retval )
{
return nsXPIDLPluginTagInfo::GetAttribute( name, _retval );
}
NS_IMETHODIMP
nsXPIDLPluginTagInfo2::GetAttributes( PRUint32 *count,
char ***names,
char ***values )
{
return nsXPIDLPluginTagInfo::GetAttributes( count, names, values );
}

View File

@@ -0,0 +1,45 @@
/* -*- Mode: C++; 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>
*/
#ifndef _nsXPIDLPluginTagInfo2_included_
#define _nsXPIDLPluginTagInfo2_included_
#include "nsIXPIDLPluginTagInfo2.h"
#include "nsIPluginTagInfo2.h"
#include "nsXPIDLPluginTagInfo.h"
class nsXPIDLPluginTagInfo2 : public nsXPIDLPluginTagInfo, public nsIXPIDLPluginTagInfo2
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIXPIDLPLUGINTAGINFO2
NS_DECL_NSIXPIDLPLUGINTAGINFO
nsXPIDLPluginTagInfo2();
nsXPIDLPluginTagInfo2( nsIPluginTagInfo2 *tagInfo );
virtual ~nsXPIDLPluginTagInfo2();
nsIPluginTagInfo2 *tagInfo;
};
#endif // _nsXPIDLPluginTagInfo2_included_

View File

@@ -0,0 +1,96 @@
#!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
IDLDIR = ../public
IDLSRCS = \
$(IDLDIR)/nsIXPIDLPlugin.idl \
$(IDLDIR)/nsIXPIDLPluginInstance.idl \
$(IDLDIR)/nsIXPIDLPluginStreamListener.idl \
$(IDLDIR)/nsIXPIDLPluginManager.idl \
$(IDLDIR)/nsIXPIDLPluginManager2.idl \
$(IDLDIR)/nsIXPIDLPluginInstancePeer.idl \
$(IDLDIR)/nsIXPIDLPluginTagInfo.idl \
$(IDLDIR)/nsIXPIDLPluginTagInfo2.idl \
$(IDLDIR)/nsIXPIDLPluginStreamInfo.idl \
$(IDLDIR)/nsIXPIDLInputStream.idl \
$(IDLDIR)/nsIXPIDLOutputStream.idl \
$(NULL)
IDLCLASSES = \
nsIXPIDLPlugin.class \
nsIXPIDLPluginInstance.class \
nsIXPIDLPluginStreamListener.class \
nsIXPIDLPluginManager.class \
nsIXPIDLPluginManager2.class \
nsIXPIDLPluginInstancePeer.class \
nsIXPIDLPluginTagInfo.class \
nsIXPIDLPluginTagInfo2.class \
nsIXPIDLPluginStreamInfo.class \
nsIXPIDLInputStream.class \
nsIXPIDLOutputStream.class \
$(NULL)
include $(topsrcdir)/config/rules.mk
.SUFFIXES: .java .idl
XPIDL_JAVA=$(IDLSRCS:.idl=.java)
.idl.java:
$(XPIDL_COMPILE) -m java -w -I$(DEPTH)/dist/idl/ $<
CLASSES = \
nsXPIDLPlugin.class \
nsXPIDLPluginInstance.class \
nsXPIDLPluginStreamListener.class \
nsXPIDLPluginInstancePeer.class \
nsXPIDLPluginTagInfo.class \
nsXPIDLPluginTagInfo2.class \
nsXPIDLPluginManager.class \
nsXPIDLPluginManager2.class \
nsXPIDLPluginStreamInfo.class \
nsXPIDLInputStream.class \
nsXPIDLOutputStream.class \
$(NULL)
.java.class:
$(JDKHOME)/bin/javac -classpath .:../../classes:$(DIST)/classes $<
build-java: $(IDLSRCS:.idl=.java)
build-classes: $(CLASSES)
export:: build-java build-classes
clean-java:
rm -f *class nsIXPIDL*.java
rm -rf _xpidlgen
clean:: clean-java

View File

@@ -0,0 +1,96 @@
#!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
IDLDIR = ../public
IDLSRCS = \
$(IDLDIR)/nsIXPIDLPlugin.idl \
$(IDLDIR)/nsIXPIDLPluginInstance.idl \
$(IDLDIR)/nsIXPIDLPluginStreamListener.idl \
$(IDLDIR)/nsIXPIDLPluginManager.idl \
$(IDLDIR)/nsIXPIDLPluginManager2.idl \
$(IDLDIR)/nsIXPIDLPluginInstancePeer.idl \
$(IDLDIR)/nsIXPIDLPluginTagInfo.idl \
$(IDLDIR)/nsIXPIDLPluginTagInfo2.idl \
$(IDLDIR)/nsIXPIDLPluginStreamInfo.idl \
$(IDLDIR)/nsIXPIDLInputStream.idl \
$(IDLDIR)/nsIXPIDLOutputStream.idl \
$(NULL)
IDLCLASSES = \
nsIXPIDLPlugin.class \
nsIXPIDLPluginInstance.class \
nsIXPIDLPluginStreamListener.class \
nsIXPIDLPluginManager.class \
nsIXPIDLPluginManager2.class \
nsIXPIDLPluginInstancePeer.class \
nsIXPIDLPluginTagInfo.class \
nsIXPIDLPluginTagInfo2.class \
nsIXPIDLPluginStreamInfo.class \
nsIXPIDLInputStream.class \
nsIXPIDLOutputStream.class \
$(NULL)
include $(topsrcdir)/config/rules.mk
.SUFFIXES: .java .idl
XPIDL_JAVA=$(IDLSRCS:.idl=.java)
.idl.java:
$(XPIDL_COMPILE) -m java -w -I$(DEPTH)/dist/idl/ $<
CLASSES = \
nsXPIDLPlugin.class \
nsXPIDLPluginInstance.class \
nsXPIDLPluginStreamListener.class \
nsXPIDLPluginInstancePeer.class \
nsXPIDLPluginTagInfo.class \
nsXPIDLPluginTagInfo2.class \
nsXPIDLPluginManager.class \
nsXPIDLPluginManager2.class \
nsXPIDLPluginStreamInfo.class \
nsXPIDLInputStream.class \
nsXPIDLOutputStream.class \
$(NULL)
.java.class:
$(JDKHOME)/bin/javac -classpath .:../../classes:$(DIST)/classes $<
build-java: $(IDLSRCS:.idl=.java)
build-classes: $(CLASSES)
export:: build-java build-classes
clean-java:
rm -f *class nsIXPIDL*.java
rm -rf _xpidlgen
clean:: clean-java

View File

@@ -0,0 +1,56 @@
/* -*- Mode: C++; 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>
*/
import org.mozilla.xpcom.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
import java.io.*;
public class nsXPIDLInputStream extends InputStream {
public nsIXPIDLInputStream inputStream;
public nsXPIDLInputStream( nsIXPIDLInputStream inputStream ) {
this.inputStream = inputStream;
}
public void close() {
inputStream.close();
}
public int available() {
return inputStream.available();
}
public int read(byte[] b, int off, int len) throws IOException {
return inputStream.read( len, b );
}
public int read() throws IOException {
byte buf[] = new byte[1];
if( read( buf, 0, 1 ) < 0 ) {
return -1;
} else {
return buf[0] & 0xff;
}
}
}

View File

@@ -0,0 +1,53 @@
/* -*- Mode: C++; 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>
*/
import org.mozilla.xpcom.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
import java.io.*;
public class nsXPIDLOutputStream extends OutputStream {
public nsIXPIDLOutputStream outputStream;
public nsXPIDLOutputStream( nsIXPIDLOutputStream outputStream ) {
this.outputStream = outputStream;
}
public void close() {
outputStream.close();
}
public void flush() {
outputStream.flush();
}
public void write(byte[] b, int off, int len) throws IOException {
outputStream.write( len, b );
}
public void write( int b ) throws IOException {
byte buf[] = new byte[1];
buf[0] = (byte)b;
write( buf, 0, 1 );
}
}

View File

@@ -0,0 +1,68 @@
/* -*- Mode: C++; 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>
*/
import org.mozilla.xpcom.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
public class nsXPIDLPlugin implements nsIXPIDLPlugin {
public PlugletFactory plugin;
public nsXPIDLPlugin( PlugletFactory plugin ) {
this.plugin = plugin;
}
public Object createPluginInstance( nsISupports aOuter,
IID iid,
String pluginMIMEType ) {
return plugin.createPluglet( pluginMIMEType );
}
public void initialize() {
// ??? Where can I take PlugletManager in this place?
}
public void shutdown() {
plugin.shutdown();
}
// from nsIFactory
public void lockFactory( boolean lock ) {
}
public Object createInstance( nsISupports instance, IID iid ) {
return createPluginInstance( instance, iid, null );
}
// from nsISupports
public Object queryInterface( IID iid ) {
Object result;
if( nsISupports.IID.equals(iid)
|| nsIXPIDLPlugin.IID.equals(iid) ) {
result = this;
} else {
result = null;
}
return result;
}
}

View File

@@ -0,0 +1,67 @@
/* -*- Mode: C++; 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>
*/
import org.mozilla.xpcom.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
public class nsXPIDLPluginInstance implements nsIXPIDLPluginInstance {
public Pluglet instance;
public nsXPIDLPluginInstance( Pluglet instance ) {
this.instance = instance;
}
public void destroy() {
instance.destroy();
}
public void initialize( nsIXPIDLPluginInstancePeer peer ) {
PlugletPeer pPeer = new nsXPIDLPluginInstancePeer( peer );
instance.initialize( pPeer );
}
public nsIXPIDLPluginStreamListener newStream() {
return new nsXPIDLPluginStreamListener( instance.newStream() );
}
public void start() {
instance.start();
}
public void stop() {
instance.stop();
}
// from nsISupports
public Object queryInterface( IID iid ) {
Object result;
if( nsISupports.IID.equals(iid)
|| nsIXPIDLPluginInstance.IID.equals(iid) ) {
result = this;
} else {
result = null;
}
return result;
}
}

View File

@@ -0,0 +1,62 @@
/* -*- Mode: C++; 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>
*/
import org.mozilla.xpcom.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
public class nsXPIDLPluginInstancePeer implements PlugletPeer {
public nsIXPIDLPluginInstancePeer instancePeer;
public nsXPIDLPluginInstancePeer( nsIXPIDLPluginInstancePeer instancePeer ) {
this.instancePeer = instancePeer;
}
public java.lang.String getMIMEType() {
return instancePeer.getMIMEType();
}
public int getMode() {
return instancePeer.getMode();
}
public java.lang.String getValue(int variable) {
return instancePeer.getValue( variable );
}
public java.io.OutputStream newStream(java.lang.String type, java.lang.String target) {
return new nsXPIDLOutputStream( instancePeer.newStream( type, target ) );
}
public void setWindowSize( int width, int height) {
instancePeer.setWindowSize( width, height );
}
public void showStatus( java.lang.String message ) {
instancePeer.showStatus( message );
}
public PlugletTagInfo getTagInfo() {
return new nsXPIDLPluginTagInfo2( instancePeer.getTagInfo() );
}
}

View File

@@ -0,0 +1,91 @@
/* -*- Mode: C++; 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>
*/
import org.mozilla.xpcom.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
public class nsXPIDLPluginManager implements PlugletManager {
public nsIXPIDLPluginManager pluginManager;
public nsXPIDLPluginManager() {
}
public nsXPIDLPluginManager( nsIXPIDLPluginManager pluginManager ) {
this.pluginManager = pluginManager;
}
public void getURL( Pluglet pluglet,
java.net.URL url,
java.lang.String target,
PlugletStreamListener streamListener,
java.lang.String altHost,
java.net.URL referrer,
boolean forceJSEnabled ) {
nsISupports pInstance = new nsXPIDLPluginInstance( pluglet );
nsIXPIDLPluginStreamListener sListener = new nsXPIDLPluginStreamListener( streamListener );
pluginManager.getURL( pInstance,
url.toString(),
target,
sListener,
altHost,
referrer.toString(),
forceJSEnabled );
}
public void postURL( Pluglet pluglet,
java.net.URL url,
int postDataLen,
byte[] postData,
boolean isFile,
java.lang.String target,
PlugletStreamListener streamListener,
java.lang.String altHost,
java.net.URL referrer,
boolean forceJSEnabled,
int postHeadersLength,
byte[] postHeaders) {
nsISupports pInstance = new nsXPIDLPluginInstance( pluglet );
nsIXPIDLPluginStreamListener sListener = new nsXPIDLPluginStreamListener( streamListener );
pluginManager.postURL( pInstance,
url.toString(),
postDataLen,
postData,
postHeadersLength,
new String(postHeaders),
isFile,
target,
sListener,
altHost,
referrer.toString(),
forceJSEnabled );
}
public void reloadPluglets( boolean reloadPages ) {
pluginManager.reloadPlugins( reloadPages );
}
public java.lang.String userAgent() {
return pluginManager.userAgent();
}
}

View File

@@ -0,0 +1,54 @@
/* -*- Mode: C++; 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>
*/
import org.mozilla.xpcom.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
public class nsXPIDLPluginManager2 extends nsXPIDLPluginManager implements PlugletManager2 {
public nsIXPIDLPluginManager2 pluginManager;
public nsXPIDLPluginManager2( nsIXPIDLPluginManager2 pluginManager ) {
this.pluginManager = pluginManager;
}
public void beginWaitCursor() {
pluginManager.beginWaitCursor();
}
public void endWaitCursor() {
pluginManager.endWaitCursor();
}
public String findProxyForURL( java.net.URL url ) {
return pluginManager.findProxyForURL( url.toString() );
}
public boolean supportsURLProtocol( String protocol ) {
return pluginManager.supportsURLProtocol( protocol );
}
public boolean isURLProtocolSupported( String protocol ) {
return pluginManager.supportsURLProtocol( protocol );
}
}

View File

@@ -0,0 +1,57 @@
/* -*- Mode: C++; 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>
*/
import org.mozilla.xpcom.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
public class nsXPIDLPluginStreamInfo implements PlugletStreamInfo {
public nsIXPIDLPluginStreamInfo streamInfo;
public nsXPIDLPluginStreamInfo( nsIXPIDLPluginStreamInfo streamInfo ) {
this.streamInfo = streamInfo;
}
public java.lang.String getContentType() {
return streamInfo.getContentType();
}
public int getLastModified() {
return streamInfo.getLastModified();
}
public int getLength() {
return streamInfo.getLength();
}
public java.lang.String getURL() {
return streamInfo.getURL();
}
public boolean isSeekable() {
return streamInfo.isSeekable();
}
public void requestRead( ByteRanges ranges ) {
}
}

View File

@@ -0,0 +1,74 @@
/* -*- Mode: C++; 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>
*/
import org.mozilla.xpcom.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
public class nsXPIDLPluginStreamListener implements nsIXPIDLPluginStreamListener {
public PlugletStreamListener streamListener;
public nsXPIDLPluginStreamListener( PlugletStreamListener streamListener ) {
this.streamListener = streamListener;
}
public int getStreamType() {
return streamListener.getStreamType();
}
public void onDataAvailable( nsIXPIDLPluginStreamInfo streamInfo,
nsIXPIDLInputStream input,
int length) {
PlugletStreamInfo sInfo = new nsXPIDLPluginStreamInfo( streamInfo );
java.io.InputStream iStream = new nsXPIDLInputStream( input );
streamListener.onDataAvailable( sInfo, iStream, length );
}
public void onFileAvailable( nsIXPIDLPluginStreamInfo streamInfo,
String fileName ) {
PlugletStreamInfo sInfo = new nsXPIDLPluginStreamInfo( streamInfo );
streamListener.onFileAvailable( sInfo, fileName );
}
public void onStartBinding( nsIXPIDLPluginStreamInfo streamInfo ) {
PlugletStreamInfo sInfo = new nsXPIDLPluginStreamInfo( streamInfo );
streamListener.onStartBinding( sInfo );
}
public void onStopBinding( nsIXPIDLPluginStreamInfo streamInfo, int status) {
PlugletStreamInfo sInfo = new nsXPIDLPluginStreamInfo( streamInfo );
streamListener.onStopBinding( sInfo, status );
}
// from nsISupports
public Object queryInterface( IID iid ) {
Object result;
if( nsISupports.IID.equals(iid)
|| nsIXPIDLPluginStreamListener.IID.equals(iid) ) {
result = this;
} else {
result = null;
}
return result;
}
}

View File

@@ -0,0 +1,55 @@
/* -*- Mode: C++; 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>
*/
import org.mozilla.xpcom.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
public class nsXPIDLPluginTagInfo implements PlugletTagInfo {
public nsIXPIDLPluginTagInfo tagInfo;
public String getAttribute( String name ) {
return tagInfo.getAttribute( name );
}
public java.util.Properties getAttributes() {
// get atts
int[] count = new int[1];
String[][] names = new String[1][];
String[][] values = new String[1][];
tagInfo.getAttributes( count, names, values );
// create props
java.util.Properties props = new java.util.Properties();
for( int i = 0; i < count[0]; i++ ) {
props.setProperty( names[0][i], values[0][i] );
}
// return props
return props;
}
public Object getDOMElement() {
return null;
}
}

View File

@@ -0,0 +1,99 @@
/* -*- Mode: C++; 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>
*/
import org.mozilla.xpcom.*;
import org.mozilla.pluglet.*;
import org.mozilla.pluglet.mozilla.*;
public class nsXPIDLPluginTagInfo2 extends nsXPIDLPluginTagInfo implements PlugletTagInfo2 {
public nsIXPIDLPluginTagInfo2 tagInfo;
public nsXPIDLPluginTagInfo2( nsIXPIDLPluginTagInfo2 tagInfo ) {
this.tagInfo = tagInfo;
}
public String getAlignment() {
return tagInfo.getAlignment();
}
public String getParameter( String name ) {
return tagInfo.getParameter( name );
}
public java.util.Properties getParameters() {
// get atts
int[] count = new int[1];
String[][] names = new String[1][];
String[][] values = new String[1][];
tagInfo.getParameters( count, names, values );
// create props
java.util.Properties props = new java.util.Properties();
for( int i = 0; i < count[0]; i++ ) {
props.setProperty( names[0][i], values[0][i] );
}
// return props
return props;
}
public int getBorderHorizSpace() {
return tagInfo.getBorderHorizSpace();
}
public int getBorderVertSpace() {
return tagInfo.getBorderVertSpace();
}
public String getDocumentBase() {
return tagInfo.getDocumentBase();
}
public String getDocumentEncoding() {
return tagInfo.getDocumentEncoding();
}
public String getTagText() {
return tagInfo.getTagText();
}
public String getTagType() {
return tagInfo.getTagType();
}
public int getUniqueID() {
return tagInfo.getUniqueID();
}
public int getHeight() {
return tagInfo.getHeight();
}
public int getWidth() {
return tagInfo.getWidth();
}
public Object getDOMElement() {
return null;
}
}

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;
};