1 /* 2 This file is part of KDE. 3 4 Copyright (c) 2005 Tobias Koenig <tokoe@kde.org> 5 6 This library is free software; you can redistribute it and/or 7 modify it under the terms of the GNU Library General Public 8 License as published by the Free Software Foundation; either 9 version 2 of the License, or (at your option) any later version. 10 11 This library is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 Library General Public License for more details. 15 16 You should have received a copy of the GNU Library General Public License 17 along with this library; see the file COPYING.LIB. If not, write to 18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 Boston, MA 02110-1301, USA. 20 */ 21 22 #ifndef KWSDL_DEFINITIONS_H 23 #define KWSDL_DEFINITIONS_H 24 25 #include <qdom.h> 26 #include <qurl.h> 27 #include <qxml.h> 28 29 #include <wsdl/binding.h> 30 #include <wsdl/import.h> 31 #include <wsdl/message.h> 32 #include <wsdl/porttype.h> 33 #include <wsdl/service.h> 34 #include <wsdl/type.h> 35 36 #include <kode_export.h> 37 38 class ParserContext; 39 40 namespace KWSDL 41 { 42 43 class KWSDL_EXPORT Definitions 44 { 45 public: 46 Definitions(); 47 ~Definitions(); 48 49 void setWantedService(const QString &name); 50 51 void setName(const QString &name); 52 QString name() const; 53 54 void setTargetNamespace(const QString &targetNamespace); 55 QString targetNamespace() const; 56 57 //void setBindings( const Binding::List &bindings ); 58 Binding::List bindings() const; 59 60 //void setImports( const Import::List &imports ); 61 //Import::List imports() const; 62 63 void setMessages(const Message::List &messages); 64 Message::List messages() const; 65 66 void setPortTypes(const PortType::List &portTypes); 67 PortType::List portTypes() const; 68 69 //void setService( const Service &service ); 70 Service::List services() const; 71 72 void setType(const Type &type); 73 Type type() const; 74 75 bool loadXML(ParserContext *context, const QDomElement &element); 76 //void saveXML( ParserContext *context, QDomDocument &document ) const; 77 78 void fixUpDefinitions(/*ParserContext *context, const QDomElement &element*/); 79 80 private: 81 void importDefinition(ParserContext *context, const QString &location); 82 83 Binding::List mBindings; 84 //Import::List mImports; 85 Message::List mMessages; 86 PortType::List mPortTypes; 87 Service::List mServices; 88 Type mType; 89 90 QString mTargetNamespace; 91 QString mName; 92 QString mWantedService; 93 }; 94 95 } 96 97 #endif // KWSDL_DEFINITIONS_H 98 99