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

qservletrequest.h

00001 // -*- c++ -*-
00002 
00003 #ifndef QSERVLETREQUEST_H
00004 #define QSERVLETREQUEST_H
00005 
00006 #include <qmap.h>
00007 #include <qstring.h>
00008 #include <qstringlist.h>
00009 
00010 class QIODevice;
00011 class QTextStream;
00012 
00018 class QServletRequest
00019 {
00020 public:
00021    QServletRequest();
00022    virtual ~QServletRequest();
00023 
00024    //
00025    // Request content
00026    //
00027    
00029    QString characterEncoding() const { return enc; }
00030    void setCharacterEncoding( const QString &enc ) { this->enc = enc; }
00031 
00033    long contentLength() const { return len; }
00034    void setContentLength( long len ) { this->len = len; }
00035 
00037    QString contentType() const { return mime; }
00038    void setContentType( const QString &mime ) { this->mime = mime; }
00039 
00041    virtual QIODevice *inputDevice() { return 0; }
00042 
00044    virtual QTextStream *inputStream() { return 0; }
00045 
00046    //
00047    // Request parameters
00048    //
00049    
00051    QString parameter( const QString &name ) { return params[name]; }
00052 
00054    QStringList parameterNames() { return paramNames; }
00055 
00056    //
00057    // Request info
00058    //
00059    
00061    QString protocol() { return proto; }
00062    void setProtocol( const QString &protocol ) { proto = protocol; }
00063    
00065    QString remoteAddress() const { return remAddr; }
00066    
00068    void setRemoteAddress( const QString &addr ) { remAddr = addr; }
00069 
00071    QString remoteHost() const { return remHost; }
00072    
00074    void setRemoteHost( const QString &host ) { remHost = host; }
00075 
00077    QString serverName() const { return srvName; }
00078    
00080    void setServerName( const QString &name ) { srvName = name; }
00081 
00083    int serverPort() const { return srvPort; }
00084    
00086    void setServerPort( int port ) { srvPort = port; }
00087 
00088 private:
00089    QString enc;
00090    long len;
00091    QString mime;
00092 
00093    QString proto;
00094    QString remAddr;
00095    QString remHost;
00096    QString srvName;
00097    int srvPort;
00098 
00099    QStringList paramNames;
00100    QMap<QString, QString> params;
00101 };
00102 
00103 #endif // QSERVLETREQUEST_H
00104 
00105 // Local Variables:
00106 // c-basic-offset: 3
00107 // End:
00108 

Generated on Wed Apr 9 23:50:21 2003 for QXServlet by doxygen1.2.17