Panda3D
chunkedStream.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file chunkedStream.h
10  * @author drose
11  * @date 2002-09-25
12  */
13 
14 #ifndef CHUNKEDSTREAM_H
15 #define CHUNKEDSTREAM_H
16 
17 #include "pandabase.h"
18 
19 // This module is not compiled if OpenSSL is not available.
20 #ifdef HAVE_OPENSSL
21 
22 #include "socketStream.h"
23 #include "chunkedStreamBuf.h"
24 
25 class HTTPChannel;
26 class BioStreamPtr;
27 
28 /**
29  * An input stream object that reads data from a source istream, but
30  * automatically decodes the "chunked" transfer-coding specified by an HTTP
31  * server.
32  *
33  * Seeking is not supported. No need to export from DLL.
34  */
35 class IChunkedStream : public ISocketStream {
36 public:
37  INLINE IChunkedStream();
38  INLINE IChunkedStream(BioStreamPtr *source, HTTPChannel *doc);
39 
40  INLINE IChunkedStream &open(BioStreamPtr *source, HTTPChannel *doc);
41  virtual ~IChunkedStream();
42 
43  virtual bool is_closed();
44  virtual void close();
45  virtual ReadState get_read_state();
46 
47 private:
48  ChunkedStreamBuf _buf;
49 };
50 
51 #include "chunkedStream.I"
52 
53 #endif // HAVE_OPENSSL
54 
55 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.