10b9a52e3Sopenharmony_ci/*
20b9a52e3Sopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd.
30b9a52e3Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
40b9a52e3Sopenharmony_ci * you may not use this file except in compliance with the License.
50b9a52e3Sopenharmony_ci * You may obtain a copy of the License at
60b9a52e3Sopenharmony_ci *
70b9a52e3Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
80b9a52e3Sopenharmony_ci *
90b9a52e3Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
100b9a52e3Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
110b9a52e3Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
120b9a52e3Sopenharmony_ci * See the License for the specific language governing permissions and
130b9a52e3Sopenharmony_ci * limitations under the License.
140b9a52e3Sopenharmony_ci */
150b9a52e3Sopenharmony_ci#ifndef QOS_COMMON_H
160b9a52e3Sopenharmony_ci#define QOS_COMMON_H
170b9a52e3Sopenharmony_ci
180b9a52e3Sopenharmony_cinamespace OHOS {
190b9a52e3Sopenharmony_cinamespace QosCommon {
200b9a52e3Sopenharmony_ci
210b9a52e3Sopenharmony_ciconstexpr int AF_RTG_ALL = 0x1fff;
220b9a52e3Sopenharmony_ci
230b9a52e3Sopenharmony_cistruct AuthCtrlData {
240b9a52e3Sopenharmony_ci    int pid;
250b9a52e3Sopenharmony_ci    unsigned int type;
260b9a52e3Sopenharmony_ci    unsigned int rtgFlag;
270b9a52e3Sopenharmony_ci    unsigned int qosFlag;
280b9a52e3Sopenharmony_ci    unsigned int status;
290b9a52e3Sopenharmony_ci};
300b9a52e3Sopenharmony_ci
310b9a52e3Sopenharmony_cienum AuthOperationType {
320b9a52e3Sopenharmony_ci    AUTH_ENABLE = 1,
330b9a52e3Sopenharmony_ci    AUTH_DELETE,
340b9a52e3Sopenharmony_ci    AUTH_GET,
350b9a52e3Sopenharmony_ci    AUTH_SWITCH,
360b9a52e3Sopenharmony_ci    AUTH_MAX_NR,
370b9a52e3Sopenharmony_ci};
380b9a52e3Sopenharmony_ci
390b9a52e3Sopenharmony_cienum AuthStatus {
400b9a52e3Sopenharmony_ci    AUTH_STATUS_DISABLED = 1,
410b9a52e3Sopenharmony_ci    AUTH_STATUS_SYSTEM_SERVER = 2,
420b9a52e3Sopenharmony_ci    AUTH_STATUS_FOREGROUND,
430b9a52e3Sopenharmony_ci    AUTH_STATUS_BACKGROUND,
440b9a52e3Sopenharmony_ci    AUTH_STATUS_DEAD,
450b9a52e3Sopenharmony_ci};
460b9a52e3Sopenharmony_ci
470b9a52e3Sopenharmony_ci#define BASIC_AUTH_CTRL_OPERATION \
480b9a52e3Sopenharmony_ci    _IOWR(0xCD, 1, struct AuthCtrlData)
490b9a52e3Sopenharmony_ci
500b9a52e3Sopenharmony_ciint AuthEnable(int pid, unsigned int flag, unsigned int status);
510b9a52e3Sopenharmony_ciint AuthPause(int pid);
520b9a52e3Sopenharmony_ciint AuthDelete(int pid);
530b9a52e3Sopenharmony_ci
540b9a52e3Sopenharmony_ci} // namespace QosCommon
550b9a52e3Sopenharmony_ci} // namespace OHOS
560b9a52e3Sopenharmony_ci#endif // QOS_COMMON_H