00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00012
00013 #ifndef _WSDL_H_
00014 #define _WSDL_H_
00015
00016 #include <QMetaObject>
00017 #include <QMetaMethod>
00018 #include <QString>
00019 #include <QMap>
00020 #include <QDomDocument>
00021
00022 #include "upnpexp.h"
00023 #include "upnp.h"
00024
00025 #include "servicehost.h"
00026
00029
00030
00031
00034
00035 class UPNP_PUBLIC Wsdl : public QDomDocument
00036 {
00037 protected:
00038 ServiceHost *m_pServiceHost;
00039 QMap<QString, bool> m_typesToInclude;
00040
00041 QDomElement m_oRoot;
00042 QDomElement m_oTypes;
00043 QDomElement m_oLastMsg;
00044 QDomElement m_oPortType;
00045 QDomElement m_oBindings;
00046 QDomElement m_oService;
00047
00048 protected:
00049
00050
00051 QDomElement CreateBindingOperation( MethodInfo &oInfo,
00052 const QString &sClassName );
00053
00054 QDomElement CreateMessage ( MethodInfo &oInfo,
00055 QString sMsgName,
00056 QString sTypeName );
00057
00058 QDomElement CreateMethodType ( MethodInfo &oInfo,
00059 QString sTypeName,
00060 bool bReturnType = false );
00061
00062 bool IsCustomType ( QString &sTypeName );
00063
00064 QString ReadClassInfo ( const QMetaObject *pMeta,
00065 const QString &sKey );
00066
00067
00068 public:
00069
00070 Wsdl( ServiceHost *pServiceHost );
00071
00072 bool GetWSDL( HTTPRequest *pRequest );
00073 };
00074
00075 #endif