112636162Sopenharmony_ci/*
212636162Sopenharmony_ci * Copyright (c) 2023 Huawei Device Co., Ltd.
312636162Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
412636162Sopenharmony_ci * you may not use this file except in compliance with the License.
512636162Sopenharmony_ci * You may obtain a copy of the License at
612636162Sopenharmony_ci *
712636162Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
812636162Sopenharmony_ci *
912636162Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1012636162Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1112636162Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212636162Sopenharmony_ci * See the License for the specific language governing permissions and
1312636162Sopenharmony_ci * limitations under the License.
1412636162Sopenharmony_ci */
1512636162Sopenharmony_ci
1612636162Sopenharmony_ci#ifndef IDRIVER_EXTENSION_MANAGER_CALLBACK_H
1712636162Sopenharmony_ci#define IDRIVER_EXTENSION_MANAGER_CALLBACK_H
1812636162Sopenharmony_ci
1912636162Sopenharmony_ci#include <string>
2012636162Sopenharmony_ci#include <iremote_broker.h>
2112636162Sopenharmony_ci#include "driver_ext_mgr_types.h"
2212636162Sopenharmony_ci#include "edm_errors.h"
2312636162Sopenharmony_ci
2412636162Sopenharmony_cinamespace OHOS {
2512636162Sopenharmony_cinamespace ExternalDeviceManager {
2612636162Sopenharmony_ciclass IDriverExtMgrCallback : public IRemoteBroker {
2712636162Sopenharmony_cipublic:
2812636162Sopenharmony_ci    DECLARE_INTERFACE_DESCRIPTOR(u"ohos.driver.IDriverExtMgrCallback");
2912636162Sopenharmony_ci
3012636162Sopenharmony_ci    virtual ~IDriverExtMgrCallback() = default;
3112636162Sopenharmony_ci
3212636162Sopenharmony_ci    enum class DriverExtMgrCallbackInterfaceCode : uint32_t {
3312636162Sopenharmony_ci        ON_CONNECT,
3412636162Sopenharmony_ci        ON_DISCONNECT,
3512636162Sopenharmony_ci        ON_UNBIND,
3612636162Sopenharmony_ci    };
3712636162Sopenharmony_ci
3812636162Sopenharmony_ci    virtual void OnConnect(uint64_t deviceId, const sptr<IRemoteObject> &drvExtObj, const ErrMsg &errMsg) = 0;
3912636162Sopenharmony_ci    virtual void OnDisconnect(uint64_t deviceId, const ErrMsg &errMsg) = 0;
4012636162Sopenharmony_ci    virtual void OnUnBind(uint64_t deviceId, const ErrMsg &errMsg) = 0;
4112636162Sopenharmony_ci};
4212636162Sopenharmony_ci} // namespace ExternalDeviceManager
4312636162Sopenharmony_ci} // namespace OHOS
4412636162Sopenharmony_ci#endif // IDRIVER_EXTENSION_MANAGER_CALLBACK_H
45