• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-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 /**
17  * @addtogroup Privacy
18  * @{
19  *
20  * @brief Provides sensitive data access management.
21  *
22  * @since 8.0
23  * @version 8.0
24  */
25 
26 /**
27  * @file on_permission_used_record_callback.h
28  *
29  * @brief Declares OnPermissionUsedRecordCallback class.
30  *
31  * @since 8.0
32  * @version 8.0
33  */
34 
35 #ifndef ON_PERMISSION_USED_RECORD_CALLBACK_H
36 #define ON_PERMISSION_USED_RECORD_CALLBACK_H
37 
38 #include "errors.h"
39 #include "iremote_broker.h"
40 #include "permission_used_result.h"
41 #include "privacy_permission_record_ipc_interface_code.h"
42 
43 namespace OHOS {
44 namespace Security {
45 namespace AccessToken {
46 /**
47  * @brief Declares OnPermissionUsedRecordCallback interface class
48  */
49 class OnPermissionUsedRecordCallback : public IRemoteBroker {
50 public:
51     /**
52      * @brief declare interface descritor which used in parcel.
53      * @param const string
54      */
55     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.security.accesstoken.OnPermissionUsedRecordCallback");
56 
57     /**
58      * @brief pure virtual fuction.
59      * @param code error code
60      * @param result PermissionUsedResult quote, as callback info
61      */
62     virtual void OnQueried(ErrCode code, PermissionUsedResult& result) = 0;
63 };
64 } // namespace AccessToken
65 } // namespace Security
66 } // namespace OHOS
67 #endif // ON_PERMISSION_USED_RECORD_CALLBACK_H
68