SmartAuditor provides the ability to record ICA sessions.The purpose of the SmartAuditor Event API is to allow third parties to augment session recordings with application specific event data. Arbitrary data can be added to the SmartAuditor recording stream in real-time during recording, and the same data can be retrieved in real-time during playback.
The SmartAuditor Agent provides a simple COM interface that third party applications can use to add application specific event data into the recorded session.
SmartAuditor Event Data during recording
The above diagram shows a published application running on Presentation Server with SmartAuditor session recording enabled. During the lifetime of the recorded session, the published application can add application specific event data into the recorded stream using the LogData function provided by the IUserApi interface. Application specific event data are time stamped as they are added into the recorded stream. The same event data will be available during playback of the recorded session, synchronized with the playback stream in real-time.
The above diagram shows how application event data are consumed during session playback. Event data are displayed in the Events and Bookmarks panel of the SmartAuditor Player. The Player can also deliver the event data as recorded to a third party consumer application built using the Player SDK. The delivery of event data is synchronized with the playback in real-time.
SmartAuditor Event API COM Server
The SmartAuditor Event API is provided as a COM Server hosted by the SmartAuditor Agent, installed on each computer running Presentation Server with
SmartAuditor enabled. The SmartAuditor Event API can be enabled or disabled on a per-server basis. The default setting for each SmartAuditor Agent installation is for the COM interface to be disabled. Any attempts to connect to the interface will fail until it is enabled by the Presentation Server administrator. Please refer to the SmartAuditor Administrator's Guide for more information on configuring the SmartAuditor Agent. When the SmartAuditor Event API is enabled, a COM interface called IUserApi is made available for third party applications to add event data to the recorded stream. The IUserApi interface contains only one function called LogData. Event Data Storage Event data is stored in the data stream within the session recording. If the searchable flag is set when the data is added to the recording stream, a database entry will be created and indexed against the fully qualified type associated with the data. As there is some overhead in storing each searchable event, this flag should only be set if there is an intention to search on the event text. See CTX114748 - Citrix SmartAuditor Database Schema for more information on the database storage.
SmartAuditor Event Data Playback
Event data added to SmartAuditor recording files are automatically available during playback. Event data are organized in a similar manner as bookmarks, and are listed in the Events and Bookmarks panel of the SmartAuditor Player. The following screenshot shows the event data as seen in the Events and Bookmarks panel (lower left corner) of the SmartAuditor Player:
Event items are labelled with a yellow dot, both in the Events and Bookmarks panel and on the player window timeline bar. Note that only the event text is displayed in the SmartAuditor Player; event binary data can only be retrieved through custom applications built on the SmartAuditor Player SDK (see the next section for more details.) Recordings containing event data originally recorded with the searchable flag set can be found using the SmartAuditor Player's advanced search form as shown below. This allows searching by both event text and event type name.
SmartAuditor Player SDK
As indicated in the previous section, text associated with event data are automatically made available during playback within the SmartAuditor Player. Event
data can also be accessed during playback via a set of library functions provided by the SmartAuditor Player SDK. The use of the Player SDK is optional. Its primary use is the rendering binary data associated with each event during playback. The Player SDK is based on an event notification or callback interface, where a third party application registers an event handler where event data can be delivered in real-time during session playback. The following C++ code fragment illustrates a typical lifecycle of an application making use of the SmartAuditor Player SDK: