Back to index

php5  5.3.10
rfc1867.h
Go to the documentation of this file.
00001 /*
00002   +----------------------------------------------------------------------+
00003   | PHP Version 5                                                        |
00004   +----------------------------------------------------------------------+
00005   | Copyright (c) 1997-2012 The PHP Group                                |
00006   +----------------------------------------------------------------------+
00007   | This source file is subject to version 3.01 of the PHP license,      |
00008   | that is bundled with this package in the file LICENSE, and is        |
00009   | available through the world-wide-web at the following url:           |
00010   | http://www.php.net/license/3_01.txt                                  |
00011   | If you did not receive a copy of the PHP license and are unable to   |
00012   | obtain it through the world-wide-web, please send a note to          |
00013   | license@php.net so we can mail you a copy immediately.               |
00014   +----------------------------------------------------------------------+
00015   | Author:                                                              |
00016   +----------------------------------------------------------------------+
00017 */
00018 
00019 /* $Id: rfc1867.h 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #ifndef RFC1867_H
00022 #define RFC1867_H
00023 
00024 #include "SAPI.h"
00025 
00026 #define MULTIPART_CONTENT_TYPE "multipart/form-data"
00027 #define MULTIPART_EVENT_START             0
00028 #define MULTIPART_EVENT_FORMDATA   1
00029 #define MULTIPART_EVENT_FILE_START 2
00030 #define MULTIPART_EVENT_FILE_DATA  3
00031 #define MULTIPART_EVENT_FILE_END   4
00032 #define MULTIPART_EVENT_END        5
00033 
00034 typedef struct _multipart_event_start {
00035        size_t content_length;
00036 } multipart_event_start;
00037 
00038 typedef struct _multipart_event_formdata {
00039        size_t post_bytes_processed;
00040        char   *name;
00041        char   **value;
00042        size_t length;
00043        size_t *newlength;
00044 } multipart_event_formdata;
00045 
00046 typedef struct _multipart_event_file_start {
00047        size_t post_bytes_processed;
00048        char   *name;
00049        char   **filename;
00050 } multipart_event_file_start;
00051 
00052 typedef struct _multipart_event_file_data {
00053        size_t post_bytes_processed;
00054        off_t  offset;
00055        char   *data;
00056        size_t length;
00057        size_t *newlength;   
00058 } multipart_event_file_data;
00059 
00060 typedef struct _multipart_event_file_end {
00061        size_t post_bytes_processed;
00062        char   *temp_filename;
00063        int    cancel_upload;
00064 } multipart_event_file_end;
00065 
00066 typedef struct _multipart_event_end {
00067        size_t post_bytes_processed;
00068 } multipart_event_end;
00069 
00070 SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler);
00071 
00072 void destroy_uploaded_files_hash(TSRMLS_D);
00073 void php_rfc1867_register_constants(TSRMLS_D);
00074 extern PHPAPI int (*php_rfc1867_callback)(unsigned int event, void *event_data, void **extra TSRMLS_DC);
00075 
00076 #endif /* RFC1867_H */