LCOV - code coverage report
Current view: top level - libreoffice/xmlsecurity/inc/xmlsecurity - certificateviewer.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 2 0.0 %
Date: 2012-12-27 Functions: 0 4 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef _XMLSECURITY_CERTIFICATEVIEWER_HXX
      21             : #define _XMLSECURITY_CERTIFICATEVIEWER_HXX
      22             : 
      23             : #include <vcl/fixed.hxx>
      24             : #include <vcl/button.hxx>
      25             : #include <vcl/lstbox.hxx>
      26             : #include <vcl/tabdlg.hxx>
      27             : #include <vcl/tabctrl.hxx>
      28             : #include <vcl/tabpage.hxx>
      29             : #include <svtools/stdctrl.hxx>
      30             : #include <svx/simptabl.hxx>
      31             : #include <svtools/svmedit.hxx>
      32             : 
      33             : namespace com {
      34             : namespace sun {
      35             : namespace star {
      36             : namespace security {
      37             :     class XCertificate; }
      38             : namespace xml { namespace crypto {
      39             :     class XSecurityEnvironment; }}
      40             : }}}
      41             : 
      42             : namespace cssu = com::sun::star::uno;
      43             : namespace dcss = ::com::sun::star;
      44             : 
      45             : class CertificateViewer : public TabDialog
      46             : {
      47             : private:
      48             :     friend class CertificateViewerGeneralTP;
      49             :     friend class CertificateViewerDetailsTP;
      50             :     friend class CertificateViewerCertPathTP;
      51             : 
      52             :     TabControl          maTabCtrl;
      53             :     OKButton            maOkBtn;
      54             :     HelpButton          maHelpBtn;
      55             : 
      56             :     bool                mbCheckForPrivateKey;
      57             : 
      58             :     cssu::Reference< dcss::xml::crypto::XSecurityEnvironment > mxSecurityEnvironment;
      59             :     cssu::Reference< dcss::security::XCertificate > mxCert;
      60             : public:
      61             :     CertificateViewer( Window* pParent, const cssu::Reference< dcss::xml::crypto::XSecurityEnvironment >& rxSecurityEnvironment, const cssu::Reference< dcss::security::XCertificate >& rXCert, bool bCheckForPrivateKey );
      62             :     virtual             ~CertificateViewer();
      63             : };
      64             : 
      65             : 
      66           0 : class CertificateViewerTP : public TabPage
      67             : {
      68             : protected:
      69             :     CertificateViewer*  mpDlg;
      70             : public:
      71             :     CertificateViewerTP( Window* _pParent, const ResId& _rResId, CertificateViewer* _pDlg );
      72             :     inline void         SetTabDlg( CertificateViewer* pTabDlg );
      73             : };
      74             : 
      75             : inline void CertificateViewerTP::SetTabDlg( CertificateViewer* _pTabDlg )
      76             : {
      77             :     mpDlg = _pTabDlg;
      78             : }
      79             : 
      80             : 
      81           0 : class CertificateViewerGeneralTP : public CertificateViewerTP
      82             : {
      83             : private:
      84             :     Window              maFrameWin;
      85             :     FixedImage          maCertImg;
      86             :     FixedInfo           maCertInfoFI;
      87             :     FixedLine           maSep1FL;
      88             :     FixedInfo           maHintNotTrustedFI;
      89             :     FixedLine           maSep2FL;
      90             :     FixedInfo           maIssuedToLabelFI;
      91             :     FixedInfo           maIssuedToFI;
      92             :     FixedInfo           maIssuedByLabelFI;
      93             :     FixedInfo           maIssuedByFI;
      94             :     FixedInfo           maValidDateFI;
      95             :     FixedImage          maKeyImg;
      96             :     FixedInfo           maHintCorrespPrivKeyFI;
      97             : public:
      98             :                         CertificateViewerGeneralTP( Window* pParent, CertificateViewer* _pDlg );
      99             : 
     100             :     virtual void        ActivatePage();
     101             : };
     102             : 
     103             : 
     104             : class CertificateViewerDetailsTP : public CertificateViewerTP
     105             : {
     106             : private:
     107             :     SvxSimpleTableContainer m_aElementsLBContainer;
     108             :     SvxSimpleTable      maElementsLB;
     109             :     MultiLineEdit       maElementML;
     110             :     Font                maStdFont;
     111             :     Font                maFixedWidthFont;
     112             : 
     113             :     DECL_LINK(          ElementSelectHdl, void* );
     114             :     void                Clear( void );
     115             :     void                InsertElement( const OUString& _rField, const OUString& _rValue,
     116             :                                        const OUString& _rDetails, bool _bFixedWidthFont = false );
     117             : public:
     118             :                         CertificateViewerDetailsTP( Window* pParent, CertificateViewer* _pDlg );
     119             :     virtual             ~CertificateViewerDetailsTP();
     120             : 
     121             :     virtual void        ActivatePage();
     122             : };
     123             : 
     124             : 
     125             : class CertificateViewerCertPathTP : public CertificateViewerTP
     126             : {
     127             : private:
     128             :     FixedText           maCertPathFT;
     129             :     SvTreeListBox       maCertPathLB;
     130             :     PushButton          maViewCertPB;
     131             :     FixedText           maCertStatusFT;
     132             :     MultiLineEdit       maCertStatusML;
     133             : 
     134             :     CertificateViewer*  mpParent;
     135             :     bool                mbFirstActivateDone;
     136             :     Image               maCertImage;
     137             :     Image               maCertNotValidatedImage;
     138             :     OUString            msCertOK;
     139             :     OUString            msCertNotValidated;
     140             : 
     141             :     DECL_LINK(          ViewCertHdl, void* );
     142             :     DECL_LINK(          CertSelectHdl, void* );
     143             :     void                Clear( void );
     144             :     SvTreeListEntry*        InsertCert( SvTreeListEntry* _pParent, const OUString& _rName,
     145             :                                     cssu::Reference< dcss::security::XCertificate > rxCert,
     146             :                                     bool bValid);
     147             : 
     148             : public:
     149             :                         CertificateViewerCertPathTP( Window* pParent, CertificateViewer* _pDlg );
     150             :     virtual             ~CertificateViewerCertPathTP();
     151             : 
     152             :     virtual void        ActivatePage();
     153             : };
     154             : 
     155             : 
     156             : #endif // _XMLSECURITY_CERTIFICATEVIEWER_HXX
     157             : 
     158             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10