Show: Delphi C++
Display Preferences

REST.Backend.EMSApi.TEMSClientAPI.RetrieveModule

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function RetrieveModule(const AModuleID: string; out AModule: TModule;  const AJSON: TJSONArray; AProc: TRetrieveModuleProc): Boolean; overload;
function RetrieveModule(const AModuleID: string; out AFoundModule: TModule;  const AJSON: TJSONArray = nil): Boolean; overload;
function RetrieveModule(const AModuleID: string; AProc: TRetrieveModuleProc): Boolean; overload;
function RetrieveModule(const AModule: TModule; out AFoundModule: TModule;  const AJSON: TJSONArray = nil): Boolean; overload;
function RetrieveModule(const AModule: TModule; AProc: TRetrieveModuleProc): Boolean; overload;

C++

bool __fastcall RetrieveModule(const System::UnicodeString AModuleID, /* out */ TModule &AModule, System::Json::TJSONArray* const AJSON, _di_TRetrieveModuleProc AProc)/* overload */;
bool __fastcall RetrieveModule(const System::UnicodeString AModuleID, /* out */ TModule &AFoundModule, System::Json::TJSONArray* const AJSON = (System::Json::TJSONArray*)(0x0))/* overload */;
bool __fastcall RetrieveModule(const System::UnicodeString AModuleID, _di_TRetrieveModuleProc AProc)/* overload */;
bool __fastcall RetrieveModule(const TModule &AModule, /* out */ TModule &AFoundModule, System::Json::TJSONArray* const AJSON = (System::Json::TJSONArray*)(0x0))/* overload */;
bool __fastcall RetrieveModule(const TModule &AModule, _di_TRetrieveModuleProc AProc)/* overload */;

Properties

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

Description

Requests the information of a module from the EMS server and returns True if it receives the information successfully or False otherwise.

To specify the target module, provide either a string with the module name (AModuleID) or an instance of TModule (AModule).

To handle the received information, you must provide either of the following:

  • An instance of TModule (AModule or AFoundModule). RetrieveModule fills the specified object with the received module data.

    You may optionally provide a third argument, an instance of TJSONArray (AJSON), so that RetrieveModule fills that object with the received module data in JSON format.

  • A procedure of type TRetrieveModuleProc (AProc). RetrieveModule calls your procedure and provides the received module data both as an instance of TModule (first argument) and as an instance of TJSONArray (second argument).

Exceptions

Exception Message Description

EEMSClientAPIError

MasterSecret required

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

Module ID required

The specified module ID 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

Personal tools
In Other Languages
Previous Versions
Assistance