summaryrefslogtreecommitdiffstats
path: root/src/dom
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2013-03-11 21:47:05 +0000
committerKris <Kris.De.Gussem@hotmail.com>2013-03-11 21:47:05 +0000
commitc9ab0e5a52eeea522ba9f526836310a80bcfe466 (patch)
treec920867ca58d37bfd847e929aa797c51e366b8ad /src/dom
parentfix build warnings / cppcheck ( Bug #1120585 ) (diff)
downloadinkscape-c9ab0e5a52eeea522ba9f526836310a80bcfe466.tar.gz
inkscape-c9ab0e5a52eeea522ba9f526836310a80bcfe466.zip
Drop duplicate io code ( Bug #1120585 )
(bzr r12192)
Diffstat (limited to 'src/dom')
-rw-r--r--src/dom/CMakeLists.txt11
-rw-r--r--src/dom/Makefile_insert8
-rw-r--r--src/dom/io/bufferstream.cpp167
-rw-r--r--src/dom/io/bufferstream.h135
-rw-r--r--src/dom/io/stringstream.cpp159
-rw-r--r--src/dom/io/stringstream.h131
-rw-r--r--src/dom/io/uristream.cpp462
-rw-r--r--src/dom/io/uristream.h207
8 files changed, 0 insertions, 1280 deletions
diff --git a/src/dom/CMakeLists.txt b/src/dom/CMakeLists.txt
index 5d761e649..8167e1b03 100644
--- a/src/dom/CMakeLists.txt
+++ b/src/dom/CMakeLists.txt
@@ -14,16 +14,10 @@ set(dom_SRC
ucd.cpp
uri.cpp
xmlreader.cpp
- # xmlwriter.cpp
xpathimpl.cpp
xpathparser.cpp
xpathtoken.cpp
- io/bufferstream.cpp
- io/domstream.cpp
- io/stringstream.cpp
- io/uristream.cpp
-
util/digest.cpp
util/ziptool.cpp
@@ -59,11 +53,6 @@ set(dom_SRC
xpathparser.h
xpathtoken.h
- io/bufferstream.h
- io/domstream.h
- io/stringstream.h
- io/uristream.h
-
util/digest.h
util/ziptool.h
)
diff --git a/src/dom/Makefile_insert b/src/dom/Makefile_insert
index 91c91eeac..058242a36 100644
--- a/src/dom/Makefile_insert
+++ b/src/dom/Makefile_insert
@@ -50,14 +50,6 @@ dom_libdom_a_SOURCES = \
dom/xpathparser.h \
dom/xpathtoken.h \
dom/xpathtoken.cpp \
- dom/io/bufferstream.cpp \
- dom/io/bufferstream.h \
- dom/io/domstream.cpp \
- dom/io/domstream.h \
- dom/io/stringstream.cpp \
- dom/io/stringstream.h \
- dom/io/uristream.cpp \
- dom/io/uristream.h \
dom/util/digest.h \
dom/util/digest.cpp \
dom/util/ziptool.h \
diff --git a/src/dom/io/bufferstream.cpp b/src/dom/io/bufferstream.cpp
deleted file mode 100644
index 3389bd80e..000000000
--- a/src/dom/io/bufferstream.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Phoebe DOM Implementation.
- *
- * This is a C++ approximation of the W3C DOM model, which follows
- * fairly closely the specifications in the various .idl files, copies of
- * which are provided for reference. Most important is this one:
- *
- * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
- *
- * Authors:
- * Bob Jamison
- *
- * Copyright (C) 2006 Bob Jamison
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * This class provided buffered endpoints for input and output.
- */
-
-#include "bufferstream.h"
-
-namespace org
-{
-namespace w3c
-{
-namespace dom
-{
-namespace io
-{
-
-
-
-//#########################################################################
-//# B U F F E R I N P U T S T R E A M
-//#########################################################################
-
-
-/**
- *
- */
-BufferInputStream::BufferInputStream(
- const std::vector<unsigned char> &sourceBuffer)
- : buffer(sourceBuffer)
-{
- position = 0;
- closed = false;
-}
-
-/**
- *
- */
-BufferInputStream::~BufferInputStream()
-{
-
-}
-
-/**
- * Returns the number of bytes that can be read (or skipped over) from
- * this input stream without blocking by the next caller of a method for
- * this input stream.
- */
-int BufferInputStream::available()
-{
- if (closed)
- return -1;
- return buffer.size() - position;
-}
-
-
-/**
- * Closes this input stream and releases any system resources
- * associated with the stream.
- */
-void BufferInputStream::close()
-{
- closed = true;
-}
-
-/**
- * Reads the next byte of data from the input stream. -1 if EOF
- */
-int BufferInputStream::get()
-{
- if (closed)
- return -1;
- if (position >= (int)buffer.size())
- return -1;
- int ch = (int) buffer[position++];
- return ch;
-}
-
-
-
-
-//#########################################################################
-//# B U F F E R O U T P U T S T R E A M
-//#########################################################################
-
-/**
- *
- */
-BufferOutputStream::BufferOutputStream()
-{
- closed = false;
-}
-
-/**
- *
- */
-BufferOutputStream::~BufferOutputStream()
-{
-}
-
-/**
- * Closes this output stream and releases any system resources
- * associated with this stream.
- */
-void BufferOutputStream::close()
-{
- closed = true;
-}
-
-/**
- * Flushes this output stream and forces any buffered output
- * bytes to be written out.
- */
-void BufferOutputStream::flush()
-{
- //nothing to do
-}
-
-/**
- * Writes the specified byte to this output stream.
- */
-int BufferOutputStream::put(gunichar ch)
-{
- if (closed)
- return -1;
- buffer.push_back(ch);
- return 1;
-}
-
-
-
-
-} //namespace io
-} //namespace dom
-} //namespace w3c
-} //namespace org
-
-//#########################################################################
-//# E N D O F F I L E
-//#########################################################################
diff --git a/src/dom/io/bufferstream.h b/src/dom/io/bufferstream.h
deleted file mode 100644
index 0ac06b362..000000000
--- a/src/dom/io/bufferstream.h
+++ /dev/null
@@ -1,135 +0,0 @@
-#ifndef SEEN_BUFFERSTREAM_H
-#define SEEN_BUFFERSTREAM_H
-/**
- * @file
- * Phoebe DOM Implementation.
- *
- * This is a C++ approximation of the W3C DOM model, which follows
- * fairly closely the specifications in the various .idl files, copies of
- * which are provided for reference. Most important is this one:
- *
- * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
- */
-/*
- * Authors:
- * Bob Jamison
- *
- * Copyright (C) 2006 Bob Jamison
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-#include "domstream.h"
-
-
-namespace org
-{
-namespace w3c
-{
-namespace dom
-{
-namespace io
-{
-
-
-//#########################################################################
-//# S T R I N G I N P U T S T R E A M
-//#########################################################################
-
-/**
- * This class is for reading character from a DOMString
- *
- */
-class BufferInputStream : public InputStream
-{
-
-public:
-
- BufferInputStream(const std::vector<unsigned char> &sourceBuffer);
-
- virtual ~BufferInputStream();
-
- virtual int available();
-
- virtual void close();
-
- virtual int get();
-
-private:
-
- const std::vector<unsigned char> &buffer;
-
- long position;
-
- bool closed;
-
-}; // class BufferInputStream
-
-
-
-
-//#########################################################################
-//# B U F F E R O U T P U T S T R E A M
-//#########################################################################
-
-/**
- * This class is for sending a stream to a character buffer
- *
- */
-class BufferOutputStream : public OutputStream
-{
-
-public:
-
- BufferOutputStream();
-
- virtual ~BufferOutputStream();
-
- virtual void close();
-
- virtual void flush();
-
- virtual int put(gunichar ch);
-
- virtual std::vector<unsigned char> &getBuffer()
- { return buffer; }
-
- virtual void clear()
- { buffer.clear(); }
-
-private:
-
- std::vector<unsigned char> buffer;
-
- bool closed;
-
-
-}; // class BufferOutputStream
-
-
-
-
-
-
-
-} //namespace io
-} //namespace dom
-} //namespace w3c
-} //namespace org
-
-
-
-#endif // SEEN_BUFFERSTREAM_H
diff --git a/src/dom/io/stringstream.cpp b/src/dom/io/stringstream.cpp
deleted file mode 100644
index ca058a575..000000000
--- a/src/dom/io/stringstream.cpp
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Phoebe DOM Implementation.
- *
- * This is a C++ approximation of the W3C DOM model, which follows
- * fairly closely the specifications in the various .idl files, copies of
- * which are provided for reference. Most important is this one:
- *
- * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
- *
- * Authors:
- * Bob Jamison
- *
- * Copyright (C) 2005 Bob Jamison
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * Our base String stream classes. We implement these to
- * be based on DOMString
- *
- */
-
-
-#include "stringstream.h"
-
-namespace org
-{
-namespace w3c
-{
-namespace dom
-{
-namespace io
-{
-
-
-
-//#########################################################################
-//# S T R I N G I N P U T S T R E A M
-//#########################################################################
-
-
-/**
- *
- */
-StringInputStream::StringInputStream(const DOMString &sourceString)
- : buffer((DOMString &)sourceString)
-{
- position = 0;
-}
-
-/**
- *
- */
-StringInputStream::~StringInputStream()
-{
-
-}
-
-/**
- * Returns the number of bytes that can be read (or skipped over) from
- * this input stream without blocking by the next caller of a method for
- * this input stream.
- */
-int StringInputStream::available()
-{
- return buffer.size() - position;
-}
-
-
-/**
- * Closes this input stream and releases any system resources
- * associated with the stream.
- */
-void StringInputStream::close()
-{
-}
-
-/**
- * Reads the next byte of data from the input stream. -1 if EOF
- */
-int StringInputStream::get()
-{
- if (position >= (int)buffer.size())
- return -1;
- int ch = (int) buffer[position++];
- return ch;
-}
-
-
-
-
-//#########################################################################
-//# S T R I N G O U T P U T S T R E A M
-//#########################################################################
-
-/**
- *
- */
-StringOutputStream::StringOutputStream()
-{
-}
-
-/**
- *
- */
-StringOutputStream::~StringOutputStream()
-{
-}
-
-/**
- * Closes this output stream and releases any system resources
- * associated with this stream.
- */
-void StringOutputStream::close()
-{
-}
-
-/**
- * Flushes this output stream and forces any buffered output
- * bytes to be written out.
- */
-void StringOutputStream::flush()
-{
- //nothing to do
-}
-
-/**
- * Writes the specified byte to this output stream.
- */
-int StringOutputStream::put(gunichar ch)
-{
- buffer.push_back(ch);
- return 1;
-}
-
-
-
-
-} //namespace io
-} //namespace dom
-} //namespace w3c
-} //namespace org
-
-//#########################################################################
-//# E N D O F F I L E
-//#########################################################################
diff --git a/src/dom/io/stringstream.h b/src/dom/io/stringstream.h
deleted file mode 100644
index 9ba24fc26..000000000
--- a/src/dom/io/stringstream.h
+++ /dev/null
@@ -1,131 +0,0 @@
-#ifndef SEEN_STRINGSTREAM_H
-#define SEEN_STRINGSTREAM_H
-/**
- * @file
- * Phoebe DOM Implementation.
- *
- * This is a C++ approximation of the W3C DOM model, which follows
- * fairly closely the specifications in the various .idl files, copies of
- * which are provided for reference. Most important is this one:
- *
- * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
- */
-/*
- * Authors:
- * Bob Jamison
- *
- * Copyright (C) 2006 Bob Jamison
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-#include "domstream.h"
-
-
-namespace org
-{
-namespace w3c
-{
-namespace dom
-{
-namespace io
-{
-
-
-//#########################################################################
-//# S T R I N G I N P U T S T R E A M
-//#########################################################################
-
-/**
- * This class is for reading character from a DOMString
- *
- */
-class StringInputStream : public InputStream
-{
-
-public:
-
- StringInputStream(const DOMString &sourceString);
-
- virtual ~StringInputStream();
-
- virtual int available();
-
- virtual void close();
-
- virtual int get();
-
-private:
-
- DOMString &buffer;
-
- long position;
-
-}; // class StringInputStream
-
-
-
-
-//#########################################################################
-//# S T R I N G O U T P U T S T R E A M
-//#########################################################################
-
-/**
- * This class is for sending a stream to a DOMString
- *
- */
-class StringOutputStream : public OutputStream
-{
-
-public:
-
- StringOutputStream();
-
- virtual ~StringOutputStream();
-
- virtual void close();
-
- virtual void flush();
-
- virtual int put(gunichar ch);
-
- virtual DOMString &getString()
- { return buffer; }
-
- virtual void clear()
- { buffer = ""; }
-
-private:
-
- DOMString buffer;
-
-
-}; // class StringOutputStream
-
-
-
-
-
-
-
-} //namespace io
-} //namespace dom
-} //namespace w3c
-} //namespace org
-
-
-
-#endif // SEEN_STRINGSTREAM_H
diff --git a/src/dom/io/uristream.cpp b/src/dom/io/uristream.cpp
deleted file mode 100644
index f6172d9e0..000000000
--- a/src/dom/io/uristream.cpp
+++ /dev/null
@@ -1,462 +0,0 @@
-/*
- * Phoebe DOM Implementation.
- *
- * This is a C++ approximation of the W3C DOM model, which follows
- * fairly closely the specifications in the various .idl files, copies of
- * which are provided for reference. Most important is this one:
- *
- * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
- *
- * Authors:
- * Bob Jamison
- *
- * Copyright (C) 2005-2008 Bob Jamison
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-
-#include "uristream.h"
-#include <cstdio>
-#include <string.h>
-
-
-namespace org
-{
-namespace w3c
-{
-namespace dom
-{
-namespace io
-{
-
-
-
-//#########################################################################
-//# U R I I N P U T S T R E A M / R E A D E R
-//#########################################################################
-
-
-/**
- *
- */
-UriInputStream::UriInputStream(const URI &source)
- throw (StreamException): uri((URI &)source)
-{
- init();
-}
-
-/**
- *
- */
-void UriInputStream::init() throw (StreamException)
-{
- //get information from uri
- scheme = uri.getScheme();
-
- switch (scheme)
- {
-
- case URI::SCHEME_FILE:
- {
- DOMString npath = uri.getNativePath();
- inf = fopen(npath.c_str(), "rb");
- if (!inf)
- {
- DOMString err = "UriInputStream cannot open file ";
- err.append(npath);
- throw StreamException(err);
- }
- break;
- }
-
- case URI::SCHEME_DATA:
- {
- data = uri.getPath();
- //printf("in data:'%s'\n", data.c_str());
- dataPos = 0;
- dataLen = uri.getPath().size();
- break;
- }
- }
-
- closed = false;
-}
-
-
-
-
-
-/**
- *
- */
-UriInputStream::~UriInputStream() throw(StreamException)
-{
- close();
-}
-
-/**
- * Returns the number of bytes that can be read (or skipped over) from
- * this input stream without blocking by the next caller of a method for
- * this input stream.
- */
-int UriInputStream::available() throw(StreamException)
-{
- return 0;
-}
-
-
-/**
- * Closes this input stream and releases any system resources
- * associated with the stream.
- */
-void UriInputStream::close() throw(StreamException)
-{
- if (closed)
- return;
-
- switch (scheme)
- {
-
- case URI::SCHEME_FILE:
- {
- if (!inf)
- return;
- fflush(inf);
- fclose(inf);
- inf=NULL;
- break;
- }
-
- case URI::SCHEME_DATA:
- {
- //do nothing
- break;
- }
- }//switch
-
- closed = true;
-}
-
-/**
- * Reads the next byte of data from the input stream. -1 if EOF
- */
-int UriInputStream::get() throw(StreamException)
-{
- int retVal = -1;
- if (closed)
- {
- return -1;
- }
-
- switch (scheme)
- {
-
- case URI::SCHEME_FILE:
- {
- if (!inf || feof(inf))
- {
- retVal = -1;
- }
- else
- {
- retVal = fgetc(inf);
- }
- break;
- }
-
- case URI::SCHEME_DATA:
- {
- if (dataPos >= dataLen)
- {
- retVal = -1;
- }
- else
- {
- retVal = data[dataPos++];
- }
- break;
- }
- }//switch
-
- return retVal;
-}
-
-
-
-
-
-
-/**
- *
- */
-UriReader::UriReader(const URI &uri) throw (StreamException)
-{
- inputStream = new UriInputStream(uri);
-}
-
-/**
- *
- */
-UriReader::~UriReader() throw (StreamException)
-{
- delete inputStream;
-}
-
-/**
- *
- */
-int UriReader::available() throw(StreamException)
-{
- return inputStream->available();
-}
-
-/**
- *
- */
-void UriReader::close() throw(StreamException)
-{
- inputStream->close();
-}
-
-/**
- *
- */
-gunichar UriReader::get() throw(StreamException)
-{
- //int ch = (int)inputStream->get();
- return inputStream->get();//ch;
-}
-
-
-//#########################################################################
-//# U R I O U T P U T S T R E A M / W R I T E R
-//#########################################################################
-
-/**
- *
- */
-UriOutputStream::UriOutputStream(const URI &destination)
- throw (StreamException): closed(false),
- ownsFile(true),
- outf(NULL),
- uri((URI &)destination)
-{
- init();
-}
-
-
-/**
- *
- */
-void UriOutputStream::init() throw(StreamException)
-{
- //get information from uri
- scheme = uri.getScheme();
-
- //printf("out schemestr:'%s' scheme:'%d'\n", schemestr, scheme);
- char *cpath = NULL;
-
- switch (scheme)
- {
-
- case URI::SCHEME_FILE:
- {
- cpath = (char *) uri.getNativePath().c_str();
- //printf("out path:'%s'\n", cpath);
- outf = fopen(cpath, "wb");
- if (!outf)
- {
- DOMString err = "UriOutputStream cannot open file ";
- err += cpath;
- throw StreamException(err);
- }
- break;
- }
-
- case URI::SCHEME_DATA:
- {
- data = "data:";
- break;
- }
-
- }//switch
-}
-
-/**
- *
- */
-UriOutputStream::~UriOutputStream() throw(StreamException)
-{
- close();
-}
-
-/**
- * Closes this output stream and releases any system resources
- * associated with this stream.
- */
-void UriOutputStream::close() throw(StreamException)
-{
- if (closed)
- return;
-
- switch (scheme)
- {
-
- case URI::SCHEME_FILE:
- {
- if (!outf)
- return;
- fflush(outf);
- if ( ownsFile )
- fclose(outf);
- outf=NULL;
- break;
- }
-
- case URI::SCHEME_DATA:
- {
- uri = URI(data);
- break;
- }
-
- }//switch
-
- closed = true;
-}
-
-
-/**
- * Flushes this output stream and forces any buffered output
- * bytes to be written out.
- */
-void UriOutputStream::flush() throw(StreamException)
-{
- if (closed)
- return;
-
- switch (scheme)
- {
-
- case URI::SCHEME_FILE:
- {
- if (!outf)
- return;
- fflush(outf);
- break;
- }
-
- case URI::SCHEME_DATA:
- {
- //nothing
- break;
- }
-
- }//switch
-
-}
-
-/**
- * Writes the specified byte to this output stream.
- */
-int UriOutputStream::put(gunichar ch) throw(StreamException)
-{
- if (closed)
- return -1;
-
- switch (scheme)
- {
-
- case URI::SCHEME_FILE:
- {
- if (!outf)
- return -1;
- unsigned char uch = (unsigned char)(ch & 0xff);
- fputc(uch, outf);
- //fwrite(uch, 1, 1, outf);
- break;
- }
-
- case URI::SCHEME_DATA:
- {
- data.push_back(ch);
- break;
- }
-
- }//switch
- return 1;
-}
-
-
-
-
-
-/**
- *
- */
-UriWriter::UriWriter(const URI &uri)
- throw (StreamException)
-{
- outputStream = new UriOutputStream(uri);
-}
-
-/**
- *
- */
-UriWriter::~UriWriter() throw (StreamException)
-{
- delete outputStream;
-}
-
-/**
- *
- */
-void UriWriter::close() throw(StreamException)
-{
- outputStream->close();
-}
-
-/**
- *
- */
-void UriWriter::flush() throw(StreamException)
-{
- outputStream->flush();
-}
-
-/**
- *
- */
-int UriWriter::put(gunichar ch) throw(StreamException)
-{
- if (outputStream->put(ch) < 0)
- return -1;
- return 1;
-}
-
-
-
-
-
-} //namespace io
-} //namespace dom
-} //namespace w3c
-} //namespace org
-
-
-//#########################################################################
-//# E N D O F F I L E
-//#########################################################################
diff --git a/src/dom/io/uristream.h b/src/dom/io/uristream.h
deleted file mode 100644
index 51227acc9..000000000
--- a/src/dom/io/uristream.h
+++ /dev/null
@@ -1,207 +0,0 @@
-#ifndef SEEN_URISTREAM_H
-#define SEEN_URISTREAM_H
-
-/**
- * Phoebe DOM Implementation.
- *
- * This is a C++ approximation of the W3C DOM model, which follows
- * fairly closely the specifications in the various .idl files, copies of
- * which are provided for reference. Most important is this one:
- *
- * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
- */
-/*
- * Authors:
- * Bob Jamison
- *
- * Copyright (C) 2005-2008 Bob Jamison
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * This should be the only way that we provide sources/sinks
- * to any input/output stream.
- *
- */
-
-
-#include "../uri.h"
-#include "domstream.h"
-
-
-namespace org
-{
-namespace w3c
-{
-namespace dom
-{
-namespace io
-{
-
-
-//#########################################################################
-//# U R I I N P U T S T R E A M / R E A D E R
-//#########################################################################
-
-/**
- * This class is for receiving a stream of data from a resource
- * defined in a URI
- */
-class UriInputStream : public InputStream
-{
-
-public:
-
- UriInputStream(const URI &source) throw(StreamException);
-
- virtual ~UriInputStream() throw(StreamException);
-
- virtual int available() throw(StreamException);
-
- virtual void close() throw(StreamException);
-
- virtual int get() throw(StreamException);
-
-private:
-
- void init() throw(StreamException);//common code called by constructor
-
- bool closed;
-
- FILE *inf; //for file: uris
- DOMString data; //for data: uris
- int dataPos; // current read position in data field
- int dataLen; // length of data buffer
-
- URI uri;
-
- int scheme;
-}; // class UriInputStream
-
-
-
-
-/**
- * This class is for receiving a stream of formatted data from a resource
- * defined in a URI
- */
-class UriReader : public Reader
-{
-
-public:
-
- UriReader(const URI &source) throw(StreamException);
-
- virtual ~UriReader() throw(StreamException);
-
- virtual int available() throw(StreamException);
-
- virtual void close() throw(StreamException);
-
- virtual gunichar get() throw(StreamException);
-
-private:
-
- UriInputStream *inputStream;
-
-}; // class UriReader
-
-
-
-//#########################################################################
-//# U R I O U T P U T S T R E A M / W R I T E R
-//#########################################################################
-
-/**
- * This class is for sending a stream to a destination resource
- * defined in a URI
- *
- */
-class UriOutputStream : public OutputStream
-{
-
-public:
-
- UriOutputStream(const URI &destination) throw(StreamException);
-
- virtual ~UriOutputStream() throw(StreamException);
-
- virtual void close() throw(StreamException);
-
- virtual void flush() throw(StreamException);
-
- virtual int put(gunichar ch) throw(StreamException);
-
-private:
-
- void init() throw(StreamException); //common code called by constructor
-
- bool closed;
- bool ownsFile;
-
- FILE *outf; //for file: uris
- DOMString data; //for data: uris
-
- URI uri;
-
- int scheme;
-}; // class UriOutputStream
-
-
-
-
-
-/**
- * This class is for sending a stream of formatted data to a resource
- * defined in a URI
- */
-class UriWriter : public Writer
-{
-
-public:
-
- UriWriter(const URI &source) throw(StreamException);
-
- virtual ~UriWriter() throw(StreamException);
-
- virtual void close() throw(StreamException);
-
- virtual void flush() throw(StreamException);
-
- virtual int put(gunichar ch) throw(StreamException);
-
-private:
-
- UriOutputStream *outputStream;
-
-}; // class UriReader
-
-
-
-
-
-
-} //namespace io
-} //namespace dom
-} //namespace w3c
-} //namespace org
-
-/*#########################################################################
-## E N D O F F I L E
-#########################################################################*/
-
-
-#endif // SEEN_URISTREAM_H