xref: /aoo42x/main/uui/source/sslwarndlg.hxx (revision b16fc349)
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_SSLWARN_HXX
24 #define UUI_SSLWARN_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_WarnDialog
45 //=====================================================================
46 class SSLWarnDialog : public ModalDialog
47 {
48 private:
49     FixedText       m_aLabel1;
50     PushButton      m_aOkButton;
51 	CancelButton    m_aCancelButton;
52 	PushButton      m_aCommandButtonViewCert;
53 	FixedLine       m_aLine;
54 	FixedImage      m_aWarnImage;
55 
56 
57 	const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& m_xServiceFactory;
58 	const cssu::Reference< dcss::security::XCertificate >& m_rXCert;
59 	Window* m_pParent;
60 	ResMgr*		pResourceMgr;
61 
62 	DECL_LINK( OKHdl_Impl, PushButton * );
63 	DECL_LINK( ViewCertHdl_Impl, PushButton * );
64 
65 	public:
66 	SSLWarnDialog( Window* pParent,
67 					   const cssu::Reference< dcss::security::XCertificate >& rXCert,
68 					   const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
69 					   ResMgr * pResMgr );
70 
getServiceFactory()71 	const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > getServiceFactory() { return m_xServiceFactory; };
72 
getCert()73 	cssu::Reference< dcss::security::XCertificate > getCert() { return m_rXCert; };
74 
getParent()75 	Window* getParent() { return m_pParent; };
76 
setDescription1Text(const rtl::OUString & aText)77 	void setDescription1Text( const rtl::OUString &aText ) { m_aLabel1.SetText( aText ); };
78 };
79 
80 #endif // UUI_SSLWARN_HXX
81 
82