00001
00030 #ifndef INC_SOA_WMSCONNECTION_H
00031 #define INC_SOA_WMSCONNECTION_H
00032
00033 #ifndef INC_MI32_MISTRING_H
00034 #include <mi32/mistring.h>
00035 #endif
00036
00037 namespace SPATREF {
00038 class COORDREFSYS;
00039 }
00040 namespace SPATMOD {
00041 namespace IMAGE {
00042 class SOURCE_HTML;
00043 }
00044 }
00045 struct COLOR;
00046 class MIMETYPE;
00047
00048 namespace SOA {
00049 namespace WMS {
00050
00051 class CAPABILITIES;
00052
00053
00054
00057 class CONNECTION {
00058 public:
00059
00061 CONNECTION ();
00062
00064 CONNECTION (const CONNECTION&);
00065
00067 ~CONNECTION ();
00068
00070 CONNECTION& operator= (const CONNECTION&);
00071
00073 ERRVALUE BuildGetFeatureInfoRequest (
00074 MISTRING& RequestURL,
00075 const MISTRINGLIST& LayerNameList,
00076 const MISTRINGLIST& LayerStyleList,
00077 const SPATREF::COORDREFSYS& CoordRefSys,
00078 const DRECT2D& BoundingBox,
00079 INT32 TgtWidth,
00080 INT32 TgtHeight,
00081 const MIMETYPE& ImageFormat,
00082 const MISTRINGLIST& QueryLayerList,
00083 const MIMETYPE& InfoFormat,
00084 INT32 PixelColumn,
00085 INT32 PixelRow,
00086 INT32 FeatureCount = 1
00087 ) const;
00088
00090 ERRVALUE BuildGetMapRequest (
00091 MISTRING& RequestURL,
00092 const MISTRINGLIST& LayerNameList,
00093 const MISTRINGLIST& LayerStyleList,
00094 const SPATREF::COORDREFSYS& CoordRefSys,
00095 const DRECT2D& BoundingBox,
00096 INT32 TgtWidth,
00097 INT32 TgtHeight,
00098 const MIMETYPE& Format,
00099 const COLOR *pColorBG = 0
00100 ) const;
00101
00104 ERRVALUE DoGetCapabilities (
00105 const MISTRING& ServerURL,
00106 bool synchronous,
00107 MDLGPARENT dlgparent = 0
00108 );
00109
00112 ERRVALUE DoGetCapabilities (
00113 bool synchronous,
00114 MDLGPARENT dlgparent = 0
00115 );
00116
00120 const WMS::CAPABILITIES& GetCapabilities (
00121 ) const;
00122
00124 const MISTRING& GetServerURL (
00125 ) const { return (m_ServerURL); }
00126
00127 const MISTRING& GetUsername (
00128 ) const {
00129 return m_Username;
00130 }
00131
00132 const MISTRING& GetPassword (
00133 ) const {
00134 return m_Password;
00135 }
00136
00138 bool HasCapabilities (
00139 ) const { return (m_HasCapabilities); }
00140
00143 void SetServerURL (
00144 const MISTRING& ServerURL
00145 );
00146 void SetDoAuthDialog (
00147 const bool doAuth
00148 ){ m_DoAuthorization = doAuth; }
00149
00150
00151
00152 private:
00153 #ifndef GENERATING_DOXYGEN_OUTPUT
00154 MISTRING m_ServerURL;
00155 WMS::CAPABILITIES *m_pCapabilities;
00156 bool m_HasCapabilities;
00157 bool m_DoAuthorization;
00158 MISTRING m_Username;
00159 MISTRING m_Password;
00160
00161 static void AppendNameListRequest (
00162 MISTRING& RequestURL,
00163 const MISTRINGLIST& NameList
00164 );
00165
00166 ERRVALUE AppendGetMapRequestPart (
00167 MISTRING& RequestURL,
00168 const MISTRINGLIST& LayerNameList,
00169 const MISTRINGLIST& LayerStyleList,
00170 const SPATREF::COORDREFSYS& CoordRefSys,
00171 const DRECT2D& BoundingBox,
00172 INT32 TgtWidth,
00173 INT32 TgtHeight,
00174 const MIMETYPE& Format,
00175 const COLOR *pColorBG = 0
00176 ) const;
00177
00178 void InitRequest (
00179 MISTRING& RequestURL
00180 ) const;
00181
00182 #endif
00183 };
00184
00185
00186
00187 }
00188 }
00189
00190 #endif // INC_SOA_WMSCONNECTION_H