diff options
author | midipix <writeonce@midipix.org> | 2016-07-14 04:09:06 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-07-21 03:47:28 -0400 |
commit | a389fbf9c977d50c492d8efb6b9e260572f1eb9a (patch) | |
tree | b4f5d992c98de6f09ab423120df60bd14d87de86 | |
parent | 324584bf01e943a22b1f643aa66d769720892b0c (diff) | |
download | ptycon-a389fbf9c977d50c492d8efb6b9e260572f1eb9a.tar.bz2 ptycon-a389fbf9c977d50c492d8efb6b9e260572f1eb9a.tar.xz |
daemon: added initial definitions and interface declarations.
-rw-r--r-- | include/ptycon/ptycon.h | 6 | ||||
-rw-r--r-- | project/headers.mk | 1 | ||||
-rw-r--r-- | src/internal/ptycon_daemon_impl.h | 37 |
3 files changed, 44 insertions, 0 deletions
diff --git a/include/ptycon/ptycon.h b/include/ptycon/ptycon.h index 2f111b7..ce0fbd7 100644 --- a/include/ptycon/ptycon.h +++ b/include/ptycon/ptycon.h @@ -18,6 +18,12 @@ extern "C" { #endif #endif +/* daemon */ +#define PTYC_PORT_GUID_DAEMON {0x38a31275, \ + 0x8c52, \ + 0x4285, \ + {0xaa,0x34,0x70,0xe0,0x6c,0x30,0x6d,0xe5}} + /* status codes */ #define PTYC_OK 0x00 #define PTYC_USAGE 0x01 diff --git a/project/headers.mk b/project/headers.mk index 98ecdf5..9da8130 100644 --- a/project/headers.mk +++ b/project/headers.mk @@ -8,6 +8,7 @@ INTERNAL_HEADERS = \ $(PROJECT_DIR)/src/internal/gdi/gdi_system.h \ $(PROJECT_DIR)/src/internal/gdi/gdi_window.h \ $(PROJECT_DIR)/src/internal/$(PACKAGE)_bridge_impl.h \ + $(PROJECT_DIR)/src/internal/$(PACKAGE)_daemon_impl.h \ $(PROJECT_DIR)/src/internal/$(PACKAGE)_driver_impl.h \ $(PROJECT_DIR)/src/internal/$(PACKAGE)_init_impl.h \ $(PROJECT_DIR)/src/internal/$(PACKAGE)_ioctl_impl.h \ diff --git a/src/internal/ptycon_daemon_impl.h b/src/internal/ptycon_daemon_impl.h new file mode 100644 index 0000000..1595984 --- /dev/null +++ b/src/internal/ptycon_daemon_impl.h @@ -0,0 +1,37 @@ +#ifndef PTYCON_DAEMON_IMPL_H +#define PTYCON_DAEMON_IMPL_H + +#include <psxtypes/psxtypes.h> +#include <ntapi/ntapi.h> + +enum ptyc_daemon_opcodes { + PTYC_DAEMON_OPCODE_BASE = 0x20000, + PTYC_DAEMON_CONNECT = PTYC_DAEMON_OPCODE_BASE, + PTYC_DAEMON_DISCONNECT, + PTYC_DAEMON_TTYSIGNAL, + PTYC_DAEMON_IPCSIGNAL, + PTYC_DAEMON_SIGCHLD, + PTYC_DAEMON_THREADEXIT, + PTYC_DAEMON_OPCODE_CAP +}; + +typedef int32_t __stdcall ptyc_daemon_routine(nt_tty_port_msg *); + +struct ptyc_daemon_ctx { + nt_port_keys daemon_keys; + nt_port_attr daemon_attr; + nt_port_name daemon_name; + + void * hport_daemon; + void * hevent_daemon_ready; + + void * hport_internal_client; + void * hevent_internal_client_ready; +}; + +int32_t __stdcall ptyc_daemon_init(struct ptyc_daemon_ctx *, uint64_t); +int32_t __stdcall ptyc_daemon_loop(void *); +int32_t __stdcall ptyc_daemon_connect(nt_tty_port_msg *); +int32_t __stdcall ptyc_daemon_signal(nt_tty_port_msg *); + +#endif |