当前位置: 首页>>代码示例>>C++>>正文


C++ DviSubscription::RemoveRef方法代码示例

本文整理汇总了C++中DviSubscription::RemoveRef方法的典型用法代码示例。如果您正苦于以下问题:C++ DviSubscription::RemoveRef方法的具体用法?C++ DviSubscription::RemoveRef怎么用?C++ DviSubscription::RemoveRef使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DviSubscription的用法示例。


在下文中一共展示了DviSubscription::RemoveRef方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: StopSubscriptions

void DviService::StopSubscriptions()
{
    iLock.Wait();
    for (TUint i=0; i<iSubscriptions.size(); i++) {
        DviSubscription* subscription = iSubscriptions[i];
        subscription->Stop();
        iDvStack.SubscriptionManager().RemoveSubscription(*subscription);
        subscription->RemoveRef();
    }
    iSubscriptions.clear();
    iLock.Signal();
}
开发者ID:broonie,项目名称:ohNet,代码行数:12,代码来源:DviService.cpp

示例2: RemoveSubscription

void DviService::RemoveSubscription(const Brx& aSid)
{
    iLock.Wait();
    for (TUint i=0; i<iSubscriptions.size(); i++) {
        DviSubscription* subscription = iSubscriptions[i];
        if (subscription->Sid() == aSid) {
            DviSubscriptionManager::RemoveSubscription(*subscription);
            iSubscriptions.erase(iSubscriptions.begin() + i);
            iLock.Signal();
            subscription->RemoveRef();
            return;
        }
    }
    iLock.Signal();
}
开发者ID:wifigeek,项目名称:ohNet,代码行数:15,代码来源:DviService.cpp

示例3:

DviService::~DviService()
{
    iLock.Wait();
    TUint i=0;
    for (; i<iSubscriptions.size(); i++) {
        DviSubscription* subscription = iSubscriptions[i];
        DviSubscriptionManager::RemoveSubscription(*subscription);
        subscription->RemoveRef();
    }
    for (i=0; i<iDvActions.size(); i++) {
        delete iDvActions[i].Action();
    }
    for (i=0; i<iProperties.size(); i++) {
        delete iProperties[i];
    }
    iLock.Signal();
    Stack::RemoveObject(this, "DviService");
}
开发者ID:wifigeek,项目名称:ohNet,代码行数:18,代码来源:DviService.cpp

示例4: Disable

void PropertyWriterFactory::Disable()
{
    Stack::Mutex().Wait();
    iEnabled = false;
    Stack::Mutex().Signal();
    iSubscriptionMapLock.Wait();
    std::vector<DviSubscription*> subscriptions;
    SubscriptionMap::iterator it = iSubscriptionMap.begin();
    if (it != iSubscriptionMap.end()) {
        DviSubscription* subscription = it->second;
        if (subscription->TryAddRef()) {
            subscriptions.push_back(subscription);
        }
        it++;
    }
    iSubscriptionMapLock.Signal();
    for (TUint i=0; i<(TUint)subscriptions.size(); i++) {
        DviSubscription* subscription = subscriptions[i];
        subscription->Remove();
        subscription->RemoveRef();
    }
    RemoveRef();
}
开发者ID:astaykov,项目名称:ohNet,代码行数:23,代码来源:DviServerUpnp.cpp


注:本文中的DviSubscription::RemoveRef方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。