mobile/bind/testdata/structs.go.golden

140 lines
2.9 KiB
Plaintext
Raw Normal View History

// Package go_structs is an autogenerated binder stub for package structs.
// gobind -lang=go structs
//
// File is generated by gobind. Do not edit.
package go_structs
import (
"golang.org/x/mobile/bind/seq"
"structs"
)
const (
proxyI_Descriptor = "go.structs.I"
proxyI_M_Code = 0x10a
)
func proxyI_M(out, in *seq.Buffer) {
ref := in.ReadRef()
v := ref.Get().(structs.I)
v.M()
}
func init() {
seq.Register(proxyI_Descriptor, proxyI_M_Code, proxyI_M)
}
type proxyI seq.Ref
func (p *proxyI) M() {
in := new(seq.Buffer)
seq.Transact((*seq.Ref)(p), "go.structs.I", proxyI_M_Code, in)
}
func proxy_Identity(out, in *seq.Buffer) {
// Must be a Go object
param_s_ref := in.ReadRef()
param_s := param_s_ref.Get().(*structs.S)
res := structs.Identity(param_s)
out.WriteGoRef(res)
}
func proxy_IdentityWithError(out, in *seq.Buffer) {
// Must be a Go object
param_s_ref := in.ReadRef()
param_s := param_s_ref.Get().(*structs.S)
res, err := structs.IdentityWithError(param_s)
out.WriteGoRef(res)
if err == nil {
out.WriteString("")
} else {
out.WriteString(err.Error())
}
}
const (
proxyS_Descriptor = "go.structs.S"
proxyS_X_Get_Code = 0x00f
proxyS_X_Set_Code = 0x01f
proxyS_Y_Get_Code = 0x10f
proxyS_Y_Set_Code = 0x11f
proxyS_Identity_Code = 0x00c
proxyS_Sum_Code = 0x10c
)
type proxyS seq.Ref
func proxyS_X_Set(out, in *seq.Buffer) {
ref := in.ReadRef()
v := in.ReadFloat64()
ref.Get().(*structs.S).X = v
}
func proxyS_X_Get(out, in *seq.Buffer) {
ref := in.ReadRef()
v := ref.Get().(*structs.S).X
out.WriteFloat64(v)
}
func proxyS_Y_Set(out, in *seq.Buffer) {
ref := in.ReadRef()
v := in.ReadFloat64()
ref.Get().(*structs.S).Y = v
}
func proxyS_Y_Get(out, in *seq.Buffer) {
ref := in.ReadRef()
v := ref.Get().(*structs.S).Y
out.WriteFloat64(v)
}
func proxyS_Identity(out, in *seq.Buffer) {
ref := in.ReadRef()
v := ref.Get().(*structs.S)
res, err := v.Identity()
out.WriteGoRef(res)
if err == nil {
out.WriteString("")
} else {
out.WriteString(err.Error())
}
}
func proxyS_Sum(out, in *seq.Buffer) {
ref := in.ReadRef()
v := ref.Get().(*structs.S)
res := v.Sum()
out.WriteFloat64(res)
}
func init() {
seq.Register(proxyS_Descriptor, proxyS_X_Set_Code, proxyS_X_Set)
seq.Register(proxyS_Descriptor, proxyS_X_Get_Code, proxyS_X_Get)
seq.Register(proxyS_Descriptor, proxyS_Y_Set_Code, proxyS_Y_Set)
seq.Register(proxyS_Descriptor, proxyS_Y_Get_Code, proxyS_Y_Get)
seq.Register(proxyS_Descriptor, proxyS_Identity_Code, proxyS_Identity)
seq.Register(proxyS_Descriptor, proxyS_Sum_Code, proxyS_Sum)
}
const (
proxyS2_Descriptor = "go.structs.S2"
proxyS2_M_Code = 0x00c
)
type proxyS2 seq.Ref
func proxyS2_M(out, in *seq.Buffer) {
ref := in.ReadRef()
v := ref.Get().(*structs.S2)
v.M()
}
func init() {
seq.Register(proxyS2_Descriptor, proxyS2_M_Code, proxyS2_M)
}
func init() {
seq.Register("structs", 1, proxy_Identity)
seq.Register("structs", 2, proxy_IdentityWithError)
}