1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_plugin_XPluginContext_idl__
28#define __com_sun_star_plugin_XPluginContext_idl__
29
30#ifndef __com_sun_star_uno_XInterface_idl__
31#include <com/sun/star/uno/XInterface.idl>
32#endif
33
34#ifndef __com_sun_star_plugin_XPlugin_idl__
35#include <com/sun/star/plugin/XPlugin.idl>
36#endif
37
38#ifndef __com_sun_star_plugin_PluginVariable_idl__
39#include <com/sun/star/plugin/PluginVariable.idl>
40#endif
41
42#ifndef __com_sun_star_plugin_PluginException_idl__
43#include <com/sun/star/plugin/PluginException.idl>
44#endif
45
46#ifndef __com_sun_star_lang_XEventListener_idl__
47#include <com/sun/star/lang/XEventListener.idl>
48#endif
49
50#ifndef __com_sun_star_io_XActiveDataSource_idl__
51#include <com/sun/star/io/XActiveDataSource.idl>
52#endif
53
54
55//=============================================================================
56
57 module com {  module sun {  module star {  module plugin {
58
59//=============================================================================
60
61/** Interface receiving calls from a plugin library.
62    A default context can be created using the <type>PluginManager</type>.
63*/
64published interface XPluginContext: com::sun::star::uno::XInterface
65{
66	/** Requests global application parameters like display connection
67        on UNIX systems.
68
69        @param xPlugin
70               plugin
71        @param aVariable
72               variable
73        @return value
74    */
75	string getValue( [in] com::sun::star::plugin::XPlugin xPlugin,
76			 [in] com::sun::star::plugin::PluginVariable aVariable )
77			raises( com::sun::star::plugin::PluginException );
78
79	/** Requests a notification of completion of the operation on an URL.
80
81        @param plugin
82               plugin
83        @param url
84               url
85        @param target
86               target frame
87        @param listener
88               event listener
89    */
90	void getURLNotify( [in] com::sun::star::plugin::XPlugin plugin,
91			 [in] string url,
92			 [in] string target,
93			 [in] com::sun::star::lang::XEventListener listener )
94			raises( com::sun::star::plugin::PluginException );
95
96	/** Requests an URL to be loaded into the frame target.
97
98        @param plugin
99               plugin
100        @param url
101               url
102        @param target
103               target frame
104    */
105	void getURL( [in] com::sun::star::plugin::XPlugin plugin,
106			 [in] string url,
107			 [in] string target )
108			raises( com::sun::star::plugin::PluginException );
109
110	/** Posts data from a buffer or file to an URL and receives a
111		notification upon completion.
112
113        @param plugin
114               plugin
115        @param url
116               url
117        @param target
118               target frame
119        @param buf
120               data
121        @param file
122               whether data is from file
123        @param listener
124               event listener
125    */
126	void postURLNotify( [in] com::sun::star::plugin::XPlugin plugin,
127			 [in] string url,
128			 [in] string target,
129			 [in] sequence<byte> buf,
130			 [in] boolean file,
131			 [in] com::sun::star::lang::XEventListener listener )
132			raises( com::sun::star::plugin::PluginException );
133
134	/** Posts data from a buffer or file to an URL.
135
136        @param plugin
137               plugin
138        @param url
139               url
140        @param target
141               target frame
142        @param buf
143               data
144        @param file
145               whether data is from file
146    */
147	void postURL( [in] com::sun::star::plugin::XPlugin plugin,
148			 [in] string url,
149			 [in] string target,
150			 [in] sequence<byte> buf,
151			 [in] boolean file )
152			raises( com::sun::star::plugin::PluginException );
153
154	/** Requests a new stream that is created by the plugin and consumed
155		by the browser.
156
157        @param plugin
158               plugin
159        @param mimetype
160               mime type
161        @param target
162               target frame
163        @param aSource
164               data source
165    */
166	void newStream( [in] com::sun::star::plugin::XPlugin plugin,
167			 [in] string mimetype,
168			 [in] string target,
169			 [in] com::sun::star::io::XActiveDataSource aSource )
170			raises( com::sun::star::plugin::PluginException );
171
172	/** Displays a message in the browser status line.
173
174        @param plugin
175               plugin
176        @param message
177               message
178    */
179	void displayStatusText( [in] com::sun::star::plugin::XPlugin plugin,
180			 [in] string message )
181			raises( com::sun::star::plugin::PluginException );
182
183	/** Returns an application dependent identification string.
184		This is the same string that is transmitted by a browser to an http server.
185
186        @param plugin
187               plugin
188		@return id
189    */
190	string getUserAgent( [in] com::sun::star::plugin::XPlugin plugin )
191			raises( com::sun::star::plugin::PluginException );
192};
193
194//=============================================================================
195
196}; }; }; };
197
198#endif
199