mobile/bind/java/testpkg/go_testpkg/go_testpkg.go

100 lines
2.1 KiB
Go

// Package go_testpkg is an autogenerated binder stub for package testpkg.
//
// File is generated by gobind. Do not edit.
// Or do, I'm a comment, not a cop.
package go_testpkg
import (
"code.google.com/p/go.mobile/bind/java/testpkg"
"code.google.com/p/go.mobile/bind/seq"
)
func proxy_Add(out, in *seq.Buffer) {
param_x := in.ReadInt()
param_y := in.ReadInt()
res := testpkg.Add(param_x, param_y)
// TODO out.WriteNoException();
out.WriteInt(res)
}
func proxy_Call(out, in *seq.Buffer) {
var param_i testpkg.I
param_i_ref := in.ReadRef()
if param_i_ref.Num < 0 {
param_i = param_i_ref.Get().(testpkg.I)
} else {
param_i = (*proxyI)(param_i_ref)
}
testpkg.Call(param_i)
// TODO out.WriteNoException();
}
func proxy_GC(out, in *seq.Buffer) {
testpkg.GC()
// TODO out.WriteNoException();
}
const (
proxyIDescriptor = "go.testpkg.I"
proxyIFCode = 0x0a01
)
type proxyI seq.Ref
func (p *proxyI) F() {
out := new(seq.Buffer)
//out.WriteRef((*seq.Ref)(p))
seq.Transact((*seq.Ref)(p), proxyIFCode, out)
}
func proxy_Keep(out, in *seq.Buffer) {
var param_i testpkg.I
param_i_ref := in.ReadRef()
if param_i_ref.Num < 0 {
param_i = param_i_ref.Get().(testpkg.I)
} else {
param_i = (*proxyI)(param_i_ref)
}
testpkg.Keep(param_i)
// TODO out.WriteNoException();
}
func proxy_New(out, in *seq.Buffer) {
res := testpkg.New()
// TODO out.WriteNoException();
out.WriteGoRef(res)
}
func proxy_NumSCollected(out, in *seq.Buffer) {
res := testpkg.NumSCollected()
// TODO out.WriteNoException();
out.WriteInt(res)
}
const (
proxySDescriptor = "go.testpkg.S"
proxySFCode = 0x0c00
)
type proxyS seq.Ref
func proxySF(out, in *seq.Buffer) {
ref := in.ReadRef()
v := ref.Get().(*testpkg.S)
v.F()
// TODO out.WriteNoException();
}
func init() {
seq.Register(proxySDescriptor, proxySFCode, proxySF)
}
func init() {
seq.Register("testpkg", 1, proxy_Add)
seq.Register("testpkg", 2, proxy_Call)
seq.Register("testpkg", 3, proxy_GC)
seq.Register("testpkg", 4, proxy_Keep)
seq.Register("testpkg", 5, proxy_New)
seq.Register("testpkg", 6, proxy_NumSCollected)
}