Add internal copy of the Xerces net accessor for libcurl, to get SSL support.
[shibboleth/cpp-xmltooling.git] / xmltooling / util / CurlNetAccessor.h
1 /*\r
2  * Licensed to the Apache Software Foundation (ASF) under one or more\r
3  * contributor license agreements.  See the NOTICE file distributed with\r
4  * this work for additional information regarding copyright ownership.\r
5  * The ASF licenses this file to You under the Apache License, Version 2.0\r
6  * (the "License"); you may not use this file except in compliance with\r
7  * the License.  You may obtain a copy of the License at\r
8  * \r
9  *      http://www.apache.org/licenses/LICENSE-2.0\r
10  * \r
11  * Unless required by applicable law or agreed to in writing, software\r
12  * distributed under the License is distributed on an "AS IS" BASIS,\r
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14  * See the License for the specific language governing permissions and\r
15  * limitations under the License.\r
16  */\r
17 \r
18 /*\r
19  * $Id: CurlNetAccessor.hpp 527149 2007-04-10 14:56:39Z amassari $\r
20  */\r
21 \r
22 #if !defined(XERCESC_INCLUDE_GUARD_CURLNETACCESSOR_HPP)\r
23 #define XERCESC_INCLUDE_GUARD_CURLNETACCESSOR_HPP\r
24 \r
25 \r
26 #include <xercesc/util/XercesDefs.hpp>\r
27 #include <xercesc/util/XMLURL.hpp>\r
28 #include <xercesc/util/BinInputStream.hpp>\r
29 #include <xercesc/util/XMLNetAccessor.hpp>\r
30 \r
31 namespace xmltooling {\r
32 \r
33 //\r
34 // This class is the wrapper for the socket based code which\r
35 // provides the ability to fetch a resource specified using\r
36 // a HTTP or FTP URL.\r
37 //\r
38 \r
39 class XMLTOOL_DLLLOCAL CurlNetAccessor : public XMLNetAccessor\r
40 {\r
41 public :\r
42     CurlNetAccessor() {}\r
43     ~CurlNetAccessor() {}\r
44     \r
45     virtual BinInputStream* makeNew(const XMLURL&  urlSource, const XMLNetHTTPInfo* httpInfo=0);\r
46     virtual const XMLCh* getId() const;\r
47 \r
48 private :\r
49     static const XMLCh fgMyName[];\r
50 \r
51     CurlNetAccessor(const CurlNetAccessor&);\r
52     CurlNetAccessor& operator=(const CurlNetAccessor&);\r
53 \r
54 }; // CurlNetAccessor\r
55 \r
56 \r
57 inline const XMLCh* CurlNetAccessor::getId() const\r
58 {\r
59     return fgMyName;\r
60 }\r
61 \r
62 };\r
63 \r
64 #endif // CURLNETACCESSOR_HPP\r
65 \r
66 \r