diff options
author | Inkyun Kil <inkyun.kil@samsung.com> | 2019-07-03 13:54:55 +0900 |
---|---|---|
committer | Inkyun Kil <inkyun.kil@samsung.com> | 2019-07-18 11:11:14 +0900 |
commit | 6d038d75d5c8eca9f09900d380d6203fae3f989a (patch) | |
tree | 701862a5ea73c84b519604b162f0928a6ed82813 /server/alarm-manager-util.h | |
parent | 0cb41c9756760da9b86dc9f2dd049c1c9cda1af1 (diff) | |
download | alarm-manager-6d038d75d5c8eca9f09900d380d6203fae3f989a.tar.gz alarm-manager-6d038d75d5c8eca9f09900d380d6203fae3f989a.tar.bz2 alarm-manager-6d038d75d5c8eca9f09900d380d6203fae3f989a.zip |
Separate util codes from alarm-manager.c
Change-Id: I0f5ef6d8db2a84b71ea1fb2d5c18f6514ceccc39
Signed-off-by: Inkyun Kil <inkyun.kil@samsung.com>
Diffstat (limited to 'server/alarm-manager-util.h')
-rwxr-xr-x | server/alarm-manager-util.h | 44 |
1 files changed, 44 insertions, 0 deletions
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 <glib.h> +#include <pkgmgr-info.h> +#include <sys/un.h> +#include <sys/types.h> +#include <stdbool.h> + +#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 + |