Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

urlc.h

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 1999  Carsten Winkelholz
00003 
00004 Address:  FGAN Forschungsgesellschaft fr Angewandte Naturwissenschaften e. V.
00005       Neuenahrer Str. 20
00006       D - 53343 Wachtberg
00007       
00008 Email:    winkelholz@fgan.de
00009 
00010 This program is free software; you can redistribute it and/or
00011 modify it under the terms of the GNU General Public License
00012 as published by the Free Software Foundation; either version 2
00013 of the License, or (at your option) any later version.
00014 
00015 This program is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU General Public License for more details.
00019 
00020 You should have received a copy of the GNU General Public License
00021 along with this program; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00023 */
00024 
00025 
00026 #ifndef URLC_H
00027 #define URLC_H
00028 
00029 #include <fstream>
00030 #include <stdio.h>
00031 
00032 #include "../oawconfig.h"
00033 
00034 OAW_BEGIN_NAMESPACE
00035 
00036 class OAW_DLLMAPPING UrlC
00037 {
00038 public:
00039   UrlC();
00040   UrlC(const char*);
00041   UrlC(const UrlC&);
00042   UrlC& operator = (const UrlC&);
00043   ~UrlC();
00044 
00045   void SetUrlAddress(const char*);
00046   const char* GetUrlAddress();
00047   
00048   void GetIFStream(std::ifstream&);
00049   void GetFStream(std::fstream&);
00050   FILE* GetFileHandle();
00051   
00052 #ifdef _WIN32
00053   void GetData(char*,unsigned long, unsigned long&);
00054   long GetContentSize(){return m_slContentSize;}
00055   const char* GetContentType(){return m_contentType;}
00056  
00057 
00058  private:
00059   void GetDataFromFile(char*,unsigned long,unsigned long&);
00060   void GetDataFromInet(char*,unsigned long,unsigned long&);
00061   void OpenUrl();
00062 #endif
00063 
00064  protected:
00065   char* m_urlAddress;
00066   char* m_localFilename;
00067   char* m_contentType;
00068   long m_slContentSize;
00069   void* m_hUrl;
00070   void* m_hFile;
00071   long m_ulBytesRead;
00072 };
00073 
00074 OAW_END_NAMESPACE
00075 
00076 #endif
00077 
00078 
00079 
00080 
00081 
00082 

Generated on Tue Jul 29 14:24:15 2003 for Open ActiveWrl by doxygen1.3-rc2