• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef TELEPHONY_SERVER_SESSION_H
17 #define TELEPHONY_SERVER_SESSION_H
18 
19 #include "session_adapter.h"
20 
21 namespace OHOS {
22 namespace Telephony {
23 class ServerSession : public SessionAdapter {
24 public:
ServerSession(const std::shared_ptr<ISessionCallback> & callback)25     explicit ServerSession(const std::shared_ptr<ISessionCallback> &callback) : SessionAdapter(callback) {}
26     ~ServerSession() override;
27     void Create(const std::string &localName, const int32_t &qosMinBw) override;
28     void Destroy() override;
Connect(const std::string & peerDevId,const std::string & localName,const std::string & peerName,const int32_t & qosMinBw)29     void Connect(const std::string &peerDevId, const std::string &localName, const std::string &peerName,
30         const int32_t &qosMinBw) override {}
Disconnect()31     void Disconnect() override {}
32     void OnSessionBind(int32_t socket) override;
33     void OnSessionShutdown(int32_t socket) override;
34 
35 private:
36     int32_t serverSocket_{INVALID_SOCKET_ID};
37 };
38 
39 } // namespace Telephony
40 } // namespace OHOS
41 
42 #endif // TELEPHONY_SERVER_SESSION_H
43