Ejemplo n.º 1
0
    virtual void UnorderedRemove(ITopology2Group* aItem)
    {
        Bwh* result = new Bwh(100);
        result->Replace(aItem->Device().Udn());
        result->Append(" Group Removed");

        iFactory->Destroy(aItem->Device().Udn());
        iRunner.Result(result);
    }
Ejemplo n.º 2
0
    virtual void UnorderedAdd(ITopology2Group* aItem)
    {
        Bwh* result = new Bwh(100);
        result->Replace(aItem->Device().Udn());
        result->Append(Brn(" Group Added"));
        iRunner.Result(result);

        FunctorGeneric<MockCbData<Brn>*> fRoom = MakeFunctorGeneric(*this, &GroupWatcher::RoomCallback);
        FunctorGeneric<MockCbData<Brn>*> fName = MakeFunctorGeneric(*this, &GroupWatcher::NameCallback);
        FunctorGeneric<MockCbData<TUint>*> fSourceIndex = MakeFunctorGeneric(*this, &GroupWatcher::SourceIndexCallback);
        FunctorGeneric<MockCbData<TBool>*> fStandby = MakeFunctorGeneric(*this, &GroupWatcher::StandbyCallback);

        iFactory->Create<Brn>(aItem->Device().Udn(), aItem->RoomName(), fRoom);
        iFactory->Create<Brn>(aItem->Device().Udn(), aItem->Name(), fName);
        iFactory->Create<TUint>(aItem->Device().Udn(), aItem->SourceIndex(), fSourceIndex);
        iFactory->Create<TBool>(aItem->Device().Udn(), aItem->Standby(), fStandby);

        std::vector<Watchable<ITopology2Source*>*> sources = aItem->Sources();
        for(TUint i=0; i<sources.size(); i++)
        {
            iFactory->Create<ITopology2Source*>(aItem->Device().Udn(), *(sources[i]), MakeFunctorGeneric(*this, &GroupWatcher::SourcesCallback));
        }

    }