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
24#ifndef __com_sun_star_mozilla_XPluginInstancePeer_idl__
25#define __com_sun_star_mozilla_XPluginInstancePeer_idl__
26
27#ifndef __com_sun_star_uno_XInterface_idl__
28#include <com/sun/star/uno/XInterface.idl>
29#endif
30
31#ifndef __com_sun_star_io_XActiveDataSource_idl__
32#include <com/sun/star/io/XActiveDataSource.idl>
33#endif
34
35#ifndef __com_sun_star_io_XInputStream_idl__
36#include <com/sun/star/io/XInputStream.idl>
37#endif
38
39#ifndef __com_sun_star_lang_XMultiServiceFactory_idl__
40#include <com/sun/star/lang/XMultiServiceFactory.idl>
41#endif
42
43//=============================================================================
44
45 module com { module sun { module star { module mozilla {
46
47//=============================================================================
48
49 published interface XPluginInstanceNotifySink;
50
51//=============================================================================
52
53
54// DocMerge from xml: interface com::sun::star::mozilla::XPluginInstancePeer
55/** Allows to communicate with a plugin from the office side.
56	This interface is oriented for communication with browsers plugins.
57 */
58published interface XPluginInstancePeer: com::sun::star::uno::XInterface
59{
60	//-------------------------------------------------------------------------
61
62
63	// DocMerge from xml: method com::sun::star::mozilla::XPluginInstancePeer::setWindowSize
64	/** Alters the plugin's window size in the browser window.
65
66		@param width	[in]: the new window width
67		@param height	[in]: the new window height
68
69		@return <CODE>TRUE</CODE> on success
70	 */
71	boolean setWindowSize( [in] long width, [in] long height );
72
73	//-------------------------------------------------------------------------
74
75
76	// DocMerge from xml: method com::sun::star::mozilla::XPluginInstancePeer::showStatusMessage
77	/** Show status / hint message in browser's message area.
78
79		@param message	[in]: the string to be displayed
80	 */
81	[oneway] void showStatusMessage( [in] string message );
82
83	//-------------------------------------------------------------------------
84
85
86	// DocMerge from xml: method com::sun::star::mozilla::XPluginInstancePeer::enableScripting
87	/** Indicates to the plugin that the document was loaded successfully and scripting
88		interfaces are now available.
89
90		@param document			[in]: the active document
91		@param servicemanager	[in]: the office servicemanager
92
93	 */
94	[oneway] void enableScripting( [in] com::sun::star::uno::XInterface document, [in] com::sun::star::lang::XMultiServiceFactory servicemanager );
95
96	//-------------------------------------------------------------------------
97
98
99	// DocMerge from xml: method com::sun::star::mozilla::XPluginInstancePeer::newStream
100	/** Creates a new stream of data produced by the plug-in and consumed by
101		the browser.
102
103		@param MIMEDesc	[in]:	the MIME type of the plug-in to create
104		@param target	[in]:	the name of the target window or frame (supports _blank, _self)
105		@param data		[in]:	on success the outputstream will be	associated with this instance
106
107	 */
108	[oneway] void newStream(
109		[in] string MIMEDesc,
110		[in] string target,
111		[in] com::sun::star::io::XActiveDataSource data
112	);
113
114	//-------------------------------------------------------------------------
115
116
117	// DocMerge from xml: method com::sun::star::mozilla::XPluginInstancePeer::getURL
118	/** Fetches an URL into the target window. The parameters and their meaning map to the
119		corresponding Netscape-API call.
120
121		@param aURL				[in]: the URL to be fetched
122		@param target			[in]: the name of the target window or frame (supports _blank, _self)
123		@param alternativeHost	[in]: alternativeHost
124		@param referrer			[in]: referrer
125		@param sink				[in]: the sink is notified on success
126
127	 */
128	[oneway] void getURL (
129		[in] string aURL,
130		[in] string target,
131		[in] string alternativeHost,
132		[in] string referrer,
133		[in] XPluginInstanceNotifySink sink
134	);
135
136	//-------------------------------------------------------------------------
137
138
139	// DocMerge from xml: method com::sun::star::mozilla::XPluginInstancePeer::postURL
140	/** Posts to a URL with post data and/or post headers. The parameters and their meaning
141		map to the corresponding Netscape-API call.
142
143		@param aURL				[in]: the URL to be posted to
144		@param postData			[in]: the data to be posted
145		@param target			[in]: the name of the target window or frame (supports _blank, _self)
146		@param alternativeHost	[in]: alternativeHost
147		@param referrer			[in]: referrer
148		@param postHeaders		[in]: the header to be posted
149		@param sink				[in]: the sink is notified on success
150
151	 */
152	[oneway] void postURL (
153		[in] string aURL,
154		[in] com::sun::star::io::XInputStream postData,
155		[in] string target,
156		[in] string alternativeHost,
157		[in] string referrer,
158		[in] com::sun::star::io::XInputStream postHeaders,
159		[in] XPluginInstanceNotifySink sink
160	);
161};
162
163//=============================================================================
164
165}; }; }; };
166
167#endif
168