//
-// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the License);
#define _FAPP_INTERNAL_AUL_H_
#include <appsvc/appsvc.h>
-#include <bundle.h>
#include <FOspConfig.h>
#include <FAppTypes.h>
+typedef struct _bundle_t bundle;
+
#define MAX_SLP_PACKAGE_ID 128
namespace Tizen { namespace App
class _OSP_EXPORT_ _Aul
{
public:
- static result TerminateApplicationByPid(int pid);
+ static result GetConvertedResult(const int aul_ret, const char* pFunctionName);
- static result SendResult(bundle* b, appsvc_result_val res);
+ static result TerminateApplication(const AppId& appId);
- static bool IsRunning(const AppId& appId, const Tizen::Base::String& exeName);
+ static result TerminateApplicationByPid(int pid);
- static bool IsRunning(const Tizen::Base::String& packageName);
+ static result SendResult(bundle* b, appsvc_result_val res, bool isSubMode, bool isServiceApp);
- static void SetOnAppTerminatedCb(int (* pf_app_dead_handler)(int pid, void* pData), void* pData);
+ static bool IsRunning(const Tizen::Base::String& appId);
static result SetOomAdj(int pid, int adj);
- static result SetPowerOffNotiListener(void (*powerOffCb)(void *pData), void *pData);
+ static result SetPowerOffNotiListener(void (*powerOffCb)(void* node, void *pData), void *pData);
static int GetAppType(const Tizen::Base::String& category);
static bool IsInstalled(const AppId& appId);
+ _OSP_LOCAL_ static AppId GetRealAppId(const AppId& appId);
+
public:
- /**
- * This is static helper class for desktop file.
- */
- class _DesktopFile
- {
- public:
- /**
- * Updates the service value
- * @param[in] appId The application's ID to be executed
- * @param[in] value value to be added or updated.
- *
- * @remark If operations is new, it will be appended.
- * but, if same operation is already exist, 'url' and 'mimeType' will be updated.
- */
- static result UpdateService(const AppId& appId, const char* value);
-
- /**
- * Removes the service value by operation
- * @param[in] appId The application's ID to be executed
- * @param[in] operationOnlyValue operationId of service to be removed
- */
- static result RemoveService(const AppId& appId, const char* operationOnlyValue);
-
- private:
- /**
- * Updates value of specified field
- */
- static result UpdateField(const char* path, const char* key, const char* value, bool isRemove = false);
-
- /**
- * Makes desktop file path from appId (retrives appName using _PackageMamagerImpl)
- */
- static result MakePath(const AppId& appId, const Tizen::Base::String* pExeName, char* path, int size);
-
- /**
- * Update service value of input buffer with specified value
- */
- static char* UpdateServiceValueN(char* buffer, const char* newValue, bool isRemove = false);
-
- /**
- * Extracts each informations from one service string.
- */
- static result ParseService(const Tizen::Base::String& service, Tizen::Base::String& operation, Tizen::Base::String& url, Tizen::Base::String& mimeType);
-
- static void AppendServiceValueToString(Tizen::Base::String& string, const Tizen::Base::String& newVaue);
-
- friend class UTs_Aul;
- }; // _DesktopFile
friend class UTs_Aul;
}; // _Aul