#include <machine.h>
This class is the entry point to access machine interfaces. So there is no difference if the machine is running local or remote via rpc.
Public Member Functions | |
MAXON_METHOD String | GetUniqueId () const |
MAXON_METHOD Result< DataDictionary > | GetMachineInfo () const |
MAXON_METHOD Result< ObjectRef > | GetInterface (const Id &interfaceName) |
template<typename INTERFACE > | |
MAXON_FUNCTION Result< INTERFACE > | GetInterface () |
MAXON_METHOD MACHINESTATE | GetState () const |
MAXON_METHOD Bool | SetState (MACHINESTATE stateMask, MACHINESTATE stateFlags) |
MAXON_METHOD String | ToString (const FormatStatement *formatStatement=nullptr) const |
MAXON_OBSERVABLE (void, ObservablePrivateSplashMessageReceived,(const MachineRef &machine, const DataDictionary &msg), ObservableCombinerRunAllComponent) | |
MAXON_OBSERVABLE (void, ObservableActivationChanged,(const MachineRef &machine, Bool gotActive), ObservableCombinerRunAllComponent) | |
Private Member Functions | |
MAXON_INTERFACE (MachineInterface, MAXON_REFERENCE_NORMAL, "net.maxon.interface.machine") | |
|
private |
MAXON_METHOD String GetUniqueId | ( | ) | const |
Returns the service name of the local machine. This name is a unique name which allows to identify the machine.
MAXON_METHOD Result<DataDictionary> GetMachineInfo | ( | ) | const |
Returns information about the system and processor. See maxon::MACHINEINFO for DataDictionary properties.
MAXON_METHOD Result<ObjectRef> GetInterface | ( | const Id & | interfaceName | ) |
Returns a interface of this machine. E.g. write OSClipboardRef clipboard = machine.GetInterface<OSClipboardRef>(); to get the clipboard interface handle. Don't use the Interface function but the overloaded NetworkRPCMachine::GetInterface<>() template instead. THREADSAFE. It automatically detects the interfaceName and casts the type.
[in] | interfaceName | INTERFACE::_interface.GetId(). |
MAXON_FUNCTION Result<INTERFACE> GetInterface | ( | ) |
Returns a interface of a machine. e.g. write OSClipboardRef clipboard = machine.GetInterface<OSClipboardRef>(); to get the clipboard interface handle. At the moment supported are: OSGuiRef, OSClipboardRef, GameServerRef, CaptureDeviceListRef, UpdaterRef.
MAXON_METHOD MACHINESTATE GetState | ( | ) | const |
Returns the machine state of the given machine. See MACHINEINFO for details.
MAXON_METHOD Bool SetState | ( | MACHINESTATE | stateMask, |
MACHINESTATE | stateFlags | ||
) |
** private ** Sets the machine state of the given machine. This function should not be called by users. It's private for internal functions.
[in] | stateMask | Mask of flags that should be changed. |
[in] | stateFlags | Values of flags that be set. |
MAXON_METHOD String ToString | ( | const FormatStatement * | formatStatement = nullptr | ) | const |
Returns a readable string of the content.
[in] | formatStatement | Nullptr or additional formatting instruction. Use "{N}" for nive formatting of the name only. Otherwise the unique id is printed together with the name. |
MAXON_OBSERVABLE | ( | void | , |
ObservablePrivateSplashMessageReceived | , | ||
(const MachineRef &machine, const DataDictionary &msg) | , | ||
ObservableCombinerRunAllComponent | |||
) |
MAXON_OBSERVABLE | ( | void | , |
ObservableActivationChanged | , | ||
(const MachineRef &machine, Bool gotActive) | , | ||
ObservableCombinerRunAllComponent | |||
) |
The activation status of the machine changed e.g. the user clicked onto another application When the app is becoming inactive you can e.g. idle some computations