summaryrefslogtreecommitdiffstats
path: root/nanohttp/nanohttp-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'nanohttp/nanohttp-common.h')
-rw-r--r--nanohttp/nanohttp-common.h136
1 files changed, 68 insertions, 68 deletions
diff --git a/nanohttp/nanohttp-common.h b/nanohttp/nanohttp-common.h
index e633ab4..60cfbeb 100644
--- a/nanohttp/nanohttp-common.h
+++ b/nanohttp/nanohttp-common.h
@@ -1,25 +1,25 @@
-/******************************************************************
- * $Id: nanohttp-common.h,v 1.16 2004/11/01 15:16:26 snowdrop Exp $
- *
- * CSOAP Project: A http client/server library in C
- * Copyright (C) 2003-2004 Ferhat Ayaz
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Email: ferhatayaz@yahoo.com
+/******************************************************************
+ * $Id: nanohttp-common.h,v 1.17 2004/11/02 23:09:26 snowdrop Exp $
+ *
+ * CSOAP Project: A http client/server library in C
+ * Copyright (C) 2003-2004 Ferhat Ayaz
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Email: ferhatayaz@yahoo.com
******************************************************************/
#ifndef NANO_HTTP_COMMON_H
#define NANO_HTTP_COMMON_H
@@ -29,8 +29,8 @@
#define HEADER_CONTENT_LENGTH "Content-Length"
#define HEADER_CONTENT_TYPE "Content-Type"
-#define HEADER_CONTENT_ID "Content-Id"
-#define HEADER_CONTENT_LOCATION "Content-Location"
+#define HEADER_CONTENT_ID "Content-Id"
+#define HEADER_CONTENT_LOCATION "Content-Location"
#define HEADER_CONTENT_TRANSFER_ENCODING "Content-Transfer-Encoding"
#define HEADER_TRANSFER_ENCODING "Transfer-Encoding"
#define HEADER_CONNECTION "Connection"
@@ -38,13 +38,13 @@
#define HEADER_HOST "Host"
#define HEADER_DATE "Date"
#define HEADER_ACCEPT "Accept"
-
-
-#define NHTTPD_ARG_PORT "-NHTTPport"
-#define NHTTPD_ARG_TERMSIG "-NHTTPtsig"
-#define NHTTPD_ARG_MAXCONN "-NHTTPmaxconn"
-#define NHTTP_ARG_LOGFILE "-NHTTPlog"
-#define NHTTP_ARG_TMPDIR "-NHTTPtmpdir"
+
+
+#define NHTTPD_ARG_PORT "-NHTTPport"
+#define NHTTPD_ARG_TERMSIG "-NHTTPtsig"
+#define NHTTPD_ARG_MAXCONN "-NHTTPmaxconn"
+#define NHTTP_ARG_LOGFILE "-NHTTPlog"
+#define NHTTP_ARG_TMPDIR "-NHTTPtmpdir"
#ifndef SAVE_STR
#define SAVE_STR(str) ((str==0)?("(null)"):(str))
@@ -120,18 +120,18 @@
#define MIME_ERROR_NO_ROOT_PART 1304
#define MIME_ERROR_NOT_MIME_MESSAGE 1305
-
-/* General errors */
-#define GENERAL_INVALID_PARAM 1400
-#define GENERAL_HEADER_PARSE_ERROR 1401
-
-/* Thread errors */
-#define THREAD_BEGIN_ERROR 1500
-
-/* XML Errors */
-#define XML_ERROR_EMPTY_DOCUMENT 1600
-#define XML_ERROR_PARSE 1601
-
+
+/* General errors */
+#define GENERAL_INVALID_PARAM 1400
+#define GENERAL_HEADER_PARSE_ERROR 1401
+
+/* Thread errors */
+#define THREAD_BEGIN_ERROR 1500
+
+/* XML Errors */
+#define XML_ERROR_EMPTY_DOCUMENT 1600
+#define XML_ERROR_PARSE 1601
+
/*
Set Sleep function platform depended
*/
@@ -149,8 +149,8 @@ struct tm *localtime_r(const time_t *const timep, struct tm *p_tm);
typedef unsigned char byte_t;
typedef void* herror_t;
-
-
+
+
/**
Indicates the version of the
@@ -171,14 +171,14 @@ typedef enum _hreq_method
HTTP_REQUEST_GET
}hreq_method_t ;
-
-herror_t herror_new(const char* func,
- int errcode, const char* format, ...);
-int herror_code(herror_t err);
-char* herror_func(herror_t err);
-char* herror_message(herror_t err);
-void herror_release(herror_t err);
-
+
+herror_t herror_new(const char* func,
+ int errcode, const char* format, ...);
+int herror_code(herror_t err);
+char* herror_func(herror_t err);
+char* herror_message(herror_t err);
+void herror_release(herror_t err);
+
/*
string function to compare strings ignoring case
@@ -413,22 +413,22 @@ void content_type_free(content_type_t *ct);
*/
typedef struct _part
{
- char id[250];
- char location[250];
+ char id[250];
+ char location[250];
hpair_t *header;
char content_type[128];
char transfer_encoding[128];
char filename[250];
- struct _part *next;
+ struct _part *next;
int deleteOnExit; /* default is 0 */
}part_t;
part_t *part_new(const char *id, const char* filename,
const char* content_type, const char* transfer_encoding, part_t *next);
-void part_free(part_t *part);
-
-
+void part_free(part_t *part);
+
+
/*
@@ -450,13 +450,13 @@ attachments_t *attachments_new(); /* should be used internally */
@see mime_get_attachments
*/
void attachments_free(attachments_t *message);
-void attachments_add_part(attachments_t *attachments, part_t *part);
-
+void attachments_add_part(attachments_t *attachments, part_t *part);
+
-/* tmp directory for multipart/related stuff */
-#define HOPTION_TMP_DIR 2
-void hoption_init_args(int argc, char* argv[]);
-void hoption_set(int opt, const char* value);
+/* tmp directory for multipart/related stuff */
+#define HOPTION_TMP_DIR 2
+void hoption_init_args(int argc, char* argv[]);
+void hoption_set(int opt, const char* value);
char *hoption_get(int opt);
@@ -476,11 +476,11 @@ typedef enum log_level
log_level_t log_set_level(log_level_t level);
log_level_t log_get_level();
-void log_set_file(const char *filename);
-char *log_get_file();
+void log_set_file(const char *filename);
+char *log_get_file();
#ifdef WIN32
- #ifndef __MINGW32__
+ #ifndef __MINGW32__
char *VisualC_funcname(const char* file, int line); /* not thread safe!*/
#define __FUNCTION__ VisualC_funcname(__FILE__, __LINE__)
#endif