nx_metadata_sdk  1.0
Metadata SDK
i_utility_provider.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2 
3 #pragma once
4 
5 #include <nx/sdk/interface.h>
6 #include <nx/sdk/i_string.h>
7 #include <nx/sdk/i_plugin.h>
8 
9 namespace nx {
10 namespace sdk {
11 
22 class IUtilityProvider0: public Interface<IUtilityProvider0>
23 {
24 public:
25  static auto interfaceId() { return makeId("nx::sdk::IUtilityProvider"); }
26 
31  virtual int64_t vmsSystemTimeSinceEpochMs() const = 0;
32 
36  protected: virtual const IString* getHomeDir() const = 0;
37  public: std::string homeDir() const { return toPtr(getHomeDir())->str(); }
38 };
39 
40 class IUtilityProvider: public Interface<IUtilityProvider, IUtilityProvider0>
41 {
42 public:
43  static auto interfaceId() { return makeId("nx::sdk::IUtilityProvider1"); }
44 
45  virtual const char* serverId() const = 0;
46 };
47 
48 } // namespace sdk
49 } // namespace nx
Definition: interface.h:28
virtual const IString * getHomeDir() const =0
virtual int64_t vmsSystemTimeSinceEpochMs() const =0
Definition: i_string.h:10
Definition: i_utility_provider.h:40
Definition: apple_utils.h:6
Definition: i_utility_provider.h:22
virtual const char * str() const =0
static constexpr const InterfaceId * makeId(const char(&charArray)[len])
Definition: i_ref_countable.h:77