/*! 
* 
* Copyright(c) 2010 Apogee Instruments, Inc. 
* \class LinuxEthernetIO 
* \brief this class uses libcurl to perform IO on the Linux OS 
* 
*/ 


#ifndef LINUXETHERNETIO_INCLUDE_H__ 
#define LINUXETHERNETIO_INCLUDE_H__ 

#include "curl/curl.h"
#include "IEthernetIO.h"

class LinuxEthernetIO : public IEthernetIO
{ 
    public: 
        LinuxEthernetIO();
        virtual ~LinuxEthernetIO(); 

        void HttpGet( const std::string & Url,
            std::string & data);

        void HttpGet( const std::string & Url, 
            std::vector<unsigned short> & data,
            int numBytesExpected);

    private:
        void CurlSetupStrWrite(const std::string & url);
        std::string ExecuteStr();

        void CurlSetupVectWrite(const std::string & url);
        std::vector<unsigned char> ExecuteVect();

        CURL * m_curlHandle;
}; 

#endif 
