Author Topic: Copy All Parameters from Handled message  (Read 1243 times)


  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Copy All Parameters from Handled message
« on: September 03, 2018, 08:07:43 AM »

i just want to copy all the parameters from dispatched message into new message, so that i can emit this message without missing any parameters.

 Message* m = new Message("call.route");
 if (Engine::dispatch(m))
  Message* notify = new Message("chan.masquerade");
  notify->addParam("id", msg.getParam(YSTRING("id"))->c_str());
  notify->addParam("message", "call.execute");
  notify->copyParams(m,notify); // Like this i need to copy all the paramaters from dispatched message to new message.

By any loop or any default function available. ?

Kindly help me out

Ioana Stanciu

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: Copy All Parameters from Handled message
« Reply #1 on: September 05, 2018, 06:20:44 AM »
notify->copyParams(*m) is what you are looking for.

Please see: