xref: /trunk/main/offapi/com/sun/star/frame/XRecordableDispatch.idl (revision ffd38472365e95f6a578737bc9a5eb0fac624a86)
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_XRecordableDispatch_idl__
24cdf0e10cSrcweir#define __com_sun_star_frame_XRecordableDispatch_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_XDispatchRecorder_idl__
31cdf0e10cSrcweir#include <com/sun/star/frame/XDispatchRecorder.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir
34cdf0e10cSrcweir#ifndef __com_sun_star_util_URL_idl__
35cdf0e10cSrcweir#include <com/sun/star/util/URL.idl>
36cdf0e10cSrcweir#endif
37cdf0e10cSrcweir
38cdf0e10cSrcweir//=============================================================================
39cdf0e10cSrcweir
40cdf0e10cSrcweir module com {  module sun {  module star {  module frame {
41cdf0e10cSrcweir
42cdf0e10cSrcweir//=============================================================================
43cdf0e10cSrcweir/** extends an existing <type>XDispatch</type> implementation with functionality
44cdf0e10cSrcweir    for dispatch recording
45cdf0e10cSrcweir
46cdf0e10cSrcweir    <p>
47cdf0e10cSrcweir    This interface can be implemented as an additional one beside an existing
48cdf0e10cSrcweir    <type>XDispatch</type> one to provide record functionality of dispatches.
49cdf0e10cSrcweir    Because it's an additional interface the status events are available there
50cdf0e10cSrcweir    and not at this interface.
51cdf0e10cSrcweir    </p>
52cdf0e10cSrcweir
53cdf0e10cSrcweir    <p>
54*2e3a1b6eSmseidel    But normally this interface mustn't be used directly.
55cdf0e10cSrcweir    If a dispatch object is well known and recording was enabled
56cdf0e10cSrcweir    on a <type>XDispatchRecorderSupplier</type> it's possible to use method
57cdf0e10cSrcweir    <member>XDispatchRecorderSupplier::dispatchAndRecord()</member> of it
58a893be29SPedro Giffuni    to make dispatch and recording automatically. The interface XRecordableDispatch
59cdf0e10cSrcweir    is used transparently there.
60cdf0e10cSrcweir    </p>
61cdf0e10cSrcweir
62cdf0e10cSrcweir    @example
63cdf0e10cSrcweir    <listing>
64cdf0e10cSrcweir        <i>XDispatch</i> xDispatcher = xFrame.queryDispatch(aURL,"",0);
65cdf0e10cSrcweir        <i>XRecordableDispatch</i> xRecordable = (<i>XRecordableDispatch</i>)UnoRuntime.queryInterface(
66cdf0e10cSrcweir        &nbsp;&nbsp;XRecordableDispatch.class,
67cdf0e10cSrcweir        &nbsp;&nbsp;xDispatcher);
68cdf0e10cSrcweir
69cdf0e10cSrcweir        xDispatcher.addStatusListener(this,aURL);
70cdf0e10cSrcweir
71cdf0e10cSrcweir        <b>if</b> (xRecordable!=<b>null</b>)
72cdf0e10cSrcweir        &nbsp;&nbsp;xRecordable.dispatchAndRecord(aURL,lArguments,xRecorder);
73cdf0e10cSrcweir        else
74cdf0e10cSrcweir        &nbsp;&nbsp;xDispatcher.dispatch(aURL,lArguments);
75cdf0e10cSrcweir        ...
76cdf0e10cSrcweir        xDispatcher.removeStatusListener(this,aURL);
77cdf0e10cSrcweir    </listing>
78cdf0e10cSrcweir
79cdf0e10cSrcweir    @see XDispatchRecorderSupplier
80cdf0e10cSrcweir    @see XDispatch
81cdf0e10cSrcweir
82c4dc0a1aSJürgen Schmidt    @since OpenOffice 1.1.2
83cdf0e10cSrcweir */
84cdf0e10cSrcweirpublished interface XRecordableDispatch: com::sun::star::uno::XInterface
85cdf0e10cSrcweir{
86cdf0e10cSrcweir    //-------------------------------------------------------------------------
87cdf0e10cSrcweir    /** dispatch and record it
88cdf0e10cSrcweir
89cdf0e10cSrcweir        @param URL
90a893be29SPedro Giffuni            full parsed URL which describe the feature which should be dispatched (executed)
91cdf0e10cSrcweir
92cdf0e10cSrcweir        @param Arguments
93cdf0e10cSrcweir            optional arguments for this request
94cdf0e10cSrcweir            (see <type scope="com::sun::star::document">MediaDescriptor</type> for details)
95cdf0e10cSrcweir
96cdf0e10cSrcweir        @param Recorder
97cdf0e10cSrcweir            object which can be used to record the request
98cdf0e10cSrcweir            (available on <member>XDispatchRecorderSupplier::getDispatchRecorder()</member>)
99cdf0e10cSrcweir     */
100cdf0e10cSrcweir    [oneway] void dispatchAndRecord(
101cdf0e10cSrcweir        [in] com::sun::star::util::URL URL,
102cdf0e10cSrcweir        [in] sequence<com::sun::star::beans::PropertyValue> Arguments,
103cdf0e10cSrcweir        [in] XDispatchRecorder Recorder);
104cdf0e10cSrcweir};
105cdf0e10cSrcweir
106cdf0e10cSrcweir//=============================================================================
107cdf0e10cSrcweir
108cdf0e10cSrcweir}; }; }; };
109cdf0e10cSrcweir
110cdf0e10cSrcweir#endif
111