sync with tizen_2.0
[platform/framework/native/appfw.git] / src / base / inc / FBaseRt_Process.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file        FBaseRt_Process.h
20  * @brief       This is the header file for the %_Process class.
21  *
22  * This file contains the declarations of the %_Process class.
23  */
24
25 #ifndef _FBASE_RT_INTERNAL_PROCESS_H_
26 #define _FBASE_RT_INTERNAL_PROCESS_H_
27
28 #include <memory>
29 #include <FOspConfig.h>
30
31 namespace Tizen { namespace Base { namespace Runtime
32 {
33
34 /**
35 * The constant for success termination code.
36 *
37 * @since 2.0
38 */
39 static const int EXIT_CODE_SUCCESS = 0;
40
41 /**
42 * The constant for failure termination code.
43 *
44 * @since 2.0
45 */
46 static const int EXIT_CODE_FAILURE = 1;
47
48 /**
49 * @class _Process
50 * @brief This class provides method for managing process.
51 * @since 2.0
52 */
53 class _OSP_EXPORT_ _Process
54 {
55 public:
56         /**
57          * Terminates current process.
58          *
59          * @since 2.0
60          *
61          * @param[in]   exitCode      The exit code
62          */
63         static void Exit(int exitCode);
64
65 private:
66         /**
67          * This is the default constructor for this class.
68          *
69          * @since 2.0
70          */
71         _Process(void);
72
73         /**
74          * This is the destructor for this class.
75          *
76          * @since 2.0
77          */
78         ~_Process(void);
79
80 }; // _Process
81
82 } } } // Tizen::Base::Runtime
83
84 #endif // _FBASE_RT_INTERNAL_PROCESS_H_