aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/deprecated.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-02 21:09:13 +0000
committermarha <marha@users.sourceforge.net>2009-09-02 21:09:13 +0000
commit8fedf58693f42869528b41408ac4d6012839e973 (patch)
tree62a817bea7dfc71050292d302ba94f5e349c67a7 /xorg-server/dix/deprecated.c
parentac14083f465166b298162a57fff0bad90e528fff (diff)
parent6f25a23db1df27e992c34f6fd4c82e83c44fc2e2 (diff)
downloadvcxsrv-8fedf58693f42869528b41408ac4d6012839e973.tar.gz
vcxsrv-8fedf58693f42869528b41408ac4d6012839e973.tar.bz2
vcxsrv-8fedf58693f42869528b41408ac4d6012839e973.zip
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/dix/deprecated.c')
-rw-r--r--xorg-server/dix/deprecated.c34
1 files changed, 26 insertions, 8 deletions
diff --git a/xorg-server/dix/deprecated.c b/xorg-server/dix/deprecated.c
index 2bb81190c..4e20d6082 100644
--- a/xorg-server/dix/deprecated.c
+++ b/xorg-server/dix/deprecated.c
@@ -115,48 +115,66 @@ LookupClient(XID id, ClientPtr client)
return (i == Success) ? pClient : NULL;
}
-/* replaced by dixLookupResource */
+/* replaced by dixLookupResourceByType */
_X_EXPORT pointer
SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype,
Mask access_mode)
{
pointer retval;
- int i = dixLookupResource(&retval, id, rtype, client, access_mode);
+ int i = dixLookupResourceByType(&retval, id, rtype, client, access_mode);
static int warn = 1;
if (warn > 0 && --warn)
ErrorF("Warning: LookupIDByType()/SecurityLookupIDByType() "
"are deprecated. Please convert your driver/module "
- "to use dixLookupResource().\n");
+ "to use dixLookupResourceByType().\n");
return (i == Success) ? retval : NULL;
}
-/* replaced by dixLookupResource */
+/* replaced by dixLookupResourceByClass */
_X_EXPORT pointer
SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes,
Mask access_mode)
{
pointer retval;
- int i = dixLookupResource(&retval, id, classes, client, access_mode);
+ int i = dixLookupResourceByClass(&retval, id, classes, client, access_mode);
static int warn = 1;
if (warn > 0 && --warn)
ErrorF("Warning: LookupIDByClass()/SecurityLookupIDByClass() "
"are deprecated. Please convert your driver/module "
- "to use dixLookupResource().\n");
+ "to use dixLookupResourceByClass().\n");
return (i == Success) ? retval : NULL;
}
-/* replaced by dixLookupResource */
+/* replaced by dixLookupResourceByType */
_X_EXPORT pointer
LookupIDByType(XID id, RESTYPE rtype)
{
return SecurityLookupIDByType(NullClient, id, rtype, DixUnknownAccess);
}
-/* replaced by dixLookupResource */
+/* replaced by dixLookupResourceByClass */
_X_EXPORT pointer
LookupIDByClass(XID id, RESTYPE classes)
{
return SecurityLookupIDByClass(NullClient, id, classes, DixUnknownAccess);
}
+/* replaced by dixLookupResourceBy{Type,Class} */
+_X_EXPORT int
+dixLookupResource (pointer *result, XID id, RESTYPE rtype,
+ ClientPtr client, Mask mode)
+{
+ Bool istype = ((rtype & TypeMask) && (rtype != RC_ANY)) || (rtype == RT_NONE);
+
+ static int warn = 1;
+ if (warn > 0 && --warn)
+ ErrorF("Warning: dixLookupResource() "
+ "is deprecated. Please convert your driver/module "
+ "to use dixLookupResourceByType/dixLookupResourceByClass().\n");
+ if (istype)
+ return dixLookupResourceByType (result, id, rtype, client, mode);
+ else
+ return dixLookupResourceByClass (result, id, rtype, client, mode);
+}
+
/* end deprecated functions */