/*---------------------------------------------------------------------------* Project: Horizon File: rdt_define.h Copyright (C) 2009-2011 Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Rev: 46526 $ *---------------------------------------------------------------------------*/ ////#include #ifndef NN_RDT_DEFINE_H_ #define NN_RDT_DEFINE_H_ namespace nn { namespace rdt { /*! @addtogroup nn_rdt_api @{ */ /*! @brief Enumerated type that indicates the state of a Sender instance. */ enum SenderState{ SENDER_STATE_OPEN_REQUESTED, //!< The state immediately after @ref Sender::Open has been called. SENDER_STATE_OPENING, //!< A connection request has been issued to the other party and the local host is waiting for a response. SENDER_STATE_OPENED, //!< A connection with the other party has been established and the local host can send data. SENDER_STATE_CLOSE_REQUESTED, //!< The state immediately after @ref Sender::Close has been called. SENDER_STATE_CLOSING, //!< The state after all data has been transmitted as planned and a completion notification has been sent to the other party. Data transmission does not complete until a response is received from the other party and there is a transition to SENDER_STATE_CLOSED. SENDER_STATE_CLOSED, //!< Initial state of instances. Although in a state where the data send has completed, there is no guarantee that @ref Receiver has received the data. SENDER_STATE_NOT_INITIALIZED //!< Indicates that a Sender instance has not been initialized. }; /*! @brief Enumerated type that indicates the state of a Receiver instance. */ enum ReceiverState{ RECEIVER_STATE_WAITING, //!< Waiting for a connection request from the other party. RECEIVER_STATE_OPENED, //!< A connection with the other party has been established and the local host can receive data. RECEIVER_STATE_WAITING_FINISHED, //!< All of the data has been received from the other party. After that a data transfer complete notification comes from that party and an acknowledgement is returned. However, in this state, it is not certain whether the acknowledgement arrived. RECEIVER_STATE_FINISHED, //!< The other party is thought to have received the ACK that data transmission is complete. Call @ref Receiver::Close and transition to @ref RECEIVER_STATE_CLOSED. RECEIVER_STATE_CLOSED, //!< Initial state of instances. RECEIVER_STATE_NOT_INITIALIZED //!< Indicates that a receiver instance has not been initialized. }; //! @} }} // namespace nn::rdt #endif // end of NN_RDT_DEFINE_H_