• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 IF_BUS_CENTER_EX_OBJ_H
17 #define IF_BUS_CENTER_EX_OBJ_H
18 
19 #include "iremote_broker.h"
20 
21 #include "softbus_bus_center_ex_struct.h"
22 #include "softbus_resource_query_struct.h"
23 
24 namespace OHOS {
25 class IBusCenterExObj : public IRemoteBroker {
26 public:
27     enum {
28         SOFTBUS_BUS_CENTER_EX_OBJ_PROXY_INIT_SUCCESS = 0,
29         SOFTBUS_BUS_CENTER_EX_OBJ_PROXY_DLOPEN_FAILED,
30         SOFTBUS_BUS_CENTER_EX_OBJ_PROXY_DLSYM_FAILED,
31         SOFTBUS_BUS_CENTER_EX_OBJ_PROXY_INSTANCE_EXIT,
32         SOFTBUS_BUS_CENTER_EX_OBJ_PROXY_GET_SOFTBUS_SERVER_INFO_FAILED,
33     };
34     DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.IBusCenter.Ex.virtual");
35 
36     virtual int32_t EnableDiscoveryPolicy(const char *pkgName, const char *capability, bool enable,
37         const sptr<IRemoteObject> &callback) = 0;
38     virtual int32_t SetDiscoveryPolicy(const char *capability, DiscoveryPolicy policy, const DeviceInfo *device) = 0;
39     virtual int32_t JoinMetaNode(const char *pkgName, void *addr, CustomData *customData, uint32_t addrTypeLen,
40         const sptr<IRemoteObject> &callback) = 0;
41     virtual int32_t SetPreLinkParam(const void *msg, const uint32_t msgLen) = 0;
42     virtual int32_t GetPreLinkParam(void *msg, uint32_t *msgLen) = 0;
43     virtual int32_t RegPreLinkParamListener(const char *pkgName, const sptr<IRemoteObject> &callback) = 0;
44     virtual int32_t LeaveMetaNode(const char *pkgName, const char *networkId, const sptr<IRemoteObject> &callback) = 0;
45     virtual int32_t ResourceConflictCheck(const SoftBusResourceRequest *resource, ConflictInfo *conflict) = 0;
46     virtual int32_t RegisterConflictListener(const char *pkgName, const sptr<IRemoteObject> &callback) = 0;
47     virtual int32_t CtrlLNNBleHb(const char *pkgName, int32_t strategy, int32_t timeout) = 0;
48     virtual int32_t ResolveResourceConflict(const char *pkgName, const char *deviceId) = 0;
49 };
50 } // namespace OHOS
51 
52 #endif // IF_BUS_CENTER_EX_OBJ_H