update emoji autocorrect entries from po-files
[LibreOffice.git] / binaryurp / source / unmarshal.hxx
blob3c523aa3f637b6efe6bb6b7795ead2a9aaac389b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_BINARYURP_SOURCE_UNMARSHAL_HXX
21 #define INCLUDED_BINARYURP_SOURCE_UNMARSHAL_HXX
23 #include "sal/config.h"
25 #include <vector>
27 #include "com/sun/star/uno/Sequence.hxx"
28 #include "rtl/ref.hxx"
29 #include "sal/types.h"
30 #include "typelib/typedescription.hxx"
32 namespace binaryurp {
33 class BinaryAny;
34 class Bridge;
35 struct ReaderState;
37 namespace com { namespace sun { namespace star { namespace uno {
38 class TypeDescription;
39 } } } }
41 namespace binaryurp {
43 class Unmarshal {
44 public:
45 Unmarshal(
46 rtl::Reference< Bridge > const & bridge, ReaderState & state,
47 com::sun::star::uno::Sequence< sal_Int8 > const & buffer);
49 ~Unmarshal();
51 sal_uInt8 read8();
53 sal_uInt16 read16();
55 sal_uInt32 read32();
57 com::sun::star::uno::TypeDescription readType();
59 OUString readOid();
61 rtl::ByteSequence readTid();
63 BinaryAny readValue(com::sun::star::uno::TypeDescription const & type);
65 void done() const;
67 private:
68 Unmarshal(const Unmarshal&) SAL_DELETED_FUNCTION;
69 Unmarshal& operator=(const Unmarshal&) SAL_DELETED_FUNCTION;
71 void check(sal_Int32 size) const;
73 sal_uInt32 readCompressed();
75 sal_uInt16 readCacheIndex();
77 sal_uInt64 read64();
79 OUString readString();
81 BinaryAny readSequence(com::sun::star::uno::TypeDescription const & type);
83 void readMemberValues(
84 com::sun::star::uno::TypeDescription const & type,
85 std::vector< BinaryAny > * values);
87 rtl::Reference< Bridge > bridge_;
88 ReaderState & state_;
89 com::sun::star::uno::Sequence< sal_Int8 > buffer_;
90 sal_uInt8 const * data_;
91 sal_uInt8 const * end_;
96 #endif
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */