1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: phtsel_output.h 4 5 Copyright (C)2009-2012 Nintendo Co., Ltd. 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 $Rev:$ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_PHTSEL_CTR_PHTSEL_OUTPUT_H_ 17 #define NN_PHTSEL_CTR_PHTSEL_OUTPUT_H_ 18 19 /* Please see man pages for details 20 21 22 */ 23 24 #include <nn/types.h> 25 #include <nn/config.h> 26 27 28 #ifdef __cplusplus 29 30 namespace nn { 31 namespace phtsel { 32 namespace CTR { 33 34 /* Please see man pages for details 35 36 37 38 */ 39 enum ReturnCode 40 { 41 // 42 RETURN_CODE_UNKNOWN = -1, 43 44 // 45 RETURN_CODE_INVALID_CONFIG = -2, 46 47 // 48 RETURN_CODE_OUT_OF_MEMORY = -3, 49 50 // 51 RETURN_CODE_FILENAME_OVERFLOW = -4, 52 53 // 54 RETURN_CODE_SUCCESS = 0, 55 56 // 57 RETURN_CODE_HOME_BUTTON = 1, 58 59 // 60 RETURN_CODE_SOFTWARE_RESET = 2, 61 62 // 63 RETURN_CODE_CANCEL = 3, 64 65 // 66 RETURN_CODE_POWER_BUTTON = 4, 67 68 // 69 RETURN_CODE_MAX_BIT = static_cast<s32>(1u << 31) 70 }; 71 72 73 /* 74 75 76 77 */ 78 struct PhtselOutput 79 { 80 public: 81 //---------------------------------------- 82 // 83 84 /* Please see man pages for details 85 86 */ 87 static const size_t FILE_PATH_VALUE_MAX_NUM = 512; 88 89 /* Please see man pages for details 90 91 92 93 */ 94 static const size_t OUTPUT_RESERVED_SIZE = 200; 95 96 protected: 97 98 /* Please see man pages for details 99 100 101 102 */ 103 wchar_t m_nValue[FILE_PATH_VALUE_MAX_NUM]; 104 105 /* Please see man pages for details 106 107 108 109 */ 110 u16 m_nValueLen; 111 112 NN_PADDING2; 113 114 /* Please see man pages for details 115 116 117 118 119 120 121 */ 122 ReturnCode m_returnCode; 123 124 /* Please see man pages for details 125 126 127 128 */ 129 u8 m_reserved[OUTPUT_RESERVED_SIZE]; 130 131 public: 132 133 //---------------------------------------- 134 // 135 136 /* Please see man pages for details 137 138 139 140 141 142 */ 143 void InitAll(); 144 145 146 /* Please see man pages for details 147 148 149 150 151 152 */ 153 void InitValue(); 154 155 //---------------------------------------- 156 // 157 158 /* Please see man pages for details 159 160 161 162 163 164 165 */ 166 void SetReturnCode(ReturnCode returnCode); 167 168 /* Please see man pages for details 169 170 171 172 173 174 175 176 */ 177 void SetValue(const wchar_t* value); 178 179 //---------------------------------------- 180 // 181 182 /* Please see man pages for details 183 184 185 186 */ 187 ReturnCode GetReturnCode() const; 188 189 /* Please see man pages for details 190 191 192 */ 193 const wchar_t* GetValue() const; 194 195 /* Please see man pages for details 196 197 198 */ 199 u16 GetValueLen() const; 200 }; 201 202 } // end of namespace CTR 203 } // end of namespace phtsel 204 } // end of namespace nn 205 206 #endif /*__cplusplus*/ 207 208 #endif /* NN_PHTSEL_CTR_PHTSEL_OUTPUT_H_ */ 209