summaryrefslogtreecommitdiff
path: root/nuttx/include/net/uip/smtp.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-08-30 23:57:58 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-08-30 23:57:58 +0000
commit0cab5d84f146c0f6105192db5593aa4019edcdcf (patch)
treea4f27d4408986adfe1ac8bd5008a63920099bda5 /nuttx/include/net/uip/smtp.h
parentc98a99e6c02ff76fc8e161a0889c183ff105f725 (diff)
downloadpx4-nuttx-0cab5d84f146c0f6105192db5593aa4019edcdcf.tar.gz
px4-nuttx-0cab5d84f146c0f6105192db5593aa4019edcdcf.tar.bz2
px4-nuttx-0cab5d84f146c0f6105192db5593aa4019edcdcf.zip
smtp now compiles
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@317 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/include/net/uip/smtp.h')
-rw-r--r--nuttx/include/net/uip/smtp.h61
1 files changed, 25 insertions, 36 deletions
diff --git a/nuttx/include/net/uip/smtp.h b/nuttx/include/net/uip/smtp.h
index da2683f65..c90240d6d 100644
--- a/nuttx/include/net/uip/smtp.h
+++ b/nuttx/include/net/uip/smtp.h
@@ -1,9 +1,15 @@
+/****************************************************************************
/* smtp.h
* SMTP header file
- * Author: Adam Dunkels <adam@dunkels.com>
*
- * Copyright (c) 2002, Adam Dunkels.
- * All rights reserved.
+ * Copyright (C) 2007 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ *
+ * Heavily leveraged from uIP 1.0 which also has a BSD-like license:
+ *
+ * Author: Adam Dunkels <adam@dunkels.com>
+ * Copyright (c) 2002, Adam Dunkels.
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,48 +34,31 @@
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ *
+ ****************************************************************************/
#ifndef __SMTP_H__
#define __SMTP_H__
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
#include <sys/types.h>
#include <net/uip/uipopt.h>
-/* Error number that signifies a non-error condition. */
-
-#define SMTP_ERR_OK 0
-
-/* Callback function that is called when an e-mail transmission is
- * done.
- *
- * This function must be implemented by the module that uses the SMTP
- * module.
- *
- * error The number of the error if an error occured, or
- * SMTP_ERR_OK.
- */
-
-void smtp_done(unsigned char error);
-
-void smtp_init(void);
-void smtp_configure(char *localhostname, uint16 *smtpserver);
-unsigned char smtp_send(char *to, char *from,
- char *subject, char *msg,
- uint16 msglen);
+/****************************************************************************
+ * Type Definitions
+ ****************************************************************************/
-struct smtp_state
-{
- uint8 state;
- char *to;
- char *from;
- char *subject;
- char *msg;
- uint16 msglen;
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
- uint16 sentlen, textlen;
- uint16 sendptr;
-};
+extern void *smtp_open(void);
+extern void smtp_configure(void *handle, char *localhostname, void *smtpserver);
+extern int smtp_send(void *handle, char *to, char *cc, char *from, char *subject, char *msg, int msglen);
+extern void smtp_close(void *handle);
#endif /* __SMTP_H__ */