2018-11-13 22:02:26 +01:00
|
|
|
/*******************************************************************************
|
|
|
|
* gui/feeds/SecurityItem.h *
|
|
|
|
* *
|
|
|
|
* Copyright (c) 2008, Robert Fernie <retroshare.project@gmail.com> *
|
|
|
|
* *
|
|
|
|
* This program is free software: you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU Affero General Public License as *
|
|
|
|
* published by the Free Software Foundation, either version 3 of the *
|
|
|
|
* License, or (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU Affero General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU Affero General Public License *
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
|
|
|
* *
|
|
|
|
*******************************************************************************/
|
2011-07-11 15:53:41 +00:00
|
|
|
|
|
|
|
#ifndef _SECURITY_ITEM_DIALOG_H
|
|
|
|
#define _SECURITY_ITEM_DIALOG_H
|
|
|
|
|
|
|
|
#include "ui_SecurityItem.h"
|
2014-11-15 17:24:49 +00:00
|
|
|
#include "FeedItem.h"
|
2011-07-11 15:53:41 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2014-01-15 20:19:17 +00:00
|
|
|
//const uint32_t SEC_TYPE_CONNECT_ATTEMPT = 0x0001; /* failed Connect Attempt */
|
|
|
|
//const uint32_t SEC_TYPE_AUTH_DENIED = 0x0002; /* failed outgoing attempt */
|
|
|
|
//const uint32_t SEC_TYPE_UNKNOWN_IN = 0x0003; /* failed incoming with unknown peer */
|
|
|
|
//const uint32_t SEC_TYPE_UNKNOWN_OUT = 0x0004; /* failed outgoing with unknown peer */
|
2011-07-11 15:53:41 +00:00
|
|
|
|
|
|
|
class FeedHolder;
|
|
|
|
|
2014-11-15 17:24:49 +00:00
|
|
|
class SecurityItem : public FeedItem, private Ui::SecurityItem
|
2011-07-11 15:53:41 +00:00
|
|
|
{
|
2011-08-21 22:28:19 +00:00
|
|
|
Q_OBJECT
|
2011-07-11 15:53:41 +00:00
|
|
|
|
|
|
|
public:
|
2011-08-21 22:28:19 +00:00
|
|
|
/** Default Constructor */
|
2014-11-15 17:24:49 +00:00
|
|
|
SecurityItem(FeedHolder *parent, uint32_t feedId, const RsPgpId &gpgId, const RsPeerId &sslId, const std::string &sslCn, const std::string& ip_addr,uint32_t type, bool isHome);
|
2011-07-11 15:53:41 +00:00
|
|
|
|
|
|
|
void updateItemStatic();
|
|
|
|
|
2019-12-21 14:33:53 +01:00
|
|
|
uint64_t uniqueIdentifier() const override;
|
2014-11-15 17:24:49 +00:00
|
|
|
|
2015-06-17 18:59:12 +00:00
|
|
|
protected:
|
2014-11-15 17:24:49 +00:00
|
|
|
/* FeedItem */
|
2015-06-17 18:59:12 +00:00
|
|
|
virtual void doExpand(bool open);
|
2011-08-21 22:28:19 +00:00
|
|
|
|
2011-07-11 15:53:41 +00:00
|
|
|
private slots:
|
|
|
|
/* default stuff */
|
2020-01-14 21:43:29 +01:00
|
|
|
void toggle() override;
|
2011-07-11 15:53:41 +00:00
|
|
|
|
2012-04-04 15:44:35 +00:00
|
|
|
void friendRequest();
|
2011-07-11 15:53:41 +00:00
|
|
|
void removeFriend();
|
2011-08-21 22:28:19 +00:00
|
|
|
void peerDetails();
|
2011-07-11 15:53:41 +00:00
|
|
|
void sendMsg();
|
|
|
|
void openChat();
|
|
|
|
|
|
|
|
void updateItem();
|
2011-08-21 22:28:19 +00:00
|
|
|
|
2011-07-11 15:53:41 +00:00
|
|
|
private:
|
2014-11-15 17:24:49 +00:00
|
|
|
RsPgpId mGpgId;
|
|
|
|
RsPeerId mSslId;
|
2013-01-19 19:24:08 +00:00
|
|
|
std::string mSslCn;
|
2012-09-09 20:25:39 +00:00
|
|
|
std::string mIP;
|
2011-07-11 15:53:41 +00:00
|
|
|
uint32_t mType;
|
|
|
|
bool mIsHome;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|