xref: /trunk/main/desktop/source/inc/exithelper.hxx (revision 2f91ea97af75301cf8512bc21584747f649f1e1c)
10a1e2f0eSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
30a1e2f0eSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
40a1e2f0eSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
50a1e2f0eSAndrew Rist  * distributed with this work for additional information
60a1e2f0eSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
70a1e2f0eSAndrew Rist  * to you under the Apache License, Version 2.0 (the
80a1e2f0eSAndrew Rist  * "License"); you may not use this file except in compliance
90a1e2f0eSAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
110a1e2f0eSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
130a1e2f0eSAndrew Rist  * Unless required by applicable law or agreed to in writing,
140a1e2f0eSAndrew Rist  * software distributed under the License is distributed on an
150a1e2f0eSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
160a1e2f0eSAndrew Rist  * KIND, either express or implied.  See the License for the
170a1e2f0eSAndrew Rist  * specific language governing permissions and limitations
180a1e2f0eSAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
200a1e2f0eSAndrew Rist  *************************************************************/
210a1e2f0eSAndrew Rist 
22cdf0e10cSrcweir #ifndef _DESKTOP_EXITHELPER_HXX_
23cdf0e10cSrcweir #define _DESKTOP_EXITHELPER_HXX_
24cdf0e10cSrcweir 
25cdf0e10cSrcweir namespace desktop
26cdf0e10cSrcweir {
27cdf0e10cSrcweir 
28cdf0e10cSrcweir //=============================================================================
29cdf0e10cSrcweir /** @short  provide helper functions to handle a abnormal exit
30cdf0e10cSrcweir             and contain a list of all "well known" exit codes.
31cdf0e10cSrcweir  */
32cdf0e10cSrcweir class ExitHelper
33cdf0e10cSrcweir {
34cdf0e10cSrcweir     //-------------------------------------------------------------------------
35cdf0e10cSrcweir     // const
36cdf0e10cSrcweir     public:
37cdf0e10cSrcweir 
38cdf0e10cSrcweir         //---------------------------------------------------------------------
39cdf0e10cSrcweir         /** @short  list of all well known exit codes.
40cdf0e10cSrcweir 
41cdf0e10cSrcweir             @descr  Its not allowed to use exit codes hard coded
42cdf0e10cSrcweir                     inside office. All places must use these list to
43cdf0e10cSrcweir                     be synchron.
44cdf0e10cSrcweir          */
45cdf0e10cSrcweir         enum EExitCodes
46cdf0e10cSrcweir         {
47cdf0e10cSrcweir             /// e.g. used to force showing of the command line help
48cdf0e10cSrcweir             E_NO_ERROR = 0,
49cdf0e10cSrcweir             /// pipe was detected - second office must terminate itself
50cdf0e10cSrcweir             E_SECOND_OFFICE = 1,
51*2f91ea97Smseidel             /// an uno exception was caught during startup
52cdf0e10cSrcweir             E_FATAL_ERROR = 333,    // Only the low 8 bits are significant 333 % 256 = 77
53cdf0e10cSrcweir             /// user force automatic restart after crash
54cdf0e10cSrcweir             E_CRASH_WITH_RESTART = 79,
55cdf0e10cSrcweir             /// the office restarts itself
56cdf0e10cSrcweir             E_NORMAL_RESTART = 81
57cdf0e10cSrcweir         };
58cdf0e10cSrcweir };
59cdf0e10cSrcweir 
60cdf0e10cSrcweir } // namespace desktop
61cdf0e10cSrcweir 
62cdf0e10cSrcweir #endif // #ifndef _DESKTOP_EXITHELPER_HXX_
63