REST.Backend.EMSApi.TEMSClientAPI.RegisterModule

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure RegisterModule(const AName, AProtocol, AProtocolProps: string; const ADetails: TJSONObject;  const AResources: TJSONArray; out AModule: TModule); overload;
procedure RegisterModule(const AModuleName, AProtocol, AProtocolProps: string; const ADetails: TJSONObject; const Resources: TResourceList; out AModule: TModule); overload;

C++

void __fastcall RegisterModule(const System::UnicodeString AName, const System::UnicodeString AProtocol, const System::UnicodeString AProtocolProps, System::Json::TJSONObject* const ADetails, System::Json::TJSONArray* const AResources, /* out */ TModule &AModule)/* overload */;
void __fastcall RegisterModule(const System::UnicodeString AModuleName, const System::UnicodeString AProtocol, const System::UnicodeString AProtocolProps, System::Json::TJSONObject* const ADetails, const System::DynamicArray<System::Generics::Collections::TPair__2<System::UnicodeString,System::Json::TJSONObject*> > Resources, /* out */ TModule &AModule)/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
public
REST.Backend.EMSApi.pas
REST.Backend.EMSApi.hpp
REST.Backend.EMSApi TEMSClientAPI

Description

Adds to the EMS server a module with the specified name, protocol, protocol properties, details and resources.

RegisterModule receives the following parameters:

  • AName or AModuleName is the name of the module.
  • AProtocol is the protocol of the module.
  • AProtocolProps are the protocol properties of the module.
  • ADetails is an optional JSON object that contains additional data for the new module.
  • AResources or Resources is a JSON array or an instance of TResourceList that contains resources that RegisterModule must include into ADetails before it sends the new information to the EMS server.
  • AModule is an instance of TModule that represents the new module.

Exceptions

Exception Message Description

EEMSClientAPIError

MasterSecret required

Authentication is TAuthentication.MasterSecret and ConnectionInfo.MasterSecret is an empty string.

Session token required

Authentication is TAuthentication.Session and you did not log in or the session authentication token that you provided to Login is an empty string.

See Also