Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / ucb / FileContent.idl
blob5976ace6ac04d3fc81e6208150eab716131f8dd5
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: FileContent.idl,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_ucb_FileContent_idl__
31 #define __com_sun_star_ucb_FileContent_idl__
33 #ifndef __com_sun_star_lang_XComponent_idl__
34 #include <com/sun/star/lang/XComponent.idl>
35 #endif
37 #ifndef __com_sun_star_ucb_XContent_idl__
38 #include <com/sun/star/ucb/XContent.idl>
39 #endif
41 #ifndef __com_sun_star_ucb_XCommandProcessor_idl__
42 #include <com/sun/star/ucb/XCommandProcessor.idl>
43 #endif
45 #ifndef __com_sun_star_ucb_XCommandProcessor2_idl__
46 #include <com/sun/star/ucb/XCommandProcessor2.idl>
47 #endif
49 #ifndef __com_sun_star_ucb_XContentCreator_idl__
50 #include <com/sun/star/ucb/XContentCreator.idl>
51 #endif
53 #ifndef __com_sun_star_beans_XPropertiesChangeNotifier_idl__
54 #include <com/sun/star/beans/XPropertiesChangeNotifier.idl>
55 #endif
57 #ifndef __com_sun_star_beans_XPropertyContainer_idl__
58 #include <com/sun/star/beans/XPropertyContainer.idl>
59 #endif
61 #ifndef __com_sun_star_beans_XPropertySetInfoChangeNotifier_idl__
62 #include <com/sun/star/beans/XPropertySetInfoChangeNotifier.idl>
63 #endif
65 #ifndef __com_sun_star_ucb_XCommandInfoChangeNotifier_idl__
66 #include <com/sun/star/ucb/XCommandInfoChangeNotifier.idl>
67 #endif
69 #ifndef __com_sun_star_container_XChild_idl__
70 #include <com/sun/star/container/XChild.idl>
71 #endif
73 //=============================================================================
75 module com { module sun { module star { module ucb {
77 //=============================================================================
78 /** A File Content represents either a directory or a file in the local file
79 system.
81 <p>Whether a content represents a folder or a file can be determined by
82 inspecting its property <b>IsFolder</b> or <b>IsDocument</b>.
84 @see com::sun::star::ucb::FileContentProvider
86 published service FileContent
88 //-------------------------------------------------------------------------
89 /** This interface is implemented according to the specification of
90 service <type>Content</type>.
92 interface com::sun::star::lang::XComponent;
94 //-------------------------------------------------------------------------
95 /** This interface is implemented according to the specification of
96 service <type>Content</type>.
98 interface com::sun::star::ucb::XContent;
100 //-------------------------------------------------------------------------
101 /** This interface is implemented according to the specification of
102 service <type>Content</type>.
104 <p>An object representing a directory in the file system is able
105 to create a new object, which in turn can become the representation
106 of a physical file/directory being contained in the initial directory.
107 The precise way is the following:
111 <ol>
112 <li>
113 Let the parent folder create a new content by calling
114 <member>XContentCreator::createNewContent</member> on it. The content
115 type to use for new directories is
116 "application/vnd.sun.staroffice.fsys-folder". To create a new file
117 use the type "application/vnd.sun.staroffice.fsys-file".
118 As return value you get a new file content object.
119 </li>
120 <li>
121 Set a title at the new object by letting it execute
122 the command "setPropertyValues", which sets at least the property
123 "Title" to a non-empty value ).
124 </li>
125 <li>
126 Let the new object ( not the parent! ) execute the command "insert".
127 This will create the corresponding physical file or directory.
128 For files, you need to supply the implementation of
129 an <type scope="com::sun::star::io">XInputStream</type> with the
130 command's parameters, that provides access to the stream data.
131 </li>
132 </ol>
134 </p>
136 interface com::sun::star::ucb::XContentCreator;
138 //-------------------------------------------------------------------------
139 /** This interface is implemented according to the specification of
140 service <type>Content</type>.
144 <b>Supported Commands</b>
146 <ul>
147 <li>
148 getCommandInfo
149 </li>
150 <li>
151 getPropertySetInfo
152 </li>
153 <li>
154 getPropertyValues
155 </li>
156 <li>
157 setPropertyValues
158 </li>
159 <li>
160 insert ( makes a newly created document persistent )
161 </li>
162 <li>
163 delete
164 </li>
165 <li>
166 open
167 </li>
168 <li>
169 transfer
170 </li>
171 </ul>
173 <b>Supported Properties</b>
174 <ul>
175 <li>
176 string ContentType ( read-only, either
177 "application/vnd.sun.staroffice.fsys-folder" or
178 "application/vnd.sun.staroffice.fsys-file" )
179 </li>
180 <li>
181 boolean IsDocument ( read-only, always <true/> for files, always
182 <false/> for directories )
183 </li>
184 <li>
185 boolean IsFolder ( read-only ), always <false/> for files, always
186 <true/> for directories )
187 </li>
188 <li>
189 <type scope="com::sun::star::util">DateTime</type> DateModified ( read-only )
190 </li>
191 <li>
192 boolean IsReadOnly ( read-only attribute )
193 </li>
194 <li>
195 hyper Size ( file size )
196 </li>
197 <li>
198 string Title ( file name )
199 </li>
200 <li>
201 boolean IsVolume ( read-only )
202 </li>
203 <li>
204 boolean IsRemoveable ( read-only )
205 </li>
206 <li>
207 boolean IsRemote ( read-only )
208 </li>
209 <li>
210 boolean IsCompactDisc ( read-only )
211 </li>
212 <li>
213 boolean IsFloppy ( read-only )
214 </li>
215 <li>
216 boolean IsHidden ( read-only )
217 </li>
218 </ul>
220 </p>
222 interface com::sun::star::ucb::XCommandProcessor;
224 //-------------------------------------------------------------------------
225 /** is an enhanced version of <type>XCommandProcessor</type> that has an
226 additional method for releasing command identifiers obtained via
227 <member>XCommandProcessor::createCommandIdentifier</member> to avoid
228 resource leaks. For a detailed description of the problem refer to
229 <member>XCommandProcessor2::releaseCommandIdentifier</member>.
231 <p>Where many existing <type>Content</type> implementations do not
232 (yet), every new implementation should support this interface.
234 [optional] interface com::sun::star::ucb::XCommandProcessor2;
236 //-------------------------------------------------------------------------
237 /** This interface is implemented according to the specification of
238 service <type>Content</type>.
240 interface com::sun::star::beans::XPropertiesChangeNotifier;
242 //-------------------------------------------------------------------------
243 /** This interface is implemented according to the specification of
244 service <type>Content</type>.
246 interface com::sun::star::beans::XPropertyContainer;
248 //-------------------------------------------------------------------------
249 /** This interface is implemented according to the specification of
250 service <type>Content</type>.
252 interface com::sun::star::beans::XPropertySetInfoChangeNotifier;
254 //-------------------------------------------------------------------------
255 /** This interface is implemented according to the specification of
256 service <type>Content</type>.
258 interface com::sun::star::ucb::XCommandInfoChangeNotifier;
260 //-------------------------------------------------------------------------
261 /** This interface is implemented according to the specification of
262 service <type>Content</type>.
264 interface com::sun::star::container::XChild;
267 //=============================================================================
269 }; }; }; };
271 #endif