// Code generated by gotdgen, DO NOT EDIT.package tgimport ()// No-op definition for keeping imports.var ( _ = bin.Buffer{} _ = context.Background() _ = fmt.Stringer(nil) _ = strings.Builder{} _ = errors.Is _ = multierr.AppendInto _ = sort.Ints _ = tdp.Format _ = tgerr.Error{} _ = tdjson.Encoder{})// PhoneCheckGroupCallRequest represents TL type `phone.checkGroupCall#b59cf977`.// Check which of the specified source IDs the server still recognizes as joined to a// group call. This method can be used with all group call types, see here »¹ for more// info.// After joining the main connection with phone.joinGroupCall¹, pass its non-zero// SSRC/source ID to this method periodically. If a presentation connection is also// active, include the separate source registered using phone.joinGroupCallPresentation².// The method returns the subset of the supplied sources that are still joined. A missing// source means that the corresponding connection must be recreated and joined again; it// does not indicate whether media packets are currently flowing. If the method returns// GROUPCALL_JOIN_MISSING, the main connection must be rejoined.//// Links:// 1. https://core.telegram.org/api/group-calls#maintaining-group-call-connections// 2. https://core.telegram.org/method/phone.joinGroupCall// 3. https://core.telegram.org/method/phone.joinGroupCallPresentation//// See https://core.telegram.org/method/phone.checkGroupCall for reference.typePhoneCheckGroupCallRequeststruct {// Group call whose WebRTC connections should be checkedCallInputGroupCallClass// Non-zero SSRC/source IDs of the caller's main and presentation connectionsSources []int}// PhoneCheckGroupCallRequestTypeID is TL type id of PhoneCheckGroupCallRequest.constPhoneCheckGroupCallRequestTypeID = 0xb59cf977// Ensuring interfaces in compile-time for PhoneCheckGroupCallRequest.var ( _ bin.Encoder = &PhoneCheckGroupCallRequest{} _ bin.Decoder = &PhoneCheckGroupCallRequest{} _ bin.BareEncoder = &PhoneCheckGroupCallRequest{} _ bin.BareDecoder = &PhoneCheckGroupCallRequest{})func ( *PhoneCheckGroupCallRequest) () bool {if == nil {returntrue }if !(.Call == nil) {returnfalse }if !(.Sources == nil) {returnfalse }returntrue}// String implements fmt.Stringer.func ( *PhoneCheckGroupCallRequest) () string {if == nil {return"PhoneCheckGroupCallRequest(nil)" }typePhoneCheckGroupCallRequestreturnfmt.Sprintf("PhoneCheckGroupCallRequest%+v", (*))}// FillFrom fills PhoneCheckGroupCallRequest from given interface.func ( *PhoneCheckGroupCallRequest) ( interface { () ( InputGroupCallClass) () ( []int)}) { .Call = .() .Sources = .()}// TypeID returns type id in TL schema.//// See https://core.telegram.org/mtproto/TL-tl#remarks.func (*PhoneCheckGroupCallRequest) () uint32 {returnPhoneCheckGroupCallRequestTypeID}// TypeName returns name of type in TL schema.func (*PhoneCheckGroupCallRequest) () string {return"phone.checkGroupCall"}// TypeInfo returns info about TL type.func ( *PhoneCheckGroupCallRequest) () tdp.Type { := tdp.Type{Name: "phone.checkGroupCall",ID: PhoneCheckGroupCallRequestTypeID, }if == nil { .Null = truereturn } .Fields = []tdp.Field{ {Name: "Call",SchemaName: "call", }, {Name: "Sources",SchemaName: "sources", }, }return}// Encode implements bin.Encoder.func ( *PhoneCheckGroupCallRequest) ( *bin.Buffer) error {if == nil {returnfmt.Errorf("can't encode phone.checkGroupCall#b59cf977 as nil") } .PutID(PhoneCheckGroupCallRequestTypeID)return .EncodeBare()}// EncodeBare implements bin.BareEncoder.func ( *PhoneCheckGroupCallRequest) ( *bin.Buffer) error {if == nil {returnfmt.Errorf("can't encode phone.checkGroupCall#b59cf977 as nil") }if .Call == nil {returnfmt.Errorf("unable to encode phone.checkGroupCall#b59cf977: field call is nil") }if := .Call.Encode(); != nil {returnfmt.Errorf("unable to encode phone.checkGroupCall#b59cf977: field call: %w", ) } .PutVectorHeader(len(.Sources))for , := range .Sources { .PutInt() }returnnil}// Decode implements bin.Decoder.func ( *PhoneCheckGroupCallRequest) ( *bin.Buffer) error {if == nil {returnfmt.Errorf("can't decode phone.checkGroupCall#b59cf977 to nil") }if := .ConsumeID(PhoneCheckGroupCallRequestTypeID); != nil {returnfmt.Errorf("unable to decode phone.checkGroupCall#b59cf977: %w", ) }return .DecodeBare()}// DecodeBare implements bin.BareDecoder.func ( *PhoneCheckGroupCallRequest) ( *bin.Buffer) error {if == nil {returnfmt.Errorf("can't decode phone.checkGroupCall#b59cf977 to nil") } { , := DecodeInputGroupCall()if != nil {returnfmt.Errorf("unable to decode phone.checkGroupCall#b59cf977: field call: %w", ) } .Call = } { , := .VectorHeader()if != nil {returnfmt.Errorf("unable to decode phone.checkGroupCall#b59cf977: field sources: %w", ) }if > 0 { .Sources = make([]int, 0, %bin.PreallocateLimit) }for := 0; < ; ++ { , := .Int()if != nil {returnfmt.Errorf("unable to decode phone.checkGroupCall#b59cf977: field sources: %w", ) } .Sources = append(.Sources, ) } }returnnil}// GetCall returns value of Call field.func ( *PhoneCheckGroupCallRequest) () ( InputGroupCallClass) {if == nil {return }return .Call}// GetSources returns value of Sources field.func ( *PhoneCheckGroupCallRequest) () ( []int) {if == nil {return }return .Sources}// PhoneCheckGroupCall invokes method phone.checkGroupCall#b59cf977 returning error if any.// Check which of the specified source IDs the server still recognizes as joined to a// group call. This method can be used with all group call types, see here »¹ for more// info.// After joining the main connection with phone.joinGroupCall¹, pass its non-zero// SSRC/source ID to this method periodically. If a presentation connection is also// active, include the separate source registered using phone.joinGroupCallPresentation².// The method returns the subset of the supplied sources that are still joined. A missing// source means that the corresponding connection must be recreated and joined again; it// does not indicate whether media packets are currently flowing. If the method returns// GROUPCALL_JOIN_MISSING, the main connection must be rejoined.//// Links:// 1. https://core.telegram.org/api/group-calls#maintaining-group-call-connections// 2. https://core.telegram.org/method/phone.joinGroupCall// 3. https://core.telegram.org/method/phone.joinGroupCallPresentation//// Possible errors://// 400 GROUPCALL_INVALID: The specified group call is invalid.// 400 GROUPCALL_JOIN_MISSING: You haven't joined this group call.//// See https://core.telegram.org/method/phone.checkGroupCall for reference.func ( *Client) ( context.Context, *PhoneCheckGroupCallRequest) ([]int, error) {varIntVectorif := .rpc.Invoke(, , &); != nil {returnnil, }return []int(.Elems), nil}
The pages are generated with Goldsv0.8.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.