-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package tdproto | ||
|
||
// Call parameters | ||
type ClientCallSdp struct { | ||
BaseEvent | ||
Params clientCallSdpParams `json:"params"` | ||
} | ||
|
||
func (p ClientCallSdp) GetName() string { return "client.call.sdp" } | ||
|
||
type clientCallSdpParams struct { | ||
// Chat or contact id | ||
Jid JID `json:"jid"` | ||
|
||
// Call id | ||
Uid string `json:"uid"` | ||
|
||
// SDP data | ||
JSEP JSEP `json:"jsep"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package tdproto | ||
|
||
func NewServerCallSdp(jid JID, uid, sdpType, sdp string) (r ServerCallSdp) { | ||
r.Name = r.GetName() | ||
r.Params.Jid = jid | ||
r.Params.JSEP.Type = sdpType | ||
r.Params.JSEP.SDP = sdp | ||
r.Params.Uid = uid | ||
return r | ||
} | ||
|
||
// Call parameters | ||
type ServerCallSdp struct { | ||
BaseEvent | ||
Params serverCallSdpParams `json:"params"` | ||
} | ||
|
||
func (p ServerCallSdp) GetName() string { return "server.call.sdp" } | ||
|
||
type serverCallSdpParams struct { | ||
// Chat or contact id | ||
Jid JID `json:"jid"` | ||
|
||
// Call id | ||
Uid string `json:"uid"` | ||
|
||
// SDP data | ||
JSEP JSEP `json:"jsep"` | ||
} |