LCOV - code coverage report
Current view: top level - lang/cpp/src - notation.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 1 0.0 %
Date: 2018-11-15 08:49:49 Functions: 0 2 0.0 %

          Line data    Source code
       1             : /*
       2             :   notation.h - wraps a gpgme verify result
       3             :   Copyright (C) 2004, 2007 Klarälvdalens Datakonsult AB
       4             :   2016 Bundesamt für Sicherheit in der Informationstechnik
       5             :   Software engineering by Intevation GmbH
       6             : 
       7             :   This file is part of GPGME++.
       8             : 
       9             :   GPGME++ is free software; you can redistribute it and/or
      10             :   modify it under the terms of the GNU Library General Public
      11             :   License as published by the Free Software Foundation; either
      12             :   version 2 of the License, or (at your option) any later version.
      13             : 
      14             :   GPGME++ is distributed in the hope that it will be useful,
      15             :   but WITHOUT ANY WARRANTY; without even the implied warranty of
      16             :   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      17             :   GNU Library General Public License for more details.
      18             : 
      19             :   You should have received a copy of the GNU Library General Public License
      20             :   along with GPGME++; see the file COPYING.LIB.  If not, write to the
      21             :   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
      22             :   Boston, MA 02110-1301, USA.
      23             : */
      24             : 
      25             : #ifndef __GPGMEPP_NOTATION_H__
      26             : #define __GPGMEPP_NOTATION_H__
      27             : 
      28             : #include "gpgmefw.h"
      29             : #include "verificationresult.h"
      30             : #include "gpgmepp_export.h"
      31             : 
      32             : #include <memory>
      33             : 
      34             : #include <iosfwd>
      35             : 
      36             : namespace GpgME
      37             : {
      38             : 
      39           0 : class GPGMEPP_EXPORT Notation
      40             : {
      41             :     friend class ::GpgME::Signature;
      42             :     Notation(const std::shared_ptr<VerificationResult::Private> &parent, unsigned int sindex, unsigned int nindex);
      43             : public:
      44             :     Notation();
      45             :     explicit Notation(gpgme_sig_notation_t nota);
      46             : 
      47             :     const Notation &operator=(Notation other)
      48             :     {
      49             :         swap(other);
      50             :         return *this;
      51             :     }
      52             : 
      53             :     void swap(Notation &other)
      54             :     {
      55             :         using std::swap;
      56             :         swap(this->d, other.d);
      57             :     }
      58             : 
      59             :     bool isNull() const;
      60             : 
      61             :     const char *name() const;
      62             :     const char *value() const;
      63             : 
      64             :     enum Flags {
      65             :         NoFlags = 0,
      66             :         HumanReadable = 1,
      67             :         Critical = 2
      68             :     };
      69             :     Flags flags() const;
      70             : 
      71             :     bool isHumanReadable() const;
      72             :     bool isCritical() const;
      73             : 
      74             : private:
      75             :     class Private;
      76             :     std::shared_ptr<Private> d;
      77             : };
      78             : 
      79             : GPGMEPP_EXPORT std::ostream &operator<<(std::ostream &os, const Notation &nota);
      80             : GPGMEPP_EXPORT std::ostream &operator<<(std::ostream &os, Notation::Flags flags);
      81             : 
      82             : }
      83             : 
      84             : GPGMEPP_MAKE_STD_SWAP_SPECIALIZATION(Notation)
      85             : 
      86             : #endif // __GPGMEPP_NOTATION_H__

Generated by: LCOV version 1.13