REST.Backend.EMSApi.TEMSClientAPI.RetrieveModuleResource
Delphi
function RetrieveModuleResource(const AModuleID, AResourceName: string; out AResource: TModuleResource;
const AJSON: TJSONArray; AProc: TRetrieveModuleResourceProc): Boolean; overload;
function RetrieveModuleResource(const AModuleID, AResourceName: string; out AFoundResource: TModuleResource;
const AJSON: TJSONArray = nil): Boolean; overload;
function RetrieveModuleResource(const AModuleID, AResourceName: string; AProc: TRetrieveModuleResourceProc): Boolean; overload;
function RetrieveModuleResource(const AResource: TModuleResource; out AFoundResource: TModuleResource;
const AJSON: TJSONArray = nil): Boolean; overload;
function RetrieveModuleResource(const AResource: TModuleResource; AProc: TRetrieveModuleResourceProc): Boolean; overload;
C++
bool __fastcall RetrieveModuleResource(const System::UnicodeString AModuleID, const System::UnicodeString AResourceName, /* out */ TModuleResource &AResource, System::Json::TJSONArray* const AJSON, _di_TRetrieveModuleResourceProc AProc)/* overload */;
bool __fastcall RetrieveModuleResource(const System::UnicodeString AModuleID, const System::UnicodeString AResourceName, /* out */ TModuleResource &AFoundResource, System::Json::TJSONArray* const AJSON = (System::Json::TJSONArray*)(0x0))/* overload */;
bool __fastcall RetrieveModuleResource(const System::UnicodeString AModuleID, const System::UnicodeString AResourceName, _di_TRetrieveModuleResourceProc AProc)/* overload */;
bool __fastcall RetrieveModuleResource(const TModuleResource &AResource, /* out */ TModuleResource &AFoundResource, System::Json::TJSONArray* const AJSON = (System::Json::TJSONArray*)(0x0))/* overload */;
bool __fastcall RetrieveModuleResource(const TModuleResource &AResource, _di_TRetrieveModuleResourceProc 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 resource from the EMS server and returns True
if it receives the information successfully or False
otherwise.
To specify the target module resource, provide either a string with the module ID (AModuleID
) and a string with the module resource name (AResourceName
) or an instance of TModuleResource (AModuleResource
).
To handle the received information, you must provide either of the following:
- An instance of TModuleResource (
AModuleResource
orAFoundModuleResource
). RetrieveModuleResource fills the specified object with the received module resource data.You may optionally provide a third argument, an instance of TJSONArray (
AJSON
), so that RetrieveModuleResource fills that object with the received module resource data in JSON format. - A procedure of type TRetrieveModuleResourceProc (
AProc
). RetrieveModuleResource calls your procedure and provides the received module resource data both as an instance of TModuleResource (first argument) and as an instance of TJSONArray (second argument).
- Note: You may also combine all three parameters. See the first signature above.
Exceptions
Exception | Message | Description |
---|---|---|
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. |