1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 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. 14 * 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). 20 * 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. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_ucb_PackageFolderContent_idl__ 28#define __com_sun_star_ucb_PackageFolderContent_idl__ 29 30#ifndef __com_sun_star_lang_XComponent_idl__ 31#include <com/sun/star/lang/XComponent.idl> 32#endif 33 34#ifndef __com_sun_star_ucb_XContent_idl__ 35#include <com/sun/star/ucb/XContent.idl> 36#endif 37 38#ifndef __com_sun_star_ucb_XCommandProcessor_idl__ 39#include <com/sun/star/ucb/XCommandProcessor.idl> 40#endif 41 42#ifndef __com_sun_star_ucb_XCommandProcessor2_idl__ 43#include <com/sun/star/ucb/XCommandProcessor2.idl> 44#endif 45 46#ifndef __com_sun_star_beans_XPropertiesChangeNotifier_idl__ 47#include <com/sun/star/beans/XPropertiesChangeNotifier.idl> 48#endif 49 50#ifndef __com_sun_star_beans_XPropertyContainer_idl__ 51#include <com/sun/star/beans/XPropertyContainer.idl> 52#endif 53 54#ifndef __com_sun_star_beans_XPropertySetInfoChangeNotifier_idl__ 55#include <com/sun/star/beans/XPropertySetInfoChangeNotifier.idl> 56#endif 57 58#ifndef __com_sun_star_ucb_XCommandInfoChangeNotifier_idl__ 59#include <com/sun/star/ucb/XCommandInfoChangeNotifier.idl> 60#endif 61 62#ifndef __com_sun_star_container_XChild_idl__ 63#include <com/sun/star/container/XChild.idl> 64#endif 65 66#ifndef __com_sun_star_ucb_XContentCreator_idl__ 67#include <com/sun/star/ucb/XContentCreator.idl> 68#endif 69 70//============================================================================= 71 72module com { module sun { module star { module ucb { 73 74//============================================================================= 75/** A PCP Folder is a container for other PCP Folders and PCP Streams. 76 77 @see com::sun::star::ucb::PackageContentProvider 78 @see com::sun::star::ucb::PackageStreamContent 79*/ 80published service PackageFolderContent 81{ 82 //------------------------------------------------------------------------- 83 /** This interface is implemented according to the specification of 84 service <type>Content</type>. 85 */ 86 interface com::sun::star::lang::XComponent; 87 88 //------------------------------------------------------------------------- 89 /** This interface is implemented according to the specification of 90 service <type>Content</type>. 91 */ 92 interface com::sun::star::ucb::XContent; 93 94 //------------------------------------------------------------------------- 95 /** This interface is implemented according to the specification of 96 service <type>Content</type>. 97 98 <p> 99 100 <b>Supported Commands</b> 101 <ul> 102 <li> 103 getCommandInfo 104 </li> 105 <li> 106 getPropertySetInfo 107 </li> 108 <li> 109 getPropertyValues 110 </li> 111 <li> 112 setPropertyValues 113 </li> 114 <li> 115 insert ( makes a newly created folder persistent ) 116 </li> 117 <li> 118 delete 119 </li> 120 <li> 121 open 122 </li> 123 <li> 124 transfer ( only transfers from PCP Folders/PCP Streams to other 125 PCP folders. It does not handle contents with a URL scheme other 126 then the PCP-URL-scheme. ) 127 </li> 128 <li> 129 flush ( a command introduced by the PCP Folder. It takes a 130 void-argument and returns void. This command is used to write unsaved 131 changes to the underlying package file. Note that the current 132 implementation of PCP contents never flushes automatically! Operations 133 which require a flush to get persistent, are: 134 "setPropertyValues( < any_non_read_only_property > ) ", "delete", 135 "insert" ) 136 </li> 137 </ul> 138 139 <b>Supported Properties</b> 140 <ul> 141 <li> 142 string ContentType ( read-only, always "application/vnd.sun.star.pkg-folder" ) 143 </li> 144 <li> 145 boolean IsDocument ( read-only, always false ) 146 </li> 147 <li> 148 boolean IsFolder ( read-only, always true ) 149 </li> 150 <li> 151 string MediaType 152 </li> 153 <li> 154 string Title 155 </li> 156 </ul> 157 158 </p> 159 */ 160 interface com::sun::star::ucb::XCommandProcessor; 161 162 //------------------------------------------------------------------------- 163 /** is an enhanced version of <type>XCommandProcessor</type> that has an 164 additional method for releasing command identifiers obtained via 165 <member>XCommandProcessor::createCommandIdentifier</member> to avoid 166 resource leaks. For a detailed description of the problem refer to 167 <member>XCommandProcessor2::releaseCommandIdentifier</member>. 168 169 <p>Where many existing <type>Content</type> implementations do not 170 (yet), every new implementation should support this interface. 171 */ 172 [optional] interface com::sun::star::ucb::XCommandProcessor2; 173 174 //------------------------------------------------------------------------- 175 /** This interface is implemented according to the specification of 176 service <type>Content</type>. 177 */ 178 interface com::sun::star::beans::XPropertiesChangeNotifier; 179 180 //------------------------------------------------------------------------- 181 /** This interface is implemented according to the specification of 182 service <type>Content</type>. 183 */ 184 interface com::sun::star::beans::XPropertyContainer; 185 186 //------------------------------------------------------------------------- 187 /** This interface is implemented according to the specification of 188 service <type>Content</type>. 189 */ 190 interface com::sun::star::beans::XPropertySetInfoChangeNotifier; 191 192 //------------------------------------------------------------------------- 193 /** This interface is implemented according to the specification of 194 service <type>Content</type>. 195 */ 196 interface com::sun::star::ucb::XCommandInfoChangeNotifier; 197 198 //------------------------------------------------------------------------- 199 /** This interface is implemented according to the specification of 200 service <type>Content</type>. 201 */ 202 interface com::sun::star::container::XChild; 203 204 //------------------------------------------------------------------------- 205 /** This interface is implemented according to the specification of 206 service <type>Content</type>. 207 208 <p> 209 210 A PCP Folder can create other PCP Folders and PCP Streams. To create 211 a new child of a PCP Folder: 212 213 <ol> 214 <li> 215 Let the parent folder create a new content by calling 216 <member>XContentCreator::createNewContent</member> on it. The content 217 type to use for new folders is "application/vnd.sun.star.pkg-folder". 218 To create a new PCP Stream, use the type 219 "application/vnd.sun.star.pkg-stream". 220 </li> 221 <li> 222 Set a title at the new folder / stream. ( Let the new child execute 223 the command "setPropertyValues", which sets at least the property 224 "Title" to a non-empty value ). 225 </li> 226 <li> 227 Let the new child ( not the parent! ) execute the command "insert". 228 This will commit the creation process. For streams, you need to supply 229 the implementation of an 230 <type scope="com::sun::star::io">XInputStream</type> with the command's 231 parameters, that provides access to the stream data. 232 </li> 233 </ol> 234 235 </p> 236 237 <p> 238 Another, more convenient way for creating streams is simply to assemble 239 the URL for the new content ( last part of the path will become the 240 title of the new stream ) and to obtain a Content object for that URL 241 from the UCB. Then let the content execute the command "insert". The 242 command will fail, if you set the command's parameter 243 <member>InsertCommandArgument::ReplaceExisting"</member> 244 to false and there is already a stream with the title given by the 245 content's URL. 246 247 </p> 248 */ 249 interface com::sun::star::ucb::XContentCreator; 250}; 251 252//============================================================================= 253 254}; }; }; }; 255 256#endif 257