load/save of banlist comments. Removed unused menu entries. Added auto-fill of input fields on sleection

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8343 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-06-02 13:02:20 +00:00
parent 25c0dfe69e
commit 777c915be2
7 changed files with 74 additions and 26 deletions

View file

@ -43,7 +43,8 @@ void RsTlvBanListEntry::TlvClear()
addr.TlvClear();
level = 0;
reason = 0;
age = 0;
age = 0;
comment.clear();
}
uint32_t RsTlvBanListEntry::TlvSize() const
@ -55,6 +56,7 @@ uint32_t RsTlvBanListEntry::TlvSize() const
s += 4; // reason;
s += 4; // age;
s += 1; // masked_bytes;
s += GetTlvStringSize(comment) ;
return s;
@ -81,6 +83,7 @@ bool RsTlvBanListEntry::SetTlv(void *data, uint32_t size, uint32_t *offset) con
ok &= setRawUInt32(data, tlvend, offset, reason);
ok &= setRawUInt32(data, tlvend, offset, age);
ok &= setRawUInt8(data, tlvend, offset, masked_bytes);
ok &= SetTlvString(data, tlvend, offset, TLV_TYPE_STR_COMMENT, comment);
return ok;
@ -118,6 +121,7 @@ bool RsTlvBanListEntry::GetTlv(void *data, uint32_t size, uint32_t *offset)
uint8_t tmp ;
ok &= getRawUInt8(data, tlvend, offset, &(tmp));
masked_bytes = tmp ;
ok &= GetTlvString(data, tlvend, offset, TLV_TYPE_STR_COMMENT, comment);
/***************************************************************************
* NB: extra components could be added (for future expansion of the type).

View file

@ -52,6 +52,7 @@ virtual std::ostream &print(std::ostream &out, uint16_t indent) const;
uint32_t reason;
uint32_t age;
uint8_t masked_bytes ;
std::string comment ;
};
typedef t_RsTlvList<RsTlvBanListEntry,TLV_TYPE_BAN_LIST> RsTlvBanList;

View file

@ -226,7 +226,8 @@ const uint16_t TLV_TYPE_DSDV_ENDPOINT = 0x1080;
const uint16_t TLV_TYPE_DSDV_ENTRY = 0x1081;
const uint16_t TLV_TYPE_DSDV_ENTRY_SET= 0x1082;
const uint16_t TLV_TYPE_BAN_ENTRY = 0x1090;
const uint16_t TLV_TYPE_BAN_ENTRY_dep = 0x1090;
const uint16_t TLV_TYPE_BAN_ENTRY = 0x1092;
const uint16_t TLV_TYPE_BAN_LIST = 0x1091;
const uint16_t TLV_TYPE_MSG_ADDRESS = 0x10A0;