Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
iwriter.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015 Roc Streaming authors
3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 */
8
9//! @file roc_packet/iwriter.h
10//! @brief Packet writer interface.
11
12#ifndef ROC_PACKET_IWRITER_H_
13#define ROC_PACKET_IWRITER_H_
14
15#include "roc_core/attributes.h"
16#include "roc_packet/packet.h"
18
19namespace roc {
20namespace packet {
21
22//! Packet writer interface.
23class IWriter {
24public:
25 virtual ~IWriter();
26
27 //! Write packet.
28 //!
29 //! @returns
30 //! - If a returned code is not status::StatusOK, a packet is never written;
31 //! - If a packet is written, a returned code is always status::StatusOK.
32 //!
33 //! @see status::StatusCode.
35};
36
37} // namespace packet
38} // namespace roc
39
40#endif // ROC_PACKET_IWRITER_H_
Compiler attributes.
#define ROC_ATTR_NODISCARD
Emit warning if function result is not checked.
Definition attributes.h:31
Packet writer interface.
Definition iwriter.h:23
virtual status::StatusCode write(const PacketPtr &)=0
Write packet.
StatusCode
Status code.
Definition status_code.h:19
Root namespace.
Packet.
Status codes.