Add portcls to new branch.
Added: trunk/reactos/drivers/sound/multimedia/
Added: trunk/reactos/drivers/sound/multimedia/portcls/
Added: trunk/reactos/drivers/sound/multimedia/portcls/portcls.c
Added: trunk/reactos/drivers/sound/multimedia/portcls/portcls.def
Added: trunk/reactos/drivers/sound/multimedia/portcls/portcls.h
Added: trunk/reactos/drivers/sound/multimedia/portcls/portcls.rc

Added: trunk/reactos/drivers/sound/multimedia/portcls/portcls.c
--- trunk/reactos/drivers/sound/multimedia/portcls/portcls.c	2006-02-06 20:32:56 UTC (rev 98)
+++ trunk/reactos/drivers/sound/multimedia/portcls/portcls.c	2006-02-07 06:43:37 UTC (rev 99)
@@ -0,0 +1,489 @@
+/*
+ * PROJECT:     ReactOS Sound System
+ * LICENSE:     GPL - See COPYING in the top level directory
+ * FILE:        drivers/multimedia/portcls/portcls.c
+ * PURPOSE:     Audio Port Class Functions
+ * PROGRAMMERS: 
+ *
+ */
+
+#include "portcls.h"
+
+
+#define NDEBUG
+#include <debug.h>
+
+
+NTSTATUS STDCALL
+DriverEntry(PDRIVER_OBJECT DriverObject,
+            PUNICODE_STRING RegistryPath)
+{
+    return STATUS_SUCCESS;
+}
+
+/*
+ * @implemented
+ */
+ULONG STDCALL
+DllInitialize(ULONG Unknown)
+{
+    return 0;
+}
+
+/*
+ * @implemented
+ */
+ULONG STDCALL
+DllUnload(VOID)
+{
+    return 0;
+}
+
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcAddAdapterDevice(
+ ULONG DriverObject,
+ ULONG PhysicalDeviceObject,
+ ULONG StartDevice,
+ ULONG MaxObjects,
+ ULONG DeviceExtensionSize
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcAddContentHandlers(
+ ULONG  ContentId,
+ ULONG  paHandlers,
+ ULONG  NumHandlers
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcCompleteIrp(
+ ULONG  DeviceObject,
+ ULONG  Irp,
+ ULONG  Status
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcCompletePendingPropertyRequest(
+ ULONG PropertyRequest,
+ ULONG NtStatus
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL 
+PcCreateContentMixed(
+ ULONG paContentId,
+ ULONG cContentId,
+ ULONG pMixedContentId
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcDestroyContent(
+ ULONG ContentId
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcDispatchIrp(
+ ULONG DeviceObject,
+ ULONG Irp
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcForwardContentToDeviceObject(
+ ULONG ContentId,
+ ULONG Reserved,
+ ULONG DrmForward
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL 
+PcForwardContentToFileObject(
+ ULONG ContentId,
+ ULONG FileObject
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL 
+PcForwardContentToInterface(
+ ULONG ContentId,
+ ULONG Unknown,
+ ULONG NumMethods
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcForwardIrpSynchronous(
+ ULONG DeviceObject,
+ ULONG Irp 
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL 
+PcGetContentRights(
+ ULONG ContentId,
+ ULONG DrmRights
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcGetDeviceProperty(
+ ULONG DeviceObject,
+ ULONG DeviceProperty,
+ ULONG BufferLength,
+ ULONG PropertyBuffer,
+ ULONG ResultLength
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @implemented
+ */
+ULONGLONG STDCALL
+PcGetTimeInterval(
+  ULONGLONG  Timei
+)
+{
+    LARGE_INTEGER CurrentTime;
+    
+    KeQuerySystemTime( &CurrentTime);
+
+    return (Timei - CurrentTime.QuadPart);
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcInitializeAdapterDriver(
+ ULONG DriverObject,
+ ULONG RegistryPathName,
+ ULONG AddDevice
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcNewDmaChannel(
+ ULONG OutDmaChannel,
+ ULONG Unknown,
+ ULONG PoolType,
+ ULONG DeviceDescription,
+ ULONG DeviceObject
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcNewInterruptSync(
+ ULONG OutInterruptSync,
+ ULONG Unknown,
+ ULONG ResourceList,
+ ULONG ResourceIndex,
+ ULONG Mode
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcNewMiniport(
+ ULONG OutMiniport,
+ ULONG ClassId
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcNewPort(
+ ULONG OutPort,
+ ULONG ClassId
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcNewRegistryKey(
+ ULONG OutRegistryKey,
+ ULONG Unknown,
+ ULONG RegistryKeyType,
+ ULONG DesiredAccess,
+ ULONG DeviceObject,
+ ULONG SubDevice,
+ ULONG ObjectAttributes,
+ ULONG CreateOptions,
+ ULONG Disposition
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcNewResourceList(
+ ULONG OutResourceList,
+ ULONG Unknown,
+ ULONG PoolType,
+ ULONG TranslatedResources,
+ ULONG UntranslatedResources
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcNewResourceSublist(
+ ULONG OutResourceList,
+ ULONG Unknown,
+ ULONG PoolType,
+ ULONG ParentList,
+ ULONG MaximumEntries
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcNewServiceGroup(
+ ULONG OutServiceGroup,
+ ULONG Unknown
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcRegisterAdapterPowerManagement(
+ ULONG Unknown,
+ ULONG pvContext
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcRegisterIoTimeout(
+ ULONG pDeviceObject,
+ ULONG pTimerRoutine,
+ ULONG pContext
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcRegisterPhysicalConnection(
+ ULONG DeviceObject,
+ ULONG FromUnknown,
+ ULONG FromPin,
+ ULONG ToUnknown,
+ ULONG ToPin
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcRegisterPhysicalConnectionFromExternal(
+ ULONG DeviceObject,
+ ULONG FromString,
+ ULONG FromPin,
+ ULONG ToUnknown,
+ ULONG ToPin
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcRegisterPhysicalConnectionToExternal(
+ ULONG DeviceObject,
+ ULONG FromUnknown,
+ ULONG FromPin,
+ ULONG ToString,
+ ULONG ToPin
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcRegisterSubdevice(
+ ULONG DeviceObject,
+ ULONG SubdevName,
+ ULONG Unknown
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcRequestNewPowerState(
+ ULONG pDeviceObject,
+ ULONG RequestedNewState
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
+/*
+ * @unimplemented
+ */
+NTSTATUS STDCALL
+PcUnregisterIoTimeout(
+ ULONG pDeviceObject,
+ ULONG pTimerRoutine,
+ ULONG pContext
+)
+{
+ UNIMPLEMENTED;
+ return STATUS_UNSUCCESSFUL;
+}
+
Property changes on: trunk/reactos/drivers/sound/multimedia/portcls/portcls.c
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/reactos/drivers/sound/multimedia/portcls/portcls.def
--- trunk/reactos/drivers/sound/multimedia/portcls/portcls.def	2006-02-06 20:32:56 UTC (rev 98)
+++ trunk/reactos/drivers/sound/multimedia/portcls/portcls.def	2006-02-07 06:43:37 UTC (rev 99)
@@ -0,0 +1,36 @@
+;
+; Exports definition file for portcls.sys
+;
+EXPORTS
+PcAddAdapterDevice@20
+PcAddContentHandlers@12
+PcCompleteIrp@12
+PcCompletePendingPropertyRequest@8
+PcCreateContentMixed@12
+PcDestroyContent@4
+PcDispatchIrp@8
+PcForwardContentToDeviceObject@12
+PcForwardContentToFileObject@8
+PcForwardContentToInterface@12
+PcForwardIrpSynchronous@8
+PcGetContentRights@8
+PcGetDeviceProperty@20
+PcGetTimeInterval@8
+PcInitializeAdapterDriver@12
+PcNewDmaChannel@20
+PcNewInterruptSync@20
+PcNewMiniport@8
+PcNewPort@8
+PcNewRegistryKey@36
+PcNewResourceList@20
+PcNewResourceSublist@20
+PcNewServiceGroup@8
+PcRegisterAdapterPowerManagement@8
+PcRegisterIoTimeout@12
+PcRegisterPhysicalConnection@20
+PcRegisterPhysicalConnectionFromExternal@20
+PcRegisterPhysicalConnectionToExternal@20
+PcRegisterSubdevice@12
+PcRequestNewPowerState@8
+PcUnregisterIoTimeout@12
+
Property changes on: trunk/reactos/drivers/sound/multimedia/portcls/portcls.def
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/reactos/drivers/sound/multimedia/portcls/portcls.h
--- trunk/reactos/drivers/sound/multimedia/portcls/portcls.h	2006-02-06 20:32:56 UTC (rev 98)
+++ trunk/reactos/drivers/sound/multimedia/portcls/portcls.h	2006-02-07 06:43:37 UTC (rev 99)
@@ -0,0 +1,253 @@
+/*
+
+    Move to w32api when it is ready.
+
+ */
+#ifndef _PORTCLS_H
+#define _PORTCLS_H
+#if __GNUC__ >=3
+#pragma GCC system_header
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* This header is total bull**** */
+
+#include <ntddk.h>
+
+#define PORTCLASSAPI extern
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcAddAdapterDevice(
+ ULONG DriverObject,
+ ULONG PhysicalDeviceObject,
+ ULONG StartDevice,
+ ULONG MaxObjects,
+ ULONG DeviceExtensionSize
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcAddContentHandlers(
+ ULONG  ContentId,
+ ULONG  paHandlers,
+ ULONG  NumHandlers
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcCompleteIrp(
+ ULONG  DeviceObject,
+ ULONG  Irp,
+ ULONG  Status
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcCompletePendingPropertyRequest(
+ ULONG PropertyRequest,
+ ULONG NtStatus
+);
+
+PORTCLASSAPI NTSTATUS STDCALL 
+PcCreateContentMixed(
+ ULONG paContentId,
+ ULONG cContentId,
+ ULONG pMixedContentId
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcDestroyContent(
+ ULONG ContentId
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcDispatchIrp(
+ ULONG DeviceObject,
+ ULONG Irp
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcForwardContentToDeviceObject(
+ ULONG ContentId,
+ ULONG Reserved,
+ ULONG DrmForward
+);
+
+PORTCLASSAPI NTSTATUS STDCALL 
+PcForwardContentToFileObject(
+ ULONG ContentId,
+ ULONG FileObject
+);
+
+PORTCLASSAPI NTSTATUS STDCALL 
+PcForwardContentToInterface(
+ ULONG ContentId,
+ ULONG Unknown,
+ ULONG NumMethods
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcForwardIrpSynchronous(
+ ULONG DeviceObject,
+ ULONG Irp 
+);
+
+PORTCLASSAPI NTSTATUS STDCALL 
+PcGetContentRights(
+ ULONG ContentId,
+ ULONG DrmRights
+); 
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcGetDeviceProperty(
+ ULONG DeviceObject,
+ ULONG DeviceProperty,
+ ULONG BufferLength,
+ ULONG PropertyBuffer,
+ ULONG ResultLength
+);
+
+PORTCLASSAPI ULONGLONG STDCALL
+PcGetTimeInterval(
+  ULONGLONG  Timei
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcInitializeAdapterDriver(
+ ULONG DriverObject,
+ ULONG RegistryPathName,
+ ULONG AddDevice
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcNewDmaChannel(
+ ULONG OutDmaChannel,
+ ULONG Unknown,
+ ULONG PoolType,
+ ULONG DeviceDescription,
+ ULONG DeviceObject
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcNewInterruptSync(
+ ULONG OutInterruptSync,
+ ULONG Unknown,
+ ULONG ResourceList,
+ ULONG ResourceIndex,
+ ULONG Mode
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcNewMiniport(
+ ULONG OutMiniport,
+ ULONG ClassId
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcNewPort(
+ ULONG OutPort,
+ ULONG ClassId
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcNewRegistryKey(
+ ULONG OutRegistryKey,
+ ULONG Unknown,
+ ULONG RegistryKeyType,
+ ULONG DesiredAccess,
+ ULONG DeviceObject,
+ ULONG SubDevice,
+ ULONG ObjectAttributes,
+ ULONG CreateOptions,
+ ULONG Disposition
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcNewResourceList(
+ ULONG OutResourceList,
+ ULONG Unknown,
+ ULONG PoolType,
+ ULONG TranslatedResources,
+ ULONG UntranslatedResources
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcNewResourceSublist(
+ ULONG OutResourceList,
+ ULONG Unknown,
+ ULONG PoolType,
+ ULONG ParentList,
+ ULONG MaximumEntries
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcNewServiceGroup(
+ ULONG OutServiceGroup,
+ ULONG Unknown
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcRegisterAdapterPowerManagement(
+ ULONG Unknown,
+ ULONG pvContext
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcRegisterIoTimeout(
+ ULONG pDeviceObject,
+ ULONG pTimerRoutine,
+ ULONG pContext
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcRegisterPhysicalConnection(
+ ULONG DeviceObject,
+ ULONG FromUnknown,
+ ULONG FromPin,
+ ULONG ToUnknown,
+ ULONG ToPin
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcRegisterPhysicalConnectionFromExternal(
+ ULONG DeviceObject,
+ ULONG FromString,
+ ULONG FromPin,
+ ULONG ToUnknown,
+ ULONG ToPin
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcRegisterPhysicalConnectionToExternal(
+ ULONG DeviceObject,
+ ULONG FromUnknown,
+ ULONG FromPin,
+ ULONG ToString,
+ ULONG ToPin
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcRegisterSubdevice(
+ ULONG DeviceObject,
+ ULONG SubdevName,
+ ULONG Unknown
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcRequestNewPowerState(
+ ULONG pDeviceObject,
+ ULONG RequestedNewState
+);
+
+PORTCLASSAPI NTSTATUS STDCALL
+PcUnregisterIoTimeout(
+ ULONG pDeviceObject,
+ ULONG pTimerRoutine,
+ ULONG pContext
+);
+
+#ifdef __cplusplus
+}
+#endif                          
+
+#endif
Property changes on: trunk/reactos/drivers/sound/multimedia/portcls/portcls.h
___________________________________________________________________
Name: svn:eol-style
   + native

Added: trunk/reactos/drivers/sound/multimedia/portcls/portcls.rc
--- trunk/reactos/drivers/sound/multimedia/portcls/portcls.rc	2006-02-06 20:32:56 UTC (rev 98)
+++ trunk/reactos/drivers/sound/multimedia/portcls/portcls.rc	2006-02-07 06:43:37 UTC (rev 99)
@@ -0,0 +1,5 @@
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION	"PORTCLS Port Class Driver API\0"
+#define REACTOS_STR_INTERNAL_NAME	"portcls\0"
+#define REACTOS_STR_ORIGINAL_FILENAME	"portcls.sys\0"
+#include <reactos/version.rc>
Property changes on: trunk/reactos/drivers/sound/multimedia/portcls/portcls.rc
___________________________________________________________________
Name: svn:eol-style
   + native