LibreOffice
LibreOffice 6.2 SDK API Reference
Exported Interfaces | Public Attributes | List of all members
StorageStream Service Referencepublished

This is a service that represents a stream that can be provided by XStorage::openStreamElement() call implemented by Storage service. More...

import"StorageStream.idl";

Inheritance diagram for StorageStream:
XStream XComponent XPropertySet XSeekable XEncryptionProtectedSource XInterface XInterface XInterface XInterface XInterface

Exported Interfaces

interface ::com::sun::star::io::XStream
 allows to get access to com::sun::star::io::XInputStream and com::sun::star::io::XOutputStream implementations. More...
 
interface ::com::sun::star::lang::XComponent
 allows to control object lifetime. More...
 
interface ::com::sun::star::beans::XPropertySet
 allows to get access to stream properties. More...
 
interface ::com::sun::star::io::XSeekable
 allows to seek to a specified position within the stream. More...
 
interface ::com::sun::star::embed::XEncryptionProtectedSource
 allows to set password to the stream. More...
 

Public Attributes

string MediaType
 allows to get and set media type of the stream. More...
 
boolean IsCompressed
 specifies if the stream should be compressed next time it is stored. More...
 
boolean IsEncrypted
 allows to detect if the stream is encrypted. More...
 
boolean UseCommonStoragePasswordEncryption
 specifies whether the stream will become encrypted next time the common storage password holder is committed. More...
 
long Size
 allows to detect size of the stream in bytes. More...
 

Additional Inherited Members

- Public Member Functions inherited from XStream
XInputStream getInputStream ()
 
XOutputStream getOutputStream ()
 
- Public Member Functions inherited from XInterface
any queryInterface ([in] type aType)
 queries for a new interface to an existing UNO object. More...
 
void acquire ()
 increases the reference counter by one. More...
 
void release ()
 decreases the reference counter by one. More...
 
- Public Member Functions inherited from XComponent
void dispose ()
 The owner of an object calls this method to explicitly free all resources kept by this object and thus break cyclic references. More...
 
void addEventListener ([in] XEventListener xListener)
 adds an event listener to the object. More...
 
void removeEventListener ([in] XEventListener aListener)
 removes an event listener from the listener list. More...
 
- Public Member Functions inherited from XPropertySet
com::sun::star::beans::XPropertySetInfo getPropertySetInfo ()
 
void setPropertyValue ([in] string aPropertyName, [in] any aValue) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::beans::PropertyVetoException, com::sun::star::lang::IllegalArgumentException, com::sun::star::lang::WrappedTargetException )
 sets the value of the property with the specified name. More...
 
any getPropertyValue ([in] string PropertyName) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
 
void addPropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener xListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
 adds an XPropertyChangeListener to the specified property. More...
 
void removePropertyChangeListener ([in] string aPropertyName, [in] com::sun::star::beans::XPropertyChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
 removes an XPropertyChangeListener from the listener list. More...
 
void addVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
 adds an XVetoableChangeListener to the specified property with the name PropertyName. More...
 
void removeVetoableChangeListener ([in] string PropertyName, [in] com::sun::star::beans::XVetoableChangeListener aListener) raises ( com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException )
 removes an XVetoableChangeListener from the listener list. More...
 
- Protected Member Functions inherited from XSeekable
void seek ([in] hyper location) raises ( com::sun::star::lang::IllegalArgumentException, com::sun::star::io::IOException )
 changes the seek pointer to a new location relative to the beginning of the stream. More...
 
hyper getPosition () raises ( com::sun::star::io::IOException )
 returns the current offset of the stream. More...
 
hyper getLength () raises ( com::sun::star::io::IOException )
 returns the length of the stream. More...
 
- Protected Member Functions inherited from XEncryptionProtectedSource
void setEncryptionPassword ([in] string sPassword) raises ( ::com::sun::star::io::IOException )
 sets a password for the object. More...
 
void removeEncryption () raises ( ::com::sun::star::io::IOException )
 removes encryption from the object. More...
 

Detailed Description

This is a service that represents a stream that can be provided by XStorage::openStreamElement() call implemented by Storage service.

In case a stream is open with read-write access only one instance of the stream can exist.

Exported Interfaces

allows to get access to stream properties.

allows to set password to the stream.

This interface must be supported by a stream with read-write access to allow to set a password that should be used next time the stream is stored.

If the password is set or changed by this interface and the stream is closed the new password should be used to get access to the stream next time.

interface ::com::sun::star::io::XSeekable
optional

allows to seek to a specified position within the stream.

This interface must be supported in case either seekable readonly or read-write access is requested.

allows to get access to com::sun::star::io::XInputStream and com::sun::star::io::XOutputStream implementations.

In case the storage stream is open readonly the returned reference to com::sun::star::io::XOutputStream will be empty.

allows to control object lifetime.

A storage stream is created by a storage and has a restrictions depending on the mode the stream is opened in.

In case a stream is opened with read-write access only one instance of the stream can exist. It means that the stream can not be reopened even for readonly access until the read-write instance is disposed. From the other side it is possible to open multiple streams for readonly access. But because of the rule mentioned above it will not be possible to open the stream for read-write access until all the readonly instances are disposed.

The stream must be disposed by com::sun::star::lang::XComponent::dispose() call or by explicit closing of input and output ( if provided ) streams implementations with com::sun::star::io::XInputStream::closeInput() and com::sun::star::io::XOutputStream::closeOutput() calls.

When a stream is disposed all the changes that were done for it are automatically flashed, so that they becomes visible from parent storage. It is also possible to flash the stream explicitly.

In case parent storage is disposed the stream is disposed automatically.

In case a stream is disposed any call to its methods should result in com::sun::star::lang::DisposedException.

Member Data Documentation

boolean IsCompressed
property

specifies if the stream should be compressed next time it is stored.

boolean IsEncrypted
propertyreadonly

allows to detect if the stream is encrypted.

The property value TRUE means that the stream is currently encrypted. FALSE - the stream is not encrypted.

If somebody sets a password explicitly by using XEncryptionProtectedSource interface the value is automatically set to TRUE. If the interface is used to remove the encryption - the value is automatically set to FALSE.

string MediaType
property

allows to get and set media type of the stream.

long Size
propertyreadonly

allows to detect size of the stream in bytes.

boolean UseCommonStoragePasswordEncryption
property

specifies whether the stream will become encrypted next time the common storage password holder is committed.

The property value TRUE means that the stream will become encrypted after the closest storage in the parent hierarchy, that has common storage password, is committed. FALSE - the stream will not react to commit of such a storage.

In case stream is not encrypted and the property is set to TRUE, the stream will stay non-encrypted until the closest storage in the parent hierarchy, that has common storage password, is committed. On the commit the stream will be encrypted with the common storage password. If there is no such storage in the hierarchy the stream will not be encrypted at all. Thus this property must be set very carefully.

If somebody sets a password explicitly by using XEncryptionProtectedSource interface the value is automatically set to FALSE and the stream becomes encrypted with specified password immediately.

In case stream is encrypted one and the value is set to TRUE the stream becomes non-encrypted until the common storage password holder is committed. The data about previously set password ( if any ) will be removed and the stream can be accessed as non-encrypted stream.


The documentation for this service was generated from the following file: