Ejemplo n.º 1
0
    MamaSubscription* MamaSource::removeSubscription (const char*  symbol)
    {
        if (!mySubs)
        {
            return NULL;
        }

        return (MamaSubscription*) wtable_remove (mySubs, symbol);
    }
Ejemplo n.º 2
0
mama_status mamaDQPublisherManager_destroyPublisher (
    mamaDQPublisherManager
    manager,
    const char *symbol)
{
    mamaDQPublisherManagerImpl* impl  = (mamaDQPublisherManagerImpl*) manager;
    mamaPublishTopic* newTopic = NULL;

    if (!(newTopic =  wtable_lookup (impl->mPublisherMap , ( char* )symbol)))
        return (MAMA_STATUS_INVALID_ARG);

    mamaDQPublisher_destroy(newTopic->pub);
    wtable_remove (impl->mPublisherMap, symbol);

    free  ((void*)newTopic->symbol);
    free  ((void*)newTopic);
    return MAMA_STATUS_OK;
}
Ejemplo n.º 3
0
mama_status mamaDQPublisherManager_removePublisher (
    mamaDQPublisherManager manager,
    const char *symbol,
    mamaDQPublisher* pub)
{
    mamaDQPublisherManagerImpl* impl  = (mamaDQPublisherManagerImpl*) manager;
    mamaPublishTopic* newTopic = NULL;


    newTopic = (mamaPublishTopic*)wtable_lookup (impl->mPublisherMap,
               (char*)symbol);

    if (newTopic)
    {
        wtable_remove  (impl->mPublisherMap, (char*)symbol);

        *pub = newTopic->pub;
        free  ((void*)newTopic->symbol);
        free  ((void*)newTopic);
        return MAMA_STATUS_OK;
    }

    return (MAMA_STATUS_INVALID_ARG);
}