/* Create refresh hook event for statement which has refresh event or interval. */
VOID CreateRefreshEventForStatement(IN FORM_BROWSER_STATEMENT *Statement)
/* Create refresh hook event for statement which has refresh event or interval. */
VOID CreateRefreshEventForStatement(IN FORM_BROWSER_STATEMENT *Statement)
{
  EFI_STATUS                       Status;
  EFI_EVENT                        RefreshEvent;
  FORM_BROWSER_REFRESH_EVENT_NODE  *EventNode;
  Status = gBS->CreateEventEx (
                  EVT_NOTIFY_SIGNAL,
                  TPL_CALLBACK,
                  RefreshEventNotifyForStatement,
                  Statement,
                  &Statement->RefreshGuid,
                  &RefreshEvent
                  );
  ASSERT_EFI_ERROR (Status);
  EventNode = AllocateZeroPool (sizeof (FORM_BROWSER_REFRESH_EVENT_NODE));
  ASSERT (EventNode != NULL);
  EventNode->RefreshEvent = RefreshEvent;
  InsertTailList (&mRefreshEventList, &EventNode->Link);
}