mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
Replace dixLookupResource by dixLookupResourceBy{Type,Class}
dixLookupResource attempted to automatically detect whether the caller wanted a lookup by-type or by-class, unfortunately, it guessed wrong for RT_NONE. Instead of trying to make the guess better, this patch just reverts the unification and creates separate functions for each operation.
This commit is contained in:
@@ -218,13 +218,20 @@ extern _X_EXPORT pointer LookupClientResourceComplex(
|
||||
FindComplexResType func,
|
||||
pointer cdata);
|
||||
|
||||
extern _X_EXPORT int dixLookupResource(
|
||||
extern _X_EXPORT int dixLookupResourceByType(
|
||||
pointer *result,
|
||||
XID id,
|
||||
RESTYPE rtype,
|
||||
ClientPtr client,
|
||||
Mask access_mode);
|
||||
|
||||
extern _X_EXPORT int dixLookupResourceByClass(
|
||||
pointer *result,
|
||||
XID id,
|
||||
RESTYPE rclass,
|
||||
ClientPtr client,
|
||||
Mask access_mode);
|
||||
|
||||
extern _X_EXPORT void GetXIDRange(
|
||||
int /*client*/,
|
||||
Bool /*server*/,
|
||||
@@ -244,29 +251,43 @@ extern _X_EXPORT RESTYPE TypeMask;
|
||||
* Please use the noted replacements instead.
|
||||
*/
|
||||
|
||||
/* replaced by dixLookupResource */
|
||||
#ifdef __GNUC__
|
||||
#define X_DEPRECATED __attribute__((deprecated))
|
||||
#else
|
||||
#define X_DEPRECATED
|
||||
#endif
|
||||
|
||||
/* replaced by dixLookupResourceByType or dixLookupResourceByClass */
|
||||
extern int dixLookupResource(
|
||||
pointer *result,
|
||||
XID id,
|
||||
RESTYPE rtype,
|
||||
ClientPtr client,
|
||||
Mask access_mode) X_DEPRECATED;
|
||||
|
||||
/* replaced by dixLookupResourceByType */
|
||||
extern _X_EXPORT pointer SecurityLookupIDByType(
|
||||
ClientPtr client,
|
||||
XID id,
|
||||
RESTYPE rtype,
|
||||
Mask access_mode);
|
||||
Mask access_mode) X_DEPRECATED;
|
||||
|
||||
/* replaced by dixLookupResource */
|
||||
/* replaced by dixLookupResourceByClass */
|
||||
extern _X_EXPORT pointer SecurityLookupIDByClass(
|
||||
ClientPtr client,
|
||||
XID id,
|
||||
RESTYPE classes,
|
||||
Mask access_mode);
|
||||
Mask access_mode) X_DEPRECATED;
|
||||
|
||||
/* replaced by dixLookupResource */
|
||||
/* replaced by dixLookupResourceByType */
|
||||
extern _X_EXPORT pointer LookupIDByType(
|
||||
XID id,
|
||||
RESTYPE rtype);
|
||||
RESTYPE rtype) X_DEPRECATED;
|
||||
|
||||
/* replaced by dixLookupResource */
|
||||
/* replaced by dixLookupResourceByClass */
|
||||
extern _X_EXPORT pointer LookupIDByClass(
|
||||
XID id,
|
||||
RESTYPE classes);
|
||||
RESTYPE classes) X_DEPRECATED;
|
||||
|
||||
#endif /* RESOURCE_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user