merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / ucb / FileContent.idl
blob7dfd2d7439ca8c9d2ef5266e876cdbee9477e5db
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
27 #ifndef __com_sun_star_ucb_FileContent_idl__
28 #define __com_sun_star_ucb_FileContent_idl__
30 #ifndef __com_sun_star_lang_XComponent_idl__
31 #include <com/sun/star/lang/XComponent.idl>
32 #endif
34 #ifndef __com_sun_star_ucb_XContent_idl__
35 #include <com/sun/star/ucb/XContent.idl>
36 #endif
38 #ifndef __com_sun_star_ucb_XCommandProcessor_idl__
39 #include <com/sun/star/ucb/XCommandProcessor.idl>
40 #endif
42 #ifndef __com_sun_star_ucb_XCommandProcessor2_idl__
43 #include <com/sun/star/ucb/XCommandProcessor2.idl>
44 #endif
46 #ifndef __com_sun_star_ucb_XContentCreator_idl__
47 #include <com/sun/star/ucb/XContentCreator.idl>
48 #endif
50 #ifndef __com_sun_star_beans_XPropertiesChangeNotifier_idl__
51 #include <com/sun/star/beans/XPropertiesChangeNotifier.idl>
52 #endif
54 #ifndef __com_sun_star_beans_XPropertyContainer_idl__
55 #include <com/sun/star/beans/XPropertyContainer.idl>
56 #endif
58 #ifndef __com_sun_star_beans_XPropertySetInfoChangeNotifier_idl__
59 #include <com/sun/star/beans/XPropertySetInfoChangeNotifier.idl>
60 #endif
62 #ifndef __com_sun_star_ucb_XCommandInfoChangeNotifier_idl__
63 #include <com/sun/star/ucb/XCommandInfoChangeNotifier.idl>
64 #endif
66 #ifndef __com_sun_star_container_XChild_idl__
67 #include <com/sun/star/container/XChild.idl>
68 #endif
70 //=============================================================================
72 module com { module sun { module star { module ucb {
74 //=============================================================================
75 /** A File Content represents either a directory or a file in the local file
76 system.
78 <p>Whether a content represents a folder or a file can be determined by
79 inspecting its property <b>IsFolder</b> or <b>IsDocument</b>.
81 @see com::sun::star::ucb::FileContentProvider
83 published service FileContent
85 //-------------------------------------------------------------------------
86 /** This interface is implemented according to the specification of
87 service <type>Content</type>.
89 interface com::sun::star::lang::XComponent;
91 //-------------------------------------------------------------------------
92 /** This interface is implemented according to the specification of
93 service <type>Content</type>.
95 interface com::sun::star::ucb::XContent;
97 //-------------------------------------------------------------------------
98 /** This interface is implemented according to the specification of
99 service <type>Content</type>.
101 <p>An object representing a directory in the file system is able
102 to create a new object, which in turn can become the representation
103 of a physical file/directory being contained in the initial directory.
104 The precise way is the following:
108 <ol>
109 <li>
110 Let the parent folder create a new content by calling
111 <member>XContentCreator::createNewContent</member> on it. The content
112 type to use for new directories is
113 "application/vnd.sun.staroffice.fsys-folder". To create a new file
114 use the type "application/vnd.sun.staroffice.fsys-file".
115 As return value you get a new file content object.
116 </li>
117 <li>
118 Set a title at the new object by letting it execute
119 the command "setPropertyValues", which sets at least the property
120 "Title" to a non-empty value ).
121 </li>
122 <li>
123 Let the new object ( not the parent! ) execute the command "insert".
124 This will create the corresponding physical file or directory.
125 For files, you need to supply the implementation of
126 an <type scope="com::sun::star::io">XInputStream</type> with the
127 command's parameters, that provides access to the stream data.
128 </li>
129 </ol>
131 </p>
133 interface com::sun::star::ucb::XContentCreator;
135 //-------------------------------------------------------------------------
136 /** This interface is implemented according to the specification of
137 service <type>Content</type>.
141 <b>Supported Commands</b>
143 <ul>
144 <li>
145 getCommandInfo
146 </li>
147 <li>
148 getPropertySetInfo
149 </li>
150 <li>
151 getPropertyValues
152 </li>
153 <li>
154 setPropertyValues
155 </li>
156 <li>
157 insert ( makes a newly created document persistent )
158 </li>
159 <li>
160 delete
161 </li>
162 <li>
163 open
164 </li>
165 <li>
166 transfer
167 </li>
168 </ul>
170 <b>Supported Properties</b>
171 <ul>
172 <li>
173 string ContentType ( read-only, either
174 "application/vnd.sun.staroffice.fsys-folder" or
175 "application/vnd.sun.staroffice.fsys-file" )
176 </li>
177 <li>
178 boolean IsDocument ( read-only, always <true/> for files, always
179 <false/> for directories )
180 </li>
181 <li>
182 boolean IsFolder ( read-only ), always <false/> for files, always
183 <true/> for directories )
184 </li>
185 <li>
186 <type scope="com::sun::star::util">DateTime</type> DateModified ( read-only )
187 </li>
188 <li>
189 boolean IsReadOnly ( read-only attribute )
190 </li>
191 <li>
192 hyper Size ( file size )
193 </li>
194 <li>
195 string Title ( file name )
196 </li>
197 <li>
198 boolean IsVolume ( read-only )
199 </li>
200 <li>
201 boolean IsRemoveable ( read-only )
202 </li>
203 <li>
204 boolean IsRemote ( read-only )
205 </li>
206 <li>
207 boolean IsCompactDisc ( read-only )
208 </li>
209 <li>
210 boolean IsFloppy ( read-only )
211 </li>
212 <li>
213 boolean IsHidden ( read-only )
214 </li>
215 </ul>
217 </p>
219 interface com::sun::star::ucb::XCommandProcessor;
221 //-------------------------------------------------------------------------
222 /** is an enhanced version of <type>XCommandProcessor</type> that has an
223 additional method for releasing command identifiers obtained via
224 <member>XCommandProcessor::createCommandIdentifier</member> to avoid
225 resource leaks. For a detailed description of the problem refer to
226 <member>XCommandProcessor2::releaseCommandIdentifier</member>.
228 <p>Where many existing <type>Content</type> implementations do not
229 (yet), every new implementation should support this interface.
231 [optional] interface com::sun::star::ucb::XCommandProcessor2;
233 //-------------------------------------------------------------------------
234 /** This interface is implemented according to the specification of
235 service <type>Content</type>.
237 interface com::sun::star::beans::XPropertiesChangeNotifier;
239 //-------------------------------------------------------------------------
240 /** This interface is implemented according to the specification of
241 service <type>Content</type>.
243 interface com::sun::star::beans::XPropertyContainer;
245 //-------------------------------------------------------------------------
246 /** This interface is implemented according to the specification of
247 service <type>Content</type>.
249 interface com::sun::star::beans::XPropertySetInfoChangeNotifier;
251 //-------------------------------------------------------------------------
252 /** This interface is implemented according to the specification of
253 service <type>Content</type>.
255 interface com::sun::star::ucb::XCommandInfoChangeNotifier;
257 //-------------------------------------------------------------------------
258 /** This interface is implemented according to the specification of
259 service <type>Content</type>.
261 interface com::sun::star::container::XChild;
264 //=============================================================================
266 }; }; }; };
268 #endif