예제 #1
0
CpiService::CpiService(const TChar* aDomain, const TChar* aName, TUint aVersion, CpiDevice& aDevice)
    : Service(aDevice.GetCpStack().Env(), aDomain, aName, aVersion)
    , iDevice(aDevice)
    , iLock("SRVM")
    , iPendingInvocations(0)
    , iShutdownSignal("SRVS", 0)
    , iInterrupt(false)
    , iSubscription(NULL)
{
    iDevice.AddRef();
    iDevice.GetCpStack().Env().AddObject(this);
}
예제 #2
0
CpiSubscription::CpiSubscription(CpiDevice& aDevice, IEventProcessor& aEventProcessor, const OpenHome::Net::ServiceType& aServiceType)
    : iLock("SUBM")
    , iSubscriberLock("SBM2")
    , iDevice(aDevice)
    , iEventProcessor(&aEventProcessor)
    , iServiceType(aServiceType)
    , iPendingOperation(eNone)
    , iRefCount(1)
    , iInterruptHandler(NULL)
{
    iTimer = new Timer(aDevice.GetCpStack().Env(), MakeFunctor(*this, &CpiSubscription::Renew));
    iDevice.AddRef();
    iRejectFutureOperations = false;
    Schedule(eSubscribe);
    iDevice.GetCpStack().Env().AddObject(this);
}
예제 #3
0
CpiService::CpiService(const TChar* aDomain, const TChar* aName, TUint aVersion, CpiDevice& aDevice)
    : Service(aDevice.GetCpStack().Env(), aDomain, aName, aDevice.Version(aDomain, aName, aVersion))
    , iDevice(aDevice)
    , iLock("SRVM")
    , iPendingInvocations(0)
    , iShutdownSignal("SRVS", 0)
    , iInterrupt(false)
    , iSubscription(NULL)
{
    iDevice.AddRef();
    iDevice.GetCpStack().Env().AddObject(this);
    if (aVersion != iServiceType.Version()) {
        const Brx& serviceName = iServiceType.FullName();
        const Brx& udn = iDevice.Udn();
        LOG(kService, "CpiService: addr=%p, serviceType=%.*s, device=%.*s, proxy: v%u, device: v%u\n",
                      this, PBUF(serviceName), PBUF(udn), aVersion, iServiceType.Version());
    }
}