<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">use the Interest constructor that accepts a Block and pass the wire format of the existing Interest using the wireEncode method.</div><div class=""><br class=""></div><div class="">Then, use the setName method to set the name of the new Interest.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class=""><div class="">
<div class=""><div class=""><div class=""><span class="" style="float: none; display: inline !important;">Spyridon (Spyros) Mastorakis</span><br class=""><span class="" style="float: none; display: inline !important;">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""><span class="" style="float: none; display: inline !important;">Internet Research Laboratory</span><br class=""><span class="" style="float: none; display: inline !important;">Computer Science Department</span><br class=""><span class="" style="float: none; display: inline !important;">UCLA</span></div><div class=""><br class=""></div></div></div></div><div><blockquote type="cite" class=""><div class="">On Mar 29, 2018, at 7:37 AM, Mudasir Qazi <<a href="mailto:mudasirqazi00@gmail.com" class="">mudasirqazi00@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class="">Hi, <br class=""><br class=""></div>I'm trying to create new Interest packet from an existing one. The function will be passed existing Interest in parameter e.g.,<br class=""><br class=""><span style="font-family:tahoma,sans-serif" class="">Interest& createTemporaryInterest(const Interest& interest){<br class="">          shared_ptr<Interest> tempInterest = Interest(interest);<br class="">          const Name& tempName = "...";<br clear="all" class=""></span><div class=""><div class=""><span style="font-family:tahoma,sans-serif" class="">          tempInterest->setName(</span><wbr class=""><span style="font-family:tahoma,sans-serif" class="">tempName);</span></div></div></div><span style="font-family:tahoma,sans-serif" class="">          return tempInterest;<br class=""></span><div class=""><span style="font-family:tahoma,sans-serif" class="">}<br class=""></span><span style="font-family:tahoma,sans-serif" class=""></span><br class=""><div class=""><div class="">Basically I need all properties of an Interest copied to another interest. Then I'll set custom name of newly created Interest. So, In short, the newly created Interest will have all properties of existing one but the name.<br class=""><br class=""></div><div class="">How can I achieve this? Please help.<br class=""></div><div class=""><br class="">-- <br class=""><div class="m_-7160150495295786079gmail-m_-3294749084534071352gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><span style="font-family:georgia,serif" class="">Regards,<br class=""></span></div><div class=""><span style="font-family:georgia,serif" class="">Mudasir Qazi<br class=""></span></div></div></div></div></div></div></div></div></div>
</div></div></div></div><br class=""></div></blockquote></div><br class=""></div></body></html>