diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:54:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:54:39 +0000 |
commit | 267c6f2ac71f92999e969232431ba04678e7437e (patch) | |
tree | 358c9467650e1d0a1d7227a21dac2e3d08b622b2 /offapi/com/sun/star/embed/XStorageRawAccess.idl | |
parent | Initial commit. (diff) | |
download | libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.tar.xz libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.zip |
Adding upstream version 4:24.2.0.upstream/4%24.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'offapi/com/sun/star/embed/XStorageRawAccess.idl')
-rw-r--r-- | offapi/com/sun/star/embed/XStorageRawAccess.idl | 171 |
1 files changed, 171 insertions, 0 deletions
diff --git a/offapi/com/sun/star/embed/XStorageRawAccess.idl b/offapi/com/sun/star/embed/XStorageRawAccess.idl new file mode 100644 index 0000000000..e59e18e62b --- /dev/null +++ b/offapi/com/sun/star/embed/XStorageRawAccess.idl @@ -0,0 +1,171 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . + */ + + + + module com { module sun { module star { module embed { + +/** This interface represents main storage functionality. + */ +published interface XStorageRawAccess +{ + /** allows to get a plain raw stream representing a package stream. + + <p> + This method returns a stream from the package as it is stored there, + without any decompression/description and etc. This method can be + helpful to check file consistency, for example by signing. + </p> + + @returns + the raw representation of encrypted stream with all the data + required to copy the stream without information loss + + @param sStreamName + the name of the substream that should be open + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + + @throws ::com::sun::star::container::NoSuchElementException + there is no element with specified name + + @throws ::com::sun::star::io::IOException + in case of io errors during stream opening + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + */ + ::com::sun::star::io::XInputStream getPlainRawStreamElement( + [in] string sStreamName ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to get a raw stream representing encrypted stream with header. + + <p> + This method allows to transport encrypted streams without decryption. + Mainly this method is introduced to allow to copy one encrypted + storage stream to another without decryption. It is not recommended to + use this method outside of storage implementation since different + storages implementation could have different encryption format. If the + method is used outside of storage implementation the user code is + responsible to get sure that the raw format of source and target + storages is the same. + </p> + + <p> + The difference of this method from the previous one is that it handles + only encrypted streams. The contents of returned by these methods + streams can differ for the same entry, since this method can add + additional data into the stream to allow successful insertion. + </p> + + @param sStreamName + the name of the substream that should be open + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + + @throws ::com::sun::star::packages::NoEncryptionException + the stream is not an encrypted one + + @throws ::com::sun::star::container::NoSuchElementException + there is no element with specified name + + @throws ::com::sun::star::io::IOException + in case of io errors during stream opening + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + */ + ::com::sun::star::io::XInputStream getRawEncrStreamElement( + [in] string sStreamName ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::packages::NoEncryptionException, + ::com::sun::star::container::NoSuchElementException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); + + /** allows to insert a raw stream representing encrypted stream with + header. + + <p> + This method allows to insert a stream retrieved by + XStorageRawAccess::getRawEncrStreamElement() into a + storage. + </p> + + <p> + This method allows to transport encrypted streams without decryption. + Mainly this method is introduced to allow to copy one encrypted + storage stream to another without decryption. It is not recommended to + use this method outside of storage implementation since different + storages implementation could have different encryption format. + </p> + + @param sStreamName + the name of the substream that should be open + + @param xInStream + a raw stream representing encrypted stream + + @throws ::com::sun::star::embed::InvalidStorageException + this storage is in invalid state for any reason + + @throws ::com::sun::star::lang::IllegalArgumentException + one of provided arguments is illegal + + @throws ::com::sun::star::packages::NoRawFormatException + the stream is not one of raw package stream format + + @throws ::com::sun::star::container::ElementExistException + an element with specified name already exists + + @throws ::com::sun::star::io::IOException + in case of io errors during stream opening + + @throws ::com::sun::star::embed::StorageWrappedTargetException + wraps other exceptions + */ + void insertRawEncrStreamElement( + [in] string sStreamName, + [in] ::com::sun::star::io::XInputStream xInStream ) + raises( ::com::sun::star::embed::InvalidStorageException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::packages::NoRawFormatException, + ::com::sun::star::container::ElementExistException, + ::com::sun::star::io::IOException, + ::com::sun::star::embed::StorageWrappedTargetException ); +}; + + +}; }; }; }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |