/** * @file * @author Norman Feske * * @section DESCRIPTION * Nitpicker client representation interface */ /* * Copyright (C) 2002-2005 Norman Feske * Technische Universitaet Dresden, Operating Systems Research Group * * This file is part of the DOpE package, which is distributed under * the terms of the GNU General Public Licence 2. Please see the * COPYING file for details. */ #ifndef _LINPICKER_CLIENT_H_ #define _LINPICKER_CLIENT_H_ #include "common.h" #include "buffer.h" #include "view.h" struct sec_color { unsigned char r, g, b; }; struct sec_label { char *label; char *shortlabel; struct sec_color fg; struct sec_color bg; }; /* * For the time being, we will allocate client, buffer, and view * structures using domain 0 memory. The limit on number of * buffers and views per guest will prevent memory overuse. */ struct client { int id; /* domid */ struct sec_label label; /* security label */ struct view_tailq views; /* array of views */ struct buf_list buffers; /* array of buffers */ unsigned short num_views; /* size of view array */ unsigned short num_buffers; /* size of view array */ unsigned short max_views; /* size of buffer array */ unsigned short max_buffers; /* size of buffer array */ struct view *bg; /* background view */ LIST_ENTRY(client) next; /* linked list */ struct XenInput *input; /* Xen input device */ }; LIST_HEAD(client_list, client); TAILQ_HEAD(client_tailq, client); CIRCLEQ_HEAD(client_cirq, client); struct client * client_lookup(int domid); struct client * client_add(int domid, unsigned short max_views, unsigned short max_buffers); void client_remove(struct client *c); void client_remove_all(void); #endif /* _LINPICKER_CLIENT_H_ */