The API of the deprecated (legacy) Listing.
More...
|
enum | API_ListDataID {
API_ZombieListDataID
, API_KeyID
, API_UnitID
, API_Obsolete_ComponentID
,
API_DescriptorID
} |
| Possible types of a listdata item. More...
|
|
The API of the deprecated (legacy) Listing.
◆ API_ListDataID
Possible types of a listdata item.
◆ ACAPI_OldListing_Get()
Retrieves the data of a listdata.
- Parameters
-
listdata | [in/out] Parameters of the listdata. The type of the listdata, the index of the set and the index of the listdata must be passed in the typeID, the setIndex and the index fields in the listdata header. Other fields of the structure are filled in automatically. |
- Returns
- NoError - The function has completed with success.
- APIERR_BADINDEX - Invalid listdata index was passed.
- APIERR_BADID - Invalid listdata type was passed.
- APIERR_DELETED - Invalid listdata was deleted.
- Example
-
◆ ACAPI_OldListing_GetLocal()
Retrieves the data of a local listing component.
- Parameters
-
libIndex | [in] Index of the library part. |
elemHead | [in] Element of the placed object instance (see remarks). |
listdata | [in/out] Parameters of the listdata. The type of the listdata must be passed in the typeID field in the listdata header. The index in the library part must be passed in the index field in the listdata header. The other fields of the structure are filled in automatically. |
- Returns
- NoError - The function has completed with success.
- APIERR_BADPARS - Invalid libIndex was passed.
- APIERR_BADID - Invalid listdata type was passed.
- Example
Int32 libIndex;
GSErrCode err;
libPart.
typeID = APILib_PropertyID;
GS::ucscpy (libPart.
docu_UName, L(
"Test property"));
if (err == NoError && libPart.
index != 0) {
libIndex = libPart.
index;
}
◆ ACAPI_OldListing_GetNum()
GSErrCode ACAPI_OldListing_GetNum |
( |
Int32 | setIndex, |
|
|
API_ListDataID | typeID, |
|
|
Int32 * | count ) |
Returns the number of listdata in given set.
- Parameters
-
setIndex | [in] Index of the sets of the listing database. |
typeID | [in] Type of the listdata. |
count | [out] Number of listdata type in the set. |
- Returns
- NoError - The function has completed with success.
- APIERR_BADID - Invalid listdata type or setIndex was passed.
- Example
-
◆ ACAPI_OldListing_GetSet()
Retrieves the data of a listdata set.
- Parameters
-
listdataSet | [in/out] Parameters of the set. The index of the set must be passed in the setIndex field in the listdataSet; it must be greater than 0. The other fields of the structure are filled in automatically. |
- Returns
- NoError - The function has completed with success.
- APIERR_BADINDEX - Invalid listdataSet setindex was passed.
- Example
-
◆ ACAPI_OldListing_GetSetNum()
Int32 ACAPI_OldListing_GetSetNum |
( |
void | | ) |
|
Returns the number of listdata sets.
- Returns
- NoError - The number of listdata sets of the listing database.
- Example
-
◆ ACAPI_OldListing_Search()
GSErrCode ACAPI_OldListing_Search |
( |
API_ListData * | listdata | ) |
|
Searches for a listdata.
- Parameters
-
listdata | [in/out] Parameters of the listdata. The type and setIndex of the listdata must be passed in the typeID and the setIndex fields in the listdata header. The code and/or the keycode of the listdata must be passed in the code and the keycode fields in the listdata. The setIndex and the index fields of the listdata header are used as the output parameters to return the setIndex/index to the searched listdata. |
- Returns
- NoError - The function has completed with success.
- APIERR_BADKEYCODE - Invalid code or keycode was passed.
API_ListDataID | keycode | code |
API_KeyID or API_UnitID | not exist | required |
API_Obsolete_ComponentID or API_DescriptorID | required | optional |
- Example
char buffer[256];
GSErrCode err;
if (err == NoError) {
sprintf (buffer,
"Set index: %d, key code: \"003\"", listdata.
header.
setIndex);
while (err == NoError && CHEqualASCII (listdata.
component.
keycode,
"003", GS::CaseInsensitive)) {
}
}