From dc27e909d40a05a06d3774fe3329e9cd2e310c09 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期二, 30 十一月 2021 20:30:02 +0800
Subject: [PATCH] fix GetUserProfile

---
 client.go |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/client.go b/client.go
index 40f3d17..ecda831 100644
--- a/client.go
+++ b/client.go
@@ -1,7 +1,8 @@
 package bhomedbapi
 
 import (
-	"basic.com/valib/bhomebus.git"
+	"basic.com/valib/c_bhomebus.git/proto/source/bhome_msg"
+	"errors"
 	"fmt"
 	"strconv"
 )
@@ -43,16 +44,26 @@
 	}
 }
 
-var getNetNode = func(topic string) []bhomebus.NetNode{
+var getNetNode = func(topic string) []*bhome_msg.MsgQueryTopicReply_BHNodeAddress{
 	return nil
 }
 
-func InitGetNetNode(fn func(name string)[]bhomebus.NetNode) {
+func InitGetNetNode(fn func(name string)[]*bhome_msg.MsgQueryTopicReply_BHNodeAddress) {
+	//if fn != nil {
+	//	getNetNode = fn
+	//}
+}
+
+var busReq = func(req *bhome_msg.MsgRequestTopic,dest []*bhome_msg.MsgQueryTopicReply_BHNodeAddress) ([]byte, error) {
+	return nil, errors.New("please init InitDoReq first")
+}
+
+func InitDoReq(fn func(*bhome_msg.MsgRequestTopic, []*bhome_msg.MsgQueryTopicReply_BHNodeAddress) ([]byte, error)) {
 	if fn != nil {
-		getNetNode = fn
+		busReq = fn
 	}
 }
 
 func url2Topic(serviceName string, url string) string {
-	return url+"_"+serviceName
+	return url
 }
\ No newline at end of file

--
Gitblit v1.8.0