mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-12-29 03:40:51 +01:00
ce69201f33
Given we have std::array and std::optional, we can use these in conjunction with one another to avoid the need for out parameters.
32 lines
568 B
C++
32 lines
568 B
C++
// Copyright 2014 Dolphin Emulator Project
|
|
// Licensed under GPLv2+
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <array>
|
|
#include <optional>
|
|
#include <string>
|
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
namespace Common
|
|
{
|
|
enum class MACConsumer
|
|
{
|
|
BBA,
|
|
IOS
|
|
};
|
|
|
|
enum
|
|
{
|
|
MAC_ADDRESS_SIZE = 6
|
|
};
|
|
|
|
using MACAddress = std::array<u8, MAC_ADDRESS_SIZE>;
|
|
|
|
MACAddress GenerateMacAddress(MACConsumer type);
|
|
std::string MacAddressToString(const MACAddress& mac);
|
|
std::optional<MACAddress> StringToMacAddress(const std::string& mac_string);
|
|
} // namespace Common
|