This file is indexed.

/usr/include/gnash/IOChannel.h is in gnash-dev 0.8.11~git20160109-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
// IOChannel.h - a virtual IO channel, for Gnash
// 
//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
//   Free Software Foundation, Inc
// 
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA


#ifndef GNASH_IOCHANNEL_H
#define GNASH_IOCHANNEL_H

#include <string>
#include <ios> // for std::streamsize
#include <cstdint> // for boost int types

#include "dsodefs.h" // DSOEXPORT
#include "GnashException.h" // for IOException inheritance

namespace gnash {

/// Exception signalling an IO error
class DSOEXPORT IOException : public GnashException
{
public:
    IOException(const std::string& s) : GnashException(s) {}
    IOException() : GnashException("IO error") {}
};

/// A virtual IO channel
class DSOEXPORT IOChannel
{
public:

    virtual ~IOChannel() {}

    /// \brief Read a 32-bit word from a little-endian stream.
    ///    returning it as a native-endian word.
    //
    /// Throw IOException on error
    ///
    std::uint32_t read_le32();

    /// Read a 16-bit word from a little-endian stream.
    //
    /// Throw IOException on error
    ///
    std::uint16_t read_le16();

    /// Read a single byte from the stream
    //
    /// Throw IOException on error
    ///
    std::uint8_t read_byte();
    
    /// Read the given number of bytes from the stream
    //
    /// Return the number of bytes actually read. 
    /// EOF might cause it to be < num.
    ///
    /// Throw IOException on error
    ///
    virtual std::streamsize read(void* dst, std::streamsize num)=0;

    /// Read at most the given number of bytes w/out blocking
    //
    /// Throw IOException on error
    ///
    /// @return The number of bytes actually read.
    ///         A short count may mean EOF was hit or 
    ///         data didn't arrive yet.
    ///
    /// Default implementation proxies the call to the
    /// blocking version.
    ///
    virtual std::streamsize readNonBlocking(void* dst, std::streamsize num)
    {
        return read(dst, num);
    }

    /// Write the given number of bytes to the stream
    //
    /// Throw IOException on error/unsupported op.
    ///
    virtual std::streamsize write(const void* src, std::streamsize num);

    /// \brief
    /// Read up to max_length characters, returns the number of characters 
    /// read, or -1 if the string length is longer than max_length.
    //
    /// Stops at the first \0 character if it comes before max_length.
    ///
    /// Guarantees termination of the string.
    ///
    /// @return the number of characters read, or -1 no null-termination
    ///         was found within max_length
    ///
    /// Throw IOException on error
    ///
    int    read_string(char* dst, int max_length);
    
    /// Return current stream position
    //
    /// Throw IOException on error
    ///
    virtual std::streampos tell() const = 0;

    /// Seek to the specified position
    //
    /// 
    /// Throw IOException on error
    ///
    /// @return true on success, or false on failure.
    ///
    virtual bool seek(std::streampos p) = 0;

    /// Seek to the end of the stream
    //
    /// Throw IOException on error
    ///
    virtual void go_to_end() = 0;

    /// Return true if the end of the stream has been reached.
    //
    /// Throw IOException on error
    ///
    virtual bool eof() const = 0;
    
    /// Return true if the stream is in an error state
    //
    /// When the stream is in an error state there's nothing
    /// you can do about it, just delete it and log the error.
    virtual bool bad() const = 0;
    
    /// Get the size of the stream (unreliably).
    //
    /// Size of stream is unreliable as not all input
    /// channels have a mechanism to advertise size,
    /// and some have one but isn't necessarely truthful
    /// (a few HTTP severs are bogus in this reguard).
    ///
    /// @return unreliable input size, (size_t)-1 if not known. 
    ///
    virtual size_t size() const { return static_cast<size_t>(-1); }
   
};

} // namespace gnash

#endif // GNASH_IOCHANNEL_H


// Local Variables:
// mode: C++
// indent-tabs-mode: t
// End: