6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync/** @file
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync *
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync * VBox Host Guest Shared Memory Interface (HGSMI).
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync * Host/Guest shared part.
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync * Channel identifiers.
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync */
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync/*
c58f1213e628a545081c70e26c6b67a841cff880vboxsync * Copyright (C) 2006-2010 Oracle Corporation
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync *
cf5f6bf2704d4fff443139e10bccc6a0a7fa4b85vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
cf5f6bf2704d4fff443139e10bccc6a0a7fa4b85vboxsync * available from http://www.virtualbox.org. This file is free software;
cf5f6bf2704d4fff443139e10bccc6a0a7fa4b85vboxsync * you can redistribute it and/or modify it under the terms of the GNU
cf5f6bf2704d4fff443139e10bccc6a0a7fa4b85vboxsync * General Public License (GPL) as published by the Free Software
cf5f6bf2704d4fff443139e10bccc6a0a7fa4b85vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
cf5f6bf2704d4fff443139e10bccc6a0a7fa4b85vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
cf5f6bf2704d4fff443139e10bccc6a0a7fa4b85vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
cf5f6bf2704d4fff443139e10bccc6a0a7fa4b85vboxsync *
cf5f6bf2704d4fff443139e10bccc6a0a7fa4b85vboxsync * The contents of this file may alternatively be used under the terms
cf5f6bf2704d4fff443139e10bccc6a0a7fa4b85vboxsync * of the Common Development and Distribution License Version 1.0
cf5f6bf2704d4fff443139e10bccc6a0a7fa4b85vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
cf5f6bf2704d4fff443139e10bccc6a0a7fa4b85vboxsync * VirtualBox OSE distribution, in which case the provisions of the
cf5f6bf2704d4fff443139e10bccc6a0a7fa4b85vboxsync * CDDL are applicable instead of those of the GPL.
cf5f6bf2704d4fff443139e10bccc6a0a7fa4b85vboxsync *
cf5f6bf2704d4fff443139e10bccc6a0a7fa4b85vboxsync * You may elect to license modified versions of this file under the
cf5f6bf2704d4fff443139e10bccc6a0a7fa4b85vboxsync * terms and conditions of either the GPL or the CDDL or both.
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync */
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync#ifndef __HGSMIChannels_h__
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync#define __HGSMIChannels_h__
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync/* Each channel has an 8 bit identifier. There are a number of predefined
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync * (hardcoded) channels.
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync *
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync * HGSMI_CH_HGSMI channel can be used to map a string channel identifier
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync * to a free 16 bit numerical value. values are allocated in range
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync * [HGSMI_CH_STRING_FIRST;HGSMI_CH_STRING_LAST].
e7e589ca404045e288030a4151e57b63976cb39dvboxsync *
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync */
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync/* Predefined channel identifiers. Used internally by VBOX to simplify the channel setup. */
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync#define HGSMI_CH_RESERVED (0x00) /* A reserved channel value. */
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync#define HGSMI_CH_HGSMI (0x01) /* HGCMI: setup and configuration channel. */
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync#define HGSMI_CH_VBVA (0x02) /* Graphics: VBVA. */
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync#define HGSMI_CH_SEAMLESS (0x03) /* Graphics: Seamless with a single guest region. */
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync#define HGSMI_CH_SEAMLESS2 (0x04) /* Graphics: Seamless with separate host windows. */
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync#define HGSMI_CH_OPENGL (0x05) /* Graphics: OpenGL HW acceleration. */
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync/* Dynamically allocated channel identifiers. */
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync#define HGSMI_CH_STRING_FIRST (0x20) /* The first channel index to be used for string mappings (inclusive). */
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync#define HGSMI_CH_STRING_LAST (0xff) /* The last channel index for string mappings (inclusive). */
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync/* Check whether the channel identifier is allocated for a dynamic channel. */
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync#define HGSMI_IS_DYNAMIC_CHANNEL(_channel) (((uint8_t)(_channel) & 0xE0) != 0)
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync
6a97c5c107ea1c9935054f25a4fb5ca59a214b72vboxsync#endif /* !__HGSMIChannels_h__*/