MachinesInterface Class Reference

#include <machine.h>

Detailed Description

This class declares functions to access and manage machines. There is no difference when accessing the machines using the available rpc interfaces where the machine runs (local, remote, webbrowser).

Public Member Functions

 MAXON_OBSERVABLE_STATIC (void, ObservableMachineStateChanged,(const MachineRef &machine, MACHINESTATE oldState, MACHINESTATE newState), ObservableCombinerRunAllComponent)
 

Static Public Member Functions

static MAXON_METHOD MachineRef GetLocal ()
 
static MAXON_METHOD Result< void > GetRPCMachines (WritableArrayInterface< MachineRef > &machines)
 
static MAXON_METHOD Result< MachineRef > FindRPCMachine (const String &machineUuid)
 
static MAXON_METHOD Result< MachineRef > FindOrAddRPCMachine (const String &machineUuid, MACHINESTATE state, const CreateNewMachineCallback &newMachineCallback, const CheckExistingMachineCallback &existingCallback)
 
static MAXON_METHOD Result< void > RemoveRPCMachine (const MachineRef &machine)
 

Private Member Functions

 MAXON_INTERFACE_NONVIRTUAL (MachinesInterface, MAXON_REFERENCE_NONE, "net.maxon.interface.machines")
 

Member Function Documentation

◆ MAXON_INTERFACE_NONVIRTUAL()

MAXON_INTERFACE_NONVIRTUAL ( MachinesInterface  ,
MAXON_REFERENCE_NONE  ,
"net.maxon.interface.machines"   
)
private

◆ GetLocal()

static MAXON_METHOD MachineRef GetLocal ( )
static

Returns the local machine. It can be used like every other machine in the network. The difference is that the functions for this machine are called directly not using rpc.

Returns
Handle to the machine.

◆ GetRPCMachines()

static MAXON_METHOD Result<void> GetRPCMachines ( WritableArrayInterface< MachineRef > &  machines)
static

Returns a list of all available machines in the application. The local machine is always the first entry in this list. it's guaranteed that at least one machine (the local) is returned in the array.

Parameters
[out]machinesReturns the list of machines.
Returns
OK on success.

◆ FindRPCMachine()

static MAXON_METHOD Result<MachineRef> FindRPCMachine ( const String machineUuid)
static

◆ FindOrAddRPCMachine()

static MAXON_METHOD Result<MachineRef> FindOrAddRPCMachine ( const String machineUuid,
MACHINESTATE  state,
const CreateNewMachineCallback newMachineCallback,
const CheckExistingMachineCallback existingCallback 
)
static

◆ RemoveRPCMachine()

static MAXON_METHOD Result<void> RemoveRPCMachine ( const MachineRef &  machine)
static

◆ MAXON_OBSERVABLE_STATIC()

MAXON_OBSERVABLE_STATIC ( void  ,
ObservableMachineStateChanged  ,
(const MachineRef &machine, MACHINESTATE oldState, MACHINESTATE newState)  ,
ObservableCombinerRunAllComponent   
)

Signals that a machine state has been changed.