1*ec61c6edSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*ec61c6edSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*ec61c6edSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*ec61c6edSAndrew Rist * distributed with this work for additional information 6*ec61c6edSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*ec61c6edSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*ec61c6edSAndrew Rist * "License"); you may not use this file except in compliance 9*ec61c6edSAndrew Rist * with the License. You may obtain a copy of the License at 10*ec61c6edSAndrew Rist * 11*ec61c6edSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*ec61c6edSAndrew Rist * 13*ec61c6edSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*ec61c6edSAndrew Rist * software distributed under the License is distributed on an 15*ec61c6edSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*ec61c6edSAndrew Rist * KIND, either express or implied. See the License for the 17*ec61c6edSAndrew Rist * specific language governing permissions and limitations 18*ec61c6edSAndrew Rist * under the License. 19*ec61c6edSAndrew Rist * 20*ec61c6edSAndrew Rist *************************************************************/ 21*ec61c6edSAndrew Rist 22*ec61c6edSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _XMLSECURITY_CERTIFICATECHOOSER_HXX 25cdf0e10cSrcweir #define _XMLSECURITY_CERTIFICATECHOOSER_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <vcl/dialog.hxx> 28cdf0e10cSrcweir #include <vcl/fixed.hxx> 29cdf0e10cSrcweir #include <vcl/button.hxx> 30cdf0e10cSrcweir #include <svx/simptabl.hxx> 31cdf0e10cSrcweir 32cdf0e10cSrcweir namespace com { 33cdf0e10cSrcweir namespace sun { 34cdf0e10cSrcweir namespace star { 35cdf0e10cSrcweir namespace security { 36cdf0e10cSrcweir class XCertificate; } 37cdf0e10cSrcweir namespace xml { namespace crypto { 38cdf0e10cSrcweir class XSecurityEnvironment; }} 39cdf0e10cSrcweir }}} 40cdf0e10cSrcweir 41cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.hxx> 42cdf0e10cSrcweir #include <xmlsecurity/sigstruct.hxx> 43cdf0e10cSrcweir 44cdf0e10cSrcweir namespace css = com::sun::star; 45cdf0e10cSrcweir namespace cssu = com::sun::star::uno; 46cdf0e10cSrcweir namespace dcss = ::com::sun::star; 47cdf0e10cSrcweir 48cdf0e10cSrcweir class HeaderBar; 49cdf0e10cSrcweir 50cdf0e10cSrcweir class CertificateChooser : public ModalDialog 51cdf0e10cSrcweir { 52cdf0e10cSrcweir private: 53cdf0e10cSrcweir cssu::Reference< cssu::XComponentContext > mxCtx; 54cdf0e10cSrcweir cssu::Reference< dcss::xml::crypto::XSecurityEnvironment > mxSecurityEnvironment; 55cdf0e10cSrcweir cssu::Sequence< cssu::Reference< dcss::security::XCertificate > > maCerts; 56cdf0e10cSrcweir SignatureInformations maCertsToIgnore; 57cdf0e10cSrcweir 58cdf0e10cSrcweir FixedText maHintFT; 59cdf0e10cSrcweir SvxSimpleTable maCertLB; // PB 2006/02/02 #i48648 now SvHeaderTabListBox 60cdf0e10cSrcweir 61cdf0e10cSrcweir PushButton maViewBtn; 62cdf0e10cSrcweir 63cdf0e10cSrcweir FixedLine maBottomSepFL; 64cdf0e10cSrcweir OKButton maOKBtn; 65cdf0e10cSrcweir CancelButton maCancelBtn; 66cdf0e10cSrcweir HelpButton maHelpBtn; 67cdf0e10cSrcweir 68cdf0e10cSrcweir sal_Bool mbInitialized; 69cdf0e10cSrcweir 70cdf0e10cSrcweir sal_uInt16 GetSelectedEntryPos( void ) const; 71cdf0e10cSrcweir // DECL_LINK( Initialize, void* ); 72cdf0e10cSrcweir DECL_LINK( ViewButtonHdl, Button* ); 73cdf0e10cSrcweir DECL_LINK( CertificateHighlightHdl, void* ); 74cdf0e10cSrcweir DECL_LINK( CertificateSelectHdl, void* ); 75cdf0e10cSrcweir 76cdf0e10cSrcweir void ImplShowCertificateDetails(); 77cdf0e10cSrcweir void ImplInitialize(); 78cdf0e10cSrcweir 79cdf0e10cSrcweir public: 80cdf0e10cSrcweir CertificateChooser( Window* pParent, cssu::Reference< cssu::XComponentContext>& rxCtx, cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& rxSecurityEnvironment, const SignatureInformations& rCertsToIgnore ); 81cdf0e10cSrcweir ~CertificateChooser(); 82cdf0e10cSrcweir 83cdf0e10cSrcweir short Execute(); 84cdf0e10cSrcweir 85cdf0e10cSrcweir cssu::Reference< dcss::security::XCertificate > GetSelectedCertificate(); 86cdf0e10cSrcweir 87cdf0e10cSrcweir }; 88cdf0e10cSrcweir 89cdf0e10cSrcweir #endif // _XMLSECURITY_CERTIFICATECHOOSER_HXX 90cdf0e10cSrcweir 91