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 2026 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_I_PRIVATE_METRICS_MODULE_SERVICE_H_
21 : #define FIREBOLT_RIALTO_SERVER_IPC_I_PRIVATE_METRICS_MODULE_SERVICE_H_
22 :
23 : #include "ControlCommon.h"
24 : #include "IPrivateMetricsService.h"
25 : #include "MediaCommon.h"
26 : #include "privatemetricsmodule.pb.h"
27 : #include <IIpcServer.h>
28 : #include <memory>
29 :
30 : namespace firebolt::rialto::server::ipc
31 : {
32 : class IPrivateMetricsModuleService;
33 :
34 : class IPrivateMetricsModuleServiceFactory
35 : {
36 : public:
37 11 : IPrivateMetricsModuleServiceFactory() = default;
38 12 : virtual ~IPrivateMetricsModuleServiceFactory() = default;
39 :
40 : static std::shared_ptr<IPrivateMetricsModuleServiceFactory> createFactory();
41 :
42 : virtual std::shared_ptr<IPrivateMetricsModuleService> create(service::IPrivateMetricsService &metricsService) const = 0;
43 : };
44 :
45 : class IPrivateMetricsModuleService : public ::firebolt::rialto::PrivateMetricsModule,
46 : public std::enable_shared_from_this<IPrivateMetricsModuleService>
47 : {
48 : public:
49 17 : IPrivateMetricsModuleService() = default;
50 17 : virtual ~IPrivateMetricsModuleService() = default;
51 :
52 : IPrivateMetricsModuleService(const IPrivateMetricsModuleService &) = delete;
53 : IPrivateMetricsModuleService(IPrivateMetricsModuleService &&) = delete;
54 : IPrivateMetricsModuleService &operator=(const IPrivateMetricsModuleService &) = delete;
55 : IPrivateMetricsModuleService &operator=(IPrivateMetricsModuleService &&) = delete;
56 :
57 : virtual void clientConnected(const std::shared_ptr<::firebolt::rialto::ipc::IClient> &ipcClient) = 0;
58 : virtual void clientDisconnected(const std::shared_ptr<::firebolt::rialto::ipc::IClient> &ipcClient) = 0;
59 :
60 : virtual void notifyApplicationStateChanged(ApplicationState newState) = 0;
61 : };
62 : } // namespace firebolt::rialto::server::ipc
63 :
64 : #endif // FIREBOLT_RIALTO_SERVER_IPC_I_PRIVATE_METRICS_MODULE_SERVICE_H_
|