Expose pgpIdFromFingerprint to JSON API

+ missing explicit in one paramether costructor
This commit is contained in:
Gioacchino Mazzurco 2020-03-31 23:21:59 +02:00
parent 9d325e3d17
commit b42c0410f1
No known key found for this signature in database
GPG Key ID: A1FBCA3872E87051

View File

@ -3,7 +3,9 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2004-2008 by Robert Fernie <retroshare@lunamutt.com> * * Copyright (C) 2004-2008 by Robert Fernie <retroshare@lunamutt.com> *
* Copyright (C) 2018-2020 Gioacchino Mazzurco <gio@eigenlab.org> *
* Copyright (C) 2020 Asociación Civil Altermundi <info@altermundi.net> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *
@ -468,7 +470,7 @@ struct RsGroupInfo : RsSerializable
struct RsPeerStateChangedEvent : RsEvent struct RsPeerStateChangedEvent : RsEvent
{ {
/// @param[in] sslId is of the peer which changed state /// @param[in] sslId is of the peer which changed state
RsPeerStateChangedEvent(RsPeerId sslId); explicit RsPeerStateChangedEvent(RsPeerId sslId);
/// Storage fot the id of the peer that changed state /// Storage fot the id of the peer that changed state
RsPeerId mSslId; RsPeerId mSslId;
@ -605,7 +607,15 @@ public:
virtual bool getAssociatedSSLIds(const RsPgpId& gpg_id, std::list<RsPeerId>& ids) = 0; virtual bool getAssociatedSSLIds(const RsPgpId& gpg_id, std::list<RsPeerId>& ids) = 0;
virtual bool gpgSignData(const void *data, const uint32_t len, unsigned char *sign, unsigned int *signlen, std::string reason = "") = 0; virtual bool gpgSignData(const void *data, const uint32_t len, unsigned char *sign, unsigned int *signlen, std::string reason = "") = 0;
virtual RsPgpId pgpIdFromFingerprint(const RsPgpFingerprint& fpr) = 0; /**
* @brief Convert PGP fingerprint to PGP id
* @jsonapi{development}
* Helper method useful while we port the whole RetroShare codebase from
* RsPgpId to RsPgpFingerprint
* @param[in] fpr PGP fingerprint to convert
* @return PGP id corresponding to the fingerprint
*/
virtual RsPgpId pgpIdFromFingerprint(const RsPgpFingerprint& fpr) = 0;
// Note: the two methods below could be unified. The fact that one of them can take an optional RsPeerDetails struct as parameter // Note: the two methods below could be unified. The fact that one of them can take an optional RsPeerDetails struct as parameter
// seems quite inconsistent. // seems quite inconsistent.