Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanups of IPC library #98

Merged
merged 1 commit into from
Sep 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 18 additions & 38 deletions libraries/ipc/block.h
Original file line number Diff line number Diff line change
@@ -1,53 +1,33 @@
/* $Id$ */
/* Abstract: Protocol used for communicating with block devices. */
/* Author: Per Lundberg <[email protected]> */
// Abstract: Protocol used for communicating with block devices.
// Author: Per Lundberg <[email protected]>
//
// © Copyright 1999-2000 chaos development
// © Copyright 2013-2017 chaos development

/* Copyright 1999-2000 chaos development. */

/* This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA. */

#ifndef __LIBRARY_IPC_BLOCK_H__
#define __LIBRARY_IPC_BLOCK_H__
#pragma once

#include <ipc/protocols.h>

enum
{
IPC_BLOCK_READ = (IPC_PROTOCOL_BLOCK << 16),
IPC_BLOCK_WRITE,
IPC_BLOCK_GET_INFO,
IPC_BLOCK_READ = (IPC_PROTOCOL_BLOCK << 16),
IPC_BLOCK_WRITE,
IPC_BLOCK_GET_INFO,
};

/* This structure is passed into IPC_BLOCK_READ. */

// This structure is passed into IPC_BLOCK_READ.
typedef struct
{
unsigned int start_block_number;
unsigned int number_of_blocks;
unsigned int start_block_number;
unsigned int number_of_blocks;
} ipc_block_read_type;

/* IPC_BLOCK_GET_INFO returns this structure. */

// IPC_BLOCK_GET_INFO returns this structure.
typedef struct
{
unsigned int block_size;
unsigned int number_of_blocks;
bool writable;
bool readable;
char label[64];
unsigned int block_size;
unsigned int number_of_blocks;
bool writable;
bool readable;
char label[64];
} ipc_block_info_type;

#endif /* !__LIBRARY_IPC_BLOCK_H__ */
11 changes: 0 additions & 11 deletions libraries/ipc/config.h

This file was deleted.

108 changes: 42 additions & 66 deletions libraries/ipc/console.h
Original file line number Diff line number Diff line change
@@ -1,82 +1,58 @@
/* $Id$ */
/* Abstract: Console server IPC message types. */
/* Author: Per Lundberg <[email protected]> */
// Abstract: Console server IPC message types.
// Author: Per Lundberg <[email protected]>
//
// © Copyright 1999-2000 chaos development
// © Copyright 2013-2017 chaos development

/* Copyright 1999-2000 chaos development */
#pragma once

/* This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA. */

#ifndef __LIBRARY_IPC_CONSOLE_H__
#define __LIBRARY_IPC_CONSOLE_H__

/* Message types. */

enum
// Message types.
enum
{
IPC_CONSOLE_CONNECTION_CLASS_SET = (IPC_PROTOCOL_CONSOLE << 16),
IPC_CONSOLE_CURSOR_MOVE,
IPC_CONSOLE_OPEN,
IPC_CONSOLE_MODE_SET,
IPC_CONSOLE_CLOSE,
IPC_CONSOLE_OUTPUT,
IPC_CONSOLE_RESIZE,
IPC_CONSOLE_ENABLE_KEYBOARD,
IPC_CONSOLE_DISABLE_KEYBOARD,
IPC_CONSOLE_KEYBOARD_EXTENDED,
IPC_CONSOLE_KEYBOARD_NORMAL,
IPC_CONSOLE_ENABLE_MOUSE,
IPC_CONSOLE_DISABLE_MOUSE,

/* An input event on the keyboard. */

IPC_CONSOLE_KEYBOARD_EVENT,

/* A mouse event. */

IPC_CONSOLE_MOUSE_EVENT
IPC_CONSOLE_CONNECTION_CLASS_SET = (IPC_PROTOCOL_CONSOLE << 16),
IPC_CONSOLE_CURSOR_MOVE,
IPC_CONSOLE_OPEN,
IPC_CONSOLE_MODE_SET,
IPC_CONSOLE_CLOSE,
IPC_CONSOLE_OUTPUT,
IPC_CONSOLE_RESIZE,
IPC_CONSOLE_ENABLE_KEYBOARD,
IPC_CONSOLE_DISABLE_KEYBOARD,
IPC_CONSOLE_KEYBOARD_EXTENDED,
IPC_CONSOLE_KEYBOARD_NORMAL,
IPC_CONSOLE_ENABLE_MOUSE,
IPC_CONSOLE_DISABLE_MOUSE,

// An input event on the keyboard.
IPC_CONSOLE_KEYBOARD_EVENT,

// A mouse event.
IPC_CONSOLE_MOUSE_EVENT
};

