43184ba500d2b2efd137afad86cfa1186504ea79
[platform/framework/native/appfw.git] / src / app / inc / FApp_Aul.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file        FApp_Aul.h
19  * @brief       This is the header file of the _Aul class.
20  */
21
22 #ifndef _FAPP_INTERNAL_AUL_H_
23 #define _FAPP_INTERNAL_AUL_H_
24
25 #include <appsvc/appsvc.h>
26 #include <FOspConfig.h>
27 #include <FAppTypes.h>
28
29 typedef struct _bundle_t bundle;
30
31 #define MAX_SLP_PACKAGE_ID 128
32
33 namespace Tizen { namespace App
34 {
35
36 /**
37 * @class        _Aul
38 * @brief        SysDep class for AppManager
39 * @since 2.1
40 * @final        This class it not intended for extension.
41 */
42 class _OSP_EXPORT_ _Aul
43 {
44 public:
45         static result GetConvertedResult(const int aul_ret, const char* pFunctionName);
46
47         static result TerminateApplication(const AppId& appId);
48
49         static result TerminateApplicationByPid(int pid);
50
51         static result SendResult(bundle* b, appsvc_result_val res, bool isSubMode);
52
53         static bool IsRunning(const Tizen::Base::String& appId);
54
55         static result SetOomAdj(int pid, int adj);
56
57         static result SetPowerOffNotiListener(void (*powerOffCb)(void* node, void *pData), void *pData);
58
59         static int GetAppType(const Tizen::Base::String& category);
60
61         static bool IsInstalled(const AppId& appId);
62
63         _OSP_LOCAL_ static AppId GetRealAppId(const AppId& appId);
64
65 public:
66
67         friend class UTs_Aul;
68 }; // _Aul
69
70 } } // Tizen::App
71
72 #endif // _FAPP_INTERNAL_AUL_H_