40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "lib/utils/bts_no_copy.h"
|
|
#include "lib/utils/bts_export.h"
|
|
|
|
#include "lib/api/services/HelloService.server.pb.h"
|
|
#include "lib/api/services/HelloService.client.pb.h"
|
|
|
|
namespace bts {
|
|
namespace api {
|
|
namespace test {
|
|
|
|
struct BTS_EXPORT HelloServiceServer : public HelloServiceBase
|
|
{
|
|
public:
|
|
HelloServiceServer(bts::api::ServiceContext& context);
|
|
|
|
private:
|
|
BTS_NO_COPY(HelloServiceServer);
|
|
int _id;
|
|
ShoutService _shouter;
|
|
GreetingsPublisher _gpub;
|
|
|
|
void publish(const std::string& msg, int * to_remove=nullptr);
|
|
|
|
// Inherited via HelloServiceBase
|
|
virtual void say_hello(const HelloRequest & request, const std::function<void(const HelloResponse&)>& on_result) override;
|
|
virtual void yell_hello(const HelloRequest & request, const std::function<void(const HelloResponse&)>& on_result) override;
|
|
};
|
|
|
|
struct BTS_EXPORT ShoutServiceServer : public ShoutServiceBase
|
|
{
|
|
ShoutServiceServer(bts::api::ServiceContext& context);
|
|
// Inherited via ShoutServiceBase
|
|
virtual void upper(const ShoutRequest & request, const std::function<void(const ShoutResponse&)>& on_result) override;
|
|
};
|
|
|
|
}}}//namespace
|
|
|