1/*
2 engineinfo.h
3 Copyright (C) 2004 Klarälvdalens Datakonsult AB
4
5 This file is part of GPGME++.
6
7 GPGME++ is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
11
12 GPGME++ is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with GPGME++; see the file COPYING.LIB. If not, write to the
19 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
21*/
22
23#ifndef __GPGMEPP_ENGINEINFO_H__
24#define __GPGMEPP_ENGINEINFO_H__
25
26#include <gpgme++/global.h>
27
28#include <boost/shared_ptr.hpp>
29
30#include <algorithm>
31
32namespace GpgME {
33
34 class GPGMEPP_EXPORT EngineInfo {
35 public:
36 EngineInfo();
37 explicit EngineInfo( gpgme_engine_info_t engine );
38
39 const EngineInfo & operator=( EngineInfo other ) {
40 swap( other );
41 return *this;
42 }
43
44 void swap( EngineInfo & other ) {
45 using std::swap;
46 swap( this->d, other.d );
47 }
48
49 bool isNull() const;
50
51 Protocol protocol() const;
52 const char * fileName() const;
53 const char * version() const;
54 const char * requiredVersion() const;
55 const char * homeDirectory() const;
56
57 private:
58 class Private;
59 boost::shared_ptr<Private> d;
60 };
61
62}
63
64GPGMEPP_MAKE_STD_SWAP_SPECIALIZATION( EngineInfo )
65
66#endif // __GPGMEPP_ENGINEINFO_H__
67