1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_packages_PackageStream_idl__
28#define __com_sun_star_packages_PackageStream_idl__
29
30
31#ifndef __com_sun_star_container_XNamed_idl__
32#include <com/sun/star/container/XNamed.idl>
33#endif
34
35#ifndef __com_sun_star_container_XChild_idl__
36#include <com/sun/star/container/XChild.idl>
37#endif
38
39#ifndef __com_sun_star_beans_XPropertySet_idl__
40#include <com/sun/star/beans/XPropertySet.idl>
41#endif
42
43#ifndef __com_sun_star_io_XActiveDataSink_idl__
44#include <com/sun/star/io/XActiveDataSink.idl>
45#endif
46
47//=============================================================================
48
49module com {  module sun {  module star {   module packages {
50
51//=============================================================================
52
53/**This service represents a stream contained within a Package. Instances of
54this class can only be constructed by the implementation of the Package
55service.
56*/
57published service PackageStream
58{
59	/**
60	This sets or gets the name of the Stream as contained within its parent
61	PackageFolder.
62	*/
63	interface com::sun::star::container::XNamed;
64	/**
65	getParent returns the PackageFolder that the PackageStream is in. This
66	may be the root PackageFolder. setParent moves a PackageStream.
67	*/
68	interface com::sun::star::container::XChild;
69	/**
70	getInputStream provides read access to the contents of this PackageStream.
71	If this PackageStream was a member of the Package when it was instantiated,
72	the XInputStream returned is a Reference to the stream of the whole Package,
73	with limits set on where it can seek to and read from. If the PackageStream
74	is a new addition to the package, then getInputStream returns a Reference
75	to the XInputStream which was specified with setInputStream.
76
77	setInputStream - provides a stream to the data contained in the PackageStream
78	this must be specified for new PackageStreams added to the Package. If this
79	is called more than once, it will replace the existing stream.
80	*/
81	interface com::sun::star::io::XActiveDataSink;
82	/**
83	This interface provides access to the properties of the package entry.
84	Currently, this supports three entries:
85
86	1. Size, describing the uncompressed size of PackageStream.
87	2. MediaType, a string describing the MIME type of the stream.
88	3. Compress, a boolean flag to specify whether or not to compress
89	   this PackageStream.
90	*/
91	interface com::sun::star::beans::XPropertySet;
92};
93}; }; }; };
94
95#endif
96