HTP
0.3
Main Page
Related Pages
Data Structures
Files
File List
Globals
htp
bstr_builder.h
Go to the documentation of this file.
1
/***************************************************************************
2
* Copyright (c) 2009-2010, Open Information Security Foundation
3
* Copyright (c) 2009-2012, Qualys, Inc.
4
* All rights reserved.
5
*
6
* Redistribution and use in source and binary forms, with or without
7
* modification, are permitted provided that the following conditions are
8
* met:
9
*
10
* * Redistributions of source code must retain the above copyright
11
* notice, this list of conditions and the following disclaimer.
12
* * Redistributions in binary form must reproduce the above copyright
13
* notice, this list of conditions and the following disclaimer in the
14
* documentation and/or other materials provided with the distribution.
15
* * Neither the name of the Qualys, Inc. nor the names of its
16
* contributors may be used to endorse or promote products derived from
17
* this software without specific prior written permission.
18
*
19
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
***************************************************************************/
31
37
#ifndef _BSTR_BUILDER_H
38
#define _BSTR_BUILDER_H
39
40
typedef
struct
bstr_builder_t
bstr_builder_t
;
41
42
#include "
dslib.h
"
43
44
#ifdef __cplusplus
45
extern
"C"
{
46
#endif
47
48
struct
bstr_builder_t
{
49
list_t
*
pieces
;
50
};
51
52
#define BSTR_BUILDER_DEFAULT_SIZE 16
53
54
bstr_builder_t
*
bstr_builder_create
(
void
);
55
void
bstr_builder_destroy
(
bstr_builder_t
*bb);
56
57
size_t
bstr_builder_size
(
bstr_builder_t
*bb);
58
void
bstr_builder_clear
(
bstr_builder_t
*bb);
59
60
int
bstr_builder_append
(
bstr_builder_t
*bb,
bstr
*b);
61
int
bstr_builder_append_mem
(
bstr_builder_t
*bb,
const
char
*data,
size_t
len);
62
int
bstr_builder_append_c
(
bstr_builder_t
*bb,
const
char
*str);
63
bstr
*
bstr_builder_to_str
(
bstr_builder_t
*bb);
64
65
#ifdef __cplusplus
66
}
67
#endif
68
69
#endif
/* _BSTR_BUILDER_H */
70
Generated by
1.8.1.1