10#ifdef USE_API_SERVICES
28 UserServiceBase(std::string name,
const std::array<std::string,
sizeof...(Ts)> &arg_names)
38 for (
int i = 0; i <
sizeof...(Ts); i++) {
39 msg.
args.emplace_back();
40 auto &arg = msg.
args.back();
41 arg.type = arg_types[i];
48 if (req.
key != this->key_)
50 if (req.
args.size() != this->arg_names_.size())
69 UserServiceTrigger(
const std::string &name,
const std::array<std::string,
sizeof...(Ts)> &arg_names)
StringRef is a reference to a string owned by something else.
std::vector< ExecuteServiceArgument > args
std::vector< ListEntitiesServicesArgument > args
void set_name(const StringRef &ref)
virtual void execute(Ts... x)=0
void execute_(std::vector< ExecuteServiceArgument > args, seq< S... > type)
UserServiceBase(std::string name, const std::array< std::string, sizeof...(Ts)> &arg_names)
std::array< std::string, sizeof...(Ts)> arg_names_
ListEntitiesServicesResponse encode_list_service_response() override
bool execute_service(const ExecuteServiceRequest &req) override
virtual ListEntitiesServicesResponse encode_list_service_response()=0
virtual bool execute_service(const ExecuteServiceRequest &req)=0
UserServiceTrigger(const std::string &name, const std::array< std::string, sizeof...(Ts)> &arg_names)
void execute(Ts... x) override
enums::ServiceArgType to_service_arg_type()
T get_execute_arg_value(const ExecuteServiceArgument &arg)
uint32_t fnv1_hash(const std::string &str)
Calculate a FNV-1 hash of str.