<div dir="ltr">Thank you. It works.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 29 March 2018 at 21:17, Spyridon (Spyros) Mastorakis <span dir="ltr"><<a href="mailto:mastorakis@cs.ucla.edu" target="_blank">mastorakis@cs.ucla.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi,<div><br></div><div>use the Interest constructor that accepts a Block and pass the wire format of the existing Interest using the wireEncode method.</div><div><br></div><div>Then, use the setName method to set the name of the new Interest.</div><div><br></div><div>Thanks,</div><div><br></div><div><div>
<div><div><div><span style="float:none;display:inline!important">Spyridon (Spyros) Mastorakis</span><br><span style="float:none;display:inline!important">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank">http://cs.ucla.edu/~<wbr>mastorakis/</a><br><span style="float:none;display:inline!important">Internet Research Laboratory</span><br><span style="float:none;display:inline!important">Computer Science Department</span><br><span style="float:none;display:inline!important">UCLA</span></div><div><br></div></div></div></div><div><div class="h5"><div><blockquote type="cite"><div>On Mar 29, 2018, at 7:37 AM, Mudasir Qazi <<a href="mailto:mudasirqazi00@gmail.com" target="_blank">mudasirqazi00@gmail.com</a>> wrote:</div><br class="m_-2768515687573767488Apple-interchange-newline"><div><div dir="ltr"><div><div>Hi, <br><br></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><br><span style="font-family:tahoma,sans-serif">Interest& createTemporaryInterest(const Interest& interest){<br>          shared_ptr<Interest> tempInterest = Interest(interest);<br>          const Name& tempName = "...";<br clear="all"></span><div><div><span style="font-family:tahoma,sans-serif">          tempInterest->setName(</span><span style="font-family:tahoma,sans-serif">tempName<wbr>);</span></div></div></div><span style="font-family:tahoma,sans-serif">          return tempInterest;<br></span><div><span style="font-family:tahoma,sans-serif">}<br></span><span style="font-family:tahoma,sans-serif"></span><br><div><div>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><br></div><div>How can I achieve this? Please help.<br></div><div><br>-- <br><div class="m_-2768515687573767488m_-7160150495295786079gmail-m_-3294749084534071352gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><span style="font-family:georgia,serif">Regards,<br></span></div><div><span style="font-family:georgia,serif">Mudasir Qazi<br></span></div></div></div></div></div></div></div></div></div>
</div></div></div></div><br></div></blockquote></div><br></div></div></div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><span style="font-family:georgia,serif">Regards,<br></span></div><div><span style="font-family:georgia,serif">Mudasir Qazi<br></span></div></div></div></div></div></div></div></div></div>
</div>