summaryrefslogtreecommitdiff
path: root/Protocol/Smtp
diff options
context:
space:
mode:
authorraywu <raywu0301@gmail.com>2018-06-15 00:00:50 +0800
committerraywu <raywu0301@gmail.com>2018-06-15 00:00:50 +0800
commitb7c51c9cf4864df6aabb99a1ae843becd577237c (patch)
treeeebe9b0d0ca03062955223097e57da84dd618b9a /Protocol/Smtp
downloadzprj-b7c51c9cf4864df6aabb99a1ae843becd577237c.tar.xz
init. 1AQQW051HEADmaster
Diffstat (limited to 'Protocol/Smtp')
-rw-r--r--Protocol/Smtp/Smtp.c35
-rw-r--r--Protocol/Smtp/Smtp.h81
2 files changed, 116 insertions, 0 deletions
diff --git a/Protocol/Smtp/Smtp.c b/Protocol/Smtp/Smtp.c
new file mode 100644
index 0000000..f5cd5a8
--- /dev/null
+++ b/Protocol/Smtp/Smtp.c
@@ -0,0 +1,35 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ Smtp.c
+
+Abstract:
+
+ This file abstracts the common interfaces required to
+ communicate with the SMTP Server
+
+--*/
+
+#include "Tiano.h"
+#include EFI_PROTOCOL_DEFINITION (Smtp)
+
+EFI_GUID gEfiSmtpProtocolGuid = EFI_SMTP_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiSmtpProtocolGuid, "SMTP Protocol", "SMTP Protocol");
diff --git a/Protocol/Smtp/Smtp.h b/Protocol/Smtp/Smtp.h
new file mode 100644
index 0000000..622ec7b
--- /dev/null
+++ b/Protocol/Smtp/Smtp.h
@@ -0,0 +1,81 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ Smtp.h
+
+Abstract:
+
+ This code abstracts SMTP Protocol
+
+--*/
+
+#ifndef _EFI_SMTP_PROTOCOL_
+#define _EFI_SMTP_PROTOCOL_
+
+#include "Tiano.h"
+
+#define EFI_SMTP_PROTOCOL_GUID \
+ { \
+ 0x5f67d40c, 0x1d06, 0x4e3e, 0x8b, 0x4a, 0xd2, 0x71, 0x3f, 0x46, 0xe1, 0xdc \
+ }
+
+#define SMTP_PORT 25
+
+EFI_FORWARD_DECLARATION (EFI_SMTP_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SMTP_GET_SERVER) (
+ IN EFI_SMTP_PROTOCOL * This,
+ IN OUT UINT32 *UrlStringSize,
+ OUT EFI_IP_ADDRESS * ServerAddress,
+ OUT UINT8 *ServerUrl
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SMTP_SET_SERVER) (
+ IN EFI_SMTP_PROTOCOL * This,
+ IN OUT EFI_IP_ADDRESS * ServerAddress,
+ IN OUT UINT8 *ServerUrl
+ );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SMTP_SEND_MAIL) (
+ IN EFI_SMTP_PROTOCOL * This,
+ IN UINT8 *Message,
+ IN UINT8 *Subject,
+ IN UINT8 *Sender,
+ IN UINT8 *Receiver
+ );
+
+//
+// SMTP PROTOCOL
+//
+typedef struct _EFI_SMTP_PROTOCOL {
+ EFI_SMTP_SEND_MAIL SendMail;
+ EFI_SMTP_SET_SERVER SetMailServer;
+ EFI_SMTP_GET_SERVER GetMailServer;
+} EFI_SMTP_PROTOCOL;
+
+extern EFI_GUID gEfiSmtpProtocolGuid;
+
+#endif