Blame src/internal/toksvc_daemon_impl.h

5e5175
#ifndef TOKSVC_DAEMON_IMPL_H
5e5175
#define TOKSVC_DAEMON_IMPL_H
5e5175
5e5175
#include <psxtypes/psxtypes.h>
5e5175
#include <ntapi/ntapi.h>
5e5175
5e5175
enum toks_daemon_opcodes {
5e5175
	TOKS_DAEMON_OPCODE_BASE	= 0x20000,
5e5175
	TOKS_DAEMON_CONNECT	= TOKS_DAEMON_OPCODE_BASE,
5e5175
	TOKS_DAEMON_DISCONNECT,
5e5175
	TOKS_DAEMON_TTYSIGNAL,
5e5175
	TOKS_DAEMON_IPCSIGNAL,
5e5175
	TOKS_DAEMON_SIGCHLD,
5e5175
	TOKS_DAEMON_THREADEXIT,
44e933
	TOKS_DAEMON_ACQUIRE,
c78a06
	TOKS_DAEMON_RELEASE,
5e5175
	TOKS_DAEMON_OPCODE_CAP
5e5175
};
5e5175
9985a1
struct toks_daemon_ctx;
f2a689
struct toks_driver_ctx;
f2a689
74d496
struct toks_client_ctx {
74d496
	void *  hprocess;
44e933
	void *  hinstance;
74d496
	void *  hport;
74d496
	void *  hswap;
44e933
	void *  halert;
c78a06
	void *  hdaemon;
74d496
	nt_cid  cid;
74d496
};
74d496
c847e3
struct toks_token {
c847e3
	struct _nt_port_keys	keys;
c847e3
	struct toks_client_ctx	client;
44e933
	struct toks_token *	self;
c847e3
};
c847e3
9985a1
typedef int32_t __stdcall toks_daemon_routine(struct toks_daemon_ctx *);
9985a1
5e5175
struct toks_daemon_ctx {
f2a689
	struct toks_driver_ctx *driver_ctx;
f2a689
5e5175
	nt_port_keys		daemon_keys;
5e5175
	nt_port_attr		daemon_attr;
5e5175
	nt_port_name		daemon_name;
5e5175
5e5175
	void *			hport_daemon;
5e5175
	void *			hevent_daemon_ready;
5e5175
5e5175
	void *			hport_internal_client;
5e5175
	void *			hevent_internal_client_ready;
9985a1
9985a1
	nt_tty_port_msg		request;
9985a1
	nt_tty_port_msg		reply;
5e5175
};
5e5175
618937
int32_t __stdcall toks_daemon_init(struct toks_daemon_ctx *, const nt_guid *);
5e5175
int32_t __stdcall toks_daemon_loop(void *);
9985a1
9985a1
int32_t __stdcall toks_daemon_connect(struct toks_daemon_ctx *);
9985a1
int32_t __stdcall toks_daemon_signal(struct toks_daemon_ctx *);
44e933
int32_t __stdcall toks_daemon_acquire(struct toks_daemon_ctx *);
c78a06
int32_t __stdcall toks_daemon_release(struct toks_daemon_ctx *);
5e5175
5e5175
#endif