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_SERVICE_I_SESSION_SERVER_MANAGER_H_
21 : #define FIREBOLT_RIALTO_SERVER_SERVICE_I_SESSION_SERVER_MANAGER_H_
22 :
23 : #include "IAckSender.h"
24 : #include "RialtoLogging.h"
25 : #include "SessionServerCommon.h"
26 : #include <AudioDecoderCapabilities.h>
27 : #include <VideoDecoderCapabilities.h>
28 : #include <memory>
29 : #include <optional>
30 : #include <string>
31 :
32 : namespace firebolt::rialto::server::service
33 : {
34 : class ISessionServerManager
35 : {
36 : public:
37 52 : ISessionServerManager() = default;
38 52 : virtual ~ISessionServerManager() = default;
39 :
40 : ISessionServerManager(const ISessionServerManager &) = delete;
41 : ISessionServerManager(ISessionServerManager &&) = delete;
42 : ISessionServerManager &operator=(const ISessionServerManager &) = delete;
43 : ISessionServerManager &operator=(ISessionServerManager &&) = delete;
44 :
45 : virtual bool initialize(int argc, char *argv[]) = 0;
46 : virtual void startService() = 0;
47 : virtual bool configureIpc(const std::string &socketName, unsigned int socketPermissions,
48 : const std::string &socketOwner, const std::string &socketGroup) = 0;
49 : virtual bool configureIpc(int32_t socketFd) = 0;
50 : virtual bool configureServices(const common::SessionServerState &state,
51 : const common::MaxResourceCapabilitites &maxResource,
52 : const std::string &clientDisplayName, const std::string &appName) = 0;
53 : virtual bool setState(const common::SessionServerState &state) = 0;
54 : virtual void setLogLevels(RIALTO_DEBUG_LEVEL defaultLogLevels, RIALTO_DEBUG_LEVEL clientLogLevels,
55 : RIALTO_DEBUG_LEVEL sessionServerLogLevels, RIALTO_DEBUG_LEVEL ipcLogLevels,
56 : RIALTO_DEBUG_LEVEL serverManagerLogLevels, RIALTO_DEBUG_LEVEL commonLogLevels) = 0;
57 : virtual bool ping(std::int32_t id, const std::shared_ptr<IAckSender> &ackSender) = 0;
58 : virtual void setPreloadedCapabilities(const std::optional<common::AudioDecoderCapabilities> &audioCaps,
59 : const std::optional<common::VideoDecoderCapabilities> &videoCaps) = 0;
60 : };
61 : } // namespace firebolt::rialto::server::service
62 :
63 : #endif // FIREBOLT_RIALTO_SERVER_SERVICE_I_SESSION_SERVER_MANAGER_H_
|