xref: /aoo41x/main/offapi/com/sun/star/ucb/FileContent.idl (revision d1766043)
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_FileContent_idl__
24#define __com_sun_star_ucb_FileContent_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_ucb_XContentCreator_idl__
43#include <com/sun/star/ucb/XContentCreator.idl>
44#endif
45
46#ifndef __com_sun_star_beans_XPropertiesChangeNotifier_idl__
47#include <com/sun/star/beans/XPropertiesChangeNotifier.idl>
48#endif
49
50#ifndef __com_sun_star_beans_XPropertyContainer_idl__
51#include <com/sun/star/beans/XPropertyContainer.idl>
52#endif
53
54#ifndef __com_sun_star_beans_XPropertySetInfoChangeNotifier_idl__
55#include <com/sun/star/beans/XPropertySetInfoChangeNotifier.idl>
56#endif
57
58#ifndef __com_sun_star_ucb_XCommandInfoChangeNotifier_idl__
59#include <com/sun/star/ucb/XCommandInfoChangeNotifier.idl>
60#endif
61
62#ifndef __com_sun_star_container_XChild_idl__
63#include <com/sun/star/container/XChild.idl>
64#endif
65
66//=============================================================================
67
68module com { module sun { module star { module ucb {
69
70//=============================================================================
71/** A File Content represents either a directory or a file in the local file
72	system.
73
74	<p>Whether a content represents a folder or a file can be determined by
75	inspecting its property <b>IsFolder</b> or <b>IsDocument</b>.
76
77	@see com::sun::star::ucb::FileContentProvider
78*/
79published service FileContent
80{
81	//-------------------------------------------------------------------------
82	/** This interface is implemented according to the specification of
83		service <type>Content</type>.
84	 */
85	interface com::sun::star::lang::XComponent;
86
87	//-------------------------------------------------------------------------
88	/** This interface is implemented according to the specification of
89		service <type>Content</type>.
90	 */
91	interface com::sun::star::ucb::XContent;
92
93	//-------------------------------------------------------------------------
94	/** This interface is implemented according to the specification of
95		service <type>Content</type>.
96
97		<p>An object representing a directory in the file system is able
98		to create a new object, which in turn can become the representation
99		of a physical file/directory being contained in the initial directory.
100		The precise way is the following:
101
102		<p>
103
104		<ol>
105		<li>
106		Let the parent folder create a new content by calling
107		<member>XContentCreator::createNewContent</member> on it. The content
108		type to use for new directories is
109		"application/vnd.sun.staroffice.fsys-folder". To create a new file
110		use the type "application/vnd.sun.staroffice.fsys-file".
111		As return value you get a new file content object.
112		</li>
113		<li>
114		Set a title at the new object by letting it execute
115		the command "setPropertyValues", which sets at least the property
116		"Title" to a non-empty value ).
117		</li>
118		<li>
119		Let the new object ( not the parent! ) execute the command "insert".
120		This will create the corresponding physical file or directory.
121		For files, you need to supply the implementation of
122		an <type scope="com::sun::star::io">XInputStream</type> with the
123		command's parameters, that provides access to the stream data.
124		</li>
125		</ol>
126
127		</p>
128	 */
129	interface com::sun::star::ucb::XContentCreator;
130
131	//-------------------------------------------------------------------------
132	/** This interface is implemented according to the specification of
133		service <type>Content</type>.
134
135		<p>
136
137		<b>Supported Commands</b>
138
139		<ul>
140		<li>
141		getCommandInfo
142		</li>
143		<li>
144		getPropertySetInfo
145		</li>
146		<li>
147		getPropertyValues
148		</li>
149		<li>
150		setPropertyValues
151		</li>
152		<li>
153		insert ( makes a newly created document persistent )
154		</li>
155		<li>
156		delete
157		</li>
158		<li>
159		open
160		</li>
161		<li>
162		transfer
163		</li>
164		</ul>
165
166		<b>Supported Properties</b>
167		<ul>
168		<li>
169		string ContentType ( read-only, either
170		"application/vnd.sun.staroffice.fsys-folder" or
171		"application/vnd.sun.staroffice.fsys-file" )
172		</li>
173		<li>
174		boolean IsDocument ( read-only, always <true/> for files, always
175		<false/> for directories )
176		</li>
177		<li>
178		boolean IsFolder ( read-only ), always <false/> for files, always
179		<true/> for directories )
180		</li>
181		<li>
182		<type scope="com::sun::star::util">DateTime</type> DateModified ( read-only )
183		</li>
184		<li>
185		boolean IsReadOnly ( read-only attribute )
186		</li>
187		<li>
188		hyper Size ( file size )
189		</li>
190		<li>
191		string Title ( file name )
192		</li>
193		<li>
194		boolean	IsVolume ( read-only )
195		</li>
196		<li>
197		boolean IsRemoveable ( read-only )
198		</li>
199		<li>
200		boolean IsRemote ( read-only )
201		</li>
202		<li>
203		boolean IsCompactDisc ( read-only )
204		</li>
205		<li>
206		boolean IsFloppy ( read-only )
207		</li>
208		<li>
209		boolean IsHidden ( read-only )
210		</li>
211		</ul>
212
213		</p>
214	 */
215	interface com::sun::star::ucb::XCommandProcessor;
216
217    //-------------------------------------------------------------------------
218    /** is an enhanced version of <type>XCommandProcessor</type> that has an
219        additional method for releasing command identifiers obtained via
220        <member>XCommandProcessor::createCommandIdentifier</member> to avoid
221        resource leaks. For a detailed description of the problem refer to
222        <member>XCommandProcessor2::releaseCommandIdentifier</member>.
223
224        <p>Where many existing <type>Content</type> implementations do not
225        (yet), every new implementation should support this interface.
226     */
227    [optional] interface com::sun::star::ucb::XCommandProcessor2;
228
229	//-------------------------------------------------------------------------
230	/** This interface is implemented according to the specification of
231		service <type>Content</type>.
232	 */
233	interface com::sun::star::beans::XPropertiesChangeNotifier;
234
235	//-------------------------------------------------------------------------
236	/** This interface is implemented according to the specification of
237		service <type>Content</type>.
238	 */
239	interface com::sun::star::beans::XPropertyContainer;
240
241	//-------------------------------------------------------------------------
242	/** This interface is implemented according to the specification of
243		service <type>Content</type>.
244	 */
245	interface com::sun::star::beans::XPropertySetInfoChangeNotifier;
246
247	//-------------------------------------------------------------------------
248	/** This interface is implemented according to the specification of
249		service <type>Content</type>.
250	 */
251	interface com::sun::star::ucb::XCommandInfoChangeNotifier;
252
253	//-------------------------------------------------------------------------
254	/** This interface is implemented according to the specification of
255		service <type>Content</type>.
256	 */
257	interface com::sun::star::container::XChild;
258};
259
260//=============================================================================
261
262}; }; }; };
263
264#endif
265