summaryrefslogtreecommitdiff
path: root/server/alarm-manager-util.h
blob: 5586a18226c746f7a3d97bd7c2d47dc3ad3f4ec6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
 * 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);
int _get_pid_from_appid(const char *app_id, uid_t uid);

#ifdef __cplusplus
}
#endif