1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_ucb_FileContent_idl__
20 #define __com_sun_star_ucb_FileContent_idl__
22 #include
<com
/sun
/star
/lang
/XComponent.idl
>
23 #include
<com
/sun
/star
/ucb
/XContent.idl
>
24 #include
<com
/sun
/star
/ucb
/XCommandProcessor.idl
>
25 #include
<com
/sun
/star
/ucb
/XCommandProcessor2.idl
>
26 #include
<com
/sun
/star
/ucb
/XContentCreator.idl
>
27 #include
<com
/sun
/star
/beans
/XPropertiesChangeNotifier.idl
>
28 #include
<com
/sun
/star
/beans
/XPropertyContainer.idl
>
29 #include
<com
/sun
/star
/beans
/XPropertySetInfoChangeNotifier.idl
>
30 #include
<com
/sun
/star
/ucb
/XCommandInfoChangeNotifier.idl
>
31 #include
<com
/sun
/star
/container
/XChild.idl
>
34 module com
{ module sun
{ module star
{ module ucb
{
36 /** A File Content represents either a directory or a file in the local file
39 <p>Whether a content represents a folder or a file can be determined by
40 inspecting its property <b>IsFolder</b> or <b>IsDocument</b>.
42 @see com::sun::star::ucb::FileContentProvider
44 published service FileContent
46 /** This interface is implemented according to the specification of
49 interface com
::sun
::star
::lang
::XComponent
;
51 /** This interface is implemented according to the specification of
54 interface com
::sun
::star
::ucb
::XContent
;
56 /** This interface is implemented according to the specification of
59 <p>An object representing a directory in the file system is able
60 to create a new object, which in turn can become the representation
61 of a physical file/directory being contained in the initial directory.
62 The precise way is the following:
68 Let the parent folder create a new content by calling
69 XContentCreator::createNewContent() on it. The content
70 type to use for new directories is
71 "application/vnd.sun.staroffice.fsys-folder". To create a new file
72 use the type "application/vnd.sun.staroffice.fsys-file".
73 As return value you get a new file content object.
76 Set a title at the new object by letting it execute
77 the command "setPropertyValues", which sets at least the property
78 "Title" to a non-empty value ).
81 Let the new object ( not the parent! ) execute the command "insert".
82 This will create the corresponding physical file or directory.
83 For files, you need to supply the implementation of
84 an com::sun::star::io::XInputStream with the
85 command's parameters, that provides access to the stream data.
91 interface com
::sun
::star
::ucb
::XContentCreator
;
93 /** This interface is implemented according to the specification of
98 <b>Supported Commands</b>
114 insert ( makes a newly created document persistent )
127 <b>Supported Properties</b>
130 string ContentType ( read-only, either
131 "application/vnd.sun.staroffice.fsys-folder" or
132 "application/vnd.sun.staroffice.fsys-file" )
135 boolean IsDocument ( read-only, always `TRUE` for files, always
136 `FALSE` for directories )
139 boolean IsFolder ( read-only ), always `FALSE` for files, always
140 `TRUE` for directories )
143 com::sun::star::util::DateTime DateModified ( read-only )
146 boolean IsReadOnly ( read-only attribute )
149 hyper Size ( file size )
152 string Title ( file name )
155 boolean IsVolume ( read-only )
158 boolean IsRemoveable ( read-only )
161 boolean IsRemote ( read-only )
164 boolean IsCompactDisc ( read-only )
167 boolean IsFloppy ( read-only )
170 boolean IsHidden ( read-only )
176 interface com
::sun
::star
::ucb
::XCommandProcessor
;
178 /** is an enhanced version of XCommandProcessor that has an
179 additional method for releasing command identifiers obtained via
180 XCommandProcessor::createCommandIdentifier() to avoid
181 resource leaks. For a detailed description of the problem refer to
182 XCommandProcessor2::releaseCommandIdentifier().
184 <p>Where many existing Content implementations do not
185 (yet), every new implementation should support this interface.
187 [optional] interface com
::sun
::star
::ucb
::XCommandProcessor2
;
189 /** This interface is implemented according to the specification of
192 interface com
::sun
::star
::beans
::XPropertiesChangeNotifier
;
194 /** This interface is implemented according to the specification of
197 interface com
::sun
::star
::beans
::XPropertyContainer
;
199 /** This interface is implemented according to the specification of
202 interface com
::sun
::star
::beans
::XPropertySetInfoChangeNotifier
;
204 /** This interface is implemented according to the specification of
207 interface com
::sun
::star
::ucb
::XCommandInfoChangeNotifier
;
209 /** This interface is implemented according to the specification of
212 interface com
::sun
::star
::container
::XChild
;
220 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */