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
24#ifndef __com_sun_star_task_XRestartManager_idl__
25#define __com_sun_star_task_XRestartManager_idl__
26
27#ifndef __com_sun_star_uno_XInterface_idl__
28#include <com/sun/star/uno/XInterface.idl>
29#endif
30
31#ifndef __com_sun_star_task_XInteractionHandler_idl__
32#include <com/sun/star/task/XInteractionHandler.idl>
33#endif
34
35#ifndef __com_sun_star_uno_Exception_idl__
36#include <com/sun/star/uno/Exception.idl>
37#endif
38
39//============================================================================
40
41module com {  module sun {  module star {  module task {
42
43//=============================================================================
44/** allows to try to restart the office.
45
46    @since OOo 3.3
47*/
48published interface XRestartManager : com::sun::star::uno::XInterface
49{
50    //------------------------------------------------------------------------
51    /** let the office restart asynchronously
52        @param xInteractionHandler
53            the <type scope="com::sun::star::task">InteractionHandler</type>
54            service implementation, that is used in case a problem is detected
55            during requesting the restart.
56
57        @throws com::sun::star::uno::Exception
58            to notify the caller about possible failures
59	*/
60    void requestRestart(
61        [in] com::sun::star::task::XInteractionHandler xInteractionHandler )
62            raises( com::sun::star::uno::Exception );
63
64    //------------------------------------------------------------------------
65    /** allows to get info whether the restart has been requested and provide
66        the initialization status.
67
68        <p>
69        The office has to call this method just before the main loop has been
70        started, with the <TRUE/> as argument, so that the implementation
71        knows that the office is initialized. If the method returns <TRUE/>,
72        the office should restart without starting the main loop.
73        </p>
74
75        @param bInitialized
76            specifies whether the office process is initialized already,
77            if the caller does not have this information, he should provide
78            <FALSE/>.
79
80        @returns
81            <TRUE/> if the office restart has been requested,
82            <FALSE/> otherwise
83
84        @throws com::sun::star::uno::Exception
85            to notify the caller about possible failures
86	*/
87    boolean isRestartRequested(
88        [in] boolean bInitialized )
89            raises( com::sun::star::uno::Exception );
90};
91
92}; }; }; };
93
94#endif
95
96