diff options
Diffstat (limited to 'nexgb/auto_record.go')
-rw-r--r-- | nexgb/auto_record.go | 82 |
1 files changed, 44 insertions, 38 deletions
diff --git a/nexgb/auto_record.go b/nexgb/auto_record.go index c92868f..ec936d7 100644 --- a/nexgb/auto_record.go +++ b/nexgb/auto_record.go @@ -1,7 +1,7 @@ package xgb /* - This file was generated by record.xml on May 8 2012 11:03:24pm EDT. + This file was generated by record.xml on May 10 2012 12:39:33pm EDT. This file is automatically generated. Edit at your peril! */ @@ -33,20 +33,6 @@ func init() { newExtErrorFuncs["RECORD"] = make(map[int]newErrorFun) } -// Skipping definition for base type 'Card16' - -// Skipping definition for base type 'Char' - -// Skipping definition for base type 'Card32' - -// Skipping definition for base type 'Double' - -// Skipping definition for base type 'Bool' - -// Skipping definition for base type 'Float' - -// Skipping definition for base type 'Id' - // Skipping definition for base type 'Card8' // Skipping definition for base type 'Int16' @@ -59,6 +45,18 @@ func init() { // Skipping definition for base type 'Int8' +// Skipping definition for base type 'Card16' + +// Skipping definition for base type 'Char' + +// Skipping definition for base type 'Card32' + +// Skipping definition for base type 'Double' + +// Skipping definition for base type 'Bool' + +// Skipping definition for base type 'Float' + const ( RecordHTypeFromServerTime = 1 RecordHTypeFromClientTime = 2 @@ -71,7 +69,15 @@ const ( RecordCsAllClients = 3 ) -// Skipping resource definition of 'Context' +type RecordContext uint32 + +func (c *Conn) NewRecordContextId() (RecordContext, error) { + id, err := c.NewId() + if err != nil { + return 0, err + } + return RecordContext(id), nil +} type RecordElementHeader byte @@ -498,7 +504,7 @@ func (err RecordBadContextError) SequenceId() uint16 { return err.Sequence } -func (err RecordBadContextError) BadId() Id { +func (err RecordBadContextError) BadId() uint32 { return 0 } @@ -611,13 +617,13 @@ type RecordCreateContextCookie struct { } // Write request to wire for RecordCreateContext -func (c *Conn) RecordCreateContext(Context Id, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) RecordCreateContextCookie { +func (c *Conn) RecordCreateContext(Context RecordContext, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) RecordCreateContextCookie { cookie := c.newCookie(false, false) c.newRequest(c.recordCreateContextRequest(Context, ElementHeader, NumClientSpecs, NumRanges, ClientSpecs, Ranges), cookie) return RecordCreateContextCookie{cookie} } -func (c *Conn) RecordCreateContextChecked(Context Id, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) RecordCreateContextCookie { +func (c *Conn) RecordCreateContextChecked(Context RecordContext, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) RecordCreateContextCookie { cookie := c.newCookie(true, false) c.newRequest(c.recordCreateContextRequest(Context, ElementHeader, NumClientSpecs, NumRanges, ClientSpecs, Ranges), cookie) return RecordCreateContextCookie{cookie} @@ -628,7 +634,7 @@ func (cook RecordCreateContextCookie) Check() error { } // Write request to wire for RecordCreateContext -func (c *Conn) recordCreateContextRequest(Context Id, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) []byte { +func (c *Conn) recordCreateContextRequest(Context RecordContext, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) []byte { size := pad(((20 + pad((int(NumClientSpecs) * 4))) + pad((int(NumRanges) * 24)))) b := 0 buf := make([]byte, size) @@ -674,13 +680,13 @@ type RecordRegisterClientsCookie struct { } // Write request to wire for RecordRegisterClients -func (c *Conn) RecordRegisterClients(Context Id, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) RecordRegisterClientsCookie { +func (c *Conn) RecordRegisterClients(Context RecordContext, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) RecordRegisterClientsCookie { cookie := c.newCookie(false, false) c.newRequest(c.recordRegisterClientsRequest(Context, ElementHeader, NumClientSpecs, NumRanges, ClientSpecs, Ranges), cookie) return RecordRegisterClientsCookie{cookie} } -func (c *Conn) RecordRegisterClientsChecked(Context Id, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) RecordRegisterClientsCookie { +func (c *Conn) RecordRegisterClientsChecked(Context RecordContext, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) RecordRegisterClientsCookie { cookie := c.newCookie(true, false) c.newRequest(c.recordRegisterClientsRequest(Context, ElementHeader, NumClientSpecs, NumRanges, ClientSpecs, Ranges), cookie) return RecordRegisterClientsCookie{cookie} @@ -691,7 +697,7 @@ func (cook RecordRegisterClientsCookie) Check() error { } // Write request to wire for RecordRegisterClients -func (c *Conn) recordRegisterClientsRequest(Context Id, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) []byte { +func (c *Conn) recordRegisterClientsRequest(Context RecordContext, ElementHeader RecordElementHeader, NumClientSpecs uint32, NumRanges uint32, ClientSpecs []RecordClientSpec, Ranges []RecordRange) []byte { size := pad(((20 + pad((int(NumClientSpecs) * 4))) + pad((int(NumRanges) * 24)))) b := 0 buf := make([]byte, size) @@ -737,13 +743,13 @@ type RecordUnregisterClientsCookie struct { } // Write request to wire for RecordUnregisterClients -func (c *Conn) RecordUnregisterClients(Context Id, NumClientSpecs uint32, ClientSpecs []RecordClientSpec) RecordUnregisterClientsCookie { +func (c *Conn) RecordUnregisterClients(Context RecordContext, NumClientSpecs uint32, ClientSpecs []RecordClientSpec) RecordUnregisterClientsCookie { cookie := c.newCookie(false, false) c.newRequest(c.recordUnregisterClientsRequest(Context, NumClientSpecs, ClientSpecs), cookie) return RecordUnregisterClientsCookie{cookie} } -func (c *Conn) RecordUnregisterClientsChecked(Context Id, NumClientSpecs uint32, ClientSpecs []RecordClientSpec) RecordUnregisterClientsCookie { +func (c *Conn) RecordUnregisterClientsChecked(Context RecordContext, NumClientSpecs uint32, ClientSpecs []RecordClientSpec) RecordUnregisterClientsCookie { cookie := c.newCookie(true, false) c.newRequest(c.recordUnregisterClientsRequest(Context, NumClientSpecs, ClientSpecs), cookie) return RecordUnregisterClientsCookie{cookie} @@ -754,7 +760,7 @@ func (cook RecordUnregisterClientsCookie) Check() error { } // Write request to wire for RecordUnregisterClients -func (c *Conn) recordUnregisterClientsRequest(Context Id, NumClientSpecs uint32, ClientSpecs []RecordClientSpec) []byte { +func (c *Conn) recordUnregisterClientsRequest(Context RecordContext, NumClientSpecs uint32, ClientSpecs []RecordClientSpec) []byte { size := pad((12 + pad((int(NumClientSpecs) * 4)))) b := 0 buf := make([]byte, size) @@ -789,13 +795,13 @@ type RecordGetContextCookie struct { *cookie } -func (c *Conn) RecordGetContext(Context Id) RecordGetContextCookie { +func (c *Conn) RecordGetContext(Context RecordContext) RecordGetContextCookie { cookie := c.newCookie(true, true) c.newRequest(c.recordGetContextRequest(Context), cookie) return RecordGetContextCookie{cookie} } -func (c *Conn) RecordGetContextUnchecked(Context Id) RecordGetContextCookie { +func (c *Conn) RecordGetContextUnchecked(Context RecordContext) RecordGetContextCookie { cookie := c.newCookie(false, true) c.newRequest(c.recordGetContextRequest(Context), cookie) return RecordGetContextCookie{cookie} @@ -865,7 +871,7 @@ func (cook RecordGetContextCookie) Check() error { } // Write request to wire for RecordGetContext -func (c *Conn) recordGetContextRequest(Context Id) []byte { +func (c *Conn) recordGetContextRequest(Context RecordContext) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -891,13 +897,13 @@ type RecordEnableContextCookie struct { *cookie } -func (c *Conn) RecordEnableContext(Context Id) RecordEnableContextCookie { +func (c *Conn) RecordEnableContext(Context RecordContext) RecordEnableContextCookie { cookie := c.newCookie(true, true) c.newRequest(c.recordEnableContextRequest(Context), cookie) return RecordEnableContextCookie{cookie} } -func (c *Conn) RecordEnableContextUnchecked(Context Id) RecordEnableContextCookie { +func (c *Conn) RecordEnableContextUnchecked(Context RecordContext) RecordEnableContextCookie { cookie := c.newCookie(false, true) c.newRequest(c.recordEnableContextRequest(Context), cookie) return RecordEnableContextCookie{cookie} @@ -980,7 +986,7 @@ func (cook RecordEnableContextCookie) Check() error { } // Write request to wire for RecordEnableContext -func (c *Conn) recordEnableContextRequest(Context Id) []byte { +func (c *Conn) recordEnableContextRequest(Context RecordContext) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -1007,13 +1013,13 @@ type RecordDisableContextCookie struct { } // Write request to wire for RecordDisableContext -func (c *Conn) RecordDisableContext(Context Id) RecordDisableContextCookie { +func (c *Conn) RecordDisableContext(Context RecordContext) RecordDisableContextCookie { cookie := c.newCookie(false, false) c.newRequest(c.recordDisableContextRequest(Context), cookie) return RecordDisableContextCookie{cookie} } -func (c *Conn) RecordDisableContextChecked(Context Id) RecordDisableContextCookie { +func (c *Conn) RecordDisableContextChecked(Context RecordContext) RecordDisableContextCookie { cookie := c.newCookie(true, false) c.newRequest(c.recordDisableContextRequest(Context), cookie) return RecordDisableContextCookie{cookie} @@ -1024,7 +1030,7 @@ func (cook RecordDisableContextCookie) Check() error { } // Write request to wire for RecordDisableContext -func (c *Conn) recordDisableContextRequest(Context Id) []byte { +func (c *Conn) recordDisableContextRequest(Context RecordContext) []byte { size := 8 b := 0 buf := make([]byte, size) @@ -1051,13 +1057,13 @@ type RecordFreeContextCookie struct { } // Write request to wire for RecordFreeContext -func (c *Conn) RecordFreeContext(Context Id) RecordFreeContextCookie { +func (c *Conn) RecordFreeContext(Context RecordContext) RecordFreeContextCookie { cookie := c.newCookie(false, false) c.newRequest(c.recordFreeContextRequest(Context), cookie) return RecordFreeContextCookie{cookie} } -func (c *Conn) RecordFreeContextChecked(Context Id) RecordFreeContextCookie { +func (c *Conn) RecordFreeContextChecked(Context RecordContext) RecordFreeContextCookie { cookie := c.newCookie(true, false) c.newRequest(c.recordFreeContextRequest(Context), cookie) return RecordFreeContextCookie{cookie} @@ -1068,7 +1074,7 @@ func (cook RecordFreeContextCookie) Check() error { } // Write request to wire for RecordFreeContext -func (c *Conn) recordFreeContextRequest(Context Id) []byte { +func (c *Conn) recordFreeContextRequest(Context RecordContext) []byte { size := 8 b := 0 buf := make([]byte, size) |