1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23#ifndef __com_sun_star_embed_XStorageBasedDocument_idl__ 24#define __com_sun_star_embed_XStorageBasedDocument_idl__ 25 26#ifndef __com_sun_star_uno_XInterface_idl__ 27#include <com/sun/star/uno/XInterface.idl> 28#endif 29 30#ifndef __com_sun_star_embed_XStorage_idl__ 31#include <com/sun/star/embed/XStorage.idl> 32#endif 33 34#ifndef __com_sun_star_io_IOException_idl__ 35#include <com/sun/star/io/IOException.idl> 36#endif 37 38#ifndef __com_sun_star_frame_DoubleInitializationException_idl__ 39#include <com/sun/star/frame/DoubleInitializationException.idl> 40#endif 41 42#ifndef __com_sun_star_document_XStorageChangeListener_idl__ 43#include <com/sun/star/document/XStorageChangeListener.idl> 44#endif 45 46#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 47#include <com/sun/star/lang/IllegalArgumentException.idl> 48#endif 49 50#ifndef __com_sun_star_beans_PropertyValue_idl__ 51#include <com/sun/star/beans/PropertyValue.idl> 52#endif 53 54//============================================================================ 55 56 module com { module sun { module star { module document { 57 58//============================================================================ 59/** allows to initialize document with a storage, to store document to 60 a storage, and to set document to be based on provided storage. 61 */ 62published interface XStorageBasedDocument: com::sun::star::uno::XInterface 63{ 64 //------------------------------------------------------------------------ 65 /** lets the document load itself using provided storage. 66 */ 67 void loadFromStorage( 68 [in] ::com::sun::star::embed::XStorage xStorage, 69 [in] sequence< ::com::sun::star::beans::PropertyValue > aMediaDescriptor ) 70 raises( ::com::sun::star::lang::IllegalArgumentException, 71 ::com::sun::star::frame::DoubleInitializationException, 72 ::com::sun::star::io::IOException, 73 ::com::sun::star::uno::Exception ); 74 75 //------------------------------------------------------------------------ 76 /** lets the document store itself to the provided storage. 77 */ 78 void storeToStorage( 79 [in] ::com::sun::star::embed::XStorage xStorage, 80 [in] sequence< ::com::sun::star::beans::PropertyValue > aMediaDescriptor ) 81 raises( ::com::sun::star::lang::IllegalArgumentException, 82 ::com::sun::star::io::IOException, 83 ::com::sun::star::uno::Exception ); 84 85 //------------------------------------------------------------------------ 86 /** allows to switch the document to the provided storage. 87 */ 88 void switchToStorage( [in] ::com::sun::star::embed::XStorage xStorage ) 89 raises( ::com::sun::star::lang::IllegalArgumentException, 90 ::com::sun::star::io::IOException, 91 ::com::sun::star::uno::Exception ); 92 93 94 //------------------------------------------------------------------------ 95 /** allows to get the storage the document is based on. 96 */ 97 ::com::sun::star::embed::XStorage getDocumentStorage() 98 raises( ::com::sun::star::io::IOException, 99 ::com::sun::star::uno::Exception ); 100 101 //------------------------------------------------------------------------ 102 /** allows to register a listener that will be notified when another 103 storage is set to the document. 104 */ 105 void addStorageChangeListener( [in] XStorageChangeListener xListener ); 106 107 //------------------------------------------------------------------------ 108 /** allows to deregister the listener. 109 */ 110 void removeStorageChangeListener( [in] XStorageChangeListener xListener ); 111 112}; 113 114//============================================================================ 115 116}; }; }; }; 117 118#endif 119 120