44package client
55
66import (
7+ "context"
78 "errors"
89 "fmt"
9- // "time"
10- // "runtime/debug"
10+
11+ . "tim/common"
12+ "tim/daoService"
13+ . "tim/protocol"
14+ "tim/route"
15+ "tim/utils"
1116
1217 "github.com/donnie4w/go-logger/logger"
13- . "tim.common"
14- "tim.daoService"
15- . "tim.protocol"
16- "tim.route"
17- "tim.utils"
1818)
1919
2020type TimImpl struct {
@@ -25,100 +25,87 @@ type TimImpl struct {
2525
2626// Parameters:
2727// - Param
28- func (this * TimImpl ) TimStream (param * TimParam ) (err error ) {
28+ func (this * TimImpl ) TimStream (ctx context. Context , param * TimParam ) (err error ) {
2929 panic ("error" )
30- return
3130}
32- func (this * TimImpl ) TimStarttls () (err error ) {
31+ func (this * TimImpl ) TimStarttls (ctx context. Context ) (err error ) {
3332 panic ("error" )
34- return
3533}
3634
3735// Parameters:
3836// - Tid
3937// - Pwd
40- func (this * TimImpl ) TimLogin (tid * Tid , pwd string ) (err error ) {
38+ func (this * TimImpl ) TimLogin (ctx context. Context , tid * Tid , pwd string ) (err error ) {
4139 logger .Debug ("Login:" , tid , pwd )
4240 panic ("error" )
43- return
4441}
4542
4643// Parameters:
4744// - Ab
48- func (this * TimImpl ) TimAck (ab * TimAckBean ) (err error ) {
45+ func (this * TimImpl ) TimAck (ctx context. Context , ab * TimAckBean ) (err error ) {
4946 logger .Debug ("TimAck=========>" , ab )
5047 panic ("error" )
51- return
5248}
5349
5450// Parameters:
5551// - Pbean
56- func (this * TimImpl ) TimPresence (pbean * TimPBean ) (err error ) {
52+ func (this * TimImpl ) TimPresence (ctx context. Context , pbean * TimPBean ) (err error ) {
5753 logger .Debug (pbean )
5854 panic ("error" )
59- return
6055}
6156
6257// Parameters:
6358// - Mbean
64- func (this * TimImpl ) TimMessage (mbean * TimMBean ) (err error ) {
59+ func (this * TimImpl ) TimMessage (ctx context. Context , mbean * TimMBean ) (err error ) {
6560 logger .Debug (mbean )
6661 panic ("error" )
67- return
6862}
6963
7064// Parameters:
7165// - ThreadId
72- func (this * TimImpl ) TimPing (threadId string ) (err error ) {
66+ func (this * TimImpl ) TimPing (ctx context. Context , threadId string ) (err error ) {
7367 panic ("error" )
74- return
7568}
7669
7770// Parameters:
7871// - E
79- func (this * TimImpl ) TimError (e * TimError ) (err error ) {
72+ func (this * TimImpl ) TimError (ctx context. Context , e * TimError ) (err error ) {
8073 panic ("error" )
81- return
8274}
83- func (this * TimImpl ) TimLogout () (err error ) {
75+ func (this * TimImpl ) TimLogout (ctx context. Context ) (err error ) {
8476 panic ("error" )
85- return
8677}
8778
8879// Parameters:
8980// - Tid
9081// - Pwd
91- func (this * TimImpl ) TimRegist (tid * Tid , pwd string ) (err error ) {
82+ func (this * TimImpl ) TimRegist (ctx context. Context , tid * Tid , pwd string ) (err error ) {
9283 panic ("error" )
93- return
9484}
9585
9686// Parameters:
9787// - Tid
9888// - Pwd
99- func (this * TimImpl ) TimRemoteUserAuth (tid * Tid , pwd string , auth * TimAuth ) (r * TimRemoteUserBean , err error ) {
89+ func (this * TimImpl ) TimRemoteUserAuth (ctx context. Context , id * Tid , pwd string , auth * TimAuth ) (r * TimRemoteUserBean , err error ) {
10090 panic ("error" )
101- return
10291}
10392
10493// Parameters:
10594// - Tid
106- func (this * TimImpl ) TimRemoteUserGet (tid * Tid , auth * TimAuth ) (r * TimRemoteUserBean , err error ) {
95+ func (this * TimImpl ) TimRemoteUserGet (ctx context. Context , tid * Tid , auth * TimAuth ) (r * TimRemoteUserBean , err error ) {
10796 panic ("error" )
108- return
10997}
11098
11199// Parameters:
112100// - Tid
113101// - Ub
114- func (this * TimImpl ) TimRemoteUserEdit (tid * Tid , ub * TimUserBean , auth * TimAuth ) (r * TimRemoteUserBean , err error ) {
102+ func (this * TimImpl ) TimRemoteUserEdit (ctx context. Context , tid * Tid , ub * TimUserBean , auth * TimAuth ) (r * TimRemoteUserBean , err error ) {
115103 panic ("error" )
116- return
117104}
118105
119106// Parameters:
120107// - Pbean
121- func (this * TimImpl ) TimResponsePresence (pbean * TimPBean , auth * TimAuth ) (r * TimResponseBean , err error ) {
108+ func (this * TimImpl ) TimResponsePresence (ctx context. Context , pbean * TimPBean , auth * TimAuth ) (r * TimResponseBean , err error ) {
122109 logger .Debug ("TimResponsePresence" , pbean , auth )
123110 if ! checkAuth (auth ) {
124111 err = errors .New (fmt .Sprint ("cluster auth fail:" , auth ))
@@ -144,7 +131,7 @@ func _TimResponsePresence(pbean *TimPBean, auth *TimAuth) (r *TimResponseBean, e
144131
145132// Parameters:
146133// - Mbean
147- func (this * TimImpl ) TimResponseMessage (mbean * TimMBean , auth * TimAuth ) (r * TimResponseBean , err error ) {
134+ func (this * TimImpl ) TimResponseMessage (ctx context. Context , mbean * TimMBean , auth * TimAuth ) (r * TimResponseBean , err error ) {
148135 logger .Debug ("TimResponseMessage" , mbean , auth )
149136 if ! checkAuth (auth ) {
150137 err = errors .New (fmt .Sprint ("cluster auth fail:" , auth ))
@@ -184,24 +171,21 @@ func _TimResponseMessage(mbean *TimMBean, auth *TimAuth) (r *TimResponseBean, er
184171 return
185172}
186173
187- func (this * TimImpl ) TimMessageIq (timMsgIq * TimMessageIq , iqType string ) (err error ) {
174+ func (this * TimImpl ) TimMessageIq (ctx context. Context , timMsgIq * TimMessageIq , iqType string ) (err error ) {
188175 logger .Debug ("TimMessageIq:" , timMsgIq , " " , iqType )
189176 panic ("error" )
190- return
191177}
192178
193179// Parameters:
194180// - Mbean
195- func (this * TimImpl ) TimMessageResult_ (mbean * TimMBean ) (err error ) {
181+ func (this * TimImpl ) TimMessageResult_ (ctx context. Context , mbean * TimMBean ) (err error ) {
196182 logger .Debug ("TimMessageResult_:" , mbean )
197183 panic ("error" )
198- return
199184}
200185
201- func (this * TimImpl ) TimRoser (roster * TimRoster ) (err error ) {
186+ func (this * TimImpl ) TimRoser (ctx context. Context , roster * TimRoster ) (err error ) {
202187 logger .Debug ("TimRoser:" , roster )
203188 panic ("error" )
204- return
205189}
206190
207191func checkAuth (a * TimAuth ) bool {
@@ -211,27 +195,24 @@ func checkAuth(a *TimAuth) bool {
211195 return false
212196}
213197
214- func (this * TimImpl ) TimResponseMessageIq (timMsgIq * TimMessageIq , iqType string , auth * TimAuth ) (r * TimMBeanList , err error ) {
198+ func (this * TimImpl ) TimResponseMessageIq (ctx context. Context , timMsgIq * TimMessageIq , iqType string , auth * TimAuth ) (r * TimMBeanList , err error ) {
215199 logger .Debug ("TimResponseMessageIq:" , timMsgIq , iqType , auth )
216200 panic ("error TimResponseMessageIq" )
217- return
218201}
219202
220- func (this * TimImpl ) TimMessageList (mbeanList * TimMBeanList ) (err error ) {
203+ func (this * TimImpl ) TimMessageList (ctx context. Context , mbeanList * TimMBeanList ) (err error ) {
221204 logger .Debug ("TimMessageList:" , mbeanList )
222205 panic ("error TimMessageList" )
223- return
224206}
225207
226208// Parameters:
227209// - PbeanList
228- func (this * TimImpl ) TimPresenceList (pbeanList * TimPBeanList ) (err error ) {
210+ func (this * TimImpl ) TimPresenceList (ctx context. Context , pbeanList * TimPBeanList ) (err error ) {
229211 logger .Debug ("TimPresenceList:" , pbeanList )
230212 panic ("error TimPresenceList" )
231- return
232213}
233214
234- func (this * TimImpl ) TimResponsePresenceList (pbeanList * TimPBeanList , auth * TimAuth ) (r * TimResponseBean , err error ) {
215+ func (this * TimImpl ) TimResponsePresenceList (ctx context. Context , pbeanList * TimPBeanList , auth * TimAuth ) (r * TimResponseBean , err error ) {
235216 if ! checkAuth (auth ) {
236217 err = errors .New (fmt .Sprint ("cluster TimResponsePresenceList fail:" , auth ))
237218 return
@@ -266,7 +247,7 @@ func _TimResponsePresenceList(pbeanList *TimPBeanList, auth *TimAuth) (r *TimRes
266247// Parameters:
267248// - MbeanList
268249// - Auth
269- func (this * TimImpl ) TimResponseMessageList (mbeanList * TimMBeanList , auth * TimAuth ) (r * TimResponseBean , err error ) {
250+ func (this * TimImpl ) TimResponseMessageList (ctx context. Context , mbeanList * TimMBeanList , auth * TimAuth ) (r * TimResponseBean , err error ) {
270251 if ! checkAuth (auth ) {
271252 err = errors .New (fmt .Sprint ("cluster TimResponseMessageList fail:" , auth ))
272253 return
@@ -298,7 +279,7 @@ func _TimResponseMessageList(mbeanList *TimMBeanList, auth *TimAuth) (r *TimResp
298279 return
299280}
300281
301- func (this * TimImpl ) TimProperty (tpb * TimPropertyBean ) (err error ) {
282+ func (this * TimImpl ) TimProperty (ctx context. Context , tpb * TimPropertyBean ) (err error ) {
302283 logger .Debug ("TimProperty:" , tpb )
303284 return
304285}
0 commit comments