ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

interface.c
Go to the documentation of this file.
00001 #include <ntddk.h>
00002 
00003 #include <acpi.h>
00004 
00005 #include <acpisys.h>
00006 #include <acpi_bus.h>
00007 #include <acpi_drivers.h>
00008 
00009 #include <wdmguid.h>
00010 #define NDEBUG
00011 #include <debug.h>
00012 
00013 VOID
00014 NTAPI
00015 AcpiInterfaceReference(PVOID Context)
00016 {
00017   UNIMPLEMENTED
00018 }
00019 
00020 VOID
00021 NTAPI
00022 AcpiInterfaceDereference(PVOID Context)
00023 {
00024   UNIMPLEMENTED
00025 }
00026 
00027 NTSTATUS
00028 NTAPI
00029 AcpiInterfaceConnectVector(PDEVICE_OBJECT Context,
00030                            ULONG GpeNumber,
00031                            KINTERRUPT_MODE Mode,
00032                            BOOLEAN Shareable,
00033                            PGPE_SERVICE_ROUTINE ServiceRoutine,
00034                            PVOID ServiceContext,
00035                            PVOID ObjectContext)
00036 {
00037   UNIMPLEMENTED
00038 
00039   return STATUS_NOT_IMPLEMENTED;
00040 }
00041 
00042 NTSTATUS
00043 NTAPI
00044 AcpiInterfaceDisconnectVector(PVOID ObjectContext)
00045 {
00046   UNIMPLEMENTED
00047 
00048   return STATUS_NOT_IMPLEMENTED;
00049 }
00050 
00051 NTSTATUS
00052 NTAPI
00053 AcpiInterfaceEnableEvent(PDEVICE_OBJECT Context,
00054                          PVOID ObjectContext)
00055 {
00056   UNIMPLEMENTED
00057 
00058   return STATUS_NOT_IMPLEMENTED;
00059 }
00060 
00061 NTSTATUS
00062 NTAPI
00063 AcpiInterfaceDisableEvent(PDEVICE_OBJECT Context,
00064                           PVOID ObjectContext)
00065 {
00066   UNIMPLEMENTED
00067 
00068   return STATUS_NOT_IMPLEMENTED;
00069 }
00070 
00071 NTSTATUS
00072 NTAPI
00073 AcpiInterfaceClearStatus(PDEVICE_OBJECT Context,
00074                          PVOID ObjectContext)
00075 {
00076   UNIMPLEMENTED
00077 
00078   return STATUS_NOT_IMPLEMENTED;
00079 }
00080 
00081 NTSTATUS
00082 NTAPI
00083 AcpiInterfaceNotificationsRegister(PDEVICE_OBJECT Context,
00084                                    PDEVICE_NOTIFY_CALLBACK NotificationHandler,
00085                                    PVOID NotificationContext)
00086 {
00087   UNIMPLEMENTED
00088 
00089   return STATUS_NOT_IMPLEMENTED;
00090 }
00091 
00092 VOID
00093 NTAPI
00094 AcpiInterfaceNotificationsUnregister(PDEVICE_OBJECT Context,
00095                                      PDEVICE_NOTIFY_CALLBACK NotificationHandler)
00096 {
00097   UNIMPLEMENTED
00098 }
00099 
00100 NTSTATUS
00101 Bus_PDO_QueryInterface(PPDO_DEVICE_DATA DeviceData,
00102                        PIRP Irp)
00103 {
00104   PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp);
00105   PACPI_INTERFACE_STANDARD AcpiInterface;
00106 
00107   if (IrpSp->Parameters.QueryInterface.Version != 1)
00108   {
00109       DPRINT1("Invalid version number: %d\n",
00110               IrpSp->Parameters.QueryInterface.Version);
00111       return STATUS_INVALID_PARAMETER;
00112   }
00113 
00114   if (RtlCompareMemory(IrpSp->Parameters.QueryInterface.InterfaceType,
00115                         &GUID_ACPI_INTERFACE_STANDARD, sizeof(GUID)) == sizeof(GUID))
00116   {
00117       DPRINT("GUID_ACPI_INTERFACE_STANDARD\n");
00118 
00119       if (IrpSp->Parameters.QueryInterface.Size < sizeof(ACPI_INTERFACE_STANDARD))
00120       {
00121           DPRINT1("Buffer too small! (%d)\n", IrpSp->Parameters.QueryInterface.Size);
00122           return STATUS_BUFFER_TOO_SMALL;
00123       }
00124 
00125      AcpiInterface = (PACPI_INTERFACE_STANDARD)IrpSp->Parameters.QueryInterface.Interface;
00126 
00127      AcpiInterface->InterfaceReference = AcpiInterfaceReference;
00128      AcpiInterface->InterfaceDereference = AcpiInterfaceDereference;
00129      AcpiInterface->GpeConnectVector = AcpiInterfaceConnectVector;
00130      AcpiInterface->GpeDisconnectVector = AcpiInterfaceDisconnectVector;
00131      AcpiInterface->GpeEnableEvent = AcpiInterfaceEnableEvent;
00132      AcpiInterface->GpeDisableEvent = AcpiInterfaceDisableEvent;
00133      AcpiInterface->GpeClearStatus = AcpiInterfaceClearStatus;
00134      AcpiInterface->RegisterForDeviceNotifications = AcpiInterfaceNotificationsRegister;
00135      AcpiInterface->UnregisterForDeviceNotifications = AcpiInterfaceNotificationsUnregister;
00136 
00137      return STATUS_SUCCESS;
00138   }
00139   else
00140   {
00141       DPRINT1("Invalid GUID\n");
00142       return STATUS_NOT_SUPPORTED;
00143   }
00144 }

Generated on Sun May 27 2012 04:26:12 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.