aboutsummaryrefslogtreecommitdiff
path: root/rpc/rpc_binary.go
blob: e49b0002811ad0f9ef1cecaec1a65334e02fd300 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
////////////////////////////////////////////////////////////////////////////////
// Do not modify!
// Generated by codergen -go
////////////////////////////////////////////////////////////////////////////////

package rpc

import (
	"android.googlesource.com/platform/tools/gpu/binary"
	"android.googlesource.com/platform/tools/gpu/binary/registry"
	"android.googlesource.com/platform/tools/gpu/binary/schema"
)

func init() {
	registry.Add((*Error)(nil).Class())
}

var (
	binaryIDError = binary.ID{0xfe, 0x76, 0xe0, 0x3a, 0x44, 0xa3, 0xc0, 0x38, 0xdb, 0x62, 0x2e, 0xe3, 0xf3, 0xe4, 0xf9, 0x87, 0xf9, 0x19, 0xbe, 0xfd}
)

type binaryClassError struct{}

func (*Error) Class() binary.Class {
	return (*binaryClassError)(nil)
}
func doEncodeError(e binary.Encoder, o *Error) error {
	if err := e.String(o.message); err != nil {
		return err
	}
	return nil
}
func doDecodeError(d binary.Decoder, o *Error) error {
	if obj, err := d.String(); err != nil {
		return err
	} else {
		o.message = string(obj)
	}
	return nil
}
func doSkipError(d binary.Decoder) error {
	if err := d.SkipString(); err != nil {
		return err
	}
	return nil
}
func (*binaryClassError) ID() binary.ID      { return binaryIDError }
func (*binaryClassError) New() binary.Object { return &Error{} }
func (*binaryClassError) Encode(e binary.Encoder, obj binary.Object) error {
	return doEncodeError(e, obj.(*Error))
}
func (*binaryClassError) Decode(d binary.Decoder) (binary.Object, error) {
	obj := &Error{}
	return obj, doDecodeError(d, obj)
}
func (*binaryClassError) DecodeTo(d binary.Decoder, obj binary.Object) error {
	return doDecodeError(d, obj.(*Error))
}
func (*binaryClassError) Skip(d binary.Decoder) error { return doSkipError(d) }
func (*binaryClassError) Schema() *schema.Class       { return schemaError }

var schemaError = &schema.Class{
	TypeID: binaryIDError,
	Name:   "Error",
	Fields: []schema.Field{
		{Declared: "message", Type: &schema.Primitive{Name: "string", Method: schema.String}},
	},
}