Lightstreamer C++ Client SDK
Loading...
Searching...
No Matches
ConnectionDetails.h
1/*
2 * Copyright (C) 2023 Lightstreamer Srl
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifndef INCLUDED_Lightstreamer_ConnectionDetails
17#define INCLUDED_Lightstreamer_ConnectionDetails
18
19#include "../Lightstreamer.h"
20
21namespace Lightstreamer {
22
34 HaxeObject _delegate = nullptr;
35
36 void initDelegate(HaxeObject client) {
37 _delegate = LightstreamerClient_getConnectionDetails(client);
38 }
39
40 friend class LightstreamerClient;
41public:
42 ConnectionDetails(const ConnectionDetails&) = delete;
43 ConnectionDetails& operator=(const ConnectionDetails&) = delete;
44
46
48 Lightstreamer_releaseHaxeObject(_delegate);
49 }
59 std::string getAdapterSet() {
60 return ConnectionDetails_getAdapterSet(_delegate);
61 }
82 void setAdapterSet(const std::string& adapterSet) {
83 ConnectionDetails_setAdapterSet(_delegate, &adapterSet);
84 }
90 std::string getServerAddress() {
91 return ConnectionDetails_getServerAddress(_delegate);
92 }
123 void setServerAddress(const std::string& serverAddress) {
124 ConnectionDetails_setServerAddress(_delegate, &serverAddress);
125 }
133 std::string getUser() {
134 return ConnectionDetails_getUser(_delegate);
135 }
155 void setUser(const std::string& user) {
156 ConnectionDetails_setUser(_delegate, &user);
157 }
183 return ConnectionDetails_getServerInstanceAddress(_delegate);
184 }
207 std::string getServerSocketName() {
208 return ConnectionDetails_getServerSocketName(_delegate);
209 }
228 std::string getClientIp() {
229 return ConnectionDetails_getClientIp(_delegate);
230 }
243 std::string getSessionId() {
244 return ConnectionDetails_getSessionId(_delegate);
245 }
270 void setPassword(const std::string& password) {
271 ConnectionDetails_setPassword(_delegate, &password);
272 }
273};
274
275} // namespace Lightstreamer
276
277#endif // INCLUDED_Lightstreamer_ConnectionDetails
Used by LightstreamerClient to provide a basic connection properties data object.
Definition ConnectionDetails.h:33
std::string getUser()
Inquiry method that gets the username to be used for the authentication on Lightstreamer Server when ...
Definition ConnectionDetails.h:133
void setAdapterSet(const std::string &adapterSet)
Setter method that sets the name of the Adapter Set mounted on Lightstreamer Server to be used to han...
Definition ConnectionDetails.h:82
void setPassword(const std::string &password)
Setter method that sets the password to be used for the authentication on Lightstreamer Server when i...
Definition ConnectionDetails.h:270
std::string getServerSocketName()
Inquiry method that gets the instance name of the Server which is serving the current session.
Definition ConnectionDetails.h:207
std::string getSessionId()
Inquiry method that gets the ID associated by the server to this client session.
Definition ConnectionDetails.h:243
std::string getServerInstanceAddress()
Inquiry method that gets the server address to be used to issue all requests related to the current s...
Definition ConnectionDetails.h:182
void setUser(const std::string &user)
Setter method that sets the username to be used for the authentication on Lightstreamer Server when i...
Definition ConnectionDetails.h:155
std::string getAdapterSet()
Inquiry method that gets the name of the Adapter Set (which defines the Metadata Adapter and one or s...
Definition ConnectionDetails.h:59
void setServerAddress(const std::string &serverAddress)
Setter method that sets the address of Lightstreamer Server.
Definition ConnectionDetails.h:123
std::string getServerAddress()
Inquiry method that gets the configured address of Lightstreamer Server.
Definition ConnectionDetails.h:90
std::string getClientIp()
Inquiry method that gets the IP address of this client as seen by the Server which is serving the cur...
Definition ConnectionDetails.h:228
Facade class for the management of the communication to Lightstreamer Server.
Definition LightstreamerClient.h:49