

#if !defined(BINSOCKETINPUTSOURCE_HPP)
#define BINSOCKETINPUTSOURCE_HPP

#include <xercesc/sax/InputSource.hpp>
#include <xercesc/util/XMLURL.hpp>
#include <xercesc/util/NetAccessors/Socket/BinSocketInputStream.hpp>
XERCES_CPP_NAMESPACE_BEGIN

class BinInputStream;

/**
 *  This class is a derivative of the standard InputSource class. It provides
 *  for the parser access to data which is referenced via a local file path,
 *  as apposed to remote file or URL. This is the most efficacious mechanism
 *  by which local files can be parsed, since the parse knows that it refers
 *  to a local file and will make no other attempts to interpret the passed
 *  path.
 *
 *  The path provided can either be a fully qualified path or a relative path.
 *  If relative, it will be completed either relative to a passed base path
 *  or relative to the current working directory of the process.
 *
 *  As with all InputSource derivatives. The primary objective of an input
 *  source is to create an input stream via which the parser can spool in
 *  data from the referenced source.
 */
class XMLPARSER_EXPORT BinSocketInputSource : public InputSource
{
public :
    BinSocketInputStream* m_pRetStrm ;// the stream used for input.
    // -----------------------------------------------------------------------
    //  Constructors and Destructor
    // -----------------------------------------------------------------------

    /** @name Constructors */
    //@{



    BinSocketInputSource
    (
        const   XMLCh* const    hostAddress
    );
    //@}

    /** @name Destructor */
    //@{
    ~BinSocketInputSource();
    //@}


    // -----------------------------------------------------------------------
    //  Virtual input source interface
    // -----------------------------------------------------------------------

    /** @name Virtual methods */
    //@{

    /**
    * This method will return a binary input stream derivative that will
    * parse from the local file indicatedby the system id.
    *
    * @return A dynamically allocated binary input stream derivative that
    *         can parse from the file indicated by the system id.
    */
    virtual BinInputStream* makeStream() const;


    //@}
};

XERCES_CPP_NAMESPACE_END

#endif
