| //////////////////////////////////////////////////////////////////////////////// |
| // Do not modify! |
| // Generated by codergen |
| //////////////////////////////////////////////////////////////////////////////// |
| |
| package multiplexer |
| |
| import ( |
| "android.googlesource.com/platform/tools/gpu/framework/binary" |
| "android.googlesource.com/platform/tools/gpu/framework/binary/registry" |
| "android.googlesource.com/platform/tools/gpu/framework/id" |
| ) |
| |
| // Make sure schema init() runs first |
| import _ "android.googlesource.com/platform/tools/gpu/framework/binary/schema" |
| |
| // force use the id package, because our imports handling is wrong |
| var _ id.ID |
| |
| const ( |
| ixǁmsgCloseChannel = iota |
| ixǁmsgData |
| ixǁmsgOpenChannel |
| ) |
| |
| var entities [3]binary.Entity |
| |
| var Namespace = registry.NewNamespace() |
| |
| func init() { |
| registry.Global.AddFallbacks(Namespace) |
| Namespace.AddClassOf((*msgCloseChannel)(nil)) |
| Namespace.AddClassOf((*msgData)(nil)) |
| Namespace.AddClassOf((*msgOpenChannel)(nil)) |
| } |
| |
| type binaryClassmsgCloseChannel struct{} |
| |
| func (*msgCloseChannel) Class() binary.Class { |
| return (*binaryClassmsgCloseChannel)(nil) |
| } |
| func doEncodemsgCloseChannel(e binary.Writer, o *msgCloseChannel) { |
| e.Uint32(uint32(o.channelID)) |
| } |
| func doDecodemsgCloseChannel(d binary.Reader, o *msgCloseChannel) { |
| o.channelID = channelID(d.Uint32()) |
| } |
| func (*binaryClassmsgCloseChannel) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodemsgCloseChannel(e, obj.(*msgCloseChannel)) |
| } |
| func (*binaryClassmsgCloseChannel) New() binary.Object { |
| return &msgCloseChannel{} |
| } |
| func (*binaryClassmsgCloseChannel) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodemsgCloseChannel(d, obj.(*msgCloseChannel)) |
| } |
| func (o *msgCloseChannel) WriteSimple(w binary.Writer) { |
| doEncodemsgCloseChannel(w, o) |
| } |
| func (o *msgCloseChannel) ReadSimple(r binary.Reader) { |
| doDecodemsgCloseChannel(r, o) |
| } |
| func (c *binaryClassmsgCloseChannel) Schema() *binary.Entity { |
| return &entities[ixǁmsgCloseChannel] |
| } |
| |
| type binaryClassmsgData struct{} |
| |
| func (*msgData) Class() binary.Class { |
| return (*binaryClassmsgData)(nil) |
| } |
| func doEncodemsgData(e binary.Writer, o *msgData) { |
| e.Uint32(uint32(o.channelID)) |
| e.Uint32(uint32(len(o.data))) |
| e.Data(o.data) |
| } |
| func doDecodemsgData(d binary.Reader, o *msgData) { |
| o.channelID = channelID(d.Uint32()) |
| if count := d.Count(); count > 0 { |
| o.data = make([]byte, count) |
| d.Data(o.data) |
| } |
| } |
| func (*binaryClassmsgData) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodemsgData(e, obj.(*msgData)) |
| } |
| func (*binaryClassmsgData) New() binary.Object { |
| return &msgData{} |
| } |
| func (*binaryClassmsgData) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodemsgData(d, obj.(*msgData)) |
| } |
| func (o *msgData) WriteSimple(w binary.Writer) { |
| doEncodemsgData(w, o) |
| } |
| func (o *msgData) ReadSimple(r binary.Reader) { |
| doDecodemsgData(r, o) |
| } |
| func (c *binaryClassmsgData) Schema() *binary.Entity { |
| return &entities[ixǁmsgData] |
| } |
| |
| type binaryClassmsgOpenChannel struct{} |
| |
| func (*msgOpenChannel) Class() binary.Class { |
| return (*binaryClassmsgOpenChannel)(nil) |
| } |
| func doEncodemsgOpenChannel(e binary.Writer, o *msgOpenChannel) { |
| e.Uint32(uint32(o.channelID)) |
| } |
| func doDecodemsgOpenChannel(d binary.Reader, o *msgOpenChannel) { |
| o.channelID = channelID(d.Uint32()) |
| } |
| func (*binaryClassmsgOpenChannel) Encode(e binary.Encoder, obj binary.Object) { |
| doEncodemsgOpenChannel(e, obj.(*msgOpenChannel)) |
| } |
| func (*binaryClassmsgOpenChannel) New() binary.Object { |
| return &msgOpenChannel{} |
| } |
| func (*binaryClassmsgOpenChannel) DecodeTo(d binary.Decoder, obj binary.Object) { |
| doDecodemsgOpenChannel(d, obj.(*msgOpenChannel)) |
| } |
| func (o *msgOpenChannel) WriteSimple(w binary.Writer) { |
| doEncodemsgOpenChannel(w, o) |
| } |
| func (o *msgOpenChannel) ReadSimple(r binary.Reader) { |
| doDecodemsgOpenChannel(r, o) |
| } |
| func (c *binaryClassmsgOpenChannel) Schema() *binary.Entity { |
| return &entities[ixǁmsgOpenChannel] |
| } |