Fix linefeeds
[shibboleth/cpp-opensaml.git] / saml / binding / URLEncoder.h
index 2585d6d..27e9540 100644 (file)
@@ -1,74 +1,74 @@
-/*\r
- *  Copyright 2001-2006 Internet2\r
- * \r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-/**\r
- * @file saml/binding/URLEncoder.h\r
- * \r
- * Interface to a URL-encoding mechanism along with a\r
- * default implementation.\r
- */\r
-\r
-#ifndef __saml_urlenc_h__\r
-#define __saml_urlenc_h__\r
-\r
-#include <saml/base.h>\r
-\r
-namespace opensaml {\r
-    /**\r
-     * Interface to a URL-encoding mechanism along with a default implementation.\r
-     * \r
-     * Since URL-encoding is not canonical, it's important that the same\r
-     * encoder is used during some library operations and the calling code.\r
-     * Applications can supply an alternative implementation to the library\r
-     * if required.\r
-     */\r
-    class SAML_API URLEncoder {\r
-        MAKE_NONCOPYABLE(URLEncoder);\r
-    public:\r
-        URLEncoder() {}\r
-        virtual ~URLEncoder() {}\r
-        \r
-        /**\r
-         * Produce a URL-safe but equivalent version of the input string.\r
-         * \r
-         * @param s input string to encode\r
-         * @return a string object containing the result of encoding the input\r
-         */\r
-        virtual std::string encode(const char* s) const;\r
-        \r
-        /**\r
-         * Perform an in-place decoding operation on the input string.\r
-         * The resulting string will be NULL-terminated.\r
-         * \r
-         * @param s input string to decode in a writable buffer\r
-         */\r
-        virtual void decode(char* s) const;\r
-        \r
-    protected:\r
-        /**\r
-         * Returns true iff the input character requires encoding.\r
-         * \r
-         * @param ch    the character to check\r
-         * @return  true iff the character should be encoded \r
-         */\r
-        virtual bool isBad(char ch) const {\r
-            static char badchars[]="=&/?:\"\\+<>#%{}|^~[]`;@";\r
-            return (strchr(badchars,ch) || ch<=0x20 || ch>=0x7F);\r
-        }\r
-    };\r
-};\r
-\r
-#endif /* __saml_urlenc_h__ */\r
+/*
+ *  Copyright 2001-2006 Internet2
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file saml/binding/URLEncoder.h
+ * 
+ * Interface to a URL-encoding mechanism along with a
+ * default implementation.
+ */
+
+#ifndef __saml_urlenc_h__
+#define __saml_urlenc_h__
+
+#include <saml/base.h>
+
+namespace opensaml {
+    /**
+     * Interface to a URL-encoding mechanism along with a default implementation.
+     * 
+     * Since URL-encoding is not canonical, it's important that the same
+     * encoder is used during some library operations and the calling code.
+     * Applications can supply an alternative implementation to the library
+     * if required.
+     */
+    class SAML_API URLEncoder {
+        MAKE_NONCOPYABLE(URLEncoder);
+    public:
+        URLEncoder() {}
+        virtual ~URLEncoder() {}
+        
+        /**
+         * Produce a URL-safe but equivalent version of the input string.
+         * 
+         * @param s input string to encode
+         * @return a string object containing the result of encoding the input
+         */
+        virtual std::string encode(const char* s) const;
+        
+        /**
+         * Perform an in-place decoding operation on the input string.
+         * The resulting string will be NULL-terminated.
+         * 
+         * @param s input string to decode in a writable buffer
+         */
+        virtual void decode(char* s) const;
+        
+    protected:
+        /**
+         * Returns true iff the input character requires encoding.
+         * 
+         * @param ch    the character to check
+         * @return  true iff the character should be encoded 
+         */
+        virtual bool isBad(char ch) const {
+            static char badchars[]="=&/?:\"\\+<>#%{}|^~[]`;@";
+            return (strchr(badchars,ch) || ch<=0x20 || ch>=0x7F);
+        }
+    };
+};
+
+#endif /* __saml_urlenc_h__ */