1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: dlp_FakeClient.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: 47174 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_DLP_CTR_DLP_FAKE_CLIENT_H_ 17 #define NN_DLP_CTR_DLP_FAKE_CLIENT_H_ 18 19 #include <nn/dlp/CTR/dlp_Type.h> 20 21 #ifdef __cplusplus 22 23 namespace nn { 24 namespace dlp { 25 namespace CTR { 26 27 /* 28 29 */ 30 class FakeClient 31 { 32 public: FakeClient()33 FakeClient() {}; ~FakeClient()34 ~FakeClient() {}; 35 36 37 /* 38 39 40 41 42 43 44 */ 45 static size_t GetBufferSize(u8 scanNum); 46 47 48 /* 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 */ 70 static nn::Result Initialize(u8 scanNum, nn::Handle eventHandle, void* pBuffer, const size_t bufferSize); 71 72 73 /* 74 75 76 77 78 79 */ 80 static nn::Result Finalize(); 81 82 83 /* 84 85 86 87 88 89 90 91 92 93 94 95 */ 96 static nn::Result GetEventDesc(EventDesc* pEventDesc); 97 98 99 /* 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 */ 115 static nn::Result StartScan(u32 uniqueId, u8 childIndex, const u8* pMac = NULL); 116 117 118 /* 119 120 121 122 123 124 125 126 */ 127 static nn::Result StopScan(); 128 129 130 /* 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 */ 146 static nn::Result GetServerInfo(ServerInfo* pServerInfo, const u8* pMac); 147 148 149 /* 150 151 152 153 154 155 156 157 158 159 160 161 162 */ 163 static nn::Result GetTitleInfo(TitleInfo* pTitleInfo, const u8* pMac, u32 uniqueId, u8 childIndex); 164 165 166 /* 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 */ 183 static nn::Result GetTitleInfo(TitleInfo* pTitleInfo, bool isReset = false); 184 185 186 /* 187 188 189 190 191 192 193 194 195 196 */ 197 static nn::Result DeleteScanInfo(const u8* pMac); 198 199 200 /* 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 */ 219 static nn::Result StartFakeSession(const u8* pMac, u32 uniqueId, u8 childIndex); 220 221 222 /* 223 224 225 226 227 228 229 230 231 */ 232 static nn::Result GetPassphrase(char* pPassphrase); 233 234 235 /* 236 237 238 239 240 241 */ 242 static nn::Result StopFakeSession(); 243 244 245 /* 246 247 248 249 250 251 252 253 254 255 */ 256 static nn::Result GetMyStatus(ClientStatus* pStatus); 257 258 259 /* 260 261 262 263 264 265 266 267 268 269 270 */ 271 static nn::Result GetConnectingNodes(u8* pNum, u16* pNodeIds, u16 size); 272 273 274 /* 275 276 277 278 279 280 281 282 283 284 285 */ 286 static nn::Result GetNodeInfo(NodeInfo* pNodeInfo, u16 nodeId); 287 288 289 /* 290 291 292 293 294 295 296 297 */ 298 static nn::Result GetLinkLevel(nn::uds::LinkLevel* pLinkLevel); 299 300 301 // (Unpublished functions) 302 /* 303 304 305 306 307 308 309 310 311 */ 312 static nn::Result GetChannels(bit16* pChannels); 313 314 static nn::Result StartScan(const u8* pMac = NULL); 315 316 private: 317 static nn::Result StartScanInternal(bit16 channels, u32 uniqueId, u8 childIndex, const u8* pMac, bool useFilter); 318 319 }; 320 321 } // namespace CTR 322 } // namespace dlp 323 } // namespace nn 324 325 #endif // __cplusplus 326 #endif // ifndef NN_DLP_CTR_DLP_FAKE_CLIENT_H_ 327