mirror of
https://gitee.com/openharmony/distributedhardware_distributed_hardware_fwk
synced 2024-11-23 07:40:26 +00:00
modify define
Signed-off-by: byndyx <baiyanan2@huawei.com>
This commit is contained in:
parent
03e7a25674
commit
f8ba878bf6
@ -23,7 +23,6 @@
|
||||
#include "transport/socket.h"
|
||||
#include "transport/trans_type.h"
|
||||
#include "av_trans_types.h"
|
||||
#include "single_instance.h"
|
||||
#include "softbus_bus_center.h"
|
||||
#include "softbus_common.h"
|
||||
#include "av_trans_constants.h"
|
||||
@ -38,8 +37,8 @@ public:
|
||||
};
|
||||
|
||||
class SoftbusChannelAdapter {
|
||||
DECLARE_SINGLE_INSTANCE_BASE(SoftbusChannelAdapter);
|
||||
public:
|
||||
static SoftbusChannelAdapter& GetInstance();
|
||||
int32_t CreateChannelServer(const std::string &pkgName, const std::string &sessName);
|
||||
int32_t RemoveChannelServer(const std::string &pkgName, const std::string &sessName);
|
||||
|
||||
@ -71,6 +70,10 @@ public:
|
||||
const StreamFrameInfo *frameInfo);
|
||||
|
||||
private:
|
||||
SoftbusChannelAdapter(const SoftbusChannelAdapter&) = delete;
|
||||
SoftbusChannelAdapter& operator= (const SoftbusChannelAdapter&) = delete;
|
||||
SoftbusChannelAdapter(SoftbusChannelAdapter&&) = delete;
|
||||
SoftbusChannelAdapter& operator= (SoftbusChannelAdapter&&) = delete;
|
||||
SoftbusChannelAdapter();
|
||||
~SoftbusChannelAdapter();
|
||||
|
||||
|
@ -28,9 +28,6 @@ namespace OHOS {
|
||||
namespace DistributedHardware {
|
||||
#undef DH_LOG_TAG
|
||||
#define DH_LOG_TAG "SoftbusChannelAdapter"
|
||||
|
||||
IMPLEMENT_SINGLE_INSTANCE(SoftbusChannelAdapter);
|
||||
|
||||
namespace {
|
||||
const static std::pair<std::string, std::string> LOCAL_TO_PEER_SESSION_NAME_MAP[] = {
|
||||
{OWNER_NAME_D_MIC + "_" + SENDER_CONTROL_SESSION_NAME_SUFFIX,
|
||||
@ -108,6 +105,12 @@ static void onDevTimeSyncResult(const TimeSyncResultInfo *info, int32_t result)
|
||||
SoftbusChannelAdapter::GetInstance().OnSoftbusTimeSyncResult(info, result);
|
||||
}
|
||||
|
||||
SoftbusChannelAdapter& SoftbusChannelAdapter::GetInstance()
|
||||
{
|
||||
static SoftbusChannelAdapter instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
SoftbusChannelAdapter::SoftbusChannelAdapter()
|
||||
{
|
||||
sessListener_.OnBind = OnSessionOpened;
|
||||
|
Loading…
Reference in New Issue
Block a user