NDEVR
API Documentation
NDEVRServerManager.h
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2020, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: NDEVRServerManager
28File: OWLFactory
29Included in API: True
30Author(s): tyler.parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/PasswordString.h>
35#include <NDEVR/INIInterface.h>
36#include <NDEVR/NDEVRServerInfo.h>
37#include <NDEVR/File.h>
38namespace NDEVR
39{
43 class NDEVRSERVERCLIENT_API NDEVRServerManager : public INIInterface
44 {
45 private:
47 NDEVRServerManager();
48 public:
52 struct OWLServer : public NDEVRServerInfo
53 {
56 NDEVRSERVERCLIENT_API bool operator!=(const OWLServer& server) const;
57 NDEVRSERVERCLIENT_API bool operator==(const OWLServer& server) const;
58 };
59
61 static NDEVRServerManager& Default();
66 void getINI(INIFactory& factory) override;
67 static OWLServer NDEVRServer();
68 OWLServer defaultServer() const;
69 OWLServer createNewServer() const;
70 virtual void finishReadingINI(INIFactory& factory) override;
71 virtual void prepareForINI(INIFactory& factory) override;
72 OWLServer getFromServerAddress(const StringView& server_address, uint02 port = Constant<uint02>::Invalid) const;
73 OWLServer getFromServerID(const UUID& server_id) const;
74 bool updateServer(OWLServer server);
75 private:
76 String m_ini_string;
77 //ServerRequest ReceiveRequest();
78 };
79}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
Contains methods for easily reading and writing to an INI file including efficient casting,...
Definition INIReader.h:107
INIInterface()
Constructs an INIInterface with no default INI file.
Resource< Buffer< OWLServer > > servers
List of configured OWL servers.
static NDEVRServerManager & Default()
Returns the singleton instance.
void getINI(INIFactory &factory) override
Populates the given INI factory with the options managed by this interface.
virtual void finishReadingINI(INIFactory &factory) override
Called after reading an INI file.
static Resource< uint02 > default_owl_web_port
Default web port for OWL connections.
Resource< UUID > preferred_server
UUID of the preferred server.
virtual void prepareForINI(INIFactory &factory) override
Called before reading or writing an INI file.
A core part of the engine, stores variables that can be listened to with ResourceListener which will ...
Definition Resource.h:42
The core String View class for the NDEVR API.
Definition StringView.h:58
The core String class for the NDEVR API.
Definition String.h:95
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:61
static UUID CreateUUID()
The primary namespace for the NDEVR SDK.
uint16_t uint02
-Defines an alias representing a 2 byte, unsigned integer -Can represent exact integer values 0 throu...
Contains the address, credentials, and security flag needed to connect to an NDEVR server.
Represents an OWL server entry with a name and unique ID.
String name
Display name of the server.