1 //
2 //      aegis - project change supervisor
3 //      Copyright (C) 1999, 2001, 2002, 2005-2008, 2012 Peter Miller
4 //
5 //      This program is free software; you can redistribute it and/or modify
6 //      it under the terms of the GNU General Public License as published by
7 //      the Free Software Foundation; either version 3 of the License, or
8 //      (at your option) any later version.
9 //
10 //      This program is distributed in the hope that it will be useful,
11 //      but WITHOUT ANY WARRANTY; without even the implied warranty of
12 //      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 //      GNU General Public License for more details.
14 //
15 //      You should have received a copy of the GNU General Public License
16 //      along with this program. If not, see
17 //      <http://www.gnu.org/licenses/>.
18 //
19 
20 #ifndef LIBAEGIS_INPUT_BASE64_H
21 #define LIBAEGIS_INPUT_BASE64_H
22 
23 #include <libaegis/input.h>
24 
25 class input_base64:
26     public input_ty
27 {
28 public:
29     /**
30       * The destructor.
31       */
32     virtual ~input_base64();
33 
34     /**
35       * The constructor.
36       *
37       * @param deeper
38       *     the data source for this filter.
39       */
40     input_base64(input &deeper);
41 
42     // See base class for documentation.
43     nstring name();
44 
45     // See base class for documentation.
46     off_t length();
47 
48     // See base class for documentation.
49     void keepalive();
50 
51     // See base class for documentation.
52     ssize_t read_inner(void *data, size_t nbytes);
53 
54     // See base class for documentation.
55     off_t ftell_inner();
56 
57     // See base class for documentation.
58     bool is_remote() const;
59 
60     static bool recognise(input &ip);
61 
62 private:
63     /**
64       * The deeper instance variable is used to remember the data source
65       * for this filter.
66       */
67     input deeper;
68 
69     off_t pos;
70     int residual_bits;
71     int residual_value;
72     bool eof;
73 
74     /**
75       * The default constructor.  Do not use.
76       */
77     input_base64();
78 
79     /**
80       * The copy constructor.  Do not use.
81       */
82     input_base64(const input_base64 &arg);
83 
84     /**
85       * The assignment operator.  Do not use.
86       */
87     input_base64 &operator=(const input_base64 &arg);
88 };
89 
90 
91 inline DEPRECATED bool
input_base64_recognise(input & ip)92 input_base64_recognise(input &ip)
93 {
94     return input_base64::recognise(ip);
95 }
96 
97 #endif // LIBAEGIS_INPUT_BASE64_H
98 // vim: set ts=8 sw=4 et :
99