1 /** **************************************************************************
2 * response_headers_handler.h
4 * Copyright 2008 Bryan Ischo <bryan@ischo.com>
6 * This file is part of libs3.
8 * libs3 is free software: you can redistribute it and/or modify it under the
9 * terms of the GNU General Public License as published by the Free Software
10 * Foundation, version 3 of the License.
12 * In addition, as a special exception, the copyright holders give
13 * permission to link the code of this library and its programs with the
14 * OpenSSL library, and distribute linked combinations including the two.
16 * libs3 is distributed in the hope that it will be useful, but WITHOUT ANY
17 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21 * You should have received a copy of the GNU General Public License version 3
22 * along with libs3, in a file named COPYING. If not, see
23 * <http://www.gnu.org/licenses/>.
25 ************************************************************************** **/
27 #ifndef RESPONSE_HEADERS_HANDLER_H
28 #define RESPONSE_HEADERS_HANDLER_H
31 #include "string_buffer.h"
35 typedef struct ResponseHeadersHandler
37 // The structure to pass to the headers callback. This is filled in by
38 // the ResponseHeadersHandler from the headers added to it.
39 S3ResponseProperties responseProperties;
41 // Set to 1 after the done call has been made
44 // copied into here. We allow 128 bytes for each header, plus \0 term.
45 string_multibuffer(responsePropertyStrings, 5 * 129);
47 // responseproperties.metaHeaders strings get copied into here
48 string_multibuffer(responseMetaDataStrings,
49 COMPACTED_METADATA_BUFFER_SIZE);
52 S3NameValue responseMetaData[S3_MAX_METADATA_COUNT];
53 } ResponseHeadersHandler;
56 void response_headers_handler_initialize(ResponseHeadersHandler *handler);
58 void response_headers_handler_add(ResponseHeadersHandler *handler,
59 char *data, int dataLen);
61 void response_headers_handler_done(ResponseHeadersHandler *handler,
64 #endif /* RESPONSE_HEADERS_HANDLER_H */