1 /*
2  * Copyright (c) 2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef DSLM_SERVICE_H
17 #define DSLM_SERVICE_H
18 
19 #include "iunknown.h"
20 #include "samgr_lite.h"
21 
22 #include "device_security_defines.h"
23 #include "device_security_level_defines.h"
24 #include "dslm_inner_process.h"
25 
26 #define DSLM_SAMGR_SERVICE "dslm_service"
27 #define DSLM_SAMGR_FEATURE "dslm_feature"
28 
29 typedef struct DslmService {
30     INHERIT_SERVICE;
31     Identity identity;
32 } DslmService;
33 
34 typedef struct DslmFeatureApi {
35     INHERIT_IUNKNOWN;
36     int32_t (*DslmGetDeviceSecurityLevel)(IUnknown *iUnknown, DslmAsyncCallParams *req, DeviceSecurityInfoCallback cb);
37 } DslmFeatureApi;
38 
39 typedef struct DslmFeature {
40     INHERIT_FEATURE;
41     INHERIT_IUNKNOWNENTRY(DslmFeatureApi);
42     Identity identity;
43     Service *parent;
44 } DslmFeature;
45 
46 void DslmServiceInit(void);
47 void DslmFeatureInit(void);
48 
49 #endif // DSLM_SERVICE_H