Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

httpfactory.h

Go to the documentation of this file.
00001 /*
00002 Opie-uBrowser.  a very small web browser, using on QTextBrowser for html display/parsing
00003 Copyright (C) 2002 Thomas Stephens
00004 
00005 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
00006 License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later
00007 version.
00008 
00009 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
00010 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
00011 Public License for more details.
00012 
00013 You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
00014 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00015 */
00016 
00017 #include <qmime.h>
00018 //#include <qsocket.h>
00019 #include <qstring.h>
00020 #include <qdragobject.h>
00021 #include <qtextbrowser.h>
00022 #include <qmessagebox.h>
00023 
00024 #include <stdio.h>
00025 
00026 #include <sys/types.h>
00027 #include <sys/socket.h>
00028 #include <unistd.h>
00029 #include <netinet/in.h>
00030 #include <netdb.h>
00031 #include <arpa/inet.h>
00032 
00033 //#include "httpcomm.h"
00034 
00035 class HttpFactory : public QMimeSourceFactory
00036 {
00037 public:
00038         HttpFactory(QTextBrowser *newBrowser);
00039         const QMimeSource * data(const QString &abs_name) const;
00040         const QMimeSource * data(const QString &abs_or_rel_name, const QString & context) const;
00041 private:
00042 //      QSocket *socket;
00043 //      HttpComm *comm;
00044         QTextDrag *text;
00045         QImageDrag *image;
00046         QTextBrowser *browser;
00047         
00048         const QByteArray processResponse( int sockfd, bool &isText) const;
00049         const QByteArray recieveNormal( int sockfd, int dataLen ) const;
00050         const QByteArray recieveChunked( int sockfd ) const;
00051 };

Generated on Sat Nov 5 16:18:18 2005 for OPIE by  doxygen 1.4.2