2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 #include <vcore/exception.h>
25 namespace ValidationCore {
30 VCORE_DECLARE_EXCEPTION_TYPE(ValidationCore::Exception, Base)
31 VCORE_DECLARE_EXCEPTION_TYPE(Base, InternalError)
32 VCORE_DECLARE_EXCEPTION_TYPE(Base, NotFinalized)
33 VCORE_DECLARE_EXCEPTION_TYPE(Base, AlreadyFinalized)
36 void append(const std::string &data);
43 Base64Encoder(const Base64Encoder &);
44 const Base64Encoder &operator=(const Base64Encoder &);
55 VCORE_DECLARE_EXCEPTION_TYPE(ValidationCore::Exception, Base)
56 VCORE_DECLARE_EXCEPTION_TYPE(Base, InternalError)
57 VCORE_DECLARE_EXCEPTION_TYPE(Base, NotFinalized)
58 VCORE_DECLARE_EXCEPTION_TYPE(Base, AlreadyFinalized)
61 void append(const std::string &data);
64 * Function will return false when BIO_read fails
65 * (for example: when string was not in base64 format).
68 std::string get() const;
73 Base64Decoder(const Base64Decoder &);
74 const Base64Decoder &operator=(const Base64Decoder &);
80 } // namespace ValidationCore