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_script_XLibraryContainer_idl__
24#define __com_sun_star_script_XLibraryContainer_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_container_XNameContainer_idl__
31#include <com/sun/star/container/XNameContainer.idl>
32#endif
33
34#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
35#include <com/sun/star/lang/IllegalArgumentException.idl>
36#endif
37
38#ifndef __com_sun_star_container_NoSuchElementException_idl__
39#include <com/sun/star/container/NoSuchElementException.idl>
40#endif
41
42#ifndef __com_sun_star_container_ElementExistException_idl__
43#include <com/sun/star/container/ElementExistException.idl>
44#endif
45
46#ifndef __com_sun_star_lang_WrappedTargetException_idl__
47#include <com/sun/star/lang/WrappedTargetException.idl>
48#endif
49
50#ifndef __com_sun_star_container_ElementExistException_idl__
51#include <com/sun/star/container/ElementExistException.idl>
52#endif
53#ifndef __com_sun_star_lang_WrappedTargetException_idl__
54#include <com/sun/star/lang/WrappedTargetException.idl>
55#endif
56
57
58//=============================================================================
59
60module com {  module sun {  module star {  module script {
61
62//=============================================================================
63
64/**
65	Provides access to a library system.
66 */
67published interface XLibraryContainer: com::sun::star::container::XNameAccess
68{
69	/**
70		Creates a new library
71	 */
72	com::sun::star::container::XNameContainer createLibrary( [in] string Name )
73		raises( com::sun::star::lang::IllegalArgumentException,
74				com::sun::star::container::ElementExistException );
75
76	/**
77		Creates a link to an "external" library that then can be
78		accessed using this library manager. The format of the
79		StorageURL is a matter of the implementation. If the read
80		only flag is set, the linked library cannot be modified.
81		In this case, the returned interface really is only an
82		XNameAccess. If ReadOnly is false (and the referenced
83		storage allows write access) the returned interface also
84		can be a <type scope="com::sun::star::container">XNameContainer</type>.
85	 */
86	com::sun::star::container::XNameAccess createLibraryLink( [in] string Name, [in] string StorageURL, [in] boolean ReadOnly )
87		raises( com::sun::star::lang::IllegalArgumentException,
88				com::sun::star::container::ElementExistException );
89
90	/** removes the library item with the specified name. If the accessed
91		library item is a link only the link is removed, not the target library.
92	 */
93	void removeLibrary( [in] string Name )
94			raises( com::sun::star::container::NoSuchElementException,
95					com::sun::star::lang::WrappedTargetException );
96
97	/**
98		returns true if the accessed library is already loaded from
99		the storage, otherwise false.
100	 */
101	boolean isLibraryLoaded( [in] string Name )
102			raises( com::sun::star::container::NoSuchElementException );
103
104	/**
105		Causes the accessed library to be loaded from its storage
106		if it hasn't already been loaded.
107	 */
108	void loadLibrary( [in] string Name )
109			raises( com::sun::star::container::NoSuchElementException,
110					com::sun::star::lang::WrappedTargetException );
111
112};
113
114//=============================================================================
115
116
117}; }; }; };
118
119#endif
120