LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/xmlsecurity/inc/xmlsecurity - certificateviewer.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 2 0.0 %
Date: 2013-07-09 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             : class CertificateViewer : public TabDialog
      43             : {
      44             : private:
      45             :     friend class CertificateViewerGeneralTP;
      46             :     friend class CertificateViewerDetailsTP;
      47             :     friend class CertificateViewerCertPathTP;
      48             : 
      49             :     TabControl          maTabCtrl;
      50             :     OKButton            maOkBtn;
      51             :     HelpButton          maHelpBtn;
      52             : 
      53             :     bool                mbCheckForPrivateKey;
      54             : 
      55             :     css::uno::Reference< css::xml::crypto::XSecurityEnvironment > mxSecurityEnvironment;
      56             :     css::uno::Reference< css::security::XCertificate > mxCert;
      57             : public:
      58             :     CertificateViewer( Window* pParent, const css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& rxSecurityEnvironment, const css::uno::Reference< css::security::XCertificate >& rXCert, bool bCheckForPrivateKey );
      59             :     virtual             ~CertificateViewer();
      60             : };
      61             : 
      62             : 
      63           0 : class CertificateViewerTP : public TabPage
      64             : {
      65             : protected:
      66             :     CertificateViewer*  mpDlg;
      67             : public:
      68             :     CertificateViewerTP( Window* _pParent, const ResId& _rResId, CertificateViewer* _pDlg );
      69             :     inline void         SetTabDlg( CertificateViewer* pTabDlg );
      70             : };
      71             : 
      72             : inline void CertificateViewerTP::SetTabDlg( CertificateViewer* _pTabDlg )
      73             : {
      74             :     mpDlg = _pTabDlg;
      75             : }
      76             : 
      77             : 
      78           0 : class CertificateViewerGeneralTP : public CertificateViewerTP
      79             : {
      80             : private:
      81             :     Window              maFrameWin;
      82             :     FixedImage          maCertImg;
      83             :     FixedInfo           maCertInfoFI;
      84             :     FixedLine           maSep1FL;
      85             :     FixedInfo           maHintNotTrustedFI;
      86             :     FixedLine           maSep2FL;
      87             :     FixedInfo           maIssuedToLabelFI;
      88             :     FixedInfo           maIssuedToFI;
      89             :     FixedInfo           maIssuedByLabelFI;
      90             :     FixedInfo           maIssuedByFI;
      91             :     FixedInfo           maValidDateFI;
      92             :     FixedImage          maKeyImg;
      93             :     FixedInfo           maHintCorrespPrivKeyFI;
      94             : public:
      95             :                         CertificateViewerGeneralTP( Window* pParent, CertificateViewer* _pDlg );
      96             : 
      97             :     virtual void        ActivatePage();
      98             : };
      99             : 
     100             : 
     101             : class CertificateViewerDetailsTP : public CertificateViewerTP
     102             : {
     103             : private:
     104             :     SvxSimpleTableContainer m_aElementsLBContainer;
     105             :     SvxSimpleTable      maElementsLB;
     106             :     MultiLineEdit       maElementML;
     107             :     Font                maStdFont;
     108             :     Font                maFixedWidthFont;
     109             : 
     110             :     DECL_LINK(          ElementSelectHdl, void* );
     111             :     void                Clear( void );
     112             :     void                InsertElement( const OUString& _rField, const OUString& _rValue,
     113             :                                        const OUString& _rDetails, bool _bFixedWidthFont = false );
     114             : public:
     115             :                         CertificateViewerDetailsTP( Window* pParent, CertificateViewer* _pDlg );
     116             :     virtual             ~CertificateViewerDetailsTP();
     117             : 
     118             :     virtual void        ActivatePage();
     119             : };
     120             : 
     121             : 
     122             : class CertificateViewerCertPathTP : public CertificateViewerTP
     123             : {
     124             : private:
     125             :     FixedText           maCertPathFT;
     126             :     SvTreeListBox       maCertPathLB;
     127             :     PushButton          maViewCertPB;
     128             :     FixedText           maCertStatusFT;
     129             :     MultiLineEdit       maCertStatusML;
     130             : 
     131             :     CertificateViewer*  mpParent;
     132             :     bool                mbFirstActivateDone;
     133             :     Image               maCertImage;
     134             :     Image               maCertNotValidatedImage;
     135             :     OUString            msCertOK;
     136             :     OUString            msCertNotValidated;
     137             : 
     138             :     DECL_LINK(          ViewCertHdl, void* );
     139             :     DECL_LINK(          CertSelectHdl, void* );
     140             :     void                Clear( void );
     141             :     SvTreeListEntry*        InsertCert( SvTreeListEntry* _pParent, const OUString& _rName,
     142             :                                     css::uno::Reference< css::security::XCertificate > rxCert,
     143             :                                     bool bValid);
     144             : 
     145             : public:
     146             :                         CertificateViewerCertPathTP( Window* pParent, CertificateViewer* _pDlg );
     147             :     virtual             ~CertificateViewerCertPathTP();
     148             : 
     149             :     virtual void        ActivatePage();
     150             : };
     151             : 
     152             : 
     153             : #endif // _XMLSECURITY_CERTIFICATEVIEWER_HXX
     154             : 
     155             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10