service: add template serializer for method calls

This commit is contained in:
Liam
2024-01-25 00:50:03 -05:00
parent a76f6a2775
commit 01a2d978eb
8 changed files with 725 additions and 349 deletions

View File

@ -206,6 +206,22 @@ protected:
RegisterHandlersBaseTipc(functions, n);
}
protected:
template <bool Domain, auto F>
void CmifReplyWrap(HLERequestContext& ctx);
/**
* Wraps the template pointer-to-member function for use in a domain session.
*/
template <auto F>
static constexpr HandlerFnP<Self> D = &Self::template CmifReplyWrap<true, F>;
/**
* Wraps the template pointer-to-member function for use in a non-domain session.
*/
template <auto F>
static constexpr HandlerFnP<Self> C = &Self::template CmifReplyWrap<false, F>;
private:
/**
* This function is used to allow invocation of pointers to handlers stored in the base class