Line data Source code
1 : /*
2 : * If not stated otherwise in this file or this component's LICENSE file the
3 : * following copyright and licenses apply:
4 : *
5 : * Copyright 2022 Sky UK
6 : *
7 : * Licensed under the Apache License, Version 2.0 (the "License");
8 : * you may not use this file except in compliance with the License.
9 : * You may obtain a copy of the License at
10 : *
11 : * http://www.apache.org/licenses/LICENSE-2.0
12 : *
13 : * Unless required by applicable law or agreed to in writing, software
14 : * distributed under the License is distributed on an "AS IS" BASIS,
15 : * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 : * See the License for the specific language governing permissions and
17 : * limitations under the License.
18 : */
19 :
20 : #ifndef FIREBOLT_RIALTO_SERVER_IPC_SERVER_MANAGER_MODULE_SERVICE_H_
21 : #define FIREBOLT_RIALTO_SERVER_IPC_SERVER_MANAGER_MODULE_SERVICE_H_
22 :
23 : #include "IServerManagerModuleServiceFactory.h"
24 : #include "ISessionServerManager.h"
25 : #include <IIpcServer.h>
26 : #include <memory>
27 :
28 : namespace firebolt::rialto::server::ipc
29 : {
30 : class ServerManagerModuleServiceFactory : public IServerManagerModuleServiceFactory
31 : {
32 : public:
33 12 : ServerManagerModuleServiceFactory() = default;
34 12 : virtual ~ServerManagerModuleServiceFactory() = default;
35 :
36 : std::shared_ptr<::rialto::ServerManagerModule>
37 : create(service::ISessionServerManager &sessionServerManager) const override;
38 : };
39 :
40 : class ServerManagerModuleService : public ::rialto::ServerManagerModule
41 : {
42 : public:
43 : explicit ServerManagerModuleService(service::ISessionServerManager &sessionServerManager);
44 : ~ServerManagerModuleService() override;
45 :
46 : void setConfiguration(::google::protobuf::RpcController *controller, const ::rialto::SetConfigurationRequest *request,
47 : ::rialto::SetConfigurationResponse *response, ::google::protobuf::Closure *done) override;
48 : void setState(::google::protobuf::RpcController *controller, const ::rialto::SetStateRequest *request,
49 : ::rialto::SetStateResponse *response, ::google::protobuf::Closure *done) override;
50 : void setLogLevels(::google::protobuf::RpcController *controller, const ::rialto::SetLogLevelsRequest *request,
51 : ::rialto::SetLogLevelsResponse *response, ::google::protobuf::Closure *done) override;
52 : void ping(::google::protobuf::RpcController *controller, const ::rialto::PingRequest *request,
53 : ::rialto::PingResponse *response, ::google::protobuf::Closure *done) override;
54 :
55 : private:
56 : service::ISessionServerManager &m_sessionServerManager;
57 : };
58 : } // namespace firebolt::rialto::server::ipc
59 :
60 : #endif // FIREBOLT_RIALTO_SERVER_IPC_SERVER_MANAGER_MODULE_SERVICE_H_
|