seat: Convert device list to linked list
This commit is contained in:
parent
4afe674e54
commit
9b7a12d90a
5 changed files with 33 additions and 32 deletions
|
@ -6,6 +6,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include "connection.h"
|
||||
#include "linked_list.h"
|
||||
#include "list.h"
|
||||
|
||||
struct server;
|
||||
|
@ -23,7 +24,7 @@ struct client {
|
|||
int seat_vt;
|
||||
bool pending_disable;
|
||||
|
||||
struct list devices;
|
||||
struct linked_list devices;
|
||||
};
|
||||
|
||||
struct client *client_create(struct server *server, int client_fd);
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
#ifndef _SEATD_SEAT_H
|
||||
#define _SEATD_SEAT_H
|
||||
|
||||
#include "list.h"
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "linked_list.h"
|
||||
#include "list.h"
|
||||
|
||||
struct client;
|
||||
|
||||
enum seat_device_type {
|
||||
|
@ -15,6 +17,7 @@ enum seat_device_type {
|
|||
};
|
||||
|
||||
struct seat_device {
|
||||
struct linked_list link; // client::devices
|
||||
int device_id;
|
||||
int fd;
|
||||
int ref_cnt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue