1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_ucb_PackageFolderContent_idl__
24#define __com_sun_star_ucb_PackageFolderContent_idl__
25
26#ifndef __com_sun_star_lang_XComponent_idl__
27#include <com/sun/star/lang/XComponent.idl>
28#endif
29
30#ifndef __com_sun_star_ucb_XContent_idl__
31#include <com/sun/star/ucb/XContent.idl>
32#endif
33
34#ifndef __com_sun_star_ucb_XCommandProcessor_idl__
35#include <com/sun/star/ucb/XCommandProcessor.idl>
36#endif
37
38#ifndef __com_sun_star_ucb_XCommandProcessor2_idl__
39#include <com/sun/star/ucb/XCommandProcessor2.idl>
40#endif
41
42#ifndef __com_sun_star_beans_XPropertiesChangeNotifier_idl__
43#include <com/sun/star/beans/XPropertiesChangeNotifier.idl>
44#endif
45
46#ifndef __com_sun_star_beans_XPropertyContainer_idl__
47#include <com/sun/star/beans/XPropertyContainer.idl>
48#endif
49
50#ifndef __com_sun_star_beans_XPropertySetInfoChangeNotifier_idl__
51#include <com/sun/star/beans/XPropertySetInfoChangeNotifier.idl>
52#endif
53
54#ifndef __com_sun_star_ucb_XCommandInfoChangeNotifier_idl__
55#include <com/sun/star/ucb/XCommandInfoChangeNotifier.idl>
56#endif
57
58#ifndef __com_sun_star_container_XChild_idl__
59#include <com/sun/star/container/XChild.idl>
60#endif
61
62#ifndef __com_sun_star_ucb_XContentCreator_idl__
63#include <com/sun/star/ucb/XContentCreator.idl>
64#endif
65
66//=============================================================================
67
68module com { module sun { module star { module ucb {
69
70//=============================================================================
71/** A PCP Folder is a container for other PCP Folders and PCP Streams.
72
73	@see com::sun::star::ucb::PackageContentProvider
74	@see com::sun::star::ucb::PackageStreamContent
75*/
76published service PackageFolderContent
77{
78	//-------------------------------------------------------------------------
79	/** This interface is implemented according to the specification of
80		service <type>Content</type>.
81	 */
82	interface com::sun::star::lang::XComponent;
83
84	//-------------------------------------------------------------------------
85	/** This interface is implemented according to the specification of
86		service <type>Content</type>.
87	 */
88	interface com::sun::star::ucb::XContent;
89
90	//-------------------------------------------------------------------------
91	/** This interface is implemented according to the specification of
92		service <type>Content</type>.
93
94		<p>
95
96		<b>Supported Commands</b>
97		<ul>
98		<li>
99		getCommandInfo
100		</li>
101		<li>
102		getPropertySetInfo
103		</li>
104		<li>
105		getPropertyValues
106		</li>
107		<li>
108		setPropertyValues
109		</li>
110		<li>
111		insert ( makes a newly created folder persistent )
112		</li>
113		<li>
114		delete
115		</li>
116		<li>
117		open
118		</li>
119		<li>
120		transfer ( only transfers from PCP Folders/PCP Streams to other
121		PCP folders. It does not handle contents with a URL scheme other
122		then the PCP-URL-scheme. )
123		</li>
124		<li>
125		flush ( a command introduced by the PCP Folder. It takes a
126		void-argument and returns void. This command is used to write unsaved
127		changes to the underlying package file. Note that the current
128		implementation of PCP contents never flushes automatically! Operations
129		which require a flush to get persistent, are:
130		"setPropertyValues( < any_non_read_only_property > ) ",	"delete",
131		"insert" )
132		</li>
133		</ul>
134
135		<b>Supported Properties</b>
136		<ul>
137		<li>
138		string ContentType ( read-only, always "application/vnd.sun.star.pkg-folder" )
139		</li>
140		<li>
141		boolean IsDocument ( read-only, always false )
142		</li>
143		<li>
144		boolean IsFolder ( read-only, always true )
145		</li>
146		<li>
147		string MediaType
148		</li>
149		<li>
150		string Title
151		</li>
152		</ul>
153
154		</p>
155	 */
156	interface com::sun::star::ucb::XCommandProcessor;
157
158    //-------------------------------------------------------------------------
159    /** is an enhanced version of <type>XCommandProcessor</type> that has an
160        additional method for releasing command identifiers obtained via
161        <member>XCommandProcessor::createCommandIdentifier</member> to avoid
162        resource leaks. For a detailed description of the problem refer to
163        <member>XCommandProcessor2::releaseCommandIdentifier</member>.
164
165        <p>Where many existing <type>Content</type> implementations do not
166        (yet), every new implementation should support this interface.
167     */
168    [optional] interface com::sun::star::ucb::XCommandProcessor2;
169
170	//-------------------------------------------------------------------------
171	/** This interface is implemented according to the specification of
172		service <type>Content</type>.
173	 */
174	interface com::sun::star::beans::XPropertiesChangeNotifier;
175
176	//-------------------------------------------------------------------------
177	/** This interface is implemented according to the specification of
178		service <type>Content</type>.
179	 */
180	interface com::sun::star::beans::XPropertyContainer;
181
182	//-------------------------------------------------------------------------
183	/** This interface is implemented according to the specification of
184		service <type>Content</type>.
185	 */
186	interface com::sun::star::beans::XPropertySetInfoChangeNotifier;
187
188	//-------------------------------------------------------------------------
189	/** This interface is implemented according to the specification of
190		service <type>Content</type>.
191	 */
192	interface com::sun::star::ucb::XCommandInfoChangeNotifier;
193
194	//-------------------------------------------------------------------------
195	/** This interface is implemented according to the specification of
196		service <type>Content</type>.
197	 */
198	interface com::sun::star::container::XChild;
199
200	//-------------------------------------------------------------------------
201	/** This interface is implemented according to the specification of
202		service <type>Content</type>.
203
204		<p>
205
206		A PCP Folder can create other PCP Folders and PCP Streams. To create
207		a new child of a PCP Folder:
208
209		<ol>
210		<li>
211		Let the parent folder create a new content by calling
212		<member>XContentCreator::createNewContent</member> on it. The content
213		type to use for new folders is "application/vnd.sun.star.pkg-folder".
214		To create a new PCP Stream, use the type
215		"application/vnd.sun.star.pkg-stream".
216		</li>
217		<li>
218		Set a title at the new folder / stream. ( Let the new child execute
219		the command "setPropertyValues", which sets at least the property
220		"Title" to a non-empty value ).
221		</li>
222		<li>
223		Let the new child ( not the parent! ) execute the command "insert".
224		This will commit the creation process. For streams, you need to supply
225		the implementation of an
226		<type scope="com::sun::star::io">XInputStream</type> with the command's
227		parameters, that provides access to the stream data.
228		</li>
229		</ol>
230
231		</p>
232
233		<p>
234		Another, more convenient way for creating streams is simply to assemble
235		the URL for the new content ( last part of the path will become the
236		title of the new stream ) and to obtain a Content object for that URL
237		from the UCB. Then let the content execute the command "insert". The
238		command will fail, if you set the command's parameter
239		<member>InsertCommandArgument::ReplaceExisting"</member>
240		to false and there is already a stream with the title given by the
241		content's URL.
242
243		</p>
244	 */
245	interface com::sun::star::ucb::XContentCreator;
246};
247
248//=============================================================================
249
250}; }; }; };
251
252#endif
253