2020-06-13 00:08:43 +00:00
|
|
|
#pragma once
|
|
|
|
#include <switch.h>
|
|
|
|
#include <stratosphere.hpp>
|
2020-07-01 13:34:07 +00:00
|
|
|
#include "bluetooth_types.hpp"
|
2020-06-13 00:08:43 +00:00
|
|
|
|
2020-06-13 17:15:59 +00:00
|
|
|
namespace ams::bluetooth::hid::report {
|
2020-06-13 00:08:43 +00:00
|
|
|
|
2020-06-14 22:18:46 +00:00
|
|
|
bool IsInitialized(void);
|
|
|
|
|
2020-06-13 17:15:59 +00:00
|
|
|
SharedMemory *GetRealSharedMemory(void);
|
|
|
|
SharedMemory *GetFakeSharedMemory(void);
|
2020-06-13 00:08:43 +00:00
|
|
|
|
2020-06-13 17:15:59 +00:00
|
|
|
os::SystemEventType *GetSystemEvent(void);
|
|
|
|
os::SystemEventType *GetForwardEvent(void);
|
|
|
|
os::SystemEventType *GetUserForwardEvent(void);
|
2020-06-13 00:08:43 +00:00
|
|
|
|
2020-08-25 00:05:19 +00:00
|
|
|
Result Initialize(Handle eventHandle, Service *forwardService, os::ThreadId mainThreadId);
|
2020-06-14 22:18:46 +00:00
|
|
|
void Finalize(void);
|
|
|
|
|
2020-06-13 17:15:59 +00:00
|
|
|
Result MapRemoteSharedMemory(Handle handle);
|
2020-07-09 17:44:12 +00:00
|
|
|
Result InitializeReportBuffer(void);
|
2020-06-13 00:08:43 +00:00
|
|
|
|
2020-08-24 20:45:11 +00:00
|
|
|
Result WriteHidReportBuffer(const bluetooth::Address *address, const bluetooth::HidReport *report);
|
2020-08-25 00:05:19 +00:00
|
|
|
Result SendHidReport(const bluetooth::Address *address, const bluetooth::HidReport *report);
|
2020-06-30 20:23:16 +00:00
|
|
|
|
2020-07-11 11:43:21 +00:00
|
|
|
Result GetEventInfo(bluetooth::HidEventType *type, u8* buffer, size_t size);
|
2020-06-14 22:18:46 +00:00
|
|
|
void HandleEvent(void);
|
2020-06-13 17:15:59 +00:00
|
|
|
|
|
|
|
}
|