|
Packit |
d7e8d0 |
/*
|
|
Packit |
d7e8d0 |
scdgetinfoassuantransaction.h - Assuan Transaction to get information from scdaemon
|
|
Packit |
d7e8d0 |
Copyright (C) 2009 Klarälvdalens Datakonsult AB
|
|
Packit |
d7e8d0 |
2016 Bundesamt für Sicherheit in der Informationstechnik
|
|
Packit |
d7e8d0 |
Software engineering by Intevation GmbH
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
This file is part of GPGME++.
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
GPGME++ is free software; you can redistribute it and/or
|
|
Packit |
d7e8d0 |
modify it under the terms of the GNU Library General Public
|
|
Packit |
d7e8d0 |
License as published by the Free Software Foundation; either
|
|
Packit |
d7e8d0 |
version 2 of the License, or (at your option) any later version.
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
GPGME++ is distributed in the hope that it will be useful,
|
|
Packit |
d7e8d0 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
d7e8d0 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
d7e8d0 |
GNU Library General Public License for more details.
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
You should have received a copy of the GNU Library General Public License
|
|
Packit |
d7e8d0 |
along with GPGME++; see the file COPYING.LIB. If not, write to the
|
|
Packit |
d7e8d0 |
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
Packit |
d7e8d0 |
Boston, MA 02110-1301, USA.
|
|
Packit |
d7e8d0 |
*/
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
#ifndef __GPGMEPP_SCDGETINFOASSUANTRANSACTION_H__
|
|
Packit |
d7e8d0 |
#define __GPGMEPP_SCDGETINFOASSUANTRANSACTION_H__
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
#include <interfaces/assuantransaction.h>
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
#include <string>
|
|
Packit |
d7e8d0 |
#include <vector>
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
namespace GpgME
|
|
Packit |
d7e8d0 |
{
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
class GPGMEPP_EXPORT ScdGetInfoAssuanTransaction : public AssuanTransaction
|
|
Packit |
d7e8d0 |
{
|
|
Packit |
d7e8d0 |
public:
|
|
Packit |
d7e8d0 |
enum InfoItem {
|
|
Packit |
d7e8d0 |
Version, // string
|
|
Packit |
d7e8d0 |
Pid, // unsigned long
|
|
Packit |
d7e8d0 |
SocketName, // string (path)
|
|
Packit |
d7e8d0 |
Status, // char (status)
|
|
Packit |
d7e8d0 |
ReaderList, // string list
|
|
Packit |
d7e8d0 |
DenyAdmin, // (none, returns GPG_ERR_GENERAL when admin commands are allowed)
|
|
Packit |
d7e8d0 |
ApplicationList, // string list
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
LastInfoItem
|
|
Packit |
d7e8d0 |
};
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
explicit ScdGetInfoAssuanTransaction(InfoItem item);
|
|
Packit |
d7e8d0 |
~ScdGetInfoAssuanTransaction();
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
std::string version() const;
|
|
Packit |
d7e8d0 |
unsigned int pid() const;
|
|
Packit |
d7e8d0 |
std::string socketName() const;
|
|
Packit |
d7e8d0 |
char status() const;
|
|
Packit |
d7e8d0 |
std::vector<std::string> readerList() const;
|
|
Packit |
d7e8d0 |
std::vector<std::string> applicationList() const;
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
private:
|
|
Packit |
d7e8d0 |
/* reimp */ const char *command() const;
|
|
Packit |
d7e8d0 |
/* reimp */ Error data(const char *data, size_t datalen);
|
|
Packit |
d7e8d0 |
/* reimp */ Data inquire(const char *name, const char *args, Error &err;;
|
|
Packit |
d7e8d0 |
/* reimp */ Error status(const char *status, const char *args);
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
private:
|
|
Packit |
d7e8d0 |
void makeCommand() const;
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
private:
|
|
Packit |
d7e8d0 |
InfoItem m_item;
|
|
Packit |
d7e8d0 |
mutable std::string m_command;
|
|
Packit |
d7e8d0 |
std::string m_data;
|
|
Packit |
d7e8d0 |
};
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
} // namespace GpgME
|
|
Packit |
d7e8d0 |
|
|
Packit |
d7e8d0 |
#endif // __GPGMEPP_SCDGETINFOASSUANTRANSACTION_H__
|