<< Click to display table of contents >> TRVCamera.AddUser, ModifyUser |
The methods make changes in Users collection and apply changes to the IP camera.
procedure AddUser(const AUserName, APassword: String;
AAccess: TRVUserAccess);
procedure ModifyUser(Index: Integer; const AUserName, APassword: String;
AAccess: TRVUserAccess);
The current DeviceType must be rvdtIPCamera, and the camera must be found by SearchCamera, the camera must support a list of users, and TRVCamera must be connected to this camera as an admin.
To check if the connected camera supports managing user list, check the presence of rvcp_Users in GetAccessibleCamProperties.
AddUser adds a new item Users and assigns its properties, then applies changes to the camera.
ModifyUser changes properties of Users[Index], then applies changes to the camera.
Each change in Users collection is applied to the camera. When you add item to this collection, delete and item, assign a new value to item property, the corresponding command it sent to the connected IP camera (if the camera supports it).
However, it can be inefficient. For example, you can add a new item to the collection (one operation), sets its properties (3 operations). Instead, you can call AddUser that does it as a single operation.