aboutsummaryrefslogtreecommitdiff
path: root/nexgb/xselinux
diff options
context:
space:
mode:
authorAndrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu>2012-05-11 23:58:52 -0400
committerAndrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu>2012-05-11 23:58:52 -0400
commit29942bf078c92fea681e42ca5029592526f00718 (patch)
treecee802ebe16e0b118c9be0f6265e26d31e8a5845 /nexgb/xselinux
parentfb3128ed2a83a0f644661cedebbe5bfda3f4951e (diff)
downloadhaven-29942bf078c92fea681e42ca5029592526f00718.tar.gz
haven-29942bf078c92fea681e42ca5029592526f00718.tar.xz
haven-29942bf078c92fea681e42ca5029592526f00718.zip
panic when an extension request is issued before an extension has been initialized. but give a nice error message for the happy people.
Diffstat (limited to 'nexgb/xselinux')
-rw-r--r--nexgb/xselinux/xselinux.go156
1 files changed, 147 insertions, 9 deletions
diff --git a/nexgb/xselinux/xselinux.go b/nexgb/xselinux/xselinux.go
index 10134ff..115feb7 100644
--- a/nexgb/xselinux/xselinux.go
+++ b/nexgb/xselinux/xselinux.go
@@ -2,7 +2,7 @@
package xselinux
/*
- This file was generated by xselinux.xml on May 11 2012 1:58:37am EDT.
+ This file was generated by xselinux.xml on May 11 2012 11:57:20pm EDT.
This file is automatically generated. Edit at your peril!
*/
@@ -40,6 +40,14 @@ func init() {
xgb.NewExtErrorFuncs["SELinux"] = make(map[int]xgb.NewErrorFun)
}
+// Skipping definition for base type 'Int32'
+
+// Skipping definition for base type 'Void'
+
+// Skipping definition for base type 'Byte'
+
+// Skipping definition for base type 'Int8'
+
// Skipping definition for base type 'Card16'
// Skipping definition for base type 'Char'
@@ -56,14 +64,6 @@ func init() {
// Skipping definition for base type 'Int16'
-// Skipping definition for base type 'Int32'
-
-// Skipping definition for base type 'Void'
-
-// Skipping definition for base type 'Byte'
-
-// Skipping definition for base type 'Int8'
-
type ListItem struct {
Name xproto.Atom
ObjectContextLen uint32
@@ -164,6 +164,9 @@ type QueryVersionCookie struct {
// QueryVersion sends a checked request.
// If an error occurs, it will be returned with the reply by calling QueryVersionCookie.Reply()
func QueryVersion(c *xgb.Conn, ClientMajor byte, ClientMinor byte) QueryVersionCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(queryVersionRequest(c, ClientMajor, ClientMinor), cookie)
return QueryVersionCookie{cookie}
@@ -172,6 +175,9 @@ func QueryVersion(c *xgb.Conn, ClientMajor byte, ClientMinor byte) QueryVersionC
// QueryVersionUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func QueryVersionUnchecked(c *xgb.Conn, ClientMajor byte, ClientMinor byte) QueryVersionCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'QueryVersion' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(queryVersionRequest(c, ClientMajor, ClientMinor), cookie)
return QueryVersionCookie{cookie}
@@ -253,6 +259,9 @@ type SetDeviceCreateContextCookie struct {
// SetDeviceCreateContext sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetDeviceCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetDeviceCreateContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'SetDeviceCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(setDeviceCreateContextRequest(c, ContextLen, Context), cookie)
return SetDeviceCreateContextCookie{cookie}
@@ -261,6 +270,9 @@ func SetDeviceCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetD
// SetDeviceCreateContextChecked sends a checked request.
// If an error occurs, it can be retrieved using SetDeviceCreateContextCookie.Check()
func SetDeviceCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetDeviceCreateContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'SetDeviceCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(setDeviceCreateContextRequest(c, ContextLen, Context), cookie)
return SetDeviceCreateContextCookie{cookie}
@@ -305,6 +317,9 @@ type GetDeviceCreateContextCookie struct {
// GetDeviceCreateContext sends a checked request.
// If an error occurs, it will be returned with the reply by calling GetDeviceCreateContextCookie.Reply()
func GetDeviceCreateContext(c *xgb.Conn) GetDeviceCreateContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetDeviceCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(getDeviceCreateContextRequest(c), cookie)
return GetDeviceCreateContextCookie{cookie}
@@ -313,6 +328,9 @@ func GetDeviceCreateContext(c *xgb.Conn) GetDeviceCreateContextCookie {
// GetDeviceCreateContextUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetDeviceCreateContextUnchecked(c *xgb.Conn) GetDeviceCreateContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetDeviceCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(getDeviceCreateContextRequest(c), cookie)
return GetDeviceCreateContextCookie{cookie}
@@ -395,6 +413,9 @@ type SetDeviceContextCookie struct {
// SetDeviceContext sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetDeviceContext(c *xgb.Conn, Device uint32, ContextLen uint32, Context string) SetDeviceContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'SetDeviceContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(setDeviceContextRequest(c, Device, ContextLen, Context), cookie)
return SetDeviceContextCookie{cookie}
@@ -403,6 +424,9 @@ func SetDeviceContext(c *xgb.Conn, Device uint32, ContextLen uint32, Context str
// SetDeviceContextChecked sends a checked request.
// If an error occurs, it can be retrieved using SetDeviceContextCookie.Check()
func SetDeviceContextChecked(c *xgb.Conn, Device uint32, ContextLen uint32, Context string) SetDeviceContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'SetDeviceContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(setDeviceContextRequest(c, Device, ContextLen, Context), cookie)
return SetDeviceContextCookie{cookie}
@@ -450,6 +474,9 @@ type GetDeviceContextCookie struct {
// GetDeviceContext sends a checked request.
// If an error occurs, it will be returned with the reply by calling GetDeviceContextCookie.Reply()
func GetDeviceContext(c *xgb.Conn, Device uint32) GetDeviceContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetDeviceContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(getDeviceContextRequest(c, Device), cookie)
return GetDeviceContextCookie{cookie}
@@ -458,6 +485,9 @@ func GetDeviceContext(c *xgb.Conn, Device uint32) GetDeviceContextCookie {
// GetDeviceContextUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetDeviceContextUnchecked(c *xgb.Conn, Device uint32) GetDeviceContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetDeviceContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(getDeviceContextRequest(c, Device), cookie)
return GetDeviceContextCookie{cookie}
@@ -543,6 +573,9 @@ type SetWindowCreateContextCookie struct {
// SetWindowCreateContext sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetWindowCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetWindowCreateContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'SetWindowCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(setWindowCreateContextRequest(c, ContextLen, Context), cookie)
return SetWindowCreateContextCookie{cookie}
@@ -551,6 +584,9 @@ func SetWindowCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetW
// SetWindowCreateContextChecked sends a checked request.
// If an error occurs, it can be retrieved using SetWindowCreateContextCookie.Check()
func SetWindowCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetWindowCreateContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'SetWindowCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(setWindowCreateContextRequest(c, ContextLen, Context), cookie)
return SetWindowCreateContextCookie{cookie}
@@ -595,6 +631,9 @@ type GetWindowCreateContextCookie struct {
// GetWindowCreateContext sends a checked request.
// If an error occurs, it will be returned with the reply by calling GetWindowCreateContextCookie.Reply()
func GetWindowCreateContext(c *xgb.Conn) GetWindowCreateContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetWindowCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(getWindowCreateContextRequest(c), cookie)
return GetWindowCreateContextCookie{cookie}
@@ -603,6 +642,9 @@ func GetWindowCreateContext(c *xgb.Conn) GetWindowCreateContextCookie {
// GetWindowCreateContextUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetWindowCreateContextUnchecked(c *xgb.Conn) GetWindowCreateContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetWindowCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(getWindowCreateContextRequest(c), cookie)
return GetWindowCreateContextCookie{cookie}
@@ -685,6 +727,9 @@ type GetWindowContextCookie struct {
// GetWindowContext sends a checked request.
// If an error occurs, it will be returned with the reply by calling GetWindowContextCookie.Reply()
func GetWindowContext(c *xgb.Conn, Window xproto.Window) GetWindowContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetWindowContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(getWindowContextRequest(c, Window), cookie)
return GetWindowContextCookie{cookie}
@@ -693,6 +738,9 @@ func GetWindowContext(c *xgb.Conn, Window xproto.Window) GetWindowContextCookie
// GetWindowContextUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetWindowContextUnchecked(c *xgb.Conn, Window xproto.Window) GetWindowContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetWindowContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(getWindowContextRequest(c, Window), cookie)
return GetWindowContextCookie{cookie}
@@ -778,6 +826,9 @@ type SetPropertyCreateContextCookie struct {
// SetPropertyCreateContext sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetPropertyCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetPropertyCreateContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'SetPropertyCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(setPropertyCreateContextRequest(c, ContextLen, Context), cookie)
return SetPropertyCreateContextCookie{cookie}
@@ -786,6 +837,9 @@ func SetPropertyCreateContext(c *xgb.Conn, ContextLen uint32, Context string) Se
// SetPropertyCreateContextChecked sends a checked request.
// If an error occurs, it can be retrieved using SetPropertyCreateContextCookie.Check()
func SetPropertyCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetPropertyCreateContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'SetPropertyCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(setPropertyCreateContextRequest(c, ContextLen, Context), cookie)
return SetPropertyCreateContextCookie{cookie}
@@ -830,6 +884,9 @@ type GetPropertyCreateContextCookie struct {
// GetPropertyCreateContext sends a checked request.
// If an error occurs, it will be returned with the reply by calling GetPropertyCreateContextCookie.Reply()
func GetPropertyCreateContext(c *xgb.Conn) GetPropertyCreateContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetPropertyCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(getPropertyCreateContextRequest(c), cookie)
return GetPropertyCreateContextCookie{cookie}
@@ -838,6 +895,9 @@ func GetPropertyCreateContext(c *xgb.Conn) GetPropertyCreateContextCookie {
// GetPropertyCreateContextUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetPropertyCreateContextUnchecked(c *xgb.Conn) GetPropertyCreateContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetPropertyCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(getPropertyCreateContextRequest(c), cookie)
return GetPropertyCreateContextCookie{cookie}
@@ -920,6 +980,9 @@ type SetPropertyUseContextCookie struct {
// SetPropertyUseContext sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetPropertyUseContext(c *xgb.Conn, ContextLen uint32, Context string) SetPropertyUseContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'SetPropertyUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(setPropertyUseContextRequest(c, ContextLen, Context), cookie)
return SetPropertyUseContextCookie{cookie}
@@ -928,6 +991,9 @@ func SetPropertyUseContext(c *xgb.Conn, ContextLen uint32, Context string) SetPr
// SetPropertyUseContextChecked sends a checked request.
// If an error occurs, it can be retrieved using SetPropertyUseContextCookie.Check()
func SetPropertyUseContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetPropertyUseContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'SetPropertyUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(setPropertyUseContextRequest(c, ContextLen, Context), cookie)
return SetPropertyUseContextCookie{cookie}
@@ -972,6 +1038,9 @@ type GetPropertyUseContextCookie struct {
// GetPropertyUseContext sends a checked request.
// If an error occurs, it will be returned with the reply by calling GetPropertyUseContextCookie.Reply()
func GetPropertyUseContext(c *xgb.Conn) GetPropertyUseContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetPropertyUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(getPropertyUseContextRequest(c), cookie)
return GetPropertyUseContextCookie{cookie}
@@ -980,6 +1049,9 @@ func GetPropertyUseContext(c *xgb.Conn) GetPropertyUseContextCookie {
// GetPropertyUseContextUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetPropertyUseContextUnchecked(c *xgb.Conn) GetPropertyUseContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetPropertyUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(getPropertyUseContextRequest(c), cookie)
return GetPropertyUseContextCookie{cookie}
@@ -1062,6 +1134,9 @@ type GetPropertyContextCookie struct {
// GetPropertyContext sends a checked request.
// If an error occurs, it will be returned with the reply by calling GetPropertyContextCookie.Reply()
func GetPropertyContext(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) GetPropertyContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetPropertyContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(getPropertyContextRequest(c, Window, Property), cookie)
return GetPropertyContextCookie{cookie}
@@ -1070,6 +1145,9 @@ func GetPropertyContext(c *xgb.Conn, Window xproto.Window, Property xproto.Atom)
// GetPropertyContextUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetPropertyContextUnchecked(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) GetPropertyContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetPropertyContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(getPropertyContextRequest(c, Window, Property), cookie)
return GetPropertyContextCookie{cookie}
@@ -1158,6 +1236,9 @@ type GetPropertyDataContextCookie struct {
// GetPropertyDataContext sends a checked request.
// If an error occurs, it will be returned with the reply by calling GetPropertyDataContextCookie.Reply()
func GetPropertyDataContext(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) GetPropertyDataContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetPropertyDataContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(getPropertyDataContextRequest(c, Window, Property), cookie)
return GetPropertyDataContextCookie{cookie}
@@ -1166,6 +1247,9 @@ func GetPropertyDataContext(c *xgb.Conn, Window xproto.Window, Property xproto.A
// GetPropertyDataContextUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetPropertyDataContextUnchecked(c *xgb.Conn, Window xproto.Window, Property xproto.Atom) GetPropertyDataContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetPropertyDataContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(getPropertyDataContextRequest(c, Window, Property), cookie)
return GetPropertyDataContextCookie{cookie}
@@ -1254,6 +1338,9 @@ type ListPropertiesCookie struct {
// ListProperties sends a checked request.
// If an error occurs, it will be returned with the reply by calling ListPropertiesCookie.Reply()
func ListProperties(c *xgb.Conn, Window xproto.Window) ListPropertiesCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'ListProperties' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(listPropertiesRequest(c, Window), cookie)
return ListPropertiesCookie{cookie}
@@ -1262,6 +1349,9 @@ func ListProperties(c *xgb.Conn, Window xproto.Window) ListPropertiesCookie {
// ListPropertiesUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ListPropertiesUnchecked(c *xgb.Conn, Window xproto.Window) ListPropertiesCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'ListProperties' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(listPropertiesRequest(c, Window), cookie)
return ListPropertiesCookie{cookie}
@@ -1343,6 +1433,9 @@ type SetSelectionCreateContextCookie struct {
// SetSelectionCreateContext sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetSelectionCreateContext(c *xgb.Conn, ContextLen uint32, Context string) SetSelectionCreateContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'SetSelectionCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(setSelectionCreateContextRequest(c, ContextLen, Context), cookie)
return SetSelectionCreateContextCookie{cookie}
@@ -1351,6 +1444,9 @@ func SetSelectionCreateContext(c *xgb.Conn, ContextLen uint32, Context string) S
// SetSelectionCreateContextChecked sends a checked request.
// If an error occurs, it can be retrieved using SetSelectionCreateContextCookie.Check()
func SetSelectionCreateContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetSelectionCreateContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'SetSelectionCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(setSelectionCreateContextRequest(c, ContextLen, Context), cookie)
return SetSelectionCreateContextCookie{cookie}
@@ -1395,6 +1491,9 @@ type GetSelectionCreateContextCookie struct {
// GetSelectionCreateContext sends a checked request.
// If an error occurs, it will be returned with the reply by calling GetSelectionCreateContextCookie.Reply()
func GetSelectionCreateContext(c *xgb.Conn) GetSelectionCreateContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetSelectionCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(getSelectionCreateContextRequest(c), cookie)
return GetSelectionCreateContextCookie{cookie}
@@ -1403,6 +1502,9 @@ func GetSelectionCreateContext(c *xgb.Conn) GetSelectionCreateContextCookie {
// GetSelectionCreateContextUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetSelectionCreateContextUnchecked(c *xgb.Conn) GetSelectionCreateContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetSelectionCreateContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(getSelectionCreateContextRequest(c), cookie)
return GetSelectionCreateContextCookie{cookie}
@@ -1485,6 +1587,9 @@ type SetSelectionUseContextCookie struct {
// SetSelectionUseContext sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func SetSelectionUseContext(c *xgb.Conn, ContextLen uint32, Context string) SetSelectionUseContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'SetSelectionUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, false)
c.NewRequest(setSelectionUseContextRequest(c, ContextLen, Context), cookie)
return SetSelectionUseContextCookie{cookie}
@@ -1493,6 +1598,9 @@ func SetSelectionUseContext(c *xgb.Conn, ContextLen uint32, Context string) SetS
// SetSelectionUseContextChecked sends a checked request.
// If an error occurs, it can be retrieved using SetSelectionUseContextCookie.Check()
func SetSelectionUseContextChecked(c *xgb.Conn, ContextLen uint32, Context string) SetSelectionUseContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'SetSelectionUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, false)
c.NewRequest(setSelectionUseContextRequest(c, ContextLen, Context), cookie)
return SetSelectionUseContextCookie{cookie}
@@ -1537,6 +1645,9 @@ type GetSelectionUseContextCookie struct {
// GetSelectionUseContext sends a checked request.
// If an error occurs, it will be returned with the reply by calling GetSelectionUseContextCookie.Reply()
func GetSelectionUseContext(c *xgb.Conn) GetSelectionUseContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetSelectionUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(getSelectionUseContextRequest(c), cookie)
return GetSelectionUseContextCookie{cookie}
@@ -1545,6 +1656,9 @@ func GetSelectionUseContext(c *xgb.Conn) GetSelectionUseContextCookie {
// GetSelectionUseContextUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetSelectionUseContextUnchecked(c *xgb.Conn) GetSelectionUseContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetSelectionUseContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(getSelectionUseContextRequest(c), cookie)
return GetSelectionUseContextCookie{cookie}
@@ -1627,6 +1741,9 @@ type GetSelectionContextCookie struct {
// GetSelectionContext sends a checked request.
// If an error occurs, it will be returned with the reply by calling GetSelectionContextCookie.Reply()
func GetSelectionContext(c *xgb.Conn, Selection xproto.Atom) GetSelectionContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetSelectionContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(getSelectionContextRequest(c, Selection), cookie)
return GetSelectionContextCookie{cookie}
@@ -1635,6 +1752,9 @@ func GetSelectionContext(c *xgb.Conn, Selection xproto.Atom) GetSelectionContext
// GetSelectionContextUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetSelectionContextUnchecked(c *xgb.Conn, Selection xproto.Atom) GetSelectionContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetSelectionContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(getSelectionContextRequest(c, Selection), cookie)
return GetSelectionContextCookie{cookie}
@@ -1720,6 +1840,9 @@ type GetSelectionDataContextCookie struct {
// GetSelectionDataContext sends a checked request.
// If an error occurs, it will be returned with the reply by calling GetSelectionDataContextCookie.Reply()
func GetSelectionDataContext(c *xgb.Conn, Selection xproto.Atom) GetSelectionDataContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetSelectionDataContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(getSelectionDataContextRequest(c, Selection), cookie)
return GetSelectionDataContextCookie{cookie}
@@ -1728,6 +1851,9 @@ func GetSelectionDataContext(c *xgb.Conn, Selection xproto.Atom) GetSelectionDat
// GetSelectionDataContextUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetSelectionDataContextUnchecked(c *xgb.Conn, Selection xproto.Atom) GetSelectionDataContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetSelectionDataContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(getSelectionDataContextRequest(c, Selection), cookie)
return GetSelectionDataContextCookie{cookie}
@@ -1813,6 +1939,9 @@ type ListSelectionsCookie struct {
// ListSelections sends a checked request.
// If an error occurs, it will be returned with the reply by calling ListSelectionsCookie.Reply()
func ListSelections(c *xgb.Conn) ListSelectionsCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'ListSelections' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(listSelectionsRequest(c), cookie)
return ListSelectionsCookie{cookie}
@@ -1821,6 +1950,9 @@ func ListSelections(c *xgb.Conn) ListSelectionsCookie {
// ListSelectionsUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func ListSelectionsUnchecked(c *xgb.Conn) ListSelectionsCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'ListSelections' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(listSelectionsRequest(c), cookie)
return ListSelectionsCookie{cookie}
@@ -1899,6 +2031,9 @@ type GetClientContextCookie struct {
// GetClientContext sends a checked request.
// If an error occurs, it will be returned with the reply by calling GetClientContextCookie.Reply()
func GetClientContext(c *xgb.Conn, Resource uint32) GetClientContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetClientContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(true, true)
c.NewRequest(getClientContextRequest(c, Resource), cookie)
return GetClientContextCookie{cookie}
@@ -1907,6 +2042,9 @@ func GetClientContext(c *xgb.Conn, Resource uint32) GetClientContextCookie {
// GetClientContextUnchecked sends an unchecked request.
// If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.
func GetClientContextUnchecked(c *xgb.Conn, Resource uint32) GetClientContextCookie {
+ if _, ok := c.Extensions["SELINUX"]; !ok {
+ panic("Cannot issue request 'GetClientContext' using the uninitialized extension 'SELinux'. xselinux.Init(connObj) must be called first.")
+ }
cookie := c.NewCookie(false, true)
c.NewRequest(getClientContextRequest(c, Resource), cookie)
return GetClientContextCookie{cookie}