Blame lang/cpp/src/scdgetinfoassuantransaction.h

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