Program Listing for File WriterListener.h

Return to documentation for file (/tmp/ws/src/fastrtps/include/fastdds/rtps/writer/WriterListener.h)

// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef _FASTDDS_RTPS_WRITERLISTENER_H_
#define _FASTDDS_RTPS_WRITERLISTENER_H_

#include <fastdds/dds/core/status/BaseStatus.hpp>
#include <fastdds/dds/core/status/PublicationMatchedStatus.hpp>
#include <fastdds/dds/core/status/IncompatibleQosStatus.hpp>
#include <fastdds/rtps/builtin/data/ReaderProxyData.h>
#include <fastdds/rtps/common/Guid.h>
#include <fastdds/rtps/common/MatchingInfo.h>
#include <fastdds/rtps/reader/ReaderDiscoveryInfo.h>

namespace eprosima {
namespace fastrtps {
namespace rtps {

class RTPSWriter;
struct CacheChange_t;

class RTPS_DllAPI WriterListener
{
public:

    WriterListener() = default;

    virtual ~WriterListener() = default;

    virtual void onWriterMatched(
            RTPSWriter* writer,
            MatchingInfo& info)
    {
        static_cast<void>(writer);
        static_cast<void>(info);
    }

    virtual void onWriterMatched(
            RTPSWriter* writer,
            const eprosima::fastdds::dds::PublicationMatchedStatus& info)
    {
        static_cast<void>(writer);
        static_cast<void>(info);
    }

    virtual void on_offered_incompatible_qos(
            RTPSWriter* writer,
            eprosima::fastdds::dds::PolicyMask qos)
    {
        static_cast<void>(writer);
        static_cast<void>(qos);
    }

    virtual void onWriterChangeReceivedByAll(
            RTPSWriter* writer,
            CacheChange_t* change)
    {
        static_cast<void>(writer);
        static_cast<void>(change);
    }

    virtual void on_liveliness_lost(
            RTPSWriter* writer,
            const LivelinessLostStatus& status)
    {
        static_cast<void>(writer);
        static_cast<void>(status);
    }

    virtual void on_reader_discovery(
            RTPSWriter* writer,
            ReaderDiscoveryInfo::DISCOVERY_STATUS reason,
            const GUID_t& reader_guid,
            const ReaderProxyData* reader_info)
    {
        static_cast<void>(writer);
        static_cast<void>(reason);
        static_cast<void>(reader_guid);
        static_cast<void>(reader_info);
    }

};

}  /* namespace rtps */
}  /* namespace fastrtps */
}  /* namespace eprosima */



#endif /* _FASTDDS_RTPS_WRITERLISTENER_H_ */