1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: ac_Ac.h 4 5 Copyright (C)2009 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 $Date:: 2010-09-13#$ 14 *---------------------------------------------------------------------------*/ 15 16 // 17 // このファイルを編集しないでください。 18 // このファイルは自動生成されます。 19 // 20 21 #ifndef NN_AC_CTR_AC_AC_H_ 22 #define NN_AC_CTR_AC_AC_H_ 23 24 #include <nn/Handle.h> 25 #include <nn/Result.h> 26 #include <nn/types.h> 27 #include <nn/ac/CTR/ac_Types.h> 28 29 30 31 namespace nn { 32 namespace ac { 33 namespace CTR { 34 namespace detail { 35 36 class Ac 37 { 38 public: 39 enum Tag 40 { 41 TAG_IPC_ERROR, 42 TAG_CREATE_DEFAULT_CONFIG, 43 TAG_DEBUG_SET_NETWORK_AREA, 44 TAG_CONNECT, 45 TAG_CONNECT_ASYNC, 46 TAG_CONNECT_FROM_BROWSER, 47 TAG_CONNECT_FROM_BROWSER_ASYNC, 48 TAG_GET_CONNECT_RESULT, 49 TAG_DEBUG_SET_NETWORK_SETTING_1, 50 TAG_CANCEL_CONNECT_ASYNC, 51 TAG_CLOSE, 52 TAG_CLOSE_ASYNC, 53 TAG_GET_CLOSE_RESULT, 54 TAG_GET_LAST_ERROR_CODE, 55 TAG_GET_LAST_DETAIL_ERROR_CODE, 56 TAG_GET_STATUS, 57 TAG_GET_CONNECTING_AP_TYPE, 58 TAG_GET_CONNECTING_ACCESS_POINT, 59 TAG_GET_CONNECTING_INFRA_PRIORITY, 60 TAG_GET_CONNECTING_NINTENDO_ZONE_BEACON, 61 TAG_GET_CONNECTING_NINTENDO_ZONE_BEACON_SUBSET, 62 TAG_GET_CONNECTING_LOCATION, 63 TAG_EXCLUSIVE, 64 TAG_UN_EXCLUSIVE, 65 TAG_CLOSE_ALL, 66 TAG_LOGOUT_HOTSPOT, 67 TAG_SCAN_ACCESS_POINT, 68 TAG_SCAN_NINTENDO_ZONE, 69 TAG_SCAN_NINTENDO_ZONE_SUBSET, 70 TAG_BEGIN_SCAN_USB_ACCESS_POINT, 71 TAG_END_SCAN_USB_ACCESS_POINT, 72 TAG_SET_ALLOW_AP_TYPE, 73 TAG_ADD_ALLOW_AP_TYPE, 74 TAG_ADD_DENY_AP_TYPE, 75 TAG_SET_NETWORK_AREA, 76 TAG_SET_INFRA_PRIORITY, 77 TAG_GET_INFRA_PRIORITY, 78 TAG_SET_POWER_SAVE_MODE, 79 TAG_GET_POWER_SAVE_MODE, 80 TAG_SET_BSSID_FILTER, 81 TAG_SET_APNUM_FILTER, 82 TAG_SET_FROM_APPLICATION, 83 TAG_SET_REQUEST_EULA_VERSION, 84 TAG_CONVERT_PASSPHRASE_TO_PSK, 85 TAG_GET_NINTENDO_ZONE_BEACON_NOT_FOUND_EVENT, 86 TAG_REGISTER_DISCONNECT_EVENT, 87 TAG_GET_STATUS_CHANGE_EVENT, 88 TAG_SET_AUTH_SERVER_TYPE, 89 TAG_GET_CONNECTING_SECURITY_MODE, 90 TAG_GET_CONNECTING_SSID, 91 TAG_GET_CONNECTING_SSID_LENGTH, 92 TAG_GET_CONNECTING_PROXY_ENABLE, 93 TAG_GET_CONNECTING_PROXY_AUTH_TYPE, 94 TAG_GET_CONNECTING_PROXY_PORT, 95 TAG_GET_CONNECTING_PROXY_HOST, 96 TAG_GET_CONNECTING_PROXY_USER_NAME, 97 TAG_GET_CONNECTING_PROXY_PASSWORD, 98 TAG_IPC_END 99 }; 100 101 public: 102 static Handle s_Session; 103 104 public: Ac()105 Ac() {} 106 107 public: 108 static nn::Result CreateDefaultConfig( nn::ac::CTR::Config* config ); 109 static nn::Result DebugSetNetworkArea( nn::ac::CTR::Config* config, nn::ac::CTR::NetworkArea networkArea ); 110 static nn::Result Connect( const nn::ac::CTR::Config& config ); 111 static nn::Result ConnectAsync( const nn::ac::CTR::Config& config, nn::Handle event ); 112 static nn::Result ConnectFromBrowser( const nn::ac::CTR::Config& config ); 113 static nn::Result ConnectFromBrowserAsync( const nn::ac::CTR::Config& config, nn::Handle event ); 114 static nn::Result GetConnectResult(); 115 static nn::Result DebugSetNetworkSetting1( const u8 ssid[], size_t ssidLen, nn::ac::CTR::SecurityMode securityMode, const u8 key[], size_t keyLen ); 116 static nn::Result CancelConnectAsync(); 117 static nn::Result Close(); 118 static nn::Result CloseAsync( nn::Handle event ); 119 static nn::Result GetCloseResult(); 120 static nn::Result GetLastErrorCode( u32* errorCode ); 121 static nn::Result GetLastDetailErrorCode( u32* errorCode ); 122 static nn::Result GetStatus( nn::ac::CTR::Status* status ); 123 static nn::Result GetConnectingApType( nn::ac::CTR::ApType* apType ); 124 static nn::Result GetConnectingAccessPoint( u8 ap[], size_t len ); 125 static nn::Result GetConnectingInfraPriority( nn::ac::CTR::InfraPriority* infraPriority ); 126 static nn::Result GetConnectingNintendoZoneBeacon( u8 beacon[], size_t len ); 127 static nn::Result GetConnectingNintendoZoneBeaconSubset( u8 beacon[], size_t len ); 128 static nn::Result GetConnectingLocation( u8 areacode[] ); 129 static nn::Result Exclusive(); 130 static nn::Result UnExclusive(); 131 static nn::Result CloseAll(); 132 static nn::Result LogoutHotspot(); 133 static nn::Result ScanAccessPoint( u8* findNum, u8 apDataList[], u16 len ); 134 static nn::Result ScanNintendoZone( u8* findNum, u8 zoneDataList[], u16 len ); 135 static nn::Result ScanNintendoZoneSubset( u8* findNum, u8 zoneDataList[], u16 len ); 136 static nn::Result BeginScanUsbAccessPoint( nn::Handle allowEvent, nn::Handle denyEvent ); 137 static nn::Result EndScanUsbAccessPoint(); 138 static nn::Result SetAllowApType( const nn::ac::CTR::Config& srcConfig, nn::ac::CTR::Config* destConfig, nn::ac::CTR::ApType apType ); 139 static nn::Result AddAllowApType( const nn::ac::CTR::Config& srcConfig, nn::ac::CTR::Config* destConfig, nn::ac::CTR::ApType apType ); 140 static nn::Result AddDenyApType( const nn::ac::CTR::Config& srcConfig, nn::ac::CTR::Config* destConfig, nn::ac::CTR::ApType apType ); 141 static nn::Result SetNetworkArea( const nn::ac::CTR::Config& srcConfig, nn::ac::CTR::Config* destConfig, nn::ac::CTR::NetworkArea networkArea ); 142 static nn::Result SetInfraPriority( const nn::ac::CTR::Config& srcConfig, nn::ac::CTR::Config* destConfig, nn::ac::CTR::InfraPriority infraPriority ); 143 static nn::Result GetInfraPriority( const nn::ac::CTR::Config& config, nn::ac::CTR::InfraPriority* infraPriority ); 144 static nn::Result SetPowerSaveMode( const nn::ac::CTR::Config& srcConfig, nn::ac::CTR::Config* destConfig, nn::ac::CTR::PowerSaveMode powerSaveMode ); 145 static nn::Result GetPowerSaveMode( const nn::ac::CTR::Config& config, nn::ac::CTR::PowerSaveMode* powerSaveMode ); 146 static nn::Result SetBssidFilter( const nn::ac::CTR::Config& srcConfig, nn::ac::CTR::Config* destConfig, const bit8 bssid[] ); 147 static nn::Result SetApnumFilter( const nn::ac::CTR::Config& srcConfig, nn::ac::CTR::Config* destConfig, const u8 apnum[] ); 148 static nn::Result SetFromApplication( const nn::ac::CTR::Config& srcConfig, nn::ac::CTR::Config* destConfig, nn::ac::CTR::Application application ); 149 static nn::Result SetRequestEulaVersion( const nn::ac::CTR::Config& srcConfig, nn::ac::CTR::Config* destConfig, u8 minorVersion, u8 majorVersion ); 150 static nn::Result ConvertPassphraseToPsk( const u8 passphrase[], size_t passphraseLen, const u8 ssid[], size_t ssidLen, u8 key[], size_t keyLen ); 151 static nn::Result GetNintendoZoneBeaconNotFoundEvent( nn::Handle event ); 152 static nn::Result RegisterDisconnectEvent( nn::Handle event ); 153 static nn::Result GetStatusChangeEvent( nn::Handle* event ); 154 static nn::Result SetAuthServerType( nn::ac::CTR::AuthServerType type ); 155 static nn::Result GetConnectingSecurityMode( nn::ac::CTR::SecurityMode* securityMode ); 156 static nn::Result GetConnectingSsid( u8 ssid[] ); 157 static nn::Result GetConnectingSsidLength( u8* length ); 158 static nn::Result GetConnectingProxyEnable( bool* enable ); 159 static nn::Result GetConnectingProxyAuthType( nn::ac::CTR::ProxyAuthType* authType ); 160 static nn::Result GetConnectingProxyPort( u16* port ); 161 static nn::Result GetConnectingProxyHost( u8 host[] ); 162 static nn::Result GetConnectingProxyUserName( u8 username[] ); 163 static nn::Result GetConnectingProxyPassword( u8 password[] ); 164 }; 165 166 } // end of namespace detail 167 } // end of namespace CTR 168 } // end of namespace ac 169 } // end of namespace nn 170 171 172 173 #endif // ifndef NN_AC_CTR_AC_AC_H_ 174