1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: FileContent.idl,v $
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
>
37 #ifndef __com_sun_star_ucb_XContent_idl__
38 #include
<com
/sun
/star
/ucb
/XContent.idl
>
41 #ifndef __com_sun_star_ucb_XCommandProcessor_idl__
42 #include
<com
/sun
/star
/ucb
/XCommandProcessor.idl
>
45 #ifndef __com_sun_star_ucb_XCommandProcessor2_idl__
46 #include
<com
/sun
/star
/ucb
/XCommandProcessor2.idl
>
49 #ifndef __com_sun_star_ucb_XContentCreator_idl__
50 #include
<com
/sun
/star
/ucb
/XContentCreator.idl
>
53 #ifndef __com_sun_star_beans_XPropertiesChangeNotifier_idl__
54 #include
<com
/sun
/star
/beans
/XPropertiesChangeNotifier.idl
>
57 #ifndef __com_sun_star_beans_XPropertyContainer_idl__
58 #include
<com
/sun
/star
/beans
/XPropertyContainer.idl
>
61 #ifndef __com_sun_star_beans_XPropertySetInfoChangeNotifier_idl__
62 #include
<com
/sun
/star
/beans
/XPropertySetInfoChangeNotifier.idl
>
65 #ifndef __com_sun_star_ucb_XCommandInfoChangeNotifier_idl__
66 #include
<com
/sun
/star
/ucb
/XCommandInfoChangeNotifier.idl
>
69 #ifndef __com_sun_star_container_XChild_idl__
70 #include
<com
/sun
/star
/container
/XChild.idl
>
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
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:
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.
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 ).
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.
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>
160 insert ( makes a newly created document persistent )
173 <b>Supported Properties</b>
176 string ContentType ( read-only, either
177 "application/vnd.sun.staroffice.fsys-folder" or
178 "application/vnd.sun.staroffice.fsys-file" )
181 boolean IsDocument ( read-only, always <true/> for files, always
182 <false/> for directories )
185 boolean IsFolder ( read-only ), always <false/> for files, always
186 <true/> for directories )
189 <type scope="com::sun::star::util">DateTime</type> DateModified ( read-only )
192 boolean IsReadOnly ( read-only attribute )
195 hyper Size ( file size )
198 string Title ( file name )
201 boolean IsVolume ( read-only )
204 boolean IsRemoveable ( read-only )
207 boolean IsRemote ( read-only )
210 boolean IsCompactDisc ( read-only )
213 boolean IsFloppy ( read-only )
216 boolean IsHidden ( read-only )
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 //=============================================================================