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 DBAUI_RELCONTROLIFACE_HXX
24 #define DBAUI_RELCONTROLIFACE_HXX
25 
26 #ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_
27 #include <com/sun/star/sdbc/XConnection.hpp>
28 #endif
29 #include "TableConnectionData.hxx"
30 
31 namespace dbaui
32 {
33 	class IRelationControlInterface
34 	{
35 	public:
~IRelationControlInterface()36 		virtual ~IRelationControlInterface(){}
37 
38 		/** getConnectionData returns the current connection data
39 			@return the current connectiondata
40 		*/
41 		virtual TTableConnectionData::value_type getConnectionData() const = 0;
42 
43 		/** setValid set the valid inside, can be used for OK buttons
44 			@param	_bValid	true when the using control allows an update
45 		*/
46 		virtual void setValid(sal_Bool _bValid) = 0;
47 
48 		virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > getConnection() = 0;
49 
50 		/** notifyConnectionChange is callback which is called when the table selection has changed and a new connection exists
51 			@param	_pConnectionData	the connection which exists between the new tables
52 		*/
53 		virtual void notifyConnectionChange() = 0;
54 	};
55 }
56 #endif // DBAUI_RELCONTROLIFACE_HXX
57