Пример #1
0
bool PmpPimProtocol::createProfile(iviLink::Profile::Uid const& profileUid,
        iviLink::Profile::IUid const& piuid,
        iviLink::Service::Uid const& sid)
{
    UInt32 size = sizeof(PMPFrame);
    size += stringInBufSize(profileUid.value());
    size += stringInBufSize(piuid.value());
    size += stringInBufSize(sid.value());

    UInt8 * pBuf = new UInt8[size];
    PMPFrame * pReq = reinterpret_cast<PMPFrame*>(pBuf);
    pReq->size = size;
    pReq->reqType = PMP_REQ_PIM_CREATE_PROFILE;

    stringToBuffer(profileUid.value(),pReq->data,true);
    unsigned int pos = stringInBufSize(profileUid.value());
    stringToBuffer(piuid.value(),pReq->data + pos,true);
    pos += stringInBufSize(piuid.value());
    stringToBuffer(sid.value(),pReq->data + pos,true);

    bool res = mPmpProtocol->makePimRequest(*pReq);
    delete [] pReq;

    return res;
}
Пример #2
0
void CPIM::profileDied(iviLink::Profile::IUid const& piuid)
{
   LOG4CPLUS_TRACE_METHOD(logger, __PRETTY_FUNCTION__ + (" piuid " + piuid.value()));
   // Here is the thread border - to return the code flow to the ipc as
   // fast as possible

   CProfileDiedJobData* data = new CProfileDiedJobData(this, piuid);
   CThreadPoolJob job(CPIMJobStarter::profileDied, data);
   mpThreadPool->addJob(job);
}
Пример #3
0
void CPIM::incomingProfileInternal(iviLink::Profile::Uid const& profileUid,
      iviLink::Profile::ApiUid const& papiUid,
      iviLink::Profile::IUid const& piuid,
      iviLink::Service::Uid const& serviceUID)
{
   LOG4CPLUS_TRACE_METHOD(logger, __PRETTY_FUNCTION__ + (" uid " + profileUid.value() + " piuid" + piuid.value() + " sid " + serviceUID.value()));

   CPMALComponentMgr* mgr = CPMALComponentMgr::getInstance();
   if (!mgr)
   {
      LOG4CPLUS_ERROR(logger, "!mgr");
      return;
   }

   IProfileManagerCallbacks* clb = mgr->getProfileManagerCallbacks();
   if (!clb)
   {
      LOG4CPLUS_ERROR(logger, "!clb");
      return;
   }

   CError err = clb->serviceRequestCallback(serviceUID);
   if (!err.isNoError())
   {
      LOG4CPLUS_ERROR(logger, static_cast<std::string>(err));
      return;
   }

   mIncomingPrfMapMutex.lock();
   {
      mIncomingPrfMap.insert(std::make_pair(std::make_pair(serviceUID, profileUid), piuid));
   }
   mIncomingPrfMapMutex.unlock();

   clb->incomingProfile(serviceUID, profileUid, papiUid);
}
Пример #4
0
void CPIM::incomingProfile(iviLink::CUid const& profileUid,
         iviLink::Profile::ApiUid const& papiUid,
         iviLink::Profile::IUid const& piuid,
         iviLink::Service::Uid const& serviceUID)
{
   LOG4CPLUS_TRACE_METHOD(logger, __PRETTY_FUNCTION__ + (" uid " + profileUid.value() + " piuid" + piuid.value() + " sid " + serviceUID.value()));
   // Here is the thread border - to return the code flow to the ipc as
   // fast as possible
   CIncomingProfileJobData* data = new CIncomingProfileJobData(this, profileUid, papiUid, piuid, serviceUID);
   CThreadPoolJob job(CPIMJobStarter::incomingProfile, data);
   mpThreadPool->addJob(job);
}