/* Connection classes. */

// Connection classes.
enum
{
IPC_CONSOLE_CONNECTION_CLASS_NONE,
IPC_CONSOLE_CONNECTION_CLASS_PROVIDER_KEYBOARD,
IPC_CONSOLE_CONNECTION_CLASS_PROVIDER_MOUSE,
IPC_CONSOLE_CONNECTION_CLASS_PROVIDER_JOYSTICK,
IPC_CONSOLE_CONNECTION_CLASS_PROVIDER_VIDEO,
IPC_CONSOLE_CONNECTION_CLASS_CLIENT,
IPC_CONSOLE_CONNECTION_CLASS_NONE,
IPC_CONSOLE_CONNECTION_CLASS_PROVIDER_KEYBOARD,
IPC_CONSOLE_CONNECTION_CLASS_PROVIDER_MOUSE,
IPC_CONSOLE_CONNECTION_CLASS_PROVIDER_JOYSTICK,
IPC_CONSOLE_CONNECTION_CLASS_PROVIDER_VIDEO,
IPC_CONSOLE_CONNECTION_CLASS_CLIENT,
};

/* Resize the current console. */

// Resize the current console.
typedef struct
{
unsigned int width;
unsigned int height;
unsigned int width;
unsigned int height;
} ipc_console_resize_type;

/* Physical console attribute type. */

// Physical console attribute type.
typedef struct
{
unsigned int width;
unsigned int height;
unsigned int depth;
unsigned int mode_type;
unsigned int width;
unsigned int height;
unsigned int depth;
unsigned int mode_type;
} ipc_console_attribute_type;

#endif /* !__LIBRARY_IPC_CONSOLE_H__ */
34 changes: 7 additions & 27 deletions libraries/ipc/defines.h
Original file line number Diff line number Diff line change
@@ -1,30 +1,10 @@
/* $Id$ */
/* Abstract: Defines. */
/* Author: Per Lundberg <[email protected]> */
// Abstract: Defines.
// Author: Per Lundberg <[email protected]>
//
// © Copyright 1999-2000 chaos development
// © Copyright 2013-2017 chaos development

/* Copyright 2000 chaos development. */

/* This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA. */

#ifndef __LIBRARY_IPC_DEFINES_H__
#define __LIBRARY_IPC_DEFINES_H__

/* If you put this in message_parameter->class, you will accept
messages of all classes. */
#pragma once

// If you put this in message_parameter->class, you will accept messages of all classes.
#define IPC_CLASS_NONE (UINT32_MAX)

#endif /* !__LIBRARY_IPC_DEFINES_H__ */
38 changes: 10 additions & 28 deletions libraries/ipc/ethernet.h
Original file line number Diff line number Diff line change
@@ -1,35 +1,17 @@
/* $Id$ */
/* Abstract: Protocol used by Ethernet servers. */
/* Author: Per Lundberg <[email protected]> */
// Abstract: Protocol used by Ethernet servers.
// Author: Per Lundberg <[email protected]>
//
// © Copyright 1999-2000 chaos development
// © Copyright 2013-2017 chaos development

/* Copyright 1999-2000 chaos development. */

/* This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA. */

#ifndef __LIBRARY_IPC_ETHERNET_H__
#define __LIBRARY_IPC_ETHERNET_H__
#pragma once

#include <ipc/protocols.h>

enum
{
IPC_ETHERNET_REGISTER_TARGET = (IPC_PROTOCOL_ETHERNET << 16),
IPC_ETHERNET_PACKET_SEND,
IPC_ETHERNET_PACKET_RECEIVED,
IPC_ETHERNET_ADDRESS_GET,
IPC_ETHERNET_REGISTER_TARGET = (IPC_PROTOCOL_ETHERNET << 16),
IPC_ETHERNET_PACKET_SEND,
IPC_ETHERNET_PACKET_RECEIVED,
IPC_ETHERNET_ADDRESS_GET,
};

#endif /* !__IPC_LIBRARY_ETHERNET_H__ */
Loading