Merge pull request #7106 from lioncash/name

WiimoteDevice: Amend variable naming
This commit is contained in:
Léo Lam 2018-06-11 11:12:08 +02:00 committed by GitHub
commit f3a18db9e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 373 additions and 373 deletions

File diff suppressed because it is too large Load Diff

View File

@ -23,34 +23,34 @@ class BluetoothEmu;
class WiimoteDevice
{
public:
WiimoteDevice(Device::BluetoothEmu* _pHost, int _Number, bdaddr_t _BD, bool ready = false);
WiimoteDevice(Device::BluetoothEmu* host, int number, bdaddr_t bd, bool ready = false);
void DoState(PointerWrap& p);
// ugly Host handling....
// we really have to clean all this code
bool IsConnected() const { return m_ConnectionState == ConnectionState::Complete; }
bool IsInactive() const { return m_ConnectionState == ConnectionState::Inactive; }
bool IsConnected() const { return m_connection_state == ConnectionState::Complete; }
bool IsInactive() const { return m_connection_state == ConnectionState::Inactive; }
bool LinkChannel();
void ResetChannels();
void Activate(bool ready);
void ExecuteL2capCmd(u8* _pData, u32 _Size); // From CPU
void ReceiveL2capData(u16 scid, const void* _pData, u32 _Size); // From Wiimote
void ExecuteL2capCmd(u8* ptr, u32 size); // From CPU
void ReceiveL2capData(u16 scid, const void* data, u32 size); // From Wiimote
void EventConnectionAccepted();
void EventDisconnect();
bool EventPagingChanged(u8 page_mode) const;
const bdaddr_t& GetBD() const { return m_BD; }
const uint8_t* GetClass() const { return uclass; }
u16 GetConnectionHandle() const { return m_ConnectionHandle; }
const u8* GetFeatures() const { return features; }
const char* GetName() const { return m_Name.c_str(); }
u8 GetLMPVersion() const { return lmp_version; }
u16 GetLMPSubVersion() const { return lmp_subversion; }
const bdaddr_t& GetBD() const { return m_bd; }
const u8* GetClass() const { return m_uclass; }
u16 GetConnectionHandle() const { return m_connection_handle; }
const u8* GetFeatures() const { return m_features; }
const char* GetName() const { return m_name.c_str(); }
u8 GetLMPVersion() const { return m_lmp_version; }
u16 GetLMPSubVersion() const { return m_lmp_subversion; }
u16 GetManufactorID() const { return 0x000F; } // Broadcom Corporation
const u8* GetLinkKey() const { return m_LinkKey; }
const u8* GetLinkKey() const { return m_link_key; }
private:
enum class ConnectionState
@ -69,58 +69,58 @@ private:
bool config_wait = false;
};
ConnectionState m_ConnectionState;
ConnectionState m_connection_state;
HIDChannelState m_hid_control_channel;
HIDChannelState m_hid_interrupt_channel;
// STATE_TO_SAVE
bdaddr_t m_BD;
u16 m_ConnectionHandle;
uint8_t uclass[HCI_CLASS_SIZE];
u8 features[HCI_FEATURES_SIZE];
u8 lmp_version;
u16 lmp_subversion;
u8 m_LinkKey[HCI_KEY_SIZE];
std::string m_Name;
Device::BluetoothEmu* m_pHost;
bdaddr_t m_bd;
u16 m_connection_handle;
u8 m_uclass[HCI_CLASS_SIZE];
u8 m_features[HCI_FEATURES_SIZE];
u8 m_lmp_version;
u16 m_lmp_subversion;
u8 m_link_key[HCI_KEY_SIZE];
std::string m_name;
Device::BluetoothEmu* m_host;
struct SChannel
{
u16 SCID;
u16 DCID;
u16 PSM;
u16 scid;
u16 dcid;
u16 psm;
u16 MTU;
u16 FlushTimeOut;
u16 mtu;
u16 flush_time_out;
};
typedef std::map<u32, SChannel> CChannelMap;
CChannelMap m_Channel;
CChannelMap m_channel;
bool DoesChannelExist(u16 scid) const { return m_Channel.find(scid) != m_Channel.end(); }
void SendCommandToACL(u8 _Ident, u8 _Code, u8 _CommandLength, u8* _pCommandData);
bool DoesChannelExist(u16 scid) const { return m_channel.find(scid) != m_channel.end(); }
void SendCommandToACL(u8 ident, u8 code, u8 command_length, u8* command_data);
void SignalChannel(u8* _pData, u32 _Size);
void SignalChannel(u8* data, u32 size);
void SendConnectionRequest(u16 _SCID, u16 _PSM);
void SendConfigurationRequest(u16 _SCID, u16 _pMTU = 0, u16 _pFlushTimeOut = 0);
void SendDisconnectRequest(u16 _SCID);
void SendConnectionRequest(u16 scid, u16 psm);
void SendConfigurationRequest(u16 scid, u16 mtu = 0, u16 flush_time_out = 0);
void SendDisconnectRequest(u16 scid);
void ReceiveConnectionReq(u8 _Ident, u8* _pData, u32 _Size);
void ReceiveConnectionResponse(u8 _Ident, u8* _pData, u32 _Size);
void ReceiveDisconnectionReq(u8 _Ident, u8* _pData, u32 _Size);
void ReceiveConfigurationReq(u8 _Ident, u8* _pData, u32 _Size);
void ReceiveConfigurationResponse(u8 _Ident, u8* _pData, u32 _Size);
void ReceiveConnectionReq(u8 ident, u8* data, u32 size);
void ReceiveConnectionResponse(u8 ident, u8* data, u32 size);
void ReceiveDisconnectionReq(u8 ident, u8* data, u32 size);
void ReceiveConfigurationReq(u8 ident, u8* data, u32 size);
void ReceiveConfigurationResponse(u8 ident, u8* data, u32 size);
// some new ugly stuff
// should be inside the plugin
void HandleSDP(u16 _SCID, u8* _pData, u32 _Size);
void SDPSendServiceSearchResponse(u16 _SCID, u16 _TransactionID, u8* _pServiceSearchPattern,
u16 _MaximumServiceRecordCount);
void HandleSDP(u16 cid, u8* data, u32 size);
void SDPSendServiceSearchResponse(u16 cid, u16 transaction_id, u8* service_search_pattern,
u16 maximum_service_record_count);
void SDPSendServiceAttributeResponse(u16 _SCID, u16 TransactionID, u32 _ServiceHandle,
u16 _StartAttrID, u16 _EndAttrID,
u16 _MaximumAttributeByteCount, u8* _pContinuationState);
void SDPSendServiceAttributeResponse(u16 cid, u16 transaction_id, u32 service_handle,
u16 start_attr_id, u16 end_attr_id,
u16 maximum_attribute_byte_count, u8* continuation_state);
};
} // namespace IOS::HLE