1/*
2 vfsmountresult.h - wraps a gpgme vfs mount result
3 Copyright (C) 2009 Klarälvdalens Datakonsult AB <info@kdab.com>
4 Author: Marc Mutz <marc@kdab.com>, Volker Krause <volker@kdab.com>
5
6 This file is part of GPGME++.
7
8 GPGME++ is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either
11 version 2 of the License, or (at your option) any later version.
12
13 GPGME++ is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU Library General Public License for more details.
17
18 You should have received a copy of the GNU Library General Public License
19 along with GPGME++; see the file COPYING.LIB. If not, write to the
20 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA.
22*/
23
24#ifndef __GPGMEPP_VFSMOUNTRESULT_H__
25#define __GPGMEPP_VFSMOUNTRESULT_H__
26
27#include <gpgme++/gpgmefw.h>
28#include <gpgme++/result.h>
29#include <gpgme++/gpgme++_export.h>
30
31#include <boost/shared_ptr.hpp>
32
33#include <vector>
34#include <iosfwd>
35
36namespace GpgME {
37
38 class Error;
39
40 class GPGMEPP_EXPORT VfsMountResult : public Result {
41 public:
42 VfsMountResult();
43 VfsMountResult( gpgme_ctx_t ctx, const Error & error, const Error &opError );
44 explicit VfsMountResult( const Error & err );
45
46 const VfsMountResult & operator=( VfsMountResult other ) {
47 swap( other );
48 return *this;
49 }
50
51 void swap( VfsMountResult & other ) {
52 Result::swap( other );
53 using std::swap;
54 swap( this->d, other.d );
55 }
56
57 bool isNull() const;
58 const char* mountDir() const;
59
60 class Private;
61 private:
62 void init( gpgme_ctx_t ctx );
63 boost::shared_ptr<Private> d;
64 };
65
66 GPGMEPP_EXPORT std::ostream & operator<<( std::ostream & os, const VfsMountResult & result );
67
68}
69
70GPGMEPP_MAKE_STD_SWAP_SPECIALIZATION( VfsMountResult )
71
72#endif // __GPGMEPP_ASSUANRESULT_H__
73