From 6d038d75d5c8eca9f09900d380d6203fae3f989a Mon Sep 17 00:00:00 2001 From: Inkyun Kil Date: Wed, 3 Jul 2019 13:54:55 +0900 Subject: Separate util codes from alarm-manager.c Change-Id: I0f5ef6d8db2a84b71ea1fb2d5c18f6514ceccc39 Signed-off-by: Inkyun Kil --- server/alarm-manager-util.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 server/alarm-manager-util.h (limited to 'server/alarm-manager-util.h') diff --git a/server/alarm-manager-util.h b/server/alarm-manager-util.h new file mode 100755 index 0000000..6b87dbd --- /dev/null +++ b/server/alarm-manager-util.h @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include +#include + +#include "alarm-internal.h" + +profile_t _get_profile(); +int _cynara_check(GDBusMethodInvocation *invocation, const char* privilege, + pid_t pid); +char* _get_pkgid_by_appid(const char* app_id, uid_t uid); +int _pkg_is_global(const char* callee_pkgid, uid_t uid); +int _is_ui_app(const char *appid, uid_t uid); +bool _is_app(const char *appid, uid_t uid); +int _compare_api_version(int *result, int pid, uid_t uid); +bool _permit_by_config(pkgmgrinfo_appinfo_h handle, uid_t uid); +bool _is_permitted(const char *app_id, int alarm_type, uid_t uid); + +#ifdef __cplusplus +} +#endif + -- cgit v1.2.3