• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDE Support
  • Sitemap
  • Contact Us
 

strigi/src/streams

Strigi::SubStreamProvider

Strigi::SubStreamProvider Class Reference

Extracts substreams from an InputStream. More...

#include <substreamprovider.h>

Inheritance diagram for Strigi::SubStreamProvider:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 SubStreamProvider (InputStream *input)
virtual ~SubStreamProvider ()
InputStream * currentEntry ()
const EntryInfo & entryInfo () const
const char * error () const
virtual InputStream * nextEntry ()=0
StreamStatus status () const

Protected Attributes

EntryInfo m_entryinfo
InputStream * m_entrystream
std::string m_error
InputStream * m_input
StreamStatus m_status

Detailed Description

Extracts substreams from an InputStream.

This class extracts substreams, such as files and directories, from an InputStream. For example, it may extract files and directories from a tar archive, or uncompressed data from a gzipped data stream.

Definition at line 67 of file substreamprovider.h.


Constructor & Destructor Documentation

Strigi::SubStreamProvider::SubStreamProvider ( InputStream *  input  )  [inline]

Initialize the SubStreamProvider.

This just sets the members to sane defaults, and assigns input to m_input

Parameters:
input the inputstream that will be split into substreams

Definition at line 91 of file substreamprovider.h.

virtual Strigi::SubStreamProvider::~SubStreamProvider (  )  [inline, virtual]

Releases the memory used by entrystream, if there is one.

NB: does not delete input

Definition at line 101 of file substreamprovider.h.


Member Function Documentation

InputStream* Strigi::SubStreamProvider::currentEntry (  )  [inline]

get the current substream

Definition at line 140 of file substreamprovider.h.

const EntryInfo& Strigi::SubStreamProvider::entryInfo (  )  const [inline]

get information about the current substream

Definition at line 147 of file substreamprovider.h.

const char* Strigi::SubStreamProvider::error (  )  const [inline]

Return a string representation of the last error.

If no error has occurred, an empty string is returned.

Definition at line 155 of file substreamprovider.h.

virtual InputStream* Strigi::SubStreamProvider::nextEntry (  )  [pure virtual]

Get the next substream.

This function should return a stream representing the next substream that can be read from the input stream, or 0 if there are no more substreams.

For example, if the input stream were a tar archive, it would return a stream representing the next file or directory in the archive.

It should also load the substream (the same one that was returned) into entrystream, and set entryinfo to an EntryInfo giving information about the substream.

If there may be more substreams, but an error occurred, 0 should be returned, the status should be set to Error and an error message should be set.

Returns:
the next substream, or 0 if there are no more substreams or an error occurred

Implemented in Strigi::ArInputStream, Strigi::CpioInputStream, Strigi::MailInputStream, Strigi::OleInputStream, Strigi::RpmInputStream, Strigi::SdfInputStream, Strigi::TarInputStream, and Strigi::ZipInputStream.

StreamStatus Strigi::SubStreamProvider::status (  )  const [inline]

Return the status of the stream.

Definition at line 110 of file substreamprovider.h.


Member Data Documentation

EntryInfo Strigi::SubStreamProvider::m_entryinfo [protected]

Information about the current substream.

Definition at line 81 of file substreamprovider.h.

InputStream* Strigi::SubStreamProvider::m_entrystream [protected]

The current substream.

Definition at line 79 of file substreamprovider.h.

std::string Strigi::SubStreamProvider::m_error [protected]

String representation of the last error, or an empty string otherwise.

Definition at line 75 of file substreamprovider.h.

InputStream* Strigi::SubStreamProvider::m_input [protected]

The input stream to extract the substreams from.

Definition at line 77 of file substreamprovider.h.

StreamStatus Strigi::SubStreamProvider::m_status [protected]

The status of the SubStreamProvider.

Definition at line 70 of file substreamprovider.h.


The documentation for this class was generated from the following file:
  • substreamprovider.h

strigi/src/streams

Skip menu "strigi/src/streams"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

KDE Support

Skip menu "KDE Support"
  • akonadi
  • Decibel
  • grantlee
  • kdewin
  • phonon
  •     Backend
  • polkit-qt
  • qca
  • qimageblitz
  • soprano
  • strigi
  •     searchclient
  •     streamanalyzer
  •     streams
Generated for KDE Support by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal