Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / ucb / FileContent.idl
blob191b7dff332e80a05f7db4ccbea137f275231e18
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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
37 system.
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
47 service Content.
49 interface com::sun::star::lang::XComponent;
51 /** This interface is implemented according to the specification of
52 service Content.
54 interface com::sun::star::ucb::XContent;
56 /** This interface is implemented according to the specification of
57 service Content.
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:
64 <p>
66 <ol>
67 <li>
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.
74 </li>
75 <li>
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 ).
79 </li>
80 <li>
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.
86 </li>
87 </ol>
89 </p>
91 interface com::sun::star::ucb::XContentCreator;
93 /** This interface is implemented according to the specification of
94 service Content.
96 <p>
98 <b>Supported Commands</b>
100 <ul>
101 <li>
102 getCommandInfo
103 </li>
104 <li>
105 getPropertySetInfo
106 </li>
107 <li>
108 getPropertyValues
109 </li>
110 <li>
111 setPropertyValues
112 </li>
113 <li>
114 insert ( makes a newly created document persistent )
115 </li>
116 <li>
117 delete
118 </li>
119 <li>
120 open
121 </li>
122 <li>
123 transfer
124 </li>
125 </ul>
127 <b>Supported Properties</b>
128 <ul>
129 <li>
130 string ContentType ( read-only, either
131 "application/vnd.sun.staroffice.fsys-folder" or
132 "application/vnd.sun.staroffice.fsys-file" )
133 </li>
134 <li>
135 boolean IsDocument ( read-only, always `TRUE` for files, always
136 `FALSE` for directories )
137 </li>
138 <li>
139 boolean IsFolder ( read-only ), always `FALSE` for files, always
140 `TRUE` for directories )
141 </li>
142 <li>
143 com::sun::star::util::DateTime DateModified ( read-only )
144 </li>
145 <li>
146 boolean IsReadOnly ( read-only attribute )
147 </li>
148 <li>
149 hyper Size ( file size )
150 </li>
151 <li>
152 string Title ( file name )
153 </li>
154 <li>
155 boolean IsVolume ( read-only )
156 </li>
157 <li>
158 boolean IsRemoveable ( read-only )
159 </li>
160 <li>
161 boolean IsRemote ( read-only )
162 </li>
163 <li>
164 boolean IsCompactDisc ( read-only )
165 </li>
166 <li>
167 boolean IsFloppy ( read-only )
168 </li>
169 <li>
170 boolean IsHidden ( read-only )
171 </li>
172 </ul>
174 </p>
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
190 service Content.
192 interface com::sun::star::beans::XPropertiesChangeNotifier;
194 /** This interface is implemented according to the specification of
195 service Content.
197 interface com::sun::star::beans::XPropertyContainer;
199 /** This interface is implemented according to the specification of
200 service Content.
202 interface com::sun::star::beans::XPropertySetInfoChangeNotifier;
204 /** This interface is implemented according to the specification of
205 service Content.
207 interface com::sun::star::ucb::XCommandInfoChangeNotifier;
209 /** This interface is implemented according to the specification of
210 service Content.
212 interface com::sun::star::container::XChild;
216 }; }; }; };
218 #endif
220 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */