1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: uds_ScanResultReader.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: 47172 $ 14 *---------------------------------------------------------------------------*/ 15 16 /* Please see man pages for details 17 18 */ 19 20 #ifndef NN_UDS_CTR_UDS_SCAN_RESULT_READER_H_ 21 #define NN_UDS_CTR_UDS_SCAN_RESULT_READER_H_ 22 23 #include <nn/uds/CTR/uds_Type.h> 24 #include <nn/uds/CTR/uds_Result.h> 25 #include <nn/uds/CTR/uds_InfoElement.h> 26 #include <nn/uds/CTR/uds_NetworkDescription.h> 27 28 namespace nn { 29 namespace uds { 30 namespace CTR { 31 32 33 /* Please see man pages for details 34 35 36 37 */ 38 class NetworkDescriptionReader 39 { 40 public: NetworkDescriptionReader(const u8 * pBuffer)41 NetworkDescriptionReader(const u8* pBuffer):m_pBuffer(pBuffer){} ~NetworkDescriptionReader()42 virtual ~NetworkDescriptionReader() {} 43 44 /* Please see man pages for details 45 46 47 48 49 */ 50 NetworkDescription::CompareResult CompareWith(const NetworkDescription& networkDescription) const; 51 52 /* Please see man pages for details 53 54 55 56 57 */ 58 void GetBssid(bit8 bssid[MAC_ADDRESS_SIZE]) const; 59 60 61 /* Please see man pages for details 62 63 64 65 66 67 68 69 70 */ 71 nn::Result GetNetworkDescription ( NetworkDescription* pNetworkDescription ); 72 73 /* Please see man pages for details 74 75 76 77 78 79 80 81 82 83 84 */ 85 nn::Result GetNodeInformationList( NodeInformation pNodeInfo[NODE_MAX] ); 86 87 /* Please see man pages for details 88 89 90 91 92 93 94 95 96 */ 97 nn::Result GetRadioStrength( LinkLevel* pLinkLevel ); 98 GetBufferAddress()99 inline const u8* GetBufferAddress() { return m_pBuffer; } 100 101 private: 102 const u8* m_pBuffer; 103 }; 104 105 /* Please see man pages for details 106 107 108 109 110 */ 111 class ScanResultReader 112 { 113 public: 114 /* Please see man pages for details 115 116 117 118 */ ScanResultReader(const void * pBuffer)119 ScanResultReader(const void* pBuffer) : m_pBuffer(pBuffer), m_pNext(NULL){} 120 121 /* Please see man pages for details 122 123 124 125 126 127 */ 128 ScanResultReader(const void* pBuffer, size_t bufferSize); 129 ~ScanResultReader()130 virtual ~ScanResultReader() {} 131 132 /* Please see man pages for details 133 134 135 */ 136 u32 GetCount() const; 137 138 /* Please see man pages for details 139 140 141 142 */ const NetworkDescriptionReader GetFirstDescription(); 143 144 /* Please see man pages for details 145 146 147 148 */ const NetworkDescriptionReader GetNextDescription(); 149 150 private: 151 const void* m_pBuffer; 152 bit8* m_pNext; 153 }; 154 155 /* 156 157 */ 158 } // end of namespace CTR 159 } // end of namespace uds 160 } // end of namespace nn 161 162 #endif /* NN_UDS_CTR_UDS_SCAN_RESULT_READER_H_ */ 163