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 
24 #ifndef DBACCESS_CONTAINERAPPROVE_HXX
25 #define DBACCESS_CONTAINERAPPROVE_HXX
26 
27 /** === begin UNO includes === **/
28 #ifndef _COM_SUN_STAR_UNO_XINTERFACE_HPP_
29 #include <com/sun/star/uno/XInterface.hpp>
30 #endif
31 /** === end UNO includes === **/
32 
33 #include <boost/shared_ptr.hpp>
34 
35 //........................................................................
36 namespace dbaccess
37 {
38 //........................................................................
39 
40 	//====================================================================
41 	//= IContainerApprove
42 	//====================================================================
43     /** interface for approving elements to be inserted into a container
44 
45         On the long run, one could imagine that this interface completely encapsulates
46         container/element approvals in all our various container classes herein (document
47         containers, definition containers, table containers, query containers,
48         command definition containers, bookmark containers). This would decrease coupling
49         of the respective classes.
50      */
51 	class SAL_NO_VTABLE IContainerApprove
52 	{
53     public:
54         /** approves a given element for insertion into the container
55             @param  _rName
56                 specifies the name under which the element is going to be inserted
57             @param  _rxElement
58                 specifies the element which is going to be inserted
59             @throws Exception
60                 if the name or the object are invalid, or not eligible for insertion
61                 into the container
62         */
63         virtual void SAL_CALL   approveElement(
64             const ::rtl::OUString& _rName,
65             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxElement
66         ) = 0;
67 	};
68 
69     typedef ::boost::shared_ptr< IContainerApprove >    PContainerApprove;
70 
71 //........................................................................
72 } // namespace dbaccess
73 //........................................................................
74 
75 #endif // DBACCESS_CONTAINERAPPROVE_HXX
76 
77