1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_mozilla_XPluginInstancePeer_idl__
24#define __com_sun_star_mozilla_XPluginInstancePeer_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_io_XActiveDataSource_idl__
31#include <com/sun/star/io/XActiveDataSource.idl>
32#endif
33
34#ifndef __com_sun_star_io_XInputStream_idl__
35#include <com/sun/star/io/XInputStream.idl>
36#endif
37
38#ifndef __com_sun_star_lang_XMultiServiceFactory_idl__
39#include <com/sun/star/lang/XMultiServiceFactory.idl>
40#endif
41
42//=============================================================================
43
44 module com {  module sun {  module star {  module mozilla {
45
46//=============================================================================
47
48 published interface XPluginInstanceNotifySink;
49
50//=============================================================================
51
52
53// DocMerge from xml: interface com::sun::star::mozilla::XPluginInstancePeer
54/** Allows to communicate with a plugin from the office side.
55	This interface is oriented for communication with browsers plugins.
56 */
57published interface XPluginInstancePeer: com::sun::star::uno::XInterface
58{
59	//-------------------------------------------------------------------------
60
61
62	// DocMerge from xml: method com::sun::star::mozilla::XPluginInstancePeer::setWindowSize
63	/** Alters the plugin's window size in the browser window.
64
65		@param width	[in]: the new window width
66		@param height	[in]: the new window height
67
68		@return <CODE>TRUE</CODE> on success
69	 */
70	boolean setWindowSize( [in] long width, [in] long heigth );
71
72	//-------------------------------------------------------------------------
73
74
75	// DocMerge from xml: method com::sun::star::mozilla::XPluginInstancePeer::showStatusMessage
76	/** Show status / hint message in browser's message area.
77
78		@param message	[in]: the string to be displayed
79	 */
80	[oneway] void showStatusMessage( [in] string message );
81
82	//-------------------------------------------------------------------------
83
84
85	// DocMerge from xml: method com::sun::star::mozilla::XPluginInstancePeer::enableScripting
86	/** Indicates to the plugin that the document was loaded successfully and scripting
87		interfaces are now available.
88
89		@param document			[in]: the active document
90		@param servicemanager	[in]: the office servicemanager
91
92	 */
93	[oneway] void enableScripting( [in] com::sun::star::uno::XInterface document, [in] com::sun::star::lang::XMultiServiceFactory servicemanager );
94
95	//-------------------------------------------------------------------------
96
97
98	// DocMerge from xml: method com::sun::star::mozilla::XPluginInstancePeer::newStream
99	/** Creates a new stream of data produced by the plug-in and consumed by
100		the browser.
101
102		@param MIMEDesc	[in]:	the MIME type of the plug-in to create
103		@param target	[in]:	the name of the target window or frame (supports _blank, _self)
104		@param data		[in]:	on success the outputstream will be	associated with this instance
105
106	 */
107	[oneway] void newStream(
108		[in] string MIMEDesc,
109		[in] string target,
110		[in] com::sun::star::io::XActiveDataSource data
111	);
112
113	//-------------------------------------------------------------------------
114
115
116	// DocMerge from xml: method com::sun::star::mozilla::XPluginInstancePeer::getURL
117	/** Fetches an URL into the target window. The parameters and their meaning map to the
118		corresponding Netscape-API call.
119
120		@param aURL				[in]: the URL to be fetched
121		@param target			[in]: the name of the target window or frame (supports _blank, _self)
122		@param alternativeHost	[in]: alternativeHost
123		@param referrer			[in]: referrer
124		@param sink				[in]: the sink is notified on success
125
126	 */
127	[oneway] void getURL (
128		[in] string aURL,
129		[in] string target,
130		[in] string alternativeHost,
131		[in] string referrer,
132		[in] XPluginInstanceNotifySink sink
133	);
134
135	//-------------------------------------------------------------------------
136
137
138	// DocMerge from xml: method com::sun::star::mozilla::XPluginInstancePeer::postURL
139	/** Posts to a URL with post data and/or post headers. The parameters and their meaning
140		map to the corresponding Netscape-API call.
141
142		@param aURL				[in]: the URL to be posted to
143		@param postData			[in]: the data to be posted
144		@param target			[in]: the name of the target window or frame (supports _blank, _self)
145		@param alternativeHost	[in]: alternativeHost
146		@param referrer			[in]: referrer
147		@param postHeaders		[in]: the header to be posted
148		@param sink				[in]: the sink is notified on success
149
150	 */
151	[oneway] void postURL (
152		[in] string aURL,
153		[in] com::sun::star::io::XInputStream postData,
154		[in] string target,
155		[in] string alternativeHost,
156		[in] string referrer,
157		[in] com::sun::star::io::XInputStream postHeaders,
158		[in] XPluginInstanceNotifySink sink
159	);
160};
161
162//=============================================================================
163
164}; }; }; };
165
166#endif
167