Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
ireader.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/ireader.h
10
//! @brief Packet reader interface.
11
12
#ifndef ROC_PACKET_IREADER_H_
13
#define ROC_PACKET_IREADER_H_
14
15
#include "
roc_core/attributes.h
"
16
#include "
roc_packet/packet.h
"
17
#include "
roc_status/status_code.h
"
18
19
namespace
roc
{
20
namespace
packet {
21
22
//! Packet reader interface.
23
class
IReader
{
24
public
:
25
virtual
~
IReader
();
26
27
//! Read packet.
28
//!
29
//! @returns
30
//! - If a returned code is not status::StatusOK, a packet is never set;
31
//! - If a packet is set, a returned code is always status::StatusOK.
32
//!
33
//! @see status::StatusCode.
34
virtual
ROC_ATTR_NODISCARD
status::StatusCode
read
(
PacketPtr
& packet) = 0;
35
};
36
37
}
// namespace packet
38
}
// namespace roc
39
40
#endif
// ROC_PACKET_IREADER_H_
attributes.h
Compiler attributes.
ROC_ATTR_NODISCARD
#define ROC_ATTR_NODISCARD
Emit warning if function result is not checked.
Definition:
attributes.h:31
roc::core::SharedPtr< Packet >
roc::packet::IReader
Packet reader interface.
Definition:
ireader.h:23
roc::packet::IReader::read
virtual ROC_ATTR_NODISCARD status::StatusCode read(PacketPtr &packet)=0
Read packet.
roc
Root namespace.
packet.h
Packet.
status_code.h
Status codes.
roc::status::StatusCode
StatusCode
Status code.
Definition:
status_code.h:19
roc_packet
ireader.h
Generated by
1.9.1