14642e01fSmrg/*********************************************************** 24642e01fSmrg 34642e01fSmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 44642e01fSmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 54642e01fSmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 64642e01fSmrgAUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 74642e01fSmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 84642e01fSmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 94642e01fSmrg 104642e01fSmrg******************************************************************/ 114642e01fSmrg 124642e01fSmrg#ifndef DIX_REGISTRY_H 134642e01fSmrg#define DIX_REGISTRY_H 144642e01fSmrg 154642e01fSmrg/* 164642e01fSmrg * Result returned from any unsuccessful lookup 174642e01fSmrg */ 184642e01fSmrg#define XREGISTRY_UNKNOWN "<unknown>" 194642e01fSmrg 204642e01fSmrg#include "resource.h" 214642e01fSmrg#include "extnsionst.h" 224642e01fSmrg 2335c4bbdfSmrg#if defined(XSELINUX) || defined(RES) 2435c4bbdfSmrg#define X_REGISTRY_RESOURCE 1 2535c4bbdfSmrg#endif 2635c4bbdfSmrg 2735c4bbdfSmrg#if defined(XSELINUX) || defined(XCSECURITY) || defined(XSERVER_DTRACE) 2835c4bbdfSmrg#define X_REGISTRY_REQUEST 1 2935c4bbdfSmrg#endif 3035c4bbdfSmrg 314642e01fSmrg/* Internal string registry - for auditing, debugging, security, etc. */ 324642e01fSmrg 3335c4bbdfSmrg#ifdef X_REGISTRY_RESOURCE 3435c4bbdfSmrg/* Functions used by the X-Resource extension */ 3535c4bbdfSmrgextern _X_EXPORT void RegisterResourceName(RESTYPE type, const char *name); 3635c4bbdfSmrgextern _X_EXPORT const char *LookupResourceName(RESTYPE rtype); 3735c4bbdfSmrg#endif 3835c4bbdfSmrg 3935c4bbdfSmrg#ifdef X_REGISTRY_REQUEST 4035c4bbdfSmrgextern _X_EXPORT void RegisterExtensionNames(ExtensionEntry * ext); 414642e01fSmrg 424642e01fSmrg/* 434642e01fSmrg * Lookup functions. The returned string must not be modified or freed. 444642e01fSmrg */ 456747b715Smrgextern _X_EXPORT const char *LookupMajorName(int major); 466747b715Smrgextern _X_EXPORT const char *LookupRequestName(int major, int minor); 476747b715Smrgextern _X_EXPORT const char *LookupEventName(int event); 486747b715Smrgextern _X_EXPORT const char *LookupErrorName(int error); 4935c4bbdfSmrg#endif 504642e01fSmrg 514642e01fSmrg/* 524642e01fSmrg * Setup and teardown 534642e01fSmrg */ 546747b715Smrgextern _X_EXPORT void dixResetRegistry(void); 5535c4bbdfSmrgextern _X_EXPORT void dixFreeRegistry(void); 5635c4bbdfSmrgextern _X_EXPORT void dixCloseRegistry(void); 574642e01fSmrg 5835c4bbdfSmrg#endif /* DIX_REGISTRY_H */ 59