Example #1
0
void PmpPimProtocol::onCreateProfile(PMPFrame * pFrame)
{
    assert(pFrame);
    assert(mEventFactory);

    std::string str = bufferToString(pFrame->data,true);
    unsigned int pos = stringInBufSize(str);
    iviLink::Profile::Uid profileUid(str);
    str = bufferToString(pFrame->data + pos,true);
    pos += stringInBufSize(str);
    iviLink::Profile::IUid piuid(str);
    str = bufferToString(pFrame->data + pos,true);
    iviLink::Service::Uid sid(str);

    mEventFactory->pimProtocolCreateProfile(profileUid, piuid, sid);
}
Example #2
0
      void CPmpPimClbCtrl::onCreateProfile(PMPFrame * pFrame)
      {
         std::string str = bufferToString(pFrame->data,true);
         unsigned int pos = stringInBufSize(str);
         iviLink::Profile::Uid profileUid(str);
         str = bufferToString(pFrame->data + pos,true);
         pos += stringInBufSize(str);
         iviLink::Profile::IUid piuid(str);
         str = bufferToString(pFrame->data + pos,true);
         iviLink::Service::Uid sid(str);

         mpPimClb->onCreateProfile(profileUid,piuid,sid);

         PMPFrame pResp;
         pResp.size = sizeof(PMPFrame);
         pResp.frameType = PMP_FRAME_TYPE_RESPONSE;
         pResp.id = pFrame->id;
         pResp.client = pFrame->client;
         pResp.reqType = pFrame->reqType;

         mpProtocol->makeResponse(pResp);
      }