CError CAppManPmpIpcClient::applicationRequest(iviLink::Service::SessionUid session, iviLink::Service::Uid service)
 {
    LOG4CPLUS_TRACE_METHOD(msLogger, __PRETTY_FUNCTION__);
    UInt32 type = 0;
    UInt32 size = sizeof(type) + sizeof(size);
    size += stringInBufSize(session.value());
    size += stringInBufSize(service.value());
    UInt8 * buf = new UInt8[size];
    memcpy(buf,&size,sizeof(size));
    UInt32 pos = sizeof(size);
    memcpy(buf+pos,&type,sizeof(type));
    pos += sizeof(type);
    stringToBuffer(session.value(),buf+pos,false);
    pos += stringInBufSize(session.value());
    stringToBuffer(service.value(),buf+pos,false);
    UInt8 * resp = new UInt8[1];
    UInt32 rSize;
    CError err = mpIpc->request(genId(),buf,size,resp,rSize);
    delete [] buf;
    delete [] resp;
    return err;
 }
Beispiel #2
0
CError CPIM::sessionRequest(iviLink::Service::SessionUid session,
   iviLink::Service::Uid service)
{
   LOG4CPLUS_TRACE_METHOD(logger, __PRETTY_FUNCTION__ + (" session " + session.value() + " service " + service.value()));

   CPMALComponentMgr *pMgr = CPMALComponentMgr::getInstance();
   if (pMgr)
   {
      IPMALIpcToPIM* ipc = pMgr->getIpcToPIM();
      if (ipc)
      {
         CError err = ipc->readyToServe(session);
         if (!err.isNoError())
         {
            LOG4CPLUS_ERROR(logger, static_cast<std::string>(err));
         }

         return err;
      }
      return CError(1, gModuleName, CError::ERROR, "sessionRequest() no ipc");
   }
   return CError(1, gModuleName, CError::ERROR, "sessionRequest() no manager");
}