khtml Library API Documentation

xmlhttprequest.h

00001 // -*- c-basic-offset: 4  -*-
00002 /*
00003  *  This file is part of the KDE libraries
00004  *  Copyright (C) 2003 Apple Computer, Inc.
00005  *
00006  *  This library is free software; you can redistribute it and/or
00007  *  modify it under the terms of the GNU Lesser General Public
00008  *  License as published by the Free Software Foundation; either
00009  *  version 2 of the License, or (at your option) any later version.
00010  *
00011  *  This library is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  *  Lesser General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU Lesser General Public
00017  *  License along with this library; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 
00021 #ifndef _XMLHTTPREQUEST_H_
00022 #define _XMLHTTPREQUEST_H_
00023 
00024 #include "ecma/kjs_binding.h"
00025 #include "ecma/kjs_dom.h"
00026 #include "misc/loader.h"
00027 
00028 namespace KJS {
00029 
00030   class XMLHttpRequestConstructorImp : public ObjectImp {
00031   public:
00032     XMLHttpRequestConstructorImp(ExecState *exec, const DOM::Document &d);
00033     virtual bool implementsConstruct() const;
00034     virtual Object construct(ExecState *exec, const List &args);
00035   private:
00036     DOM::Document doc;
00037   };
00038 
00039   class XMLHttpRequest : public DOMObject, public khtml::CachedObjectClient {
00040   public:
00041     XMLHttpRequest(ExecState *, const DOM::Document &d);
00042     ~XMLHttpRequest();
00043     virtual Value tryGet(ExecState *exec, const Identifier &propertyName) const;
00044     Value getValueProperty(ExecState *exec, int token) const;
00045     virtual void tryPut(ExecState *exec, const Identifier &propertyName, const Value& value, int attr = None);
00046     void putValueProperty(ExecState *exec, int token, const Value& value, int /*attr*/);
00047     void notifyFinished(khtml::CachedObject *);
00048     virtual bool toBoolean(ExecState *) const { return true; }
00049     virtual const ClassInfo* classInfo() const { return &info; }
00050     static const ClassInfo info;
00051     enum { Onreadystatechange, ReadyState, ResponseText, ResponseXML, Status, StatusText, Abort, GetAllResponseHeaders, GetResponseHeader, Open, Send, SetRequestHeader };
00052   private:
00053   };
00054 
00055 } // namespace
00056 
00057 #endif
KDE Logo
This file is part of the documentation for khtml Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Apr 22 14:26:09 2004 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2003