Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpiCore)  1.26.2
UtilApiHelper
Collaboration diagram for UtilApiHelper:

Classes

class  MlpiApiPermissionEvaluation
 

Detailed Description

This module contains some useful functions and macros for api handling.

Please note that this piece of source code is not directly part of the MLPI. You do not need this file to program against the MLPI. Nevertheless, at least parts of this file have been considered to be somewhat useful when using or learning to use MLPI functionality. It is therefore included without any support but to act as sample code and source of inspiration.


Class Documentation

class MlpiApiPermissionEvaluation

This class helps to find out whether a permission is available.

Example:
ULONG numElementsRet = 0;
WCHAR16 permissions[4096] = L"";
MLPIRESULT result = mlpiApiGetOwnPermissions(connection, permissions, _countof(permissions), &numElementsRet);
if (MLPI_FAILED(result)) {
printf("\ncall of MLPI function failed with 0x%08x!", (unsigned) result);
return result;
}
else
{
WCHAR16 permission[] = L"MLPI_APILIB_PERMISSION_CONNECTION_CLOSE";
MlpiApiPermissionEvaluation evalPermission(permissions);
if (evalPermission.hasPermission(permission))
log(L"\nThe logged in user has the permission '%s'.", permission);
else
warning(L"\nThe logged in user hasn't the permission '%s'.", permission);
}

Definition at line 123 of file mlpiApiHelper.h.

Collaboration diagram for MlpiApiPermissionEvaluation:
Collaboration graph