xref: /AOO41X/main/offapi/com/sun/star/frame/XDispatchRecorderSupplier.idl (revision c4dc0a1aba8e7aaa49e08ea6b3b605484dad910b)
1d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5d1766043SAndrew Rist * distributed with this work for additional information
6d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir *
11d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14d1766043SAndrew Rist * software distributed under the License is distributed on an
15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17d1766043SAndrew Rist * specific language governing permissions and limitations
18d1766043SAndrew Rist * under the License.
19cdf0e10cSrcweir *
20d1766043SAndrew Rist *************************************************************/
21d1766043SAndrew Rist
22d1766043SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_frame_XDispatchRecorderSupplier_idl__
24cdf0e10cSrcweir#define __com_sun_star_frame_XDispatchRecorderSupplier_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir#ifndef __com_sun_star_frame_XDispatch_idl__
31cdf0e10cSrcweir#include <com/sun/star/frame/XDispatch.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir
34cdf0e10cSrcweir#ifndef __com_sun_star_frame_XDispatchRecorder_idl__
35cdf0e10cSrcweir#include <com/sun/star/frame/XDispatchRecorder.idl>
36cdf0e10cSrcweir#endif
37cdf0e10cSrcweir
38cdf0e10cSrcweir//=============================================================================
39cdf0e10cSrcweir
40cdf0e10cSrcweir module com {  module sun {  module star {  module frame {
41cdf0e10cSrcweir
42cdf0e10cSrcweir//=============================================================================
43cdf0e10cSrcweir/** provides access to the record mechanism of dispatches
44cdf0e10cSrcweir
45cdf0e10cSrcweir    <p>
46cdf0e10cSrcweir    With a <type>XDispatchRecorder</type> it's possible to record calls
47cdf0e10cSrcweir    of <member>XDispatch::dispatch()</member>. The recorded data (may a script)
48cdf0e10cSrcweir    can be used to automate recorded dispatch and start it at later time again.
49cdf0e10cSrcweir    This supplier provides access to the recorder and supports some functionality
50cdf0e10cSrcweir    to work with the mcaro recording mechanism in an easy manner.
51cdf0e10cSrcweir    </p>
52cdf0e10cSrcweir
53cdf0e10cSrcweir    @see XDispatchRecorder
54*c4dc0a1aSJürgen Schmidt    @since OpenOffice 1.1.2
55cdf0e10cSrcweir */
56cdf0e10cSrcweirpublished interface XDispatchRecorderSupplier: com::sun::star::uno::XInterface
57cdf0e10cSrcweir{
58cdf0e10cSrcweir	//-------------------------------------------------------------------------
59cdf0e10cSrcweir    /** set a dispatch recorder on this supplier
60cdf0e10cSrcweir
61cdf0e10cSrcweir        <p>
62cdf0e10cSrcweir        Setting of a new recorder make it possible to change recording mode.
63cdf0e10cSrcweir        May there can exist different implementations of a recorder (e.g. to
64cdf0e10cSrcweir        generate Java, Basic or other formats). Changing between local recording
65cdf0e10cSrcweir        inside one <type>Frame</type> or global one by using more then ones can be
66cdf0e10cSrcweir        forced too.
67cdf0e10cSrcweir        </p>
68cdf0e10cSrcweir
69cdf0e10cSrcweir        @param Recorder
70cdf0e10cSrcweir            the new recorder for this supplier
71cdf0e10cSrcweir     */
72cdf0e10cSrcweir    void setDispatchRecorder( [in] com::sun::star::frame::XDispatchRecorder Recorder );
73cdf0e10cSrcweir
74cdf0e10cSrcweir	//-------------------------------------------------------------------------
75cdf0e10cSrcweir    /** provides access on the recorder of this supplier
76cdf0e10cSrcweir
77cdf0e10cSrcweir        <p>
78cdf0e10cSrcweir        Returned recorder can be used to record dispatches manualy or to get
79cdf0e10cSrcweir        recorded data for further using e.g. saving. He is internaly used too
80cdf0e10cSrcweir        due to the method <member>XDispatchRecorderSupplier::dispatchAndRecord()</member>.
81cdf0e10cSrcweir        </p>
82cdf0e10cSrcweir
83cdf0e10cSrcweir        @returns
84cdf0e10cSrcweir            the dispatch recorder of this supplier
85cdf0e10cSrcweir
86cdf0e10cSrcweir        @see XDispatchRecorder
87cdf0e10cSrcweir     */
88cdf0e10cSrcweir    com::sun::star::frame::XDispatchRecorder getDispatchRecorder();
89cdf0e10cSrcweir
90cdf0e10cSrcweir	//-------------------------------------------------------------------------
91cdf0e10cSrcweir    /** dispatch given URL and record it if recording is enabled
92cdf0e10cSrcweir
93cdf0e10cSrcweir        <p>
94cdf0e10cSrcweir        Parameter <var>Dispatcher</var> is used internaly to make the dispatch.
95cdf0e10cSrcweir        If recording isn't enabled it will be a normal <member>XDispatch::dispatch()</member>
96cdf0e10cSrcweir        call. Otherwise follow algorithm is used:
97cdf0e10cSrcweir        <ul>
98cdf0e10cSrcweir            <li>If <var>Dispatcher</var> doesn't support the interface
99cdf0e10cSrcweir                <type>XRecordableDispatch</type> a normal dispatch() call
100cdf0e10cSrcweir                will be made and depend from the result state of that
101cdf0e10cSrcweir                the request will be recorded. In this case it's possible
102cdf0e10cSrcweir                to record the incoming parameter (<var>URL</var> and
103cdf0e10cSrcweir                <var>Arguments</var>) only. Parameters of internal processes
104cdf0e10cSrcweir                can't be recorded then and will be lost.
105cdf0e10cSrcweir            </li>
106cdf0e10cSrcweir            <li>If <var>Dispatcher</var> support the interface
107cdf0e10cSrcweir                <type>XRecordableDispatch</type> it will be used
108cdf0e10cSrcweir                to dispatch and record all neccessary parameters of
109cdf0e10cSrcweir                the whole process.
110cdf0e10cSrcweir            </li>
111cdf0e10cSrcweir        </ul>
112cdf0e10cSrcweir        </p>
113cdf0e10cSrcweir
114cdf0e10cSrcweir        @see XRecordableDispatch
115cdf0e10cSrcweir     */
116cdf0e10cSrcweir    void dispatchAndRecord(
117cdf0e10cSrcweir        [in] com::sun::star::util::URL URL,
118cdf0e10cSrcweir        [in] sequence<com::sun::star::beans::PropertyValue> Arguments,
119cdf0e10cSrcweir        [in] XDispatch Dispatcher);
120cdf0e10cSrcweir};
121cdf0e10cSrcweir
122cdf0e10cSrcweir//=============================================================================
123cdf0e10cSrcweir
124cdf0e10cSrcweir}; }; }; };
125cdf0e10cSrcweir
126cdf0e10cSrcweir#endif
127