]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Nt32Pkg/SnpNt32Dxe/SnpNt32.h
All UEFI applications in the MdeModukePkg should be placed in MdeModulePkg/Application
[mirror_edk2.git] / Nt32Pkg / SnpNt32Dxe / SnpNt32.h
index 7769bbf295aaf76a9ea1730ece00009241811164..d0e04ce404dfcc234d9702868acd7a4fa4d20223 100644 (file)
@@ -20,7 +20,7 @@ Abstract:
 #ifndef _SNP_NT32_H_\r
 #define _SNP_NT32_H_\r
 \r
-#include <PiDxe.h>\r
+#include <Uefi.h>\r
 \r
 #include <Protocol/SimpleNetwork.h>\r
 #include <Protocol/DevicePath.h>\r
@@ -137,7 +137,7 @@ EFI_STATUS
 //\r
 //  Global data for this driver\r
 //\r
-#define SNP_NT32_DRIVER_SIGNATURE EFI_SIGNATURE_32 ('W', 'S', 'N', 'P')\r
+#define SNP_NT32_DRIVER_SIGNATURE SIGNATURE_32 ('W', 'S', 'N', 'P')\r
 \r
 typedef struct _SNPNT32_GLOBAL_DATA {\r
   UINT32                            Signature;\r
@@ -165,7 +165,7 @@ typedef struct _SNPNT32_GLOBAL_DATA {
 //\r
 //  Instance data for each fake SNP instance\r
 //\r
-#define SNP_NT32_INSTANCE_SIGNATURE EFI_SIGNATURE_32 ('w', 'S', 'N', 'P')\r
+#define SNP_NT32_INSTANCE_SIGNATURE SIGNATURE_32 ('w', 'S', 'N', 'P')\r
 \r
 typedef struct _SNPNT32_INSTANCE_DATA {\r
   UINT32                      Signature;\r
@@ -198,10 +198,27 @@ typedef struct _SNPNT32_INSTANCE_DATA {
   SNP_NT32_INSTANCE_SIGNATURE \\r
   )\r
 \r
-extern EFI_DRIVER_BINDING_PROTOCOL   gSnpNt32DriverBinding;\r
+extern EFI_DRIVER_BINDING_PROTOCOL    gSnpNt32DriverBinding;\r
 extern EFI_COMPONENT_NAME_PROTOCOL    gSnpNt32DriverComponentName;\r
 extern EFI_COMPONENT_NAME2_PROTOCOL   gSnpNt32DriverComponentName2;\r
 \r
+/**\r
+  Test to see if this driver supports ControllerHandle. This service\r
+  is called by the EFI boot service ConnectController(). In\r
+  order to make drivers as small as possible, there are a few calling\r
+  restrictions for this service. ConnectController() must\r
+  follow these calling restrictions. If any other agent wishes to call\r
+  Supported() it must also follow these calling restrictions.\r
+\r
+  @param  This                Protocol instance pointer.\r
+  @param  ControllerHandle    Handle of device to test\r
+  @param  RemainingDevicePath Optional parameter use to pick a specific child\r
+                              device to start.\r
+\r
+  @retval EFI_SUCCESS         This driver supports this device\r
+  @retval EFI_UNSUPPORTED     This driver does not support this device\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 SnpNt32DriverBindingSupported (\r
@@ -210,6 +227,22 @@ SnpNt32DriverBindingSupported (
   IN EFI_DEVICE_PATH_PROTOCOL     * RemainingDevicePath OPTIONAL\r
   );\r
 \r
+/**\r
+  Start this driver on ControllerHandle. This service is called by the\r
+  EFI boot service ConnectController(). In order to make\r
+  drivers as small as possible, there are a few calling restrictions for\r
+  this service. ConnectController() must follow these\r
+  calling restrictions. If any other agent wishes to call Start() it\r
+  must also follow these calling restrictions.\r
+\r
+  @param  This                 Protocol instance pointer.\r
+  @param  ControllerHandle     Handle of device to bind driver to\r
+  @param  RemainingDevicePath  Optional parameter use to pick a specific child\r
+                               device to start.\r
+\r
+  @retval EFI_SUCCESS          Always succeeds.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 SnpNt32DriverBindingStart (\r
@@ -218,6 +251,23 @@ SnpNt32DriverBindingStart (
   IN EFI_DEVICE_PATH_PROTOCOL     * RemainingDevicePath OPTIONAL\r
   );\r
 \r
+/**\r
+  Stop this driver on ControllerHandle. This service is called by the\r
+  EFI boot service DisconnectController(). In order to\r
+  make drivers as small as possible, there are a few calling\r
+  restrictions for this service. DisconnectController()\r
+  must follow these calling restrictions. If any other agent wishes\r
+  to call Stop() it must also follow these calling restrictions.\r
+  \r
+  @param  This              Protocol instance pointer.\r
+  @param  ControllerHandle  Handle of device to stop driver on\r
+  @param  NumberOfChildren  Number of Handles in ChildHandleBuffer. If number of\r
+                            children is zero stop the entire bus driver.\r
+  @param  ChildHandleBuffer List of Child Handles to Stop.\r
+\r
+  @retval EFI_SUCCESS       Always succeeds.\r
+\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 SnpNt32DriverBindingStop (\r
@@ -227,21 +277,52 @@ SnpNt32DriverBindingStop (
   IN  EFI_HANDLE                   *ChildHandleBuffer\r
   );\r
 \r
+/**\r
+  Initialize the driver's global data.\r
+\r
+  @param  This                  Pointer to the global context data.\r
+\r
+  @retval EFI_SUCCESS           The global data is initialized.\r
+  @retval EFI_NOT_FOUND         The required DLL is not found.\r
+  @retval EFI_DEVICE_ERROR      Error initialize network utility library.\r
+  @retval EFI_OUT_OF_RESOURCES  Out of resource.\r
+  @retval other                 Other errors.\r
+\r
+**/\r
 EFI_STATUS\r
 SnpNt32InitializeGlobalData (\r
-  IN SNPNT32_GLOBAL_DATA *This\r
+  IN OUT SNPNT32_GLOBAL_DATA *This\r
   );\r
 \r
+/**\r
+  Initialize the snpnt32 driver instance.\r
+\r
+  @param  This                  Pointer to the SnpNt32 global data.\r
+  @param  Instance              Pointer to the instance context data.\r
+\r
+  @retval EFI_SUCCESS           The driver instance is initialized.\r
+  @retval other                 Initialization errors.\r
+\r
+**/\r
 EFI_STATUS\r
 SnpNt32InitializeInstanceData (\r
-  IN SNPNT32_GLOBAL_DATA    *This,\r
-  IN SNPNT32_INSTANCE_DATA  *Instance\r
+  IN SNPNT32_GLOBAL_DATA        *This,\r
+  IN OUT SNPNT32_INSTANCE_DATA  *Instance\r
   );\r
 \r
+/**\r
+  Close the SnpNt32 driver instance.\r
+\r
+  @param  This                  Pointer to the SnpNt32 global data.\r
+  @param  Instance              Pointer to the instance context data.\r
+\r
+  @retval EFI_SUCCESS           The instance is closed.\r
+\r
+**/\r
 EFI_STATUS\r
 SnpNt32CloseInstance (\r
-  IN SNPNT32_GLOBAL_DATA    *This,\r
-  IN SNPNT32_INSTANCE_DATA  *Instance\r
+  IN SNPNT32_GLOBAL_DATA        *This,\r
+  IN OUT SNPNT32_INSTANCE_DATA  *Instance\r
   );\r
 \r
 #endif\r