Add wl_resource_create() and a version field to wl_resource
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 28 Jun 2013 01:09:20 +0000 (20:09 -0500)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 2 Jul 2013 21:01:23 +0000 (17:01 -0400)
commit4917a967bdcd33b7ad264af9c984c3957d87f569
treecc8e65fb1da5b52c62d1070c6981bf90479ebf3b
parentd35b6278c0a4b731fcd2464c848a1c3ab5ec93a4
Add wl_resource_create() and a version field to wl_resource

A new function, wl_resource_create(), lets the compositor create a
wl_resource for a given version of the interface.  Passing 0 for the
object ID will allocate a new ID. The implementation, user data and
destructor can be set with wl_resource_set_implementation().

These two functions deprecates wl_client_add/new_object and the
main difference and motivation is the ability to provide a version number
for the resource.  This lets the compositor track which version of the
interface a client has created and we'll use that to verify incoming requests.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
src/wayland-server.c
src/wayland-server.h
src/wayland-shm.c