REST.Backend.EMSApi.TEMSClientAPI.QueryModuleName
Delphi
function QueryModuleName(const AModuleName: string; out AModule: TModule;
const AJSON: TJSONArray; AProc: TQueryModuleNameProc): Boolean; overload;
function QueryModuleName(const AModuleName: string; AProc: TQueryModuleNameProc): Boolean; overload;
function QueryModuleName(const AModuleName: string; out AModule: TModule;
const AJSON: TJSONArray = nil): Boolean; overload;
C++
bool __fastcall QueryModuleName(const System::UnicodeString AModuleName, /* out */ TModule &AModule, System::Json::TJSONArray* const AJSON, _di_TQueryModuleNameProc AProc)/* overload */;
bool __fastcall QueryModuleName(const System::UnicodeString AModuleName, _di_TQueryModuleNameProc AProc)/* overload */;
bool __fastcall QueryModuleName(const System::UnicodeString AModuleName, /* out */ TModule &AModule, System::Json::TJSONArray* const AJSON = (System::Json::TJSONArray*)(0x0))/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | REST.Backend.EMSApi.pas REST.Backend.EMSApi.hpp |
REST.Backend.EMSApi | TEMSClientAPI |
Description
Queries the EMS server for the data of a module with the specified module name and returns True
if a module with the specified module name exists in the EMS server or False
otherwise.
To handle the received information, you may provide the following parameters:
AModule
is an instance of TModule that RetrieveModule fills with the received module data.AJSON
is an instance of TJSONArray that RetrieveModule fills with the received module data in JSON format.AProc
is a procedure of type TQueryModuleNameProc. 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).
- Note: QueryModuleName supports different combinations of these parameters, see the signature of the function above.
Exceptions
Exception | Message | Description |
---|---|---|
MasterSecret required |
Authentication is TAuthentication.MasterSecret and ConnectionInfo.MasterSecret is an empty string. | |
One module expected |
The EMS server returned more than one module for the specified module name. | |
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. |