1 /*---------------------------------------------------------------------------* 2 3 Copyright (C) Nintendo. All rights reserved. 4 5 These coded instructions, statements, and computer programs contain 6 proprietary information of Nintendo of America Inc. and/or Nintendo 7 Company Ltd., and are protected by Federal copyright law. They may 8 not be disclosed to third parties or copied or duplicated in any form, 9 in whole or in part, without the prior written consent of Nintendo. 10 11 *---------------------------------------------------------------------------*/ 12 13 #ifndef NN_AC_AC_TYPES_H_ 14 #define NN_AC_AC_TYPES_H_ 15 16 #include <nn/types.h> 17 #include <nn/Result.h> 18 19 //! @addtogroup nn_ac_api_c 20 //! @{ 21 22 /*! 23 @brief Represents the result of an operation. 24 */ 25 typedef nnResult ACResult; 26 /*! 27 @brief Represents an error code. 28 29 Use the <tt>ACGetLastErrorCode</tt> function to get errors that occur in connection and disconnection processes. 30 31 */ 32 typedef u32 ACErrorCode; 33 /*! 34 @brief Represents an IP address. 35 */ 36 typedef unsigned long ACIpAddress; 37 38 /*! 39 @brief Enumerates the operational state of an asynchronous function. 40 41 Use the <tt>ACGetStatus</tt> function to get the progress of the <tt>ACConnectAsync</tt> and <tt>ACClose</tt> functions. 42 43 */ 44 typedef enum 45 { 46 AC_STATUS_FAILED = -1, //!< Failed. 47 AC_STATUS_OK = 0, //!< Success. 48 AC_STATUS_PROCESSING = 1, //!< Processing. 49 } ACStatus; 50 51 //! @} 52 53 #ifdef __cplusplus 54 55 namespace nn { 56 namespace ac { 57 58 //! @addtogroup nn_ac_api_cpp 59 //! @{ 60 61 /*! 62 @brief Enumerates the operational state of an asynchronous function. 63 64 Use the <tt>nn::ac::GetStatus</tt> function (or the <tt>nn::ac::GetConnectStatus</tt> function) or the <tt>nn::ac::GetCloseStatus</tt> function to get the progress of the <tt>nn::ac::ConnectAsync</tt> and <tt>nn::ac::Close</tt> functions. 65 66 67 */ 68 enum Status 69 { 70 STATUS_FAILED = AC_STATUS_FAILED, //!< Failed. 71 STATUS_OK = AC_STATUS_OK, //!< Success. 72 STATUS_PROCESSING = AC_STATUS_PROCESSING, //!< Processing. 73 }; 74 75 /*! 76 @brief Represents an error code. 77 78 Use the <tt>nn::ac::ACGetLastErrorCode</tt> function to get errors that occur in connection and disconnection processes. 79 80 */ 81 typedef u32 ErrorCode; 82 83 /*! 84 @brief Represents an IP address. 85 */ 86 typedef unsigned long IpAddress; 87 88 //! @} 89 90 } // namespace ac 91 } // namespace nn 92 93 #endif // __cplusplus 94 95 #endif // NN_AC_AC_TYPES_H_ 96