uri.h
Go to the documentation of this file.
1 /*
2  * Copyright 2006-2008 The FLWOR Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef URI_H
18 #define URI_H
19 
20 #include <zorba/config.h>
21 #include <zorba/api_shared_types.h>
22 
23 namespace zorba {
24 
25 /**
26  * @brief A helper class to do uri conversions
27  *
28  */
29 class ZORBA_DLL_PUBLIC URIHelper
30 {
31 public:
32  /**
33  * @brief Decodes a file:// URI to a filesystem path in native form.
34  *
35  * @arg uri A file:// URI.
36  * @returns The filesystem path.
37  */
38  static String decodeFileURI(const String& uri);
39  /**
40  * @brief Encodes a native filesystem path to a file:// URI.
41  *
42  * @arg filepath The filesystem path.
43  * @returns The encoded URI of the file.
44  */
45  static String encodeFileURI(const String& filepath);
46 };
47 
48 } //namespace zorba
49 
50 #endif // URI_H
51 /* vim:set et sw=2 ts=2: */
blog comments powered by Disqus