Debian Codegraph @

src/xml/S3MultiPartInitiationParser.hpp

raw
1
2 /*
3 * This File is part of Davix, The IO library for HTTP based protocols
4 * Copyright (C) CERN 2013
5 * Author: Georgios Bitzes <[email protected]>
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 *
21 */
22
23 #ifndef S3_MULTIPART_INITIATION_PARSER_HPP
24 #define S3_MULTIPART_INITIATION_PARSER_HPP
25
26 #include <davix_internal.hpp>
27 #include <xml/davxmlparser.hpp>
28 #include <utils/davix_fileproperties.hpp>
29
30 namespace Davix{
31
32 class S3MultiPartInitiationParser : public XMLPropParser {
33 public:
34 S3MultiPartInitiationParser();
35 virtual ~S3MultiPartInitiationParser();
36
37 std::string getUploadId() const;
38 virtual std::deque<FileProperties> & getProperties(); // not used
39
40 protected:
41 virtual int parserStartElemCb(int parent, const char *nspace, const char *name, const char **atts);
42 virtual int parserCdataCb(int state, const char *cdata, size_t len);
43 virtual int parserEndElemCb(int state, const char *nspace, const char *name);
44
45 private:
46 bool nextIsUploadId;
47 std::string uploadId;
48 std::deque<FileProperties> unusedFileProps;
49 };
50
51 }
52
53 #endif