void rice::pastry::testing::PingMessageNew::ctor(int32_t pingAddress, ::rice::pastry::NodeHandle* src, ::rice::pastry::Id* tgt) { super::ctor(pingAddress); init(); setSender(src); target = tgt; }
Message::Message(quint32 pNo, Member* sender, quint32 cmd, QByteArray payload) { setPacketNo(pNo); setSender(sender); setCommand(cmd); setPayload(payload); }
void rice::pastry::commonapi::PastryEndpointMessage::ctor(int32_t address, ::rice::p2p::commonapi::rawserialization::RawMessage* message, ::rice::pastry::NodeHandle* sender) { super::ctor(address); checkRawType(message); setSender(sender); this->message = message; setPriority(npc(message)->getPriority()); }
void rice::pastry::pns::messages::LeafSetRequest::ctor(::rice::pastry::NodeHandle* nodeHandle, int32_t dest) { super::ctor(dest); if(nodeHandle == nullptr) throw new ::java::lang::IllegalArgumentException(u"nodeHandle == null!"_j); setSender(nodeHandle); setPriority(HIGH_PRIORITY); }
void ccPacketHandler::buildDetectedNodePacket(byte sender, byte neighbourID) { clearPacket(); setReceiver(SERVER_01); setSender(sender); setAdminKey(NEAR_NODE_EVENT); setNeighbourId(neighbourID); setBuildCounter(4); }
// I assume this is the same as the sender? // U also assume that this is like "Name <address>" void KTNEFWriter::setOrganizer( const QString& organizer ) { int i = organizer.find( '<' ); if ( i == -1 ) return; QString name = organizer.left( i ); name.stripWhiteSpace(); QString email = organizer.right( i+1 ); email = email.left( email.length()-1 ); email.stripWhiteSpace(); setSender( name, email ); }
void ccPacketHandler::buildPacket(byte receiver, byte sender, byte adminKey) { clearPacket(); /// clear existing ccPacket setReceiver(receiver); /// set given receiver setSender(sender); /// set sender setAdminKey(adminKey); /// set given administration key setBuildCounter(3); /// set build counter to next free byte's position }
Message::Message() { d = new MessageData; qRegisterMetaType<Message>("Message"); setType( "" ); setPayload( "" ); setSenderID( 0 ); setGroupID( 0 ); setSeconds( 0 ); setUseconds( 0 ); setBridgeID( 0 ); setHist( false ); setName( "Unknown" ); setSender( 0 ); }
void ccPacketHandler::buildPacket(byte receiver, byte sender, byte adminKey) { clearPacket(); setReceiver(receiver); setSender(sender); setAdminKey(adminKey); setBuildCounter(3); }
void ccPacketHandler::buildRSSIPacket(byte sender, byte rawRSSI, byte neighbourID) { clearPacket(); /// clear the packet setReceiver(SERVER_01); setSender(sender); setAdminKey(NEAR_NODE_EVENT); setDetectedRSSI(rawRSSI); setNeighbourId(neighbourID); setBuildCounter(5); /// set build counter to next free byte's position }
void rice::pastry::join::JoinRequest::ctor(::rice::p2p::commonapi::rawserialization::InputBuffer* buf, ::rice::pastry::NodeHandleFactory* nhf, ::rice::pastry::NodeHandle* sender, ::rice::pastry::PastryNode* localNode) /* throws(IOException) */ { super::ctor(JoinAddress::getCode()); auto version = npc(buf)->readByte(); { int32_t numRows; int32_t numCols; switch (version) { case int32_t(1): timestamp = npc(buf)->readLong(); case int32_t(0): setSender(sender); rtBaseBitLength = npc(buf)->readByte(); initialize(rtBaseBitLength); handle = java_cast< ::rice::pastry::NodeHandle* >(npc(nhf)->readNodeHandle(buf)); if(npc(buf)->readBoolean()) joinHandle = java_cast< ::rice::pastry::NodeHandle* >(npc(nhf)->readNodeHandle(buf)); rowCount = npc(buf)->readShort(); numRows = ::rice::pastry::Id::IdBitLength / rtBaseBitLength; numCols = int32_t(1) << rtBaseBitLength; for (auto i = int32_t(0); i < numRows; i++) { ::rice::pastry::routing::RouteSetArray* thisRow; if(npc(buf)->readBoolean()) { thisRow = new ::rice::pastry::routing::RouteSetArray(numCols); for (auto j = int32_t(0); j < numCols; j++) { if(npc(buf)->readBoolean()) { thisRow->set(j, new ::rice::pastry::routing::RouteSet(buf, nhf, localNode)); } else { thisRow->set(j, nullptr); } } } else { thisRow = nullptr; } rows->set(i, thisRow); } if(npc(buf)->readBoolean()) leafSet = ::rice::pastry::leafset::LeafSet::build(buf, nhf); break; default: throw new ::java::io::IOException(::java::lang::StringBuilder().append(u"Unknown Version: "_j)->append(version)->toString()); } } }
void ccPacketHandler::buildPatternCommand(byte receiver, byte PatternKey, byte colorKey1, byte colorKey2) { clearPacket(); setReceiver(receiver); setSender(SERVER_01); setAdminKey(PatternKey); setFirstColor(colorKey1); setSecondColor(colorKey2); setBuildCounter(5); }
Message::Message( QString type, QByteArray payload, quint64 senderID, quint64 groupID, quint32 seconds, quint32 useconds, quint32 bridgeID, bool hist , QString name, Target* sender ) { d = new MessageData; qRegisterMetaType<Message>("Message"); setType( type ); setPayload( payload ); setSenderID( senderID ); setGroupID( groupID ); setSeconds( seconds ); setUseconds( useconds ); setBridgeID( bridgeID ); setHist( hist ); setName( name ); setSender( sender ); }
void ccPacketHandler::acknowledge() { byte sender = getPacketSender(); /// save sender byte receiver = getPacketReceiver(); /// save receiver byte ulf = ccHash(); /// hash the data clearPacket(); /// clear the packet setReceiver(sender); /// set sender as receiver setSender(receiver); /// set receiver as sender setAdminKey(ACKNOWLEDGE_REQUEST); /// set acknowlegde key setPackNum(ulf); /// set the hash as data }
void ccPacketHandler::testPacket(byte receiver, byte sender) { for (byte i = 0; i < _ccPacket.length; ++i) /// fill packet with zeros { _ccPacket.data[i] = i; /// set i-th byte := i for each byte in the packet } setReceiver(receiver); /// setting receiver setSender(sender); /// setting sender setAdminKey(TEST); /// setting administration key - default := 255 setHash(ccHash()); /// hashing the data and saving in member _hash }
void Message::toMessage(string msg) { /* local variables */ int i, len, x; string temp = ""; time_t t_temp; /* algorithm */ if (msg[0]=='4') { i = 2; len = msg.length(); //sender temp = getSubstr(msg, i, ';'); setSender(temp); temp = ""; //receiver i++; temp = getSubstr(msg, i, ';'); setReceiver(temp); temp = ""; //timestamp i++; temp = getSubstr(msg, i, ';'); istringstream buffer(temp); int x; buffer >> x; t_temp = x; setTimestamp(t_temp); temp = ""; //message body i++; temp = getSubstr(msg, i, ';'); text = temp; temp = ""; //type i++; temp = getSubstrInt(msg, i, len); type = temp; }
void rice::pastry::commonapi::PastryEndpointMessage::ctor(int32_t address, ::rice::p2p::commonapi::rawserialization::InputBuffer* buf, ::rice::p2p::commonapi::rawserialization::MessageDeserializer* md, int16_t type, int32_t priority, ::rice::pastry::NodeHandle* sender) /* throws(IOException) */ { super::ctor(address); int8_t version = int32_t(0); switch (version) { case int32_t(0): setSender(sender); if(type == 0) { message = new ::rice::p2p::util::rawserialization::JavaSerializedMessage(npc(md)->deserialize(buf, type, priority, sender)); } else { message = java_cast< ::rice::p2p::commonapi::rawserialization::RawMessage* >(npc(md)->deserialize(buf, type, priority, sender)); } if(getMessage() == nullptr) throw new ::java::io::IOException(::java::lang::StringBuilder().append(u"PEM.deserialize() message = null type:"_j)->append(type) ->append(u" md:"_j) ->append(static_cast< ::java::lang::Object* >(md))->toString()); break; default: throw new ::java::io::IOException(::java::lang::StringBuilder().append(u"Unknown Version: "_j)->append(version)->toString()); } }
QxtMailMessage::QxtMailMessage(const QString& sender, const QString& recipient) { qxt_d = new QxtMailMessagePrivate; setSender(sender); addRecipient(recipient); }