< Previous by Date Date Index Next by Date >
  Thread Index  

[reSIProcate] RES: Question with creating PIDF doc


Hi Subbu,

 

Pidf is subclass of Contents. Look below:

 

void PresenceManager::publish(string state, int expires) {

      Pidf pidf;

      const bool color=blue>true;

      NameAddr myAor = dum.getMasterProfile()->getDefaultFrom();

 

      pidf.setEntity(myAor.uri());

      pidf.setSimpleStatus(online,state.c_str());

 

      SharedPtr<SipMessage> publishMessage = dum.makePublication(myAor,pidf,EVENT,expires);

      dum.send(publishMessage);

};

 

 

Regards,

 

Gustavo Honorato

Software Engineer

Inovax Engenharia de Sistemas

Brazil, Rio de Janeiro

 

 


De: Subramanian Kasi Subramanian [mailto:subbu.subramanian@xxxxxxxxx]
Enviada em: quarta-feira, 16 de maio de 2007 12:39
Para: dienbaquang@xxxxxxxxx
Assunto: Question with creating PIDF doc

 

Hi DBQ
          It looks like I can use the below function to create a PUBLISH message:

SharedPtr<SipMessage> resip::DialogUsageManager::makePublication  (  const NameAddr &        target,  const SharedPtr< UserProfile > &      userProfile,
        const Contents &      body,
        const Data &      eventType,
        UInt32      expiresSeconds,
        AppDialogSet *      = 0
    ) 

Do you know how I can create a PIDF document for the presence state and convert it to the Contents type so that I can embed that as the body of the PUBLISH message.

Thanks much
Subbu

 


You snooze, you lose. Get messages ASAP with AutoCheck
in the all-new Yahoo! Mail Beta.