xref: /aoo4110/main/uui/source/unknownauthdlg.hxx (revision b1cdbd2c)
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 UUI_UNKNOWNAUTH_HXX
24 #define UUI_UNKNOWNAUTH_HXX
25 
26 
27 #include <vcl/dialog.hxx>
28 
29 #include <vcl/fixed.hxx>
30 #include <vcl/button.hxx>
31 #include <com/sun/star/security/XCertificate.hpp>
32 #ifndef _COM_SUN_STAR_XML_CRYPTO_XXSECURITYENVIRONMENT_HPP_
33 #include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
34 #endif
35 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
36 
37 namespace cssu = com::sun::star::uno;
38 namespace dcss = ::com::sun::star;
39 
40 
41 using namespace com::sun::star;
42 
43 //=====================================================================
44 //= Https_UADialog
45 //=====================================================================
46 class UnknownAuthDialog : public ModalDialog
47 {
48 private:
49     PushButton  m_aCommandButtonOK;
50 	CancelButton  m_aCommandButtonCancel;
51 	HelpButton  m_aCommandButtonHelp;
52     PushButton  m_aView_Certificate;
53 	RadioButton m_aOptionButtonAccept;
54 	RadioButton m_aOptionButtonDontAccept;
55     FixedLine   m_aLine;
56 	FixedText   m_aLabel1;
57 	FixedImage  m_aWarnImage;
58 
59 	const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& m_xServiceFactory;
60 	const cssu::Reference< dcss::security::XCertificate >& m_rXCert;
61 	Window* m_pParent;
62 	ResMgr*	pResourceMgr;
63 
64 	DECL_LINK( OKHdl_Impl, PushButton * );
65 	DECL_LINK( ViewCertHdl_Impl, PushButton * );
66 
67 	public:
68 	UnknownAuthDialog( Window* pParent,
69 					   const cssu::Reference< dcss::security::XCertificate >& rXCert,
70 					   const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
71 					   ResMgr * pResMgr );
72 
getServiceFactory()73 	const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > getServiceFactory() { return m_xServiceFactory; };
74 
getCert()75 	cssu::Reference< dcss::security::XCertificate > getCert() { return m_rXCert; };
76 
getParent()77 	Window* getParent() { return m_pParent; };
78 
setDescriptionText(const rtl::OUString & aText)79 	void setDescriptionText( const rtl::OUString &aText ) { m_aLabel1.SetText( aText ); };
80 
81 };
82 
83 #endif // UUI_UNKNOWNAUTH_HXX
84