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_plugin_XPluginContext_idl__
24#define __com_sun_star_plugin_XPluginContext_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_plugin_XPlugin_idl__
31#include <com/sun/star/plugin/XPlugin.idl>
32#endif
33
34#ifndef __com_sun_star_plugin_PluginVariable_idl__
35#include <com/sun/star/plugin/PluginVariable.idl>
36#endif
37
38#ifndef __com_sun_star_plugin_PluginException_idl__
39#include <com/sun/star/plugin/PluginException.idl>
40#endif
41
42#ifndef __com_sun_star_lang_XEventListener_idl__
43#include <com/sun/star/lang/XEventListener.idl>
44#endif
45
46#ifndef __com_sun_star_io_XActiveDataSource_idl__
47#include <com/sun/star/io/XActiveDataSource.idl>
48#endif
49
50
51//=============================================================================
52
53 module com {  module sun {  module star {  module plugin {
54
55//=============================================================================
56
57/** Interface receiving calls from a plugin library.
58    A default context can be created using the <type>PluginManager</type>.
59*/
60published interface XPluginContext: com::sun::star::uno::XInterface
61{
62	/** Requests global application parameters like display connection
63        on UNIX systems.
64
65        @param xPlugin
66               plugin
67        @param aVariable
68               variable
69        @return value
70    */
71	string getValue( [in] com::sun::star::plugin::XPlugin xPlugin,
72			 [in] com::sun::star::plugin::PluginVariable aVariable )
73			raises( com::sun::star::plugin::PluginException );
74
75	/** Requests a notification of completion of the operation on an URL.
76
77        @param plugin
78               plugin
79        @param url
80               url
81        @param target
82               target frame
83        @param listener
84               event listener
85    */
86	void getURLNotify( [in] com::sun::star::plugin::XPlugin plugin,
87			 [in] string url,
88			 [in] string target,
89			 [in] com::sun::star::lang::XEventListener listener )
90			raises( com::sun::star::plugin::PluginException );
91
92	/** Requests an URL to be loaded into the frame target.
93
94        @param plugin
95               plugin
96        @param url
97               url
98        @param target
99               target frame
100    */
101	void getURL( [in] com::sun::star::plugin::XPlugin plugin,
102			 [in] string url,
103			 [in] string target )
104			raises( com::sun::star::plugin::PluginException );
105
106	/** Posts data from a buffer or file to an URL and receives a
107		notification upon completion.
108
109        @param plugin
110               plugin
111        @param url
112               url
113        @param target
114               target frame
115        @param buf
116               data
117        @param file
118               whether data is from file
119        @param listener
120               event listener
121    */
122	void postURLNotify( [in] com::sun::star::plugin::XPlugin plugin,
123			 [in] string url,
124			 [in] string target,
125			 [in] sequence<byte> buf,
126			 [in] boolean file,
127			 [in] com::sun::star::lang::XEventListener listener )
128			raises( com::sun::star::plugin::PluginException );
129
130	/** Posts data from a buffer or file to an URL.
131
132        @param plugin
133               plugin
134        @param url
135               url
136        @param target
137               target frame
138        @param buf
139               data
140        @param file
141               whether data is from file
142    */
143	void postURL( [in] com::sun::star::plugin::XPlugin plugin,
144			 [in] string url,
145			 [in] string target,
146			 [in] sequence<byte> buf,
147			 [in] boolean file )
148			raises( com::sun::star::plugin::PluginException );
149
150	/** Requests a new stream that is created by the plugin and consumed
151		by the browser.
152
153        @param plugin
154               plugin
155        @param mimetype
156               mime type
157        @param target
158               target frame
159        @param aSource
160               data source
161    */
162	void newStream( [in] com::sun::star::plugin::XPlugin plugin,
163			 [in] string mimetype,
164			 [in] string target,
165			 [in] com::sun::star::io::XActiveDataSource aSource )
166			raises( com::sun::star::plugin::PluginException );
167
168	/** Displays a message in the browser status line.
169
170        @param plugin
171               plugin
172        @param message
173               message
174    */
175	void displayStatusText( [in] com::sun::star::plugin::XPlugin plugin,
176			 [in] string message )
177			raises( com::sun::star::plugin::PluginException );
178
179	/** Returns an application dependent identification string.
180		This is the same string that is transmitted by a browser to an http server.
181
182        @param plugin
183               plugin
184		@return id
185    */
186	string getUserAgent( [in] com::sun::star::plugin::XPlugin plugin )
187			raises( com::sun::star::plugin::PluginException );
188};
189
190//=============================================================================
191
192}; }; }; };
193
194#endif
195