mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-24 14:20:44 -04:00
Get the basics of TheWire service working
Added REF fields to Wire Msgs to allow replys to work well. Added description of how the Message fields should be used. Added WireGroupDialog for creation of WireGroups. Updated PulseAddDialog to support publishing Pulses and Replies. Added classes to display Pulses / Groups. Added single selection point of WireGroup for publishing. Added basic "refresh" to reload new GXS data.
This commit is contained in:
parent
b1680bd591
commit
24fd4ae3e7
23 changed files with 2303 additions and 1110 deletions
|
@ -29,16 +29,16 @@
|
|||
|
||||
RsItem *RsGxsWireSerialiser::create_item(uint16_t service,uint8_t item_subtype) const
|
||||
{
|
||||
if(service != RS_SERVICE_GXS_TYPE_WIRE)
|
||||
return NULL ;
|
||||
if(service != RS_SERVICE_GXS_TYPE_WIRE)
|
||||
return NULL ;
|
||||
|
||||
switch(item_subtype)
|
||||
{
|
||||
case RS_PKT_SUBTYPE_WIRE_GROUP_ITEM: return new RsGxsWireGroupItem();
|
||||
case RS_PKT_SUBTYPE_WIRE_PULSE_ITEM: return new RsGxsWirePulseItem();
|
||||
default:
|
||||
return NULL ;
|
||||
}
|
||||
switch(item_subtype)
|
||||
{
|
||||
case RS_PKT_SUBTYPE_WIRE_GROUP_ITEM: return new RsGxsWireGroupItem();
|
||||
case RS_PKT_SUBTYPE_WIRE_PULSE_ITEM: return new RsGxsWirePulseItem();
|
||||
default:
|
||||
return NULL ;
|
||||
}
|
||||
}
|
||||
|
||||
void RsGxsWireGroupItem::clear()
|
||||
|
@ -48,18 +48,30 @@ void RsGxsWireGroupItem::clear()
|
|||
|
||||
void RsGxsWireGroupItem::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx)
|
||||
{
|
||||
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_DESCR,group.mDescription,"group.mDescription") ;
|
||||
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_DESCR,group.mDescription,"group.mDescription") ;
|
||||
}
|
||||
|
||||
void RsGxsWirePulseItem::clear()
|
||||
{
|
||||
pulse.mPulseText.clear();
|
||||
pulse.mHashTags.clear();
|
||||
pulse.mPulseType = 0;
|
||||
pulse.mRefGroupId.clear();
|
||||
pulse.mRefGroupName.clear();
|
||||
pulse.mRefOrigMsgId.clear();
|
||||
pulse.mRefAuthorId.clear();
|
||||
pulse.mRefPulseText.clear();
|
||||
}
|
||||
|
||||
void RsGxsWirePulseItem::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx)
|
||||
{
|
||||
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_MSG,pulse.mPulseText,"pulse.mPulseText") ;
|
||||
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_HASH_TAG,pulse.mHashTags,"pulse.mHashTags") ;
|
||||
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_MSG,pulse.mPulseText,"pulse.mPulseText") ;
|
||||
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_UINT32_PARAM,pulse.mPulseType,"pulse.mPulseType") ;
|
||||
RsTypeSerializer::serial_process(j,ctx,pulse.mRefGroupId,"pulse.mRefGroupId") ;
|
||||
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_NAME,pulse.mRefGroupName,"pulse.mRefGroupName") ;
|
||||
RsTypeSerializer::serial_process(j,ctx,pulse.mRefOrigMsgId,"pulse.mRefOrigMsgId") ;
|
||||
RsTypeSerializer::serial_process(j,ctx,pulse.mRefAuthorId,"pulse.mRefAuthorId") ;
|
||||
RsTypeSerializer::serial_process(j,ctx,pulse.mRefPublishTs,"pulse.mRefPublishTs") ;
|
||||
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_MSG,pulse.mRefPulseText,"pulse.mRefPulseText") ;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue