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
>
34 #ifndef __com_sun_star_ucb_XContent_idl__
35 #include
<com
/sun
/star
/ucb
/XContent.idl
>
38 #ifndef __com_sun_star_ucb_XCommandProcessor_idl__
39 #include
<com
/sun
/star
/ucb
/XCommandProcessor.idl
>
42 #ifndef __com_sun_star_ucb_XCommandProcessor2_idl__
43 #include
<com
/sun
/star
/ucb
/XCommandProcessor2.idl
>
46 #ifndef __com_sun_star_ucb_XContentCreator_idl__
47 #include
<com
/sun
/star
/ucb
/XContentCreator.idl
>
50 #ifndef __com_sun_star_beans_XPropertiesChangeNotifier_idl__
51 #include
<com
/sun
/star
/beans
/XPropertiesChangeNotifier.idl
>
54 #ifndef __com_sun_star_beans_XPropertyContainer_idl__
55 #include
<com
/sun
/star
/beans
/XPropertyContainer.idl
>
58 #ifndef __com_sun_star_beans_XPropertySetInfoChangeNotifier_idl__
59 #include
<com
/sun
/star
/beans
/XPropertySetInfoChangeNotifier.idl
>
62 #ifndef __com_sun_star_ucb_XCommandInfoChangeNotifier_idl__
63 #include
<com
/sun
/star
/ucb
/XCommandInfoChangeNotifier.idl
>
66 #ifndef __com_sun_star_container_XChild_idl__
67 #include
<com
/sun
/star
/container
/XChild.idl
>
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
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:
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.
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 ).
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.
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>
157 insert ( makes a newly created document persistent )
170 <b>Supported Properties</b>
173 string ContentType ( read-only, either
174 "application/vnd.sun.staroffice.fsys-folder" or
175 "application/vnd.sun.staroffice.fsys-file" )
178 boolean IsDocument ( read-only, always <true/> for files, always
179 <false/> for directories )
182 boolean IsFolder ( read-only ), always <false/> for files, always
183 <true/> for directories )
186 <type scope="com::sun::star::util">DateTime</type> DateModified ( read-only )
189 boolean IsReadOnly ( read-only attribute )
192 hyper Size ( file size )
195 string Title ( file name )
198 boolean IsVolume ( read-only )
201 boolean IsRemoveable ( read-only )
204 boolean IsRemote ( read-only )
207 boolean IsCompactDisc ( read-only )
210 boolean IsFloppy ( read-only )
213 boolean IsHidden ( read-only )
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 //=============================================================================