/*****************************************************************************
 * Copyright (C) Gemalto M2M GmbH
 *****************************************************************************
 *   Project: RIL-Driver
 *****************************************************************************
 *   Author : Intrinsyc
 *****************************************************************************
 * $Workfile: Y:/z_ms-d/src/working/Classic/inc/muxapi.h $
 * $Revision: /main/ms-d/17 $
 *     $Date: 2008-08-22 09:26:03 $
 *   $Author: ctna0256 $
 *****************************************************************************
 * Requirements:
 * PC:      Microsoft Windows CE .NET 4.2
 * Target:  "MS Pocket PC" or "MS Smartphone"
 *****************************************************************************
 * Description:
 *  Generic GSM27.10 Multiplexer
 *  Unit: Multiplexer Driver
 *****************************************************************************
 *
 * $Log: Y:/z_ms-d/src/working/Classic/inc/muxapi.h$ 
 * 
 * /main/ms-d/17   2008-08-22 09:26:03   ctna0256 
 * Set Cinterion Copyright message 
 * 
 * /main/ms-d/16   2008-08-20 11:55:40   ctna0450 
 * Prepared new disclaimer handling 
 * 
 * /main/ms-d/15   2008-07-10 13:23:50   mp49210 
 * Renamed mux IOCTL 
 * 
 * /main/ms-d/14   2005-11-28 13:07:53   wm36264 
 * Added power loss IOCTL of new Siemens-CE-Mux-Driver
 *
 * /main/ms-d/13   2005-07-13 12:06:59   wm36264
 * Added check for proprietary Mux-IOCTLs
 *
 * /main/ms-d/12   2005-07-05 13:33:03   wm36264
 * Fixed exception under Ozone on suspend caused by workaround for lost data after resume
 *
 * \main\ms-d\11   2004/10/25 16:35:44   WM36264
 * Toggle only HW RTS with special function
 *
 * \main\ms-d\10   2004/10/21 13:34:40   WM36264
 * Added IOCTL_MPX_TOGGLE_HW_SIGNALS to toggle RTS and DTR on hardware port
 *
 * \main\ms-d\9   2004/9/22 8:50:24   WM36264
 * Added IOCTL_MPX_SEND_ESC_FRAME
 *
 * \main\ms-d\8   2004/9/16 11:15:16   WM36264
 * Close parent port if no virtual port is in use
 *
 * \main\ms-d\7   2004/8/30 16:10:52   MP49210
 * New Siemens specific commands to free the hardware COM-Port.
 * This feature is necessary for Firmware and Audioblock Update.
 *
 * \main\ms-d\6   2004/7/14 13:59:44   WM36264
 * Use original defines again to avoid confusion with old versions of multiplx.dll
 *
 * \main\ms-d\5   2004/7/14 10:30:6   WM36264
 * Added proper Copyright header again
 *
 * \main\ms-d\4   2004/7/2 15:2:55   WM36264
 * Removed IOCTL_MPX_DATA_SWITCH
 *
 * \main\ms-d\3   2004/4/23 16:22:33   MP49210
 * Delivery from Intrinsyc: new feature Reset Mux
 *
*/

//////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2008 Gemalto M2M GmbH
// Copyright (C) 2004-2008 Siemens AG
// Copyright (C) 2003 Intrinsyc Europe Ltd.
//
// Version: 1.0
// Date:    dummy
//
//////////////////////////////////////////////////////////////////////////////

#define FILE_DEVICE_MPX               2070
#define FILE_FUNCTION_MPX             2048

#define IOCTL_MPX_ENABLE_MPX          CTL_CODE(FILE_DEVICE_MPX, FILE_FUNCTION_MPX +  0, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_MPX_DISABLE_MPX         CTL_CODE(FILE_DEVICE_MPX, FILE_FUNCTION_MPX +  1, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_MPX_ESTABLISH_DLC       CTL_CODE(FILE_DEVICE_MPX, FILE_FUNCTION_MPX +  2, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_MPX_RELEASE_DLC         CTL_CODE(FILE_DEVICE_MPX, FILE_FUNCTION_MPX +  3, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_MPX_SET_DLCI            CTL_CODE(FILE_DEVICE_MPX, FILE_FUNCTION_MPX +  4, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_MPX_RESTART             CTL_CODE(FILE_DEVICE_MPX, FILE_FUNCTION_MPX +  5, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_MPX_POWER_CTRL          CTL_CODE(FILE_DEVICE_MPX, FILE_FUNCTION_MPX +  7, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_MPX_POWER_LOSS          CTL_CODE(FILE_DEVICE_MPX, FILE_FUNCTION_MPX +  8, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_MPX_GET_VERSION         CTL_CODE(FILE_DEVICE_MPX, FILE_FUNCTION_MPX +  9, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_MPX_RESET_PORT          CTL_CODE(FILE_DEVICE_MPX, FILE_FUNCTION_MPX + 10, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_MPX_CLOSE_PARENTPORT    CTL_CODE(FILE_DEVICE_MPX, FILE_FUNCTION_MPX + 11, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_MPX_OPEN_PARENTPORT     CTL_CODE(FILE_DEVICE_MPX, FILE_FUNCTION_MPX + 12, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_MPX_ADD_VIRTPORT        CTL_CODE(FILE_DEVICE_MPX, FILE_FUNCTION_MPX + 13, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_MPX_REMOVE_VIRTPORT     CTL_CODE(FILE_DEVICE_MPX, FILE_FUNCTION_MPX + 14, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_MPX_SEND_ESC_FRAME      CTL_CODE(FILE_DEVICE_MPX, FILE_FUNCTION_MPX + 15, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_MPX_CLR_HW_RTS          CTL_CODE(FILE_DEVICE_MPX, FILE_FUNCTION_MPX + 16, METHOD_NEITHER, FILE_ANY_ACCESS)
#define IOCTL_MPX_SET_HW_RTS          CTL_CODE(FILE_DEVICE_MPX, FILE_FUNCTION_MPX + 17, METHOD_NEITHER, FILE_ANY_ACCESS)

#define IS_MPX_IOCTL(ioctl)           ((ioctl >= IOCTL_MPX_ENABLE_MPX) && (ioctl <= IOCTL_MPX_SET_HW_RTS))

//////////////////////////////////////////////////////////////////////////////

#define FILE_DEVICE_CINTERION_MPX     2071
#define IOCTL_MPX_POWER_FAIL          CTL_CODE(FILE_DEVICE_CINTERION_MPX, 3, METHOD_BUFFERED, FILE_ANY_ACCESS)
