service: Use nested namespace specifiers where applicable

There were a few places where nested namespace specifiers weren't being
used where they could be within the service code. This amends that to
make the namespacing a tiny bit more compact.
This commit is contained in:
Lioncash 2018-09-22 14:23:08 +02:00 committed by fearlessTobi
parent 80cdfe1c45
commit 46da908a00
221 changed files with 443 additions and 902 deletions

View file

@ -11,8 +11,7 @@
#include "core/hle/service/nwm/nwm_tst.h"
#include "core/hle/service/nwm/nwm_uds.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
void InstallInterfaces(SM::ServiceManager& service_manager) {
std::make_shared<NWM_CEC>()->InstallAsService(service_manager);
@ -24,5 +23,4 @@ void InstallInterfaces(SM::ServiceManager& service_manager) {
std::make_shared<NWM_UDS>()->InstallAsService(service_manager);
}
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -6,11 +6,9 @@
#include "core/hle/service/service.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
/// Initialize all NWM services
void InstallInterfaces(SM::ServiceManager& service_manager);
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -4,8 +4,7 @@
#include "core/hle/service/nwm/nwm_cec.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
NWM_CEC::NWM_CEC() : ServiceFramework("nwm::CEC") {
static const FunctionInfo functions[] = {
@ -14,5 +13,4 @@ NWM_CEC::NWM_CEC() : ServiceFramework("nwm::CEC") {
RegisterHandlers(functions);
}
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -6,13 +6,11 @@
#include "core/hle/service/service.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
class NWM_CEC final : public ServiceFramework<NWM_CEC> {
public:
NWM_CEC();
};
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -4,8 +4,7 @@
#include "core/hle/service/nwm/nwm_ext.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
NWM_EXT::NWM_EXT() : ServiceFramework("nwm::EXT") {
static const FunctionInfo functions[] = {
@ -14,5 +13,4 @@ NWM_EXT::NWM_EXT() : ServiceFramework("nwm::EXT") {
RegisterHandlers(functions);
}
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -6,13 +6,11 @@
#include "core/hle/service/service.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
class NWM_EXT final : public ServiceFramework<NWM_EXT> {
public:
NWM_EXT();
};
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -4,8 +4,7 @@
#include "core/hle/service/nwm/nwm_inf.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
NWM_INF::NWM_INF() : ServiceFramework("nwm::INF") {
static const FunctionInfo functions[] = {
@ -16,5 +15,4 @@ NWM_INF::NWM_INF() : ServiceFramework("nwm::INF") {
RegisterHandlers(functions);
}
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -6,13 +6,11 @@
#include "core/hle/service/service.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
class NWM_INF final : public ServiceFramework<NWM_INF> {
public:
NWM_INF();
};
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -4,8 +4,7 @@
#include "core/hle/service/nwm/nwm_sap.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
NWM_SAP::NWM_SAP() : ServiceFramework("nwm::SAP") {
/*
@ -15,5 +14,4 @@ NWM_SAP::NWM_SAP() : ServiceFramework("nwm::SAP") {
*/
}
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -6,13 +6,11 @@
#include "core/hle/service/service.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
class NWM_SAP final : public ServiceFramework<NWM_SAP> {
public:
NWM_SAP();
};
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -4,8 +4,7 @@
#include "core/hle/service/nwm/nwm_soc.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
NWM_SOC::NWM_SOC() : ServiceFramework("nwm::SOC") {
/*
@ -15,5 +14,4 @@ NWM_SOC::NWM_SOC() : ServiceFramework("nwm::SOC") {
*/
}
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -6,13 +6,11 @@
#include "core/hle/service/service.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
class NWM_SOC final : public ServiceFramework<NWM_SOC> {
public:
NWM_SOC();
};
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -4,8 +4,7 @@
#include "core/hle/service/nwm/nwm_tst.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
NWM_TST::NWM_TST() : ServiceFramework("nwm::TST") {
/*
@ -15,5 +14,4 @@ NWM_TST::NWM_TST() : ServiceFramework("nwm::TST") {
*/
}
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -6,13 +6,11 @@
#include "core/hle/service/service.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
class NWM_TST final : public ServiceFramework<NWM_TST> {
public:
NWM_TST();
};
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -28,8 +28,7 @@
#include "core/memory.h"
#include "network/network.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
namespace ErrCodes {
enum {
@ -1359,5 +1358,4 @@ NWM_UDS::~NWM_UDS() {
CoreTiming::UnscheduleEvent(beacon_broadcast_event, 0);
}
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -13,8 +13,7 @@
// Local-WLAN service
namespace Service {
namespace NWM {
namespace Service::NWM {
const std::size_t ApplicationDataSize = 0xC8;
const u8 DefaultNetworkChannel = 11;
@ -343,5 +342,4 @@ private:
void DecryptBeaconData(Kernel::HLERequestContext& ctx);
};
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -13,8 +13,7 @@
#include "core/hle/service/nwm/nwm_uds.h"
#include "core/hle/service/nwm/uds_beacon.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
// 802.11 broadcast MAC address
constexpr MacAddress BroadcastMac = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
@ -328,5 +327,4 @@ std::vector<u8> GenerateBeaconFrame(const NetworkInfo& network_info, const NodeL
return buffer;
}
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -11,8 +11,7 @@
#include "common/swap.h"
#include "core/hle/service/service.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
using MacAddress = std::array<u8, 6>;
constexpr std::array<u8, 3> NintendoOUI = {0x00, 0x1F, 0x32};
@ -136,5 +135,4 @@ void DecryptBeacon(const NetworkInfo& network_info, std::vector<u8>& buffer);
*/
std::vector<u8> GenerateBeaconFrame(const NetworkInfo& network_info, const NodeList& nodes);
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -6,8 +6,7 @@
#include "core/hle/service/nwm/uds_connection.h"
#include "fmt/format.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
// Note: These values were taken from a packet capture of an o3DS XL
// broadcasting a Super Smash Bros. 4 lobby.
@ -84,5 +83,4 @@ std::tuple<AssocStatus, u16> GetAssociationResult(const std::vector<u8>& body) {
frame.assoc_id & AssociationIdMask);
}
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -10,8 +10,7 @@
#include "common/swap.h"
#include "core/hle/service/service.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
/// Sequence number of the 802.11 authentication frames.
enum class AuthenticationSeq : u16 { SEQ1 = 1, SEQ2 = 2 };
@ -52,5 +51,4 @@ std::vector<u8> GenerateAssocResponseFrame(AssocStatus status, u16 association_i
/// frame.
std::tuple<AssocStatus, u16> GetAssociationResult(const std::vector<u8>& body);
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -15,8 +15,7 @@
#include "core/hle/service/nwm/uds_data.h"
#include "core/hw/aes/key.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
using MacAddress = std::array<u8, 6>;
@ -383,5 +382,4 @@ EAPoLLogoffPacket ParseEAPoLLogoffFrame(const std::vector<u8>& frame) {
return eapol_logoff;
}
} // namespace NWM
} // namespace Service
} // namespace Service::NWM

View file

@ -11,8 +11,7 @@
#include "core/hle/service/nwm/uds_beacon.h"
#include "core/hle/service/service.h"
namespace Service {
namespace NWM {
namespace Service::NWM {
enum class SAP : u8 { SNAPExtensionUsed = 0xAA };
@ -169,5 +168,4 @@ std::vector<u8> GenerateEAPoLLogoffFrame(const MacAddress& mac_address, u16 netw
*/
EAPoLLogoffPacket ParseEAPoLLogoffFrame(const std::vector<u8>& frame);
} // namespace NWM
} // namespace Service
} // namespace Service::NWM