mirror of
https://gitee.com/openharmony/security_device_security_level
synced 2024-11-23 06:41:06 +00:00
fix: standardize ipc code
Signed-off-by: wenkaisong <songwenkai1@huawei.com>
This commit is contained in:
parent
90cb8f1568
commit
b3f8edfd96
18
CODEOWNERS
Normal file
18
CODEOWNERS
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Huawei Device Co., Ltd.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
# any change to common/include/dslm_service_ipc_interface_code.h
|
||||
# needs to be reviewed by @leonchan5
|
||||
common/include/dslm_service_ipc_interface_code.h @leonchan5
|
36
common/include/dslm_service_ipc_interface_code.h
Normal file
36
common/include/dslm_service_ipc_interface_code.h
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Huawei Device Co., Ltd.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef DSLM_SERVICE_IPC_INTERFACE_CODE_H
|
||||
#define DSLM_SERVICE_IPC_INTERFACE_CODE_H
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
/* SAID: 3511 */
|
||||
namespace OHOS {
|
||||
namespace Security {
|
||||
namespace DeviceSecurityLevel {
|
||||
enum class DeviceSecurityLevelInterfaceCode {
|
||||
CMD_GET_DEVICE_SECURITY_LEVEL = 1,
|
||||
};
|
||||
|
||||
enum class DeviceSecurityLevelCallbackInterfaceCode {
|
||||
CMD_SET_DEVICE_SECURITY_LEVEL = 1,
|
||||
};
|
||||
} // namespace DeviceSecurityLevel
|
||||
} // namespace Security
|
||||
} // namespace OHOS
|
||||
|
||||
#endif // DSLM_SERVICE_IPC_INTERFACE_CODE_H
|
@ -19,6 +19,7 @@
|
||||
#include <cstdint>
|
||||
#include <string.h>
|
||||
|
||||
#include "dslm_service_ipc_interface_code.h"
|
||||
#include "iremote_broker.h"
|
||||
#include "message_parcel.h"
|
||||
|
||||
@ -29,17 +30,19 @@ constexpr int32_t DEVICE_SECURITY_LEVEL_MANAGER_SA_ID = 3511;
|
||||
|
||||
class IDeviceSecurityLevel : public IRemoteBroker {
|
||||
public:
|
||||
using InterfaceCode = DeviceSecurityLevelInterfaceCode;
|
||||
DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Security.DeviceSecurityLevel");
|
||||
enum {
|
||||
CMD_GET_DEVICE_SECURITY_LEVEL = 1,
|
||||
CMD_GET_DEVICE_SECURITY_LEVEL = static_cast<uint32_t>(InterfaceCode::CMD_GET_DEVICE_SECURITY_LEVEL),
|
||||
};
|
||||
};
|
||||
|
||||
class IDeviceSecurityLevelCallback : public IRemoteBroker {
|
||||
public:
|
||||
using InterfaceCode = DeviceSecurityLevelCallbackInterfaceCode;
|
||||
DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Security.DeviceSecurityLevel.Callback");
|
||||
enum {
|
||||
CMD_SET_DEVICE_SECURITY_LEVEL = 1,
|
||||
CMD_SET_DEVICE_SECURITY_LEVEL = static_cast<uint32_t>(InterfaceCode::CMD_SET_DEVICE_SECURITY_LEVEL),
|
||||
};
|
||||
};
|
||||
} // namespace DeviceSecurityLevel
|
||||
|
Loading…
Reference in New Issue
Block a user