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_frame_XDispatchRecorderSupplier_idl__
24#define __com_sun_star_frame_XDispatchRecorderSupplier_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_frame_XDispatch_idl__
31#include <com/sun/star/frame/XDispatch.idl>
32#endif
33
34#ifndef __com_sun_star_frame_XDispatchRecorder_idl__
35#include <com/sun/star/frame/XDispatchRecorder.idl>
36#endif
37
38//=============================================================================
39
40 module com {  module sun {  module star {  module frame {
41
42//=============================================================================
43/** provides access to the record mechanism of dispatches
44
45    <p>
46    With a <type>XDispatchRecorder</type> it's possible to record calls
47    of <member>XDispatch::dispatch()</member>. The recorded data (may a script)
48    can be used to automate recorded dispatch and start it at later time again.
49    This supplier provides access to the recorder and supports some functionality
50    to work with the mcaro recording mechanism in an easy manner.
51    </p>
52
53    @see XDispatchRecorder
54    @since OpenOffice 1.1.2
55 */
56published interface XDispatchRecorderSupplier: com::sun::star::uno::XInterface
57{
58	//-------------------------------------------------------------------------
59    /** set a dispatch recorder on this supplier
60
61        <p>
62        Setting of a new recorder make it possible to change recording mode.
63        May there can exist different implementations of a recorder (e.g. to
64        generate Java, Basic or other formats). Changing between local recording
65        inside one <type>Frame</type> or global one by using more then ones can be
66        forced too.
67        </p>
68
69        @param Recorder
70            the new recorder for this supplier
71     */
72    void setDispatchRecorder( [in] com::sun::star::frame::XDispatchRecorder Recorder );
73
74	//-------------------------------------------------------------------------
75    /** provides access on the recorder of this supplier
76
77        <p>
78        Returned recorder can be used to record dispatches manualy or to get
79        recorded data for further using e.g. saving. He is internaly used too
80        due to the method <member>XDispatchRecorderSupplier::dispatchAndRecord()</member>.
81        </p>
82
83        @returns
84            the dispatch recorder of this supplier
85
86        @see XDispatchRecorder
87     */
88    com::sun::star::frame::XDispatchRecorder getDispatchRecorder();
89
90	//-------------------------------------------------------------------------
91    /** dispatch given URL and record it if recording is enabled
92
93        <p>
94        Parameter <var>Dispatcher</var> is used internaly to make the dispatch.
95        If recording isn't enabled it will be a normal <member>XDispatch::dispatch()</member>
96        call. Otherwise follow algorithm is used:
97        <ul>
98            <li>If <var>Dispatcher</var> doesn't support the interface
99                <type>XRecordableDispatch</type> a normal dispatch() call
100                will be made and depend from the result state of that
101                the request will be recorded. In this case it's possible
102                to record the incoming parameter (<var>URL</var> and
103                <var>Arguments</var>) only. Parameters of internal processes
104                can't be recorded then and will be lost.
105            </li>
106            <li>If <var>Dispatcher</var> support the interface
107                <type>XRecordableDispatch</type> it will be used
108                to dispatch and record all neccessary parameters of
109                the whole process.
110            </li>
111        </ul>
112        </p>
113
114        @see XRecordableDispatch
115     */
116    void dispatchAndRecord(
117        [in] com::sun::star::util::URL URL,
118        [in] sequence<com::sun::star::beans::PropertyValue> Arguments,
119        [in] XDispatch Dispatcher);
120};
121
122//=============================================================================
123
124}; }; }; };
125
126#endif
127