2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
8 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 * @file FApp_AulServer.h
19 * @brief This is the header file of the _AulServer class.
22 #ifndef _FAPP_INTERNAL_AulServer_H_
23 #define _FAPP_INTERNAL_AulServer_H_
25 #include <appsvc/appsvc.h>
27 #include <FOspConfig.h>
28 #include <FAppTypes.h>
30 #define MAX_SLP_PACKAGE_ID 128
32 namespace Tizen { namespace App
37 * @brief SysDep class for AppManager
39 * @final This class it not intended for extension.
41 class _OSP_EXPORT_ _AulServer
44 static result TerminateApplicationByPid(int pid);
46 static result SendResult(bundle* b, appsvc_result_val res);
48 static bool IsRunning(const AppId& appId, const Tizen::Base::String& exeName);
50 static bool IsRunning(const Tizen::Base::String& packageName);
52 static result Launch(const Tizen::Base::String& appId);
54 static void SetOnAppTerminatedCb(int (* pf_app_dead_handler)(int pid, void* pData), void* pData);
56 static result SetOomAdj(int pid, int adj);
58 static int GetAppType(const Tizen::Base::String& category);
60 static bool IsInstalled(const AppId& appId);
62 static int CreateProcess(const Tizen::Base::String& appId);
64 static bool IsUserPreferredAppForAppControlResolution(const AppId& appId);
66 static result ClearUserPreferenceForAppControlResolution(const AppId& appId);
69 friend class UTs_AulServer;
74 #endif // _FAPP_INTERNAL_AulServer_H_