CTR Pia
4.11.3
Game Communication Engine
Main Page
Namespace List
Class List
Class Index
Related Pages
Search Results
common_IPacketInput.h
1
/*---------------------------------------------------------------------------*
2
Project: Pia
3
File: common_IPacketInput.h
4
5
Copyright Nintendo. All rights reserved.
6
7
These coded instructions, statements, and computer programs contain
8
proprietary information of Nintendo of America Inc. and/or Nintendo
9
Company Ltd., and are protected by Federal copyright law. They may
10
not be disclosed to third parties or copied or duplicated in any form,
11
in whole or in part, without the prior written consent of Nintendo.
12
*---------------------------------------------------------------------------*/
13
14
15
#pragma once
16
17
#include <pia/common/common_definitions.h>
18
19
namespace
nn
20
{
21
namespace
pia
22
{
23
namespace
common
24
{
25
26
class
Packet;
27
28
/*!
29
@cond PRIVATE
30
@brief This class is an interface for reading from \c PacketOld objects.
31
*/
32
class
IPacketInput
33
{
34
public
:
35
/*!
36
@brief Default constructor.
37
*/
38
IPacketInput(
void
)
39
{
40
}
41
42
43
/*!
44
@brief Destructor.
45
*/
46
virtual
~IPacketInput(
void
)
47
{
48
}
49
50
51
/*!
52
@brief Interface for reading.
53
54
@param[out] pPacketData Pointer to a \c Packet instance.
55
@return If the read is successful, returns a \c Result value for which the \c IsSuccess function will return \c true.
56
@retval ResultInvalidArgument One or more arguments is invalid (such as a \c NULL pointer was passed).
57
@retval ResultInvalidState The timing by which this function has been called is incorrect (for example, initialization is not finished).
58
@retval ResultNoData Indicates that no data was received (no data arrived).
59
@retval ResultNetworkConnectionIsLost The network connection was lost.
60
*/
61
virtual
nn::Result Read(nn::pia::common::Packet* pPacketData) = 0;
62
63
/*!
64
@brief A reader interface.
65
66
@param[out] pPacket Pointer to a \c PacketOld instance.
67
@return If the read operation succeeds, returns a <tt>Result</tt> value for which the <tt>IsSuccess</tt> function will return <tt>true</tt>.
68
@retval ResultInvalidArgument An argument is incorrect (for example, a NULL pointer was passed in).
69
@retval ResultInvalidState The timing by which this function has been called is incorrect (for example, initialization is not finished).
70
@retval ResultNoData No data has been received (no data has arrived).
71
@retval ResultNetworkConnectionIsLost The network connection was lost.
72
*/
73
//virtual nn::Result Read(nn::pia::common::PacketOld*) {PIA_RETURN_RESULT(ResultNotImplemented);}
74
};
75
//! @endcond
76
}
77
}
78
}
// end of namespace nn::pia::common
nn
Definition:
assert.h:115
include
pia
common
common_IPacketInput.h
© 2013–2017 Nintendo. All rights reserved. All company and product names in this document are the trademarks or registered trademarks of their respective companies.