1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: binarywriter.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef CONFIGMGR_BINARYWRITER_HXX
31 #define CONFIGMGR_BINARYWRITER_HXX
33 #include <rtl/ustring.hxx>
34 #include <com/sun/star/uno/Any.hxx>
35 #include <com/sun/star/io/IOException.hpp>
36 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
37 #include <com/sun/star/io/XDataOutputStream.hpp>
42 // -----------------------------------------------------------------------------
45 namespace css
= com::sun::star
;
47 namespace io
= css::io
;
48 namespace uno
= css::uno
;
49 namespace lang
= css::lang
;
50 // -----------------------------------------------------------------------------
54 rtl::OUString m_aFileURL
;
56 uno::Reference
<lang::XMultiServiceFactory
> m_xServiceProvider
;
57 uno::Reference
< io::XDataOutputStream
> m_xDataOutputStream
;
60 BinaryWriter(rtl::OUString
const& m_aFilename
, uno::Reference
<lang::XMultiServiceFactory
> const& _rxServiceProvider
);
63 bool open() SAL_THROW( (io::IOException
, uno::RuntimeException
) );
64 void close() SAL_THROW( (io::IOException
, uno::RuntimeException
) );
67 void write(sal_Bool _bValue
) SAL_THROW( (io::IOException
, uno::RuntimeException
) );
68 void write(sal_Int8 _nValue
) SAL_THROW( (io::IOException
, uno::RuntimeException
) );
69 void write(sal_Int16 _nValue
) SAL_THROW( (io::IOException
, uno::RuntimeException
) );
70 void write(sal_Int32 _nValue
) SAL_THROW( (io::IOException
, uno::RuntimeException
) );
71 void write(sal_Int64 _nValue
) SAL_THROW( (io::IOException
, uno::RuntimeException
) );
72 void write(double _nValue
) SAL_THROW( (io::IOException
, uno::RuntimeException
) );
73 void write(rtl::OUString
const& _aStr
) SAL_THROW( (io::IOException
, uno::RuntimeException
) );
77 } // namespace configmgr